diff --git a/modules/openapi-generator/src/main/resources/Ada/README.mustache b/modules/openapi-generator/src/main/resources/Ada/README.mustache index d3ca2efef3908c388f314d19937bc4855d01c3c4..d0f6d54028fa544b6ba03b475078b805e3416d75 100644 --- a/modules/openapi-generator/src/main/resources/Ada/README.mustache +++ b/modules/openapi-generator/src/main/resources/Ada/README.mustache @@ -74,7 +74,7 @@ All URIs are relative to *{{basePath}}* Method | HTTP request | Description ------------- | ------------- | ------------- -{{#apiInfo}}{{#apis}}{{#operations}}{{#operation}}[**{{nickname}}**]({{apiDocPath}}{{classname}}.md#{{nickname}}) | **{{httpMethod}}** {{path}} | {{#summary}}{{summary}}{{/summary}} +{{#apiInfo}}{{#apis}}{{#operations}}{{#operation}}[**{{nickname}}**]({{apiDocPath}}{{classname}}.md#{{nickname}}) | **{{httpMethod}}** {{path}} | {{summary}} {{/operation}}{{/operations}}{{/apis}}{{/apiInfo}} ### Models diff --git a/modules/openapi-generator/src/main/resources/Ada/client-body.mustache b/modules/openapi-generator/src/main/resources/Ada/client-body.mustache index 71b3e314a957ae7c2c99b45f7686b43de49019df..b13f1af1291089384e874a43e2cdecfadcea7417 100644 --- a/modules/openapi-generator/src/main/resources/Ada/client-body.mustache +++ b/modules/openapi-generator/src/main/resources/Ada/client-body.mustache @@ -13,7 +13,7 @@ package body {{package}}.Clients is procedure {{operationId}} (Client : in out Client_Type{{#hasParams}};{{/hasParams}}{{#allParams}} {{paramName}} : in {{^isFile}}{{^isString}}{{^isPrimitiveType}}{{^isContainer}}{{package}}.Models.{{/isContainer}}{{/isPrimitiveType}}{{/isString}}{{/isFile}}{{dataType}}{{^-last}};{{/-last}}{{/allParams}}{{#returnType}}; - Result : out {{returnType}}{{/returnType}}) is + Result : out {{.}}{{/returnType}}) is URI : Swagger.Clients.URI_Type;{{#hasBodyParam}} Req : Swagger.Clients.Request_Type;{{/hasBodyParam}}{{#hasFormParams}} Req : Swagger.Clients.Request_Type;{{/hasFormParams}} diff --git a/modules/openapi-generator/src/main/resources/Ada/client-spec.mustache b/modules/openapi-generator/src/main/resources/Ada/client-spec.mustache index 46559f0dcad383ff772d495d1ddfab0043a64bba..134218b105e33659f8ffd586791c5c675de399c8 100644 --- a/modules/openapi-generator/src/main/resources/Ada/client-spec.mustache +++ b/modules/openapi-generator/src/main/resources/Ada/client-spec.mustache @@ -17,7 +17,7 @@ package {{package}}.Clients is procedure {{operationId}} (Client : in out Client_Type{{#hasParams}};{{/hasParams}}{{#allParams}} {{paramName}} : in {{^isFile}}{{^isString}}{{^isPrimitiveType}}{{^isContainer}}{{package}}.Models.{{/isContainer}}{{/isPrimitiveType}}{{/isString}}{{/isFile}}{{dataType}}{{^-last}};{{/-last}}{{/allParams}}{{#returnType}}; - Result : out {{returnType}}{{/returnType}}); + Result : out {{.}}{{/returnType}}); {{/operation}} {{/operations}} diff --git a/modules/openapi-generator/src/main/resources/Ada/licenseInfo.mustache b/modules/openapi-generator/src/main/resources/Ada/licenseInfo.mustache index df913f4d7128b52c7d51e027b0abab7c14034b1c..d98c036f523f5002c4ddfe9cd0d62471b53cbf6d 100644 --- a/modules/openapi-generator/src/main/resources/Ada/licenseInfo.mustache +++ b/modules/openapi-generator/src/main/resources/Ada/licenseInfo.mustache @@ -1,8 +1,8 @@ -- {{{appName}}} -- {{{appDescription}}} -- --- {{#version}}The version of the OpenAPI document: {{{version}}}{{/version}} ---{{#infoEmail}} Contact: {{{infoEmail}}}{{/infoEmail}} +-- {{#version}}The version of the OpenAPI document: {{{.}}}{{/version}} +--{{#infoEmail}} Contact: {{{.}}}{{/infoEmail}} -- -- NOTE: This package is auto generated by OpenAPI-Generator {{{generatorVersion}}}. -- https://openapi-generator.tech diff --git a/modules/openapi-generator/src/main/resources/Ada/server-body.mustache b/modules/openapi-generator/src/main/resources/Ada/server-body.mustache index 9768d87d6cd9ed3d897e242e4006488c68648459..65225bef1408ac3be9be7248751e0a74022c1315 100644 --- a/modules/openapi-generator/src/main/resources/Ada/server-body.mustache +++ b/modules/openapi-generator/src/main/resources/Ada/server-body.mustache @@ -23,7 +23,7 @@ package body {{package}}.Servers is (Server : in out Server_Type{{#hasParams}};{{/hasParams}} {{#allParams}}{{paramName}} : in {{dataType}}{{^-last}}; {{/-last}}{{/allParams}}{{#returnType}}; - Result : out {{returnType}}{{/returnType}}; + Result : out {{.}}{{/returnType}}; Context : in out Swagger.Servers.Context_Type) is begin null; diff --git a/modules/openapi-generator/src/main/resources/Ada/server-properties.mustache b/modules/openapi-generator/src/main/resources/Ada/server-properties.mustache index 028837de4fce2df5b022a76546bfdb20f0970b91..896f026ec69c0207548930072d1fa6261519e22a 100644 --- a/modules/openapi-generator/src/main/resources/Ada/server-properties.mustache +++ b/modules/openapi-generator/src/main/resources/Ada/server-properties.mustache @@ -33,5 +33,3 @@ log4j.logger.Util=DEBUG log4j.logger.Servlet=DEBUG log4j.logger.Util.Serialize.Mappers=WARN log4j.logger.Util.Serialize.IO=INFO - - diff --git a/modules/openapi-generator/src/main/resources/Ada/server-skeleton-body.mustache b/modules/openapi-generator/src/main/resources/Ada/server-skeleton-body.mustache index b24ba9815dabab97becec7afa6c263b7c2777d15..570508ab7fb878d63eac9841ebef588772bcb96d 100644 --- a/modules/openapi-generator/src/main/resources/Ada/server-skeleton-body.mustache +++ b/modules/openapi-generator/src/main/resources/Ada/server-skeleton-body.mustache @@ -34,7 +34,7 @@ package body {{package}}.Skeletons is {{paramName}} : {{dataType}}; {{/allParams}} {{#returnType}} - Result : {{returnType}}; + Result : {{.}}; {{/returnType}} begin {{#vendorExtensions.x-auth-scopes}} @@ -130,7 +130,7 @@ package body {{package}}.Skeletons is {{paramName}} : {{dataType}}; {{/allParams}} {{#returnType}} - Result : {{returnType}}; + Result : {{.}}; {{/returnType}} begin {{#vendorExtensions.x-auth-scopes}} @@ -219,7 +219,7 @@ package body {{package}}.Skeletons is procedure {{operationId}} ({{#allParams}}{{paramName}} : in {{dataType}}{{^-last}}; {{/-last}}{{/allParams}}{{#returnType}}; - Result : out {{returnType}}{{/returnType}}; + Result : out {{.}}{{/returnType}}; Context : in out Swagger.Servers.Context_Type) is begin Impl.{{operationId}} diff --git a/modules/openapi-generator/src/main/resources/Ada/server-skeleton-spec.mustache b/modules/openapi-generator/src/main/resources/Ada/server-skeleton-spec.mustache index d266f3b3dd2a78875bb1bfaee2f99ff7e0741124..4365261e543a6cc047b26246fefddd6214376bf4 100644 --- a/modules/openapi-generator/src/main/resources/Ada/server-skeleton-spec.mustache +++ b/modules/openapi-generator/src/main/resources/Ada/server-skeleton-spec.mustache @@ -27,7 +27,7 @@ package {{package}}.Skeletons is (Server : in out Server_Type{{#hasParams}};{{/hasParams}} {{#allParams}}{{paramName}} : in {{dataType}}{{^-last}}; {{/-last}}{{/allParams}}{{#returnType}}; - Result : out {{returnType}}{{/returnType}}; + Result : out {{.}}{{/returnType}}; Context : in out Swagger.Servers.Context_Type) is abstract; {{/operation}} {{/operations}} @@ -95,7 +95,7 @@ package {{package}}.Skeletons is procedure {{operationId}} ({{#allParams}}{{paramName}} : in {{dataType}}{{^-last}}; {{/-last}}{{/allParams}}{{#returnType}}; - Result : out {{returnType}}{{/returnType}}; + Result : out {{.}}{{/returnType}}; Context : in out Swagger.Servers.Context_Type); {{/hasParams}} {{^hasParams}} diff --git a/modules/openapi-generator/src/main/resources/Ada/server-spec.mustache b/modules/openapi-generator/src/main/resources/Ada/server-spec.mustache index 7b08b6cd04655cce6f3cb6717fe28e2e4a4054b1..4abfb7d4e4fca27c800aa8f554c245f116799396 100644 --- a/modules/openapi-generator/src/main/resources/Ada/server-spec.mustache +++ b/modules/openapi-generator/src/main/resources/Ada/server-spec.mustache @@ -31,7 +31,7 @@ package {{package}}.Servers is (Server : in out Server_Type{{#hasParams}};{{/hasParams}} {{#allParams}}{{paramName}} : in {{dataType}}{{^-last}}; {{/-last}}{{/allParams}}{{#returnType}}; - Result : out {{returnType}}{{/returnType}}; + Result : out {{.}}{{/returnType}}; Context : in out Swagger.Servers.Context_Type); {{/operation}} {{/operations}} diff --git a/modules/openapi-generator/src/main/resources/C-libcurl/CMakeLists.txt.mustache b/modules/openapi-generator/src/main/resources/C-libcurl/CMakeLists.txt.mustache index 41e5faf3e6621d42936e186140b1b281ae65a02d..82c6b09ab4e28a1b7d7af47afcb0f2bd52e63a9c 100644 --- a/modules/openapi-generator/src/main/resources/C-libcurl/CMakeLists.txt.mustache +++ b/modules/openapi-generator/src/main/resources/C-libcurl/CMakeLists.txt.mustache @@ -17,7 +17,7 @@ if (OPENSSL_FOUND) include_directories(${OPENSSL_INCLUDE_DIRS}) link_directories(${OPENSSL_LIBRARIES}) message(STATUS "Using OpenSSL ${OPENSSL_VERSION}") -else() +else() message (STATUS "OpenSSL Not found.") endif() diff --git a/modules/openapi-generator/src/main/resources/C-libcurl/README.md.mustache b/modules/openapi-generator/src/main/resources/C-libcurl/README.md.mustache index 5d5eb19c9695ef8178b2d896c248da22dc97655a..740f9b4c20d177577bfb945b7af9689dd4fe92e5 100644 --- a/modules/openapi-generator/src/main/resources/C-libcurl/README.md.mustache +++ b/modules/openapi-generator/src/main/resources/C-libcurl/README.md.mustache @@ -70,7 +70,7 @@ All URIs are relative to *{{basePath}}* Category | Method | HTTP request | Description ------------ | ------------- | ------------- | ------------- -{{#apiInfo}}{{#apis}}{{#operations}}{{#operation}}*{{classname}}* | [**{{classname}}_{{operationId}}**]({{apiDocPath}}{{classname}}.md#{{classname}}_{{operationId}}) | **{{httpMethod}}** {{path}} | {{#summary}}{{{summary}}}{{/summary}} +{{#apiInfo}}{{#apis}}{{#operations}}{{#operation}}*{{classname}}* | [**{{classname}}_{{operationId}}**]({{apiDocPath}}{{classname}}.md#{{classname}}_{{operationId}}) | **{{httpMethod}}** {{path}} | {{{summary}}} {{/operation}}{{/operations}}{{/apis}}{{/apiInfo}} ## Documentation for Models diff --git a/modules/openapi-generator/src/main/resources/C-libcurl/api-body.mustache b/modules/openapi-generator/src/main/resources/C-libcurl/api-body.mustache index 0449acda7674bef8c4ed47aa0c27e0bb57fccc21..49c73f86b91d8af3e2da30c60a4eaef1ab07fdb3 100644 --- a/modules/openapi-generator/src/main/resources/C-libcurl/api-body.mustache +++ b/modules/openapi-generator/src/main/resources/C-libcurl/api-body.mustache @@ -91,11 +91,11 @@ end: {{#operations}} {{#operation}} {{#summary}} -// {{{summary}}} +// {{{.}}} // {{/summary}} {{#notes}} -// {{{notes}}} +// {{{.}}} // {{/notes}} {{#returnType}}{{#returnTypeIsPrimitive}}{{#returnSimpleType}}{{{.}}}*{{/returnSimpleType}}{{^returnSimpleType}}{{#isArray}}{{{.}}}_t*{{/isArray}}{{#isMap}}{{{.}}}{{/isMap}}{{/returnSimpleType}}{{/returnTypeIsPrimitive}}{{^returnTypeIsPrimitive}}{{{.}}}_t*{{/returnTypeIsPrimitive}}{{/returnType}}{{^returnType}}void{{/returnType}} diff --git a/modules/openapi-generator/src/main/resources/C-libcurl/api-header.mustache b/modules/openapi-generator/src/main/resources/C-libcurl/api-header.mustache index 961e33a9d95ec7fdc82aadaa5bf2df9e9997433f..ecc80212afcfcf99dd23d489dc5d95d57b1018ea 100644 --- a/modules/openapi-generator/src/main/resources/C-libcurl/api-header.mustache +++ b/modules/openapi-generator/src/main/resources/C-libcurl/api-header.mustache @@ -25,11 +25,11 @@ typedef enum { {{projectName}}_{{operationId}}_{{enumName}}_NULL = 0{{#enumVars {{#operations}} {{#operation}} {{#summary}} -// {{{summary}}} +// {{{.}}} // {{/summary}} {{#notes}} -// {{{notes}}} +// {{{.}}} // {{/notes}} {{#returnType}}{{#returnTypeIsPrimitive}}{{#returnSimpleType}}{{{.}}}*{{/returnSimpleType}}{{^returnSimpleType}}{{#isArray}}{{{.}}}_t*{{/isArray}}{{#isMap}}{{{.}}}{{/isMap}}{{/returnSimpleType}}{{/returnTypeIsPrimitive}}{{^returnTypeIsPrimitive}}{{{.}}}_t*{{/returnTypeIsPrimitive}}{{/returnType}}{{^returnType}}void{{/returnType}} diff --git a/modules/openapi-generator/src/main/resources/C-libcurl/api_doc.mustache b/modules/openapi-generator/src/main/resources/C-libcurl/api_doc.mustache index f249302c23dcac704146aea179212a08343fb327..54dfa08df3cf274da2975e6a7efe6ed658e9d0c7 100644 --- a/modules/openapi-generator/src/main/resources/C-libcurl/api_doc.mustache +++ b/modules/openapi-generator/src/main/resources/C-libcurl/api_doc.mustache @@ -1,11 +1,11 @@ # {{classname}}{{#description}} -{{description}}{{/description}} +{{.}}{{/description}} All URIs are relative to *{{basePath}}* Method | HTTP request | Description ------------- | ------------- | ------------- -{{#operations}}{{#operation}}[**{{classname}}_{{operationId}}**]({{classname}}.md#{{classname}}_{{operationId}}) | **{{httpMethod}}** {{path}} | {{#summary}}{{summary}}{{/summary}} +{{#operations}}{{#operation}}[**{{classname}}_{{operationId}}**]({{classname}}.md#{{classname}}_{{operationId}}) | **{{httpMethod}}** {{path}} | {{summary}} {{/operation}}{{/operations}} {{#operations}} @@ -13,11 +13,11 @@ Method | HTTP request | Description # **{{classname}}_{{{operationId}}}** ```c {{#summary}} -// {{{summary}}} +// {{{.}}} // {{/summary}} {{#notes}} -// {{{notes}}} +// {{{.}}} // {{/notes}} {{#returnType}}{{#returnTypeIsPrimitive}}{{#returnSimpleType}}{{{.}}}*{{/returnSimpleType}}{{^returnSimpleType}}{{#isArray}}{{{.}}}_t*{{/isArray}}{{#isMap}}{{{.}}}{{/isMap}}{{/returnSimpleType}}{{/returnTypeIsPrimitive}}{{^returnTypeIsPrimitive}}{{{.}}}_t*{{/returnTypeIsPrimitive}}{{/returnType}}{{^returnType}}void{{/returnType}} {{{classname}}}_{{{operationId}}}(apiClient_t *apiClient{{#allParams}}, {{#isPrimitiveType}}{{#isNumber}}{{{dataType}}}{{/isNumber}}{{#isLong}}{{{dataType}}}{{/isLong}}{{#isInteger}}{{{dataType}}}{{/isInteger}}{{#isDouble}}{{{dataType}}}{{/isDouble}}{{#isFloat}}{{{dataType}}}{{/isFloat}}{{#isBoolean}}{{dataType}}{{/isBoolean}}{{#isEnum}}{{#isString}}{{projectName}}_{{operationId}}_{{baseName}}_e{{/isString}}{{/isEnum}}{{^isEnum}}{{#isString}}{{{dataType}}} *{{/isString}}{{/isEnum}}{{#isByteArray}}{{{dataType}}} *{{/isByteArray}}{{#isDate}}{{{dataType}}}{{/isDate}}{{#isDateTime}}{{{dataType}}}{{/isDateTime}}{{#isFile}}{{{dataType}}}{{/isFile}}{{#isFreeFormObject}}{{dataType}}_t *{{/isFreeFormObject}}{{/isPrimitiveType}}{{^isArray}}{{^isPrimitiveType}}{{#isModel}}{{#isEnum}}{{datatypeWithEnum}}_e{{/isEnum}}{{^isEnum}}{{{dataType}}}_t *{{/isEnum}}{{/isModel}}{{^isModel}}{{#isEnum}}{{datatypeWithEnum}}_e{{/isEnum}}{{/isModel}}{{#isUuid}}{{dataType}} *{{/isUuid}}{{#isEmail}}{{dataType}}{{/isEmail}}{{/isPrimitiveType}}{{/isArray}}{{#isContainer}}{{#isArray}}{{dataType}}_t *{{/isArray}}{{#isMap}}{{dataType}}{{/isMap}}{{/isContainer}} {{{paramName}}}{{/allParams}}); @@ -26,9 +26,9 @@ Method | HTTP request | Description ### Parameters Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**apiClient** | **apiClient_t \*** | context containing the client configuration | +**apiClient** | **apiClient_t \*** | context containing the client configuration | {{#allParams}} -**{{paramName}}** | {{#isPrimitiveType}}{{#isNumber}}**{{{dataType}}}**{{/isNumber}}{{#isLong}}**{{{dataType}}}**{{/isLong}}{{#isInteger}}**{{{dataType}}}**{{/isInteger}}{{#isDouble}}**{{{dataType}}}**{{/isDouble}}{{#isFloat}}**{{{dataType}}}**{{/isFloat}}{{#isBoolean}}**{{dataType}}**{{/isBoolean}}{{#isEnum}}{{#isString}}**{{projectName}}_{{operationId}}_{{baseName}}_e**{{/isString}}{{/isEnum}}{{^isEnum}}{{#isString}}**{{{dataType}}} \***{{/isString}}{{/isEnum}}{{#isByteArray}}**{{{dataType}}} \***{{/isByteArray}}{{#isDate}}**{{{dataType}}}**{{/isDate}}{{#isDateTime}}**{{{dataType}}}**{{/isDateTime}}{{#isFile}}**{{{dataType}}}**{{/isFile}}{{#isFreeFormObject}}**[{{dataType}}_t]({{baseType}}.md) \***{{/isFreeFormObject}}{{/isPrimitiveType}}{{^isArray}}{{^isPrimitiveType}}{{#isModel}}{{#isEnum}}**{{datatypeWithEnum}}_e**{{/isEnum}}{{^isEnum}}**[{{{dataType}}}_t]({{{baseType}}}.md) \***{{/isEnum}}{{/isModel}}{{^isModel}}{{#isEnum}}**{{datatypeWithEnum}}_e**{{/isEnum}}{{/isModel}}{{#isUuid}}**{{dataType}} \***{{/isUuid}}{{#isEmail}}**{{dataType}}**{{/isEmail}}{{/isPrimitiveType}}{{/isArray}}{{#isContainer}}{{#isArray}}**[{{dataType}}_t]({{baseType}}.md) \***{{/isArray}}{{#isMap}}**{{dataType}}**{{/isMap}}{{/isContainer}} | {{description}} | {{^required}}[optional] {{/required}}{{#defaultValue}}[default to {{defaultValue}}]{{/defaultValue}} +**{{paramName}}** | {{#isPrimitiveType}}{{#isNumber}}**{{{dataType}}}**{{/isNumber}}{{#isLong}}**{{{dataType}}}**{{/isLong}}{{#isInteger}}**{{{dataType}}}**{{/isInteger}}{{#isDouble}}**{{{dataType}}}**{{/isDouble}}{{#isFloat}}**{{{dataType}}}**{{/isFloat}}{{#isBoolean}}**{{dataType}}**{{/isBoolean}}{{#isEnum}}{{#isString}}**{{projectName}}_{{operationId}}_{{baseName}}_e**{{/isString}}{{/isEnum}}{{^isEnum}}{{#isString}}**{{{dataType}}} \***{{/isString}}{{/isEnum}}{{#isByteArray}}**{{{dataType}}} \***{{/isByteArray}}{{#isDate}}**{{{dataType}}}**{{/isDate}}{{#isDateTime}}**{{{dataType}}}**{{/isDateTime}}{{#isFile}}**{{{dataType}}}**{{/isFile}}{{#isFreeFormObject}}**[{{dataType}}_t]({{baseType}}.md) \***{{/isFreeFormObject}}{{/isPrimitiveType}}{{^isArray}}{{^isPrimitiveType}}{{#isModel}}{{#isEnum}}**{{datatypeWithEnum}}_e**{{/isEnum}}{{^isEnum}}**[{{{dataType}}}_t]({{{baseType}}}.md) \***{{/isEnum}}{{/isModel}}{{^isModel}}{{#isEnum}}**{{datatypeWithEnum}}_e**{{/isEnum}}{{/isModel}}{{#isUuid}}**{{dataType}} \***{{/isUuid}}{{#isEmail}}**{{dataType}}**{{/isEmail}}{{/isPrimitiveType}}{{/isArray}}{{#isContainer}}{{#isArray}}**[{{dataType}}_t]({{baseType}}.md) \***{{/isArray}}{{#isMap}}**{{dataType}}**{{/isMap}}{{/isContainer}} | {{description}} | {{^required}}[optional] {{/required}}{{#defaultValue}}[default to {{.}}]{{/defaultValue}} {{/allParams}} ### Return type diff --git a/modules/openapi-generator/src/main/resources/C-libcurl/model_test.mustache b/modules/openapi-generator/src/main/resources/C-libcurl/model_test.mustache index e7c0a817cd9e32e4fadd2787729bf8b719d467a7..7da1371819e2c0c1a5b8e59a6a50d39147ae43da 100644 --- a/modules/openapi-generator/src/main/resources/C-libcurl/model_test.mustache +++ b/modules/openapi-generator/src/main/resources/C-libcurl/model_test.mustache @@ -27,14 +27,14 @@ {{classname}}_t* {{classname}} = NULL; if (include_optional) { {{classname}} = {{classname}}_create( -{{#vars}} {{#isEnum}}{{^isContainer}}{{#example}}{{projectName}}_{{classVarName}}_{{enumName}}_{{{.}}}{{/example}}{{/isContainer}}{{#isContainer}}{{#example}}{{{.}}}{{/example}}{{/isContainer}}{{/isEnum}}{{^isEnum}}{{#example}}{{{.}}}{{/example}}{{/isEnum}}{{^example}}{{#isModel}}{{#isEnum}}// enum {{datatypeWithEnum}}_e Work in Progress +{{#vars}} {{#isEnum}}{{^isContainer}}{{#example}}{{projectName}}_{{classVarName}}_{{enumName}}_{{{.}}}{{/example}}{{/isContainer}}{{#isContainer}}{{{example}}}{{/isContainer}}{{/isEnum}}{{^isEnum}}{{{example}}}{{/isEnum}}{{^example}}{{#isModel}}{{#isEnum}}// enum {{datatypeWithEnum}}_e Work in Progress {{/isEnum}}{{^isEnum}} // false, not to have infinite recursion instantiate_{{{dataType}}}(0){{/isEnum}}{{/isModel}}{{^isModel}}0{{/isModel}}{{/example}}{{^-last}},{{/-last}} {{/vars}} ); } else { {{classname}} = {{classname}}_create( -{{#vars}} {{#isEnum}}{{^isContainer}}{{#example}}{{projectName}}_{{classVarName}}_{{enumName}}_{{{.}}}{{/example}}{{/isContainer}}{{#isContainer}}{{#example}}{{{.}}}{{/example}}{{/isContainer}}{{/isEnum}}{{^isEnum}}{{#example}}{{{.}}}{{/example}}{{/isEnum}}{{^example}}{{#isModel}}{{#isEnum}}// enum {{datatypeWithEnum}}_e Work in Progress +{{#vars}} {{#isEnum}}{{^isContainer}}{{#example}}{{projectName}}_{{classVarName}}_{{enumName}}_{{{.}}}{{/example}}{{/isContainer}}{{#isContainer}}{{{example}}}{{/isContainer}}{{/isEnum}}{{^isEnum}}{{{example}}}{{/isEnum}}{{^example}}{{#isModel}}{{#isEnum}}// enum {{datatypeWithEnum}}_e Work in Progress {{/isEnum}}{{^isEnum}}NULL{{/isEnum}}{{/isModel}}{{^isModel}}0{{/isModel}}{{/example}}{{^-last}},{{/-last}} {{/vars}} ); diff --git a/modules/openapi-generator/src/main/resources/Eiffel/README.mustache b/modules/openapi-generator/src/main/resources/Eiffel/README.mustache index 0d292c5d720d2dbd5278ae363bba8cc94a77c8c6..54459f5fd8122490726f6fbbf938d30d25c097fe 100644 --- a/modules/openapi-generator/src/main/resources/Eiffel/README.mustache +++ b/modules/openapi-generator/src/main/resources/Eiffel/README.mustache @@ -1,7 +1,7 @@ # Eiffel API client for {{packageName}} {{#appDescriptionWithNewLines}} -{{{appDescriptionWithNewLines}}} +{{{.}}} {{/appDescriptionWithNewLines}} ## Overview @@ -29,7 +29,7 @@ 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}} +{{#apiInfo}}{{#apis}}{{#operations}}{{#operation}}*{{classname}}* | [**{{operationId}}**]({{apiDocPath}}/{{classname}}.md#{{operationIdLowerCase}}) | **{{httpMethod}}** {{path}} | {{summary}} {{/operation}}{{/operations}}{{/apis}}{{/apiInfo}} ## Documentation For Models @@ -43,7 +43,7 @@ Class | Method | HTTP request | Description {{/authMethods}}{{#authMethods}}{{#last}} Authentication schemes defined for the API:{{/last}}{{/authMethods}} {{#authMethods}}## {{{name}}} -{{#isApiKey}}- **Type**: API key +{{#isApiKey}}- **Type**: API key - **API key parameter name**: {{{keyParamName}}} - **Location**: {{#isKeyInQuery}}URL query string{{/isKeyInQuery}}{{#isKeyInHeader}}HTTP header{{/isKeyInHeader}} {{/isApiKey}} diff --git a/modules/openapi-generator/src/main/resources/Eiffel/api.mustache b/modules/openapi-generator/src/main/resources/Eiffel/api.mustache index be029f379d39b38f3a2565cae033ad7601e51528..7479b9dcd9fdf964c5896b5985efe3c0963eed6f 100644 --- a/modules/openapi-generator/src/main/resources/Eiffel/api.mustache +++ b/modules/openapi-generator/src/main/resources/Eiffel/api.mustache @@ -13,25 +13,25 @@ feature -- API Access {{#operation}} - {{operationId}} {{#hasParams}}({{#allParams}}{{paramName}}: {{#required}}{{{dataType}}}{{/required}}{{^required}}{{#isPrimitiveType}}{{{dataType}}}{{/isPrimitiveType}}{{^isPrimitiveType}}detachable {{{dataType}}}{{/isPrimitiveType}}{{/required}}{{^-last}}; {{/-last}}{{/allParams}}){{/hasParams}}{{#returnType}}: detachable {{{returnType}}}{{/returnType}}{{^returnType}}{{/returnType}} + {{operationId}} {{#hasParams}}({{#allParams}}{{paramName}}: {{#required}}{{{dataType}}}{{/required}}{{^required}}{{#isPrimitiveType}}{{{dataType}}}{{/isPrimitiveType}}{{^isPrimitiveType}}detachable {{{dataType}}}{{/isPrimitiveType}}{{/required}}{{^-last}}; {{/-last}}{{/allParams}}){{/hasParams}}{{#returnType}}: detachable {{{.}}}{{/returnType}} -- {{summary}} -- {{notes}} -- {{#allParams}} -- argument: {{paramName}} {{description}}{{#required}} (required){{/required}}{{^required}} (optional{{#defaultValue}}, default to {{{.}}}{{/defaultValue}}){{/required}} -- {{/allParams}} -- {{#returnType}} - -- Result {{returnType}}{{/returnType}} + -- Result {{.}}{{/returnType}} require - {{#allParams}} + {{#allParams}} {{#hasValidation}} {{#maximum}} - {{{paramName}}}_is_less_or_equal_than: {{{paramName}}} <= {{{maximum}}} + {{{paramName}}}_is_less_or_equal_than: {{{paramName}}} <= {{{maximum}}} {{/maximum}} {{#minimum}} - {{{paramName}}}_is_greater_or_equal_than: {{{paramName}}} >= {{{minimum}}} + {{{paramName}}}_is_greater_or_equal_than: {{{paramName}}} >= {{{minimum}}} {{/minimum}} {{/hasValidation}} - {{/allParams}} + {{/allParams}} local l_path: STRING l_request: API_CLIENT_REQUEST @@ -45,7 +45,7 @@ feature -- API Access l_path.replace_substring_all ("{"+"{{baseName}}"+"}", api_client.url_encode ({{{paramName}}}.out)) {{/pathParams}} {{#queryParams}} - l_request.fill_query_params(api_client.parameter_to_tuple("{{#collectionFormat}}{{{collectionFormat}}}{{/collectionFormat}}", "{{baseName}}", {{paramName}})); + l_request.fill_query_params(api_client.parameter_to_tuple("{{{collectionFormat}}}", "{{baseName}}", {{paramName}})); {{/queryParams}} {{#headerParams}} @@ -65,7 +65,7 @@ feature -- API Access l_request.add_header(api_client.select_header_content_type ({ARRAY [STRING]}<<{{#consumes}}"{{{mediaType}}}"{{^-last}}, {{/-last}}{{/consumes}}>>),"Content-Type") l_request.set_auth_names ({ARRAY [STRING]}<<{{#authMethods}}"{{name}}"{{^-last}}, {{/-last}}{{/authMethods}}>>) l_response := api_client.call_api (l_path, "{{httpMethod}}", l_request, {{#returnType}}Void{{/returnType}}{{^returnType}}agent serializer{{/returnType}}, {{#returnType}}agent deserializer{{/returnType}}{{^returnType}}Void{{/returnType}}) - {{#returnType}} + {{#returnType}} if l_response.has_error then last_error := l_response.error elseif attached { {{{returnType}}} } l_response.data ({ {{{returnType}}} }) as l_data then @@ -79,7 +79,7 @@ feature -- API Access last_error := l_response.error end {{/returnType}} - end + end {{/operation}} diff --git a/modules/openapi-generator/src/main/resources/Eiffel/api_client.mustache b/modules/openapi-generator/src/main/resources/Eiffel/api_client.mustache index 1ca86a49e385e26f9a5940d2b785436d6aa3db25..42899ca28c6d4ae567070c470ffa1ac50cffcc57 100644 --- a/modules/openapi-generator/src/main/resources/Eiffel/api_client.mustache +++ b/modules/openapi-generator/src/main/resources/Eiffel/api_client.mustache @@ -1,4 +1,4 @@ -{{>noteinfo}} +{{>noteinfo}} class API_CLIENT @@ -14,13 +14,13 @@ feature {NONE} -- Initialization set_base_path (default_base_path) --set default user_agent - set_user_agent("{{#httpUserAgent}}{{{.}}}{{/httpUserAgent}}{{^httpUserAgent}}OpenAPI-Generator/{{{artifactVersion}}}/Eiffel{{/httpUserAgent}}"); + set_user_agent("{{{httpUserAgent}}}{{^httpUserAgent}}OpenAPI-Generator/{{{artifactVersion}}}/Eiffel{{/httpUserAgent}}"); create authentications.make (3) {{#authMethods}}{{#isBasic}} - authentications.force (create {HTTP_BASIC_AUTH}, "{{name}}") + authentications.force (create {HTTP_BASIC_AUTH}, "{{name}}") is_basic_auth_configured := True {{/isBasic}}{{#isApiKey}} - authentications.force (create {API_KEY_AUTH}.make ({{#isKeyInHeader}}"header"{{/isKeyInHeader}}{{^isKeyInHeader}}"query"{{/isKeyInHeader}}, "{{keyParamName}}"), "{{name}}") - is_api_key_configured := True {{/isApiKey}}{{#isOAuth}} + authentications.force (create {API_KEY_AUTH}.make ({{#isKeyInHeader}}"header"{{/isKeyInHeader}}{{^isKeyInHeader}}"query"{{/isKeyInHeader}}, "{{keyParamName}}"), "{{name}}") + is_api_key_configured := True {{/isApiKey}}{{#isOAuth}} authentications.force (create {OAUTH},"{{name}}") is_oauth_configured := True {{/isOAuth}}{{/authMethods}} end @@ -42,7 +42,7 @@ feature -- Status Report -- is basic auth configured. is_api_key_configured: BOOLEAN - -- is api key auth configured. + -- is api key auth configured. is_oauth_configured: BOOLEAN -- is oauth configured. @@ -138,7 +138,7 @@ feature -- Query Parameter Helpers if attached {LIST [ANY]} a_value as a_list then -- Collection if a_list.is_empty then - -- Return an empty list + -- Return an empty list create {ARRAYED_LIST [TUPLE [name: STRING; value: STRING]]} Result.make (0) else -- collection format: multi, csv, ssv, tsv, pipes. @@ -312,7 +312,7 @@ feature --Helper: Http Client -- Url encode `a_val' do Result := (create {URL_ENCODER}).encoded_string (a_val) - end + end feature -- HTTP client: call api @@ -373,9 +373,9 @@ feature -- HTTP client: call api then -- Serialize an object `a_body' to content-type `l_type' -- if not support by default you will need to extend - -- the target API with the corresponding implementation. + -- the target API with the corresponding implementation. l_context_executor.set_upload_data((create {API_SERIALIZER}).serializer (l_custom_serializer, l_content_type, l_body)) - end + end end if @@ -514,7 +514,7 @@ feature {NONE} -- Implementation sess.set_is_debug (True) end debug ("proxy8888") - sess.set_proxy ("127.0.0.1", 8888) --| inspect traffic with http://www.fiddler2.com/ + sess.set_proxy ("127.0.0.1", 8888) --| inspect traffic with http://www.fiddler2.com/ end end end diff --git a/modules/openapi-generator/src/main/resources/Eiffel/api_doc.mustache b/modules/openapi-generator/src/main/resources/Eiffel/api_doc.mustache index 461ee1047aa33ffe41208852d865d0f5b11551d0..01382a9c77ab326477610b8854fba4edb250013d 100644 --- a/modules/openapi-generator/src/main/resources/Eiffel/api_doc.mustache +++ b/modules/openapi-generator/src/main/resources/Eiffel/api_doc.mustache @@ -1,29 +1,29 @@ # {{classname}}{{#description}} -{{description}}{{/description}} +{{.}}{{/description}} All URIs are relative to *{{basePath}}* Feature | HTTP request | Description ------------- | ------------- | ------------- -{{#operations}}{{#operation}}[**{{operationId}}**]({{classname}}.md#{{operationId}}) | **{{httpMethod}}** {{path}} | {{#summary}}{{summary}}{{/summary}} +{{#operations}}{{#operation}}[**{{operationId}}**]({{classname}}.md#{{operationId}}) | **{{httpMethod}}** {{path}} | {{summary}} {{/operation}}{{/operations}} {{#operations}} {{#operation}} # **{{{operationId}}}** -> {{operationId}} {{#hasParams}}({{#allParams}}{{paramName}}: {{#required}}{{{dataType}}}{{/required}}{{^required}} detachable {{{dataType}}}{{/required}} {{^-last}}; {{/-last}}{{/allParams}}){{/hasParams}}{{#returnType}}: detachable {{{returnType}}}{{/returnType}}{{^returnType}}{{/returnType}} - +> {{operationId}} {{#hasParams}}({{#allParams}}{{paramName}}: {{#required}}{{{dataType}}}{{/required}}{{^required}} detachable {{{dataType}}}{{/required}} {{^-last}}; {{/-last}}{{/allParams}}){{/hasParams}}{{#returnType}}: detachable {{{.}}}{{/returnType}} + {{{summary}}}{{#notes}} -{{{notes}}}{{/notes}} +{{{.}}}{{/notes}} ### 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}} **{{paramName}}** | {{#isPrimitiveType}}**{{dataType}}**{{/isPrimitiveType}}{{^isPrimitiveType}}[**{{dataType}}**]({{baseType}}.md){{/isPrimitiveType}}| {{description}} | {{^required}}[optional] {{/required}}{{#defaultValue}}[default to {{.}}]{{/defaultValue}} {{/allParams}} ### Return type diff --git a/modules/openapi-generator/src/main/resources/Eiffel/ecf.mustache b/modules/openapi-generator/src/main/resources/Eiffel/ecf.mustache index 13720007773f3514a64abb67e1e06eb3ec6b7e8d..3f0b5f7f5e1a6269f329169d8c29f44fd3242e7c 100644 --- a/modules/openapi-generator/src/main/resources/Eiffel/ecf.mustache +++ b/modules/openapi-generator/src/main/resources/Eiffel/ecf.mustache @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="ISO-8859-1"?> -<system xmlns="http://www.eiffel.com/developers/xml/configuration-1-21-0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.eiffel.com/developers/xml/configuration-1-21-0 http://www.eiffel.com/developers/xml/configuration-1-21-0.xsd" name="{{libraryTarget}}" uuid="{{uuid}}" library_target="{{libraryTarget}}"> +<system xmlns="http://www.eiffel.com/developers/xml/configuration-1-21-0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.eiffel.com/developers/xml/configuration-1-21-0 http://www.eiffel.com/developers/xml/configuration-1-21-0.xsd" name="{{libraryTarget}}" uuid="{{uuid}}" library_target="{{libraryTarget}}"> <target name="{{libraryTarget}}"> <root all_classes="true"/> <file_rule> @@ -10,7 +10,7 @@ </file_rule> <option warning="warning" manifest_array_type="mismatch_warning"> <assertions precondition="true" postcondition="true" check="true" invariant="true" loop="true" supplier_precondition="true"/> - </option> + </option> <setting name="console_application" value="true"/> <library name="base" location="$ISE_LIBRARY/library/base/base.ecf"/> <library name="encoder" location="$ISE_LIBRARY\contrib\library\web\framework\ewf\text\encoder\encoder.ecf"/> diff --git a/modules/openapi-generator/src/main/resources/Eiffel/framework/api_client_request.mustache b/modules/openapi-generator/src/main/resources/Eiffel/framework/api_client_request.mustache index 53aa9a63eed090da0446fad6bfa6f43f82801e01..9ca03c295f732868019d585a20dc6571ed1f1f26 100644 --- a/modules/openapi-generator/src/main/resources/Eiffel/framework/api_client_request.mustache +++ b/modules/openapi-generator/src/main/resources/Eiffel/framework/api_client_request.mustache @@ -52,22 +52,22 @@ feature -- Change Element -- with `key'. do header_params.force (new, key) - end + end add_form (new: ANY; key: READABLE_STRING_GENERAL) -- Update `form_params' so that `new' will be the item associated -- with `key'. do form_params.force (new, key) - end + end set_body (a_body: like body) -- Set 'body' with 'a_body'. do body := a_body ensure - body_set: body = a_body - end + body_set: body = a_body + end set_auth_names (a_auth_names: like auth_names) -- Set 'auth_names' with 'a_auth_names'. @@ -75,5 +75,5 @@ feature -- Change Element auth_names := a_auth_names ensure auth_names_set: auth_names = a_auth_names - end + end end diff --git a/modules/openapi-generator/src/main/resources/Eiffel/framework/api_i.mustache b/modules/openapi-generator/src/main/resources/Eiffel/framework/api_i.mustache index 6b09f4c639eaf7a36e1a4a6bd7c9211edb072d44..e358ab661feeffd6467443b29db674fef6008649 100644 --- a/modules/openapi-generator/src/main/resources/Eiffel/framework/api_i.mustache +++ b/modules/openapi-generator/src/main/resources/Eiffel/framework/api_i.mustache @@ -84,7 +84,7 @@ feature -- Deserializer create err err.set_description ("Deserialization is not supported by default you will need to add it by hand.") err.raise - end + end end diff --git a/modules/openapi-generator/src/main/resources/Eiffel/framework/auth/authentication.mustache b/modules/openapi-generator/src/main/resources/Eiffel/framework/auth/authentication.mustache index 9367ba5eee921d8e6f3f5b150b46850c89cf6754..6389ccf9f95ef0dafe03e027f046a45e44a0b9b7 100644 --- a/modules/openapi-generator/src/main/resources/Eiffel/framework/auth/authentication.mustache +++ b/modules/openapi-generator/src/main/resources/Eiffel/framework/auth/authentication.mustache @@ -1,4 +1,4 @@ -{{>noteinfo}} +{{>noteinfo}} deferred class AUTHENTICATION diff --git a/modules/openapi-generator/src/main/resources/Eiffel/framework/auth/http_basic_auth.mustache b/modules/openapi-generator/src/main/resources/Eiffel/framework/auth/http_basic_auth.mustache index 4df2e875fe425397744164ec7009c187e5cb306c..f3f6c126e63389bea49416c51514a90cca50ed7c 100644 --- a/modules/openapi-generator/src/main/resources/Eiffel/framework/auth/http_basic_auth.mustache +++ b/modules/openapi-generator/src/main/resources/Eiffel/framework/auth/http_basic_auth.mustache @@ -15,7 +15,7 @@ feature -- Access password: detachable STRING_32 -- Password. -feature -- Element Change +feature -- Element Change set_user_name (a_name: STRING_32) -- Set `user_name' with `a_name'. diff --git a/modules/openapi-generator/src/main/resources/Eiffel/framework/serialization/api_json_custom_deserializer.mustache b/modules/openapi-generator/src/main/resources/Eiffel/framework/serialization/api_json_custom_deserializer.mustache index 393d291f05de9f1beab8d9617491712996006c69..b8db90a81a57508e2bce6759f8abe68c74e28d6d 100644 --- a/modules/openapi-generator/src/main/resources/Eiffel/framework/serialization/api_json_custom_deserializer.mustache +++ b/modules/openapi-generator/src/main/resources/Eiffel/framework/serialization/api_json_custom_deserializer.mustache @@ -2,37 +2,37 @@ note description: "[ Object Helper to deserialize a string in JSON format to an object in the domain model How to write a converter. Suppose we have the following class - + PERSON - id: INTEGER_64 + id: INTEGER_64 name: STRING address: ADDRESS hobbies: LIST [STRING] photos: LIST [PHOTOS] - + conversion: First go to the feature from_json_to_`model' and then start to set the object attibures as follow. - + STRING, INTEGER, etc use the following pattern - + Result.set_id (integer_64_value_from_json (a_json, "id")) Result.set_name (string_value_from_json (a_json, "name")) - + OBJECTS When you have an attribute that's an object itself (part of the domain) you will need to first get JSON_OBJECT to the corresponding attribute and then use the related feature `from_json_to_model' in this case from_json_to_address (l_address) - + if attached {JSON_OBJECT} json_value (a_json, "address") as l_address then Result.set_address(from_json_to_address (l_address)) - end - + end + LIST [STRING] or other simple types. - + In the case of a list of string we need to do something similar but we need to traverse the array We will need a local variable to build the lists. - + if attached {JSON_ARRAY} json_value (a_json, "hobbies") as l_array then create {ARRAYED_LIST [STRING]} l_hobbies.make (l_array.count) across l_array as ic loop @@ -41,13 +41,13 @@ note end end Result.set_hobbies (l_hobbies) - end - + end + LIST [PHOTOS] This case is similar to the previous, but in this case the element is - an object, so we will need to use the feature `from_json_to_model', here + an object, so we will need to use the feature `from_json_to_model', here we again need a local variable to build a temporary list of photos. - + if attached {JSON_ARRAY} json_value (a_json, "photos") as l_array then create {ARRAYED_LIST [PHOTOS]} l_photos.make (l_array.count) across diff --git a/modules/openapi-generator/src/main/resources/Eiffel/framework/serialization/json_basic_reflector_deserializer.mustache b/modules/openapi-generator/src/main/resources/Eiffel/framework/serialization/json_basic_reflector_deserializer.mustache index 3a6f2b04c8bb8b32bcf3601061b76518ef2c8305..ebd05951b38d34ffd381713fd788b3b086ebdf46 100644 --- a/modules/openapi-generator/src/main/resources/Eiffel/framework/serialization/json_basic_reflector_deserializer.mustache +++ b/modules/openapi-generator/src/main/resources/Eiffel/framework/serialization/json_basic_reflector_deserializer.mustache @@ -50,7 +50,7 @@ feature -- Cleaning fields_infos_by_type_id := Void end -feature {NONE} -- Helpers : Array +feature {NONE} -- Helpers : Array reference_from_json_array (a_json: JSON_ARRAY; ctx: JSON_DESERIALIZER_CONTEXT; a_type: detachable TYPE [detachable ANY]): detachable ANY do @@ -263,7 +263,7 @@ feature {NONE} -- Helpers : Array end end -feature {NONE} -- Helpers: Object +feature {NONE} -- Helpers: Object type_name_from_json_object (a_json_object: JSON_OBJECT): detachable READABLE_STRING_32 do @@ -364,7 +364,7 @@ feature {NONE} -- Helpers: Object end end -feature {NONE} -- Helpers: Basic values +feature {NONE} -- Helpers: Basic values boolean_from_json (v: JSON_VALUE): BOOLEAN do diff --git a/modules/openapi-generator/src/main/resources/Eiffel/framework/serialization/json_type_utilities_ext.mustache b/modules/openapi-generator/src/main/resources/Eiffel/framework/serialization/json_type_utilities_ext.mustache index bcc1c27d28fe856267c666255abd733785c0c760..3424f270afbbbf14331d7274964211f9c8b7ca5b 100644 --- a/modules/openapi-generator/src/main/resources/Eiffel/framework/serialization/json_type_utilities_ext.mustache +++ b/modules/openapi-generator/src/main/resources/Eiffel/framework/serialization/json_type_utilities_ext.mustache @@ -11,7 +11,7 @@ inherit JSON_TYPE_UTILITIES -feature -- Factory +feature -- Factory new_special_for_name (a_type_name: READABLE_STRING_GENERAL; count: INTEGER): detachable SPECIAL [detachable ANY] do diff --git a/modules/openapi-generator/src/main/resources/Eiffel/model.mustache b/modules/openapi-generator/src/main/resources/Eiffel/model.mustache index 3d00ca47b4f605d32222095080e7485f2f6de8a8..b1f66ca0cf3cc90b683ad8006d50eb03799a0c59 100644 --- a/modules/openapi-generator/src/main/resources/Eiffel/model.mustache +++ b/modules/openapi-generator/src/main/resources/Eiffel/model.mustache @@ -1,4 +1,4 @@ -class {{classname}} +class {{classname}} {{#parent}} inherit @@ -7,15 +7,15 @@ inherit {{#parent}} {{{parent}}} - {{^isPrimitiveType}} + {{^isPrimitiveType}} {{^isMap}} {{^isArray}} rename - output as out_{{{parentSchema}}} + output as out_{{{parentSchema}}} end {{/isArray}} {{/isMap}} - {{/isPrimitiveType}} + {{/isPrimitiveType}} {{/parent}} feature --Access @@ -24,31 +24,31 @@ feature --Access {{^isInherited}} {{#isPrimitiveType}} {{^isContainer}} - {{name}}: {{{dataType}}} - {{#description}}-- {{{description}}}{{/description}} - {{/isContainer}} + {{name}}: {{{dataType}}} + {{#description}}-- {{{.}}}{{/description}} + {{/isContainer}} {{/isPrimitiveType}} {{#isPrimitiveType}} {{#isContainer}} - {{name}}: detachable {{{datatypeWithEnum}}} - {{#description}}-- {{{description}}}{{/description}} - {{/isContainer}} + {{name}}: detachable {{{datatypeWithEnum}}} + {{#description}}-- {{{.}}}{{/description}} + {{/isContainer}} {{/isPrimitiveType}} {{^isPrimitiveType}} {{#isContainer}} - {{name}}: detachable {{{datatypeWithEnum}}} - {{#description}}-- {{{description}}}{{/description}} + {{name}}: detachable {{{datatypeWithEnum}}} + {{#description}}-- {{{.}}}{{/description}} {{/isContainer}} {{^isContainer}} - {{name}}: detachable {{{dataType}}} - {{#description}}-- {{{description}}}{{/description}} + {{name}}: detachable {{{dataType}}} + {{#description}}-- {{{.}}}{{/description}} {{/isContainer}} {{/isPrimitiveType}} {{/isInherited}} {{/vars}} -feature -- Change Element - +feature -- Change Element + {{#vars}} {{^isInherited}} set_{{name}} (a_name: like {{name}}) @@ -56,7 +56,7 @@ feature -- Change Element do {{name}} := a_name ensure - {{name}}_set: {{name}} = a_name + {{name}}_set: {{name}} = a_name end {{/isInherited}} @@ -72,7 +72,7 @@ feature -- Change Element Result.append(out_{{{parentSchema}}}) {{/parent}} Result.append("%Nclass {{classname}}%N") - {{#vars}} + {{#vars}} {{^isInherited}} {{#isArray}} if attached {{name}} as l_{{name}} then @@ -81,7 +81,7 @@ feature -- Change Element Result.append (ic.item.out) Result.append ("%N") end - end + end {{/isArray}} {{#isMap}} if attached {{name}} as l_{{name}} then @@ -95,14 +95,14 @@ feature -- Change Element Result.append (ic.item.out) Result.append ("%N") end - end + end {{/isMap}} {{^isContainer}} if attached {{name}} as l_{{name}} then Result.append ("%N{{name}}:") Result.append (l_{{name}}.out) - Result.append ("%N") - end + Result.append ("%N") + end {{/isContainer}} {{/isInherited}} {{/vars}} diff --git a/modules/openapi-generator/src/main/resources/Eiffel/model_enum.mustache b/modules/openapi-generator/src/main/resources/Eiffel/model_enum.mustache index 7ec1a444db7d8efc0043a9f391357836de950b8f..7ae3596874e9555f84caf2af562a635a7612fa5e 100644 --- a/modules/openapi-generator/src/main/resources/Eiffel/model_enum.mustache +++ b/modules/openapi-generator/src/main/resources/Eiffel/model_enum.mustache @@ -1,4 +1,4 @@ -class {{#datatypeWithEnum}}{{{.}}}{{/datatypeWithEnum}}{{^datatypeWithEnum}}{{classname}}{{/datatypeWithEnum}} +class {{{datatypeWithEnum}}}{{^datatypeWithEnum}}{{classname}}{{/datatypeWithEnum}} feature -- Access diff --git a/modules/openapi-generator/src/main/resources/Eiffel/model_generic.mustache b/modules/openapi-generator/src/main/resources/Eiffel/model_generic.mustache index 1a83370f8d2e0fab7c337c7f9c0f0e305dda2577..ef236e97f38e3f94f88544bf73b51377f0939ef6 100644 --- a/modules/openapi-generator/src/main/resources/Eiffel/model_generic.mustache +++ b/modules/openapi-generator/src/main/resources/Eiffel/model_generic.mustache @@ -4,4 +4,3 @@ {{#isEnum}}{{>model_enum}}{{/isEnum}}{{^isEnum}}{{>model}}{{/isEnum}} {{/model}} {{/models}} - diff --git a/modules/openapi-generator/src/main/resources/Eiffel/noteinfo.mustache b/modules/openapi-generator/src/main/resources/Eiffel/noteinfo.mustache index 505596b9e9743fa2f4f397745d06eec4ad144810..c3d9f2eeab4ae3459c7abe95b6f25ba7b84d6bab 100644 --- a/modules/openapi-generator/src/main/resources/Eiffel/noteinfo.mustache +++ b/modules/openapi-generator/src/main/resources/Eiffel/noteinfo.mustache @@ -2,8 +2,8 @@ note description:"[ {{{appName}}} {{{appDescription}}} - {{#version}}The version of the OpenAPI document: {{{version}}}{{/version}} - {{#infoEmail}}Contact: {{{infoEmail}}}{{/infoEmail}} + {{#version}}The version of the OpenAPI document: {{{.}}}{{/version}} + {{#infoEmail}}Contact: {{{.}}}{{/infoEmail}} NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/modules/openapi-generator/src/main/resources/Eiffel/test/api_test.mustache b/modules/openapi-generator/src/main/resources/Eiffel/test/api_test.mustache index c84e3ade1c6f208a200f722c48e6850ac78d8761..efe2ddd5cda712c5b426cbabdb24ced08bd5eb37 100644 --- a/modules/openapi-generator/src/main/resources/Eiffel/test/api_test.mustache +++ b/modules/openapi-generator/src/main/resources/Eiffel/test/api_test.mustache @@ -14,14 +14,14 @@ feature -- Test routines {{#operations}} {{#operation}} - + test_{{operationId}} -- {{summary}} - -- - -- {{notes}} + -- + -- {{notes}} local {{#returnType}} - l_response: {{{returnType}}} + l_response: {{{.}}} {{/returnType}} {{#allParams}} l_{{paramName}}: {{{dataType}}} @@ -37,10 +37,10 @@ feature -- Test routines {{/isContainer}} {{^isContainer}} -- l_{{paramName}} - {{/isContainer}} + {{/isContainer}} {{/required}} {{/allParams}} - + {{#returnType}} -- l_response := api.{{operationId}}{{#hasParams}}({{#allParams}}l_{{paramName}}{{^-last}}, {{/-last}}{{/allParams}}){{/hasParams}} {{/returnType}} @@ -56,7 +56,7 @@ feature {NONE} -- Implementation api: {{classname}} -- Create an object instance of `{{classname}}'. - once + once create { {{classname}} } Result end diff --git a/modules/openapi-generator/src/main/resources/Eiffel/test/ecf_test.mustache b/modules/openapi-generator/src/main/resources/Eiffel/test/ecf_test.mustache index 5e3d279e0b44a4c5122cbfb46fb404c76f6b4e8d..83d854d0836cfcf0c247685ccff8bd58aed15faf 100644 --- a/modules/openapi-generator/src/main/resources/Eiffel/test/ecf_test.mustache +++ b/modules/openapi-generator/src/main/resources/Eiffel/test/ecf_test.mustache @@ -10,7 +10,7 @@ </file_rule> <option warning="warning" manifest_array_type="mismatch_warning"> <assertions precondition="true" postcondition="true" check="true" invariant="true" loop="true" supplier_precondition="true"/> - </option> + </option> <setting name="console_application" value="true"/> <library name="base" location="$ISE_LIBRARY/library/base/base.ecf"/> <library name="json" location="$ISE_LIBRARY\contrib\library\text\parser\json\library\json.ecf" readonly="false"/> diff --git a/modules/openapi-generator/src/main/resources/Eiffel/travis.mustache b/modules/openapi-generator/src/main/resources/Eiffel/travis.mustache index 563530f458aac1ce4a756713848b09bc2eb3e358..8d59017085dddc89283612d8f753e0f51d9844fe 100644 --- a/modules/openapi-generator/src/main/resources/Eiffel/travis.mustache +++ b/modules/openapi-generator/src/main/resources/Eiffel/travis.mustache @@ -6,11 +6,10 @@ before_script: - source ./eiffel.rc - echo `ec -version` - cd $current_dir - + # safelist branches: only: - master script: compile_all -ecb -melt -list_failures -clean -options dotnet=false - diff --git a/modules/openapi-generator/src/main/resources/Groovy/README.mustache b/modules/openapi-generator/src/main/resources/Groovy/README.mustache index 04ecc57787f0ed125773c2d66dff459132639d6c..069ad55624bc79002c9d025f4d86aa1e745f33e5 100644 --- a/modules/openapi-generator/src/main/resources/Groovy/README.mustache +++ b/modules/openapi-generator/src/main/resources/Groovy/README.mustache @@ -1,14 +1,14 @@ # {{packageName}} {{#appDescriptionWithNewLines}} -{{{appDescriptionWithNewLines}}} +{{{.}}} {{/appDescriptionWithNewLines}} This Groovy package, using the [http-builder-ng library](https://http-builder-ng.github.io/http-builder-ng/), is automatically generated by the [OpenAPI Generator](https://openapi-generator.tech) project: - API version: {{appVersion}} {{#artifactVersion}} -- Package version: {{artifactVersion}} +- Package version: {{.}} {{/artifactVersion}} {{^hideGenerationTimestamp}} - Build date: {{generatedDate}} @@ -48,7 +48,7 @@ def apiInstance = new {{classname}}() apiInstance.{{{operationId}}}({{#allParams}}{{paramName}}{{^-last}}, {{/-last}}{{/allParams}}) { // on success - {{#returnType}}def result = ({{returnType}})it + {{#returnType}}def result = ({{.}})it println result {{/returnType}} {{^returnType}}println it{{/returnType}} diff --git a/modules/openapi-generator/src/main/resources/Groovy/api.mustache b/modules/openapi-generator/src/main/resources/Groovy/api.mustache index 9829023e5f17d4f0e46a6a7c2aab3dc4195b1238..a7ee609852e1d2adc06a27c87d34bc61b9af79a6 100644 --- a/modules/openapi-generator/src/main/resources/Groovy/api.mustache +++ b/modules/openapi-generator/src/main/resources/Groovy/api.mustache @@ -73,7 +73,7 @@ class {{classname}} { apiUtils.invokeApi(onSuccess, onFailure, basePath, versionPath, resourcePath, queryParams, headerParams, bodyParams, contentType, "{{httpMethod}}", "{{returnContainer}}", - {{#returnBaseType}}{{{returnBaseType}}}.class {{/returnBaseType}}{{^returnBaseType}}null {{/returnBaseType}}) + {{#returnBaseType}}{{{.}}}.class {{/returnBaseType}}{{^returnBaseType}}null {{/returnBaseType}}) } diff --git a/modules/openapi-generator/src/main/resources/Groovy/model.mustache b/modules/openapi-generator/src/main/resources/Groovy/model.mustache index e1821824d791ec22465a5276c697a0670ebef720..00cedcfd15a8e55cd7df132e87b1628153f19cb7 100644 --- a/modules/openapi-generator/src/main/resources/Groovy/model.mustache +++ b/modules/openapi-generator/src/main/resources/Groovy/model.mustache @@ -10,8 +10,8 @@ import {{import}}; @Canonical class {{classname}} { {{#vars}} - {{#description}}/* {{{description}}} */{{/description}} - {{{dataType}}} {{name}}{{#defaultValue}} = {{{defaultValue}}}{{/defaultValue}} + {{#description}}/* {{{.}}} */{{/description}} + {{{dataType}}} {{name}}{{#defaultValue}} = {{{.}}}{{/defaultValue}} {{/vars}} } {{/model}} diff --git a/modules/openapi-generator/src/main/resources/Java/ApiClient.mustache b/modules/openapi-generator/src/main/resources/Java/ApiClient.mustache index d75e455961c52d3a12e20e211f8ea35e393012d5..d00284aff9a5aa84afb0dbdc3254fa28c8cdc992 100644 --- a/modules/openapi-generator/src/main/resources/Java/ApiClient.mustache +++ b/modules/openapi-generator/src/main/resources/Java/ApiClient.mustache @@ -140,7 +140,7 @@ public class ApiClient{{#jsr310}} extends JavaTimeFormatter{{/jsr310}} { dateFormat = ApiClient.buildDefaultDateFormat(); // Set default User-Agent. - setUserAgent("{{#httpUserAgent}}{{{.}}}{{/httpUserAgent}}{{^httpUserAgent}}OpenAPI-Generator/{{{artifactVersion}}}/java{{/httpUserAgent}}"); + setUserAgent("{{{httpUserAgent}}}{{^httpUserAgent}}OpenAPI-Generator/{{{artifactVersion}}}/java{{/httpUserAgent}}"); // Setup authentications (key: authentication name, value: authentication). authentications = new HashMap<String, Authentication>();{{#authMethods}}{{#isBasic}}{{#isBasicBasic}} diff --git a/modules/openapi-generator/src/main/resources/Java/BeanValidationException.mustache b/modules/openapi-generator/src/main/resources/Java/BeanValidationException.mustache index ab8ef30b69befe599bc8b9eb269a2f2d2611b4de..3fc5b84512131663e48ab6b7a14badabf7d3ce0d 100644 --- a/modules/openapi-generator/src/main/resources/Java/BeanValidationException.mustache +++ b/modules/openapi-generator/src/main/resources/Java/BeanValidationException.mustache @@ -7,7 +7,7 @@ import javax.validation.ValidationException; public class BeanValidationException extends ValidationException { /** - * + * */ private static final long serialVersionUID = -5294733947409491364L; Set<ConstraintViolation<Object>> violations; diff --git a/modules/openapi-generator/src/main/resources/Java/README.mustache b/modules/openapi-generator/src/main/resources/Java/README.mustache index fd9abd2824171013b2bee9564dffd5c03ae8aff7..cd2c7af3ee8b8c45def7be4731efa33bf061a267 100644 --- a/modules/openapi-generator/src/main/resources/Java/README.mustache +++ b/modules/openapi-generator/src/main/resources/Java/README.mustache @@ -8,7 +8,7 @@ - Build date: {{generatedDate}} {{/hideGenerationTimestamp}} -{{#appDescriptionWithNewLines}}{{{appDescriptionWithNewLines}}}{{/appDescriptionWithNewLines}} +{{{appDescriptionWithNewLines}}} {{#infoUrl}} For more information, please visit [{{{infoUrl}}}]({{{infoUrl}}}) @@ -157,7 +157,7 @@ public class {{{classname}}}Example { {{{dataType}}} {{{paramName}}} = {{{example}}}; // {{{dataType}}} | {{{description}}} {{/allParams}} try { - {{#returnType}}{{{returnType}}} result = {{/returnType}}apiInstance.{{{operationId}}}({{#allParams}}{{{paramName}}}{{^-last}}, {{/-last}}{{/allParams}});{{#returnType}} + {{#returnType}}{{{.}}} result = {{/returnType}}apiInstance.{{{operationId}}}({{#allParams}}{{{paramName}}}{{^-last}}, {{/-last}}{{/allParams}});{{#returnType}} System.out.println(result);{{/returnType}} } catch (ApiException e) { System.err.println("Exception when calling {{{classname}}}#{{{operationId}}}"); @@ -177,7 +177,7 @@ All URIs are relative to *{{basePath}}* Class | Method | HTTP request | Description ------------ | ------------- | ------------- | ------------- -{{#apiInfo}}{{#apis}}{{#operations}}{{#operation}}*{{classname}}* | [**{{operationId}}**]({{apiDocPath}}{{classname}}.md#{{operationId}}) | **{{httpMethod}}** {{commonPath}}{{path}} | {{#summary}}{{summary}}{{/summary}} +{{#apiInfo}}{{#apis}}{{#operations}}{{#operation}}*{{classname}}* | [**{{operationId}}**]({{apiDocPath}}{{classname}}.md#{{operationId}}) | **{{httpMethod}}** {{commonPath}}{{path}} | {{summary}} {{/operation}}{{/operations}}{{/apis}}{{/apiInfo}} ## Documentation for Models diff --git a/modules/openapi-generator/src/main/resources/Java/api.mustache b/modules/openapi-generator/src/main/resources/Java/api.mustache index 894cb0112398ca5d8adff561753bff896cc0a33c..28b18e2d16fb875534bb6224c48c0c3e3a8e0ce2 100644 --- a/modules/openapi-generator/src/main/resources/Java/api.mustache +++ b/modules/openapi-generator/src/main/resources/Java/api.mustache @@ -49,7 +49,7 @@ public class {{classname}} { * @param {{paramName}} {{description}}{{#required}} (required){{/required}}{{^required}} (optional{{^isContainer}}{{#defaultValue}}, default to {{.}}{{/defaultValue}}){{/isContainer}}{{/required}} {{/allParams}} {{#returnType}} - * @return {{returnType}} + * @return {{.}} {{/returnType}} * @throws ApiException if fails to make API call {{#isDeprecated}} @@ -63,7 +63,7 @@ public class {{classname}} { {{#isDeprecated}} @Deprecated {{/isDeprecated}} - public {{#returnType}}{{{returnType}}} {{/returnType}}{{^returnType}}void {{/returnType}}{{operationId}}({{#allParams}}{{{dataType}}} {{paramName}}{{^-last}}, {{/-last}}{{/allParams}}) throws ApiException { + public {{#returnType}}{{{.}}} {{/returnType}}{{^returnType}}void {{/returnType}}{{operationId}}({{#allParams}}{{{dataType}}} {{paramName}}{{^-last}}, {{/-last}}{{/allParams}}) throws ApiException { Object localVarPostBody = {{#bodyParam}}{{paramName}}{{/bodyParam}}{{^bodyParam}}null{{/bodyParam}}; {{#allParams}}{{#required}} // verify the required parameter '{{paramName}}' is set @@ -83,7 +83,7 @@ public class {{classname}} { {{javaUtilPrefix}}Map<String, Object> localVarFormParams = new {{javaUtilPrefix}}HashMap<String, Object>(); {{#queryParams}} - {{#collectionFormat}}localVarCollectionQueryParams.addAll(apiClient.parameterToPairs("{{{collectionFormat}}}", {{/collectionFormat}}{{^collectionFormat}}localVarQueryParams.addAll(apiClient.parameterToPair({{/collectionFormat}}"{{baseName}}", {{paramName}})); + {{#collectionFormat}}localVarCollectionQueryParams.addAll(apiClient.parameterToPairs("{{{.}}}", {{/collectionFormat}}{{^collectionFormat}}localVarQueryParams.addAll(apiClient.parameterToPair({{/collectionFormat}}"{{baseName}}", {{paramName}})); {{/queryParams}} {{#headerParams}}if ({{paramName}} != null) diff --git a/modules/openapi-generator/src/main/resources/Java/api_doc.mustache b/modules/openapi-generator/src/main/resources/Java/api_doc.mustache index 55d0244e3a52accecdbb4fc3524ff73b40003e0e..78783f1943e5bf84af658822e2c21f5af8a8553c 100644 --- a/modules/openapi-generator/src/main/resources/Java/api_doc.mustache +++ b/modules/openapi-generator/src/main/resources/Java/api_doc.mustache @@ -1,12 +1,12 @@ # {{classname}}{{#description}} -{{description}}{{/description}} +{{.}}{{/description}} All URIs are relative to *{{basePath}}* Method | HTTP request | Description ------------- | ------------- | ------------- -{{#operations}}{{#operation}}[**{{operationId}}**]({{classname}}.md#{{operationId}}) | **{{httpMethod}}** {{commonPath}}{{path}} | {{#summary}}{{summary}}{{/summary}} +{{#operations}}{{#operation}}[**{{operationId}}**]({{classname}}.md#{{operationId}}) | **{{httpMethod}}** {{commonPath}}{{path}} | {{summary}} {{/operation}}{{/operations}} {{#operations}} @@ -14,11 +14,11 @@ Method | HTTP request | Description ## {{operationId}} -> {{#returnType}}{{returnType}} {{/returnType}}{{operationId}}({{#allParams}}{{{paramName}}}{{^-last}}, {{/-last}}{{/allParams}}) +> {{#returnType}}{{.}} {{/returnType}}{{operationId}}({{#allParams}}{{{paramName}}}{{^-last}}, {{/-last}}{{/allParams}}) {{summary}}{{#notes}} -{{notes}}{{/notes}} +{{.}}{{/notes}} ### Example @@ -60,7 +60,7 @@ public class Example { {{{dataType}}} {{{paramName}}} = {{{example}}}; // {{{dataType}}} | {{{description}}} {{/allParams}} try { - {{#returnType}}{{{returnType}}} result = {{/returnType}}apiInstance.{{{operationId}}}({{#allParams}}{{{paramName}}}{{^-last}}, {{/-last}}{{/allParams}});{{#returnType}} + {{#returnType}}{{{.}}} result = {{/returnType}}apiInstance.{{{operationId}}}({{#allParams}}{{{paramName}}}{{^-last}}, {{/-last}}{{/allParams}});{{#returnType}} System.out.println(result);{{/returnType}} } catch (ApiException e) { System.err.println("Exception when calling {{{classname}}}#{{{operationId}}}"); @@ -78,7 +78,7 @@ public class Example { {{^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}} **{{paramName}}** | {{#isPrimitiveType}}**{{dataType}}**{{/isPrimitiveType}}{{^isPrimitiveType}}{{#isFile}}**{{dataType}}**{{/isFile}}{{^isFile}}[**{{dataType}}**]({{baseType}}.md){{/isFile}}{{/isPrimitiveType}}| {{description}} |{{^required}} [optional]{{/required}}{{^isContainer}}{{#defaultValue}} [default to {{.}}]{{/defaultValue}}{{/isContainer}}{{#allowableValues}} [enum: {{#values}}{{{.}}}{{^-last}}, {{/-last}}{{/values}}]{{/allowableValues}} {{/allParams}} ### Return type diff --git a/modules/openapi-generator/src/main/resources/Java/api_test.mustache b/modules/openapi-generator/src/main/resources/Java/api_test.mustache index 38c58efb71176c6a5abbb9a7c77bcf7d01b0d6b4..b3a544d4c658f5a358906524bf75a18fb70012e8 100644 --- a/modules/openapi-generator/src/main/resources/Java/api_test.mustache +++ b/modules/openapi-generator/src/main/resources/Java/api_test.mustache @@ -27,11 +27,11 @@ public class {{classname}}Test { {{#operation}} /** {{#summary}} - * {{summary}} + * {{.}} * {{/summary}} {{#notes}} - * {{notes}} + * {{.}} * {{/notes}} * @throws ApiException @@ -42,7 +42,7 @@ public class {{classname}}Test { //{{#allParams}} //{{{dataType}}} {{paramName}} = null; //{{/allParams}} - //{{#returnType}}{{{returnType}}} response = {{/returnType}}api.{{operationId}}({{#allParams}}{{paramName}}{{^-last}}, {{/-last}}{{/allParams}}); + //{{#returnType}}{{{.}}} response = {{/returnType}}api.{{operationId}}({{#allParams}}{{paramName}}{{^-last}}, {{/-last}}{{/allParams}}); // TODO: test validations } diff --git a/modules/openapi-generator/src/main/resources/Java/auth/OAuthFlow.mustache b/modules/openapi-generator/src/main/resources/Java/auth/OAuthFlow.mustache index 07b7f3aa673df09c39f2df3d189edd5870f7d91c..05bbf28dd3b1e0740861f6f61d50fad297fb0c76 100644 --- a/modules/openapi-generator/src/main/resources/Java/auth/OAuthFlow.mustache +++ b/modules/openapi-generator/src/main/resources/Java/auth/OAuthFlow.mustache @@ -5,7 +5,7 @@ package {{invokerPackage}}.auth; {{>generatedAnnotation}} public enum OAuthFlow { accessCode, //called authorizationCode in OpenAPI 3.0 - implicit, + implicit, password, application //called clientCredentials in OpenAPI 3.0 } diff --git a/modules/openapi-generator/src/main/resources/Java/beanValidationCore.mustache b/modules/openapi-generator/src/main/resources/Java/beanValidationCore.mustache index 1f9f43e7b868563d7df92da9f413d62e76d38197..ff4ffe26c49765afe7058bc23df182aa0a4056e9 100644 --- a/modules/openapi-generator/src/main/resources/Java/beanValidationCore.mustache +++ b/modules/openapi-generator/src/main/resources/Java/beanValidationCore.mustache @@ -4,17 +4,17 @@ minLength && maxLength set minLength set, maxLength not }}{{#minLength}}{{^maxLength}} @Size(min={{minLength}}){{/maxLength}}{{/minLength}}{{! minLength not set, maxLength set -}}{{^minLength}}{{#maxLength}} @Size(max={{maxLength}}){{/maxLength}}{{/minLength}}{{! +}}{{^minLength}}{{#maxLength}} @Size(max={{.}}){{/maxLength}}{{/minLength}}{{! @Size: minItems && maxItems set }}{{#minItems}}{{#maxItems}} @Size(min={{minItems}},max={{maxItems}}){{/maxItems}}{{/minItems}}{{! @Size: minItems set, maxItems not }}{{#minItems}}{{^maxItems}} @Size(min={{minItems}}){{/maxItems}}{{/minItems}}{{! @Size: minItems not set && maxItems set -}}{{^minItems}}{{#maxItems}} @Size(max={{maxItems}}){{/maxItems}}{{/minItems}}{{! +}}{{^minItems}}{{#maxItems}} @Size(max={{.}}){{/maxItems}}{{/minItems}}{{! check for integer or long / all others=decimal type with @Decimal* isInteger set -}}{{#isInteger}}{{#minimum}} @Min({{minimum}}){{/minimum}}{{#maximum}} @Max({{maximum}}){{/maximum}}{{/isInteger}}{{! +}}{{#isInteger}}{{#minimum}} @Min({{.}}){{/minimum}}{{#maximum}} @Max({{.}}){{/maximum}}{{/isInteger}}{{! isLong set -}}{{#isLong}}{{#minimum}} @Min({{minimum}}L){{/minimum}}{{#maximum}} @Max({{maximum}}L){{/maximum}}{{/isLong}}{{! +}}{{#isLong}}{{#minimum}} @Min({{.}}L){{/minimum}}{{#maximum}} @Max({{.}}L){{/maximum}}{{/isLong}}{{! Not Integer, not Long => we have a decimal value! }}{{^isInteger}}{{^isLong}}{{#minimum}} @DecimalMin({{#exclusiveMinimum}}value={{/exclusiveMinimum}}"{{minimum}}"{{#exclusiveMinimum}},inclusive=false{{/exclusiveMinimum}}){{/minimum}}{{#maximum}} @DecimalMax({{#exclusiveMaximum}}value={{/exclusiveMaximum}}"{{maximum}}"{{#exclusiveMaximum}},inclusive=false{{/exclusiveMaximum}}){{/maximum}}{{/isLong}}{{/isInteger}} \ No newline at end of file diff --git a/modules/openapi-generator/src/main/resources/Java/beanValidationQueryParams.mustache b/modules/openapi-generator/src/main/resources/Java/beanValidationQueryParams.mustache index f8eef8f94c7bea30e95938e16cc856b53036d82b..c4ff01d7e5526b8718f1385ee9416523e0d1c860 100644 --- a/modules/openapi-generator/src/main/resources/Java/beanValidationQueryParams.mustache +++ b/modules/openapi-generator/src/main/resources/Java/beanValidationQueryParams.mustache @@ -1 +1 @@ -{{#required}} @NotNull{{/required}}{{>beanValidationCore}} \ No newline at end of file +{{#required}} @NotNull{{/required}}{{>beanValidationCore}} \ No newline at end of file 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 95fc41cbf42a880d51305420078c9da3dfb850bb..70dea8f3f25a6ae53b070bf0410a0a9c72ab858b 100644 --- a/modules/openapi-generator/src/main/resources/Java/build.gradle.mustache +++ b/modules/openapi-generator/src/main/resources/Java/build.gradle.mustache @@ -105,7 +105,7 @@ if(hasProperty('target') && target == 'android') { main = System.getProperty('mainClass') classpath = sourceSets.main.runtimeClasspath } - + task sourcesJar(type: Jar, dependsOn: classes) { classifier = 'sources' from sourceSets.main.allSource @@ -164,4 +164,3 @@ dependencies { implementation 'javax.annotation:javax.annotation-api:1.3.2' testImplementation "junit:junit:$junit_version" } - diff --git a/modules/openapi-generator/src/main/resources/Java/git_push.sh.mustache b/modules/openapi-generator/src/main/resources/Java/git_push.sh.mustache index 8b3f689c9121a65080ad038d37a2036b01e559a1..f0bed5bd84155f05bc3cdc67af008f524efb38a6 100755 --- a/modules/openapi-generator/src/main/resources/Java/git_push.sh.mustache +++ b/modules/openapi-generator/src/main/resources/Java/git_push.sh.mustache @@ -55,4 +55,3 @@ 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/Java/jackson_annotations.mustache b/modules/openapi-generator/src/main/resources/Java/jackson_annotations.mustache index 3819d3d2dd2e4875aab31e3346cf238921dbffdd..ccde126f54ebf4a32f7dba94984bb68030ddb760 100644 --- a/modules/openapi-generator/src/main/resources/Java/jackson_annotations.mustache +++ b/modules/openapi-generator/src/main/resources/Java/jackson_annotations.mustache @@ -8,12 +8,12 @@ @JsonInclude({{#isMap}}{{#items.isNullable}}content = JsonInclude.Include.ALWAYS, {{/items.isNullable}}{{/isMap}}value = JsonInclude.Include.{{#required}}ALWAYS{{/required}}{{^required}}USE_DEFAULTS{{/required}}) {{#withXml}} {{^isContainer}} - @JacksonXmlProperty({{#isXmlAttribute}}isAttribute = true, {{/isXmlAttribute}}{{#xmlNamespace}}namespace="{{xmlNamespace}}", {{/xmlNamespace}}localName = "{{#xmlName}}{{xmlName}}{{/xmlName}}{{^xmlName}}{{baseName}}{{/xmlName}}") + @JacksonXmlProperty({{#isXmlAttribute}}isAttribute = true, {{/isXmlAttribute}}{{#xmlNamespace}}namespace="{{.}}", {{/xmlNamespace}}localName = "{{xmlName}}{{^xmlName}}{{baseName}}{{/xmlName}}") {{/isContainer}} {{#isContainer}} {{#isXmlWrapped}} // items.xmlName={{items.xmlName}} - @JacksonXmlElementWrapper(useWrapping = {{isXmlWrapped}}, {{#xmlNamespace}}namespace="{{xmlNamespace}}", {{/xmlNamespace}}localName = "{{#items.xmlName}}{{items.xmlName}}{{/items.xmlName}}{{^items.xmlName}}{{items.baseName}}{{/items.xmlName}}") + @JacksonXmlElementWrapper(useWrapping = {{isXmlWrapped}}, {{#xmlNamespace}}namespace="{{.}}", {{/xmlNamespace}}localName = "{{#items.xmlName}}{{items.xmlName}}{{/items.xmlName}}{{^items.xmlName}}{{items.baseName}}{{/items.xmlName}}") {{/isXmlWrapped}} {{/isContainer}} {{/withXml}} \ No newline at end of file diff --git a/modules/openapi-generator/src/main/resources/Java/libraries/feign/ApiClient.mustache b/modules/openapi-generator/src/main/resources/Java/libraries/feign/ApiClient.mustache index e0d3e01c3864f128a2c8d4778d95987b03cd35c8..20c8733c9d086af9185b4f2bce28468c7443e1ca 100644 --- a/modules/openapi-generator/src/main/resources/Java/libraries/feign/ApiClient.mustache +++ b/modules/openapi-generator/src/main/resources/Java/libraries/feign/ApiClient.mustache @@ -259,7 +259,7 @@ public class ApiClient { {{#hasOAuthMethods}} /** - * Helper method to configure the client credentials for Oauth + * Helper method to configure the client credentials for Oauth * @param username Username * @param password Password */ diff --git a/modules/openapi-generator/src/main/resources/Java/libraries/feign/README.mustache b/modules/openapi-generator/src/main/resources/Java/libraries/feign/README.mustache index acab659406d005fd701ccbcc923a64e726569af3..fed3cbebd53c8ccef14cfe7c7122dd9865daab62 100644 --- a/modules/openapi-generator/src/main/resources/Java/libraries/feign/README.mustache +++ b/modules/openapi-generator/src/main/resources/Java/libraries/feign/README.mustache @@ -54,7 +54,7 @@ And to use the api you can follow the examples bellow: ApiClient apiClient = new ApiClient("oauth_password"); apiClient.setBasePath("https://localhost:8243/petstore/1/"); apiClient.setOauthPassword("username", "password", "client_id", "client_secret"); - + //Oauth client credentials flow ApiClient apiClient = new ApiClient("oauth_client_credentials"); apiClient.setBasePath("https://localhost:8243/petstore/1/"); @@ -62,7 +62,7 @@ And to use the api you can follow the examples bellow: PetApi petApi = apiClient.buildClient(PetApi.class); Pet petById = petApi.getPetById(12345L); - + System.out.println(petById); } ``` 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 5a5012d63ab44ab391470efd0e3c34aaab41f085..de0ae82baaa2308144617d17a654fc34c3e1fbf0 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 @@ -28,7 +28,7 @@ public interface {{classname}} extends ApiClient.Api { * @param {{paramName}} {{description}}{{#required}} (required){{/required}}{{^required}} (optional{{^isContainer}}{{#defaultValue}}, default to {{.}}{{/defaultValue}}{{/isContainer}}){{/required}} {{/allParams}} {{#returnType}} - * @return {{returnType}} + * @return {{.}} {{/returnType}} {{#externalDocs}} * {{description}} @@ -48,7 +48,7 @@ public interface {{classname}} extends ApiClient.Api { "{{baseName}}: {{=<% %>=}}{<%paramName%>}<%={{ }}=%>"{{^-last}}, {{/-last}}{{/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}}{{^-last}}, {{/-last}}{{/allParams}}); + {{#returnType}}{{{.}}} {{/returnType}}{{^returnType}}void {{/returnType}}{{nickname}}({{#allParams}}{{^isBodyParam}}{{^legacyDates}}@Param("{{paramName}}") {{/legacyDates}}{{#legacyDates}}@Param(value="{{paramName}}", expander=ParamExpander.class) {{/legacyDates}}{{/isBodyParam}}{{{dataType}}} {{paramName}}{{^-last}}, {{/-last}}{{/allParams}}); {{#hasQueryParams}} /** @@ -72,7 +72,7 @@ public interface {{classname}} extends ApiClient.Api { {{/queryParams}} * </ul> {{#returnType}} - * @return {{returnType}} + * @return {{.}} {{/returnType}} {{#externalDocs}} * {{description}} @@ -92,7 +92,7 @@ public interface {{classname}} extends ApiClient.Api { "{{baseName}}: {{=<% %>=}}{<%paramName%>}<%={{ }}=%>"{{^-last}}, {{/-last}}{{/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<String, Object> queryParams); + {{#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<String, Object> queryParams); /** * A convenience class for generating query parameters for the diff --git a/modules/openapi-generator/src/main/resources/Java/libraries/feign/api_test.mustache b/modules/openapi-generator/src/main/resources/Java/libraries/feign/api_test.mustache index e9f9d055e02f6cfeb085c9b19fcb28500b383960..a7f5bb0b328a6b5346ce2274658037568633b79b 100644 --- a/modules/openapi-generator/src/main/resources/Java/libraries/feign/api_test.mustache +++ b/modules/openapi-generator/src/main/resources/Java/libraries/feign/api_test.mustache @@ -36,7 +36,7 @@ class {{classname}}Test { {{#allParams}} {{{dataType}}} {{paramName}} = null; {{/allParams}} - // {{#returnType}}{{{returnType}}} response = {{/returnType}}api.{{operationId}}({{#allParams}}{{paramName}}{{^-last}}, {{/-last}}{{/allParams}}); + // {{#returnType}}{{{.}}} response = {{/returnType}}api.{{operationId}}({{#allParams}}{{paramName}}{{^-last}}, {{/-last}}{{/allParams}}); // TODO: test validations } @@ -61,7 +61,7 @@ class {{classname}}Test { {{#queryParams}} .{{paramName}}(null){{#-last}};{{/-last}} {{/queryParams}} - // {{#returnType}}{{{returnType}}} response = {{/returnType}}api.{{operationId}}({{#allParams}}{{^isQueryParam}}{{paramName}}, {{/isQueryParam}}{{/allParams}}queryParams); + // {{#returnType}}{{{.}}} response = {{/returnType}}api.{{operationId}}({{#allParams}}{{^isQueryParam}}{{paramName}}, {{/isQueryParam}}{{/allParams}}queryParams); // TODO: test validations } diff --git a/modules/openapi-generator/src/main/resources/Java/libraries/feign/auth/HttpBasicAuth.mustache b/modules/openapi-generator/src/main/resources/Java/libraries/feign/auth/HttpBasicAuth.mustache index 2b1acb8ff74c74b60943591ac0712fa4fb3df20e..c308131e8f94743f4389a6c5c79d8c50a10f5dbc 100644 --- a/modules/openapi-generator/src/main/resources/Java/libraries/feign/auth/HttpBasicAuth.mustache +++ b/modules/openapi-generator/src/main/resources/Java/libraries/feign/auth/HttpBasicAuth.mustache @@ -11,7 +11,7 @@ public class HttpBasicAuth implements RequestInterceptor { private String username; private String password; - + public String getUsername() { return username; } 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 65b3cc3c2146e407c91150d9a9024f4ca789e458..28b5437ccc0c074e7252a51380cfe033cf52a95a 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 @@ -225,7 +225,7 @@ <artifactId>jsr305</artifactId> <version>3.0.2</version> </dependency> - + <!-- HTTP client: Netflix Feign --> <dependency> <groupId>io.github.openfeign</groupId> 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 8396e3148bcf4fa6805812a58d7d756f88806828..f9af1a4a9bb6cfc99bb555897f5fef40e3a9d375 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 @@ -45,11 +45,11 @@ public class {{classname}} { {{#operation}} /**{{#summary}} - * {{summary}}{{/summary}}{{#notes}} - * {{notes}}{{/notes}}{{#responses}} - * <p><b>{{code}}</b>{{#message}} - {{message}}{{/message}}{{/responses}}{{#allParams}} + * {{.}}{{/summary}}{{#notes}} + * {{.}}{{/notes}}{{#responses}} + * <p><b>{{code}}</b>{{#message}} - {{.}}{{/message}}{{/responses}}{{#allParams}} * @param {{paramName}} {{description}}{{^description}}The {{paramName}} parameter{{/description}}{{/allParams}}{{#returnType}} - * @return {{returnType}}{{/returnType}} + * @return {{.}}{{/returnType}} * @throws IOException if an error occurs while attempting to invoke the API{{#externalDocs}} * {{description}} * @see <a href="{{url}}">{{summary}} Documentation</a> @@ -61,19 +61,19 @@ public class {{classname}} { {{#isDeprecated}} @Deprecated {{/isDeprecated}} - public {{#returnType}}{{{returnType}}} {{/returnType}}{{^returnType}}void {{/returnType}}{{operationId}}({{#allParams}}{{{dataType}}} {{paramName}}{{^-last}}, {{/-last}}{{/allParams}}) throws IOException { + public {{#returnType}}{{{.}}} {{/returnType}}{{^returnType}}void {{/returnType}}{{operationId}}({{#allParams}}{{{dataType}}} {{paramName}}{{^-last}}, {{/-last}}{{/allParams}}) throws IOException { {{#returnType}}HttpResponse response = {{/returnType}}{{operationId}}ForHttpResponse({{#allParams}}{{paramName}}{{^-last}}, {{/-last}}{{/allParams}});{{#returnType}} TypeReference<{{{returnType}}}> typeRef = new TypeReference<{{{returnType}}}>() {}; return apiClient.getObjectMapper().readValue(response.getContent(), typeRef);{{/returnType}} } /**{{#summary}} - * {{summary}}{{/summary}}{{#notes}} - * {{notes}}{{/notes}}{{#responses}} - * <p><b>{{code}}</b>{{#message}} - {{message}}{{/message}}{{/responses}}{{#requiredParams}} + * {{.}}{{/summary}}{{#notes}} + * {{.}}{{/notes}}{{#responses}} + * <p><b>{{code}}</b>{{#message}} - {{.}}{{/message}}{{/responses}}{{#requiredParams}} * @param {{paramName}} {{description}}{{^description}}The {{paramName}} parameter{{/description}}{{/requiredParams}} * @param params Map of query params. A collection will be interpreted as passing in multiple instances of the same query param.{{#returnType}} - * @return {{returnType}}{{/returnType}} + * @return {{.}}{{/returnType}} * @throws IOException if an error occurs while attempting to invoke the API{{#externalDocs}} * {{description}} * @see <a href="{{url}}">{{summary}} Documentation</a> @@ -85,7 +85,7 @@ public class {{classname}} { {{#isDeprecated}} @Deprecated {{/isDeprecated}} - public {{#returnType}}{{{returnType}}} {{/returnType}}{{^returnType}}void {{/returnType}}{{operationId}}({{#bodyParam}}{{^required}}{{{dataType}}} {{paramName}}, {{/required}}{{/bodyParam}}{{#requiredParams}}{{{dataType}}} {{paramName}}{{^-last}}, {{/-last}}{{/requiredParams}}{{#hasRequiredParams}}, {{/hasRequiredParams}}Map<String, Object> params) throws IOException { + public {{#returnType}}{{{.}}} {{/returnType}}{{^returnType}}void {{/returnType}}{{operationId}}({{#bodyParam}}{{^required}}{{{dataType}}} {{paramName}}, {{/required}}{{/bodyParam}}{{#requiredParams}}{{{dataType}}} {{paramName}}{{^-last}}, {{/-last}}{{/requiredParams}}{{#hasRequiredParams}}, {{/hasRequiredParams}}Map<String, Object> params) throws IOException { {{#returnType}}HttpResponse response = {{/returnType}}{{operationId}}ForHttpResponse({{#bodyParam}}{{^required}}{{paramName}}, {{/required}}{{/bodyParam}}{{#requiredParams}}{{paramName}}{{^-last}}, {{/-last}}{{/requiredParams}}{{#hasRequiredParams}}, {{/hasRequiredParams}}params);{{#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/api_test.mustache b/modules/openapi-generator/src/main/resources/Java/libraries/google-api-client/api_test.mustache index 56b7c1897d1488f705fb09a1a0c400c290f3d235..1dc2f174fbf2e019b860b560b7b05537abd46f72 100644 --- a/modules/openapi-generator/src/main/resources/Java/libraries/google-api-client/api_test.mustache +++ b/modules/openapi-generator/src/main/resources/Java/libraries/google-api-client/api_test.mustache @@ -37,7 +37,7 @@ public class {{classname}}Test { {{#allParams}} {{{dataType}}} {{paramName}} = null; {{/allParams}} - {{#returnType}}{{{returnType}}} response = {{/returnType}}api.{{operationId}}({{#allParams}}{{paramName}}{{^-last}}, {{/-last}}{{/allParams}}); + {{#returnType}}{{{.}}} response = {{/returnType}}api.{{operationId}}({{#allParams}}{{paramName}}{{^-last}}, {{/-last}}{{/allParams}}); // TODO: test validations } 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 6be8600c7dacad80fd46feee625aae702cc5cd5d..6abca3fddb7b83ebea3f9e551b1d125a60e0dd67 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 @@ -24,7 +24,7 @@ if(hasProperty('target') && target == 'android') { apply plugin: 'com.android.library' apply plugin: 'com.github.dcendents.android-maven' - + android { compileSdkVersion 23 buildToolsVersion '23.0.2' @@ -42,7 +42,7 @@ if(hasProperty('target') && target == 'android') { targetCompatibility JavaVersion.VERSION_1_7 {{/java8}} } - + // Rename the aar correctly libraryVariants.all { variant -> variant.outputs.each { output -> @@ -58,7 +58,7 @@ if(hasProperty('target') && target == 'android') { provided 'javax.annotation:jsr250-api:1.0' } } - + afterEvaluate { android.libraryVariants.all { variant -> def task = project.tasks.create "jar${variant.name.capitalize()}", Jar @@ -70,12 +70,12 @@ if(hasProperty('target') && target == 'android') { artifacts.add('archives', task); } } - + task sourcesJar(type: Jar) { from android.sourceSets.main.java.srcDirs classifier = 'sources' } - + artifacts { archives sourcesJar } @@ -99,7 +99,7 @@ if(hasProperty('target') && target == 'android') { pom.artifactId = '{{artifactId}}' } } - + task execute(type:JavaExec) { main = System.getProperty('mainClass') classpath = sourceSets.main.runtimeClasspath 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 65494e8ea04a64449ce712d1c994b22ff71d06b2..abe9b208c60d08fe975ef050dfb0b2b6be6c9070 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 @@ -188,7 +188,7 @@ public class ApiClient{{#jsr310}} extends JavaTimeFormatter{{/jsr310}} { this.dateFormat = new RFC3339DateFormat(); // Set default User-Agent. - setUserAgent("{{#httpUserAgent}}{{{.}}}{{/httpUserAgent}}{{^httpUserAgent}}OpenAPI-Generator/{{{artifactVersion}}}/java{{/httpUserAgent}}"); + setUserAgent("{{{httpUserAgent}}}{{^httpUserAgent}}OpenAPI-Generator/{{{artifactVersion}}}/java{{/httpUserAgent}}"); // Setup authentications (key: authentication name, value: authentication). authentications = new HashMap<String, Authentication>(); 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 666430c834e15dad1a59aa2bdee8308b283209c7..ec4d939d2fce55bc45fcef72e38169ac1ade31c3 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 @@ -58,7 +58,7 @@ public class {{classname}} { * @param {{paramName}} {{description}}{{#required}} (required){{/required}}{{^required}} (optional{{#defaultValue}}, default to {{.}}{{/defaultValue}}){{/required}} {{/allParams}} {{#returnType}} - * @return {{returnType}} + * @return {{.}} {{/returnType}} * @throws ApiException if fails to make API call {{#responses.0}} @@ -81,7 +81,7 @@ public class {{classname}} { {{#isDeprecated}} @Deprecated {{/isDeprecated}} - public {{#returnType}}{{{returnType}}} {{/returnType}}{{^returnType}}void {{/returnType}}{{operationId}}({{#allParams}}{{{dataType}}} {{paramName}}{{^-last}}, {{/-last}}{{/allParams}}) throws ApiException { + public {{#returnType}}{{{.}}} {{/returnType}}{{^returnType}}void {{/returnType}}{{operationId}}({{#allParams}}{{{dataType}}} {{paramName}}{{^-last}}, {{/-last}}{{/allParams}}) throws ApiException { {{#returnType}}return {{/returnType}}{{operationId}}WithHttpInfo({{#allParams}}{{paramName}}{{^-last}}, {{/-last}}{{/allParams}}){{#returnType}}.getData(){{/returnType}}; } {{/vendorExtensions.x-group-parameters}} @@ -93,7 +93,7 @@ public class {{classname}} { {{#allParams}} * @param {{paramName}} {{description}}{{#required}} (required){{/required}}{{^required}} (optional{{#defaultValue}}, default to {{.}}{{/defaultValue}}){{/required}} {{/allParams}} - * @return ApiResponse<{{#returnType}}{{returnType}}{{/returnType}}{{^returnType}}Void{{/returnType}}> + * @return ApiResponse<{{returnType}}{{^returnType}}Void{{/returnType}}> * @throws ApiException if fails to make API call {{#responses.0}} * @http.response.details @@ -115,7 +115,7 @@ public class {{classname}} { {{#isDeprecated}} @Deprecated {{/isDeprecated}} - 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}}{{^-last}}, {{/-last}}{{/allParams}}) throws ApiException { + public{{/vendorExtensions.x-group-parameters}}{{#vendorExtensions.x-group-parameters}}private{{/vendorExtensions.x-group-parameters}} ApiResponse<{{{returnType}}}{{^returnType}}Void{{/returnType}}> {{operationId}}WithHttpInfo({{#allParams}}{{{dataType}}} {{paramName}}{{^-last}}, {{/-last}}{{/allParams}}) throws ApiException { Object localVarPostBody = {{#bodyParam}}{{paramName}}{{/bodyParam}}{{^bodyParam}}null{{/bodyParam}}; {{#allParams}}{{#required}} // verify the required parameter '{{paramName}}' is set @@ -134,7 +134,7 @@ public class {{classname}} { {{javaUtilPrefix}}Map<String, Object> localVarFormParams = new {{javaUtilPrefix}}HashMap<String, Object>(); {{#queryParams}} - localVarQueryParams.addAll(apiClient.parameterToPairs("{{#collectionFormat}}{{{collectionFormat}}}{{/collectionFormat}}", "{{baseName}}", {{paramName}})); + localVarQueryParams.addAll(apiClient.parameterToPairs("{{{collectionFormat}}}", "{{baseName}}", {{paramName}})); {{/queryParams}} {{#headerParams}}if ({{paramName}} != null) @@ -212,13 +212,13 @@ public class {{classname}} { {{#isDeprecated}}* @deprecated{{/isDeprecated}} */ {{#isDeprecated}}@Deprecated{{/isDeprecated}} - public {{#returnType}}{{{.}}}{{/returnType}}{{^returnType}}void{{/returnType}} execute() throws ApiException { + public {{{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}}> + * @return ApiResponse<{{returnType}}{{^returnType}}Void{{/returnType}}> * @throws ApiException if fails to make API call {{#responses.0}} * @http.response.details @@ -235,7 +235,7 @@ public class {{classname}} { {{#isDeprecated}} @Deprecated {{/isDeprecated}} - public ApiResponse<{{#returnType}}{{{.}}}{{/returnType}}{{^returnType}}Void{{/returnType}}> executeWithHttpInfo() throws ApiException { + public ApiResponse<{{{returnType}}}{{^returnType}}Void{{/returnType}}> executeWithHttpInfo() throws ApiException { return {{operationId}}WithHttpInfo({{#allParams}}{{paramName}}{{^-last}}, {{/-last}}{{/allParams}}); } } 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 e9270ceb18f15dacd9ee720c99ee6c8aae60937d..3877e9ab3af78c306ed168d9fbc38265417658ae 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 @@ -1,12 +1,12 @@ # {{classname}}{{#description}} -{{description}}{{/description}} +{{.}}{{/description}} All URIs are relative to *{{basePath}}* Method | HTTP request | Description ------------- | ------------- | ------------- -{{#operations}}{{#operation}}[**{{operationId}}**]({{classname}}.md#{{operationId}}) | **{{httpMethod}}** {{path}} | {{#summary}}{{summary}}{{/summary}} +{{#operations}}{{#operation}}[**{{operationId}}**]({{classname}}.md#{{operationId}}) | **{{httpMethod}}** {{path}} | {{summary}} {{/operation}}{{/operations}} {{#operations}} @@ -15,10 +15,10 @@ Method | HTTP request | Description ## {{operationId}} {{^vendorExtensions.x-group-parameters}} -> {{#returnType}}{{returnType}} {{/returnType}}{{operationId}}({{#allParams}}{{paramName}}{{^-last}}, {{/-last}}{{/allParams}}) +> {{#returnType}}{{.}} {{/returnType}}{{operationId}}({{#allParams}}{{paramName}}{{^-last}}, {{/-last}}{{/allParams}}) {{/vendorExtensions.x-group-parameters}} {{#vendorExtensions.x-group-parameters}} -> {{#returnType}}{{returnType}} {{/returnType}}{{operationId}}({{#pathParams}}{{paramName}}{{^-last}}, {{/-last}}{{/pathParams}}){{#allParams}}{{^isPathParam}}.{{paramName}}({{paramName}}){{/isPathParam}}{{/allParams}}.execute(); +> {{#returnType}}{{.}} {{/returnType}}{{operationId}}({{#pathParams}}{{paramName}}{{^-last}}, {{/-last}}{{/pathParams}}){{#allParams}}{{^isPathParam}}.{{paramName}}({{paramName}}){{/isPathParam}}{{/allParams}}.execute(); {{/vendorExtensions.x-group-parameters}} {{summary}}{{#notes}} @@ -69,10 +69,10 @@ public class Example { {{/allParams}} try { {{^vendorExtensions.x-group-parameters}} - {{#returnType}}{{{returnType}}} result = {{/returnType}}apiInstance.{{{operationId}}}({{#allParams}}{{{paramName}}}{{^-last}}, {{/-last}}{{/allParams}}); + {{#returnType}}{{{.}}} result = {{/returnType}}apiInstance.{{{operationId}}}({{#allParams}}{{{paramName}}}{{^-last}}, {{/-last}}{{/allParams}}); {{/vendorExtensions.x-group-parameters}} {{#vendorExtensions.x-group-parameters}} - {{#returnType}}{{{returnType}}} result = {{/returnType}}api.{{operationId}}({{#pathParams}}{{paramName}}{{^-last}}, {{/-last}}{{/pathParams}}){{#allParams}}{{^isPathParam}} + {{#returnType}}{{{.}}} result = {{/returnType}}api.{{operationId}}({{#pathParams}}{{paramName}}{{^-last}}, {{/-last}}{{/pathParams}}){{#allParams}}{{^isPathParam}} .{{paramName}}({{paramName}}){{/isPathParam}}{{/allParams}} .execute(); {{/vendorExtensions.x-group-parameters}} @@ -95,7 +95,7 @@ public class Example { {{^allParams}}This endpoint does not need any parameter.{{/allParams}}{{#allParams}}{{#-last}} Name | Type | Description | Notes ------------- | ------------- | ------------- | -------------{{/-last}}{{/allParams}} -{{#allParams}} **{{paramName}}** | {{#isContainer}}{{#isArray}}{{#items}}{{#isModel}}{{^isFile}}[{{/isFile}}{{/isModel}}**List<{{dataType}}>**{{#isModel}}{{^isFile}}]({{^baseType}}{{dataType}}{{/baseType}}{{#baseType}}{{baseType}}{{/baseType}}.md){{/isFile}}{{/isModel}}{{/items}}{{/isArray}}{{#isMap}}{{#items}}{{#isModel}}{{^isFile}}[{{/isFile}}{{/isModel}}**Map<String,{{dataType}}>**{{#isModel}}{{^isFile}}]({{^baseType}}{{dataType}}{{/baseType}}{{#baseType}}{{baseType}}{{/baseType}}.md){{/isFile}}{{/isModel}}{{/items}}{{/isMap}}{{/isContainer}}{{^isContainer}}{{#isModel}}{{^isFile}}[{{/isFile}}{{/isModel}}**{{dataType}}**{{#isModel}}{{^isFile}}]({{^baseType}}{{dataType}}{{/baseType}}{{#baseType}}{{baseType}}{{/baseType}}.md){{/isFile}}{{/isModel}}{{/isContainer}}| {{description}} |{{^required}} [optional]{{/required}}{{^isContainer}}{{#defaultValue}} [default to {{defaultValue}}]{{/defaultValue}}{{/isContainer}}{{#allowableValues}} [enum: {{#values}}{{{.}}}{{^-last}}, {{/-last}}{{/values}}]{{/allowableValues}} +{{#allParams}} **{{paramName}}** | {{#isContainer}}{{#isArray}}{{#items}}{{#isModel}}{{^isFile}}[{{/isFile}}{{/isModel}}**List<{{dataType}}>**{{#isModel}}{{^isFile}}]({{^baseType}}{{dataType}}{{/baseType}}{{baseType}}.md){{/isFile}}{{/isModel}}{{/items}}{{/isArray}}{{#isMap}}{{#items}}{{#isModel}}{{^isFile}}[{{/isFile}}{{/isModel}}**Map<String,{{dataType}}>**{{#isModel}}{{^isFile}}]({{^baseType}}{{dataType}}{{/baseType}}{{baseType}}.md){{/isFile}}{{/isModel}}{{/items}}{{/isMap}}{{/isContainer}}{{^isContainer}}{{#isModel}}{{^isFile}}[{{/isFile}}{{/isModel}}**{{dataType}}**{{#isModel}}{{^isFile}}]({{^baseType}}{{dataType}}{{/baseType}}{{baseType}}.md){{/isFile}}{{/isModel}}{{/isContainer}}| {{description}} |{{^required}} [optional]{{/required}}{{^isContainer}}{{#defaultValue}} [default to {{.}}]{{/defaultValue}}{{/isContainer}}{{#allowableValues}} [enum: {{#values}}{{{.}}}{{^-last}}, {{/-last}}{{/values}}]{{/allowableValues}} {{/allParams}} ### Return type 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 index b6ea89f61546dcfba90d1baeb3293a1f5c07ad82..c325e3d1ed2f4bd56597fe100031e1f94a1571f2 100644 --- 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 @@ -41,10 +41,10 @@ public class {{classname}}Test { //{{{dataType}}} {{paramName}} = null; {{/allParams}} {{^vendorExtensions.x-group-parameters}} - //{{#returnType}}{{{returnType}}} response = {{/returnType}}api.{{operationId}}({{#allParams}}{{paramName}}{{^-last}}, {{/-last}}{{/allParams}}); + //{{#returnType}}{{{.}}} response = {{/returnType}}api.{{operationId}}({{#allParams}}{{paramName}}{{^-last}}, {{/-last}}{{/allParams}}); {{/vendorExtensions.x-group-parameters}} {{#vendorExtensions.x-group-parameters}} - //{{#returnType}}{{{returnType}}} response = {{/returnType}}api.{{operationId}}({{#pathParams}}{{paramName}}{{^-last}}, {{/-last}}{{/pathParams}}){{#allParams}}{{^isPathParam}} + //{{#returnType}}{{{.}}} response = {{/returnType}}api.{{operationId}}({{#pathParams}}{{paramName}}{{^-last}}, {{/-last}}{{/pathParams}}){{#allParams}}{{^isPathParam}} // .{{paramName}}({{paramName}}){{/isPathParam}}{{/allParams}} // .execute(); {{/vendorExtensions.x-group-parameters}} diff --git a/modules/openapi-generator/src/main/resources/Java/libraries/jersey2/pojo.mustache b/modules/openapi-generator/src/main/resources/Java/libraries/jersey2/pojo.mustache index 55dc3717100fc596e2926d13e6867d978d8785d7..b01a88a6646a2e42dc5b6e8b54fb80c8699934ba 100644 --- a/modules/openapi-generator/src/main/resources/Java/libraries/jersey2/pojo.mustache +++ b/modules/openapi-generator/src/main/resources/Java/libraries/jersey2/pojo.mustache @@ -1,9 +1,9 @@ /** - * {{#description}}{{.}}{{/description}}{{^description}}{{classname}}{{/description}}{{#isDeprecated}} + * {{description}}{{^description}}{{classname}}{{/description}}{{#isDeprecated}} * @deprecated{{/isDeprecated}} */{{#isDeprecated}} @Deprecated{{/isDeprecated}}{{#description}} -@ApiModel(description = "{{{description}}}"){{/description}} +@ApiModel(description = "{{{.}}}"){{/description}} {{#jackson}} @JsonPropertyOrder({ {{#vars}} @@ -12,7 +12,7 @@ }) {{/jackson}} {{>additionalModelTypeAnnotations}}{{>generatedAnnotation}}{{#discriminator}}{{>typeInfoAnnotation}}{{/discriminator}}{{>xmlAnnotation}} -public class {{classname}} {{#parent}}extends {{{parent}}} {{/parent}}{{#vendorExtensions.x-implements}}{{#-first}}implements {{{.}}}{{/-first}}{{^-first}}, {{{.}}}{{/-first}}{{#-last}} {{/-last}}{{/vendorExtensions.x-implements}}{ +public class {{classname}} {{#parent}}extends {{{.}}} {{/parent}}{{#vendorExtensions.x-implements}}{{#-first}}implements {{{.}}}{{/-first}}{{^-first}}, {{{.}}}{{/-first}}{{#-last}} {{/-last}}{{/vendorExtensions.x-implements}}{ {{#serializableModel}} private static final long serialVersionUID = 1L; @@ -38,21 +38,21 @@ public class {{classname}} {{#parent}}extends {{{parent}}} {{/parent}}{{#vendorE {{/jackson}} {{#withXml}} {{#isXmlAttribute}} - @XmlAttribute(name = "{{#xmlName}}{{xmlName}}{{/xmlName}}{{^xmlName}}{{baseName}}{{/xmlName}}") + @XmlAttribute(name = "{{xmlName}}{{^xmlName}}{{baseName}}{{/xmlName}}") {{/isXmlAttribute}} {{^isXmlAttribute}} {{^isContainer}} - @XmlElement({{#xmlNamespace}}namespace="{{xmlNamespace}}", {{/xmlNamespace}}name = "{{#xmlName}}{{xmlName}}{{/xmlName}}{{^xmlName}}{{baseName}}{{/xmlName}}") + @XmlElement({{#xmlNamespace}}namespace="{{.}}", {{/xmlNamespace}}name = "{{xmlName}}{{^xmlName}}{{baseName}}{{/xmlName}}") {{/isContainer}} {{#isContainer}} // Is a container wrapped={{isXmlWrapped}} {{#items}} // items.name={{name}} items.baseName={{baseName}} items.xmlName={{xmlName}} items.xmlNamespace={{xmlNamespace}} // items.example={{example}} items.type={{dataType}} - @XmlElement({{#xmlNamespace}}namespace="{{xmlNamespace}}", {{/xmlNamespace}}name = "{{#xmlName}}{{xmlName}}{{/xmlName}}{{^xmlName}}{{baseName}}{{/xmlName}}") + @XmlElement({{#xmlNamespace}}namespace="{{.}}", {{/xmlNamespace}}name = "{{xmlName}}{{^xmlName}}{{baseName}}{{/xmlName}}") {{/items}} {{#isXmlWrapped}} - @XmlElementWrapper({{#xmlNamespace}}namespace="{{xmlNamespace}}", {{/xmlNamespace}}name = "{{#xmlName}}{{xmlName}}{{/xmlName}}{{^xmlName}}{{baseName}}{{/xmlName}}") + @XmlElementWrapper({{#xmlNamespace}}namespace="{{.}}", {{/xmlNamespace}}name = "{{xmlName}}{{^xmlName}}{{baseName}}{{/xmlName}}") {{/isXmlWrapped}} {{/isContainer}} {{/isXmlAttribute}} @@ -177,16 +177,16 @@ public class {{classname}} {{#parent}}extends {{{parent}}} {{/parent}}{{#vendorE {{/isReadOnly}} /** {{#description}} - * {{description}} + * {{.}} {{/description}} {{^description}} * Get {{name}} {{/description}} {{#minimum}} - * minimum: {{minimum}} + * minimum: {{.}} {{/minimum}} {{#maximum}} - * maximum: {{maximum}} + * maximum: {{.}} {{/maximum}} * @return {{name}} {{#deprecated}} @@ -207,7 +207,7 @@ public class {{classname}} {{#parent}}extends {{{parent}}} {{/parent}}{{#vendorE {{^required}} @javax.annotation.Nullable {{/required}} -{{#useBeanValidation}}{{>beanValidation}}{{/useBeanValidation}} @ApiModelProperty({{#example}}example = "{{{example}}}", {{/example}}{{#required}}required = {{required}}, {{/required}}value = "{{{description}}}") +{{#useBeanValidation}}{{>beanValidation}}{{/useBeanValidation}} @ApiModelProperty({{#example}}example = "{{{.}}}", {{/example}}{{#required}}required = {{required}}, {{/required}}value = "{{{description}}}") {{#vendorExtensions.x-extra-annotation}} {{{vendorExtensions.x-extra-annotation}}} {{/vendorExtensions.x-extra-annotation}} diff --git a/modules/openapi-generator/src/main/resources/Java/libraries/microprofile/README.mustache b/modules/openapi-generator/src/main/resources/Java/libraries/microprofile/README.mustache index 8d126ada313b5938bcab2fdd98297c3a7c54c53e..58d2d5f5c18c11d724ed1c6643f328c2b1735141 100644 --- a/modules/openapi-generator/src/main/resources/Java/libraries/microprofile/README.mustache +++ b/modules/openapi-generator/src/main/resources/Java/libraries/microprofile/README.mustache @@ -1,7 +1,7 @@ # {{appName}} - MicroProfile Rest Client {{#appDescriptionWithNewLines}} -{{{appDescriptionWithNewLines}}} +{{{.}}} {{/appDescriptionWithNewLines}} ## Overview diff --git a/modules/openapi-generator/src/main/resources/Java/libraries/microprofile/api.mustache b/modules/openapi-generator/src/main/resources/Java/libraries/microprofile/api.mustache index a13427c6965ba50396a7c1832332233e72a142d6..175467a4a981a870f249b1f7b31be67d9bb89fa6 100644 --- a/modules/openapi-generator/src/main/resources/Java/libraries/microprofile/api.mustache +++ b/modules/openapi-generator/src/main/resources/Java/libraries/microprofile/api.mustache @@ -23,7 +23,7 @@ import org.eclipse.microprofile.rest.client.inject.RegisterRestClient; * {{{appName}}} * {{#appDescription}} - * <p>{{{appDescription}}} + * <p>{{{.}}} * {{/appDescription}} */ @@ -41,7 +41,7 @@ public interface {{classname}} { * {{summary}} * {{#notes}} - * {{notes}} + * {{.}} * {{/notes}} {{#isDeprecated}} @@ -60,8 +60,7 @@ public interface {{classname}} { {{#hasProduces}} @Produces({ {{#produces}}"{{{mediaType}}}"{{^-last}}, {{/-last}}{{/produces}} }) {{/hasProduces}} - public {{#returnType}}{{{returnType}}}{{/returnType}}{{^returnType}}void{{/returnType}} {{nickname}}({{#allParams}}{{>queryParams}}{{>pathParams}}{{>headerParams}}{{>bodyParams}}{{>formParams}}{{^-last}}, {{/-last}}{{/allParams}}) throws ApiException, ProcessingException; + public {{{returnType}}}{{^returnType}}void{{/returnType}} {{nickname}}({{#allParams}}{{>queryParams}}{{>pathParams}}{{>headerParams}}{{>bodyParams}}{{>formParams}}{{^-last}}, {{/-last}}{{/allParams}}) throws ApiException, ProcessingException; {{/operation}} } {{/operations}} - diff --git a/modules/openapi-generator/src/main/resources/Java/libraries/microprofile/api_test.mustache b/modules/openapi-generator/src/main/resources/Java/libraries/microprofile/api_test.mustache index e0ed40ef88bae18f65d209f705cfbb82752809e3..43b5285b9674c6d64bfc26172e5f5181d0605c2c 100644 --- a/modules/openapi-generator/src/main/resources/Java/libraries/microprofile/api_test.mustache +++ b/modules/openapi-generator/src/main/resources/Java/libraries/microprofile/api_test.mustache @@ -23,10 +23,10 @@ import java.util.Map; /** {{#appName}} - * {{{appName}}} Test + * {{{.}}} Test * {{/appName}} - * API tests for {{classname}} + * API tests for {{classname}} */ {{#generateSpringBootApplication}} @RunWith(SpringJUnit4ClassRunner.class) @@ -38,7 +38,7 @@ public class {{classname}}Test { private {{classname}} client; private String baseUrl = "http://localhost:9080"; - + @Before public void setup() throws MalformedURLException { client = RestClientBuilder.newBuilder() @@ -53,7 +53,7 @@ public class {{classname}}Test { * {{summary}} * {{#notes}} - * {{notes}} + * {{.}} * {{/notes}} {{/summary}} @@ -66,10 +66,10 @@ public class {{classname}}Test { {{#allParams}} {{^isFile}}{{{dataType}}} {{paramName}} = null;{{/isFile}}{{#isFile}}org.apache.cxf.jaxrs.ext.multipart.Attachment {{paramName}} = null;{{/isFile}} {{/allParams}} - //{{#returnType}}{{{returnType}}} response = {{/returnType}}api.{{operationId}}({{#allParams}}{{paramName}}{{^-last}}, {{/-last}}{{/allParams}}); + //{{#returnType}}{{{.}}} response = {{/returnType}}api.{{operationId}}({{#allParams}}{{paramName}}{{^-last}}, {{/-last}}{{/allParams}}); //{{#returnType}}assertNotNull(response);{{/returnType}} - - + + } {{/operation}}{{/operations}} } diff --git a/modules/openapi-generator/src/main/resources/Java/libraries/microprofile/beanValidationCore.mustache b/modules/openapi-generator/src/main/resources/Java/libraries/microprofile/beanValidationCore.mustache index 8bcdce3df16e4d24b37f84b141d443b91282e51c..b58f0a2663113e43ee6ee7a1c4e01f588ba84f0e 100644 --- a/modules/openapi-generator/src/main/resources/Java/libraries/microprofile/beanValidationCore.mustache +++ b/modules/openapi-generator/src/main/resources/Java/libraries/microprofile/beanValidationCore.mustache @@ -1,20 +1,20 @@ -{{#pattern}} @Pattern(regexp="{{{pattern}}}"){{/pattern}}{{! +{{#pattern}} @Pattern(regexp="{{{.}}}"){{/pattern}}{{! minLength && maxLength set }}{{#minLength}}{{#maxLength}} @Size(min={{minLength}},max={{maxLength}}){{/maxLength}}{{/minLength}}{{! minLength set, maxLength not }}{{#minLength}}{{^maxLength}} @Size(min={{minLength}}){{/maxLength}}{{/minLength}}{{! minLength not set, maxLength set -}}{{^minLength}}{{#maxLength}} @Size(max={{maxLength}}){{/maxLength}}{{/minLength}}{{! +}}{{^minLength}}{{#maxLength}} @Size(max={{.}}){{/maxLength}}{{/minLength}}{{! @Size: minItems && maxItems set }}{{#minItems}}{{#maxItems}} @Size(min={{minItems}},max={{maxItems}}){{/maxItems}}{{/minItems}}{{! @Size: minItems set, maxItems not }}{{#minItems}}{{^maxItems}} @Size(min={{minItems}}){{/maxItems}}{{/minItems}}{{! @Size: minItems not set && maxItems set -}}{{^minItems}}{{#maxItems}} @Size(max={{maxItems}}){{/maxItems}}{{/minItems}}{{! +}}{{^minItems}}{{#maxItems}} @Size(max={{.}}){{/maxItems}}{{/minItems}}{{! check for integer or long / all others=decimal type with @Decimal* isInteger set -}}{{#isInteger}}{{#minimum}} @Min({{minimum}}){{/minimum}}{{#maximum}} @Max({{maximum}}){{/maximum}}{{/isInteger}}{{! +}}{{#isInteger}}{{#minimum}} @Min({{.}}){{/minimum}}{{#maximum}} @Max({{.}}){{/maximum}}{{/isInteger}}{{! isLong set -}}{{#isLong}}{{#minimum}} @Min({{minimum}}L){{/minimum}}{{#maximum}} @Max({{maximum}}L){{/maximum}}{{/isLong}}{{! +}}{{#isLong}}{{#minimum}} @Min({{.}}L){{/minimum}}{{#maximum}} @Max({{.}}L){{/maximum}}{{/isLong}}{{! Not Integer, not Long => we have a decimal value! -}}{{^isInteger}}{{^isLong}}{{#minimum}} @DecimalMin("{{minimum}}"){{/minimum}}{{#maximum}} @DecimalMax("{{maximum}}"){{/maximum}}{{/isLong}}{{/isInteger}} \ No newline at end of file +}}{{^isInteger}}{{^isLong}}{{#minimum}} @DecimalMin("{{.}}"){{/minimum}}{{#maximum}} @DecimalMax("{{.}}"){{/maximum}}{{/isLong}}{{/isInteger}} \ No newline at end of file diff --git a/modules/openapi-generator/src/main/resources/Java/libraries/microprofile/beanValidationHeaderParams.mustache b/modules/openapi-generator/src/main/resources/Java/libraries/microprofile/beanValidationHeaderParams.mustache index f8eef8f94c7bea30e95938e16cc856b53036d82b..c4ff01d7e5526b8718f1385ee9416523e0d1c860 100644 --- a/modules/openapi-generator/src/main/resources/Java/libraries/microprofile/beanValidationHeaderParams.mustache +++ b/modules/openapi-generator/src/main/resources/Java/libraries/microprofile/beanValidationHeaderParams.mustache @@ -1 +1 @@ -{{#required}} @NotNull{{/required}}{{>beanValidationCore}} \ No newline at end of file +{{#required}} @NotNull{{/required}}{{>beanValidationCore}} \ No newline at end of file diff --git a/modules/openapi-generator/src/main/resources/Java/libraries/microprofile/beanValidationQueryParams.mustache b/modules/openapi-generator/src/main/resources/Java/libraries/microprofile/beanValidationQueryParams.mustache index f8eef8f94c7bea30e95938e16cc856b53036d82b..c4ff01d7e5526b8718f1385ee9416523e0d1c860 100644 --- a/modules/openapi-generator/src/main/resources/Java/libraries/microprofile/beanValidationQueryParams.mustache +++ b/modules/openapi-generator/src/main/resources/Java/libraries/microprofile/beanValidationQueryParams.mustache @@ -1 +1 @@ -{{#required}} @NotNull{{/required}}{{>beanValidationCore}} \ No newline at end of file +{{#required}} @NotNull{{/required}}{{>beanValidationCore}} \ No newline at end of file diff --git a/modules/openapi-generator/src/main/resources/Java/libraries/microprofile/enumClass.mustache b/modules/openapi-generator/src/main/resources/Java/libraries/microprofile/enumClass.mustache index 87d5ee699a541022492bb1b022553cdedae6ec98..38127a63741e3b80714fb1a1096e503573cb651c 100644 --- a/modules/openapi-generator/src/main/resources/Java/libraries/microprofile/enumClass.mustache +++ b/modules/openapi-generator/src/main/resources/Java/libraries/microprofile/enumClass.mustache @@ -13,7 +13,7 @@ {{#enumVars}}@XmlEnumValue({{#isInteger}}"{{/isInteger}}{{#isDouble}}"{{/isDouble}}{{#isLong}}"{{/isLong}}{{#isFloat}}"{{/isFloat}}{{{value}}}{{#isInteger}}"{{/isInteger}}{{#isDouble}}"{{/isDouble}}{{#isLong}}"{{/isLong}}{{#isFloat}}"{{/isFloat}}) {{name}}({{dataType}}.valueOf({{{value}}})){{^-last}}, {{/-last}}{{#-last}};{{/-last}}{{/enumVars}} {{/withXml}} {{^withXml}} - {{#enumVars}}{{name}}({{dataType}}.valueOf({{{value}}})){{^-last}}, {{/-last}}{{#-last}};{{/-last}}{{/enumVars}} + {{#enumVars}}{{name}}({{dataType}}.valueOf({{{value}}})){{^-last}}, {{/-last}}{{#-last}};{{/-last}}{{/enumVars}} {{/withXml}} {{/allowableValues}} @@ -35,7 +35,7 @@ {{#withXml}} public static {{datatypeWithEnum}} fromValue(String v) { - for ({{#datatypeWithEnum}}{{{.}}}{{/datatypeWithEnum}}{{^datatypeWithEnum}}{{{classname}}}{{/datatypeWithEnum}} b : {{#datatypeWithEnum}}{{{.}}}{{/datatypeWithEnum}}{{^datatypeWithEnum}}{{{classname}}}{{/datatypeWithEnum}}.values()) { + for ({{{datatypeWithEnum}}}{{^datatypeWithEnum}}{{{classname}}}{{/datatypeWithEnum}} b : {{{datatypeWithEnum}}}{{^datatypeWithEnum}}{{{classname}}}{{/datatypeWithEnum}}.values()) { if (String.valueOf(b.value).equals(v)) { return b; } @@ -47,7 +47,7 @@ public static final class Deserializer implements JsonbDeserializer<{{datatypeWithEnum}}> { @Override public {{datatypeWithEnum}} deserialize(JsonParser parser, DeserializationContext ctx, Type rtType) { - for ({{#datatypeWithEnum}}{{{.}}}{{/datatypeWithEnum}}{{^datatypeWithEnum}}{{{classname}}}{{/datatypeWithEnum}} b : {{#datatypeWithEnum}}{{{.}}}{{/datatypeWithEnum}}{{^datatypeWithEnum}}{{{classname}}}{{/datatypeWithEnum}}.values()) { + for ({{{datatypeWithEnum}}}{{^datatypeWithEnum}}{{{classname}}}{{/datatypeWithEnum}} b : {{{datatypeWithEnum}}}{{^datatypeWithEnum}}{{{classname}}}{{/datatypeWithEnum}}.values()) { if (String.valueOf(b.value).equals(parser.getString())) { return b; } diff --git a/modules/openapi-generator/src/main/resources/Java/libraries/microprofile/enumOuterClass.mustache b/modules/openapi-generator/src/main/resources/Java/libraries/microprofile/enumOuterClass.mustache index c56eca64b1e581840643e908e71022d32422d386..894ce951f389afe4cc8bca4ab2358203ff8cb4d8 100644 --- a/modules/openapi-generator/src/main/resources/Java/libraries/microprofile/enumOuterClass.mustache +++ b/modules/openapi-generator/src/main/resources/Java/libraries/microprofile/enumOuterClass.mustache @@ -4,9 +4,9 @@ import com.fasterxml.jackson.annotation.JsonValue; {{/jackson}} /** - * {{^description}}Gets or Sets {{{name}}}{{/description}}{{#description}}{{description}}{{/description}} + * {{description}}{{^description}}Gets or Sets {{{name}}}{{/description}} */ -{{>additionalEnumTypeAnnotations}}public enum {{#datatypeWithEnum}}{{{.}}}{{/datatypeWithEnum}}{{^datatypeWithEnum}}{{{classname}}}{{/datatypeWithEnum}} { +{{>additionalEnumTypeAnnotations}}public enum {{{datatypeWithEnum}}}{{^datatypeWithEnum}}{{{classname}}}{{/datatypeWithEnum}} { {{#gson}} {{#allowableValues}}{{#enumVars}} @SerializedName({{#isInteger}}"{{/isInteger}}{{#isDouble}}"{{/isDouble}}{{#isLong}}"{{/isLong}}{{#isFloat}}"{{/isFloat}}{{{value}}}{{#isInteger}}"{{/isInteger}}{{#isDouble}}"{{/isDouble}}{{#isLong}}"{{/isLong}}{{#isFloat}}"{{/isFloat}}) @@ -21,14 +21,14 @@ import com.fasterxml.jackson.annotation.JsonValue; private {{{dataType}}} value; - {{#datatypeWithEnum}}{{{.}}}{{/datatypeWithEnum}}{{^datatypeWithEnum}}{{{classname}}}{{/datatypeWithEnum}}({{{dataType}}} value) { + {{{datatypeWithEnum}}}{{^datatypeWithEnum}}{{{classname}}}{{/datatypeWithEnum}}({{{dataType}}} value) { this.value = value; } @Override {{#jackson}} @JsonValue -{{/jackson}} +{{/jackson}} public String toString() { return String.valueOf(value); } @@ -36,13 +36,13 @@ import com.fasterxml.jackson.annotation.JsonValue; {{#jackson}} @JsonCreator {{/jackson}} - public static {{#datatypeWithEnum}}{{{.}}}{{/datatypeWithEnum}}{{^datatypeWithEnum}}{{{classname}}}{{/datatypeWithEnum}} fromValue(String text) { - for ({{#datatypeWithEnum}}{{{.}}}{{/datatypeWithEnum}}{{^datatypeWithEnum}}{{{classname}}}{{/datatypeWithEnum}} b : {{#datatypeWithEnum}}{{{.}}}{{/datatypeWithEnum}}{{^datatypeWithEnum}}{{{classname}}}{{/datatypeWithEnum}}.values()) { + public static {{{datatypeWithEnum}}}{{^datatypeWithEnum}}{{{classname}}}{{/datatypeWithEnum}} fromValue(String text) { + for ({{{datatypeWithEnum}}}{{^datatypeWithEnum}}{{{classname}}}{{/datatypeWithEnum}} b : {{{datatypeWithEnum}}}{{^datatypeWithEnum}}{{{classname}}}{{/datatypeWithEnum}}.values()) { if (String.valueOf(b.value).equals(text)) { return b; } } {{#useNullForUnknownEnumValue}}return null;{{/useNullForUnknownEnumValue}}{{^useNullForUnknownEnumValue}}throw new IllegalArgumentException("Unexpected value '" + text + "'");{{/useNullForUnknownEnumValue}} } - + } 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 9866f297a4d7e43b6e321965c75edff6e152b50a..be193d0c4fe807d927a4e2a2329b5c615954608c 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 @@ -2,8 +2,8 @@ * {{{appName}}} * {{{appDescription}}} * - * {{#version}}The version of the OpenAPI document: {{{version}}}{{/version}} - * {{#infoEmail}}Contact: {{{infoEmail}}}{{/infoEmail}} + * {{#version}}The version of the OpenAPI document: {{{.}}}{{/version}} + * {{#infoEmail}}Contact: {{{.}}}{{/infoEmail}} * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech diff --git a/modules/openapi-generator/src/main/resources/Java/libraries/microprofile/pojo.mustache b/modules/openapi-generator/src/main/resources/Java/libraries/microprofile/pojo.mustache index 183b60cc1ac1c7e53c4bb56b9fc2f24dd02847f6..13413bd16a00110e84c060ebc97bcf56531226f1 100644 --- a/modules/openapi-generator/src/main/resources/Java/libraries/microprofile/pojo.mustache +++ b/modules/openapi-generator/src/main/resources/Java/libraries/microprofile/pojo.mustache @@ -30,11 +30,11 @@ import javax.json.bind.annotation.JsonbProperty; {{/withXml}} {{#description}} /** - * {{{description}}} + * {{{.}}} **/ {{/description}} {{>additionalModelTypeAnnotations}} -public class {{classname}} {{#parent}}extends {{{parent}}}{{/parent}}{{#serializableModel}} implements Serializable{{/serializableModel}} { +public class {{classname}} {{#parent}}extends {{{.}}}{{/parent}}{{#serializableModel}} implements Serializable{{/serializableModel}} { {{#vars}}{{#isEnum}}{{^isContainer}} {{>enumClass}}{{/isContainer}}{{#isContainer}}{{#mostInnerItems}} {{>enumClass}}{{/mostInnerItems}}{{/isContainer}}{{/isEnum}} @@ -43,7 +43,7 @@ public class {{classname}} {{#parent}}extends {{{parent}}}{{/parent}}{{#serializ {{/withXml}} {{#description}} /** - * {{{description}}} + * {{{.}}} **/ {{/description}} {{^withXml}} @@ -56,20 +56,20 @@ public class {{classname}} {{#parent}}extends {{{parent}}}{{/parent}}{{#serializ private {{{datatypeWithEnum}}} {{name}}{{#defaultValue}} = {{{.}}}{{/defaultValue}}; {{/isContainer}} {{/vars}} - + {{#vars}} /** {{#description}} - * {{description}} + * {{.}} {{/description}} {{^description}} * Get {{name}} {{/description}} {{#minimum}} - * minimum: {{minimum}} + * minimum: {{.}} {{/minimum}} {{#maximum}} - * maximum: {{maximum}} + * maximum: {{.}} {{/maximum}} * @return {{name}} {{#deprecated}} 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 b43a110aed7b31a5700f1790d528fbca3a7e059e..d1a4e5352dce5b63351a23eba82347acd5a43c5e 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 @@ -5,7 +5,7 @@ <packaging>jar</packaging> <name>{{artifactId}}</name> {{#appDescription}} - <description>{{appDescription}}</description> + <description>{{.}}</description> {{/appDescription}} <version>{{artifactVersion}}</version> <build> @@ -125,7 +125,7 @@ <artifactId>activation</artifactId> <version>1.1.1</version> </dependency> - + {{#java8}} <dependency> <groupId>com.fasterxml.jackson.datatype</groupId> @@ -140,7 +140,7 @@ <version>${jackson-jaxrs-version}</version> </dependency> {{/java8}} -{{#useBeanValidationFeature}} +{{#useBeanValidationFeature}} <dependency> <groupId>org.hibernate</groupId> <artifactId>hibernate-validator</artifactId> diff --git a/modules/openapi-generator/src/main/resources/Java/libraries/microprofile/queryParams.mustache b/modules/openapi-generator/src/main/resources/Java/libraries/microprofile/queryParams.mustache index f89529fdb5dd8d3084933e37767a9f0b188faa18..38bfb9ed06e7b3707c43d7d118c5a6c153549630 100644 --- a/modules/openapi-generator/src/main/resources/Java/libraries/microprofile/queryParams.mustache +++ b/modules/openapi-generator/src/main/resources/Java/libraries/microprofile/queryParams.mustache @@ -1 +1 @@ -{{#isQueryParam}}@QueryParam("{{baseName}}"){{#useBeanValidation}}{{>beanValidationQueryParams}}{{/useBeanValidation}} {{^isContainer}}{{#defaultValue}}@DefaultValue("{{{defaultValue}}}") {{/defaultValue}}{{/isContainer}}{{{dataType}}} {{paramName}}{{/isQueryParam}} \ No newline at end of file +{{#isQueryParam}}@QueryParam("{{baseName}}"){{#useBeanValidation}}{{>beanValidationQueryParams}}{{/useBeanValidation}} {{^isContainer}}{{#defaultValue}}@DefaultValue("{{{.}}}") {{/defaultValue}}{{/isContainer}}{{{dataType}}} {{paramName}}{{/isQueryParam}} \ No newline at end of file diff --git a/modules/openapi-generator/src/main/resources/Java/libraries/microprofile/returnTypes.mustache b/modules/openapi-generator/src/main/resources/Java/libraries/microprofile/returnTypes.mustache index 6af86ffe4e4a3fedc80723d298519f01aef75c87..32f96a904720b5d388713d23dbc0d9ee7eff8dce 100644 --- a/modules/openapi-generator/src/main/resources/Java/libraries/microprofile/returnTypes.mustache +++ b/modules/openapi-generator/src/main/resources/Java/libraries/microprofile/returnTypes.mustache @@ -1,4 +1,4 @@ -{{#useGenericResponse}}Response{{/useGenericResponse}}{{! non-generic response: +{{#useGenericResponse}}Response{{/useGenericResponse}}{{! non-generic response: }}{{^useGenericResponse}}{{! }}{{{returnType}}}{{! }}{{/useGenericResponse}} \ No newline at end of file diff --git a/modules/openapi-generator/src/main/resources/Java/libraries/native/ApiClient.mustache b/modules/openapi-generator/src/main/resources/Java/libraries/native/ApiClient.mustache index ea46db7331d29da2a72d8a842e8f74fac484a80d..07ca3588724797541359a5087799ba7655aa2a5c 100644 --- a/modules/openapi-generator/src/main/resources/Java/libraries/native/ApiClient.mustache +++ b/modules/openapi-generator/src/main/resources/Java/libraries/native/ApiClient.mustache @@ -375,7 +375,7 @@ public class ApiClient { this.readTimeout = readTimeout; return this; } - + /** * Get the read timeout that was set. * diff --git a/modules/openapi-generator/src/main/resources/Java/libraries/native/ApiResponse.mustache b/modules/openapi-generator/src/main/resources/Java/libraries/native/ApiResponse.mustache index 1f3f3a31981b8c0beb2f35b1a53c86c3aa6a11e6..1e277319a9367bdf3e001ceee25da9ad5264aae6 100644 --- a/modules/openapi-generator/src/main/resources/Java/libraries/native/ApiResponse.mustache +++ b/modules/openapi-generator/src/main/resources/Java/libraries/native/ApiResponse.mustache @@ -5,7 +5,7 @@ package {{invokerPackage}}; import java.util.List; import java.util.Map; {{#caseInsensitiveResponseHeaders}} -import java.util.Map.Entry; +import java.util.Map.Entry; import java.util.TreeMap; {{/caseInsensitiveResponseHeaders}} diff --git a/modules/openapi-generator/src/main/resources/Java/libraries/native/README.mustache b/modules/openapi-generator/src/main/resources/Java/libraries/native/README.mustache index 0f6d46a460bd60f31209223047fda59019808910..ef15f379a13c4ad7c3274b7d168e8337e24d179a 100644 --- a/modules/openapi-generator/src/main/resources/Java/libraries/native/README.mustache +++ b/modules/openapi-generator/src/main/resources/Java/libraries/native/README.mustache @@ -8,7 +8,7 @@ - Build date: {{generatedDate}} {{/hideGenerationTimestamp}} -{{#appDescriptionWithNewLines}}{{{appDescriptionWithNewLines}}}{{/appDescriptionWithNewLines}} +{{{appDescriptionWithNewLines}}} {{#infoUrl}} For more information, please visit [{{{infoUrl}}}]({{{infoUrl}}}) @@ -130,8 +130,8 @@ All URIs are relative to *{{basePath}}* Class | Method | HTTP request | Description ------------ | ------------- | ------------- | ------------- -{{#apiInfo}}{{#apis}}{{#operations}}{{#operation}}*{{classname}}* | [**{{operationId}}**]({{apiDocPath}}{{classname}}.md#{{operationId}}) | **{{httpMethod}}** {{path}} | {{#summary}}{{summary}}{{/summary}} -*{{classname}}* | [**{{operationId}}WithHttpInfo**]({{apiDocPath}}{{classname}}.md#{{operationId}}WithHttpInfo) | **{{httpMethod}}** {{path}} | {{#summary}}{{summary}}{{/summary}} +{{#apiInfo}}{{#apis}}{{#operations}}{{#operation}}*{{classname}}* | [**{{operationId}}**]({{apiDocPath}}{{classname}}.md#{{operationId}}) | **{{httpMethod}}** {{path}} | {{summary}} +*{{classname}}* | [**{{operationId}}WithHttpInfo**]({{apiDocPath}}{{classname}}.md#{{operationId}}WithHttpInfo) | **{{httpMethod}}** {{path}} | {{summary}} {{/operation}}{{/operations}}{{/apis}}{{/apiInfo}} ## Documentation for Models diff --git a/modules/openapi-generator/src/main/resources/Java/libraries/native/api.mustache b/modules/openapi-generator/src/main/resources/Java/libraries/native/api.mustache index 35922945360a75adbc7498d90ef1d96df0ef7c62..b57129dcdb255aaa7bd2b1d361bd0a811cb3bdc9 100644 --- a/modules/openapi-generator/src/main/resources/Java/libraries/native/api.mustache +++ b/modules/openapi-generator/src/main/resources/Java/libraries/native/api.mustache @@ -111,7 +111,7 @@ public class {{classname}} { * {{summary}} * {{notes}} * @param apiRequest {@link API{{operationId}}Request} - * @return {{#asyncNative}}CompletableFuture<{{/asyncNative}}ApiResponse<{{#returnType}}{{returnType}}{{/returnType}}{{^returnType}}Void{{/returnType}}>{{#asyncNative}}>{{/asyncNative}} + * @return {{#asyncNative}}CompletableFuture<{{/asyncNative}}ApiResponse<{{returnType}}{{^returnType}}Void{{/returnType}}>{{#asyncNative}}>{{/asyncNative}} * @throws ApiException if fails to make API call {{#isDeprecated}} * @deprecated @@ -124,7 +124,7 @@ public class {{classname}} { {{#isDeprecated}} @Deprecated {{/isDeprecated}} - public {{#asyncNative}}CompletableFuture<{{/asyncNative}}ApiResponse<{{#returnType}}{{{returnType}}}{{/returnType}}{{^returnType}}Void{{/returnType}}>{{#asyncNative}}>{{/asyncNative}} {{operationId}}WithHttpInfo(API{{operationId}}Request apiRequest) throws ApiException { + public {{#asyncNative}}CompletableFuture<{{/asyncNative}}ApiResponse<{{{returnType}}}{{^returnType}}Void{{/returnType}}>{{#asyncNative}}>{{/asyncNative}} {{operationId}}WithHttpInfo(API{{operationId}}Request apiRequest) throws ApiException { {{#allParams}} {{{dataType}}} {{paramName}} = apiRequest.{{paramName}}(); {{/allParams}} @@ -156,7 +156,7 @@ public class {{classname}} { {{/isDeprecated}} public {{#returnType}}{{#asyncNative}}CompletableFuture<{{{returnType}}}>{{/asyncNative}}{{^asyncNative}}{{{returnType}}}{{/asyncNative}}{{/returnType}}{{^returnType}}{{#asyncNative}}CompletableFuture<Void>{{/asyncNative}}{{^asyncNative}}void{{/asyncNative}}{{/returnType}} {{operationId}}({{#allParams}}{{{dataType}}} {{paramName}}{{^-last}}, {{/-last}}{{/allParams}}) throws ApiException { {{^asyncNative}} - {{#returnType}}ApiResponse<{{{returnType}}}> localVarResponse = {{/returnType}}{{operationId}}WithHttpInfo({{#allParams}}{{paramName}}{{^-last}}, {{/-last}}{{/allParams}}); + {{#returnType}}ApiResponse<{{{.}}}> localVarResponse = {{/returnType}}{{operationId}}WithHttpInfo({{#allParams}}{{paramName}}{{^-last}}, {{/-last}}{{/allParams}}); {{#returnType}} return localVarResponse.getData(); {{/returnType}} @@ -196,7 +196,7 @@ public class {{classname}} { {{#allParams}} * @param {{paramName}} {{description}}{{#required}} (required){{/required}}{{^required}} (optional{{^isContainer}}{{#defaultValue}}, default to {{.}}{{/defaultValue}}){{/isContainer}}{{/required}} {{/allParams}} - * @return {{#asyncNative}}CompletableFuture<{{/asyncNative}}ApiResponse<{{#returnType}}{{returnType}}{{/returnType}}{{^returnType}}Void{{/returnType}}>{{#asyncNative}}>{{/asyncNative}} + * @return {{#asyncNative}}CompletableFuture<{{/asyncNative}}ApiResponse<{{returnType}}{{^returnType}}Void{{/returnType}}>{{#asyncNative}}>{{/asyncNative}} * @throws ApiException if fails to make API call {{#isDeprecated}} * @deprecated @@ -209,7 +209,7 @@ public class {{classname}} { {{#isDeprecated}} @Deprecated {{/isDeprecated}} - public {{#asyncNative}}CompletableFuture<{{/asyncNative}}ApiResponse<{{#returnType}}{{{returnType}}}{{/returnType}}{{^returnType}}Void{{/returnType}}>{{#asyncNative}}>{{/asyncNative}} {{operationId}}WithHttpInfo({{#allParams}}{{{dataType}}} {{paramName}}{{^-last}}, {{/-last}}{{/allParams}}) throws ApiException { + public {{#asyncNative}}CompletableFuture<{{/asyncNative}}ApiResponse<{{{returnType}}}{{^returnType}}Void{{/returnType}}>{{#asyncNative}}>{{/asyncNative}} {{operationId}}WithHttpInfo({{#allParams}}{{{dataType}}} {{paramName}}{{^-last}}, {{/-last}}{{/allParams}}) throws ApiException { {{^asyncNative}} HttpRequest.Builder localVarRequestBuilder = {{operationId}}RequestBuilder({{#allParams}}{{paramName}}{{^-last}}, {{/-last}}{{/allParams}}); try { @@ -222,7 +222,7 @@ public class {{classname}} { if (localVarResponse.statusCode()/ 100 != 2) { throw getApiException("{{operationId}}", localVarResponse); } - return new ApiResponse<{{#returnType}}{{{returnType}}}{{/returnType}}{{^returnType}}Void{{/returnType}}>( + return new ApiResponse<{{{returnType}}}{{^returnType}}Void{{/returnType}}>( localVarResponse.statusCode(), localVarResponse.headers().map(), {{#returnType}}memberVarObjectMapper.readValue(localVarResponse.body(), new TypeReference<{{{returnType}}}>() {}){{/returnType}}{{^returnType}}null{{/returnType}} diff --git a/modules/openapi-generator/src/main/resources/Java/libraries/native/api_doc.mustache b/modules/openapi-generator/src/main/resources/Java/libraries/native/api_doc.mustache index 23473757c364aae08d4a7fbf220d886909268242..3af38b33137f5d7d9d6a048d0208d4c8aacfe9d8 100644 --- a/modules/openapi-generator/src/main/resources/Java/libraries/native/api_doc.mustache +++ b/modules/openapi-generator/src/main/resources/Java/libraries/native/api_doc.mustache @@ -1,13 +1,13 @@ # {{classname}}{{#description}} -{{description}}{{/description}} +{{.}}{{/description}} All URIs are relative to *{{basePath}}* Method | HTTP request | Description ------------- | ------------- | ------------- -{{#operations}}{{#operation}}[**{{operationId}}**]({{classname}}.md#{{operationId}}) | **{{httpMethod}}** {{path}} | {{#summary}}{{summary}}{{/summary}} -[**{{operationId}}WithHttpInfo**]({{classname}}.md#{{operationId}}WithHttpInfo) | **{{httpMethod}}** {{path}} | {{#summary}}{{summary}}{{/summary}} +{{#operations}}{{#operation}}[**{{operationId}}**]({{classname}}.md#{{operationId}}) | **{{httpMethod}}** {{path}} | {{summary}} +[**{{operationId}}WithHttpInfo**]({{classname}}.md#{{operationId}}WithHttpInfo) | **{{httpMethod}}** {{path}} | {{summary}} {{/operation}}{{/operations}} {{#operations}} @@ -24,7 +24,7 @@ Method | HTTP request | Description {{summary}}{{#notes}} -{{notes}}{{/notes}} +{{.}}{{/notes}} ### Example @@ -100,7 +100,7 @@ public class Example { {{^allParams}}This endpoint does not need any parameter.{{/allParams}}{{^vendorExtensions.x-group-parameters}}{{#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}} **{{paramName}}** | {{#isPrimitiveType}}**{{dataType}}**{{/isPrimitiveType}}{{^isPrimitiveType}}{{#isFile}}**{{dataType}}**{{/isFile}}{{^isFile}}[**{{dataType}}**]({{baseType}}.md){{/isFile}}{{/isPrimitiveType}}| {{description}} |{{^required}} [optional]{{/required}}{{^isContainer}}{{#defaultValue}} [default to {{.}}]{{/defaultValue}}{{/isContainer}}{{#allowableValues}} [enum: {{#values}}{{{.}}}{{^-last}}, {{/-last}}{{/values}}]{{/allowableValues}} {{/allParams}} {{/vendorExtensions.x-group-parameters}} {{#vendorExtensions.x-group-parameters}} @@ -136,15 +136,15 @@ Name | Type | Description | Notes ## {{operationId}}WithHttpInfo {{^vendorExtensions.x-group-parameters}} -> {{#asyncNative}}CompletableFuture<{{/asyncNative}}ApiResponse<{{#returnType}}{{{returnType}}}{{/returnType}}{{^returnType}}Void{{/returnType}}>{{#asyncNative}}>{{/asyncNative}} {{operationId}} {{operationId}}WithHttpInfo({{#allParams}}{{{paramName}}}{{^-last}}, {{/-last}}{{/allParams}}) +> {{#asyncNative}}CompletableFuture<{{/asyncNative}}ApiResponse<{{{returnType}}}{{^returnType}}Void{{/returnType}}>{{#asyncNative}}>{{/asyncNative}} {{operationId}} {{operationId}}WithHttpInfo({{#allParams}}{{{paramName}}}{{^-last}}, {{/-last}}{{/allParams}}) {{/vendorExtensions.x-group-parameters}} {{#vendorExtensions.x-group-parameters}} -> {{#asyncNative}}CompletableFuture<{{/asyncNative}}ApiResponse<{{#returnType}}{{{returnType}}}{{/returnType}}{{^returnType}}Void{{/returnType}}>{{#asyncNative}}>{{/asyncNative}} {{operationId}} {{operationId}}WithHttpInfo({{#hasParams}}{{operationId}}Request{{/hasParams}}) +> {{#asyncNative}}CompletableFuture<{{/asyncNative}}ApiResponse<{{{returnType}}}{{^returnType}}Void{{/returnType}}>{{#asyncNative}}>{{/asyncNative}} {{operationId}} {{operationId}}WithHttpInfo({{#hasParams}}{{operationId}}Request{{/hasParams}}) {{/vendorExtensions.x-group-parameters}} {{summary}}{{#notes}} -{{notes}}{{/notes}} +{{.}}{{/notes}} ### Example @@ -192,7 +192,7 @@ public class Example { {{/allParams}} try { {{^vendorExtensions.x-group-parameters}} - {{#asyncNative}}CompletableFuture<{{/asyncNative}}ApiResponse<{{#returnType}}{{{returnType}}}{{/returnType}}{{^returnType}}Void{{/returnType}}>{{#asyncNative}}>{{/asyncNative}} response = apiInstance.{{{operationId}}}WithHttpInfo({{#allParams}}{{{paramName}}}{{^-last}}, {{/-last}}{{/allParams}}); + {{#asyncNative}}CompletableFuture<{{/asyncNative}}ApiResponse<{{{returnType}}}{{^returnType}}Void{{/returnType}}>{{#asyncNative}}>{{/asyncNative}} response = apiInstance.{{{operationId}}}WithHttpInfo({{#allParams}}{{{paramName}}}{{^-last}}, {{/-last}}{{/allParams}}); {{/vendorExtensions.x-group-parameters}} {{#vendorExtensions.x-group-parameters}} {{#hasParams}} @@ -200,7 +200,7 @@ public class Example { .{{paramName}}({{paramName}}){{/allParams}} .build(); {{/hasParams}} - {{#asyncNative}}CompletableFuture<{{/asyncNative}}ApiResponse<{{#returnType}}{{{returnType}}}{{/returnType}}{{^returnType}}Void{{/returnType}}>{{#asyncNative}}>{{/asyncNative}} response = apiInstance.{{{operationId}}}WithHttpInfo({{#hasParams}}request{{/hasParams}}); + {{#asyncNative}}CompletableFuture<{{/asyncNative}}ApiResponse<{{{returnType}}}{{^returnType}}Void{{/returnType}}>{{#asyncNative}}>{{/asyncNative}} response = apiInstance.{{{operationId}}}WithHttpInfo({{#hasParams}}request{{/hasParams}}); {{/vendorExtensions.x-group-parameters}} System.out.println("Status code: " + response{{#asyncNative}}.get(){{/asyncNative}}.getStatusCode()); System.out.println("Response headers: " + response{{#asyncNative}}.get(){{/asyncNative}}.getHeaders()); @@ -232,7 +232,7 @@ public class Example { {{^allParams}}This endpoint does not need any parameter.{{/allParams}}{{^vendorExtensions.x-group-parameters}}{{#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}} **{{paramName}}** | {{#isPrimitiveType}}**{{dataType}}**{{/isPrimitiveType}}{{^isPrimitiveType}}{{#isFile}}**{{dataType}}**{{/isFile}}{{^isFile}}[**{{dataType}}**]({{baseType}}.md){{/isFile}}{{/isPrimitiveType}}| {{description}} |{{^required}} [optional]{{/required}}{{^isContainer}}{{#defaultValue}} [default to {{.}}]{{/defaultValue}}{{/isContainer}}{{#allowableValues}} [enum: {{#values}}{{{.}}}{{^-last}}, {{/-last}}{{/values}}]{{/allowableValues}} {{/allParams}} {{/vendorExtensions.x-group-parameters}} {{#vendorExtensions.x-group-parameters}} @@ -272,7 +272,7 @@ Name | Type | Description | Notes {{#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}} **{{paramName}}** | {{#isPrimitiveType}}**{{dataType}}**{{/isPrimitiveType}}{{^isPrimitiveType}}{{#isFile}}**{{dataType}}**{{/isFile}}{{^isFile}}[**{{dataType}}**]({{baseType}}.md){{/isFile}}{{/isPrimitiveType}} | {{description}} |{{^required}} [optional]{{/required}}{{^isContainer}}{{#defaultValue}} [default to {{.}}]{{/defaultValue}}{{/isContainer}}{{#allowableValues}} [enum: {{#values}}{{{.}}}{{^-last}}, {{/-last}}{{/values}}]{{/allowableValues}} {{/allParams}} {{/hasParams}}{{/vendorExtensions.x-group-parameters}} diff --git a/modules/openapi-generator/src/main/resources/Java/libraries/native/pojo.mustache b/modules/openapi-generator/src/main/resources/Java/libraries/native/pojo.mustache index 2db2da784e9cf7df706cac5fa7e4774f74be3886..20957c36c1f32a67bd4e9a123de7f08aa942840d 100644 --- a/modules/openapi-generator/src/main/resources/Java/libraries/native/pojo.mustache +++ b/modules/openapi-generator/src/main/resources/Java/libraries/native/pojo.mustache @@ -2,11 +2,11 @@ import {{invokerPackage}}.JSON; {{/discriminator}} /** - * {{#description}}{{.}}{{/description}}{{^description}}{{classname}}{{/description}}{{#isDeprecated}} + * {{description}}{{^description}}{{classname}}{{/description}}{{#isDeprecated}} * @deprecated{{/isDeprecated}} */{{#isDeprecated}} @Deprecated{{/isDeprecated}}{{#description}} -@ApiModel(description = "{{{description}}}"){{/description}} +@ApiModel(description = "{{{.}}}"){{/description}} {{#jackson}} @JsonPropertyOrder({ {{#vars}} @@ -15,7 +15,7 @@ import {{invokerPackage}}.JSON; }) {{/jackson}} {{>additionalModelTypeAnnotations}}{{>generatedAnnotation}}{{#discriminator}}{{>typeInfoAnnotation}}{{/discriminator}}{{>xmlAnnotation}} -public class {{classname}} {{#parent}}extends {{{parent}}} {{/parent}}{{#vendorExtensions.x-implements}}{{#-first}}implements {{{.}}}{{/-first}}{{^-first}}, {{{.}}}{{/-first}}{{#-last}} {{/-last}}{{/vendorExtensions.x-implements}}{ +public class {{classname}} {{#parent}}extends {{{.}}} {{/parent}}{{#vendorExtensions.x-implements}}{{#-first}}implements {{{.}}}{{/-first}}{{^-first}}, {{{.}}}{{/-first}}{{#-last}} {{/-last}}{{/vendorExtensions.x-implements}}{ {{#serializableModel}} private static final long serialVersionUID = 1L; @@ -41,21 +41,21 @@ public class {{classname}} {{#parent}}extends {{{parent}}} {{/parent}}{{#vendorE {{/jackson}} {{#withXml}} {{#isXmlAttribute}} - @XmlAttribute(name = "{{#xmlName}}{{xmlName}}{{/xmlName}}{{^xmlName}}{{baseName}}{{/xmlName}}") + @XmlAttribute(name = "{{xmlName}}{{^xmlName}}{{baseName}}{{/xmlName}}") {{/isXmlAttribute}} {{^isXmlAttribute}} {{^isContainer}} - @XmlElement({{#xmlNamespace}}namespace="{{xmlNamespace}}", {{/xmlNamespace}}name = "{{#xmlName}}{{xmlName}}{{/xmlName}}{{^xmlName}}{{baseName}}{{/xmlName}}") + @XmlElement({{#xmlNamespace}}namespace="{{.}}", {{/xmlNamespace}}name = "{{xmlName}}{{^xmlName}}{{baseName}}{{/xmlName}}") {{/isContainer}} {{#isContainer}} // Is a container wrapped={{isXmlWrapped}} {{#items}} // items.name={{name}} items.baseName={{baseName}} items.xmlName={{xmlName}} items.xmlNamespace={{xmlNamespace}} // items.example={{example}} items.type={{dataType}} - @XmlElement({{#xmlNamespace}}namespace="{{xmlNamespace}}", {{/xmlNamespace}}name = "{{#xmlName}}{{xmlName}}{{/xmlName}}{{^xmlName}}{{baseName}}{{/xmlName}}") + @XmlElement({{#xmlNamespace}}namespace="{{.}}", {{/xmlNamespace}}name = "{{xmlName}}{{^xmlName}}{{baseName}}{{/xmlName}}") {{/items}} {{#isXmlWrapped}} - @XmlElementWrapper({{#xmlNamespace}}namespace="{{xmlNamespace}}", {{/xmlNamespace}}name = "{{#xmlName}}{{xmlName}}{{/xmlName}}{{^xmlName}}{{baseName}}{{/xmlName}}") + @XmlElementWrapper({{#xmlNamespace}}namespace="{{.}}", {{/xmlNamespace}}name = "{{xmlName}}{{^xmlName}}{{baseName}}{{/xmlName}}") {{/isXmlWrapped}} {{/isContainer}} {{/isXmlAttribute}} @@ -180,16 +180,16 @@ public class {{classname}} {{#parent}}extends {{{parent}}} {{/parent}}{{#vendorE {{/isReadOnly}} /** {{#description}} - * {{description}} + * {{.}} {{/description}} {{^description}} * Get {{name}} {{/description}} {{#minimum}} - * minimum: {{minimum}} + * minimum: {{.}} {{/minimum}} {{#maximum}} - * maximum: {{maximum}} + * maximum: {{.}} {{/maximum}} * @return {{name}} {{#deprecated}} @@ -210,7 +210,7 @@ public class {{classname}} {{#parent}}extends {{{parent}}} {{/parent}}{{#vendorE {{^required}} @javax.annotation.Nullable {{/required}} -{{#useBeanValidation}}{{>beanValidation}}{{/useBeanValidation}} @ApiModelProperty({{#example}}example = "{{{example}}}", {{/example}}{{#required}}required = {{required}}, {{/required}}value = "{{{description}}}") +{{#useBeanValidation}}{{>beanValidation}}{{/useBeanValidation}} @ApiModelProperty({{#example}}example = "{{{.}}}", {{/example}}{{#required}}required = {{required}}, {{/required}}value = "{{{description}}}") {{#vendorExtensions.x-extra-annotation}} {{{vendorExtensions.x-extra-annotation}}} {{/vendorExtensions.x-extra-annotation}} diff --git a/modules/openapi-generator/src/main/resources/Java/libraries/native/travis.mustache b/modules/openapi-generator/src/main/resources/Java/libraries/native/travis.mustache index d489da682e9ece69f0a76f33dbc8975a7ddfb996..c946474792347207b7297e576471e805d4d91db8 100644 --- a/modules/openapi-generator/src/main/resources/Java/libraries/native/travis.mustache +++ b/modules/openapi-generator/src/main/resources/Java/libraries/native/travis.mustache @@ -12,5 +12,5 @@ script: - mvn test # uncomment below to test using gradle # - gradle test - # uncomment below to test using sbt + # uncomment below to test using sbt # - sbt test diff --git a/modules/openapi-generator/src/main/resources/Java/libraries/okhttp-gson/ApiClient.mustache b/modules/openapi-generator/src/main/resources/Java/libraries/okhttp-gson/ApiClient.mustache index 37ebae048308e82e5c0c083443fc8a7628ee7b19..8b47536b9e8bdf60b94719f7f3d39ecc2def7c2f 100644 --- a/modules/openapi-generator/src/main/resources/Java/libraries/okhttp-gson/ApiClient.mustache +++ b/modules/openapi-generator/src/main/resources/Java/libraries/okhttp-gson/ApiClient.mustache @@ -220,7 +220,7 @@ public class ApiClient { json = new JSON(); // Set default User-Agent. - setUserAgent("{{#httpUserAgent}}{{{.}}}{{/httpUserAgent}}{{^httpUserAgent}}OpenAPI-Generator/{{{artifactVersion}}}/java{{/httpUserAgent}}"); + setUserAgent("{{{httpUserAgent}}}{{^httpUserAgent}}OpenAPI-Generator/{{{artifactVersion}}}/java{{/httpUserAgent}}"); authentications = new HashMap<String, Authentication>(); {{#dynamicOperations}} diff --git a/modules/openapi-generator/src/main/resources/Java/libraries/okhttp-gson/ProgressResponseBody.mustache b/modules/openapi-generator/src/main/resources/Java/libraries/okhttp-gson/ProgressResponseBody.mustache index 50f2eba395a3c7d82a61f3746f92e619e21a30d3..45115940b665c198ba86baf79efe188f44da3acd 100644 --- a/modules/openapi-generator/src/main/resources/Java/libraries/okhttp-gson/ProgressResponseBody.mustache +++ b/modules/openapi-generator/src/main/resources/Java/libraries/okhttp-gson/ProgressResponseBody.mustache @@ -57,5 +57,3 @@ public class ProgressResponseBody extends ResponseBody { }; } } - - diff --git a/modules/openapi-generator/src/main/resources/Java/libraries/okhttp-gson/README.mustache b/modules/openapi-generator/src/main/resources/Java/libraries/okhttp-gson/README.mustache index 5b4ff7e38f5068679753794bdb9faae96ee7f3ee..dd21bcad45f031336d428be6e2eed288deffab1b 100644 --- a/modules/openapi-generator/src/main/resources/Java/libraries/okhttp-gson/README.mustache +++ b/modules/openapi-generator/src/main/resources/Java/libraries/okhttp-gson/README.mustache @@ -6,7 +6,7 @@ - Build date: {{generatedDate}} {{/hideGenerationTimestamp}} -{{#appDescriptionWithNewLines}}{{{appDescriptionWithNewLines}}}{{/appDescriptionWithNewLines}} +{{{appDescriptionWithNewLines}}} {{#infoUrl}} For more information, please visit [{{{infoUrl}}}]({{{infoUrl}}}) @@ -114,7 +114,7 @@ public class Example { {{{dataType}}} {{{paramName}}} = {{{example}}}; // {{{dataType}}} | {{{description}}} {{/allParams}} try { - {{#returnType}}{{{returnType}}} result = {{/returnType}}apiInstance.{{{operationId}}}{{^vendorExtensions.x-group-parameters}}({{#allParams}}{{{paramName}}}{{^-last}}, {{/-last}}{{/allParams}});{{/vendorExtensions.x-group-parameters}}{{#vendorExtensions.x-group-parameters}}({{#requiredParams}}{{{paramName}}}{{^-last}}, {{/-last}}{{/requiredParams}}){{#optionalParams}} + {{#returnType}}{{{.}}} result = {{/returnType}}apiInstance.{{{operationId}}}{{^vendorExtensions.x-group-parameters}}({{#allParams}}{{{paramName}}}{{^-last}}, {{/-last}}{{/allParams}});{{/vendorExtensions.x-group-parameters}}{{#vendorExtensions.x-group-parameters}}({{#requiredParams}}{{{paramName}}}{{^-last}}, {{/-last}}{{/requiredParams}}){{#optionalParams}} .{{{paramName}}}({{{paramName}}}){{/optionalParams}} .execute();{{/vendorExtensions.x-group-parameters}}{{#returnType}} System.out.println(result);{{/returnType}} @@ -136,7 +136,7 @@ All URIs are relative to *{{basePath}}* Class | Method | HTTP request | Description ------------ | ------------- | ------------- | ------------- -{{#apiInfo}}{{#apis}}{{#operations}}{{#operation}}*{{classname}}* | [**{{operationId}}**]({{apiDocPath}}{{classname}}.md#{{operationId}}) | **{{httpMethod}}** {{path}} | {{#summary}}{{summary}}{{/summary}} +{{#apiInfo}}{{#apis}}{{#operations}}{{#operation}}*{{classname}}* | [**{{operationId}}**]({{apiDocPath}}{{classname}}.md#{{operationId}}) | **{{httpMethod}}** {{path}} | {{summary}} {{/operation}}{{/operations}}{{/apis}}{{/apiInfo}} ## Documentation for Models diff --git a/modules/openapi-generator/src/main/resources/Java/libraries/okhttp-gson/api.mustache b/modules/openapi-generator/src/main/resources/Java/libraries/okhttp-gson/api.mustache index 6f71a36cd979ef9bf0cf7ba89cf9b92d810e8dfa..2a0f89e94f67ddd38879599ebd47f9f6b9284887 100644 --- a/modules/openapi-generator/src/main/resources/Java/libraries/okhttp-gson/api.mustache +++ b/modules/openapi-generator/src/main/resources/Java/libraries/okhttp-gson/api.mustache @@ -136,7 +136,7 @@ public class {{classname}} { {{^dynamicOperations}} {{#queryParams}} if ({{paramName}} != null) { - {{#collectionFormat}}localVarCollectionQueryParams.addAll(localVarApiClient.parameterToPairs("{{{collectionFormat}}}", {{/collectionFormat}}{{^collectionFormat}}localVarQueryParams.addAll(localVarApiClient.parameterToPair({{/collectionFormat}}"{{baseName}}", {{paramName}})); + {{#collectionFormat}}localVarCollectionQueryParams.addAll(localVarApiClient.parameterToPairs("{{{.}}}", {{/collectionFormat}}{{^collectionFormat}}localVarQueryParams.addAll(localVarApiClient.parameterToPair({{/collectionFormat}}"{{baseName}}", {{paramName}})); } {{/queryParams}} @@ -225,7 +225,7 @@ public class {{classname}} { * {{summary}} * {{notes}}{{#allParams}} * @param {{paramName}} {{description}}{{#required}} (required){{/required}}{{^required}} (optional{{^isContainer}}{{#defaultValue}}, default to {{.}}{{/defaultValue}}{{/isContainer}}){{/required}}{{/allParams}}{{#returnType}} - * @return {{returnType}}{{/returnType}} + * @return {{.}}{{/returnType}} * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body {{#responses.0}} * @http.response.details @@ -247,8 +247,8 @@ public class {{classname}} { {{#isDeprecated}} @Deprecated {{/isDeprecated}} - public {{#returnType}}{{{returnType}}} {{/returnType}}{{^returnType}}void {{/returnType}}{{operationId}}({{#allParams}}{{{dataType}}} {{paramName}}{{^-last}}, {{/-last}}{{/allParams}}) throws ApiException { - {{#returnType}}ApiResponse<{{{returnType}}}> localVarResp = {{/returnType}}{{operationId}}WithHttpInfo({{#allParams}}{{paramName}}{{^-last}}, {{/-last}}{{/allParams}});{{#returnType}} + public {{#returnType}}{{{.}}} {{/returnType}}{{^returnType}}void {{/returnType}}{{operationId}}({{#allParams}}{{{dataType}}} {{paramName}}{{^-last}}, {{/-last}}{{/allParams}}) throws ApiException { + {{#returnType}}ApiResponse<{{{.}}}> localVarResp = {{/returnType}}{{operationId}}WithHttpInfo({{#allParams}}{{paramName}}{{^-last}}, {{/-last}}{{/allParams}});{{#returnType}} return localVarResp.getData();{{/returnType}} } {{/vendorExtensions.x-group-parameters}} @@ -257,7 +257,7 @@ public class {{classname}} { * {{summary}} * {{notes}}{{#allParams}} * @param {{paramName}} {{description}}{{#required}} (required){{/required}}{{^required}} (optional{{^isContainer}}{{#defaultValue}}, default to {{.}}{{/defaultValue}}{{/isContainer}}){{/required}}{{/allParams}} - * @return ApiResponse<{{#returnType}}{{returnType}}{{/returnType}}{{^returnType}}Void{{/returnType}}> + * @return ApiResponse<{{returnType}}{{^returnType}}Void{{/returnType}}> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body {{#responses.0}} * @http.response.details @@ -279,7 +279,7 @@ public class {{classname}} { {{#isDeprecated}} @Deprecated {{/isDeprecated}} - public{{/vendorExtensions.x-group-parameters}}{{#vendorExtensions.x-group-parameters}}private{{/vendorExtensions.x-group-parameters}} ApiResponse<{{#returnType}}{{{returnType}}}{{/returnType}}{{^returnType}}Void{{/returnType}}> {{operationId}}WithHttpInfo({{#allParams}}{{#useBeanValidation}}{{>beanValidationQueryParams}}{{/useBeanValidation}}{{{dataType}}} {{paramName}}{{^-last}}, {{/-last}}{{/allParams}}) throws ApiException { + public{{/vendorExtensions.x-group-parameters}}{{#vendorExtensions.x-group-parameters}}private{{/vendorExtensions.x-group-parameters}} ApiResponse<{{{returnType}}}{{^returnType}}Void{{/returnType}}> {{operationId}}WithHttpInfo({{#allParams}}{{#useBeanValidation}}{{>beanValidationQueryParams}}{{/useBeanValidation}}{{{dataType}}} {{paramName}}{{^-last}}, {{/-last}}{{/allParams}}) throws ApiException { okhttp3.Call localVarCall = {{operationId}}ValidateBeforeCall({{#allParams}}{{paramName}}, {{/allParams}}null); {{#returnType}}Type localVarReturnType = new TypeToken<{{{returnType}}}>(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType);{{/returnType}}{{^returnType}}return localVarApiClient.execute(localVarCall);{{/returnType}} @@ -312,7 +312,7 @@ public class {{classname}} { {{#isDeprecated}} @Deprecated {{/isDeprecated}} - public{{/vendorExtensions.x-group-parameters}}{{#vendorExtensions.x-group-parameters}}private{{/vendorExtensions.x-group-parameters}} okhttp3.Call {{operationId}}Async({{#allParams}}{{{dataType}}} {{paramName}}, {{/allParams}}final ApiCallback<{{#returnType}}{{{returnType}}}{{/returnType}}{{^returnType}}Void{{/returnType}}> _callback) throws ApiException { + public{{/vendorExtensions.x-group-parameters}}{{#vendorExtensions.x-group-parameters}}private{{/vendorExtensions.x-group-parameters}} okhttp3.Call {{operationId}}Async({{#allParams}}{{{dataType}}} {{paramName}}, {{/allParams}}final ApiCallback<{{{returnType}}}{{^returnType}}Void{{/returnType}}> _callback) throws ApiException { okhttp3.Call localVarCall = {{operationId}}ValidateBeforeCall({{#allParams}}{{paramName}}, {{/allParams}}_callback); {{#returnType}}Type localVarReturnType = new TypeToken<{{{returnType}}}>(){}.getType(); @@ -374,7 +374,7 @@ public class {{classname}} { /** * Execute {{operationId}} request{{#returnType}} - * @return {{returnType}}{{/returnType}} + * @return {{.}}{{/returnType}} * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body {{#responses.0}} * @http.response.details @@ -392,14 +392,14 @@ public class {{classname}} { {{#isDeprecated}} @Deprecated {{/isDeprecated}} - public {{#returnType}}{{{returnType}}}{{/returnType}}{{^returnType}}void{{/returnType}} execute() throws ApiException { - {{#returnType}}ApiResponse<{{{returnType}}}> localVarResp = {{/returnType}}{{operationId}}WithHttpInfo({{#allParams}}{{paramName}}{{^-last}}, {{/-last}}{{/allParams}});{{#returnType}} + public {{{returnType}}}{{^returnType}}void{{/returnType}} execute() throws ApiException { + {{#returnType}}ApiResponse<{{{.}}}> localVarResp = {{/returnType}}{{operationId}}WithHttpInfo({{#allParams}}{{paramName}}{{^-last}}, {{/-last}}{{/allParams}});{{#returnType}} return localVarResp.getData();{{/returnType}} } /** * Execute {{operationId}} request with HTTP info returned - * @return ApiResponse<{{#returnType}}{{returnType}}{{/returnType}}{{^returnType}}Void{{/returnType}}> + * @return ApiResponse<{{returnType}}{{^returnType}}Void{{/returnType}}> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body {{#responses.0}} * @http.response.details @@ -417,7 +417,7 @@ public class {{classname}} { {{#isDeprecated}} @Deprecated {{/isDeprecated}} - public ApiResponse<{{#returnType}}{{{returnType}}}{{/returnType}}{{^returnType}}Void{{/returnType}}> executeWithHttpInfo() throws ApiException { + public ApiResponse<{{{returnType}}}{{^returnType}}Void{{/returnType}}> executeWithHttpInfo() throws ApiException { return {{operationId}}WithHttpInfo({{#allParams}}{{paramName}}{{^-last}}, {{/-last}}{{/allParams}}); } @@ -442,7 +442,7 @@ public class {{classname}} { {{#isDeprecated}} @Deprecated {{/isDeprecated}} - public okhttp3.Call executeAsync(final ApiCallback<{{#returnType}}{{{returnType}}}{{/returnType}}{{^returnType}}Void{{/returnType}}> _callback) throws ApiException { + public okhttp3.Call executeAsync(final ApiCallback<{{{returnType}}}{{^returnType}}Void{{/returnType}}> _callback) throws ApiException { return {{operationId}}Async({{#allParams}}{{paramName}}, {{/allParams}}_callback); } } diff --git a/modules/openapi-generator/src/main/resources/Java/libraries/okhttp-gson/api_doc.mustache b/modules/openapi-generator/src/main/resources/Java/libraries/okhttp-gson/api_doc.mustache index 332088661a9b8e8147c57ee7a173ea475085e532..5a4e3969c93d8e1e3341cc73cd23948229347f7a 100644 --- a/modules/openapi-generator/src/main/resources/Java/libraries/okhttp-gson/api_doc.mustache +++ b/modules/openapi-generator/src/main/resources/Java/libraries/okhttp-gson/api_doc.mustache @@ -1,23 +1,23 @@ # {{classname}}{{#description}} -{{description}}{{/description}} +{{.}}{{/description}} All URIs are relative to *{{basePath}}* Method | HTTP request | Description ------------- | ------------- | ------------- -{{#operations}}{{#operation}}[**{{operationId}}**]({{classname}}.md#{{operationId}}) | **{{httpMethod}}** {{path}} | {{#summary}}{{summary}}{{/summary}} +{{#operations}}{{#operation}}[**{{operationId}}**]({{classname}}.md#{{operationId}}) | **{{httpMethod}}** {{path}} | {{summary}} {{/operation}}{{/operations}} {{#operations}} {{#operation}} <a name="{{operationId}}"></a> # **{{operationId}}**{{^vendorExtensions.x-group-parameters}} -> {{#returnType}}{{returnType}} {{/returnType}}{{operationId}}({{#allParams}}{{{paramName}}}{{^-last}}, {{/-last}}{{/allParams}}){{/vendorExtensions.x-group-parameters}}{{#vendorExtensions.x-group-parameters}} -> {{#returnType}}{{returnType}} {{/returnType}}{{operationId}}({{#requiredParams}}{{paramName}}{{^-last}}, {{/-last}}{{/requiredParams}}){{#optionalParams}}.{{paramName}}({{paramName}}){{/optionalParams}}.execute();{{/vendorExtensions.x-group-parameters}} +> {{#returnType}}{{.}} {{/returnType}}{{operationId}}({{#allParams}}{{{paramName}}}{{^-last}}, {{/-last}}{{/allParams}}){{/vendorExtensions.x-group-parameters}}{{#vendorExtensions.x-group-parameters}} +> {{#returnType}}{{.}} {{/returnType}}{{operationId}}({{#requiredParams}}{{paramName}}{{^-last}}, {{/-last}}{{/requiredParams}}){{#optionalParams}}.{{paramName}}({{paramName}}){{/optionalParams}}.execute();{{/vendorExtensions.x-group-parameters}} {{summary}}{{#notes}} -{{notes}}{{/notes}} +{{.}}{{/notes}} ### Example ```java @@ -58,7 +58,7 @@ public class Example { {{{dataType}}} {{{paramName}}} = {{{example}}}; // {{{dataType}}} | {{{description}}} {{/allParams}} try { - {{#returnType}}{{{returnType}}} result = {{/returnType}}apiInstance.{{{operationId}}}{{^vendorExtensions.x-group-parameters}}({{#allParams}}{{{paramName}}}{{^-last}}, {{/-last}}{{/allParams}});{{/vendorExtensions.x-group-parameters}}{{#vendorExtensions.x-group-parameters}}({{#requiredParams}}{{{paramName}}}{{^-last}}, {{/-last}}{{/requiredParams}}){{#optionalParams}} + {{#returnType}}{{{.}}} result = {{/returnType}}apiInstance.{{{operationId}}}{{^vendorExtensions.x-group-parameters}}({{#allParams}}{{{paramName}}}{{^-last}}, {{/-last}}{{/allParams}});{{/vendorExtensions.x-group-parameters}}{{#vendorExtensions.x-group-parameters}}({{#requiredParams}}{{{paramName}}}{{^-last}}, {{/-last}}{{/requiredParams}}){{#optionalParams}} .{{{paramName}}}({{{paramName}}}){{/optionalParams}} .execute();{{/vendorExtensions.x-group-parameters}}{{#returnType}} System.out.println(result);{{/returnType}} @@ -77,7 +77,7 @@ public class Example { {{^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}} **{{paramName}}** | {{#isPrimitiveType}}**{{dataType}}**{{/isPrimitiveType}}{{^isPrimitiveType}}{{#isFile}}**{{dataType}}**{{/isFile}}{{^isFile}}[**{{dataType}}**]({{baseType}}.md){{/isFile}}{{/isPrimitiveType}}| {{description}} |{{^required}} [optional]{{/required}}{{^isContainer}}{{#defaultValue}} [default to {{.}}]{{/defaultValue}}{{/isContainer}}{{#allowableValues}} [enum: {{#values}}{{{.}}}{{^-last}}, {{/-last}}{{/values}}]{{/allowableValues}} {{/allParams}} ### Return type diff --git a/modules/openapi-generator/src/main/resources/Java/libraries/okhttp-gson/api_test.mustache b/modules/openapi-generator/src/main/resources/Java/libraries/okhttp-gson/api_test.mustache index 050bf8617d6099cac2dfadbd9096a4c8c4da7024..2daa8f44dda69b4942f0115ca2967af95bb31f7b 100644 --- a/modules/openapi-generator/src/main/resources/Java/libraries/okhttp-gson/api_test.mustache +++ b/modules/openapi-generator/src/main/resources/Java/libraries/okhttp-gson/api_test.mustache @@ -37,7 +37,7 @@ public class {{classname}}Test { {{#allParams}} {{{dataType}}} {{paramName}} = null; {{/allParams}} - {{#returnType}}{{{returnType}}} response = {{/returnType}}api.{{operationId}}{{^vendorExtensions.x-group-parameters}}({{#allParams}}{{paramName}}{{^-last}}, {{/-last}}{{/allParams}});{{/vendorExtensions.x-group-parameters}}{{#vendorExtensions.x-group-parameters}}({{#requiredParams}}{{paramName}}{{^-last}}, {{/-last}}{{/requiredParams}}){{#optionalParams}} + {{#returnType}}{{{.}}} response = {{/returnType}}api.{{operationId}}{{^vendorExtensions.x-group-parameters}}({{#allParams}}{{paramName}}{{^-last}}, {{/-last}}{{/allParams}});{{/vendorExtensions.x-group-parameters}}{{#vendorExtensions.x-group-parameters}}({{#requiredParams}}{{paramName}}{{^-last}}, {{/-last}}{{/requiredParams}}){{#optionalParams}} .{{paramName}}({{paramName}}){{/optionalParams}} .execute();{{/vendorExtensions.x-group-parameters}} 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 f6002e0ef9e77cde59b9233080b8453c8bdc3e52..e02068856b663154998f3c1a722132009c2a5197 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 @@ -110,7 +110,7 @@ dependencies { implementation 'io.gsonfire:gson-fire:1.8.4' {{#openApiNullable}} implementation 'org.openapitools:jackson-databind-nullable:0.2.1' - {{/openApiNullable}} + {{/openApiNullable}} {{#hasOAuthMethods}} implementation group: 'org.apache.oltu.oauth2', name: 'org.apache.oltu.oauth2.client', version: '1.0.1' {{/hasOAuthMethods}} diff --git a/modules/openapi-generator/src/main/resources/Java/libraries/rest-assured/ApiClient.mustache b/modules/openapi-generator/src/main/resources/Java/libraries/rest-assured/ApiClient.mustache index 1a691ea94821650eecae774d8dad68fd18c6e932..2a0f41737c62d1b175d7aa1c2b789e36b3a2dd08 100644 --- a/modules/openapi-generator/src/main/resources/Java/libraries/rest-assured/ApiClient.mustache +++ b/modules/openapi-generator/src/main/resources/Java/libraries/rest-assured/ApiClient.mustache @@ -19,7 +19,7 @@ import static {{invokerPackage}}.{{#gson}}GsonObjectMapper.gson{{/gson}}{{#jacks public class ApiClient { {{#basePath}} - public static final String BASE_URI = "{{basePath}}"; + public static final String BASE_URI = "{{.}}"; {{/basePath}} private final Config config; diff --git a/modules/openapi-generator/src/main/resources/Java/libraries/rest-assured/README.mustache b/modules/openapi-generator/src/main/resources/Java/libraries/rest-assured/README.mustache index a0fac9d41dfce80944918b087d2a3e4365e2a4d3..c9877589b5ff095ecef622c9e8e32c24a4b9c1c7 100644 --- a/modules/openapi-generator/src/main/resources/Java/libraries/rest-assured/README.mustache +++ b/modules/openapi-generator/src/main/resources/Java/libraries/rest-assured/README.mustache @@ -40,4 +40,3 @@ It's recommended to create an instance of `ApiClient` per thread in a multithrea {{#apiInfo}}{{#apis}}{{#-last}}{{infoEmail}} {{/-last}}{{/apis}}{{/apiInfo}} - diff --git a/modules/openapi-generator/src/main/resources/Java/libraries/rest-assured/api.mustache b/modules/openapi-generator/src/main/resources/Java/libraries/rest-assured/api.mustache index dea1217125ed064b76438f47ab34c74ac89159e5..8d460251119977d2b1e0f9c8cf092e9774755c96 100644 --- a/modules/openapi-generator/src/main/resources/Java/libraries/rest-assured/api.mustache +++ b/modules/openapi-generator/src/main/resources/Java/libraries/rest-assured/api.mustache @@ -71,7 +71,7 @@ public class {{classname}} { @ApiOperation(value = "{{{summary}}}", notes = "{{{notes}}}", nickname = "{{{operationId}}}", - tags = { {{#tags}}{{#name}}"{{{name}}}"{{/name}}{{^-last}}, {{/-last}}{{/tags}} }) + tags = { {{#tags}}{{#name}}"{{{.}}}"{{/name}}{{^-last}}, {{/-last}}{{/tags}} }) @ApiResponses(value = { {{#responses}} @ApiResponse(code = {{{code}}}, message = "{{{message}}}") {{^-last}},{{/-last}}{{/responses}} }) {{#isDeprecated}} @@ -103,7 +103,7 @@ public class {{classname}} { * @see #{{#isPathParam}}{{paramName}}Path{{/isPathParam}}{{#isQueryParam}}{{paramName}}Query{{/isQueryParam}}{{#isFormParam}}{{^isFile}}{{paramName}}Form{{/isFile}}{{#isFile}}{{paramName}}MultiPart{{/isFile}}{{/isFormParam}}{{#isHeaderParam}}{{paramName}}Header{{/isHeaderParam}}{{#isBodyParam}}body{{/isBodyParam}} {{description}}{{#required}} (required){{/required}}{{^required}} (optional{{#defaultValue}}, default to {{.}}{{/defaultValue}}){{/required}} {{/allParams}} {{#returnType}} - * return {{returnType}} + * return {{.}} {{/returnType}} {{#isDeprecated}} * @deprecated diff --git a/modules/openapi-generator/src/main/resources/Java/libraries/rest-assured/api_doc.mustache b/modules/openapi-generator/src/main/resources/Java/libraries/rest-assured/api_doc.mustache index f173a89016e13f483eda294276a06d04bb8f10f2..c000bc962a150508f905b885935f56145b9b681f 100644 --- a/modules/openapi-generator/src/main/resources/Java/libraries/rest-assured/api_doc.mustache +++ b/modules/openapi-generator/src/main/resources/Java/libraries/rest-assured/api_doc.mustache @@ -1,22 +1,22 @@ # {{classname}}{{#description}} -{{description}}{{/description}} +{{.}}{{/description}} All URIs are relative to *{{basePath}}* Method | HTTP request | Description ------------- | ------------- | ------------- -{{#operations}}{{#operation}}[**{{operationId}}**]({{classname}}.md#{{operationId}}) | **{{httpMethod}}** {{path}} | {{#summary}}{{summary}}{{/summary}} +{{#operations}}{{#operation}}[**{{operationId}}**]({{classname}}.md#{{operationId}}) | **{{httpMethod}}** {{path}} | {{summary}} {{/operation}}{{/operations}} {{#operations}} {{#operation}} <a name="{{operationId}}"></a> # **{{operationId}}** -> {{#returnType}}{{returnType}} {{/returnType}}{{operationId}}({{#allParams}}{{{paramName}}}{{^-last}}, {{/-last}}{{/allParams}}) +> {{#returnType}}{{.}} {{/returnType}}{{operationId}}({{#allParams}}{{{paramName}}}{{^-last}}, {{/-last}}{{/allParams}}) {{summary}}{{#notes}} -{{notes}}{{/notes}} +{{.}}{{/notes}} ### Example ```java @@ -42,7 +42,7 @@ api.{{operationId}}(){{#allParams}}{{#required}}{{#isPathParam}} {{^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}}{{#defaultValue}} [default to {{defaultValue}}]{{/defaultValue}}{{#allowableValues}} [enum: {{#values}}{{{.}}}{{^-last}}, {{/-last}}{{/values}}]{{/allowableValues}} +{{#allParams}} **{{paramName}}** | {{#isPrimitiveType}}**{{dataType}}**{{/isPrimitiveType}}{{^isPrimitiveType}}{{#isFile}}**{{dataType}}**{{/isFile}}{{^isFile}}[**{{dataType}}**]({{baseType}}.md){{/isFile}}{{/isPrimitiveType}}| {{description}} |{{^required}} [optional]{{/required}}{{#defaultValue}} [default to {{.}}]{{/defaultValue}}{{#allowableValues}} [enum: {{#values}}{{{.}}}{{^-last}}, {{/-last}}{{/values}}]{{/allowableValues}} {{/allParams}} ### Return type 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 28c213b41b7f366e055990b2e2f9673d90f87713..4659399ee1d395b99ef10aea286a33d2a25d8f11 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 @@ -24,7 +24,7 @@ if(hasProperty('target') && target == 'android') { apply plugin: 'com.android.library' apply plugin: 'com.github.dcendents.android-maven' - + android { compileSdkVersion 23 buildToolsVersion '23.0.2' @@ -36,7 +36,7 @@ if(hasProperty('target') && target == 'android') { sourceCompatibility JavaVersion.VERSION_1_8 targetCompatibility JavaVersion.VERSION_1_8 } - + // Rename the aar correctly libraryVariants.all { variant -> variant.outputs.each { output -> @@ -52,7 +52,7 @@ if(hasProperty('target') && target == 'android') { provided 'javax.annotation:jsr250-api:1.0' } } - + afterEvaluate { android.libraryVariants.all { variant -> def task = project.tasks.create "jar${variant.name.capitalize()}", Jar @@ -64,12 +64,12 @@ if(hasProperty('target') && target == 'android') { artifacts.add('archives', task); } } - + task sourcesJar(type: Jar) { from android.sourceSets.main.java.srcDirs classifier = 'sources' } - + artifacts { archives sourcesJar } @@ -87,7 +87,7 @@ if(hasProperty('target') && target == 'android') { pom.artifactId = '{{artifactId}}' } } - + task execute(type:JavaExec) { main = System.getProperty('mainClass') classpath = sourceSets.main.runtimeClasspath diff --git a/modules/openapi-generator/src/main/resources/Java/libraries/resteasy/ApiClient.mustache b/modules/openapi-generator/src/main/resources/Java/libraries/resteasy/ApiClient.mustache index 775e0efea40f625ea47ef13f9a2cba3acdc8711b..79ebc96d37013b12cff48960ada5ec997a33bc7e 100644 --- a/modules/openapi-generator/src/main/resources/Java/libraries/resteasy/ApiClient.mustache +++ b/modules/openapi-generator/src/main/resources/Java/libraries/resteasy/ApiClient.mustache @@ -86,7 +86,7 @@ public class ApiClient{{#jsr310}} extends JavaTimeFormatter{{/jsr310}} { this.json.setDateFormat((DateFormat) dateFormat.clone()); // Set default User-Agent. - setUserAgent("{{#httpUserAgent}}{{{.}}}{{/httpUserAgent}}{{^httpUserAgent}}OpenAPI-Generator/{{{artifactVersion}}}/java{{/httpUserAgent}}"); + setUserAgent("{{{httpUserAgent}}}{{^httpUserAgent}}OpenAPI-Generator/{{{artifactVersion}}}/java{{/httpUserAgent}}"); // Setup authentications (key: authentication name, value: authentication). authentications = new HashMap<String, Authentication>();{{#authMethods}}{{#isBasic}}{{#isBasicBasic}} diff --git a/modules/openapi-generator/src/main/resources/Java/libraries/resteasy/api.mustache b/modules/openapi-generator/src/main/resources/Java/libraries/resteasy/api.mustache index 85891614c0ec15da800884b8908cae71ea32c865..9194b7541a161018f61f8f26fe6ce8e83bd7f5f6 100644 --- a/modules/openapi-generator/src/main/resources/Java/libraries/resteasy/api.mustache +++ b/modules/openapi-generator/src/main/resources/Java/libraries/resteasy/api.mustache @@ -56,7 +56,7 @@ public class {{classname}} { {{#isDeprecated}} @Deprecated {{/isDeprecated}} - public {{#returnType}}{{{returnType}}} {{/returnType}}{{^returnType}}void {{/returnType}}{{operationId}}({{#allParams}}{{{dataType}}} {{paramName}}{{^-last}}, {{/-last}}{{/allParams}}) throws ApiException { + public {{#returnType}}{{{.}}} {{/returnType}}{{^returnType}}void {{/returnType}}{{operationId}}({{#allParams}}{{{dataType}}} {{paramName}}{{^-last}}, {{/-last}}{{/allParams}}) throws ApiException { Object localVarPostBody = {{#bodyParam}}{{paramName}}{{/bodyParam}}{{^bodyParam}}null{{/bodyParam}}; {{#allParams}}{{#required}} // verify the required parameter '{{paramName}}' is set @@ -75,7 +75,7 @@ public class {{classname}} { {{javaUtilPrefix}}Map<String, Object> localVarFormParams = new {{javaUtilPrefix}}HashMap<String, Object>(); {{#queryParams}} - localVarQueryParams.addAll(apiClient.parameterToPairs("{{#collectionFormat}}{{{collectionFormat}}}{{/collectionFormat}}", "{{baseName}}", {{paramName}})); + localVarQueryParams.addAll(apiClient.parameterToPairs("{{{collectionFormat}}}", "{{baseName}}", {{paramName}})); {{/queryParams}} {{#headerParams}}if ({{paramName}} != null) diff --git a/modules/openapi-generator/src/main/resources/Java/libraries/resttemplate/ApiClient.mustache b/modules/openapi-generator/src/main/resources/Java/libraries/resttemplate/ApiClient.mustache index c4a9083f25c83148188ade0fa3bb132896c0c9cb..33c4d1ec91993f4aae18399428230bc6d40b4f66 100644 --- a/modules/openapi-generator/src/main/resources/Java/libraries/resttemplate/ApiClient.mustache +++ b/modules/openapi-generator/src/main/resources/Java/libraries/resttemplate/ApiClient.mustache @@ -868,4 +868,3 @@ public class ApiClient{{#jsr310}} extends JavaTimeFormatter{{/jsr310}} { } } } - diff --git a/modules/openapi-generator/src/main/resources/Java/libraries/resttemplate/api.mustache b/modules/openapi-generator/src/main/resources/Java/libraries/resttemplate/api.mustache index 9c749da027a1f5447085275002104ca9e3431588..cc207bd1b5646e094d2f05f756ab7a42b0c4a350 100644 --- a/modules/openapi-generator/src/main/resources/Java/libraries/resttemplate/api.mustache +++ b/modules/openapi-generator/src/main/resources/Java/libraries/resttemplate/api.mustache @@ -54,13 +54,13 @@ public class {{classname}} { * {{summary}} * {{notes}} {{#responses}} - * <p><b>{{code}}</b>{{#message}} - {{message}}{{/message}} + * <p><b>{{code}}</b>{{#message}} - {{.}}{{/message}} {{/responses}} {{#allParams}} * @param {{paramName}} {{description}}{{#required}} (required){{/required}}{{^required}} (optional{{#defaultValue}}, default to {{.}}{{/defaultValue}}){{/required}} {{/allParams}} {{#returnType}} - * @return {{returnType}} + * @return {{.}} {{/returnType}} * @throws RestClientException if an error occurs while attempting to invoke the API {{#externalDocs}} @@ -74,7 +74,7 @@ public class {{classname}} { {{#isDeprecated}} @Deprecated {{/isDeprecated}} - public {{#returnType}}{{{returnType}}} {{/returnType}}{{^returnType}}void {{/returnType}}{{operationId}}({{#allParams}}{{#isFile}}{{#useAbstractionForFiles}}{{#collectionFormat}}java.util.Collection<org.springframework.core.io.Resource>{{/collectionFormat}}{{^collectionFormat}}org.springframework.core.io.Resource{{/collectionFormat}}{{/useAbstractionForFiles}}{{^useAbstractionForFiles}}{{{dataType}}}{{/useAbstractionForFiles}}{{/isFile}}{{^isFile}}{{{dataType}}}{{/isFile}} {{paramName}}{{^-last}}, {{/-last}}{{/allParams}}) throws RestClientException { + public {{#returnType}}{{{.}}} {{/returnType}}{{^returnType}}void {{/returnType}}{{operationId}}({{#allParams}}{{#isFile}}{{#useAbstractionForFiles}}{{#collectionFormat}}java.util.Collection<org.springframework.core.io.Resource>{{/collectionFormat}}{{^collectionFormat}}org.springframework.core.io.Resource{{/collectionFormat}}{{/useAbstractionForFiles}}{{^useAbstractionForFiles}}{{{dataType}}}{{/useAbstractionForFiles}}{{/isFile}}{{^isFile}}{{{dataType}}}{{/isFile}} {{paramName}}{{^-last}}, {{/-last}}{{/allParams}}) throws RestClientException { {{#returnType}} return {{operationId}}WithHttpInfo({{#allParams}}{{paramName}}{{^-last}}, {{/-last}}{{/allParams}}).getBody(); {{/returnType}} @@ -87,12 +87,12 @@ public class {{classname}} { * {{summary}} * {{notes}} {{#responses}} - * <p><b>{{code}}</b>{{#message}} - {{message}}{{/message}} + * <p><b>{{code}}</b>{{#message}} - {{.}}{{/message}} {{/responses}} {{#allParams}} * @param {{paramName}} {{description}}{{#required}} (required){{/required}}{{^required}} (optional{{#defaultValue}}, default to {{.}}{{/defaultValue}}){{/required}} {{/allParams}} - * @return ResponseEntity<{{#returnType}}{{returnType}}{{/returnType}}{{^returnType}}Void{{/returnType}}> + * @return ResponseEntity<{{returnType}}{{^returnType}}Void{{/returnType}}> * @throws RestClientException if an error occurs while attempting to invoke the API {{#externalDocs}} * {{description}} @@ -105,7 +105,7 @@ public class {{classname}} { {{#isDeprecated}} @Deprecated {{/isDeprecated}} - public ResponseEntity<{{#returnType}}{{{returnType}}}{{/returnType}}{{^returnType}}Void{{/returnType}}> {{operationId}}WithHttpInfo({{#allParams}}{{#isFile}}{{#useAbstractionForFiles}}{{#collectionFormat}}java.util.Collection<org.springframework.core.io.Resource>{{/collectionFormat}}{{^collectionFormat}}org.springframework.core.io.Resource{{/collectionFormat}}{{/useAbstractionForFiles}}{{^useAbstractionForFiles}}{{{dataType}}}{{/useAbstractionForFiles}}{{/isFile}}{{^isFile}}{{{dataType}}}{{/isFile}} {{paramName}}{{^-last}}, {{/-last}}{{/allParams}}) throws RestClientException { + public ResponseEntity<{{{returnType}}}{{^returnType}}Void{{/returnType}}> {{operationId}}WithHttpInfo({{#allParams}}{{#isFile}}{{#useAbstractionForFiles}}{{#collectionFormat}}java.util.Collection<org.springframework.core.io.Resource>{{/collectionFormat}}{{^collectionFormat}}org.springframework.core.io.Resource{{/collectionFormat}}{{/useAbstractionForFiles}}{{^useAbstractionForFiles}}{{{dataType}}}{{/useAbstractionForFiles}}{{/isFile}}{{^isFile}}{{{dataType}}}{{/isFile}} {{paramName}}{{^-last}}, {{/-last}}{{/allParams}}) throws RestClientException { Object postBody = {{#bodyParam}}{{paramName}}{{/bodyParam}}{{^bodyParam}}null{{/bodyParam}}; {{#allParams}}{{#required}} // verify the required parameter '{{paramName}}' is set @@ -122,7 +122,7 @@ public class {{classname}} { final MultiValueMap<String, String> cookieParams = new LinkedMultiValueMap<String, String>(); final MultiValueMap<String, Object> formParams = new LinkedMultiValueMap<String, Object>();{{#hasQueryParams}} - {{#queryParams}}queryParams.putAll(apiClient.parameterToMultiValueMap({{#collectionFormat}}ApiClient.CollectionFormat.valueOf("{{{collectionFormat}}}".toUpperCase(Locale.ROOT)){{/collectionFormat}}{{^collectionFormat}}null{{/collectionFormat}}, "{{baseName}}", {{paramName}}));{{^-last}} + {{#queryParams}}queryParams.putAll(apiClient.parameterToMultiValueMap({{#collectionFormat}}ApiClient.CollectionFormat.valueOf("{{{.}}}".toUpperCase(Locale.ROOT)){{/collectionFormat}}{{^collectionFormat}}null{{/collectionFormat}}, "{{baseName}}", {{paramName}}));{{^-last}} {{/-last}}{{/queryParams}}{{/hasQueryParams}}{{#hasHeaderParams}} {{#headerParams}}if ({{paramName}} != null) diff --git a/modules/openapi-generator/src/main/resources/Java/libraries/resttemplate/api_test.mustache b/modules/openapi-generator/src/main/resources/Java/libraries/resttemplate/api_test.mustache index 119194543c37ed688028136a628a96db3a3186ab..865572ae8cc1ecb285b1be7e6b5491136af654dc 100644 --- a/modules/openapi-generator/src/main/resources/Java/libraries/resttemplate/api_test.mustache +++ b/modules/openapi-generator/src/main/resources/Java/libraries/resttemplate/api_test.mustache @@ -36,7 +36,7 @@ public class {{classname}}Test { {{#allParams}} {{#isFile}}{{#useAbstractionForFiles}}{{#collectionFormat}}java.util.Collection<org.springframework.core.io.Resource>{{/collectionFormat}}{{^collectionFormat}}org.springframework.core.io.Resource{{/collectionFormat}}{{/useAbstractionForFiles}}{{^useAbstractionForFiles}}{{{dataType}}}{{/useAbstractionForFiles}}{{/isFile}}{{^isFile}}{{{dataType}}}{{/isFile}} {{paramName}} = null; {{/allParams}} - {{#returnType}}{{{returnType}}} response = {{/returnType}}api.{{operationId}}({{#allParams}}{{paramName}}{{^-last}}, {{/-last}}{{/allParams}}); + {{#returnType}}{{{.}}} response = {{/returnType}}api.{{operationId}}({{#allParams}}{{paramName}}{{^-last}}, {{/-last}}{{/allParams}}); // TODO: test validations } diff --git a/modules/openapi-generator/src/main/resources/Java/libraries/retrofit/CollectionFormats.mustache b/modules/openapi-generator/src/main/resources/Java/libraries/retrofit/CollectionFormats.mustache index 33331adb026f96634371eca0bf84b19763837cb4..dbfa4ae767bbce0ffc3482c96d54159ef9ef3906 100644 --- a/modules/openapi-generator/src/main/resources/Java/libraries/retrofit/CollectionFormats.mustache +++ b/modules/openapi-generator/src/main/resources/Java/libraries/retrofit/CollectionFormats.mustache @@ -4,18 +4,18 @@ import java.util.Arrays; import java.util.List; public class CollectionFormats { - + public static class CSVParams { protected List<String> params; - + public CSVParams() { } - + public CSVParams(List<String> params) { this.params = params; } - + public CSVParams(String... params) { this.params = Arrays.asList(params); } @@ -27,23 +27,23 @@ public class CollectionFormats { public void setParams(List<String> params) { this.params = params; } - + @Override public String toString() { return StringUtil.join(params.toArray(new String[0]), ","); } - + } - + public static class SPACEParams extends SSVParams { } public static class SSVParams extends CSVParams { - + public SSVParams() { } - + public SSVParams(List<String> params) { super(params); } @@ -57,16 +57,16 @@ public class CollectionFormats { return StringUtil.join(params.toArray(new String[0]), " "); } } - + public static class TSVParams extends CSVParams { - + public TSVParams() { } - + public TSVParams(List<String> params) { super(params); } - + public TSVParams(String... params) { super(params); } @@ -76,16 +76,16 @@ public class CollectionFormats { return StringUtil.join( params.toArray(new String[0]), "\t"); } } - + public static class PIPESParams extends CSVParams { - + public PIPESParams() { } - + public PIPESParams(List<String> params) { super(params); } - + public PIPESParams(String... params) { super(params); } @@ -95,5 +95,5 @@ public class CollectionFormats { return StringUtil.join(params.toArray(new String[0]), "|"); } } - + } diff --git a/modules/openapi-generator/src/main/resources/Java/libraries/retrofit/README.mustache b/modules/openapi-generator/src/main/resources/Java/libraries/retrofit/README.mustache index a0fac9d41dfce80944918b087d2a3e4365e2a4d3..c9877589b5ff095ecef622c9e8e32c24a4b9c1c7 100644 --- a/modules/openapi-generator/src/main/resources/Java/libraries/retrofit/README.mustache +++ b/modules/openapi-generator/src/main/resources/Java/libraries/retrofit/README.mustache @@ -40,4 +40,3 @@ It's recommended to create an instance of `ApiClient` per thread in a multithrea {{#apiInfo}}{{#apis}}{{#-last}}{{infoEmail}} {{/-last}}{{/apis}}{{/apiInfo}} - diff --git a/modules/openapi-generator/src/main/resources/Java/libraries/retrofit/api.mustache b/modules/openapi-generator/src/main/resources/Java/libraries/retrofit/api.mustache index 041b6a8e9100505aa9f15ae39ede857d573cff12..79e4ff1374bce4f82deb7fc1ddb8b7c84f742a14 100644 --- a/modules/openapi-generator/src/main/resources/Java/libraries/retrofit/api.mustache +++ b/modules/openapi-generator/src/main/resources/Java/libraries/retrofit/api.mustache @@ -26,7 +26,7 @@ public interface {{classname}} { {{#allParams}} * @param {{paramName}} {{description}}{{#required}} (required){{/required}}{{^required}} (optional{{#defaultValue}}, default to {{.}}{{/defaultValue}}){{/required}} {{/allParams}} - * @return {{#returnType}}{{returnType}}{{/returnType}}{{^returnType}}Void{{/returnType}} + * @return {{returnType}}{{^returnType}}Void{{/returnType}} {{#externalDocs}} * {{description}} * @see <a href="{{url}}">{{summary}} Documentation</a> @@ -41,7 +41,7 @@ public interface {{classname}} { {{#formParams}}{{#-first}} {{#isMultipart}}@retrofit.http.Multipart{{/isMultipart}}{{^isMultipart}}@retrofit.http.FormUrlEncoded{{/isMultipart}}{{/-first}}{{/formParams}} @{{httpMethod}}("{{{path}}}") - {{#returnType}}{{{returnType}}}{{/returnType}}{{^returnType}}Void{{/returnType}} {{operationId}}({{^allParams}});{{/allParams}} + {{{returnType}}}{{^returnType}}Void{{/returnType}} {{operationId}}({{^allParams}});{{/allParams}} {{#allParams}}{{>libraries/retrofit/queryParams}}{{>libraries/retrofit/pathParams}}{{>libraries/retrofit/headerParams}}{{>libraries/retrofit/bodyParams}}{{>libraries/retrofit/formParams}}{{^-last}}, {{/-last}}{{#-last}} );{{/-last}}{{/allParams}} @@ -67,7 +67,7 @@ public interface {{classname}} { {{#isMultipart}}@retrofit.http.Multipart{{/isMultipart}}{{^isMultipart}}@retrofit.http.FormUrlEncoded{{/isMultipart}}{{/-first}}{{/formParams}} @{{httpMethod}}("{{{path}}}") void {{operationId}}( - {{#allParams}}{{>libraries/retrofit/queryParams}}{{>libraries/retrofit/pathParams}}{{>libraries/retrofit/headerParams}}{{>libraries/retrofit/bodyParams}}{{>libraries/retrofit/formParams}}, {{/allParams}}Callback<{{#returnType}}{{{returnType}}}{{/returnType}}{{^returnType}}Void{{/returnType}}> cb + {{#allParams}}{{>libraries/retrofit/queryParams}}{{>libraries/retrofit/pathParams}}{{>libraries/retrofit/headerParams}}{{>libraries/retrofit/bodyParams}}{{>libraries/retrofit/formParams}}, {{/allParams}}Callback<{{{returnType}}}{{^returnType}}Void{{/returnType}}> cb ); {{/operation}} } diff --git a/modules/openapi-generator/src/main/resources/Java/libraries/retrofit/api_test.mustache b/modules/openapi-generator/src/main/resources/Java/libraries/retrofit/api_test.mustache index db07fb825c9ab25be24c86df22f6e3e991cada91..112d7f73a8075411152af1265e734465ef7f55cd 100644 --- a/modules/openapi-generator/src/main/resources/Java/libraries/retrofit/api_test.mustache +++ b/modules/openapi-generator/src/main/resources/Java/libraries/retrofit/api_test.mustache @@ -36,7 +36,7 @@ public class {{classname}}Test { {{#allParams}} {{{dataType}}} {{paramName}} = null; {{/allParams}} - // {{#returnType}}{{{returnType}}} response = {{/returnType}}api.{{operationId}}({{#allParams}}{{paramName}}{{^-last}}, {{/-last}}{{/allParams}}); + // {{#returnType}}{{{.}}} response = {{/returnType}}api.{{operationId}}({{#allParams}}{{paramName}}{{^-last}}, {{/-last}}{{/allParams}}); // TODO: test validations } diff --git a/modules/openapi-generator/src/main/resources/Java/libraries/retrofit/auth/HttpBasicAuth.mustache b/modules/openapi-generator/src/main/resources/Java/libraries/retrofit/auth/HttpBasicAuth.mustache index 394592f64d9ca90a5308dc7f23a4188e3696cd99..cf82b2775a7d34fa02b369cc707b9905f01e0d2b 100644 --- a/modules/openapi-generator/src/main/resources/Java/libraries/retrofit/auth/HttpBasicAuth.mustache +++ b/modules/openapi-generator/src/main/resources/Java/libraries/retrofit/auth/HttpBasicAuth.mustache @@ -11,7 +11,7 @@ public class HttpBasicAuth implements Interceptor { private String username; private String password; - + public String getUsername() { return username; } diff --git a/modules/openapi-generator/src/main/resources/Java/libraries/retrofit/auth/OAuth.mustache b/modules/openapi-generator/src/main/resources/Java/libraries/retrofit/auth/OAuth.mustache index 4c39f4e629e53754a66f292d43aad5f1dfdfd422..57bfd3df238e3f82611cfa66b9de719ecc133e7f 100644 --- a/modules/openapi-generator/src/main/resources/Java/libraries/retrofit/auth/OAuth.mustache +++ b/modules/openapi-generator/src/main/resources/Java/libraries/retrofit/auth/OAuth.mustache @@ -66,7 +66,7 @@ public class OAuth implements Interceptor { break; default: break; - } + } } @Override @@ -93,7 +93,7 @@ public class OAuth implements Interceptor { if (getAccessToken() != null) { // Build the request Builder rb = request.newBuilder(); - + String requestAccessToken = new String(getAccessToken()); try { oAuthRequest = new OAuthBearerClientRequest(request.urlString()) @@ -102,15 +102,15 @@ public class OAuth implements Interceptor { } catch (OAuthSystemException e) { throw new IOException(e); } - + for ( Map.Entry<String, String> header : oAuthRequest.getHeaders().entrySet() ) { rb.addHeader(header.getKey(), header.getValue()); } rb.url( oAuthRequest.getLocationUri()); - + //Execute the request Response response = chain.proceed(rb.build()); - + // 401/403 most likely indicates that access token has expired. Unless it happens two times in a row. if ( response != null && (response.code() == HTTP_UNAUTHORIZED || response.code() == HTTP_FORBIDDEN) && updateTokenAndRetryOnAuthorizationFailure ) { try { @@ -133,7 +133,7 @@ public class OAuth implements Interceptor { * Returns true if the access token has been updated */ public synchronized boolean updateAccessToken(String requestAccessToken) throws IOException { - if (getAccessToken() == null || getAccessToken().equals(requestAccessToken)) { + if (getAccessToken() == null || getAccessToken().equals(requestAccessToken)) { try { OAuthJSONAccessTokenResponse accessTokenResponse = oauthClient.accessToken(this.tokenRequestBuilder.buildBodyMessage()); if (accessTokenResponse != null && accessTokenResponse.getAccessToken() != null) { diff --git a/modules/openapi-generator/src/main/resources/Java/libraries/retrofit/auth/OAuthOkHttpClient.mustache b/modules/openapi-generator/src/main/resources/Java/libraries/retrofit/auth/OAuthOkHttpClient.mustache index ea195f7df04bd43a740fa2d76f72cd92c85b449c..48fc7ea4c1fcd952c8854542455f1526d189cdf5 100644 --- a/modules/openapi-generator/src/main/resources/Java/libraries/retrofit/auth/OAuthOkHttpClient.mustache +++ b/modules/openapi-generator/src/main/resources/Java/libraries/retrofit/auth/OAuthOkHttpClient.mustache @@ -53,7 +53,7 @@ public class OAuthOkHttpClient implements HttpClient { try { Response response = client.newCall(requestBuilder.build()).execute(); return OAuthClientResponseFactory.createCustomResponse( - response.body().string(), + response.body().string(), response.body().contentType().toString(), response.code(), responseClass); diff --git a/modules/openapi-generator/src/main/resources/Java/libraries/retrofit2/ApiClient.mustache b/modules/openapi-generator/src/main/resources/Java/libraries/retrofit2/ApiClient.mustache index de40d727587223689f5c04c55e38d246c2dc9d33..1196f2c1372064149477b263fff544ed49812cff 100644 --- a/modules/openapi-generator/src/main/resources/Java/libraries/retrofit2/ApiClient.mustache +++ b/modules/openapi-generator/src/main/resources/Java/libraries/retrofit2/ApiClient.mustache @@ -369,7 +369,7 @@ public class ApiClient { throw new RuntimeException("The ApiClient was created with a built OkHttpClient so it's not possible to add an authorization interceptor to it"); } okBuilder.addInterceptor(authorization); - + return this; } diff --git a/modules/openapi-generator/src/main/resources/Java/libraries/retrofit2/README.mustache b/modules/openapi-generator/src/main/resources/Java/libraries/retrofit2/README.mustache index 847b9d5a2a1820fafcb35e4feb5b6fce6abc3c91..5e892a3fa506acef8d416e132fc5ef3dfff025d9 100644 --- a/modules/openapi-generator/src/main/resources/Java/libraries/retrofit2/README.mustache +++ b/modules/openapi-generator/src/main/resources/Java/libraries/retrofit2/README.mustache @@ -36,4 +36,3 @@ After the client library is installed/deployed, you can use it in your Maven pro {{#apiInfo}}{{#apis}}{{#-last}}{{infoEmail}} {{/-last}}{{/apis}}{{/apiInfo}} - diff --git a/modules/openapi-generator/src/main/resources/Java/libraries/retrofit2/api.mustache b/modules/openapi-generator/src/main/resources/Java/libraries/retrofit2/api.mustache index baa89192cd78ceedab7a52e9806e895264487bb3..dd199a5e108cb72f3927b87d04a42f8bac18008e 100644 --- a/modules/openapi-generator/src/main/resources/Java/libraries/retrofit2/api.mustache +++ b/modules/openapi-generator/src/main/resources/Java/libraries/retrofit2/api.mustache @@ -47,7 +47,7 @@ public interface {{classname}} { {{#allParams}} * @param {{paramName}} {{description}}{{#required}} (required){{/required}}{{^required}} (optional{{#defaultValue}}, default to {{.}}{{/defaultValue}}){{/required}} {{/allParams}} - * @return {{^doNotUseRx}}{{#useRxJava}}Observable<{{#isResponseFile}}ResponseBody{{/isResponseFile}}{{^isResponseFile}}{{#returnType}}{{returnType}}{{/returnType}}{{^returnType}}Void{{/returnType}}{{/isResponseFile}}>{{/useRxJava}}{{#useRxJava2}}{{#returnType}}Observable<{{#isResponseFile}}ResponseBody{{/isResponseFile}}{{^isResponseFile}}{{returnType}}{{/isResponseFile}}>{{/returnType}}{{^returnType}}Completable{{/returnType}}{{/useRxJava2}}{{#useRxJava3}}{{#returnType}}Observable<{{#isResponseFile}}ResponseBody{{/isResponseFile}}{{^isResponseFile}}{{returnType}}{{/isResponseFile}}>{{/returnType}}{{^returnType}}Completable{{/returnType}}{{/useRxJava3}}{{/doNotUseRx}}{{#doNotUseRx}}Call<{{#isResponseFile}}ResponseBody{{/isResponseFile}}{{^isResponseFile}}{{#returnType}}{{returnType}}{{/returnType}}{{^returnType}}Void{{/returnType}}{{/isResponseFile}}>{{/doNotUseRx}} + * @return {{^doNotUseRx}}{{#useRxJava}}Observable<{{#isResponseFile}}ResponseBody{{/isResponseFile}}{{^isResponseFile}}{{returnType}}{{^returnType}}Void{{/returnType}}{{/isResponseFile}}>{{/useRxJava}}{{#useRxJava2}}{{#returnType}}Observable<{{#isResponseFile}}ResponseBody{{/isResponseFile}}{{^isResponseFile}}{{returnType}}{{/isResponseFile}}>{{/returnType}}{{^returnType}}Completable{{/returnType}}{{/useRxJava2}}{{#useRxJava3}}{{#returnType}}Observable<{{#isResponseFile}}ResponseBody{{/isResponseFile}}{{^isResponseFile}}{{returnType}}{{/isResponseFile}}>{{/returnType}}{{^returnType}}Completable{{/returnType}}{{/useRxJava3}}{{/doNotUseRx}}{{#doNotUseRx}}Call<{{#isResponseFile}}ResponseBody{{/isResponseFile}}{{^isResponseFile}}{{returnType}}{{^returnType}}Void{{/returnType}}{{/isResponseFile}}>{{/doNotUseRx}} {{#isDeprecated}} * @deprecated {{/isDeprecated}} @@ -74,7 +74,7 @@ public interface {{classname}} { {{/prioritizedContentTypes}} {{/formParams}} @{{httpMethod}}("{{{path}}}") - {{^doNotUseRx}}{{#useRxJava}}Observable<{{#isResponseFile}}ResponseBody{{/isResponseFile}}{{^isResponseFile}}{{#returnType}}{{{returnType}}}{{/returnType}}{{^returnType}}Void{{/returnType}}{{/isResponseFile}}>{{/useRxJava}}{{#useRxJava2}}{{#returnType}}Observable<{{#isResponseFile}}ResponseBody{{/isResponseFile}}{{^isResponseFile}}{{{returnType}}}{{/isResponseFile}}>{{/returnType}}{{^returnType}}Completable{{/returnType}}{{/useRxJava2}}{{#useRxJava3}}{{#returnType}}Observable<{{#isResponseFile}}ResponseBody{{/isResponseFile}}{{^isResponseFile}}{{{returnType}}}{{/isResponseFile}}>{{/returnType}}{{^returnType}}Completable{{/returnType}}{{/useRxJava3}}{{/doNotUseRx}}{{#doNotUseRx}}Call<{{#isResponseFile}}ResponseBody{{/isResponseFile}}{{^isResponseFile}}{{#returnType}}{{{returnType}}}{{/returnType}}{{^returnType}}Void{{/returnType}}{{/isResponseFile}}>{{/doNotUseRx}} {{operationId}}({{^allParams}});{{/allParams}} + {{^doNotUseRx}}{{#useRxJava}}Observable<{{#isResponseFile}}ResponseBody{{/isResponseFile}}{{^isResponseFile}}{{{returnType}}}{{^returnType}}Void{{/returnType}}{{/isResponseFile}}>{{/useRxJava}}{{#useRxJava2}}{{#returnType}}Observable<{{#isResponseFile}}ResponseBody{{/isResponseFile}}{{^isResponseFile}}{{{returnType}}}{{/isResponseFile}}>{{/returnType}}{{^returnType}}Completable{{/returnType}}{{/useRxJava2}}{{#useRxJava3}}{{#returnType}}Observable<{{#isResponseFile}}ResponseBody{{/isResponseFile}}{{^isResponseFile}}{{{returnType}}}{{/isResponseFile}}>{{/returnType}}{{^returnType}}Completable{{/returnType}}{{/useRxJava3}}{{/doNotUseRx}}{{#doNotUseRx}}Call<{{#isResponseFile}}ResponseBody{{/isResponseFile}}{{^isResponseFile}}{{{returnType}}}{{^returnType}}Void{{/returnType}}{{/isResponseFile}}>{{/doNotUseRx}} {{operationId}}({{^allParams}});{{/allParams}} {{#allParams}}{{>libraries/retrofit2/queryParams}}{{>libraries/retrofit2/pathParams}}{{>libraries/retrofit2/headerParams}}{{>libraries/retrofit2/bodyParams}}{{>libraries/retrofit2/formParams}}{{^-last}}, {{/-last}}{{#-last}} );{{/-last}}{{/allParams}} diff --git a/modules/openapi-generator/src/main/resources/Java/libraries/retrofit2/api_test.mustache b/modules/openapi-generator/src/main/resources/Java/libraries/retrofit2/api_test.mustache index d214d97724cf877e96849d170825df130b1bb88e..3f60dd13dfb5b19265bddc7e6395a8b1fc3c536a 100644 --- a/modules/openapi-generator/src/main/resources/Java/libraries/retrofit2/api_test.mustache +++ b/modules/openapi-generator/src/main/resources/Java/libraries/retrofit2/api_test.mustache @@ -37,7 +37,7 @@ public class {{classname}}Test { {{#allParams}} {{{dataType}}} {{paramName}} = null; {{/allParams}} - // {{#returnType}}{{{returnType}}} response = {{/returnType}}api.{{operationId}}({{#allParams}}{{paramName}}{{^-last}}, {{/-last}}{{/allParams}}); + // {{#returnType}}{{{.}}} response = {{/returnType}}api.{{operationId}}({{#allParams}}{{paramName}}{{^-last}}, {{/-last}}{{/allParams}}); // TODO: test validations } diff --git a/modules/openapi-generator/src/main/resources/Java/libraries/retrofit2/auth/HttpBasicAuth.mustache b/modules/openapi-generator/src/main/resources/Java/libraries/retrofit2/auth/HttpBasicAuth.mustache index d458842666271ae53f465e07055f8e6cf0b9da74..9bd756eb85639eb08d31e80345ba2aa989af118a 100644 --- a/modules/openapi-generator/src/main/resources/Java/libraries/retrofit2/auth/HttpBasicAuth.mustache +++ b/modules/openapi-generator/src/main/resources/Java/libraries/retrofit2/auth/HttpBasicAuth.mustache @@ -12,7 +12,7 @@ public class HttpBasicAuth implements Interceptor { private String username; private String password; - + public String getUsername() { return username; } diff --git a/modules/openapi-generator/src/main/resources/Java/libraries/retrofit2/auth/OAuth.mustache b/modules/openapi-generator/src/main/resources/Java/libraries/retrofit2/auth/OAuth.mustache index 80ec7b3946cb2f75d01e0df91bbb99cbd49ec45b..88e4e62bf858842e48c353873d7ae3727f3c5208 100644 --- a/modules/openapi-generator/src/main/resources/Java/libraries/retrofit2/auth/OAuth.mustache +++ b/modules/openapi-generator/src/main/resources/Java/libraries/retrofit2/auth/OAuth.mustache @@ -66,7 +66,7 @@ public class OAuth implements Interceptor { break; default: break; - } + } } @Override @@ -133,7 +133,7 @@ public class OAuth implements Interceptor { * Returns true if the access token has been updated */ public synchronized boolean updateAccessToken(String requestAccessToken) throws IOException { - if (getAccessToken() == null || getAccessToken().equals(requestAccessToken)) { + if (getAccessToken() == null || getAccessToken().equals(requestAccessToken)) { try { OAuthJSONAccessTokenResponse accessTokenResponse = oauthClient.accessToken(this.tokenRequestBuilder.buildBodyMessage()); if (accessTokenResponse != null && accessTokenResponse.getAccessToken() != null) { diff --git a/modules/openapi-generator/src/main/resources/Java/libraries/retrofit2/auth/OAuthOkHttpClient.mustache b/modules/openapi-generator/src/main/resources/Java/libraries/retrofit2/auth/OAuthOkHttpClient.mustache index 423fa1ba0e52de3b26cc5d556b2c1ac9d80cd799..a499c7b8ba0825936cff689f3bb65e404fddb040 100644 --- a/modules/openapi-generator/src/main/resources/Java/libraries/retrofit2/auth/OAuthOkHttpClient.mustache +++ b/modules/openapi-generator/src/main/resources/Java/libraries/retrofit2/auth/OAuthOkHttpClient.mustache @@ -56,7 +56,7 @@ public class OAuthOkHttpClient implements HttpClient { try { Response response = client.newCall(requestBuilder.build()).execute(); return OAuthClientResponseFactory.createCustomResponse( - response.body().string(), + response.body().string(), response.body().contentType().toString(), response.code(), responseClass); diff --git a/modules/openapi-generator/src/main/resources/Java/libraries/retrofit2/play24/Play24CallAdapterFactory.mustache b/modules/openapi-generator/src/main/resources/Java/libraries/retrofit2/play24/Play24CallAdapterFactory.mustache index be7cac4a0d5e40c8993e4799285776669b3b07a3..d9ed3330fbd0edbc9c252a356b6c060b89fa0075 100644 --- a/modules/openapi-generator/src/main/resources/Java/libraries/retrofit2/play24/Play24CallAdapterFactory.mustache +++ b/modules/openapi-generator/src/main/resources/Java/libraries/retrofit2/play24/Play24CallAdapterFactory.mustache @@ -48,7 +48,7 @@ public class Play24CallAdapterFactory extends CallAdapter.Factory { return new ValueAdapter(resultType, includeResponse); } - + /** * Adapter that coverts values returned by API interface into CompletionStage */ diff --git a/modules/openapi-generator/src/main/resources/Java/libraries/retrofit2/play24/api.mustache b/modules/openapi-generator/src/main/resources/Java/libraries/retrofit2/play24/api.mustache index 088f249465082c3b8b8a883285a15d8b5518d93f..2b7512d192da9dfb293e29e02480ac51b7dc3203 100644 --- a/modules/openapi-generator/src/main/resources/Java/libraries/retrofit2/play24/api.mustache +++ b/modules/openapi-generator/src/main/resources/Java/libraries/retrofit2/play24/api.mustache @@ -33,7 +33,7 @@ public interface {{classname}} { {{#allParams}} * @param {{paramName}} {{description}}{{#required}} (required){{/required}}{{^required}} (optional{{#defaultValue}}, default to {{.}}{{/defaultValue}}){{/required}} {{/allParams}} - * @return Call<{{#returnType}}{{returnType}}{{/returnType}}{{^returnType}}Void{{/returnType}}> + * @return Call<{{returnType}}{{^returnType}}Void{{/returnType}}> {{#isDeprecated}} * @deprecated {{/isDeprecated}} @@ -56,7 +56,7 @@ public interface {{classname}} { {{/prioritizedContentTypes}} {{/formParams}} @{{httpMethod}}("{{{path}}}") - F.Promise<Response<{{#returnType}}{{{returnType}}}{{/returnType}}{{^returnType}}Void{{/returnType}}>> {{operationId}}({{^allParams}});{{/allParams}} + F.Promise<Response<{{{returnType}}}{{^returnType}}Void{{/returnType}}>> {{operationId}}({{^allParams}});{{/allParams}} {{#allParams}}{{>libraries/retrofit2/queryParams}}{{>libraries/retrofit2/pathParams}}{{>libraries/retrofit2/headerParams}}{{>libraries/retrofit2/bodyParams}}{{>libraries/retrofit2/formParams}}{{^-last}}, {{/-last}}{{#-last}} );{{/-last}}{{/allParams}} diff --git a/modules/openapi-generator/src/main/resources/Java/libraries/retrofit2/play25/Play25CallAdapterFactory.mustache b/modules/openapi-generator/src/main/resources/Java/libraries/retrofit2/play25/Play25CallAdapterFactory.mustache index 088c10b160acf7cdd10e5969b2f859757b7a8dc8..62360bf984c453c505ad30884a6eb345baf7b02b 100644 --- a/modules/openapi-generator/src/main/resources/Java/libraries/retrofit2/play25/Play25CallAdapterFactory.mustache +++ b/modules/openapi-generator/src/main/resources/Java/libraries/retrofit2/play25/Play25CallAdapterFactory.mustache @@ -114,4 +114,3 @@ public class Play25CallAdapterFactory extends CallAdapter.Factory { } } } - diff --git a/modules/openapi-generator/src/main/resources/Java/libraries/retrofit2/play25/api.mustache b/modules/openapi-generator/src/main/resources/Java/libraries/retrofit2/play25/api.mustache index dd59ee37ea296fde32ad152afb93bdc4822dbc9f..d4e97cc347b6651d9fc9e5dba5bd3b6fcb7d75b2 100644 --- a/modules/openapi-generator/src/main/resources/Java/libraries/retrofit2/play25/api.mustache +++ b/modules/openapi-generator/src/main/resources/Java/libraries/retrofit2/play25/api.mustache @@ -33,7 +33,7 @@ public interface {{classname}} { {{#allParams}} * @param {{paramName}} {{description}}{{#required}} (required){{/required}}{{^required}} (optional{{#defaultValue}}, default to {{.}}{{/defaultValue}}){{/required}} {{/allParams}} - * @return Call<{{#returnType}}{{returnType}}{{/returnType}}{{^returnType}}Void{{/returnType}}> + * @return Call<{{returnType}}{{^returnType}}Void{{/returnType}}> {{#isDeprecated}} * @deprecated {{/isDeprecated}} @@ -56,7 +56,7 @@ public interface {{classname}} { {{/prioritizedContentTypes}} {{/formParams}} @{{httpMethod}}("{{{path}}}") - CompletionStage<Response<{{#returnType}}{{{returnType}}}{{/returnType}}{{^returnType}}Void{{/returnType}}>> {{operationId}}({{^allParams}});{{/allParams}} + CompletionStage<Response<{{{returnType}}}{{^returnType}}Void{{/returnType}}>> {{operationId}}({{^allParams}});{{/allParams}} {{#allParams}}{{>libraries/retrofit2/queryParams}}{{>libraries/retrofit2/pathParams}}{{>libraries/retrofit2/headerParams}}{{>libraries/retrofit2/bodyParams}}{{>libraries/retrofit2/formParams}}{{^-last}}, {{/-last}}{{#-last}} );{{/-last}}{{/allParams}} diff --git a/modules/openapi-generator/src/main/resources/Java/libraries/retrofit2/play26/api.mustache b/modules/openapi-generator/src/main/resources/Java/libraries/retrofit2/play26/api.mustache index dd59ee37ea296fde32ad152afb93bdc4822dbc9f..d4e97cc347b6651d9fc9e5dba5bd3b6fcb7d75b2 100644 --- a/modules/openapi-generator/src/main/resources/Java/libraries/retrofit2/play26/api.mustache +++ b/modules/openapi-generator/src/main/resources/Java/libraries/retrofit2/play26/api.mustache @@ -33,7 +33,7 @@ public interface {{classname}} { {{#allParams}} * @param {{paramName}} {{description}}{{#required}} (required){{/required}}{{^required}} (optional{{#defaultValue}}, default to {{.}}{{/defaultValue}}){{/required}} {{/allParams}} - * @return Call<{{#returnType}}{{returnType}}{{/returnType}}{{^returnType}}Void{{/returnType}}> + * @return Call<{{returnType}}{{^returnType}}Void{{/returnType}}> {{#isDeprecated}} * @deprecated {{/isDeprecated}} @@ -56,7 +56,7 @@ public interface {{classname}} { {{/prioritizedContentTypes}} {{/formParams}} @{{httpMethod}}("{{{path}}}") - CompletionStage<Response<{{#returnType}}{{{returnType}}}{{/returnType}}{{^returnType}}Void{{/returnType}}>> {{operationId}}({{^allParams}});{{/allParams}} + CompletionStage<Response<{{{returnType}}}{{^returnType}}Void{{/returnType}}>> {{operationId}}({{^allParams}});{{/allParams}} {{#allParams}}{{>libraries/retrofit2/queryParams}}{{>libraries/retrofit2/pathParams}}{{>libraries/retrofit2/headerParams}}{{>libraries/retrofit2/bodyParams}}{{>libraries/retrofit2/formParams}}{{^-last}}, {{/-last}}{{#-last}} );{{/-last}}{{/allParams}} diff --git a/modules/openapi-generator/src/main/resources/Java/libraries/vertx/ApiClient.mustache b/modules/openapi-generator/src/main/resources/Java/libraries/vertx/ApiClient.mustache index 95951e3c06af43483fb84d8f846a7367f59984a6..b3668e995adec903c8297be8b0ecb09235c6d90a 100644 --- a/modules/openapi-generator/src/main/resources/Java/libraries/vertx/ApiClient.mustache +++ b/modules/openapi-generator/src/main/resources/Java/libraries/vertx/ApiClient.mustache @@ -656,7 +656,7 @@ public class ApiClient{{#jsr310}} extends JavaTimeFormatter{{/jsr310}} { protected WebClient buildWebClient(Vertx vertx, JsonObject config) { if (!config.containsKey("userAgent")) { - config.put("userAgent", "{{#httpUserAgent}}{{{.}}}{{/httpUserAgent}}{{^httpUserAgent}}OpenAPI-Generator/{{{artifactVersion}}}/java{{/httpUserAgent}}"); + config.put("userAgent", "{{{httpUserAgent}}}{{^httpUserAgent}}OpenAPI-Generator/{{{artifactVersion}}}/java{{/httpUserAgent}}"); } return WebClient.create(vertx, new WebClientOptions(config)); diff --git a/modules/openapi-generator/src/main/resources/Java/libraries/vertx/api.mustache b/modules/openapi-generator/src/main/resources/Java/libraries/vertx/api.mustache index 1f20fa386d3c928529b5e4bf96e78552d156483f..b81c0610065921afc236d32a22b427d0e0ffa7ee 100644 --- a/modules/openapi-generator/src/main/resources/Java/libraries/vertx/api.mustache +++ b/modules/openapi-generator/src/main/resources/Java/libraries/vertx/api.mustache @@ -16,12 +16,12 @@ public interface {{classname}} { {{#isDeprecated}} @Deprecated {{/isDeprecated}} - void {{operationId}}({{#allParams}}{{{dataType}}} {{paramName}}, {{/allParams}}Handler<AsyncResult<{{#returnType}}{{{returnType}}}{{/returnType}}{{^returnType}}Void{{/returnType}}>> handler); + void {{operationId}}({{#allParams}}{{{dataType}}} {{paramName}}, {{/allParams}}Handler<AsyncResult<{{{returnType}}}{{^returnType}}Void{{/returnType}}>> handler); {{#isDeprecated}} @Deprecated {{/isDeprecated}} - void {{operationId}}({{#allParams}}{{{dataType}}} {{paramName}}, {{/allParams}}ApiClient.AuthInfo authInfo, Handler<AsyncResult<{{#returnType}}{{{returnType}}}{{/returnType}}{{^returnType}}Void{{/returnType}}>> handler); + void {{operationId}}({{#allParams}}{{{dataType}}} {{paramName}}, {{/allParams}}ApiClient.AuthInfo authInfo, Handler<AsyncResult<{{{returnType}}}{{^returnType}}Void{{/returnType}}>> handler); {{/operation}} {{/operations}} diff --git a/modules/openapi-generator/src/main/resources/Java/libraries/vertx/apiImpl.mustache b/modules/openapi-generator/src/main/resources/Java/libraries/vertx/apiImpl.mustache index e9e9a2fe7de2f33c8fcdb9151cefd3bf38a696f6..35daaade98f272226c14f52577f102230d9f333e 100644 --- a/modules/openapi-generator/src/main/resources/Java/libraries/vertx/apiImpl.mustache +++ b/modules/openapi-generator/src/main/resources/Java/libraries/vertx/apiImpl.mustache @@ -51,7 +51,7 @@ public class {{classname}}Impl implements {{classname}} { {{/allParams}} * @param resultHandler Asynchronous result handler */ - public void {{operationId}}({{#allParams}}{{{dataType}}} {{paramName}}, {{/allParams}}Handler<AsyncResult<{{#returnType}}{{{returnType}}}{{/returnType}}{{^returnType}}Void{{/returnType}}>> resultHandler) { + public void {{operationId}}({{#allParams}}{{{dataType}}} {{paramName}}, {{/allParams}}Handler<AsyncResult<{{{returnType}}}{{^returnType}}Void{{/returnType}}>> resultHandler) { {{operationId}}({{#allParams}}{{paramName}}, {{/allParams}}null, resultHandler); } @@ -64,7 +64,7 @@ public class {{classname}}Impl implements {{classname}} { * @param authInfo per call authentication override. * @param resultHandler Asynchronous result handler */ - public void {{operationId}}({{#allParams}}{{{dataType}}} {{paramName}}, {{/allParams}}ApiClient.AuthInfo authInfo, Handler<AsyncResult<{{#returnType}}{{{returnType}}}{{/returnType}}{{^returnType}}Void{{/returnType}}>> resultHandler) { + public void {{operationId}}({{#allParams}}{{{dataType}}} {{paramName}}, {{/allParams}}ApiClient.AuthInfo authInfo, Handler<AsyncResult<{{{returnType}}}{{^returnType}}Void{{/returnType}}>> resultHandler) { Object localVarBody = {{#bodyParam}}{{paramName}}{{/bodyParam}}{{^bodyParam}}null{{/bodyParam}}; {{#allParams}}{{#required}} // verify the required parameter '{{paramName}}' is set @@ -79,7 +79,7 @@ public class {{classname}}Impl implements {{classname}} { // query params List<Pair> localVarQueryParams = new ArrayList<>(); {{#queryParams}} - localVarQueryParams.addAll(apiClient.parameterToPairs("{{#collectionFormat}}{{{collectionFormat}}}{{/collectionFormat}}", "{{baseName}}", {{paramName}})); + localVarQueryParams.addAll(apiClient.parameterToPairs("{{{collectionFormat}}}", "{{baseName}}", {{paramName}})); {{/queryParams}} // header params 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 40968fa3cc169c6fd3681a9a6fa0f81c59208d91..5432485d9dfe14c5af43c54be878b0d939fbd8f2 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 @@ -223,7 +223,7 @@ <artifactId>jsr305</artifactId> <version>3.0.2</version> </dependency> - + <!-- Vertx --> <dependency> <groupId>io.vertx</groupId> diff --git a/modules/openapi-generator/src/main/resources/Java/libraries/vertx/rxApiImpl.mustache b/modules/openapi-generator/src/main/resources/Java/libraries/vertx/rxApiImpl.mustache index f1f5d0323f511442679e5bf48a726d2106a03e4b..f01030420284636a68d79ea79bd156b8e82a7fbe 100644 --- a/modules/openapi-generator/src/main/resources/Java/libraries/vertx/rxApiImpl.mustache +++ b/modules/openapi-generator/src/main/resources/Java/libraries/vertx/rxApiImpl.mustache @@ -33,7 +33,7 @@ public class {{classname}} { {{/allParams}} * @param resultHandler Asynchronous result handler */ - public void {{operationId}}({{#allParams}}{{{dataType}}} {{paramName}}, {{/allParams}}Handler<AsyncResult<{{#returnType}}{{{returnType}}}{{/returnType}}{{^returnType}}Void{{/returnType}}>> resultHandler) { + public void {{operationId}}({{#allParams}}{{{dataType}}} {{paramName}}, {{/allParams}}Handler<AsyncResult<{{{returnType}}}{{^returnType}}Void{{/returnType}}>> resultHandler) { delegate.{{operationId}}({{#allParams}}{{paramName}}, {{/allParams}}resultHandler); } @@ -46,7 +46,7 @@ public class {{classname}} { * @param authInfo call specific auth overrides * @param resultHandler Asynchronous result handler */ - public void {{operationId}}({{#allParams}}{{{dataType}}} {{paramName}}, {{/allParams}}ApiClient.AuthInfo authInfo, Handler<AsyncResult<{{#returnType}}{{{returnType}}}{{/returnType}}{{^returnType}}Void{{/returnType}}>> resultHandler) { + public void {{operationId}}({{#allParams}}{{{dataType}}} {{paramName}}, {{/allParams}}ApiClient.AuthInfo authInfo, Handler<AsyncResult<{{{returnType}}}{{^returnType}}Void{{/returnType}}>> resultHandler) { delegate.{{operationId}}({{#allParams}}{{paramName}}, {{/allParams}}authInfo, resultHandler); } @@ -58,7 +58,7 @@ public class {{classname}} { {{/allParams}} * @return Asynchronous result handler (RxJava Single) */ - public Single<{{#returnType}}{{{returnType}}}{{/returnType}}{{^returnType}}Void{{/returnType}}> rx{{operationIdCamelCase}}({{#allParams}}{{{dataType}}} {{paramName}}{{^-last}}, {{/-last}}{{/allParams}}) { + public Single<{{{returnType}}}{{^returnType}}Void{{/returnType}}> rx{{operationIdCamelCase}}({{#allParams}}{{{dataType}}} {{paramName}}{{^-last}}, {{/-last}}{{/allParams}}) { return Single.create(new io.vertx.rx.java.SingleOnSubscribeAdapter<>(fut -> delegate.{{operationId}}({{#allParams}}{{paramName}}, {{/allParams}}fut) )); @@ -73,7 +73,7 @@ public class {{classname}} { * @param authInfo call specific auth overrides * @return Asynchronous result handler (RxJava Single) */ - public Single<{{#returnType}}{{{returnType}}}{{/returnType}}{{^returnType}}Void{{/returnType}}> rx{{operationIdCamelCase}}({{#allParams}}{{{dataType}}} {{paramName}}, {{/allParams}}ApiClient.AuthInfo authInfo) { + public Single<{{{returnType}}}{{^returnType}}Void{{/returnType}}> rx{{operationIdCamelCase}}({{#allParams}}{{{dataType}}} {{paramName}}, {{/allParams}}ApiClient.AuthInfo authInfo) { return Single.create(new io.vertx.rx.java.SingleOnSubscribeAdapter<>(fut -> delegate.{{operationId}}({{#allParams}}{{paramName}}, {{/allParams}}authInfo, fut) )); diff --git a/modules/openapi-generator/src/main/resources/Java/libraries/webclient/api.mustache b/modules/openapi-generator/src/main/resources/Java/libraries/webclient/api.mustache index 2f79b92931569d96c40194751ea5b6b696c025c3..166a4fbcd29e79b7dab1023a3d601b9e82bdabeb 100644 --- a/modules/openapi-generator/src/main/resources/Java/libraries/webclient/api.mustache +++ b/modules/openapi-generator/src/main/resources/Java/libraries/webclient/api.mustache @@ -54,9 +54,9 @@ public class {{classname}} { /** * {{summary}} * {{notes}} -{{#responses}} * <p><b>{{code}}</b>{{#message}} - {{message}}{{/message}} +{{#responses}} * <p><b>{{code}}</b>{{#message}} - {{.}}{{/message}} {{/responses}}{{#allParams}} * @param {{paramName}} {{description}}{{^description}}The {{paramName}} parameter{{/description}} -{{/allParams}}{{#returnType}} * @return {{returnType}} +{{/allParams}}{{#returnType}} * @return {{.}} {{/returnType}} * @throws WebClientResponseException if an error occurs while attempting to invoke the API {{#externalDocs}} * {{description}} @@ -95,7 +95,7 @@ public class {{classname}} { {{#hasQueryParams}} {{#queryParams}} - queryParams.putAll(apiClient.parameterToMultiValueMap({{#collectionFormat}}ApiClient.CollectionFormat.valueOf("{{{collectionFormat}}}".toUpperCase(Locale.ROOT)){{/collectionFormat}}{{^collectionFormat}}null{{/collectionFormat}}, "{{baseName}}", {{paramName}})); + queryParams.putAll(apiClient.parameterToMultiValueMap({{#collectionFormat}}ApiClient.CollectionFormat.valueOf("{{{.}}}".toUpperCase(Locale.ROOT)){{/collectionFormat}}{{^collectionFormat}}null{{/collectionFormat}}, "{{baseName}}", {{paramName}})); {{/queryParams}} {{/hasQueryParams}} {{#hasHeaderParams}} @@ -109,7 +109,7 @@ public class {{classname}} { {{#hasCookieParams}} {{#cookieParams}} - cookieParams.putAll(apiClient.parameterToMultiValueMap({{#collectionFormat}}ApiClient.CollectionFormat.valueOf("{{{collectionFormat}}}".toUpperCase(Locale.ROOT)){{/collectionFormat}}{{^collectionFormat}}null{{/collectionFormat}}, "{{baseName}}", {{paramName}})); + cookieParams.putAll(apiClient.parameterToMultiValueMap({{#collectionFormat}}ApiClient.CollectionFormat.valueOf("{{{.}}}".toUpperCase(Locale.ROOT)){{/collectionFormat}}{{^collectionFormat}}null{{/collectionFormat}}, "{{baseName}}", {{paramName}})); {{/cookieParams}} {{/hasCookieParams}} {{#hasFormParams}} @@ -138,9 +138,9 @@ public class {{classname}} { /** * {{summary}} * {{notes}} -{{#responses}} * <p><b>{{code}}</b>{{#message}} - {{message}}{{/message}} +{{#responses}} * <p><b>{{code}}</b>{{#message}} - {{.}}{{/message}} {{/responses}}{{#allParams}} * @param {{paramName}} {{description}}{{^description}}The {{paramName}} parameter{{/description}} -{{/allParams}}{{#returnType}} * @return {{returnType}} +{{/allParams}}{{#returnType}} * @return {{.}} {{/returnType}} * @throws WebClientResponseException if an error occurs while attempting to invoke the API {{#externalDocs}} * {{description}} diff --git a/modules/openapi-generator/src/main/resources/Java/libraries/webclient/api_test.mustache b/modules/openapi-generator/src/main/resources/Java/libraries/webclient/api_test.mustache index a4757694c5b95e94f9869e43a93d42240a1313e3..b9aea5320fa66be56b56ce637dd0beee9c11a94c 100644 --- a/modules/openapi-generator/src/main/resources/Java/libraries/webclient/api_test.mustache +++ b/modules/openapi-generator/src/main/resources/Java/libraries/webclient/api_test.mustache @@ -34,7 +34,7 @@ public class {{classname}}Test { {{#allParams}} {{#isFile}}{{#useAbstractionForFiles}}{{#collectionFormat}}java.util.Collection<org.springframework.core.io.AbstractResource>{{/collectionFormat}}{{^collectionFormat}}org.springframework.core.io.AbstractResource{{/collectionFormat}}{{/useAbstractionForFiles}}{{^useAbstractionForFiles}}{{{dataType}}}{{/useAbstractionForFiles}}{{/isFile}}{{^isFile}}{{{dataType}}}{{/isFile}} {{paramName}} = null; {{/allParams}} - {{#returnType}}{{{returnType}}} response = {{/returnType}}api.{{operationId}}({{#allParams}}{{paramName}}{{^-last}}, {{/-last}}{{/allParams}}){{#isArray}}{{#uniqueItems}}.collect(Collectors.toSet()){{/uniqueItems}}{{^uniqueItems}}.collectList(){{/uniqueItems}}.block(){{/isArray}}{{^isArray}}.block(){{/isArray}}; + {{#returnType}}{{{.}}} response = {{/returnType}}api.{{operationId}}({{#allParams}}{{paramName}}{{^-last}}, {{/-last}}{{/allParams}}){{#isArray}}{{#uniqueItems}}.collect(Collectors.toSet()){{/uniqueItems}}{{^uniqueItems}}.collectList(){{/uniqueItems}}.block(){{/isArray}}{{^isArray}}.block(){{/isArray}}; // TODO: test validations } diff --git a/modules/openapi-generator/src/main/resources/Java/libraries/webclient/build.gradle.mustache b/modules/openapi-generator/src/main/resources/Java/libraries/webclient/build.gradle.mustache index c335e7ad4419d4d4e1132d3d79ce7003dfed3090..9d352d127f9ab73f0ee3c21aab191dd309853e96 100644 --- a/modules/openapi-generator/src/main/resources/Java/libraries/webclient/build.gradle.mustache +++ b/modules/openapi-generator/src/main/resources/Java/libraries/webclient/build.gradle.mustache @@ -105,7 +105,7 @@ if(hasProperty('target') && target == 'android') { main = System.getProperty('mainClass') classpath = sourceSets.main.runtimeClasspath } - + task sourcesJar(type: Jar, dependsOn: classes) { classifier = 'sources' from sourceSets.main.allSource @@ -162,4 +162,3 @@ dependencies { implementation "javax.annotation:javax.annotation-api:$javax_annotation_version" testImplementation "junit:junit:$junit_version" } - 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 67a888863b49175125ae7c3fef9dcded3f0856b8..0b24d140966c37e70284152d090cbacd5854764f 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 @@ -71,7 +71,7 @@ <artifactId>swagger-annotations</artifactId> <version>${swagger-annotations-version}</version> </dependency> - + <!-- @Nullable annotation --> <dependency> <groupId>com.google.code.findbugs</groupId> diff --git a/modules/openapi-generator/src/main/resources/Java/licenseInfo.mustache b/modules/openapi-generator/src/main/resources/Java/licenseInfo.mustache index abc2f4578eb3a74da1c599037f36320cce106881..c66209f27947736c332b626a6f2fbf0789f4b98d 100644 --- a/modules/openapi-generator/src/main/resources/Java/licenseInfo.mustache +++ b/modules/openapi-generator/src/main/resources/Java/licenseInfo.mustache @@ -2,8 +2,8 @@ * {{{appName}}} * {{{appDescription}}} * - * {{#version}}The version of the OpenAPI document: {{{version}}}{{/version}} - * {{#infoEmail}}Contact: {{{infoEmail}}}{{/infoEmail}} + * {{#version}}The version of the OpenAPI document: {{{.}}}{{/version}} + * {{#infoEmail}}Contact: {{{.}}}{{/infoEmail}} * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech diff --git a/modules/openapi-generator/src/main/resources/Java/modelEnum.mustache b/modules/openapi-generator/src/main/resources/Java/modelEnum.mustache index 207a937ebdeaae7bcca7ed7bed52e76793ee2a8c..f81c7c93ff1362b89b27421a2f9507db317e1aca 100644 --- a/modules/openapi-generator/src/main/resources/Java/modelEnum.mustache +++ b/modules/openapi-generator/src/main/resources/Java/modelEnum.mustache @@ -11,20 +11,20 @@ import com.google.gson.stream.JsonWriter; {{/gson}} /** - * {{^description}}Gets or Sets {{{name}}}{{/description}}{{#description}}{{description}}{{/description}} + * {{description}}{{^description}}Gets or Sets {{{name}}}{{/description}} */ {{#gson}} -@JsonAdapter({{#datatypeWithEnum}}{{{.}}}{{/datatypeWithEnum}}{{^datatypeWithEnum}}{{{classname}}}{{/datatypeWithEnum}}.Adapter.class) +@JsonAdapter({{{datatypeWithEnum}}}{{^datatypeWithEnum}}{{{classname}}}{{/datatypeWithEnum}}.Adapter.class) {{/gson}} {{#jsonb}} @JsonbTypeSerializer({{datatypeWithEnum}}.Serializer.class) @JsonbTypeDeserializer({{datatypeWithEnum}}.Deserializer.class) {{/jsonb}} -{{>additionalEnumTypeAnnotations}}public enum {{#datatypeWithEnum}}{{{.}}}{{/datatypeWithEnum}}{{^datatypeWithEnum}}{{{classname}}}{{/datatypeWithEnum}} { +{{>additionalEnumTypeAnnotations}}public enum {{{datatypeWithEnum}}}{{^datatypeWithEnum}}{{{classname}}}{{/datatypeWithEnum}} { {{#allowableValues}}{{#enumVars}} {{#enumDescription}} /** - * {{enumDescription}} + * {{.}} */ {{/enumDescription}} {{#withXml}} @@ -35,7 +35,7 @@ import com.google.gson.stream.JsonWriter; private {{{dataType}}} value; - {{#datatypeWithEnum}}{{{.}}}{{/datatypeWithEnum}}{{^datatypeWithEnum}}{{{classname}}}{{/datatypeWithEnum}}({{{dataType}}} value) { + {{{datatypeWithEnum}}}{{^datatypeWithEnum}}{{{classname}}}{{/datatypeWithEnum}}({{{dataType}}} value) { this.value = value; } @@ -54,8 +54,8 @@ import com.google.gson.stream.JsonWriter; {{#jackson}} @JsonCreator {{/jackson}} - public static {{#datatypeWithEnum}}{{{.}}}{{/datatypeWithEnum}}{{^datatypeWithEnum}}{{{classname}}}{{/datatypeWithEnum}} fromValue({{{dataType}}} value) { - for ({{#datatypeWithEnum}}{{{.}}}{{/datatypeWithEnum}}{{^datatypeWithEnum}}{{{classname}}}{{/datatypeWithEnum}} b : {{#datatypeWithEnum}}{{{.}}}{{/datatypeWithEnum}}{{^datatypeWithEnum}}{{{classname}}}{{/datatypeWithEnum}}.values()) { + public static {{{datatypeWithEnum}}}{{^datatypeWithEnum}}{{{classname}}}{{/datatypeWithEnum}} fromValue({{{dataType}}} value) { + for ({{{datatypeWithEnum}}}{{^datatypeWithEnum}}{{{classname}}}{{/datatypeWithEnum}} b : {{{datatypeWithEnum}}}{{^datatypeWithEnum}}{{{classname}}}{{/datatypeWithEnum}}.values()) { if (b.value.equals(value)) { return b; } @@ -64,16 +64,16 @@ import com.google.gson.stream.JsonWriter; } {{#gson}} - public static class Adapter extends TypeAdapter<{{#datatypeWithEnum}}{{{.}}}{{/datatypeWithEnum}}{{^datatypeWithEnum}}{{{classname}}}{{/datatypeWithEnum}}> { + public static class Adapter extends TypeAdapter<{{{datatypeWithEnum}}}{{^datatypeWithEnum}}{{{classname}}}{{/datatypeWithEnum}}> { @Override - public void write(final JsonWriter jsonWriter, final {{#datatypeWithEnum}}{{{.}}}{{/datatypeWithEnum}}{{^datatypeWithEnum}}{{{classname}}}{{/datatypeWithEnum}} enumeration) throws IOException { + public void write(final JsonWriter jsonWriter, final {{{datatypeWithEnum}}}{{^datatypeWithEnum}}{{{classname}}}{{/datatypeWithEnum}} enumeration) throws IOException { jsonWriter.value(enumeration.getValue()); } @Override - public {{#datatypeWithEnum}}{{{.}}}{{/datatypeWithEnum}}{{^datatypeWithEnum}}{{{classname}}}{{/datatypeWithEnum}} read(final JsonReader jsonReader) throws IOException { + public {{{datatypeWithEnum}}}{{^datatypeWithEnum}}{{{classname}}}{{/datatypeWithEnum}} read(final JsonReader jsonReader) throws IOException { {{^isNumber}}{{{dataType}}}{{/isNumber}}{{#isNumber}}String{{/isNumber}} value = jsonReader.{{#isNumber}}nextString(){{/isNumber}}{{#isInteger}}nextInt(){{/isInteger}}{{^isNumber}}{{^isInteger}}next{{{dataType}}}(){{/isInteger}}{{/isNumber}}; - return {{#datatypeWithEnum}}{{{.}}}{{/datatypeWithEnum}}{{^datatypeWithEnum}}{{{classname}}}{{/datatypeWithEnum}}.fromValue({{#isNumber}}new BigDecimal({{/isNumber}}value{{#isNumber}}){{/isNumber}}); + return {{{datatypeWithEnum}}}{{^datatypeWithEnum}}{{{classname}}}{{/datatypeWithEnum}}.fromValue({{#isNumber}}new BigDecimal({{/isNumber}}value{{#isNumber}}){{/isNumber}}); } } {{/gson}} @@ -81,7 +81,7 @@ import com.google.gson.stream.JsonWriter; public static final class Deserializer implements JsonbDeserializer<{{datatypeWithEnum}}> { @Override public {{datatypeWithEnum}} deserialize(JsonParser parser, DeserializationContext ctx, Type rtType) { - for ({{#datatypeWithEnum}}{{{.}}}{{/datatypeWithEnum}}{{^datatypeWithEnum}}{{{classname}}}{{/datatypeWithEnum}} b : {{#datatypeWithEnum}}{{{.}}}{{/datatypeWithEnum}}{{^datatypeWithEnum}}{{{classname}}}{{/datatypeWithEnum}}.values()) { + for ({{{datatypeWithEnum}}}{{^datatypeWithEnum}}{{{classname}}}{{/datatypeWithEnum}} b : {{{datatypeWithEnum}}}{{^datatypeWithEnum}}{{{classname}}}{{/datatypeWithEnum}}.values()) { if (String.valueOf(b.value).equals(parser.getString())) { return b; } diff --git a/modules/openapi-generator/src/main/resources/Java/modelInnerEnum.mustache b/modules/openapi-generator/src/main/resources/Java/modelInnerEnum.mustache index e0a194d6ba6f336fcbf6b557a5ac41715c2cd336..a9c99783fd0fec1974404319e7106d4b4f17e329 100644 --- a/modules/openapi-generator/src/main/resources/Java/modelInnerEnum.mustache +++ b/modules/openapi-generator/src/main/resources/Java/modelInnerEnum.mustache @@ -1,8 +1,8 @@ /** - * {{^description}}Gets or Sets {{{name}}}{{/description}}{{#description}}{{description}}{{/description}} + * {{description}}{{^description}}Gets or Sets {{{name}}}{{/description}} */ {{#gson}} - @JsonAdapter({{#datatypeWithEnum}}{{{.}}}{{/datatypeWithEnum}}{{^datatypeWithEnum}}{{classname}}{{/datatypeWithEnum}}.Adapter.class) + @JsonAdapter({{{datatypeWithEnum}}}{{^datatypeWithEnum}}{{classname}}{{/datatypeWithEnum}}.Adapter.class) {{/gson}} {{#jsonb}} @JsonbTypeSerializer({{datatypeWithEnum}}.Serializer.class) @@ -12,12 +12,12 @@ @XmlType(name="{{datatypeWithEnum}}") @XmlEnum({{dataType}}.class) {{/withXml}} - {{>additionalEnumTypeAnnotations}}public enum {{#datatypeWithEnum}}{{{.}}}{{/datatypeWithEnum}}{{^datatypeWithEnum}}{{classname}}{{/datatypeWithEnum}} { + {{>additionalEnumTypeAnnotations}}public enum {{{datatypeWithEnum}}}{{^datatypeWithEnum}}{{classname}}{{/datatypeWithEnum}} { {{#allowableValues}} {{#enumVars}} {{#enumDescription}} /** - * {{enumDescription}} + * {{.}} */ {{/enumDescription}} {{#withXml}} @@ -30,7 +30,7 @@ private {{{dataType}}} value; - {{#datatypeWithEnum}}{{{.}}}{{/datatypeWithEnum}}{{^datatypeWithEnum}}{{classname}}{{/datatypeWithEnum}}({{{dataType}}} value) { + {{{datatypeWithEnum}}}{{^datatypeWithEnum}}{{classname}}{{/datatypeWithEnum}}({{{dataType}}} value) { this.value = value; } @@ -49,8 +49,8 @@ {{#jackson}} @JsonCreator {{/jackson}} - public static {{#datatypeWithEnum}}{{{.}}}{{/datatypeWithEnum}}{{^datatypeWithEnum}}{{{classname}}}{{/datatypeWithEnum}} fromValue({{{dataType}}} value) { - for ({{#datatypeWithEnum}}{{{.}}}{{/datatypeWithEnum}}{{^datatypeWithEnum}}{{{classname}}}{{/datatypeWithEnum}} b : {{#datatypeWithEnum}}{{{.}}}{{/datatypeWithEnum}}{{^datatypeWithEnum}}{{{classname}}}{{/datatypeWithEnum}}.values()) { + public static {{{datatypeWithEnum}}}{{^datatypeWithEnum}}{{{classname}}}{{/datatypeWithEnum}} fromValue({{{dataType}}} value) { + for ({{{datatypeWithEnum}}}{{^datatypeWithEnum}}{{{classname}}}{{/datatypeWithEnum}} b : {{{datatypeWithEnum}}}{{^datatypeWithEnum}}{{{classname}}}{{/datatypeWithEnum}}.values()) { if (b.value.equals(value)) { return b; } @@ -59,16 +59,16 @@ } {{#gson}} - public static class Adapter extends TypeAdapter<{{#datatypeWithEnum}}{{{.}}}{{/datatypeWithEnum}}{{^datatypeWithEnum}}{{classname}}{{/datatypeWithEnum}}> { + public static class Adapter extends TypeAdapter<{{{datatypeWithEnum}}}{{^datatypeWithEnum}}{{classname}}{{/datatypeWithEnum}}> { @Override - public void write(final JsonWriter jsonWriter, final {{#datatypeWithEnum}}{{{.}}}{{/datatypeWithEnum}}{{^datatypeWithEnum}}{{classname}}{{/datatypeWithEnum}} enumeration) throws IOException { + public void write(final JsonWriter jsonWriter, final {{{datatypeWithEnum}}}{{^datatypeWithEnum}}{{classname}}{{/datatypeWithEnum}} enumeration) throws IOException { jsonWriter.value(enumeration.getValue()); } @Override - public {{#datatypeWithEnum}}{{{.}}}{{/datatypeWithEnum}}{{^datatypeWithEnum}}{{classname}}{{/datatypeWithEnum}} read(final JsonReader jsonReader) throws IOException { + public {{{datatypeWithEnum}}}{{^datatypeWithEnum}}{{classname}}{{/datatypeWithEnum}} read(final JsonReader jsonReader) throws IOException { {{^isNumber}}{{{dataType}}}{{/isNumber}}{{#isNumber}}String{{/isNumber}} value = {{#isFloat}}(float){{/isFloat}} jsonReader.{{#isNumber}}nextString(){{/isNumber}}{{#isInteger}}nextInt(){{/isInteger}}{{^isNumber}}{{^isInteger}}{{#isFloat}}nextDouble{{/isFloat}}{{^isFloat}}next{{{dataType}}}{{/isFloat}}(){{/isInteger}}{{/isNumber}}; - return {{#datatypeWithEnum}}{{{.}}}{{/datatypeWithEnum}}{{^datatypeWithEnum}}{{classname}}{{/datatypeWithEnum}}.fromValue({{#isNumber}}new BigDecimal({{/isNumber}}value{{#isNumber}}){{/isNumber}}); + return {{{datatypeWithEnum}}}{{^datatypeWithEnum}}{{classname}}{{/datatypeWithEnum}}.fromValue({{#isNumber}}new BigDecimal({{/isNumber}}value{{#isNumber}}){{/isNumber}}); } } {{/gson}} @@ -76,7 +76,7 @@ public static final class Deserializer implements JsonbDeserializer<{{datatypeWithEnum}}> { @Override public {{datatypeWithEnum}} deserialize(JsonParser parser, DeserializationContext ctx, Type rtType) { - for ({{#datatypeWithEnum}}{{{.}}}{{/datatypeWithEnum}}{{^datatypeWithEnum}}{{{classname}}}{{/datatypeWithEnum}} b : {{#datatypeWithEnum}}{{{.}}}{{/datatypeWithEnum}}{{^datatypeWithEnum}}{{{classname}}}{{/datatypeWithEnum}}.values()) { + for ({{{datatypeWithEnum}}}{{^datatypeWithEnum}}{{{classname}}}{{/datatypeWithEnum}} b : {{{datatypeWithEnum}}}{{^datatypeWithEnum}}{{{classname}}}{{/datatypeWithEnum}}.values()) { if (String.valueOf(b.value).equals(parser.getString())) { return b; } diff --git a/modules/openapi-generator/src/main/resources/Java/pojo.mustache b/modules/openapi-generator/src/main/resources/Java/pojo.mustache index 77d080ccba326ece10a080bdded4c54355328d8c..b9be16ad565520619a606feb867412702b6dd9c5 100644 --- a/modules/openapi-generator/src/main/resources/Java/pojo.mustache +++ b/modules/openapi-generator/src/main/resources/Java/pojo.mustache @@ -1,9 +1,9 @@ /** - * {{#description}}{{.}}{{/description}}{{^description}}{{classname}}{{/description}}{{#isDeprecated}} + * {{description}}{{^description}}{{classname}}{{/description}}{{#isDeprecated}} * @deprecated{{/isDeprecated}} */{{#isDeprecated}} @Deprecated{{/isDeprecated}}{{#description}} -@ApiModel(description = "{{{description}}}"){{/description}} +@ApiModel(description = "{{{.}}}"){{/description}} {{#jackson}} @JsonPropertyOrder({ {{#vars}} @@ -13,7 +13,7 @@ @JsonTypeName("{{name}}") {{/jackson}} {{>additionalModelTypeAnnotations}}{{>generatedAnnotation}}{{#discriminator}}{{>typeInfoAnnotation}}{{/discriminator}}{{>xmlAnnotation}} -public class {{classname}} {{#parent}}extends {{{parent}}} {{/parent}}{{#vendorExtensions.x-implements}}{{#-first}}implements {{{.}}}{{/-first}}{{^-first}}, {{{.}}}{{/-first}}{{#-last}} {{/-last}}{{/vendorExtensions.x-implements}}{ +public class {{classname}} {{#parent}}extends {{{.}}} {{/parent}}{{#vendorExtensions.x-implements}}{{#-first}}implements {{{.}}}{{/-first}}{{^-first}}, {{{.}}}{{/-first}}{{#-last}} {{/-last}}{{/vendorExtensions.x-implements}}{ {{#serializableModel}} private static final long serialVersionUID = 1L; @@ -37,21 +37,21 @@ public class {{classname}} {{#parent}}extends {{{parent}}} {{/parent}}{{#vendorE {{/jackson}} {{#withXml}} {{#isXmlAttribute}} - @XmlAttribute(name = "{{#xmlName}}{{xmlName}}{{/xmlName}}{{^xmlName}}{{baseName}}{{/xmlName}}") + @XmlAttribute(name = "{{xmlName}}{{^xmlName}}{{baseName}}{{/xmlName}}") {{/isXmlAttribute}} {{^isXmlAttribute}} {{^isContainer}} - @XmlElement({{#xmlNamespace}}namespace="{{xmlNamespace}}", {{/xmlNamespace}}name = "{{#xmlName}}{{xmlName}}{{/xmlName}}{{^xmlName}}{{baseName}}{{/xmlName}}") + @XmlElement({{#xmlNamespace}}namespace="{{.}}", {{/xmlNamespace}}name = "{{xmlName}}{{^xmlName}}{{baseName}}{{/xmlName}}") {{/isContainer}} {{#isContainer}} // Is a container wrapped={{isXmlWrapped}} {{#items}} // items.name={{name}} items.baseName={{baseName}} items.xmlName={{xmlName}} items.xmlNamespace={{xmlNamespace}} // items.example={{example}} items.type={{dataType}} - @XmlElement({{#xmlNamespace}}namespace="{{xmlNamespace}}", {{/xmlNamespace}}name = "{{#xmlName}}{{xmlName}}{{/xmlName}}{{^xmlName}}{{baseName}}{{/xmlName}}") + @XmlElement({{#xmlNamespace}}namespace="{{.}}", {{/xmlNamespace}}name = "{{xmlName}}{{^xmlName}}{{baseName}}{{/xmlName}}") {{/items}} {{#isXmlWrapped}} - @XmlElementWrapper({{#xmlNamespace}}namespace="{{xmlNamespace}}", {{/xmlNamespace}}name = "{{#xmlName}}{{xmlName}}{{/xmlName}}{{^xmlName}}{{baseName}}{{/xmlName}}") + @XmlElementWrapper({{#xmlNamespace}}namespace="{{.}}", {{/xmlNamespace}}name = "{{xmlName}}{{^xmlName}}{{baseName}}{{/xmlName}}") {{/isXmlWrapped}} {{/isContainer}} {{/isXmlAttribute}} @@ -160,16 +160,16 @@ public class {{classname}} {{#parent}}extends {{{parent}}} {{/parent}}{{#vendorE {{/isReadOnly}} /** {{#description}} - * {{description}} + * {{.}} {{/description}} {{^description}} * Get {{name}} {{/description}} {{#minimum}} - * minimum: {{minimum}} + * minimum: {{.}} {{/minimum}} {{#maximum}} - * maximum: {{maximum}} + * maximum: {{.}} {{/maximum}} * @return {{name}} {{#deprecated}} @@ -193,7 +193,7 @@ public class {{classname}} {{#parent}}extends {{{parent}}} {{/parent}}{{#vendorE {{#jsonb}} @JsonbProperty("{{baseName}}") {{/jsonb}} -{{#useBeanValidation}}{{>beanValidation}}{{/useBeanValidation}} @ApiModelProperty({{#example}}example = "{{{example}}}", {{/example}}{{#required}}required = {{required}}, {{/required}}value = "{{{description}}}") +{{#useBeanValidation}}{{>beanValidation}}{{/useBeanValidation}} @ApiModelProperty({{#example}}example = "{{{.}}}", {{/example}}{{#required}}required = {{required}}, {{/required}}value = "{{{description}}}") {{#vendorExtensions.x-extra-annotation}} {{{vendorExtensions.x-extra-annotation}}} {{/vendorExtensions.x-extra-annotation}} diff --git a/modules/openapi-generator/src/main/resources/Java/pojo_doc.mustache b/modules/openapi-generator/src/main/resources/Java/pojo_doc.mustache index f56437544658ee432c40d6f08b6a4b0dba37f282..247aaf68617deda29b8a79dd0813d5b8c099fea6 100644 --- a/modules/openapi-generator/src/main/resources/Java/pojo_doc.mustache +++ b/modules/openapi-generator/src/main/resources/Java/pojo_doc.mustache @@ -8,7 +8,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -{{#vars}}**{{name}}** | {{#isEnum}}[**{{datatypeWithEnum}}**](#{{datatypeWithEnum}}){{/isEnum}}{{^isEnum}}{{#isContainer}}{{#isArray}}{{#items}}{{#isModel}}[{{/isModel}}{{/items}}**{{baseType}}{{#items}}<{{dataType}}>**{{#isModel}}]({{^baseType}}{{dataType}}{{/baseType}}{{#baseType}}{{baseType}}{{/baseType}}.md){{/isModel}}{{/items}}{{/isArray}}{{#isMap}}{{#items}}{{#isModel}}[{{/isModel}}**Map<String, {{dataType}}>**{{#isModel}}]({{^baseType}}{{dataType}}{{/baseType}}{{#baseType}}{{baseType}}{{/baseType}}.md){{/isModel}}{{/items}}{{/isMap}}{{/isContainer}}{{^isContainer}}{{#isModel}}[{{/isModel}}**{{dataType}}**{{#isModel}}]({{^baseType}}{{dataType}}{{/baseType}}{{#baseType}}{{baseType}}{{/baseType}}.md){{/isModel}}{{/isContainer}}{{/isEnum}} | {{description}} | {{^required}} [optional]{{/required}}{{#isReadOnly}} [readonly]{{/isReadOnly}} +{{#vars}}**{{name}}** | {{#isEnum}}[**{{datatypeWithEnum}}**](#{{datatypeWithEnum}}){{/isEnum}}{{^isEnum}}{{#isContainer}}{{#isArray}}{{#items}}{{#isModel}}[{{/isModel}}{{/items}}**{{baseType}}{{#items}}<{{dataType}}>**{{#isModel}}]({{^baseType}}{{dataType}}{{/baseType}}{{baseType}}.md){{/isModel}}{{/items}}{{/isArray}}{{#isMap}}{{#items}}{{#isModel}}[{{/isModel}}**Map<String, {{dataType}}>**{{#isModel}}]({{^baseType}}{{dataType}}{{/baseType}}{{baseType}}.md){{/isModel}}{{/items}}{{/isMap}}{{/isContainer}}{{^isContainer}}{{#isModel}}[{{/isModel}}**{{dataType}}**{{#isModel}}]({{^baseType}}{{dataType}}{{/baseType}}{{baseType}}.md){{/isModel}}{{/isContainer}}{{/isEnum}} | {{description}} | {{^required}} [optional]{{/required}}{{#isReadOnly}} [readonly]{{/isReadOnly}} {{/vars}} {{#vars}}{{#isEnum}} diff --git a/modules/openapi-generator/src/main/resources/Java/xmlAnnotation.mustache b/modules/openapi-generator/src/main/resources/Java/xmlAnnotation.mustache index 04566fa1167c94c92a66d4666d1b32a59f890437..4f3b448c8d1c419849f07f81801d4e48d68ef1b4 100644 --- a/modules/openapi-generator/src/main/resources/Java/xmlAnnotation.mustache +++ b/modules/openapi-generator/src/main/resources/Java/xmlAnnotation.mustache @@ -1,6 +1,6 @@ {{#withXml}} -@XmlRootElement({{#xmlNamespace}}namespace="{{xmlNamespace}}", {{/xmlNamespace}}name = "{{#xmlName}}{{xmlName}}{{/xmlName}}{{^xmlName}}{{classname}}{{/xmlName}}") +@XmlRootElement({{#xmlNamespace}}namespace="{{.}}", {{/xmlNamespace}}name = "{{xmlName}}{{^xmlName}}{{classname}}{{/xmlName}}") @XmlAccessorType(XmlAccessType.FIELD) {{#jackson}} -@JacksonXmlRootElement({{#xmlNamespace}}namespace="{{xmlNamespace}}", {{/xmlNamespace}}localName = "{{#xmlName}}{{xmlName}}{{/xmlName}}{{^xmlName}}{{classname}}{{/xmlName}}"){{/jackson}}{{/withXml}} \ No newline at end of file +@JacksonXmlRootElement({{#xmlNamespace}}namespace="{{.}}", {{/xmlNamespace}}localName = "{{xmlName}}{{^xmlName}}{{classname}}{{/xmlName}}"){{/jackson}}{{/withXml}} \ No newline at end of file diff --git a/modules/openapi-generator/src/main/resources/JavaInflector/README.mustache b/modules/openapi-generator/src/main/resources/JavaInflector/README.mustache index c1309670c5ad205a33f0793d1b9f841bbc2e261e..924e49fe194d5c437a730feebc1392908e7ce1d1 100644 --- a/modules/openapi-generator/src/main/resources/JavaInflector/README.mustache +++ b/modules/openapi-generator/src/main/resources/JavaInflector/README.mustache @@ -5,4 +5,3 @@ Run with ``` mvn package jetty:run `` - diff --git a/modules/openapi-generator/src/main/resources/JavaInflector/api.mustache b/modules/openapi-generator/src/main/resources/JavaInflector/api.mustache index 71056d37509ac1f268d87f826c2500bea2dbc9a0..f980a89d754a48b64e8c432b386b1eb4e7008216 100644 --- a/modules/openapi-generator/src/main/resources/JavaInflector/api.mustache +++ b/modules/openapi-generator/src/main/resources/JavaInflector/api.mustache @@ -16,7 +16,7 @@ import {{modelPackage}}.*; {{>generatedAnnotation}} {{#operations}} public class {{classname}} { - /** + /** * Uncomment and implement as you see fit. These operations will map * Directly to operation calls from the routing logic. Because the inflector * Code allows you to implement logic incrementally, they are disabled. @@ -32,4 +32,3 @@ public class {{classname}} { {{/operation}} } {{/operations}} - diff --git a/modules/openapi-generator/src/main/resources/JavaInflector/enumClass.mustache b/modules/openapi-generator/src/main/resources/JavaInflector/enumClass.mustache index 49f3cb7922bc999b58f315223d1ec4ce407d03f7..27e8d1254fed1e955c79b9e6b3c24b2b6b848995 100644 --- a/modules/openapi-generator/src/main/resources/JavaInflector/enumClass.mustache +++ b/modules/openapi-generator/src/main/resources/JavaInflector/enumClass.mustache @@ -1,7 +1,7 @@ /** - * {{^description}}Gets or Sets {{{name}}}{{/description}}{{#description}}{{{description}}}{{/description}} + * {{^description}}Gets or Sets {{{name}}}{{/description}}{{{description}}} */ - {{>additionalEnumTypeAnnotations}}public enum {{#datatypeWithEnum}}{{{.}}}{{/datatypeWithEnum}}{{^datatypeWithEnum}}{{classname}}{{/datatypeWithEnum}} { + {{>additionalEnumTypeAnnotations}}public enum {{{datatypeWithEnum}}}{{^datatypeWithEnum}}{{classname}}{{/datatypeWithEnum}} { {{#gson}} {{#allowableValues}} {{#enumVars}} @@ -22,7 +22,7 @@ private {{{dataType}}} value; - {{#datatypeWithEnum}}{{{.}}}{{/datatypeWithEnum}}{{^datatypeWithEnum}}{{classname}}{{/datatypeWithEnum}}({{{dataType}}} value) { + {{{datatypeWithEnum}}}{{^datatypeWithEnum}}{{classname}}{{/datatypeWithEnum}}({{{dataType}}} value) { this.value = value; } @@ -33,8 +33,8 @@ } @JsonCreator - public static {{#datatypeWithEnum}}{{{.}}}{{/datatypeWithEnum}}{{^datatypeWithEnum}}{{{classname}}}{{/datatypeWithEnum}} fromValue(String text) { - for ({{#datatypeWithEnum}}{{{.}}}{{/datatypeWithEnum}}{{^datatypeWithEnum}}{{{classname}}}{{/datatypeWithEnum}} b : {{#datatypeWithEnum}}{{{.}}}{{/datatypeWithEnum}}{{^datatypeWithEnum}}{{{classname}}}{{/datatypeWithEnum}}.values()) { + public static {{{datatypeWithEnum}}}{{^datatypeWithEnum}}{{{classname}}}{{/datatypeWithEnum}} fromValue(String text) { + for ({{{datatypeWithEnum}}}{{^datatypeWithEnum}}{{{classname}}}{{/datatypeWithEnum}} b : {{{datatypeWithEnum}}}{{^datatypeWithEnum}}{{{classname}}}{{/datatypeWithEnum}}.values()) { if (String.valueOf(b.value).equals(text)) { return b; } diff --git a/modules/openapi-generator/src/main/resources/JavaInflector/enumOuterClass.mustache b/modules/openapi-generator/src/main/resources/JavaInflector/enumOuterClass.mustache index 123ccb2ca6a2a46eafb766f8e7e2c227d9250418..2832cfa539363389bc6da1ce134255dd88438d95 100644 --- a/modules/openapi-generator/src/main/resources/JavaInflector/enumOuterClass.mustache +++ b/modules/openapi-generator/src/main/resources/JavaInflector/enumOuterClass.mustache @@ -3,9 +3,9 @@ import com.fasterxml.jackson.annotation.JsonCreator; {{/jackson}} /** - * {{^description}}Gets or Sets {{{name}}}{{/description}}{{#description}}{{{description}}}{{/description}} + * {{^description}}Gets or Sets {{{name}}}{{/description}}{{{description}}} */ -{{>additionalEnumTypeAnnotations}}public enum {{#datatypeWithEnum}}{{{.}}}{{/datatypeWithEnum}}{{^datatypeWithEnum}}{{{classname}}}{{/datatypeWithEnum}} { +{{>additionalEnumTypeAnnotations}}public enum {{{datatypeWithEnum}}}{{^datatypeWithEnum}}{{{classname}}}{{/datatypeWithEnum}} { {{#gson}} {{#allowableValues}}{{#enumVars}} @SerializedName({{#isInteger}}"{{/isInteger}}{{#isDouble}}"{{/isDouble}}{{#isLong}}"{{/isLong}}{{#isFloat}}"{{/isFloat}}{{{value}}}{{#isInteger}}"{{/isInteger}}{{#isDouble}}"{{/isDouble}}{{#isLong}}"{{/isLong}}{{#isFloat}}"{{/isFloat}}) @@ -20,7 +20,7 @@ import com.fasterxml.jackson.annotation.JsonCreator; private {{{dataType}}} value; - {{#datatypeWithEnum}}{{{.}}}{{/datatypeWithEnum}}{{^datatypeWithEnum}}{{{classname}}}{{/datatypeWithEnum}}({{{dataType}}} value) { + {{{datatypeWithEnum}}}{{^datatypeWithEnum}}{{{classname}}}{{/datatypeWithEnum}}({{{dataType}}} value) { this.value = value; } @@ -31,8 +31,8 @@ import com.fasterxml.jackson.annotation.JsonCreator; } @JsonCreator - public static {{#datatypeWithEnum}}{{{.}}}{{/datatypeWithEnum}}{{^datatypeWithEnum}}{{{classname}}}{{/datatypeWithEnum}} fromValue(String text) { - for ({{#datatypeWithEnum}}{{{.}}}{{/datatypeWithEnum}}{{^datatypeWithEnum}}{{{classname}}}{{/datatypeWithEnum}} b : {{#datatypeWithEnum}}{{{.}}}{{/datatypeWithEnum}}{{^datatypeWithEnum}}{{{classname}}}{{/datatypeWithEnum}}.values()) { + public static {{{datatypeWithEnum}}}{{^datatypeWithEnum}}{{{classname}}}{{/datatypeWithEnum}} fromValue(String text) { + for ({{{datatypeWithEnum}}}{{^datatypeWithEnum}}{{{classname}}}{{/datatypeWithEnum}} b : {{{datatypeWithEnum}}}{{^datatypeWithEnum}}{{{classname}}}{{/datatypeWithEnum}}.values()) { if (String.valueOf(b.value).equals(text)) { return b; } diff --git a/modules/openapi-generator/src/main/resources/JavaInflector/model.mustache b/modules/openapi-generator/src/main/resources/JavaInflector/model.mustache index b9512d2b83cb4be5f15f8209d90527dbcf793b63..d2edbebd5b4b7bf638737ff5b7ec61e6270d9dda 100644 --- a/modules/openapi-generator/src/main/resources/JavaInflector/model.mustache +++ b/modules/openapi-generator/src/main/resources/JavaInflector/model.mustache @@ -8,7 +8,7 @@ import java.util.Objects; {{#models}} {{#model}}{{#description}} /** - * {{description}} + * {{.}} **/{{/description}} {{#isEnum}}{{>enumOuterClass}}{{/isEnum}} {{^isEnum}}{{>pojo}}{{/isEnum}} diff --git a/modules/openapi-generator/src/main/resources/JavaInflector/pojo.mustache b/modules/openapi-generator/src/main/resources/JavaInflector/pojo.mustache index 2a13cf41e7968ed8eda63ae9d5738603a8b25629..3de4a0d8c310dd155cec7cf50892d48673e476a3 100644 --- a/modules/openapi-generator/src/main/resources/JavaInflector/pojo.mustache +++ b/modules/openapi-generator/src/main/resources/JavaInflector/pojo.mustache @@ -1,6 +1,6 @@ -{{#description}}@ApiModel(description = "{{{description}}}"){{/description}} +{{#description}}@ApiModel(description = "{{{.}}}"){{/description}} {{>generatedAnnotation}}{{>additionalModelTypeAnnotations}} -public class {{classname}} {{#parent}}extends {{{parent}}}{{/parent}} {{#serializableModel}}implements Serializable{{/serializableModel}} { +public class {{classname}} {{#parent}}extends {{{.}}}{{/parent}} {{#serializableModel}}implements Serializable{{/serializableModel}} { {{#vars}} {{#isEnum}} {{^isContainer}} @@ -28,9 +28,9 @@ public class {{classname}} {{#parent}}extends {{{parent}}}{{/parent}} {{#seriali {{/vars}} {{#vars}} /**{{#description}} - * {{{description}}}{{/description}}{{#minimum}} - * minimum: {{minimum}}{{/minimum}}{{#maximum}} - * maximum: {{maximum}}{{/maximum}} + * {{{.}}}{{/description}}{{#minimum}} + * minimum: {{.}}{{/minimum}}{{#maximum}} + * maximum: {{.}}{{/maximum}} **/ public {{classname}} {{name}}({{{datatypeWithEnum}}} {{name}}) { this.{{name}} = {{name}}; @@ -38,7 +38,7 @@ public class {{classname}} {{#parent}}extends {{{parent}}}{{/parent}} {{#seriali } {{#vendorExtensions.x-extra-annotation}}{{{vendorExtensions.x-extra-annotation}}}{{/vendorExtensions.x-extra-annotation}} - @ApiModelProperty({{#example}}example = "{{{example}}}", {{/example}}{{#required}}required = {{required}}, {{/required}}value = "{{{description}}}") + @ApiModelProperty({{#example}}example = "{{{.}}}", {{/example}}{{#required}}required = {{required}}, {{/required}}value = "{{{description}}}") @JsonProperty("{{baseName}}") public {{{datatypeWithEnum}}} {{getter}}() { return {{name}}; diff --git a/modules/openapi-generator/src/main/resources/JavaJaxRS/allowableValues.mustache b/modules/openapi-generator/src/main/resources/JavaJaxRS/allowableValues.mustache index a48256d027a1601d3cb9c427e67119dcff701431..75bce9385dea140e1cae22202bcacd2b11e07b76 100644 --- a/modules/openapi-generator/src/main/resources/JavaJaxRS/allowableValues.mustache +++ b/modules/openapi-generator/src/main/resources/JavaJaxRS/allowableValues.mustache @@ -1 +1 @@ -{{#allowableValues}}allowableValues="{{#values}}{{{.}}}{{^-last}}, {{/-last}}{{/values}}{{^values}}range=[{{#min}}{{.}}{{/min}}{{^min}}-infinity{{/min}}, {{#max}}{{.}}{{/max}}{{^max}}infinity{{/max}}]{{/values}}"{{/allowableValues}} \ No newline at end of file +{{#allowableValues}}allowableValues="{{#values}}{{{.}}}{{^-last}}, {{/-last}}{{/values}}{{^values}}range=[{{min}}{{^min}}-infinity{{/min}}, {{max}}{{^max}}infinity{{/max}}]{{/values}}"{{/allowableValues}} \ No newline at end of file diff --git a/modules/openapi-generator/src/main/resources/JavaJaxRS/api.mustache b/modules/openapi-generator/src/main/resources/JavaJaxRS/api.mustache index 9eb362285cb2740d0826c2443df1a13774ff5ae1..b61de13287be97e24255dea3c04db43ccd9ac0b5 100644 --- a/modules/openapi-generator/src/main/resources/JavaJaxRS/api.mustache +++ b/modules/openapi-generator/src/main/resources/JavaJaxRS/api.mustache @@ -49,7 +49,7 @@ public class {{classname}} { } catch (Exception e) { throw new RuntimeException(e); } - } + } } if (delegate == null) { @@ -64,7 +64,7 @@ public class {{classname}} { {{#subresourceOperation}}@Path("{{{path}}}"){{/subresourceOperation}} {{#hasConsumes}}@Consumes({ {{#consumes}}"{{{mediaType}}}"{{^-last}}, {{/-last}}{{/consumes}} }){{/hasConsumes}} {{#hasProduces}}@Produces({ {{#produces}}"{{{mediaType}}}"{{^-last}}, {{/-last}}{{/produces}} }){{/hasProduces}} - @io.swagger.annotations.ApiOperation(value = "{{{summary}}}", notes = "{{{notes}}}", response = {{{returnBaseType}}}.class{{#returnContainer}}, responseContainer = "{{{returnContainer}}}"{{/returnContainer}}{{#hasAuthMethods}}, authorizations = { + @io.swagger.annotations.ApiOperation(value = "{{{summary}}}", notes = "{{{notes}}}", response = {{{returnBaseType}}}.class{{#returnContainer}}, responseContainer = "{{{.}}}"{{/returnContainer}}{{#hasAuthMethods}}, authorizations = { {{#authMethods}}@io.swagger.annotations.Authorization(value = "{{name}}"{{#isOAuth}}, scopes = { {{#scopes}}@io.swagger.annotations.AuthorizationScope(scope = "{{scope}}", description = "{{description}}"){{^-last}}, {{/-last}}{{/scopes}} @@ -73,7 +73,7 @@ public class {{classname}} { }{{/hasAuthMethods}}, tags={ {{#vendorExtensions.x-tags}}"{{tag}}",{{/vendorExtensions.x-tags}} }) @io.swagger.annotations.ApiResponses(value = { {{#responses}} - @io.swagger.annotations.ApiResponse(code = {{{code}}}, message = "{{{message}}}", response = {{{baseType}}}.class{{#containerType}}, responseContainer = "{{{containerType}}}"{{/containerType}}){{^-last}},{{/-last}} + @io.swagger.annotations.ApiResponse(code = {{{code}}}, message = "{{{message}}}", response = {{{baseType}}}.class{{#containerType}}, responseContainer = "{{{.}}}"{{/containerType}}){{^-last}},{{/-last}} {{/responses}} }) public Response {{nickname}}({{#allParams}}{{>queryParams}}{{>pathParams}}{{>headerParams}}{{>bodyParams}}{{>formParams}},{{/allParams}}@Context SecurityContext securityContext) diff --git a/modules/openapi-generator/src/main/resources/JavaJaxRS/beanValidationCore.mustache b/modules/openapi-generator/src/main/resources/JavaJaxRS/beanValidationCore.mustache index 1f9f43e7b868563d7df92da9f413d62e76d38197..ff4ffe26c49765afe7058bc23df182aa0a4056e9 100644 --- a/modules/openapi-generator/src/main/resources/JavaJaxRS/beanValidationCore.mustache +++ b/modules/openapi-generator/src/main/resources/JavaJaxRS/beanValidationCore.mustache @@ -4,17 +4,17 @@ minLength && maxLength set minLength set, maxLength not }}{{#minLength}}{{^maxLength}} @Size(min={{minLength}}){{/maxLength}}{{/minLength}}{{! minLength not set, maxLength set -}}{{^minLength}}{{#maxLength}} @Size(max={{maxLength}}){{/maxLength}}{{/minLength}}{{! +}}{{^minLength}}{{#maxLength}} @Size(max={{.}}){{/maxLength}}{{/minLength}}{{! @Size: minItems && maxItems set }}{{#minItems}}{{#maxItems}} @Size(min={{minItems}},max={{maxItems}}){{/maxItems}}{{/minItems}}{{! @Size: minItems set, maxItems not }}{{#minItems}}{{^maxItems}} @Size(min={{minItems}}){{/maxItems}}{{/minItems}}{{! @Size: minItems not set && maxItems set -}}{{^minItems}}{{#maxItems}} @Size(max={{maxItems}}){{/maxItems}}{{/minItems}}{{! +}}{{^minItems}}{{#maxItems}} @Size(max={{.}}){{/maxItems}}{{/minItems}}{{! check for integer or long / all others=decimal type with @Decimal* isInteger set -}}{{#isInteger}}{{#minimum}} @Min({{minimum}}){{/minimum}}{{#maximum}} @Max({{maximum}}){{/maximum}}{{/isInteger}}{{! +}}{{#isInteger}}{{#minimum}} @Min({{.}}){{/minimum}}{{#maximum}} @Max({{.}}){{/maximum}}{{/isInteger}}{{! isLong set -}}{{#isLong}}{{#minimum}} @Min({{minimum}}L){{/minimum}}{{#maximum}} @Max({{maximum}}L){{/maximum}}{{/isLong}}{{! +}}{{#isLong}}{{#minimum}} @Min({{.}}L){{/minimum}}{{#maximum}} @Max({{.}}L){{/maximum}}{{/isLong}}{{! Not Integer, not Long => we have a decimal value! }}{{^isInteger}}{{^isLong}}{{#minimum}} @DecimalMin({{#exclusiveMinimum}}value={{/exclusiveMinimum}}"{{minimum}}"{{#exclusiveMinimum}},inclusive=false{{/exclusiveMinimum}}){{/minimum}}{{#maximum}} @DecimalMax({{#exclusiveMaximum}}value={{/exclusiveMaximum}}"{{maximum}}"{{#exclusiveMaximum}},inclusive=false{{/exclusiveMaximum}}){{/maximum}}{{/isLong}}{{/isInteger}} \ No newline at end of file diff --git a/modules/openapi-generator/src/main/resources/JavaJaxRS/bodyParams.mustache b/modules/openapi-generator/src/main/resources/JavaJaxRS/bodyParams.mustache index a7351b38ac5b9762d80de93c5fd68dc202849940..7e97a6a4259424392cc3e4d0add6046d2a008cc5 100644 --- a/modules/openapi-generator/src/main/resources/JavaJaxRS/bodyParams.mustache +++ b/modules/openapi-generator/src/main/resources/JavaJaxRS/bodyParams.mustache @@ -3,7 +3,7 @@ }}@ApiParam(value = "{{{description}}}"{{! }}{{#required}}, required = true{{/required}}{{! }}{{#allowableValues}}, {{> allowableValues}}{{/allowableValues}}{{! - }}{{#defaultValue}}, defaultValue = "{{{defaultValue}}}"{{/defaultValue}}{{! + }}{{#defaultValue}}, defaultValue = "{{{.}}}"{{/defaultValue}}{{! }}){{! }}{{#useBeanValidation}} {{>beanValidation}}{{/useBeanValidation}}{{! diff --git a/modules/openapi-generator/src/main/resources/JavaJaxRS/cxf-cdi/allowableValues.mustache b/modules/openapi-generator/src/main/resources/JavaJaxRS/cxf-cdi/allowableValues.mustache index a48256d027a1601d3cb9c427e67119dcff701431..75bce9385dea140e1cae22202bcacd2b11e07b76 100644 --- a/modules/openapi-generator/src/main/resources/JavaJaxRS/cxf-cdi/allowableValues.mustache +++ b/modules/openapi-generator/src/main/resources/JavaJaxRS/cxf-cdi/allowableValues.mustache @@ -1 +1 @@ -{{#allowableValues}}allowableValues="{{#values}}{{{.}}}{{^-last}}, {{/-last}}{{/values}}{{^values}}range=[{{#min}}{{.}}{{/min}}{{^min}}-infinity{{/min}}, {{#max}}{{.}}{{/max}}{{^max}}infinity{{/max}}]{{/values}}"{{/allowableValues}} \ No newline at end of file +{{#allowableValues}}allowableValues="{{#values}}{{{.}}}{{^-last}}, {{/-last}}{{/values}}{{^values}}range=[{{min}}{{^min}}-infinity{{/min}}, {{max}}{{^max}}infinity{{/max}}]{{/values}}"{{/allowableValues}} \ No newline at end of file diff --git a/modules/openapi-generator/src/main/resources/JavaJaxRS/cxf-cdi/api.mustache b/modules/openapi-generator/src/main/resources/JavaJaxRS/cxf-cdi/api.mustache index f48acfd1dcd58dfbee26d59ba111519f5ec3a66c..a3c9c9721ee629a531eaf3681c220207b01744c2 100644 --- a/modules/openapi-generator/src/main/resources/JavaJaxRS/cxf-cdi/api.mustache +++ b/modules/openapi-generator/src/main/resources/JavaJaxRS/cxf-cdi/api.mustache @@ -44,14 +44,14 @@ public class {{classname}} { {{#subresourceOperation}}@Path("{{{path}}}"){{/subresourceOperation}} {{#hasConsumes}}@Consumes({ {{#consumes}}"{{{mediaType}}}"{{^-last}}, {{/-last}}{{/consumes}} }){{/hasConsumes}} {{#hasProduces}}@Produces({ {{#produces}}"{{{mediaType}}}"{{^-last}}, {{/-last}}{{/produces}} }){{/hasProduces}} - @ApiOperation(value = "{{{summary}}}", notes = "{{{notes}}}", response = {{{returnBaseType}}}.class{{#returnContainer}}, responseContainer = "{{{returnContainer}}}"{{/returnContainer}}{{#hasAuthMethods}}, authorizations = { + @ApiOperation(value = "{{{summary}}}", notes = "{{{notes}}}", response = {{{returnBaseType}}}.class{{#returnContainer}}, responseContainer = "{{{.}}}"{{/returnContainer}}{{#hasAuthMethods}}, authorizations = { {{#authMethods}}{{#isOAuth}}@Authorization(value = "{{name}}", scopes = { {{#scopes}}@AuthorizationScope(scope = "{{scope}}", description = "{{description}}"){{^-last}}, {{/-last}}{{/scopes}} }){{^-last}},{{/-last}}{{/isOAuth}} {{^isOAuth}}@Authorization(value = "{{name}}"){{^-last}},{{/-last}} {{/isOAuth}}{{/authMethods}} }{{/hasAuthMethods}}, tags={ {{#vendorExtensions.x-tags}}"{{tag}}"{{^-last}}, {{/-last}}{{/vendorExtensions.x-tags}} }) @ApiResponses(value = { {{#responses}} - @ApiResponse(code = {{{code}}}, message = "{{{message}}}", response = {{{baseType}}}.class{{#containerType}}, responseContainer = "{{{containerType}}}"{{/containerType}}){{^-last}},{{/-last}}{{/responses}} }) + @ApiResponse(code = {{{code}}}, message = "{{{message}}}", response = {{{baseType}}}.class{{#containerType}}, responseContainer = "{{{.}}}"{{/containerType}}){{^-last}},{{/-last}}{{/responses}} }) public Response {{nickname}}({{#allParams}}{{>queryParams}}{{>pathParams}}{{>headerParams}}{{>bodyParams}}{{>formParams}}{{^-last}}, {{/-last}}{{/allParams}}) { return delegate.{{nickname}}({{#allParams}}{{#isFile}}{{paramName}}InputStream, {{paramName}}Detail{{/isFile}}{{^isFile}}{{paramName}}{{/isFile}}, {{/allParams}}securityContext); } diff --git a/modules/openapi-generator/src/main/resources/JavaJaxRS/cxf-cdi/beanValidationCore.mustache b/modules/openapi-generator/src/main/resources/JavaJaxRS/cxf-cdi/beanValidationCore.mustache index 1f9f43e7b868563d7df92da9f413d62e76d38197..ff4ffe26c49765afe7058bc23df182aa0a4056e9 100644 --- a/modules/openapi-generator/src/main/resources/JavaJaxRS/cxf-cdi/beanValidationCore.mustache +++ b/modules/openapi-generator/src/main/resources/JavaJaxRS/cxf-cdi/beanValidationCore.mustache @@ -4,17 +4,17 @@ minLength && maxLength set minLength set, maxLength not }}{{#minLength}}{{^maxLength}} @Size(min={{minLength}}){{/maxLength}}{{/minLength}}{{! minLength not set, maxLength set -}}{{^minLength}}{{#maxLength}} @Size(max={{maxLength}}){{/maxLength}}{{/minLength}}{{! +}}{{^minLength}}{{#maxLength}} @Size(max={{.}}){{/maxLength}}{{/minLength}}{{! @Size: minItems && maxItems set }}{{#minItems}}{{#maxItems}} @Size(min={{minItems}},max={{maxItems}}){{/maxItems}}{{/minItems}}{{! @Size: minItems set, maxItems not }}{{#minItems}}{{^maxItems}} @Size(min={{minItems}}){{/maxItems}}{{/minItems}}{{! @Size: minItems not set && maxItems set -}}{{^minItems}}{{#maxItems}} @Size(max={{maxItems}}){{/maxItems}}{{/minItems}}{{! +}}{{^minItems}}{{#maxItems}} @Size(max={{.}}){{/maxItems}}{{/minItems}}{{! check for integer or long / all others=decimal type with @Decimal* isInteger set -}}{{#isInteger}}{{#minimum}} @Min({{minimum}}){{/minimum}}{{#maximum}} @Max({{maximum}}){{/maximum}}{{/isInteger}}{{! +}}{{#isInteger}}{{#minimum}} @Min({{.}}){{/minimum}}{{#maximum}} @Max({{.}}){{/maximum}}{{/isInteger}}{{! isLong set -}}{{#isLong}}{{#minimum}} @Min({{minimum}}L){{/minimum}}{{#maximum}} @Max({{maximum}}L){{/maximum}}{{/isLong}}{{! +}}{{#isLong}}{{#minimum}} @Min({{.}}L){{/minimum}}{{#maximum}} @Max({{.}}L){{/maximum}}{{/isLong}}{{! Not Integer, not Long => we have a decimal value! }}{{^isInteger}}{{^isLong}}{{#minimum}} @DecimalMin({{#exclusiveMinimum}}value={{/exclusiveMinimum}}"{{minimum}}"{{#exclusiveMinimum}},inclusive=false{{/exclusiveMinimum}}){{/minimum}}{{#maximum}} @DecimalMax({{#exclusiveMaximum}}value={{/exclusiveMaximum}}"{{maximum}}"{{#exclusiveMaximum}},inclusive=false{{/exclusiveMaximum}}){{/maximum}}{{/isLong}}{{/isInteger}} \ No newline at end of file diff --git a/modules/openapi-generator/src/main/resources/JavaJaxRS/cxf-cdi/bodyParams.mustache b/modules/openapi-generator/src/main/resources/JavaJaxRS/cxf-cdi/bodyParams.mustache index 2b28441d3d054b8e1d9ab7c8ec56a2ca89d762ce..dd3506d206d3f413ee3d8b1387f31073dc59a3c9 100644 --- a/modules/openapi-generator/src/main/resources/JavaJaxRS/cxf-cdi/bodyParams.mustache +++ b/modules/openapi-generator/src/main/resources/JavaJaxRS/cxf-cdi/bodyParams.mustache @@ -1 +1 @@ -{{#isBodyParam}}@ApiParam(value = "{{{description}}}" {{#required}},required=true{{/required}}{{#allowableValues}}, {{> allowableValues }}{{/allowableValues}}{{#defaultValue}}, defaultValue="{{{defaultValue}}}"{{/defaultValue}}) {{{dataType}}} {{paramName}}{{/isBodyParam}} \ No newline at end of file +{{#isBodyParam}}@ApiParam(value = "{{{description}}}" {{#required}},required=true{{/required}}{{#allowableValues}}, {{> allowableValues }}{{/allowableValues}}{{#defaultValue}}, defaultValue="{{{.}}}"{{/defaultValue}}) {{{dataType}}} {{paramName}}{{/isBodyParam}} \ No newline at end of file diff --git a/modules/openapi-generator/src/main/resources/JavaJaxRS/cxf-cdi/enumClass.mustache b/modules/openapi-generator/src/main/resources/JavaJaxRS/cxf-cdi/enumClass.mustache index 829a9f6e314fce6019dfba423c76c99a4f69c6de..046f2785fd41bd5a076e87e5771f6089c9e5d82a 100644 --- a/modules/openapi-generator/src/main/resources/JavaJaxRS/cxf-cdi/enumClass.mustache +++ b/modules/openapi-generator/src/main/resources/JavaJaxRS/cxf-cdi/enumClass.mustache @@ -1,6 +1,6 @@ @XmlType(name="{{datatypeWithEnum}}") @XmlEnum({{dataType}}.class) -{{>additionalEnumTypeAnnotations}}public enum {{#datatypeWithEnum}}{{{.}}}{{/datatypeWithEnum}}{{^datatypeWithEnum}}{{{classname}}}{{/datatypeWithEnum}} { +{{>additionalEnumTypeAnnotations}}public enum {{{datatypeWithEnum}}}{{^datatypeWithEnum}}{{{classname}}}{{/datatypeWithEnum}} { {{#allowableValues}} {{#enumVars}}@XmlEnumValue({{^isString}}"{{/isString}}{{{value}}}{{^isString}}"{{/isString}}) {{name}}({{dataType}}.valueOf({{{value}}})){{^-last}}, {{/-last}}{{#-last}};{{/-last}}{{/enumVars}} @@ -9,7 +9,7 @@ private {{dataType}} value; - {{#datatypeWithEnum}}{{{.}}}{{/datatypeWithEnum}}{{^datatypeWithEnum}}{{{classname}}}{{/datatypeWithEnum}}({{dataType}} v) { + {{{datatypeWithEnum}}}{{^datatypeWithEnum}}{{{classname}}}{{/datatypeWithEnum}}({{dataType}} v) { value = v; } @@ -22,8 +22,8 @@ return String.valueOf(value); } - public static {{#datatypeWithEnum}}{{{.}}}{{/datatypeWithEnum}}{{^datatypeWithEnum}}{{{classname}}}{{/datatypeWithEnum}} fromValue({{dataType}} value) { - for ({{#datatypeWithEnum}}{{{.}}}{{/datatypeWithEnum}}{{^datatypeWithEnum}}{{{classname}}}{{/datatypeWithEnum}} b : {{#datatypeWithEnum}}{{{.}}}{{/datatypeWithEnum}}{{^datatypeWithEnum}}{{{classname}}}{{/datatypeWithEnum}}.values()) { + public static {{{datatypeWithEnum}}}{{^datatypeWithEnum}}{{{classname}}}{{/datatypeWithEnum}} fromValue({{dataType}} value) { + for ({{{datatypeWithEnum}}}{{^datatypeWithEnum}}{{{classname}}}{{/datatypeWithEnum}} b : {{{datatypeWithEnum}}}{{^datatypeWithEnum}}{{{classname}}}{{/datatypeWithEnum}}.values()) { if (b.value.equals(value)) { return b; } diff --git a/modules/openapi-generator/src/main/resources/JavaJaxRS/cxf-cdi/headerParams.mustache b/modules/openapi-generator/src/main/resources/JavaJaxRS/cxf-cdi/headerParams.mustache index 200a109ca645327ec7d61bb756593a40892bf60b..00cd70487be8f092d428cc0338f65510fb66849b 100644 --- a/modules/openapi-generator/src/main/resources/JavaJaxRS/cxf-cdi/headerParams.mustache +++ b/modules/openapi-generator/src/main/resources/JavaJaxRS/cxf-cdi/headerParams.mustache @@ -1 +1 @@ -{{#isHeaderParam}}{{#useBeanValidation}}{{>beanValidationHeaderParams}}{{/useBeanValidation}} @ApiParam(value = "{{{description}}}" {{#required}},required=true{{/required}}{{#allowableValues}}, {{> allowableValues }}{{/allowableValues}}{{#defaultValue}}, defaultValue="{{{defaultValue}}}"{{/defaultValue}})@HeaderParam("{{baseName}}") {{{dataType}}} {{paramName}}{{/isHeaderParam}} \ No newline at end of file +{{#isHeaderParam}}{{#useBeanValidation}}{{>beanValidationHeaderParams}}{{/useBeanValidation}} @ApiParam(value = "{{{description}}}" {{#required}},required=true{{/required}}{{#allowableValues}}, {{> allowableValues }}{{/allowableValues}}{{#defaultValue}}, defaultValue="{{{.}}}"{{/defaultValue}})@HeaderParam("{{baseName}}") {{{dataType}}} {{paramName}}{{/isHeaderParam}} \ No newline at end of file diff --git a/modules/openapi-generator/src/main/resources/JavaJaxRS/cxf-cdi/model.mustache b/modules/openapi-generator/src/main/resources/JavaJaxRS/cxf-cdi/model.mustache index df7d1df8d210ae5e15b2115890f9383db84945f3..96d4ac3277c8c1b8dcdf81d48a6fab3f1ddda384 100644 --- a/modules/openapi-generator/src/main/resources/JavaJaxRS/cxf-cdi/model.mustache +++ b/modules/openapi-generator/src/main/resources/JavaJaxRS/cxf-cdi/model.mustache @@ -11,7 +11,7 @@ import javax.validation.constraints.*; {{#models}} {{#model}}{{#description}} /** - * {{description}} + * {{.}} **/{{/description}} {{#isEnum}}{{>enumOuterClass}}{{/isEnum}} {{^isEnum}}{{>pojo}}{{/isEnum}} diff --git a/modules/openapi-generator/src/main/resources/JavaJaxRS/cxf-cdi/pathParams.mustache b/modules/openapi-generator/src/main/resources/JavaJaxRS/cxf-cdi/pathParams.mustache index 4e21dd6091ed5b098e5df308a60d98a92367a1eb..d8ab20f4655f53d7be15faec9fc2e3b8a72cc4c2 100644 --- a/modules/openapi-generator/src/main/resources/JavaJaxRS/cxf-cdi/pathParams.mustache +++ b/modules/openapi-generator/src/main/resources/JavaJaxRS/cxf-cdi/pathParams.mustache @@ -1 +1 @@ -{{#isPathParam}}{{#useBeanValidation}}{{>beanValidationPathParams}}{{/useBeanValidation}}@ApiParam(value = "{{{description}}}"{{#required}},required=true{{/required}}{{#allowableValues}}, {{> allowableValues }}{{/allowableValues}}{{#defaultValue}}, defaultValue="{{{defaultValue}}}"{{/defaultValue}}) @PathParam("{{baseName}}") {{{dataType}}} {{paramName}}{{/isPathParam}} \ No newline at end of file +{{#isPathParam}}{{#useBeanValidation}}{{>beanValidationPathParams}}{{/useBeanValidation}}@ApiParam(value = "{{{description}}}"{{#required}},required=true{{/required}}{{#allowableValues}}, {{> allowableValues }}{{/allowableValues}}{{#defaultValue}}, defaultValue="{{{.}}}"{{/defaultValue}}) @PathParam("{{baseName}}") {{{dataType}}} {{paramName}}{{/isPathParam}} \ No newline at end of file diff --git a/modules/openapi-generator/src/main/resources/JavaJaxRS/cxf-cdi/pojo.mustache b/modules/openapi-generator/src/main/resources/JavaJaxRS/cxf-cdi/pojo.mustache index 1f93ba848d30c7ff9ddf08468cd9063972fee758..5a9867bad2b0695432e2899f484b0c115dde2ac0 100644 --- a/modules/openapi-generator/src/main/resources/JavaJaxRS/cxf-cdi/pojo.mustache +++ b/modules/openapi-generator/src/main/resources/JavaJaxRS/cxf-cdi/pojo.mustache @@ -3,8 +3,8 @@ import java.util.Objects; import javax.xml.bind.annotation.*; -{{#description}}@ApiModel(description = "{{{description}}}"){{/description}}{{>additionalModelTypeAnnotations}}{{#discriminator}}{{>typeInfoAnnotation}}{{/discriminator}} -public class {{classname}} {{#parent}}extends {{{parent}}}{{/parent}} {{#serializableModel}}implements Serializable{{/serializableModel}} { +{{#description}}@ApiModel(description = "{{{.}}}"){{/description}}{{>additionalModelTypeAnnotations}}{{#discriminator}}{{>typeInfoAnnotation}}{{/discriminator}} +public class {{classname}} {{#parent}}extends {{{.}}}{{/parent}} {{#serializableModel}}implements Serializable{{/serializableModel}} { {{#vars}}{{#isEnum}}{{^isContainer}} {{>enumClass}}{{/isContainer}}{{#isContainer}}{{#mostInnerItems}} @@ -20,13 +20,13 @@ public class {{classname}} {{#parent}}extends {{{parent}}}{{/parent}} {{#seriali {{#vars}} /** {{#description}} - * {{description}} + * {{.}} {{/description}} {{#minimum}} - * minimum: {{minimum}} + * minimum: {{.}} {{/minimum}} {{#maximum}} - * maximum: {{maximum}} + * maximum: {{.}} {{/maximum}} **/ public {{classname}} {{name}}({{{datatypeWithEnum}}} {{name}}) { @@ -35,7 +35,7 @@ public class {{classname}} {{#parent}}extends {{{parent}}}{{/parent}} {{#seriali } {{#vendorExtensions.x-extra-annotation}}{{{vendorExtensions.x-extra-annotation}}}{{/vendorExtensions.x-extra-annotation}} - @ApiModelProperty({{#example}}example = "{{{example}}}", {{/example}}{{#required}}required = {{required}}, {{/required}}value = "{{{description}}}") + @ApiModelProperty({{#example}}example = "{{{.}}}", {{/example}}{{#required}}required = {{required}}, {{/required}}value = "{{{description}}}") @JsonProperty("{{baseName}}") {{#useBeanValidation}}{{>beanValidation}}{{/useBeanValidation}} public {{{datatypeWithEnum}}} {{getter}}() { return {{name}}; diff --git a/modules/openapi-generator/src/main/resources/JavaJaxRS/cxf-cdi/pom.mustache b/modules/openapi-generator/src/main/resources/JavaJaxRS/cxf-cdi/pom.mustache index 1f2caa5a5f4c5b9297296be62995c1cac72cd908..2066179d96ed54f9a7eaf5905367f02e48879dd0 100644 --- a/modules/openapi-generator/src/main/resources/JavaJaxRS/cxf-cdi/pom.mustache +++ b/modules/openapi-generator/src/main/resources/JavaJaxRS/cxf-cdi/pom.mustache @@ -76,14 +76,14 @@ <artifactId>swagger-annotations</artifactId> <version>[1.5.3,1.5.16]</version> </dependency> - + <!-- @Nullable annotation --> <dependency> <groupId>com.google.code.findbugs</groupId> <artifactId>jsr305</artifactId> <version>3.0.2</version> </dependency> - + {{#useBeanValidation}} <!-- Bean Validation API support --> <dependency> diff --git a/modules/openapi-generator/src/main/resources/JavaJaxRS/cxf-cdi/queryParams.mustache b/modules/openapi-generator/src/main/resources/JavaJaxRS/cxf-cdi/queryParams.mustache index e132b51a7563a10bbe39228e7b99d1e123d21c3d..b7addff1a93259743113327528b0414b314cf949 100644 --- a/modules/openapi-generator/src/main/resources/JavaJaxRS/cxf-cdi/queryParams.mustache +++ b/modules/openapi-generator/src/main/resources/JavaJaxRS/cxf-cdi/queryParams.mustache @@ -1 +1 @@ -{{#isQueryParam}}{{#useBeanValidation}}{{>beanValidationQueryParams}}{{/useBeanValidation}}@ApiParam(value = "{{{description}}}"{{#required}},required=true{{/required}}{{^isContainer}}{{#allowableValues}}, {{> allowableValues }}{{/allowableValues}}{{#defaultValue}}, defaultValue="{{{defaultValue}}}"{{/defaultValue}}{{/isContainer}}) {{^isContainer}}{{#defaultValue}}@DefaultValue("{{{defaultValue}}}") {{/defaultValue}}{{/isContainer}} @QueryParam("{{baseName}}") {{{dataType}}} {{paramName}}{{/isQueryParam}} \ No newline at end of file +{{#isQueryParam}}{{#useBeanValidation}}{{>beanValidationQueryParams}}{{/useBeanValidation}}@ApiParam(value = "{{{description}}}"{{#required}},required=true{{/required}}{{^isContainer}}{{#allowableValues}}, {{> allowableValues }}{{/allowableValues}}{{#defaultValue}}, defaultValue="{{{.}}}"{{/defaultValue}}{{/isContainer}}) {{^isContainer}}{{#defaultValue}}@DefaultValue("{{{.}}}") {{/defaultValue}}{{/isContainer}} @QueryParam("{{baseName}}") {{{dataType}}} {{paramName}}{{/isQueryParam}} \ No newline at end of file diff --git a/modules/openapi-generator/src/main/resources/JavaJaxRS/cxf-ext/allowableValues.mustache b/modules/openapi-generator/src/main/resources/JavaJaxRS/cxf-ext/allowableValues.mustache index a48256d027a1601d3cb9c427e67119dcff701431..75bce9385dea140e1cae22202bcacd2b11e07b76 100644 --- a/modules/openapi-generator/src/main/resources/JavaJaxRS/cxf-ext/allowableValues.mustache +++ b/modules/openapi-generator/src/main/resources/JavaJaxRS/cxf-ext/allowableValues.mustache @@ -1 +1 @@ -{{#allowableValues}}allowableValues="{{#values}}{{{.}}}{{^-last}}, {{/-last}}{{/values}}{{^values}}range=[{{#min}}{{.}}{{/min}}{{^min}}-infinity{{/min}}, {{#max}}{{.}}{{/max}}{{^max}}infinity{{/max}}]{{/values}}"{{/allowableValues}} \ No newline at end of file +{{#allowableValues}}allowableValues="{{#values}}{{{.}}}{{^-last}}, {{/-last}}{{/values}}{{^values}}range=[{{min}}{{^min}}-infinity{{/min}}, {{max}}{{^max}}infinity{{/max}}]{{/values}}"{{/allowableValues}} \ No newline at end of file diff --git a/modules/openapi-generator/src/main/resources/JavaJaxRS/cxf-ext/api.mustache b/modules/openapi-generator/src/main/resources/JavaJaxRS/cxf-ext/api.mustache index a38ba492662fb0b1e0e751e5397c2f2a57bedc85..8c517fd6dd578b5428e8a671c6206cec3fc91b11 100644 --- a/modules/openapi-generator/src/main/resources/JavaJaxRS/cxf-ext/api.mustache +++ b/modules/openapi-generator/src/main/resources/JavaJaxRS/cxf-ext/api.mustache @@ -27,7 +27,7 @@ import javax.validation.Valid; * {{{appName}}} * {{#appDescription}} - * <p>{{{appDescription}}} + * <p>{{{.}}} * {{/appDescription}} */ @@ -47,7 +47,7 @@ public interface {{classname}} { * {{summary}} * {{#notes}} - * {{notes}} + * {{.}} * {{/notes}} */ @@ -62,9 +62,8 @@ public interface {{classname}} { {{/hasProduces}} @ApiOperation(value = "{{{summary}}}", tags={ {{#vendorExtensions.x-tags}}"{{tag}}"{{^-last}}, {{/-last}}{{/vendorExtensions.x-tags}} }) @ApiResponses(value = { {{#responses}} - @ApiResponse(code = {{{code}}}, message = "{{{message}}}"{{^vendorExtensions.x-java-is-response-void}}, response = {{{baseType}}}.class{{#containerType}}, responseContainer = "{{{containerType}}}"{{/containerType}}{{/vendorExtensions.x-java-is-response-void}}){{^-last}},{{/-last}}{{/responses}} }) + @ApiResponse(code = {{{code}}}, message = "{{{message}}}"{{^vendorExtensions.x-java-is-response-void}}, response = {{{baseType}}}.class{{#containerType}}, responseContainer = "{{{.}}}"{{/containerType}}{{/vendorExtensions.x-java-is-response-void}}){{^-last}},{{/-last}}{{/responses}} }) public {{>returnTypes}} {{operationId}}({{#allParams}}{{>queryParams}}{{>pathParams}}{{>headerParams}}{{>bodyParams}}{{>formParams}}{{^-last}}, {{/-last}}{{/allParams}}); {{/operation}} } {{/operations}} - diff --git a/modules/openapi-generator/src/main/resources/JavaJaxRS/cxf-ext/apiServiceImpl.mustache b/modules/openapi-generator/src/main/resources/JavaJaxRS/cxf-ext/apiServiceImpl.mustache index 633f014cf44d84895bdb2774a1db391cd4d2dab0..d93ffe8166b7beffc075a74dfaac268cdcdc7123 100644 --- a/modules/openapi-generator/src/main/resources/JavaJaxRS/cxf-ext/apiServiceImpl.mustache +++ b/modules/openapi-generator/src/main/resources/JavaJaxRS/cxf-ext/apiServiceImpl.mustache @@ -39,7 +39,7 @@ import org.springframework.stereotype.Service; * {{{appName}}} * {{#appDescription}} - * <p>{{{appDescription}}} + * <p>{{{.}}} {{/appDescription}} * */ @@ -68,7 +68,7 @@ public class {{classname}}ServiceImpl implements {{classname}} { * {{summary}} * {{#notes}} - * {{notes}} + * {{.}} * {{/notes}} */ diff --git a/modules/openapi-generator/src/main/resources/JavaJaxRS/cxf-ext/api_test.mustache b/modules/openapi-generator/src/main/resources/JavaJaxRS/cxf-ext/api_test.mustache index 6b141183c24d452a750d9c348b47063860ded570..7df1a6c2ee572a808190a6c5b5cccd067a3d789b 100644 --- a/modules/openapi-generator/src/main/resources/JavaJaxRS/cxf-ext/api_test.mustache +++ b/modules/openapi-generator/src/main/resources/JavaJaxRS/cxf-ext/api_test.mustache @@ -61,11 +61,11 @@ import org.openapitools.codegen.utils.JsonCache; /** {{#appName}} - * {{{appName}}} + * {{{.}}} * {{/appName}} {{#appDescription}} - * <p>{{{appDescription}}} + * <p>{{{.}}} * {{/appDescription}} * API tests for {{classname}}. @@ -96,7 +96,7 @@ public class {{classname}}Test { {{#generateSpringBootApplication}} @LocalServerPort private int serverPort; -{{/generateSpringBootApplication}} +{{/generateSpringBootApplication}} private {{classname}} api; @@ -104,23 +104,23 @@ public class {{classname}}Test { public void setup() { List<?> providers = Arrays.asList(new JacksonJsonProvider(), new JacksonXMLProvider(), new MultipartProvider()); -{{#generateSpringBootApplication}} +{{#generateSpringBootApplication}} api = JAXRSClientFactory.create("http://localhost:" + serverPort + "/services", {{classname}}.class, providers); -{{/generateSpringBootApplication}} +{{/generateSpringBootApplication}} {{^generateSpringBootApplication}} api = JAXRSClientFactory.create("{{{basePath}}}", {{classname}}.class, providers); {{/generateSpringBootApplication}} org.apache.cxf.jaxrs.client.Client client = WebClient.client(api); - ClientConfiguration config = WebClient.getConfig(client); -{{#useGzipFeatureForTests}} + ClientConfiguration config = WebClient.getConfig(client); +{{#useGzipFeatureForTests}} // Example for using Gzipping GZIPOutInterceptor gzipOutInterceptor = new GZIPOutInterceptor(); // use Gzipping for first request sent to server //gzipOutInterceptor.setForce(true); config.getOutInterceptors().add(gzipOutInterceptor); - config.getInInterceptors().add(new GZIPInInterceptor()); + config.getInInterceptors().add(new GZIPInInterceptor()); {{/useGzipFeatureForTests}} {{#useLoggingFeatureForTests}} LoggingOutInterceptor loggingOutInterceptor = new LoggingOutInterceptor(); @@ -147,7 +147,7 @@ public class {{classname}}Test { * {{summary}} * {{#notes}} - * {{notes}} + * {{.}} * {{/notes}} {{/summary}} diff --git a/modules/openapi-generator/src/main/resources/JavaJaxRS/cxf-ext/beanValidationCore.mustache b/modules/openapi-generator/src/main/resources/JavaJaxRS/cxf-ext/beanValidationCore.mustache index e1c2d841e0a1e3d352f7f877b11713963ba8dede..252828809b3a7d54eec75b8b4b6a9627677816ce 100644 --- a/modules/openapi-generator/src/main/resources/JavaJaxRS/cxf-ext/beanValidationCore.mustache +++ b/modules/openapi-generator/src/main/resources/JavaJaxRS/cxf-ext/beanValidationCore.mustache @@ -4,17 +4,17 @@ minLength && maxLength set minLength set, maxLength not }}{{#minLength}}{{^maxLength}} @Size(min={{minLength}}){{/maxLength}}{{/minLength}}{{! minLength not set, maxLength set -}}{{^minLength}}{{#maxLength}} @Size(max={{maxLength}}){{/maxLength}}{{/minLength}}{{! +}}{{^minLength}}{{#maxLength}} @Size(max={{.}}){{/maxLength}}{{/minLength}}{{! @Size: minItems && maxItems set }}{{#minItems}}{{#maxItems}} @Size(min={{minItems}},max={{maxItems}}){{/maxItems}}{{/minItems}}{{! @Size: minItems set, maxItems not }}{{#minItems}}{{^maxItems}} @Size(min={{minItems}}){{/maxItems}}{{/minItems}}{{! @Size: minItems not set && maxItems set -}}{{^minItems}}{{#maxItems}} @Size(max={{maxItems}}){{/maxItems}}{{/minItems}}{{! +}}{{^minItems}}{{#maxItems}} @Size(max={{.}}){{/maxItems}}{{/minItems}}{{! check for integer or long / all others=decimal type with @Decimal* isInteger set -}}{{#isInteger}}{{#minimum}} @Min({{minimum}}){{/minimum}}{{#maximum}} @Max({{maximum}}){{/maximum}}{{/isInteger}}{{! +}}{{#isInteger}}{{#minimum}} @Min({{.}}){{/minimum}}{{#maximum}} @Max({{.}}){{/maximum}}{{/isInteger}}{{! isLong set -}}{{#isLong}}{{#minimum}} @Min({{minimum}}L){{/minimum}}{{#maximum}} @Max({{maximum}}L){{/maximum}}{{/isLong}}{{! +}}{{#isLong}}{{#minimum}} @Min({{.}}L){{/minimum}}{{#maximum}} @Max({{.}}L){{/maximum}}{{/isLong}}{{! Not Integer, not Long => we have a decimal value! -}}{{^isInteger}}{{^isLong}}{{#minimum}} @DecimalMin("{{minimum}}"){{/minimum}}{{#maximum}} @DecimalMax("{{maximum}}"){{/maximum}}{{/isLong}}{{/isInteger}} \ No newline at end of file +}}{{^isInteger}}{{^isLong}}{{#minimum}} @DecimalMin("{{.}}"){{/minimum}}{{#maximum}} @DecimalMax("{{.}}"){{/maximum}}{{/isLong}}{{/isInteger}} \ No newline at end of file diff --git a/modules/openapi-generator/src/main/resources/JavaJaxRS/cxf-ext/beanValidationHeaderParams.mustache b/modules/openapi-generator/src/main/resources/JavaJaxRS/cxf-ext/beanValidationHeaderParams.mustache index f8eef8f94c7bea30e95938e16cc856b53036d82b..c4ff01d7e5526b8718f1385ee9416523e0d1c860 100644 --- a/modules/openapi-generator/src/main/resources/JavaJaxRS/cxf-ext/beanValidationHeaderParams.mustache +++ b/modules/openapi-generator/src/main/resources/JavaJaxRS/cxf-ext/beanValidationHeaderParams.mustache @@ -1 +1 @@ -{{#required}} @NotNull{{/required}}{{>beanValidationCore}} \ No newline at end of file +{{#required}} @NotNull{{/required}}{{>beanValidationCore}} \ No newline at end of file diff --git a/modules/openapi-generator/src/main/resources/JavaJaxRS/cxf-ext/beanValidationQueryParams.mustache b/modules/openapi-generator/src/main/resources/JavaJaxRS/cxf-ext/beanValidationQueryParams.mustache index f8eef8f94c7bea30e95938e16cc856b53036d82b..c4ff01d7e5526b8718f1385ee9416523e0d1c860 100644 --- a/modules/openapi-generator/src/main/resources/JavaJaxRS/cxf-ext/beanValidationQueryParams.mustache +++ b/modules/openapi-generator/src/main/resources/JavaJaxRS/cxf-ext/beanValidationQueryParams.mustache @@ -1 +1 @@ -{{#required}} @NotNull{{/required}}{{>beanValidationCore}} \ No newline at end of file +{{#required}} @NotNull{{/required}}{{>beanValidationCore}} \ No newline at end of file diff --git a/modules/openapi-generator/src/main/resources/JavaJaxRS/cxf-ext/enumClass.mustache b/modules/openapi-generator/src/main/resources/JavaJaxRS/cxf-ext/enumClass.mustache index ea397c86bbf21beee15474080cd4c2071e541255..a27b23ef7538b23aae3b9b0fd6807cb98797f191 100644 --- a/modules/openapi-generator/src/main/resources/JavaJaxRS/cxf-ext/enumClass.mustache +++ b/modules/openapi-generator/src/main/resources/JavaJaxRS/cxf-ext/enumClass.mustache @@ -3,7 +3,7 @@ {{>additionalEnumTypeAnnotations}}public enum {{datatypeWithEnum}} { {{#allowableValues}} - {{#enumVars}}@XmlEnumValue({{#isInteger}}"{{/isInteger}}{{#isDouble}}"{{/isDouble}}{{#isLong}}"{{/isLong}}{{#isFloat}}"{{/isFloat}}{{{value}}}{{#isInteger}}"{{/isInteger}}{{#isDouble}}"{{/isDouble}}{{#isLong}}"{{/isLong}}{{#isFloat}}"{{/isFloat}}) @JsonProperty({{#isInteger}}"{{/isInteger}}{{#isDouble}}"{{/isDouble}}{{#isLong}}"{{/isLong}}{{#isFloat}}"{{/isFloat}}{{{value}}}{{#isInteger}}"{{/isInteger}}{{#isDouble}}"{{/isDouble}}{{#isLong}}"{{/isLong}}{{#isFloat}}"{{/isFloat}}) {{name}}({{dataType}}.valueOf({{{value}}})){{^-last}}, + {{#enumVars}}@XmlEnumValue({{#isInteger}}"{{/isInteger}}{{#isDouble}}"{{/isDouble}}{{#isLong}}"{{/isLong}}{{#isFloat}}"{{/isFloat}}{{{value}}}{{#isInteger}}"{{/isInteger}}{{#isDouble}}"{{/isDouble}}{{#isLong}}"{{/isLong}}{{#isFloat}}"{{/isFloat}}) @JsonProperty({{#isInteger}}"{{/isInteger}}{{#isDouble}}"{{/isDouble}}{{#isLong}}"{{/isLong}}{{#isFloat}}"{{/isFloat}}{{{value}}}{{#isInteger}}"{{/isInteger}}{{#isDouble}}"{{/isDouble}}{{#isLong}}"{{/isLong}}{{#isFloat}}"{{/isFloat}}) {{name}}({{dataType}}.valueOf({{{value}}})){{^-last}}, {{/-last}}{{#-last}};{{/-last}}{{/enumVars}} {{/allowableValues}} @@ -23,7 +23,7 @@ } public static {{datatypeWithEnum}} fromValue({{dataType}} value) { - for ({{#datatypeWithEnum}}{{{.}}}{{/datatypeWithEnum}}{{^datatypeWithEnum}}{{{classname}}}{{/datatypeWithEnum}} b : {{#datatypeWithEnum}}{{{.}}}{{/datatypeWithEnum}}{{^datatypeWithEnum}}{{{classname}}}{{/datatypeWithEnum}}.values()) { + for ({{{datatypeWithEnum}}}{{^datatypeWithEnum}}{{{classname}}}{{/datatypeWithEnum}} b : {{{datatypeWithEnum}}}{{^datatypeWithEnum}}{{{classname}}}{{/datatypeWithEnum}}.values()) { if (b.value.equals(value)) { return b; } diff --git a/modules/openapi-generator/src/main/resources/JavaJaxRS/cxf-ext/enumOuterClass.mustache b/modules/openapi-generator/src/main/resources/JavaJaxRS/cxf-ext/enumOuterClass.mustache index 8d5639a8dec32f0bd80483e374e13b4a0723b29d..149cb8a99531a81be6482264995c8bbbfa54395f 100644 --- a/modules/openapi-generator/src/main/resources/JavaJaxRS/cxf-ext/enumOuterClass.mustache +++ b/modules/openapi-generator/src/main/resources/JavaJaxRS/cxf-ext/enumOuterClass.mustache @@ -4,9 +4,9 @@ import com.fasterxml.jackson.annotation.JsonValue; {{/jackson}} /** - * {{^description}}Gets or Sets {{{name}}}{{/description}}{{#description}}{{description}}{{/description}} + * {{description}}{{^description}}Gets or Sets {{{name}}}{{/description}} */ -{{>additionalEnumTypeAnnotations}}public enum {{#datatypeWithEnum}}{{{.}}}{{/datatypeWithEnum}}{{^datatypeWithEnum}}{{{classname}}}{{/datatypeWithEnum}} { +{{>additionalEnumTypeAnnotations}}public enum {{{datatypeWithEnum}}}{{^datatypeWithEnum}}{{{classname}}}{{/datatypeWithEnum}} { {{#gson}} {{#allowableValues}}{{#enumVars}} @SerializedName({{#isInteger}}"{{/isInteger}}{{#isDouble}}"{{/isDouble}}{{#isLong}}"{{/isLong}}{{#isFloat}}"{{/isFloat}}{{{value}}}{{#isInteger}}"{{/isInteger}}{{#isDouble}}"{{/isDouble}}{{#isLong}}"{{/isLong}}{{#isFloat}}"{{/isFloat}}) @@ -21,14 +21,14 @@ import com.fasterxml.jackson.annotation.JsonValue; private {{{dataType}}} value; - {{#datatypeWithEnum}}{{{.}}}{{/datatypeWithEnum}}{{^datatypeWithEnum}}{{{classname}}}{{/datatypeWithEnum}}({{{dataType}}} value) { + {{{datatypeWithEnum}}}{{^datatypeWithEnum}}{{{classname}}}{{/datatypeWithEnum}}({{{dataType}}} value) { this.value = value; } @Override {{#jackson}} @JsonValue -{{/jackson}} +{{/jackson}} public String toString() { return String.valueOf(value); } @@ -36,13 +36,13 @@ import com.fasterxml.jackson.annotation.JsonValue; {{#jackson}} @JsonCreator {{/jackson}} - public static {{#datatypeWithEnum}}{{{.}}}{{/datatypeWithEnum}}{{^datatypeWithEnum}}{{{classname}}}{{/datatypeWithEnum}} fromValue({{{dataType}}} value) { - for ({{#datatypeWithEnum}}{{{.}}}{{/datatypeWithEnum}}{{^datatypeWithEnum}}{{{classname}}}{{/datatypeWithEnum}} b : {{#datatypeWithEnum}}{{{.}}}{{/datatypeWithEnum}}{{^datatypeWithEnum}}{{{classname}}}{{/datatypeWithEnum}}.values()) { + public static {{{datatypeWithEnum}}}{{^datatypeWithEnum}}{{{classname}}}{{/datatypeWithEnum}} fromValue({{{dataType}}} value) { + for ({{{datatypeWithEnum}}}{{^datatypeWithEnum}}{{{classname}}}{{/datatypeWithEnum}} b : {{{datatypeWithEnum}}}{{^datatypeWithEnum}}{{{classname}}}{{/datatypeWithEnum}}.values()) { if (b.value.equals(value)) { return b; } } {{#isNullable}}return null;{{/isNullable}}{{^isNullable}}throw new IllegalArgumentException("Unexpected value '" + value + "'");{{/isNullable}} } - + } 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 9866f297a4d7e43b6e321965c75edff6e152b50a..be193d0c4fe807d927a4e2a2329b5c615954608c 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 @@ -2,8 +2,8 @@ * {{{appName}}} * {{{appDescription}}} * - * {{#version}}The version of the OpenAPI document: {{{version}}}{{/version}} - * {{#infoEmail}}Contact: {{{infoEmail}}}{{/infoEmail}} + * {{#version}}The version of the OpenAPI document: {{{.}}}{{/version}} + * {{#infoEmail}}Contact: {{{.}}}{{/infoEmail}} * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech diff --git a/modules/openapi-generator/src/main/resources/JavaJaxRS/cxf-ext/pojo.mustache b/modules/openapi-generator/src/main/resources/JavaJaxRS/cxf-ext/pojo.mustache index b5546d95a402ec40b8abefa017c326c5e9139af8..c8fb8fb44d201c18222e2110dd99256e743c618d 100644 --- a/modules/openapi-generator/src/main/resources/JavaJaxRS/cxf-ext/pojo.mustache +++ b/modules/openapi-generator/src/main/resources/JavaJaxRS/cxf-ext/pojo.mustache @@ -23,19 +23,19 @@ import com.fasterxml.jackson.annotation.JsonProperty; */ @ApiModel(description="{{{description}}}") {{/description}}{{>additionalModelTypeAnnotations}} -public class {{classname}} {{#parent}}extends {{{parent}}}{{/parent}}{{#serializableModel}} implements Serializable{{/serializableModel}} { +public class {{classname}} {{#parent}}extends {{{.}}}{{/parent}}{{#serializableModel}} implements Serializable{{/serializableModel}} { {{#vars}}{{#isEnum}}{{^isContainer}} {{>enumClass}}{{/isContainer}}{{#isContainer}}{{#mostInnerItems}} {{>enumClass}}{{/mostInnerItems}}{{/isContainer}}{{/isEnum}} {{#description}} /** - * {{{description}}} + * {{{.}}} */ {{/description}} {{#withXml}} @XmlElement(name="{{baseName}}"{{#required}}, required = {{required}}{{/required}}) {{/withXml}} - @ApiModelProperty({{#example}}example = "{{{example}}}", {{/example}}{{#required}}required = {{required}}, {{/required}}value = "{{{description}}}"){{^isPrimitiveType}}{{^isDate}}{{^isDateTime}}{{^isString}}{{^isFile}}{{#useBeanValidation}} + @ApiModelProperty({{#example}}example = "{{{.}}}", {{/example}}{{#required}}required = {{required}}, {{/required}}value = "{{{description}}}"){{^isPrimitiveType}}{{^isDate}}{{^isDateTime}}{{^isString}}{{^isFile}}{{#useBeanValidation}} @Valid{{/useBeanValidation}}{{/isFile}}{{/isString}}{{/isDateTime}}{{/isDate}}{{/isPrimitiveType}} {{#isDate}} @JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd") @@ -53,16 +53,16 @@ public class {{classname}} {{#parent}}extends {{{parent}}}{{/parent}}{{#serializ {{#vars}} /** {{#description}} - * {{description}} + * {{.}} {{/description}} {{^description}} * Get {{name}} {{/description}} {{#minimum}} - * minimum: {{minimum}} + * minimum: {{.}} {{/minimum}} {{#maximum}} - * maximum: {{maximum}} + * maximum: {{.}} {{/maximum}} * @return {{name}} */ 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 e9df52a01a6d14cd6ab284af3ac69446b9556abc..3942068dc5fe114ccf2ba783b6b822cb182bfe8f 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 @@ -5,7 +5,7 @@ <packaging>jar</packaging> <name>{{artifactId}}</name> {{#appDescription}} - <description>{{appDescription}}</description> + <description>{{.}}</description> {{/appDescription}} <version>{{artifactVersion}}</version> <build> @@ -131,7 +131,7 @@ <version>${cxf-version}</version> <scope>test</scope> </dependency> - + <!-- CXF server --> <dependency> <groupId>org.apache.cxf</groupId> @@ -183,13 +183,13 @@ <version>${jackson-jaxrs-version}</version> </dependency> {{/java8}} -{{#useBeanValidationFeature}} +{{#useBeanValidationFeature}} <dependency> <groupId>org.hibernate</groupId> <artifactId>hibernate-validator</artifactId> <version>5.2.2.Final</version> </dependency> -{{/useBeanValidationFeature}} +{{/useBeanValidationFeature}} </dependencies> <repositories> <repository> diff --git a/modules/openapi-generator/src/main/resources/JavaJaxRS/cxf-ext/queryParams.mustache b/modules/openapi-generator/src/main/resources/JavaJaxRS/cxf-ext/queryParams.mustache index f89529fdb5dd8d3084933e37767a9f0b188faa18..38bfb9ed06e7b3707c43d7d118c5a6c153549630 100644 --- a/modules/openapi-generator/src/main/resources/JavaJaxRS/cxf-ext/queryParams.mustache +++ b/modules/openapi-generator/src/main/resources/JavaJaxRS/cxf-ext/queryParams.mustache @@ -1 +1 @@ -{{#isQueryParam}}@QueryParam("{{baseName}}"){{#useBeanValidation}}{{>beanValidationQueryParams}}{{/useBeanValidation}} {{^isContainer}}{{#defaultValue}}@DefaultValue("{{{defaultValue}}}") {{/defaultValue}}{{/isContainer}}{{{dataType}}} {{paramName}}{{/isQueryParam}} \ No newline at end of file +{{#isQueryParam}}@QueryParam("{{baseName}}"){{#useBeanValidation}}{{>beanValidationQueryParams}}{{/useBeanValidation}} {{^isContainer}}{{#defaultValue}}@DefaultValue("{{{.}}}") {{/defaultValue}}{{/isContainer}}{{{dataType}}} {{paramName}}{{/isQueryParam}} \ No newline at end of file diff --git a/modules/openapi-generator/src/main/resources/JavaJaxRS/cxf-ext/returnTypes.mustache b/modules/openapi-generator/src/main/resources/JavaJaxRS/cxf-ext/returnTypes.mustache index 6af86ffe4e4a3fedc80723d298519f01aef75c87..32f96a904720b5d388713d23dbc0d9ee7eff8dce 100644 --- a/modules/openapi-generator/src/main/resources/JavaJaxRS/cxf-ext/returnTypes.mustache +++ b/modules/openapi-generator/src/main/resources/JavaJaxRS/cxf-ext/returnTypes.mustache @@ -1,4 +1,4 @@ -{{#useGenericResponse}}Response{{/useGenericResponse}}{{! non-generic response: +{{#useGenericResponse}}Response{{/useGenericResponse}}{{! non-generic response: }}{{^useGenericResponse}}{{! }}{{{returnType}}}{{! }}{{/useGenericResponse}} \ No newline at end of file diff --git a/modules/openapi-generator/src/main/resources/JavaJaxRS/cxf-ext/server/ApplicationContext.xml.mustache b/modules/openapi-generator/src/main/resources/JavaJaxRS/cxf-ext/server/ApplicationContext.xml.mustache index b911475e293a9dbae87b04699947e1b1d2cf31ba..e85294fb336de510ec6fcea6ec3615a40d345c00 100644 --- a/modules/openapi-generator/src/main/resources/JavaJaxRS/cxf-ext/server/ApplicationContext.xml.mustache +++ b/modules/openapi-generator/src/main/resources/JavaJaxRS/cxf-ext/server/ApplicationContext.xml.mustache @@ -1,6 +1,6 @@ <?xml version="1.0" encoding="UTF-8"?> <beans xmlns="http://www.springframework.org/schema/beans" - xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:cxf="http://cxf.apache.org/core" xmlns:jaxrs="http://cxf.apache.org/jaxrs" xmlns:jee="http://www.springframework.org/schema/jee" @@ -32,9 +32,9 @@ {{/apiInfo}} {{/useSpringAnnotationConfig}} -{{#useSwaggerFeature}} +{{#useSwaggerFeature}} <!-- CXF Swagger2Feature --> - {{! http://cxf.apache.org/docs/swagger2feature.html }} + {{! http://cxf.apache.org/docs/swagger2feature.html }} <bean id="swagger2Feature" class="org.apache.cxf.jaxrs.swagger.Swagger2Feature"> <!--property name="basePath" value="/services"/--> {{#useSwaggerUI}} @@ -54,7 +54,7 @@ {{#useGzipFeature}} <ref bean="GZIPInInterceptor"/> {{/useGzipFeature}} -{{#useBeanValidationFeature}} +{{#useBeanValidationFeature}} <!-- BeanValidation 1.1 for CXF --> <ref bean="validationInInterceptor" /> {{/useBeanValidationFeature}} @@ -81,14 +81,14 @@ </cxf:properties> </cxf:bus> -{{#useWadlFeature}} +{{#useWadlFeature}} <bean id="wadlGenerator" class="org.apache.cxf.jaxrs.model.wadl.WadlGenerator"> <property name="linkJsonToXmlSchema" value="true" /> </bean> {{/useWadlFeature}} -{{#useGzipFeature}} +{{#useGzipFeature}} <bean id="GZIPInInterceptor" class="org.apache.cxf.transport.common.gzip.GZIPInInterceptor"/> <bean id="GZIPOutInterceptor" class="org.apache.cxf.transport.common.gzip.GZIPOutInterceptor" > <!--property name="force" value="true" /--> @@ -136,10 +136,10 @@ {{/useWadlFeature}} </jaxrs:providers> <jaxrs:features> -{{#useSwaggerFeature}} +{{#useSwaggerFeature}} <ref bean="swagger2Feature" /> {{/useSwaggerFeature}} -{{#useBeanValidationFeature}} +{{#useBeanValidationFeature}} <ref bean="commonValidationFeature" /> {{/useBeanValidationFeature}} </jaxrs:features> diff --git a/modules/openapi-generator/src/main/resources/JavaJaxRS/cxf-ext/server/SpringBootApplication.mustache b/modules/openapi-generator/src/main/resources/JavaJaxRS/cxf-ext/server/SpringBootApplication.mustache index a65a60f3ec21b9789c1fa968c255e5adb9744777..a2c2d9c645d0b92ac54c077421dfe4ae8f3cb766 100644 --- a/modules/openapi-generator/src/main/resources/JavaJaxRS/cxf-ext/server/SpringBootApplication.mustache +++ b/modules/openapi-generator/src/main/resources/JavaJaxRS/cxf-ext/server/SpringBootApplication.mustache @@ -11,15 +11,15 @@ import org.springframework.context.annotation.ImportResource; @EnableAutoConfiguration @SpringBootConfiguration public class SpringBootApplication extends SpringBootServletInitializer { - + @Override protected SpringApplicationBuilder configure(SpringApplicationBuilder application) { return application.sources(SpringBootApplication.class); } - + public static void main(String[] args) { SpringApplication.run(SpringBootApplication.class, args); } - - + + } \ No newline at end of file diff --git a/modules/openapi-generator/src/main/resources/JavaJaxRS/cxf-ext/server/context.xml.mustache b/modules/openapi-generator/src/main/resources/JavaJaxRS/cxf-ext/server/context.xml.mustache index a14b9a13d015a8da16f9f57d745976c93e288891..0dc82b9a2e95568c5a70bc00e0c3635476744274 100644 --- a/modules/openapi-generator/src/main/resources/JavaJaxRS/cxf-ext/server/context.xml.mustache +++ b/modules/openapi-generator/src/main/resources/JavaJaxRS/cxf-ext/server/context.xml.mustache @@ -1,6 +1,6 @@ <?xml version="1.0" encoding="UTF-8"?> <beans xmlns="http://www.springframework.org/schema/beans" - xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:cxf="http://cxf.apache.org/core" xmlns:jaxrs="http://cxf.apache.org/jaxrs" xmlns:jee="http://www.springframework.org/schema/jee" @@ -11,8 +11,8 @@ http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context.xsd http://www.springframework.org/schema/jee http://www.springframework.org/schema/jee/spring-jee.xsd"> - - + + <import resource="classpath:/ApplicationContext.xml" /> - + </beans> 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 8cb82501d51f9337fd6be7ebb3ac0e7fc47ce5aa..be1e78234c42c3e3153088c3a22fba2c16c6a79f 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 @@ -5,7 +5,7 @@ <packaging>war</packaging> <name>{{artifactId}}</name> {{#appDescription}} - <description>{{appDescription}}</description> + <description>{{.}}</description> {{/appDescription}} <version>{{artifactVersion}}</version> {{#generateSpringBootApplication}} @@ -96,7 +96,7 @@ </execution> </executions> </plugin> - + <!-- build WAR file --> <plugin> <artifactId>maven-war-plugin</artifactId> @@ -227,7 +227,7 @@ {{/generateSpringBootApplication}} </dependency> {{/java8}} -{{#generateSpringApplication}} +{{#generateSpringApplication}} <!-- Spring Framework --> <dependency> <groupId>org.springframework</groupId> @@ -256,7 +256,7 @@ {{^generateSpringBootApplication}} <version>${spring-version}</version> {{/generateSpringBootApplication}} - </dependency> + </dependency> {{/generateSpringApplication}} {{#generateSpringBootApplication}} <!-- Spring Boot dependencies for integration tests --> @@ -331,11 +331,11 @@ {{#useBeanValidation}} <beanvalidation-version>1.1.0.Final</beanvalidation-version> {{/useBeanValidation}} -{{#generateSpringApplication}} +{{#generateSpringApplication}} {{^generateSpringBootApplication}} <spring-version>5.0.8.RELEASE</spring-version> {{/generateSpringBootApplication}} -{{/generateSpringApplication}} +{{/generateSpringApplication}} {{^generateSpringBootApplication}} <junit-version>4.13</junit-version> <logback-version>1.2.0</logback-version> diff --git a/modules/openapi-generator/src/main/resources/JavaJaxRS/cxf-ext/server/web.mustache b/modules/openapi-generator/src/main/resources/JavaJaxRS/cxf-ext/server/web.mustache index 9d905ae076bb141ab20dc697bd0fc6d850b3fb33..890f10ef14d89ffade63aef58634a33a10fdd93f 100644 --- a/modules/openapi-generator/src/main/resources/JavaJaxRS/cxf-ext/server/web.mustache +++ b/modules/openapi-generator/src/main/resources/JavaJaxRS/cxf-ext/server/web.mustache @@ -19,5 +19,5 @@ <servlet-name>CXFServiceServlet</servlet-name> <url-pattern>/rest/*</url-pattern> </servlet-mapping> - + </web-app> diff --git a/modules/openapi-generator/src/main/resources/JavaJaxRS/cxf/allowableValues.mustache b/modules/openapi-generator/src/main/resources/JavaJaxRS/cxf/allowableValues.mustache index a48256d027a1601d3cb9c427e67119dcff701431..75bce9385dea140e1cae22202bcacd2b11e07b76 100644 --- a/modules/openapi-generator/src/main/resources/JavaJaxRS/cxf/allowableValues.mustache +++ b/modules/openapi-generator/src/main/resources/JavaJaxRS/cxf/allowableValues.mustache @@ -1 +1 @@ -{{#allowableValues}}allowableValues="{{#values}}{{{.}}}{{^-last}}, {{/-last}}{{/values}}{{^values}}range=[{{#min}}{{.}}{{/min}}{{^min}}-infinity{{/min}}, {{#max}}{{.}}{{/max}}{{^max}}infinity{{/max}}]{{/values}}"{{/allowableValues}} \ No newline at end of file +{{#allowableValues}}allowableValues="{{#values}}{{{.}}}{{^-last}}, {{/-last}}{{/values}}{{^values}}range=[{{min}}{{^min}}-infinity{{/min}}, {{max}}{{^max}}infinity{{/max}}]{{/values}}"{{/allowableValues}} \ No newline at end of file diff --git a/modules/openapi-generator/src/main/resources/JavaJaxRS/cxf/api.mustache b/modules/openapi-generator/src/main/resources/JavaJaxRS/cxf/api.mustache index 6b8e85e9239bce591d0410f5ae754593ff14efc6..09f19bbe5dd04492647858133e187dc505a6d7da 100644 --- a/modules/openapi-generator/src/main/resources/JavaJaxRS/cxf/api.mustache +++ b/modules/openapi-generator/src/main/resources/JavaJaxRS/cxf/api.mustache @@ -27,7 +27,7 @@ import javax.validation.Valid; * {{{appName}}} * {{#appDescription}} - * <p>{{{appDescription}}} + * <p>{{{.}}} * {{/appDescription}} */ @@ -47,7 +47,7 @@ public interface {{classname}} { * {{summary}} * {{#notes}} - * {{notes}} + * {{.}} * {{/notes}} */ @@ -62,9 +62,8 @@ public interface {{classname}} { {{/hasProduces}} @ApiOperation(value = "{{{summary}}}", tags={ {{#vendorExtensions.x-tags}}"{{tag}}"{{^-last}}, {{/-last}}{{/vendorExtensions.x-tags}} }) @ApiResponses(value = { {{#responses}} - @ApiResponse(code = {{{code}}}, message = "{{{message}}}"{{^vendorExtensions.x-java-is-response-void}}, response = {{{baseType}}}.class{{#containerType}}, responseContainer = "{{{containerType}}}"{{/containerType}}{{/vendorExtensions.x-java-is-response-void}}){{^-last}},{{/-last}}{{/responses}} }) + @ApiResponse(code = {{{code}}}, message = "{{{message}}}"{{^vendorExtensions.x-java-is-response-void}}, response = {{{baseType}}}.class{{#containerType}}, responseContainer = "{{{.}}}"{{/containerType}}{{/vendorExtensions.x-java-is-response-void}}){{^-last}},{{/-last}}{{/responses}} }) public {{>returnTypes}} {{nickname}}({{#allParams}}{{>queryParams}}{{>pathParams}}{{>headerParams}}{{>bodyParams}}{{>formParams}}{{^-last}}, {{/-last}}{{/allParams}}); {{/operation}} } {{/operations}} - diff --git a/modules/openapi-generator/src/main/resources/JavaJaxRS/cxf/apiServiceImpl.mustache b/modules/openapi-generator/src/main/resources/JavaJaxRS/cxf/apiServiceImpl.mustache index 52aa0e90ef7ba11f741a5568eb79b582a569208d..bb9bc8d55fa9cf27fa1cad51a06cc651aeca124d 100644 --- a/modules/openapi-generator/src/main/resources/JavaJaxRS/cxf/apiServiceImpl.mustache +++ b/modules/openapi-generator/src/main/resources/JavaJaxRS/cxf/apiServiceImpl.mustache @@ -30,7 +30,7 @@ import org.springframework.stereotype.Service; * {{{appName}}} * {{#appDescription}} - * <p>{{{appDescription}}} + * <p>{{{.}}} {{/appDescription}} * */ @@ -43,18 +43,17 @@ public class {{classname}}ServiceImpl implements {{classname}} { * {{summary}} * {{#notes}} - * {{notes}} + * {{.}} * {{/notes}} */ {{/summary}} public {{>returnTypes}} {{nickname}}({{#allParams}}{{>queryParamsImpl}}{{>pathParamsImpl}}{{>headerParamsImpl}}{{>bodyParamsImpl}}{{>formParamsImpl}}{{^-last}}, {{/-last}}{{/allParams}}) { // TODO: Implement... - + {{#useGenericResponse}}return Response.ok().entity("magic!").build();{{/useGenericResponse}}{{^useGenericResponse}}{{^vendorExtensions.x-java-is-response-void}}return null;{{/vendorExtensions.x-java-is-response-void}}{{/useGenericResponse}} } - + {{/operation}} } {{/operations}} - diff --git a/modules/openapi-generator/src/main/resources/JavaJaxRS/cxf/api_test.mustache b/modules/openapi-generator/src/main/resources/JavaJaxRS/cxf/api_test.mustache index 063c65543002413782f9af40262831edc45dca9d..43c1d40d7a1caf1b88bd4556e5751e67c87196fb 100644 --- a/modules/openapi-generator/src/main/resources/JavaJaxRS/cxf/api_test.mustache +++ b/modules/openapi-generator/src/main/resources/JavaJaxRS/cxf/api_test.mustache @@ -43,14 +43,14 @@ import org.springframework.test.context.web.WebAppConfiguration; /** {{#appName}} - * {{{appName}}} + * {{{.}}} * {{/appName}} {{#appDescription}} - * <p>{{{appDescription}}} + * <p>{{{.}}} * {{/appDescription}} - * API tests for {{classname}} + * API tests for {{classname}} */ {{#generateSpringBootApplication}} @RunWith(SpringJUnit4ClassRunner.class) @@ -63,33 +63,33 @@ public class {{classname}}Test { {{#generateSpringBootApplication}} @Value("${local.server.port}") private int serverPort; -{{/generateSpringBootApplication}} +{{/generateSpringBootApplication}} private {{classname}} api; - + @Before public void setup() { JacksonJsonProvider provider = new JacksonJsonProvider(); List providers = new ArrayList(); providers.add(provider); - -{{#generateSpringBootApplication}} + +{{#generateSpringBootApplication}} api = JAXRSClientFactory.create("http://localhost:" + serverPort + "/services", {{classname}}.class, providers); -{{/generateSpringBootApplication}} +{{/generateSpringBootApplication}} {{^generateSpringBootApplication}} api = JAXRSClientFactory.create("{{{basePath}}}", {{classname}}.class, providers); {{/generateSpringBootApplication}} org.apache.cxf.jaxrs.client.Client client = WebClient.client(api); - - ClientConfiguration config = WebClient.getConfig(client); -{{#useGzipFeatureForTests}} + + ClientConfiguration config = WebClient.getConfig(client); +{{#useGzipFeatureForTests}} // Example for using Gzipping GZIPOutInterceptor gzipOutInterceptor = new GZIPOutInterceptor(); // use Gzipping for first request sent to server //gzipOutInterceptor.setForce(true); config.getOutInterceptors().add(gzipOutInterceptor); - - config.getInInterceptors().add(new GZIPInInterceptor()); + + config.getInInterceptors().add(new GZIPInInterceptor()); {{/useGzipFeatureForTests}} {{#useLoggingFeatureForTests}} LoggingOutInterceptor loggingOutInterceptor = new LoggingOutInterceptor(); @@ -103,7 +103,7 @@ public class {{classname}}Test { * {{summary}} * {{#notes}} - * {{notes}} + * {{.}} * {{/notes}} {{/summary}} @@ -118,8 +118,8 @@ public class {{classname}}Test { //{{^vendorExtensions.x-java-is-response-void}}{{>returnTypes}} response = {{/vendorExtensions.x-java-is-response-void}}api.{{operationId}}({{#allParams}}{{paramName}}{{^-last}}, {{/-last}}{{/allParams}}); {{^vendorExtensions.x-java-is-response-void}}//assertNotNull(response);{{/vendorExtensions.x-java-is-response-void}} // TODO: test validations - - + + } {{/operation}}{{/operations}} } diff --git a/modules/openapi-generator/src/main/resources/JavaJaxRS/cxf/beanValidationCore.mustache b/modules/openapi-generator/src/main/resources/JavaJaxRS/cxf/beanValidationCore.mustache index 1f9f43e7b868563d7df92da9f413d62e76d38197..ff4ffe26c49765afe7058bc23df182aa0a4056e9 100644 --- a/modules/openapi-generator/src/main/resources/JavaJaxRS/cxf/beanValidationCore.mustache +++ b/modules/openapi-generator/src/main/resources/JavaJaxRS/cxf/beanValidationCore.mustache @@ -4,17 +4,17 @@ minLength && maxLength set minLength set, maxLength not }}{{#minLength}}{{^maxLength}} @Size(min={{minLength}}){{/maxLength}}{{/minLength}}{{! minLength not set, maxLength set -}}{{^minLength}}{{#maxLength}} @Size(max={{maxLength}}){{/maxLength}}{{/minLength}}{{! +}}{{^minLength}}{{#maxLength}} @Size(max={{.}}){{/maxLength}}{{/minLength}}{{! @Size: minItems && maxItems set }}{{#minItems}}{{#maxItems}} @Size(min={{minItems}},max={{maxItems}}){{/maxItems}}{{/minItems}}{{! @Size: minItems set, maxItems not }}{{#minItems}}{{^maxItems}} @Size(min={{minItems}}){{/maxItems}}{{/minItems}}{{! @Size: minItems not set && maxItems set -}}{{^minItems}}{{#maxItems}} @Size(max={{maxItems}}){{/maxItems}}{{/minItems}}{{! +}}{{^minItems}}{{#maxItems}} @Size(max={{.}}){{/maxItems}}{{/minItems}}{{! check for integer or long / all others=decimal type with @Decimal* isInteger set -}}{{#isInteger}}{{#minimum}} @Min({{minimum}}){{/minimum}}{{#maximum}} @Max({{maximum}}){{/maximum}}{{/isInteger}}{{! +}}{{#isInteger}}{{#minimum}} @Min({{.}}){{/minimum}}{{#maximum}} @Max({{.}}){{/maximum}}{{/isInteger}}{{! isLong set -}}{{#isLong}}{{#minimum}} @Min({{minimum}}L){{/minimum}}{{#maximum}} @Max({{maximum}}L){{/maximum}}{{/isLong}}{{! +}}{{#isLong}}{{#minimum}} @Min({{.}}L){{/minimum}}{{#maximum}} @Max({{.}}L){{/maximum}}{{/isLong}}{{! Not Integer, not Long => we have a decimal value! }}{{^isInteger}}{{^isLong}}{{#minimum}} @DecimalMin({{#exclusiveMinimum}}value={{/exclusiveMinimum}}"{{minimum}}"{{#exclusiveMinimum}},inclusive=false{{/exclusiveMinimum}}){{/minimum}}{{#maximum}} @DecimalMax({{#exclusiveMaximum}}value={{/exclusiveMaximum}}"{{maximum}}"{{#exclusiveMaximum}},inclusive=false{{/exclusiveMaximum}}){{/maximum}}{{/isLong}}{{/isInteger}} \ No newline at end of file diff --git a/modules/openapi-generator/src/main/resources/JavaJaxRS/cxf/beanValidationHeaderParams.mustache b/modules/openapi-generator/src/main/resources/JavaJaxRS/cxf/beanValidationHeaderParams.mustache index f8eef8f94c7bea30e95938e16cc856b53036d82b..c4ff01d7e5526b8718f1385ee9416523e0d1c860 100644 --- a/modules/openapi-generator/src/main/resources/JavaJaxRS/cxf/beanValidationHeaderParams.mustache +++ b/modules/openapi-generator/src/main/resources/JavaJaxRS/cxf/beanValidationHeaderParams.mustache @@ -1 +1 @@ -{{#required}} @NotNull{{/required}}{{>beanValidationCore}} \ No newline at end of file +{{#required}} @NotNull{{/required}}{{>beanValidationCore}} \ No newline at end of file diff --git a/modules/openapi-generator/src/main/resources/JavaJaxRS/cxf/beanValidationQueryParams.mustache b/modules/openapi-generator/src/main/resources/JavaJaxRS/cxf/beanValidationQueryParams.mustache index f8eef8f94c7bea30e95938e16cc856b53036d82b..c4ff01d7e5526b8718f1385ee9416523e0d1c860 100644 --- a/modules/openapi-generator/src/main/resources/JavaJaxRS/cxf/beanValidationQueryParams.mustache +++ b/modules/openapi-generator/src/main/resources/JavaJaxRS/cxf/beanValidationQueryParams.mustache @@ -1 +1 @@ -{{#required}} @NotNull{{/required}}{{>beanValidationCore}} \ No newline at end of file +{{#required}} @NotNull{{/required}}{{>beanValidationCore}} \ No newline at end of file diff --git a/modules/openapi-generator/src/main/resources/JavaJaxRS/cxf/enumClass.mustache b/modules/openapi-generator/src/main/resources/JavaJaxRS/cxf/enumClass.mustache index f2944aa591378452286f24a64c53f62b3f11ea94..fa2e6804f31799ad0c36dd99f5b1d8b3831d8001 100644 --- a/modules/openapi-generator/src/main/resources/JavaJaxRS/cxf/enumClass.mustache +++ b/modules/openapi-generator/src/main/resources/JavaJaxRS/cxf/enumClass.mustache @@ -29,7 +29,7 @@ @JsonCreator {{/jackson}} public static {{datatypeWithEnum}} fromValue({{dataType}} value) { - for ({{#datatypeWithEnum}}{{{.}}}{{/datatypeWithEnum}}{{^datatypeWithEnum}}{{{classname}}}{{/datatypeWithEnum}} b : {{#datatypeWithEnum}}{{{.}}}{{/datatypeWithEnum}}{{^datatypeWithEnum}}{{{classname}}}{{/datatypeWithEnum}}.values()) { + for ({{{datatypeWithEnum}}}{{^datatypeWithEnum}}{{{classname}}}{{/datatypeWithEnum}} b : {{{datatypeWithEnum}}}{{^datatypeWithEnum}}{{{classname}}}{{/datatypeWithEnum}}.values()) { if (b.value.equals(value)) { return b; } diff --git a/modules/openapi-generator/src/main/resources/JavaJaxRS/cxf/enumOuterClass.mustache b/modules/openapi-generator/src/main/resources/JavaJaxRS/cxf/enumOuterClass.mustache index 8d5639a8dec32f0bd80483e374e13b4a0723b29d..149cb8a99531a81be6482264995c8bbbfa54395f 100644 --- a/modules/openapi-generator/src/main/resources/JavaJaxRS/cxf/enumOuterClass.mustache +++ b/modules/openapi-generator/src/main/resources/JavaJaxRS/cxf/enumOuterClass.mustache @@ -4,9 +4,9 @@ import com.fasterxml.jackson.annotation.JsonValue; {{/jackson}} /** - * {{^description}}Gets or Sets {{{name}}}{{/description}}{{#description}}{{description}}{{/description}} + * {{description}}{{^description}}Gets or Sets {{{name}}}{{/description}} */ -{{>additionalEnumTypeAnnotations}}public enum {{#datatypeWithEnum}}{{{.}}}{{/datatypeWithEnum}}{{^datatypeWithEnum}}{{{classname}}}{{/datatypeWithEnum}} { +{{>additionalEnumTypeAnnotations}}public enum {{{datatypeWithEnum}}}{{^datatypeWithEnum}}{{{classname}}}{{/datatypeWithEnum}} { {{#gson}} {{#allowableValues}}{{#enumVars}} @SerializedName({{#isInteger}}"{{/isInteger}}{{#isDouble}}"{{/isDouble}}{{#isLong}}"{{/isLong}}{{#isFloat}}"{{/isFloat}}{{{value}}}{{#isInteger}}"{{/isInteger}}{{#isDouble}}"{{/isDouble}}{{#isLong}}"{{/isLong}}{{#isFloat}}"{{/isFloat}}) @@ -21,14 +21,14 @@ import com.fasterxml.jackson.annotation.JsonValue; private {{{dataType}}} value; - {{#datatypeWithEnum}}{{{.}}}{{/datatypeWithEnum}}{{^datatypeWithEnum}}{{{classname}}}{{/datatypeWithEnum}}({{{dataType}}} value) { + {{{datatypeWithEnum}}}{{^datatypeWithEnum}}{{{classname}}}{{/datatypeWithEnum}}({{{dataType}}} value) { this.value = value; } @Override {{#jackson}} @JsonValue -{{/jackson}} +{{/jackson}} public String toString() { return String.valueOf(value); } @@ -36,13 +36,13 @@ import com.fasterxml.jackson.annotation.JsonValue; {{#jackson}} @JsonCreator {{/jackson}} - public static {{#datatypeWithEnum}}{{{.}}}{{/datatypeWithEnum}}{{^datatypeWithEnum}}{{{classname}}}{{/datatypeWithEnum}} fromValue({{{dataType}}} value) { - for ({{#datatypeWithEnum}}{{{.}}}{{/datatypeWithEnum}}{{^datatypeWithEnum}}{{{classname}}}{{/datatypeWithEnum}} b : {{#datatypeWithEnum}}{{{.}}}{{/datatypeWithEnum}}{{^datatypeWithEnum}}{{{classname}}}{{/datatypeWithEnum}}.values()) { + public static {{{datatypeWithEnum}}}{{^datatypeWithEnum}}{{{classname}}}{{/datatypeWithEnum}} fromValue({{{dataType}}} value) { + for ({{{datatypeWithEnum}}}{{^datatypeWithEnum}}{{{classname}}}{{/datatypeWithEnum}} b : {{{datatypeWithEnum}}}{{^datatypeWithEnum}}{{{classname}}}{{/datatypeWithEnum}}.values()) { if (b.value.equals(value)) { return b; } } {{#isNullable}}return null;{{/isNullable}}{{^isNullable}}throw new IllegalArgumentException("Unexpected value '" + value + "'");{{/isNullable}} } - + } 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 9866f297a4d7e43b6e321965c75edff6e152b50a..be193d0c4fe807d927a4e2a2329b5c615954608c 100644 --- a/modules/openapi-generator/src/main/resources/JavaJaxRS/cxf/licenseInfo.mustache +++ b/modules/openapi-generator/src/main/resources/JavaJaxRS/cxf/licenseInfo.mustache @@ -2,8 +2,8 @@ * {{{appName}}} * {{{appDescription}}} * - * {{#version}}The version of the OpenAPI document: {{{version}}}{{/version}} - * {{#infoEmail}}Contact: {{{infoEmail}}}{{/infoEmail}} + * {{#version}}The version of the OpenAPI document: {{{.}}}{{/version}} + * {{#infoEmail}}Contact: {{{.}}}{{/infoEmail}} * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech diff --git a/modules/openapi-generator/src/main/resources/JavaJaxRS/cxf/pojo.mustache b/modules/openapi-generator/src/main/resources/JavaJaxRS/cxf/pojo.mustache index 0dd381f8ee4b79b623b8b5aa96cee0e3f745fa66..23fc0fb38ac062aa6eecd0dd183f37065ae27b26 100644 --- a/modules/openapi-generator/src/main/resources/JavaJaxRS/cxf/pojo.mustache +++ b/modules/openapi-generator/src/main/resources/JavaJaxRS/cxf/pojo.mustache @@ -14,18 +14,18 @@ import com.fasterxml.jackson.annotation.JsonProperty; **/ @ApiModel(description="{{{description}}}") {{/description}} -{{>additionalModelTypeAnnotations}}{{>xmlPojoAnnotation}}{{#discriminator}}{{>typeInfoAnnotation}}{{/discriminator}}public class {{classname}} {{#parent}}extends {{{parent}}}{{/parent}}{{#serializableModel}} implements Serializable{{/serializableModel}} { +{{>additionalModelTypeAnnotations}}{{>xmlPojoAnnotation}}{{#discriminator}}{{>typeInfoAnnotation}}{{/discriminator}}public class {{classname}} {{#parent}}extends {{{.}}}{{/parent}}{{#serializableModel}} implements Serializable{{/serializableModel}} { {{#vars}}{{#isEnum}}{{^isContainer}} {{>enumClass}}{{/isContainer}}{{#isContainer}}{{#mostInnerItems}} {{>enumClass}}{{/mostInnerItems}}{{/isContainer}}{{/isEnum}} {{#withXml}} @XmlElement(name="{{baseName}}"{{#required}}, required = {{required}}{{/required}}) {{/withXml}} - @ApiModelProperty({{#example}}example = "{{{example}}}", {{/example}}{{#required}}required = {{required}}, {{/required}}value = "{{{description}}}"){{^isPrimitiveType}}{{^isDate}}{{^isDateTime}}{{^isString}}{{^isFile}}{{#useBeanValidation}} + @ApiModelProperty({{#example}}example = "{{{.}}}", {{/example}}{{#required}}required = {{required}}, {{/required}}value = "{{{description}}}"){{^isPrimitiveType}}{{^isDate}}{{^isDateTime}}{{^isString}}{{^isFile}}{{#useBeanValidation}} @Valid{{/useBeanValidation}}{{/isFile}}{{/isString}}{{/isDateTime}}{{/isDate}}{{/isPrimitiveType}} {{#description}} /** - * {{{description}}} + * {{{.}}} **/ {{/description}} {{#vendorExtensions.x-is-jackson-optional-nullable}} @@ -48,16 +48,16 @@ import com.fasterxml.jackson.annotation.JsonProperty; {{#vars}} /** {{#description}} - * {{description}} + * {{.}} {{/description}} {{^description}} * Get {{name}} {{/description}} {{#minimum}} - * minimum: {{minimum}} + * minimum: {{.}} {{/minimum}} {{#maximum}} - * maximum: {{maximum}} + * maximum: {{.}} {{/maximum}} * @return {{name}} **/ 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 493fd683cf94b1b372f64857b49eafc87c82890c..653db6baad675a8d1d15ce74bfc684997514bf4a 100644 --- a/modules/openapi-generator/src/main/resources/JavaJaxRS/cxf/pom.mustache +++ b/modules/openapi-generator/src/main/resources/JavaJaxRS/cxf/pom.mustache @@ -5,7 +5,7 @@ <packaging>jar</packaging> <name>{{artifactId}}</name> {{#appDescription}} - <description>{{appDescription}}</description> + <description>{{.}}</description> {{/appDescription}} <version>{{artifactVersion}}</version> <build> @@ -131,7 +131,7 @@ <version>${cxf-version}</version> <scope>test</scope> </dependency> - + <!-- CXF server --> <dependency> <groupId>org.apache.cxf</groupId> @@ -177,7 +177,7 @@ <version>${jackson-jaxrs-version}</version> </dependency> {{/java8}} -{{#useBeanValidationFeature}} +{{#useBeanValidationFeature}} <dependency> <groupId>org.hibernate</groupId> <artifactId>hibernate-validator</artifactId> diff --git a/modules/openapi-generator/src/main/resources/JavaJaxRS/cxf/queryParams.mustache b/modules/openapi-generator/src/main/resources/JavaJaxRS/cxf/queryParams.mustache index 292a818f8f178e1d6019eb78b05f3bbfa639ad46..6a1045abc50887dc8ba56416860d6b9e3a7aa360 100644 --- a/modules/openapi-generator/src/main/resources/JavaJaxRS/cxf/queryParams.mustache +++ b/modules/openapi-generator/src/main/resources/JavaJaxRS/cxf/queryParams.mustache @@ -1 +1 @@ -{{#isQueryParam}}@QueryParam("{{baseName}}"){{#useBeanValidation}}{{>beanValidationQueryParams}}{{/useBeanValidation}} {{^isContainer}}{{#defaultValue}}@DefaultValue("{{{defaultValue}}}"){{/defaultValue}}{{/isContainer}}{{{dataType}}} {{paramName}}{{/isQueryParam}} \ No newline at end of file +{{#isQueryParam}}@QueryParam("{{baseName}}"){{#useBeanValidation}}{{>beanValidationQueryParams}}{{/useBeanValidation}} {{^isContainer}}{{#defaultValue}}@DefaultValue("{{{.}}}"){{/defaultValue}}{{/isContainer}}{{{dataType}}} {{paramName}}{{/isQueryParam}} \ No newline at end of file diff --git a/modules/openapi-generator/src/main/resources/JavaJaxRS/cxf/returnTypes.mustache b/modules/openapi-generator/src/main/resources/JavaJaxRS/cxf/returnTypes.mustache index 6af86ffe4e4a3fedc80723d298519f01aef75c87..32f96a904720b5d388713d23dbc0d9ee7eff8dce 100644 --- a/modules/openapi-generator/src/main/resources/JavaJaxRS/cxf/returnTypes.mustache +++ b/modules/openapi-generator/src/main/resources/JavaJaxRS/cxf/returnTypes.mustache @@ -1,4 +1,4 @@ -{{#useGenericResponse}}Response{{/useGenericResponse}}{{! non-generic response: +{{#useGenericResponse}}Response{{/useGenericResponse}}{{! non-generic response: }}{{^useGenericResponse}}{{! }}{{{returnType}}}{{! }}{{/useGenericResponse}} \ No newline at end of file diff --git a/modules/openapi-generator/src/main/resources/JavaJaxRS/cxf/server/ApplicationContext.xml.mustache b/modules/openapi-generator/src/main/resources/JavaJaxRS/cxf/server/ApplicationContext.xml.mustache index b4cdc5b6cfdf2d7655e6d2b2cb9acb76e68db6cc..fea1aecd1747a4fea343dddd3a0fd37c8dd9b4e2 100644 --- a/modules/openapi-generator/src/main/resources/JavaJaxRS/cxf/server/ApplicationContext.xml.mustache +++ b/modules/openapi-generator/src/main/resources/JavaJaxRS/cxf/server/ApplicationContext.xml.mustache @@ -1,6 +1,6 @@ <?xml version="1.0" encoding="UTF-8"?> <beans xmlns="http://www.springframework.org/schema/beans" - xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:cxf="http://cxf.apache.org/core" xmlns:jaxrs="http://cxf.apache.org/jaxrs" xmlns:jee="http://www.springframework.org/schema/jee" @@ -15,17 +15,17 @@ <!-- JAXRS providers --> <bean id="jsonProvider" class="com.fasterxml.jackson.jaxrs.json.JacksonJsonProvider" /> - -{{#useMultipartFeature}} + +{{#useMultipartFeature}} <bean id="multipartProvider" class="org.apache.cxf.jaxrs.provider.MultipartProvider" /> -{{/useMultipartFeature}} - +{{/useMultipartFeature}} + <!-- Controller --> -{{#useSpringAnnotationConfig}} +{{#useSpringAnnotationConfig}} <context:annotation-config/> <context:component-scan base-package="{{apiPackage}}.impl" /> {{/useSpringAnnotationConfig}} -{{^useSpringAnnotationConfig}} +{{^useSpringAnnotationConfig}} {{#apiInfo}} {{#apis}} <bean id="{{classname}}" class="{{package}}.impl.{{classname}}ServiceImpl" /> @@ -33,71 +33,71 @@ {{/apiInfo}} {{/useSpringAnnotationConfig}} -{{#useSwaggerFeature}} +{{#useSwaggerFeature}} <!-- CXF Swagger2Feature --> - {{! http://cxf.apache.org/docs/swagger2feature.html }} + {{! http://cxf.apache.org/docs/swagger2feature.html }} <bean id="swagger2Feature" class="org.apache.cxf.jaxrs.swagger.Swagger2Feature"> <!--property name="basePath" value="/services"/--> -{{#useSwaggerUI}} +{{#useSwaggerUI}} <property name="supportSwaggerUi" value="true" /> -{{/useSwaggerUI}} +{{/useSwaggerUI}} <!--property name="contact" value="${swagger.contact}" /> <property name="title" value="${swagger.title}" /> <property name="version" value="${swagger.version}" /> <property name="description" value="${swagger.description}" /> <property name="license" value="${swagger.license}" /> <property name="licenseUrl" value="${swagger.licenseUrl}" /--> - </bean> + </bean> {{/useSwaggerFeature}} <cxf:bus> <cxf:inInterceptors> -{{#useGzipFeature}} +{{#useGzipFeature}} <ref bean="GZIPInInterceptor"/> {{/useGzipFeature}} -{{#useBeanValidationFeature}} +{{#useBeanValidationFeature}} <!-- BeanValidation 1.1 for CXF --> <ref bean="validationInInterceptor" /> -{{/useBeanValidationFeature}} +{{/useBeanValidationFeature}} </cxf:inInterceptors> <cxf:outInterceptors> -{{#useGzipFeature}} +{{#useGzipFeature}} <ref bean="GZIPOutInterceptor"/> -{{/useGzipFeature}} +{{/useGzipFeature}} {{#useBeanValidationFeature}} <!-- BeanValidation 1.1 for CXF --> <ref bean="validationOutInterceptor" /> -{{/useBeanValidationFeature}} +{{/useBeanValidationFeature}} </cxf:outInterceptors> <cxf:features> -{{#useLoggingFeature}} +{{#useLoggingFeature}} <cxf:logging /> -{{/useLoggingFeature}} -{{#useGzipFeature}} +{{/useLoggingFeature}} +{{#useGzipFeature}} <ref bean="compressGZIPFeature"/> -{{/useGzipFeature}} +{{/useGzipFeature}} </cxf:features> <cxf:properties> <entry key="javax.ws.rs.ext.ExceptionMapper" value-ref="exceptionMapper"/> </cxf:properties> </cxf:bus> - -{{#useWadlFeature}} + +{{#useWadlFeature}} <bean id="wadlGenerator" class="org.apache.cxf.jaxrs.model.wadl.WadlGenerator"> <property name="linkJsonToXmlSchema" value="true" /> </bean> {{/useWadlFeature}} -{{#useGzipFeature}} +{{#useGzipFeature}} <bean id="GZIPInInterceptor" class="org.apache.cxf.transport.common.gzip.GZIPInInterceptor"/> <bean id="GZIPOutInterceptor" class="org.apache.cxf.transport.common.gzip.GZIPOutInterceptor" > <!--property name="force" value="true" /--> <!--property name="threshold" value="0" /--> </bean> - + <bean id="compressGZIPFeature" class="org.apache.cxf.transport.common.gzip.GZIPFeature"/> -{{/useGzipFeature}} +{{/useGzipFeature}} {{#useBeanValidationFeature}} <bean id="commonValidationFeature" class="org.apache.cxf.validation.BeanValidationFeature"/> @@ -107,17 +107,17 @@ <bean id="validationInInterceptor" class="org.apache.cxf.jaxrs.validation.JAXRSBeanValidationInInterceptor"> <property name="provider" ref="validationProvider" /> </bean> - + <bean id="validationOutInterceptor" class="org.apache.cxf.jaxrs.validation.JAXRSBeanValidationOutInterceptor"> <property name="provider" ref="validationProvider" /> - </bean> + </bean> {{/useBeanValidationFeature}} {{^useBeanValidationFeature}} <bean id="exceptionMapper" class="org.apache.cxf.jaxrs.impl.WebApplicationExceptionMapper"> <property name="addMessageToResponse" value="true" /> </bean> {{/useBeanValidationFeature}} - + <!-- REST server --> <jaxrs:server id="restServer" address="/services"> <jaxrs:serviceBeans> @@ -129,21 +129,21 @@ </jaxrs:serviceBeans> <jaxrs:providers> <ref bean="jsonProvider" /> -{{#useMultipartFeature}} +{{#useMultipartFeature}} <ref bean="multipartProvider" /> -{{/useMultipartFeature}} -{{#useWadlFeature}} +{{/useMultipartFeature}} +{{#useWadlFeature}} <ref bean="wadlGenerator" /> -{{/useWadlFeature}} +{{/useWadlFeature}} </jaxrs:providers> <jaxrs:features> -{{#useSwaggerFeature}} +{{#useSwaggerFeature}} <ref bean="swagger2Feature" /> -{{/useSwaggerFeature}} -{{#useBeanValidationFeature}} +{{/useSwaggerFeature}} +{{#useBeanValidationFeature}} <ref bean="commonValidationFeature" /> -{{/useBeanValidationFeature}} +{{/useBeanValidationFeature}} </jaxrs:features> </jaxrs:server> - + </beans> diff --git a/modules/openapi-generator/src/main/resources/JavaJaxRS/cxf/server/SpringBootApplication.mustache b/modules/openapi-generator/src/main/resources/JavaJaxRS/cxf/server/SpringBootApplication.mustache index f6d08e7129642b5e771617c7d375a54ea0ca8f9f..b71ad21f3ee41fd30c769ae3c90127647493cfe3 100644 --- a/modules/openapi-generator/src/main/resources/JavaJaxRS/cxf/server/SpringBootApplication.mustache +++ b/modules/openapi-generator/src/main/resources/JavaJaxRS/cxf/server/SpringBootApplication.mustache @@ -9,15 +9,15 @@ import org.springframework.context.annotation.ImportResource; @ImportResource({"classpath:/ApplicationContext.xml"}) @EnableAutoConfiguration public class SpringBootApplication extends SpringBootServletInitializer { - + @Override protected SpringApplicationBuilder configure(SpringApplicationBuilder application) { return application.sources(SpringBootApplication.class); } - + public static void main(String[] args) { SpringApplication.run(SpringBootApplication.class, args); } - - + + } \ No newline at end of file diff --git a/modules/openapi-generator/src/main/resources/JavaJaxRS/cxf/server/context.xml.mustache b/modules/openapi-generator/src/main/resources/JavaJaxRS/cxf/server/context.xml.mustache index a14b9a13d015a8da16f9f57d745976c93e288891..0dc82b9a2e95568c5a70bc00e0c3635476744274 100644 --- a/modules/openapi-generator/src/main/resources/JavaJaxRS/cxf/server/context.xml.mustache +++ b/modules/openapi-generator/src/main/resources/JavaJaxRS/cxf/server/context.xml.mustache @@ -1,6 +1,6 @@ <?xml version="1.0" encoding="UTF-8"?> <beans xmlns="http://www.springframework.org/schema/beans" - xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:cxf="http://cxf.apache.org/core" xmlns:jaxrs="http://cxf.apache.org/jaxrs" xmlns:jee="http://www.springframework.org/schema/jee" @@ -11,8 +11,8 @@ http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context.xsd http://www.springframework.org/schema/jee http://www.springframework.org/schema/jee/spring-jee.xsd"> - - + + <import resource="classpath:/ApplicationContext.xml" /> - + </beans> 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 28a678bb6128cb3623552e1c84cbb161ed0e5133..edd5bef28938359c955c25326e3b62e7b2e9a3d6 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 @@ -5,7 +5,7 @@ <packaging>war</packaging> <name>{{artifactId}}</name> {{#appDescription}} - <description>{{appDescription}}</description> + <description>{{.}}</description> {{/appDescription}} <version>{{artifactVersion}}</version> <build> @@ -88,7 +88,7 @@ </execution> </executions> </plugin> - + <!-- build WAR file --> <plugin> <artifactId>maven-war-plugin</artifactId> @@ -140,7 +140,7 @@ <version>${cxf-version}</version> <scope>test</scope> </dependency> - + <!-- CXF server --> <dependency> <groupId>org.apache.cxf</groupId> @@ -192,7 +192,7 @@ <version>${jackson-jaxrs-version}</version> </dependency> {{/java8}} -{{#generateSpringApplication}} +{{#generateSpringApplication}} <!-- Spring --> <dependency> <groupId>org.springframework</groupId> @@ -203,7 +203,7 @@ <groupId>org.springframework</groupId> <artifactId>spring-web</artifactId> <version>${spring-version}</version> - </dependency> + </dependency> {{/generateSpringApplication}} {{#generateSpringBootApplication}} <!-- Spring Boot dependencies für Integrationstests --> @@ -220,7 +220,7 @@ <version>${spring.boot-version}</version> <scope>test</scope> </dependency> - + <dependency> <groupId>org.apache.cxf</groupId> <artifactId>cxf-spring-boot-starter-jaxrs</artifactId> @@ -263,12 +263,12 @@ {{#useBeanValidation}} <beanvalidation-version>1.1.0.Final</beanvalidation-version> {{/useBeanValidation}} -{{#generateSpringApplication}} +{{#generateSpringApplication}} <spring-version>4.3.13.RELEASE</spring-version> -{{/generateSpringApplication}} +{{/generateSpringApplication}} {{#generateSpringBootApplication}} <spring.boot-version>1.5.9.RELEASE</spring.boot-version> -{{/generateSpringBootApplication}} +{{/generateSpringBootApplication}} <cxf-version>3.3.0</cxf-version> <jackson-jaxrs-version>2.9.9</jackson-jaxrs-version> <javax-annotation-version>1.3.2</javax-annotation-version> diff --git a/modules/openapi-generator/src/main/resources/JavaJaxRS/cxf/server/web.mustache b/modules/openapi-generator/src/main/resources/JavaJaxRS/cxf/server/web.mustache index 9d905ae076bb141ab20dc697bd0fc6d850b3fb33..890f10ef14d89ffade63aef58634a33a10fdd93f 100644 --- a/modules/openapi-generator/src/main/resources/JavaJaxRS/cxf/server/web.mustache +++ b/modules/openapi-generator/src/main/resources/JavaJaxRS/cxf/server/web.mustache @@ -19,5 +19,5 @@ <servlet-name>CXFServiceServlet</servlet-name> <url-pattern>/rest/*</url-pattern> </servlet-mapping> - + </web-app> diff --git a/modules/openapi-generator/src/main/resources/JavaJaxRS/enumClass.mustache b/modules/openapi-generator/src/main/resources/JavaJaxRS/enumClass.mustache index 579070d66e6b6d6b601c7da1489d7bc3d9f328de..d5394d737de360db455017d49c153d345b14dba1 100644 --- a/modules/openapi-generator/src/main/resources/JavaJaxRS/enumClass.mustache +++ b/modules/openapi-generator/src/main/resources/JavaJaxRS/enumClass.mustache @@ -1,13 +1,13 @@ /** - * {{^description}}Gets or Sets {{{name}}}{{/description}}{{#description}}{{description}}{{/description}} + * {{description}}{{^description}}Gets or Sets {{{name}}}{{/description}} */ - {{>additionalEnumTypeAnnotations}}public enum {{#datatypeWithEnum}}{{{.}}}{{/datatypeWithEnum}}{{^datatypeWithEnum}}{{classname}}{{/datatypeWithEnum}} { + {{>additionalEnumTypeAnnotations}}public enum {{{datatypeWithEnum}}}{{^datatypeWithEnum}}{{classname}}{{/datatypeWithEnum}} { {{#gson}} {{#allowableValues}} {{#enumVars}} {{#enumDescription}} /** - * {{enumDescription}} + * {{.}} */ {{/enumDescription}} @SerializedName({{#isInteger}}"{{/isInteger}}{{#isDouble}}"{{/isDouble}}{{#isLong}}"{{/isLong}}{{#isFloat}}"{{/isFloat}}{{{value}}}{{#isInteger}}"{{/isInteger}}{{#isDouble}}"{{/isDouble}}{{#isLong}}"{{/isLong}}{{#isFloat}}"{{/isFloat}}) @@ -21,7 +21,7 @@ {{#enumVars}} {{#enumDescription}} /** - * {{enumDescription}} + * {{.}} */ {{/enumDescription}} {{{name}}}({{{value}}}){{^-last}}, @@ -32,7 +32,7 @@ private {{{dataType}}} value; - {{#datatypeWithEnum}}{{{.}}}{{/datatypeWithEnum}}{{^datatypeWithEnum}}{{classname}}{{/datatypeWithEnum}}({{{dataType}}} value) { + {{{datatypeWithEnum}}}{{^datatypeWithEnum}}{{classname}}{{/datatypeWithEnum}}({{{dataType}}} value) { this.value = value; } @@ -43,8 +43,8 @@ } @JsonCreator - public static {{#datatypeWithEnum}}{{{.}}}{{/datatypeWithEnum}}{{^datatypeWithEnum}}{{{classname}}}{{/datatypeWithEnum}} fromValue({{{dataType}}} value) { - for ({{#datatypeWithEnum}}{{{.}}}{{/datatypeWithEnum}}{{^datatypeWithEnum}}{{{classname}}}{{/datatypeWithEnum}} b : {{#datatypeWithEnum}}{{{.}}}{{/datatypeWithEnum}}{{^datatypeWithEnum}}{{{classname}}}{{/datatypeWithEnum}}.values()) { + public static {{{datatypeWithEnum}}}{{^datatypeWithEnum}}{{{classname}}}{{/datatypeWithEnum}} fromValue({{{dataType}}} value) { + for ({{{datatypeWithEnum}}}{{^datatypeWithEnum}}{{{classname}}}{{/datatypeWithEnum}} b : {{{datatypeWithEnum}}}{{^datatypeWithEnum}}{{{classname}}}{{/datatypeWithEnum}}.values()) { if (b.value.equals(value)) { return b; } diff --git a/modules/openapi-generator/src/main/resources/JavaJaxRS/enumOuterClass.mustache b/modules/openapi-generator/src/main/resources/JavaJaxRS/enumOuterClass.mustache index 84e034d1cf3baaa279612b30d6698a50457ba54a..f41a3eb84556bafcfd3c62aed6d5a3dad486071c 100644 --- a/modules/openapi-generator/src/main/resources/JavaJaxRS/enumOuterClass.mustache +++ b/modules/openapi-generator/src/main/resources/JavaJaxRS/enumOuterClass.mustache @@ -3,14 +3,14 @@ import com.fasterxml.jackson.annotation.JsonCreator; {{/jackson}} /** - * {{^description}}Gets or Sets {{{name}}}{{/description}}{{#description}}{{description}}{{/description}} + * {{description}}{{^description}}Gets or Sets {{{name}}}{{/description}} */ -{{>additionalEnumTypeAnnotations}}public enum {{#datatypeWithEnum}}{{{.}}}{{/datatypeWithEnum}}{{^datatypeWithEnum}}{{{classname}}}{{/datatypeWithEnum}} { +{{>additionalEnumTypeAnnotations}}public enum {{{datatypeWithEnum}}}{{^datatypeWithEnum}}{{{classname}}}{{/datatypeWithEnum}} { {{#gson}} {{#allowableValues}}{{#enumVars}} {{#enumDescription}} /** - * {{enumDescription}} + * {{.}} */ {{/enumDescription}} @SerializedName({{#isInteger}}"{{/isInteger}}{{#isDouble}}"{{/isDouble}}{{#isLong}}"{{/isLong}}{{#isFloat}}"{{/isFloat}}{{{value}}}{{#isInteger}}"{{/isInteger}}{{#isDouble}}"{{/isDouble}}{{#isLong}}"{{/isLong}}{{#isFloat}}"{{/isFloat}}) @@ -21,7 +21,7 @@ import com.fasterxml.jackson.annotation.JsonCreator; {{#allowableValues}}{{#enumVars}} {{#enumDescription}} /** - * {{enumDescription}} + * {{.}} */ {{/enumDescription}} {{{name}}}({{{value}}}){{^-last}}, @@ -30,7 +30,7 @@ import com.fasterxml.jackson.annotation.JsonCreator; private {{{dataType}}} value; - {{#datatypeWithEnum}}{{{.}}}{{/datatypeWithEnum}}{{^datatypeWithEnum}}{{{classname}}}{{/datatypeWithEnum}}({{{dataType}}} value) { + {{{datatypeWithEnum}}}{{^datatypeWithEnum}}{{{classname}}}{{/datatypeWithEnum}}({{{dataType}}} value) { this.value = value; } @@ -41,8 +41,8 @@ import com.fasterxml.jackson.annotation.JsonCreator; } @JsonCreator - public static {{#datatypeWithEnum}}{{{.}}}{{/datatypeWithEnum}}{{^datatypeWithEnum}}{{{classname}}}{{/datatypeWithEnum}} fromValue({{{dataType}}} value) { - for ({{#datatypeWithEnum}}{{{.}}}{{/datatypeWithEnum}}{{^datatypeWithEnum}}{{{classname}}}{{/datatypeWithEnum}} b : {{#datatypeWithEnum}}{{{.}}}{{/datatypeWithEnum}}{{^datatypeWithEnum}}{{{classname}}}{{/datatypeWithEnum}}.values()) { + public static {{{datatypeWithEnum}}}{{^datatypeWithEnum}}{{{classname}}}{{/datatypeWithEnum}} fromValue({{{dataType}}} value) { + for ({{{datatypeWithEnum}}}{{^datatypeWithEnum}}{{{classname}}}{{/datatypeWithEnum}} b : {{{datatypeWithEnum}}}{{^datatypeWithEnum}}{{{classname}}}{{/datatypeWithEnum}}.values()) { if (b.value.equals(value)) { return b; } diff --git a/modules/openapi-generator/src/main/resources/JavaJaxRS/formParams.mustache b/modules/openapi-generator/src/main/resources/JavaJaxRS/formParams.mustache index bb84392b9c31266033bddcac527f8c30fe4a1833..ec1f31d77ace0f5786d40eff3f3f6e528b1f4d32 100644 --- a/modules/openapi-generator/src/main/resources/JavaJaxRS/formParams.mustache +++ b/modules/openapi-generator/src/main/resources/JavaJaxRS/formParams.mustache @@ -1,2 +1,2 @@ -{{#isFormParam}}{{^isFile}}@ApiParam(value = "{{{description}}}"{{#required}}, required=true{{/required}}{{#allowableValues}}, {{> allowableValues }}{{/allowableValues}}{{#defaultValue}}, defaultValue="{{{defaultValue}}}"{{/defaultValue}}){{#vendorExtensions.x-multipart}}@FormDataParam("{{baseName}}") {{{dataType}}} {{paramName}}{{/vendorExtensions.x-multipart}}{{^vendorExtensions.x-multipart}} {{#defaultValue}} @DefaultValue("{{{defaultValue}}}"){{/defaultValue}} @FormParam("{{baseName}}") {{{dataType}}} {{paramName}}{{/vendorExtensions.x-multipart}}{{/isFile}}{{#isFile}} +{{#isFormParam}}{{^isFile}}@ApiParam(value = "{{{description}}}"{{#required}}, required=true{{/required}}{{#allowableValues}}, {{> allowableValues }}{{/allowableValues}}{{#defaultValue}}, defaultValue="{{{.}}}"{{/defaultValue}}){{#vendorExtensions.x-multipart}}@FormDataParam("{{baseName}}") {{{dataType}}} {{paramName}}{{/vendorExtensions.x-multipart}}{{^vendorExtensions.x-multipart}} {{#defaultValue}} @DefaultValue("{{{.}}}"){{/defaultValue}} @FormParam("{{baseName}}") {{{dataType}}} {{paramName}}{{/vendorExtensions.x-multipart}}{{/isFile}}{{#isFile}} {{^isArray}} @FormDataParam("{{baseName}}") FormDataBodyPart {{paramName}}Bodypart {{/isArray}}{{#isArray}} @FormDataParam("{{baseName}}") List<FormDataBodyPart> {{paramName}}Bodypart {{/isArray}}{{/isFile}}{{/isFormParam}} \ No newline at end of file diff --git a/modules/openapi-generator/src/main/resources/JavaJaxRS/headerParams.mustache b/modules/openapi-generator/src/main/resources/JavaJaxRS/headerParams.mustache index 1360d796826b6dbfffdfba7bd3618885d5f112e9..59bc493825173d3934daf641937fe84c1058f12d 100644 --- a/modules/openapi-generator/src/main/resources/JavaJaxRS/headerParams.mustache +++ b/modules/openapi-generator/src/main/resources/JavaJaxRS/headerParams.mustache @@ -1 +1 @@ -{{#isHeaderParam}}@ApiParam(value = "{{{description}}}" {{#required}},required=true{{/required}}{{#allowableValues}}, {{> allowableValues }}{{/allowableValues}}{{#defaultValue}}, defaultValue="{{{defaultValue}}}"{{/defaultValue}})@HeaderParam("{{baseName}}") {{{dataType}}} {{paramName}}{{/isHeaderParam}} \ No newline at end of file +{{#isHeaderParam}}@ApiParam(value = "{{{description}}}" {{#required}},required=true{{/required}}{{#allowableValues}}, {{> allowableValues }}{{/allowableValues}}{{#defaultValue}}, defaultValue="{{{.}}}"{{/defaultValue}})@HeaderParam("{{baseName}}") {{{dataType}}} {{paramName}}{{/isHeaderParam}} \ No newline at end of file diff --git a/modules/openapi-generator/src/main/resources/JavaJaxRS/libraries/jersey1/api.mustache b/modules/openapi-generator/src/main/resources/JavaJaxRS/libraries/jersey1/api.mustache index a8b1cafb8f9dba0839e0338cfae61d3cbd9ebc17..d7299149e05a93b651b53ebd4fe7754ab506bf74 100644 --- a/modules/openapi-generator/src/main/resources/JavaJaxRS/libraries/jersey1/api.mustache +++ b/modules/openapi-generator/src/main/resources/JavaJaxRS/libraries/jersey1/api.mustache @@ -42,7 +42,7 @@ public class {{classname}} { {{#subresourceOperation}}@Path("{{{path}}}"){{/subresourceOperation}} {{#hasConsumes}}@Consumes({ {{#consumes}}"{{{mediaType}}}"{{^-last}}, {{/-last}}{{/consumes}} }){{/hasConsumes}} {{#hasProduces}}@Produces({ {{#produces}}"{{{mediaType}}}"{{^-last}}, {{/-last}}{{/produces}} }){{/hasProduces}} - @io.swagger.annotations.ApiOperation(value = "{{{summary}}}", notes = "{{{notes}}}", response = {{{returnBaseType}}}.class{{#returnContainer}}, responseContainer = "{{{returnContainer}}}"{{/returnContainer}}{{#hasAuthMethods}}, authorizations = { + @io.swagger.annotations.ApiOperation(value = "{{{summary}}}", notes = "{{{notes}}}", response = {{{returnBaseType}}}.class{{#returnContainer}}, responseContainer = "{{{.}}}"{{/returnContainer}}{{#hasAuthMethods}}, authorizations = { {{#authMethods}}@io.swagger.annotations.Authorization(value = "{{name}}"{{#isOAuth}}, scopes = { {{#scopes}}@io.swagger.annotations.AuthorizationScope(scope = "{{scope}}", description = "{{description}}"){{^-last}}, {{/-last}}{{/scopes}} @@ -50,7 +50,7 @@ public class {{classname}} { {{/-last}}{{/authMethods}} }{{/hasAuthMethods}}, tags={ {{#vendorExtensions.x-tags}}"{{tag}}"{{^-last}}, {{/-last}}{{/vendorExtensions.x-tags}} }) @io.swagger.annotations.ApiResponses(value = { {{#responses}} - @io.swagger.annotations.ApiResponse(code = {{{code}}}, message = "{{{message}}}", response = {{{baseType}}}.class{{#containerType}}, responseContainer = "{{{containerType}}}"{{/containerType}}){{^-last}},{{/-last}}{{/responses}} }) + @io.swagger.annotations.ApiResponse(code = {{{code}}}, message = "{{{message}}}", response = {{{baseType}}}.class{{#containerType}}, responseContainer = "{{{.}}}"{{/containerType}}){{^-last}},{{/-last}}{{/responses}} }) public Response {{nickname}}( {{#allParams}}{{>queryParams}}{{>pathParams}}{{>headerParams}}{{>bodyParams}}{{>formParams}}, {{/allParams}}@Context SecurityContext securityContext) diff --git a/modules/openapi-generator/src/main/resources/JavaJaxRS/libraries/jersey1/formParams.mustache b/modules/openapi-generator/src/main/resources/JavaJaxRS/libraries/jersey1/formParams.mustache index d02af8c3d3d3569b15bcff2efd0bf6fa4486f040..1ac5c8f37a97eed3dc4e3c3692ac07e341f4b8dc 100644 --- a/modules/openapi-generator/src/main/resources/JavaJaxRS/libraries/jersey1/formParams.mustache +++ b/modules/openapi-generator/src/main/resources/JavaJaxRS/libraries/jersey1/formParams.mustache @@ -1 +1 @@ -{{#isFormParam}}{{^isFile}}{{^vendorExtensions.x-multipart}}@ApiParam(value = "{{{description}}}"{{#required}}, required=true{{/required}}{{#allowableValues}}, {{> allowableValues }}{{/allowableValues}}{{#defaultValue}}, defaultValue="{{{defaultValue}}}"{{/defaultValue}}){{/vendorExtensions.x-multipart}}{{#vendorExtensions.x-multipart}}@FormDataParam("{{baseName}}") {{{dataType}}} {{paramName}}{{/vendorExtensions.x-multipart}}{{^vendorExtensions.x-multipart}} {{#defaultValue}} @DefaultValue("{{{defaultValue}}}"){{/defaultValue}} @FormParam("{{baseName}}") {{{dataType}}} {{paramName}}{{/vendorExtensions.x-multipart}}{{/isFile}}{{#isFile}}{{^isArray}}@FormDataParam("{{baseName}}") FormDataBodyPart {{paramName}}Bodypart{{/isArray}}{{#isArray}}@FormDataParam("{{baseName}}") List<FormDataBodyPart> {{paramName}}Bodypart{{/isArray}}{{/isFile}}{{/isFormParam}} \ No newline at end of file +{{#isFormParam}}{{^isFile}}{{^vendorExtensions.x-multipart}}@ApiParam(value = "{{{description}}}"{{#required}}, required=true{{/required}}{{#allowableValues}}, {{> allowableValues }}{{/allowableValues}}{{#defaultValue}}, defaultValue="{{{.}}}"{{/defaultValue}}){{/vendorExtensions.x-multipart}}{{#vendorExtensions.x-multipart}}@FormDataParam("{{baseName}}") {{{dataType}}} {{paramName}}{{/vendorExtensions.x-multipart}}{{^vendorExtensions.x-multipart}} {{#defaultValue}} @DefaultValue("{{{.}}}"){{/defaultValue}} @FormParam("{{baseName}}") {{{dataType}}} {{paramName}}{{/vendorExtensions.x-multipart}}{{/isFile}}{{#isFile}}{{^isArray}}@FormDataParam("{{baseName}}") FormDataBodyPart {{paramName}}Bodypart{{/isArray}}{{#isArray}}@FormDataParam("{{baseName}}") List<FormDataBodyPart> {{paramName}}Bodypart{{/isArray}}{{/isFile}}{{/isFormParam}} \ No newline at end of file diff --git a/modules/openapi-generator/src/main/resources/JavaJaxRS/licenseInfo.mustache b/modules/openapi-generator/src/main/resources/JavaJaxRS/licenseInfo.mustache index abc2f4578eb3a74da1c599037f36320cce106881..c66209f27947736c332b626a6f2fbf0789f4b98d 100644 --- a/modules/openapi-generator/src/main/resources/JavaJaxRS/licenseInfo.mustache +++ b/modules/openapi-generator/src/main/resources/JavaJaxRS/licenseInfo.mustache @@ -2,8 +2,8 @@ * {{{appName}}} * {{{appDescription}}} * - * {{#version}}The version of the OpenAPI document: {{{version}}}{{/version}} - * {{#infoEmail}}Contact: {{{infoEmail}}}{{/infoEmail}} + * {{#version}}The version of the OpenAPI document: {{{.}}}{{/version}} + * {{#infoEmail}}Contact: {{{.}}}{{/infoEmail}} * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech diff --git a/modules/openapi-generator/src/main/resources/JavaJaxRS/modelEnum.mustache b/modules/openapi-generator/src/main/resources/JavaJaxRS/modelEnum.mustache index bff968c46894abb36c838879ce83abe88136c28a..ba82ea473b4385b737db45a8a072d509175eb37a 100644 --- a/modules/openapi-generator/src/main/resources/JavaJaxRS/modelEnum.mustache +++ b/modules/openapi-generator/src/main/resources/JavaJaxRS/modelEnum.mustache @@ -4,9 +4,9 @@ import com.fasterxml.jackson.annotation.JsonValue; {{/jackson}} /** - * {{^description}}Gets or Sets {{{name}}}{{/description}}{{#description}}{{description}}{{/description}} + * {{description}}{{^description}}Gets or Sets {{{name}}}{{/description}} */ -{{>additionalEnumTypeAnnotations}}public enum {{#datatypeWithEnum}}{{{.}}}{{/datatypeWithEnum}}{{^datatypeWithEnum}}{{{classname}}}{{/datatypeWithEnum}} { +{{>additionalEnumTypeAnnotations}}public enum {{{datatypeWithEnum}}}{{^datatypeWithEnum}}{{{classname}}}{{/datatypeWithEnum}} { {{#gson}} {{#allowableValues}}{{#enumVars}} @SerializedName({{#isInteger}}"{{/isInteger}}{{#isDouble}}"{{/isDouble}}{{#isLong}}"{{/isLong}}{{#isFloat}}"{{/isFloat}}{{{value}}}{{#isInteger}}"{{/isInteger}}{{#isDouble}}"{{/isDouble}}{{#isLong}}"{{/isLong}}{{#isFloat}}"{{/isFloat}}) @@ -21,7 +21,7 @@ import com.fasterxml.jackson.annotation.JsonValue; private {{{dataType}}} value; - {{#datatypeWithEnum}}{{{.}}}{{/datatypeWithEnum}}{{^datatypeWithEnum}}{{{classname}}}{{/datatypeWithEnum}}({{{dataType}}} value) { + {{{datatypeWithEnum}}}{{^datatypeWithEnum}}{{{classname}}}{{/datatypeWithEnum}}({{{dataType}}} value) { this.value = value; } @@ -39,8 +39,8 @@ import com.fasterxml.jackson.annotation.JsonValue; {{#jackson}} @JsonCreator - public static {{#datatypeWithEnum}}{{{.}}}{{/datatypeWithEnum}}{{^datatypeWithEnum}}{{{classname}}}{{/datatypeWithEnum}} fromValue({{{dataType}}} value) { - for ({{#datatypeWithEnum}}{{{.}}}{{/datatypeWithEnum}}{{^datatypeWithEnum}}{{{classname}}}{{/datatypeWithEnum}} b : {{#datatypeWithEnum}}{{{.}}}{{/datatypeWithEnum}}{{^datatypeWithEnum}}{{{classname}}}{{/datatypeWithEnum}}.values()) { + public static {{{datatypeWithEnum}}}{{^datatypeWithEnum}}{{{classname}}}{{/datatypeWithEnum}} fromValue({{{dataType}}} value) { + for ({{{datatypeWithEnum}}}{{^datatypeWithEnum}}{{{classname}}}{{/datatypeWithEnum}} b : {{{datatypeWithEnum}}}{{^datatypeWithEnum}}{{{classname}}}{{/datatypeWithEnum}}.values()) { if (b.value.equals(value)) { return b; } diff --git a/modules/openapi-generator/src/main/resources/JavaJaxRS/pathParams.mustache b/modules/openapi-generator/src/main/resources/JavaJaxRS/pathParams.mustache index 15a08e20b05934177593b334beb67209738dcc2d..8287f8d6a530665cb77f574c9b422fc9bdf96b4c 100644 --- a/modules/openapi-generator/src/main/resources/JavaJaxRS/pathParams.mustache +++ b/modules/openapi-generator/src/main/resources/JavaJaxRS/pathParams.mustache @@ -3,7 +3,7 @@ }}@ApiParam(value = "{{{description}}}"{{! }}{{#required}}, required = true{{/required}}{{! }}{{#allowableValues}}, {{> allowableValues}}{{/allowableValues}}{{! - }}{{#defaultValue}}, defaultValue = "{{{defaultValue}}}"{{/defaultValue}}{{! + }}{{#defaultValue}}, defaultValue = "{{{.}}}"{{/defaultValue}}{{! }}){{! }} @PathParam("{{baseName}}"){{! diff --git a/modules/openapi-generator/src/main/resources/JavaJaxRS/pojo.mustache b/modules/openapi-generator/src/main/resources/JavaJaxRS/pojo.mustache index 637add30c23be0f6059533ef475e5a40432a3a22..e55b7e95724655844bebecfa913065f6ed7d9588 100644 --- a/modules/openapi-generator/src/main/resources/JavaJaxRS/pojo.mustache +++ b/modules/openapi-generator/src/main/resources/JavaJaxRS/pojo.mustache @@ -1,7 +1,7 @@ /** - * {{#description}}{{.}}{{/description}}{{^description}}{{classname}}{{/description}} + * {{description}}{{^description}}{{classname}}{{/description}} */{{#description}} -@ApiModel(description = "{{{description}}}"){{/description}} +@ApiModel(description = "{{{.}}}"){{/description}} {{#jackson}} @JsonPropertyOrder({ {{#vars}} @@ -10,7 +10,7 @@ }) {{/jackson}} {{>additionalModelTypeAnnotations}}{{>generatedAnnotation}}{{#discriminator}}{{>typeInfoAnnotation}}{{/discriminator}} -public class {{classname}} {{#parent}}extends {{{parent}}}{{/parent}} {{#serializableModel}}implements Serializable{{/serializableModel}} { +public class {{classname}} {{#parent}}extends {{{.}}}{{/parent}} {{#serializableModel}}implements Serializable{{/serializableModel}} { {{#vars}} {{#isEnum}} {{^isContainer}} @@ -70,16 +70,16 @@ public class {{classname}} {{#parent}}extends {{{parent}}}{{/parent}} {{#seriali /** {{#description}} - * {{description}} + * {{.}} {{/description}} {{^description}} * Get {{name}} {{/description}} {{#minimum}} - * minimum: {{minimum}} + * minimum: {{.}} {{/minimum}} {{#maximum}} - * maximum: {{maximum}} + * maximum: {{.}} {{/maximum}} * @return {{name}} **/ @@ -89,7 +89,7 @@ public class {{classname}} {{#parent}}extends {{{parent}}}{{/parent}} {{#seriali {{#jackson}} @JsonProperty(value = "{{baseName}}"{{#isReadOnly}}, access = JsonProperty.Access.READ_ONLY{{/isReadOnly}}{{#isWriteOnly}}, access = JsonProperty.Access.WRITE_ONLY{{/isWriteOnly}}) {{/jackson}} - @ApiModelProperty({{#example}}example = "{{{example}}}", {{/example}}{{#required}}required = {{required}}, {{/required}}value = "{{{description}}}") + @ApiModelProperty({{#example}}example = "{{{.}}}", {{/example}}{{#required}}required = {{required}}, {{/required}}value = "{{{description}}}") {{#useBeanValidation}}{{>beanValidation}}{{/useBeanValidation}} public {{{datatypeWithEnum}}} {{getter}}() { return {{name}}; diff --git a/modules/openapi-generator/src/main/resources/JavaJaxRS/pom.mustache b/modules/openapi-generator/src/main/resources/JavaJaxRS/pom.mustache index dc2a043addb8227dff3fe591b848b5983ecc9051..3c3b77b82c37d684060329b54d9dc4f4a1bdda3c 100644 --- a/modules/openapi-generator/src/main/resources/JavaJaxRS/pom.mustache +++ b/modules/openapi-generator/src/main/resources/JavaJaxRS/pom.mustache @@ -13,7 +13,7 @@ <distribution>repo</distribution> </license> </licenses> - + <build> <sourceDirectory>src/main/java</sourceDirectory> <plugins> @@ -181,7 +181,7 @@ <version>${commons_io_version}</version> </dependency> {{/supportJava6}} - + {{#useBeanValidation}} <!-- Bean Validation API support --> <dependency> diff --git a/modules/openapi-generator/src/main/resources/JavaJaxRS/queryParams.mustache b/modules/openapi-generator/src/main/resources/JavaJaxRS/queryParams.mustache index 2600cbe75186dc679f8e69b60511daf558845afb..18a82c524a606133849d00a9c8c255fe8998464c 100644 --- a/modules/openapi-generator/src/main/resources/JavaJaxRS/queryParams.mustache +++ b/modules/openapi-generator/src/main/resources/JavaJaxRS/queryParams.mustache @@ -4,7 +4,7 @@ }}{{#required}}, required = true{{/required}}{{! }}{{^isContainer}}{{! }}{{#allowableValues}}, {{> allowableValues}}{{/allowableValues}}{{! - }}{{#defaultValue}}, defaultValue = "{{{defaultValue}}}"{{/defaultValue}}{{! + }}{{#defaultValue}}, defaultValue = "{{{.}}}"{{/defaultValue}}{{! }}{{/isContainer}}{{! }}){{! diff --git a/modules/openapi-generator/src/main/resources/JavaJaxRS/resteasy/ApiResponseMessage.mustache b/modules/openapi-generator/src/main/resources/JavaJaxRS/resteasy/ApiResponseMessage.mustache index f47a5350943ba9e432a516fc4bba9f0948abee93..c883e16b5e6c81001bc501f5e11e8e21246a8c2e 100644 --- a/modules/openapi-generator/src/main/resources/JavaJaxRS/resteasy/ApiResponseMessage.mustache +++ b/modules/openapi-generator/src/main/resources/JavaJaxRS/resteasy/ApiResponseMessage.mustache @@ -14,9 +14,9 @@ public class ApiResponseMessage { int code; String type; String message; - + public ApiResponseMessage(){} - + public ApiResponseMessage(int code, String message){ this.code = code; switch(code){ diff --git a/modules/openapi-generator/src/main/resources/JavaJaxRS/resteasy/allowableValues.mustache b/modules/openapi-generator/src/main/resources/JavaJaxRS/resteasy/allowableValues.mustache index a48256d027a1601d3cb9c427e67119dcff701431..75bce9385dea140e1cae22202bcacd2b11e07b76 100644 --- a/modules/openapi-generator/src/main/resources/JavaJaxRS/resteasy/allowableValues.mustache +++ b/modules/openapi-generator/src/main/resources/JavaJaxRS/resteasy/allowableValues.mustache @@ -1 +1 @@ -{{#allowableValues}}allowableValues="{{#values}}{{{.}}}{{^-last}}, {{/-last}}{{/values}}{{^values}}range=[{{#min}}{{.}}{{/min}}{{^min}}-infinity{{/min}}, {{#max}}{{.}}{{/max}}{{^max}}infinity{{/max}}]{{/values}}"{{/allowableValues}} \ No newline at end of file +{{#allowableValues}}allowableValues="{{#values}}{{{.}}}{{^-last}}, {{/-last}}{{/values}}{{^values}}range=[{{min}}{{^min}}-infinity{{/min}}, {{max}}{{^max}}infinity{{/max}}]{{/values}}"{{/allowableValues}} \ No newline at end of file diff --git a/modules/openapi-generator/src/main/resources/JavaJaxRS/resteasy/api.mustache b/modules/openapi-generator/src/main/resources/JavaJaxRS/resteasy/api.mustache index 4b4575440beb7df9108ed259d5eac478af6a8b28..5cdf6ea0be076a6b66071f49eb71c95dcef64ac5 100644 --- a/modules/openapi-generator/src/main/resources/JavaJaxRS/resteasy/api.mustache +++ b/modules/openapi-generator/src/main/resources/JavaJaxRS/resteasy/api.mustache @@ -42,7 +42,7 @@ public class {{classname}} { {{#subresourceOperation}}@Path("{{{path}}}"){{/subresourceOperation}} {{#hasConsumes}}@Consumes({ {{#consumes}}"{{{mediaType}}}"{{^-last}}, {{/-last}}{{/consumes}} }){{/hasConsumes}} {{#hasProduces}}@Produces({ {{#produces}}"{{{mediaType}}}"{{^-last}}, {{/-last}}{{/produces}} }){{/hasProduces}} - @io.swagger.annotations.ApiOperation(value = "{{{summary}}}", notes = "{{{notes}}}", response = {{{returnBaseType}}}.class{{#returnContainer}}, responseContainer = "{{{returnContainer}}}"{{/returnContainer}}{{#hasAuthMethods}}, authorizations = { + @io.swagger.annotations.ApiOperation(value = "{{{summary}}}", notes = "{{{notes}}}", response = {{{returnBaseType}}}.class{{#returnContainer}}, responseContainer = "{{{.}}}"{{/returnContainer}}{{#hasAuthMethods}}, authorizations = { {{#authMethods}}@io.swagger.annotations.Authorization(value = "{{name}}"{{#isOAuth}}, scopes = { {{#scopes}}@io.swagger.annotations.AuthorizationScope(scope = "{{scope}}", description = "{{description}}"){{^-last}}, {{/-last}}{{/scopes}} @@ -50,7 +50,7 @@ public class {{classname}} { {{/-last}}{{/authMethods}} }{{/hasAuthMethods}}, tags={ {{#vendorExtensions.x-tags}}"{{tag}}",{{/vendorExtensions.x-tags}} }) @io.swagger.annotations.ApiResponses(value = { {{#responses}} - @io.swagger.annotations.ApiResponse(code = {{{code}}}, message = "{{{message}}}", response = {{{baseType}}}.class{{#containerType}}, responseContainer = "{{{containerType}}}"{{/containerType}}){{^-last}}, + @io.swagger.annotations.ApiResponse(code = {{{code}}}, message = "{{{message}}}", response = {{{baseType}}}.class{{#containerType}}, responseContainer = "{{{.}}}"{{/containerType}}){{^-last}}, {{/-last}}{{/responses}} }) public Response {{nickname}}({{#isMultipart}}MultipartFormDataInput input,{{/isMultipart}}{{#allParams}}{{>queryParams}}{{>pathParams}}{{>headerParams}}{{>bodyParams}}{{^isMultipart}}{{>formParams}},{{/isMultipart}}{{#isMultipart}}{{^isFormParam}},{{/isFormParam}}{{/isMultipart}}{{/allParams}}@Context SecurityContext securityContext) throws NotFoundException { diff --git a/modules/openapi-generator/src/main/resources/JavaJaxRS/resteasy/beanValidationCore.mustache b/modules/openapi-generator/src/main/resources/JavaJaxRS/resteasy/beanValidationCore.mustache index 1f9f43e7b868563d7df92da9f413d62e76d38197..ff4ffe26c49765afe7058bc23df182aa0a4056e9 100644 --- a/modules/openapi-generator/src/main/resources/JavaJaxRS/resteasy/beanValidationCore.mustache +++ b/modules/openapi-generator/src/main/resources/JavaJaxRS/resteasy/beanValidationCore.mustache @@ -4,17 +4,17 @@ minLength && maxLength set minLength set, maxLength not }}{{#minLength}}{{^maxLength}} @Size(min={{minLength}}){{/maxLength}}{{/minLength}}{{! minLength not set, maxLength set -}}{{^minLength}}{{#maxLength}} @Size(max={{maxLength}}){{/maxLength}}{{/minLength}}{{! +}}{{^minLength}}{{#maxLength}} @Size(max={{.}}){{/maxLength}}{{/minLength}}{{! @Size: minItems && maxItems set }}{{#minItems}}{{#maxItems}} @Size(min={{minItems}},max={{maxItems}}){{/maxItems}}{{/minItems}}{{! @Size: minItems set, maxItems not }}{{#minItems}}{{^maxItems}} @Size(min={{minItems}}){{/maxItems}}{{/minItems}}{{! @Size: minItems not set && maxItems set -}}{{^minItems}}{{#maxItems}} @Size(max={{maxItems}}){{/maxItems}}{{/minItems}}{{! +}}{{^minItems}}{{#maxItems}} @Size(max={{.}}){{/maxItems}}{{/minItems}}{{! check for integer or long / all others=decimal type with @Decimal* isInteger set -}}{{#isInteger}}{{#minimum}} @Min({{minimum}}){{/minimum}}{{#maximum}} @Max({{maximum}}){{/maximum}}{{/isInteger}}{{! +}}{{#isInteger}}{{#minimum}} @Min({{.}}){{/minimum}}{{#maximum}} @Max({{.}}){{/maximum}}{{/isInteger}}{{! isLong set -}}{{#isLong}}{{#minimum}} @Min({{minimum}}L){{/minimum}}{{#maximum}} @Max({{maximum}}L){{/maximum}}{{/isLong}}{{! +}}{{#isLong}}{{#minimum}} @Min({{.}}L){{/minimum}}{{#maximum}} @Max({{.}}L){{/maximum}}{{/isLong}}{{! Not Integer, not Long => we have a decimal value! }}{{^isInteger}}{{^isLong}}{{#minimum}} @DecimalMin({{#exclusiveMinimum}}value={{/exclusiveMinimum}}"{{minimum}}"{{#exclusiveMinimum}},inclusive=false{{/exclusiveMinimum}}){{/minimum}}{{#maximum}} @DecimalMax({{#exclusiveMaximum}}value={{/exclusiveMaximum}}"{{maximum}}"{{#exclusiveMaximum}},inclusive=false{{/exclusiveMaximum}}){{/maximum}}{{/isLong}}{{/isInteger}} \ No newline at end of file diff --git a/modules/openapi-generator/src/main/resources/JavaJaxRS/resteasy/beanValidationHeaderParams.mustache b/modules/openapi-generator/src/main/resources/JavaJaxRS/resteasy/beanValidationHeaderParams.mustache index f8eef8f94c7bea30e95938e16cc856b53036d82b..c4ff01d7e5526b8718f1385ee9416523e0d1c860 100644 --- a/modules/openapi-generator/src/main/resources/JavaJaxRS/resteasy/beanValidationHeaderParams.mustache +++ b/modules/openapi-generator/src/main/resources/JavaJaxRS/resteasy/beanValidationHeaderParams.mustache @@ -1 +1 @@ -{{#required}} @NotNull{{/required}}{{>beanValidationCore}} \ No newline at end of file +{{#required}} @NotNull{{/required}}{{>beanValidationCore}} \ No newline at end of file diff --git a/modules/openapi-generator/src/main/resources/JavaJaxRS/resteasy/beanValidationQueryParams.mustache b/modules/openapi-generator/src/main/resources/JavaJaxRS/resteasy/beanValidationQueryParams.mustache index f8eef8f94c7bea30e95938e16cc856b53036d82b..c4ff01d7e5526b8718f1385ee9416523e0d1c860 100644 --- a/modules/openapi-generator/src/main/resources/JavaJaxRS/resteasy/beanValidationQueryParams.mustache +++ b/modules/openapi-generator/src/main/resources/JavaJaxRS/resteasy/beanValidationQueryParams.mustache @@ -1 +1 @@ -{{#required}} @NotNull{{/required}}{{>beanValidationCore}} \ No newline at end of file +{{#required}} @NotNull{{/required}}{{>beanValidationCore}} \ No newline at end of file diff --git a/modules/openapi-generator/src/main/resources/JavaJaxRS/resteasy/bodyParams.mustache b/modules/openapi-generator/src/main/resources/JavaJaxRS/resteasy/bodyParams.mustache index eec07e9062da6e17f33955325750347eab570e35..879b7f2fc0cc49f7b91752b0474e9aa78dbe4fa7 100644 --- a/modules/openapi-generator/src/main/resources/JavaJaxRS/resteasy/bodyParams.mustache +++ b/modules/openapi-generator/src/main/resources/JavaJaxRS/resteasy/bodyParams.mustache @@ -1 +1 @@ -{{#isBodyParam}}@ApiParam(value = "{{{description}}}" {{#required}},required=true{{/required}}{{#allowableValues}}, {{> allowableValues }}{{/allowableValues}}{{#defaultValue}}, defaultValue="{{{defaultValue}}}"{{/defaultValue}}){{#useBeanValidation}}{{#required}} @NotNull{{/required}} @Valid{{/useBeanValidation}} {{{dataType}}} {{paramName}}{{/isBodyParam}} \ No newline at end of file +{{#isBodyParam}}@ApiParam(value = "{{{description}}}" {{#required}},required=true{{/required}}{{#allowableValues}}, {{> allowableValues }}{{/allowableValues}}{{#defaultValue}}, defaultValue="{{{.}}}"{{/defaultValue}}){{#useBeanValidation}}{{#required}} @NotNull{{/required}} @Valid{{/useBeanValidation}} {{{dataType}}} {{paramName}}{{/isBodyParam}} \ No newline at end of file diff --git a/modules/openapi-generator/src/main/resources/JavaJaxRS/resteasy/eap/JacksonConfig.mustache b/modules/openapi-generator/src/main/resources/JavaJaxRS/resteasy/eap/JacksonConfig.mustache index 923d26477d9ba949b1ac562f5a533737a0d8d1be..3750df40bf8764be6e97bd54007bae32097ca482 100644 --- a/modules/openapi-generator/src/main/resources/JavaJaxRS/resteasy/eap/JacksonConfig.mustache +++ b/modules/openapi-generator/src/main/resources/JavaJaxRS/resteasy/eap/JacksonConfig.mustache @@ -26,8 +26,8 @@ public class JacksonConfig implements ContextResolver<ObjectMapper> { public JacksonConfig() throws Exception { this.objectMapper = new ObjectMapper(); - -{{#java8}} + +{{#java8}} this.objectMapper.registerModule(new JavaTimeModule()); {{/java8}} {{^java8}} @@ -37,7 +37,7 @@ public class JacksonConfig implements ContextResolver<ObjectMapper> { // sample to convert any DateTime to readable timestamps //this.objectMapper.configure(SerializationFeature.WRITE_DATES_AS_TIMESTAMPS, true); } - + public ObjectMapper getContext(Class<?> objectType) { return objectMapper; } diff --git a/modules/openapi-generator/src/main/resources/JavaJaxRS/resteasy/eap/RestApplication.mustache b/modules/openapi-generator/src/main/resources/JavaJaxRS/resteasy/eap/RestApplication.mustache index 0f9c4b28e86b0280a0bfd6d4fffe75bde5d9525a..d68fdfd4adfbddedac8013b88d7ec5b56d350d37 100644 --- a/modules/openapi-generator/src/main/resources/JavaJaxRS/resteasy/eap/RestApplication.mustache +++ b/modules/openapi-generator/src/main/resources/JavaJaxRS/resteasy/eap/RestApplication.mustache @@ -13,7 +13,7 @@ import io.swagger.jaxrs.config.BeanConfig; {{#apis}} import {{package}}.impl.{{classname}}ServiceImpl; {{/apis}} -{{/apiInfo}} +{{/apiInfo}} @ApplicationPath("{{{contextPath}}}") public class RestApplication extends Application { @@ -40,12 +40,12 @@ public class RestApplication extends Application { {{#apis}} resources.add({{classname}}ServiceImpl.class); {{/apis}} -{{/apiInfo}} +{{/apiInfo}} -{{#useSwaggerFeature}} +{{#useSwaggerFeature}} resources.add(io.swagger.jaxrs.listing.ApiListingResource.class); resources.add(io.swagger.jaxrs.listing.SwaggerSerializers.class); -{{/useSwaggerFeature}} +{{/useSwaggerFeature}} return resources; } diff --git a/modules/openapi-generator/src/main/resources/JavaJaxRS/resteasy/eap/allowableValues.mustache b/modules/openapi-generator/src/main/resources/JavaJaxRS/resteasy/eap/allowableValues.mustache index a48256d027a1601d3cb9c427e67119dcff701431..75bce9385dea140e1cae22202bcacd2b11e07b76 100644 --- a/modules/openapi-generator/src/main/resources/JavaJaxRS/resteasy/eap/allowableValues.mustache +++ b/modules/openapi-generator/src/main/resources/JavaJaxRS/resteasy/eap/allowableValues.mustache @@ -1 +1 @@ -{{#allowableValues}}allowableValues="{{#values}}{{{.}}}{{^-last}}, {{/-last}}{{/values}}{{^values}}range=[{{#min}}{{.}}{{/min}}{{^min}}-infinity{{/min}}, {{#max}}{{.}}{{/max}}{{^max}}infinity{{/max}}]{{/values}}"{{/allowableValues}} \ No newline at end of file +{{#allowableValues}}allowableValues="{{#values}}{{{.}}}{{^-last}}, {{/-last}}{{/values}}{{^values}}range=[{{min}}{{^min}}-infinity{{/min}}, {{max}}{{^max}}infinity{{/max}}]{{/values}}"{{/allowableValues}} \ No newline at end of file diff --git a/modules/openapi-generator/src/main/resources/JavaJaxRS/resteasy/eap/api.mustache b/modules/openapi-generator/src/main/resources/JavaJaxRS/resteasy/eap/api.mustache index e2dfc12d9056639aba8b7d7846051fdc5e16357c..db3a8fb34301186916bd52dbac5bf5451dd4493a 100644 --- a/modules/openapi-generator/src/main/resources/JavaJaxRS/resteasy/eap/api.mustache +++ b/modules/openapi-generator/src/main/resources/JavaJaxRS/resteasy/eap/api.mustache @@ -30,13 +30,13 @@ import javax.validation.Valid; {{>generatedAnnotation}} {{#operations}} public interface {{classname}} { - + {{#operation}} @{{httpMethod}} {{#subresourceOperation}}@Path("{{{path}}}"){{/subresourceOperation}} {{#hasConsumes}}@Consumes({ {{#consumes}}"{{{mediaType}}}"{{^-last}}, {{/-last}}{{/consumes}} }){{/hasConsumes}} {{#hasProduces}}@Produces({ {{#produces}}"{{{mediaType}}}"{{^-last}}, {{/-last}}{{/produces}} }){{/hasProduces}} - @io.swagger.annotations.ApiOperation(value = "{{{summary}}}", notes = "{{{notes}}}", response = {{{returnBaseType}}}.class{{#returnContainer}}, responseContainer = "{{{returnContainer}}}"{{/returnContainer}}{{#hasAuthMethods}}, authorizations = { + @io.swagger.annotations.ApiOperation(value = "{{{summary}}}", notes = "{{{notes}}}", response = {{{returnBaseType}}}.class{{#returnContainer}}, responseContainer = "{{{.}}}"{{/returnContainer}}{{#hasAuthMethods}}, authorizations = { {{#authMethods}}@io.swagger.annotations.Authorization(value = "{{name}}"{{#isOAuth}}, scopes = { {{#scopes}}@io.swagger.annotations.AuthorizationScope(scope = "{{scope}}", description = "{{description}}"){{^-last}}, {{/-last}}{{/scopes}} @@ -44,7 +44,7 @@ public interface {{classname}} { {{/-last}}{{/authMethods}} }{{/hasAuthMethods}}, tags={ {{#vendorExtensions.x-tags}}"{{tag}}",{{/vendorExtensions.x-tags}} }) @io.swagger.annotations.ApiResponses(value = { {{#responses}} - @io.swagger.annotations.ApiResponse(code = {{{code}}}, message = "{{{message}}}", response = {{{baseType}}}.class{{#containerType}}, responseContainer = "{{{containerType}}}"{{/containerType}}){{^-last}}, + @io.swagger.annotations.ApiResponse(code = {{{code}}}, message = "{{{message}}}", response = {{{baseType}}}.class{{#containerType}}, responseContainer = "{{{.}}}"{{/containerType}}){{^-last}}, {{/-last}}{{/responses}} }) public Response {{nickname}}({{#isMultipart}}MultipartFormDataInput input,{{/isMultipart}}{{#allParams}}{{>queryParams}}{{>pathParams}}{{>headerParams}}{{>bodyParams}}{{^isMultipart}}{{>formParams}},{{/isMultipart}}{{#isMultipart}}{{^isFormParam}},{{/isFormParam}}{{/isMultipart}}{{/allParams}}@Context SecurityContext securityContext); {{/operation}} diff --git a/modules/openapi-generator/src/main/resources/JavaJaxRS/resteasy/eap/beanValidationCore.mustache b/modules/openapi-generator/src/main/resources/JavaJaxRS/resteasy/eap/beanValidationCore.mustache index ae26b2739f1ec55ac037aa4d4717ea4550bd8efb..d6e2f13b457c49057b5d6fc420150bbd682fa1d1 100644 --- a/modules/openapi-generator/src/main/resources/JavaJaxRS/resteasy/eap/beanValidationCore.mustache +++ b/modules/openapi-generator/src/main/resources/JavaJaxRS/resteasy/eap/beanValidationCore.mustache @@ -1,20 +1,20 @@ -{{#pattern}} @Pattern(regexp="{{{pattern}}}"){{/pattern}}{{! +{{#pattern}} @Pattern(regexp="{{{.}}}"){{/pattern}}{{! minLength && maxLength set }}{{#minLength}}{{#maxLength}} @Size(min={{minLength}},max={{maxLength}}){{/maxLength}}{{/minLength}}{{! minLength set, maxLength not }}{{#minLength}}{{^maxLength}} @Size(min={{minLength}}){{/maxLength}}{{/minLength}}{{! minLength not set, maxLength set -}}{{^minLength}}{{#maxLength}} @Size(max={{maxLength}}){{/maxLength}}{{/minLength}}{{! +}}{{^minLength}}{{#maxLength}} @Size(max={{.}}){{/maxLength}}{{/minLength}}{{! @Size: minItems && maxItems set }}{{#minItems}}{{#maxItems}} @Size(min={{minItems}},max={{maxItems}}){{/maxItems}}{{/minItems}}{{! @Size: minItems set, maxItems not }}{{#minItems}}{{^maxItems}} @Size(min={{minItems}}){{/maxItems}}{{/minItems}}{{! @Size: minItems not set && maxItems set -}}{{^minItems}}{{#maxItems}} @Size(max={{maxItems}}){{/maxItems}}{{/minItems}}{{! +}}{{^minItems}}{{#maxItems}} @Size(max={{.}}){{/maxItems}}{{/minItems}}{{! check for integer or long / all others=decimal type with @Decimal* isInteger set -}}{{#isInteger}}{{#minimum}} @Min({{minimum}}){{/minimum}}{{#maximum}} @Max({{maximum}}){{/maximum}}{{/isInteger}}{{! +}}{{#isInteger}}{{#minimum}} @Min({{.}}){{/minimum}}{{#maximum}} @Max({{.}}){{/maximum}}{{/isInteger}}{{! isLong set -}}{{#isLong}}{{#minimum}} @Min({{minimum}}L){{/minimum}}{{#maximum}} @Max({{maximum}}L){{/maximum}}{{/isLong}}{{! +}}{{#isLong}}{{#minimum}} @Min({{.}}L){{/minimum}}{{#maximum}} @Max({{.}}L){{/maximum}}{{/isLong}}{{! Not Integer, not Long => we have a decimal value! }}{{^isInteger}}{{^isLong}}{{#minimum}} @DecimalMin({{#exclusiveMinimum}}value={{/exclusiveMinimum}}"{{minimum}}"{{#exclusiveMinimum}},inclusive=false{{/exclusiveMinimum}}){{/minimum}}{{#maximum}} @DecimalMax({{#exclusiveMaximum}}value={{/exclusiveMaximum}}"{{maximum}}"{{#exclusiveMaximum}},inclusive=false{{/exclusiveMaximum}}){{/maximum}}{{/isLong}}{{/isInteger}} \ No newline at end of file diff --git a/modules/openapi-generator/src/main/resources/JavaJaxRS/resteasy/eap/beanValidationHeaderParams.mustache b/modules/openapi-generator/src/main/resources/JavaJaxRS/resteasy/eap/beanValidationHeaderParams.mustache index f8eef8f94c7bea30e95938e16cc856b53036d82b..c4ff01d7e5526b8718f1385ee9416523e0d1c860 100644 --- a/modules/openapi-generator/src/main/resources/JavaJaxRS/resteasy/eap/beanValidationHeaderParams.mustache +++ b/modules/openapi-generator/src/main/resources/JavaJaxRS/resteasy/eap/beanValidationHeaderParams.mustache @@ -1 +1 @@ -{{#required}} @NotNull{{/required}}{{>beanValidationCore}} \ No newline at end of file +{{#required}} @NotNull{{/required}}{{>beanValidationCore}} \ No newline at end of file diff --git a/modules/openapi-generator/src/main/resources/JavaJaxRS/resteasy/eap/beanValidationQueryParams.mustache b/modules/openapi-generator/src/main/resources/JavaJaxRS/resteasy/eap/beanValidationQueryParams.mustache index f8eef8f94c7bea30e95938e16cc856b53036d82b..c4ff01d7e5526b8718f1385ee9416523e0d1c860 100644 --- a/modules/openapi-generator/src/main/resources/JavaJaxRS/resteasy/eap/beanValidationQueryParams.mustache +++ b/modules/openapi-generator/src/main/resources/JavaJaxRS/resteasy/eap/beanValidationQueryParams.mustache @@ -1 +1 @@ -{{#required}} @NotNull{{/required}}{{>beanValidationCore}} \ No newline at end of file +{{#required}} @NotNull{{/required}}{{>beanValidationCore}} \ No newline at end of file diff --git a/modules/openapi-generator/src/main/resources/JavaJaxRS/resteasy/eap/bodyParams.mustache b/modules/openapi-generator/src/main/resources/JavaJaxRS/resteasy/eap/bodyParams.mustache index eec07e9062da6e17f33955325750347eab570e35..879b7f2fc0cc49f7b91752b0474e9aa78dbe4fa7 100644 --- a/modules/openapi-generator/src/main/resources/JavaJaxRS/resteasy/eap/bodyParams.mustache +++ b/modules/openapi-generator/src/main/resources/JavaJaxRS/resteasy/eap/bodyParams.mustache @@ -1 +1 @@ -{{#isBodyParam}}@ApiParam(value = "{{{description}}}" {{#required}},required=true{{/required}}{{#allowableValues}}, {{> allowableValues }}{{/allowableValues}}{{#defaultValue}}, defaultValue="{{{defaultValue}}}"{{/defaultValue}}){{#useBeanValidation}}{{#required}} @NotNull{{/required}} @Valid{{/useBeanValidation}} {{{dataType}}} {{paramName}}{{/isBodyParam}} \ No newline at end of file +{{#isBodyParam}}@ApiParam(value = "{{{description}}}" {{#required}},required=true{{/required}}{{#allowableValues}}, {{> allowableValues }}{{/allowableValues}}{{#defaultValue}}, defaultValue="{{{.}}}"{{/defaultValue}}){{#useBeanValidation}}{{#required}} @NotNull{{/required}} @Valid{{/useBeanValidation}} {{{dataType}}} {{paramName}}{{/isBodyParam}} \ No newline at end of file diff --git a/modules/openapi-generator/src/main/resources/JavaJaxRS/resteasy/eap/enumClass.mustache b/modules/openapi-generator/src/main/resources/JavaJaxRS/resteasy/eap/enumClass.mustache index 6e41c39177f649026bac2d73e541e245a09140fb..5dca420a51c0b5c2807940ef7deb3dd5176756ce 100644 --- a/modules/openapi-generator/src/main/resources/JavaJaxRS/resteasy/eap/enumClass.mustache +++ b/modules/openapi-generator/src/main/resources/JavaJaxRS/resteasy/eap/enumClass.mustache @@ -1,7 +1,7 @@ /** - * {{^description}}Gets or Sets {{{name}}}{{/description}}{{#description}}{{description}}{{/description}} + * {{description}}{{^description}}Gets or Sets {{{name}}}{{/description}} */ - {{>additionalEnumTypeAnnotations}}public enum {{#datatypeWithEnum}}{{.}}{{/datatypeWithEnum}}{{^datatypeWithEnum}}{{classname}}{{/datatypeWithEnum}} { + {{>additionalEnumTypeAnnotations}}public enum {{datatypeWithEnum}}{{^datatypeWithEnum}}{{classname}}{{/datatypeWithEnum}} { {{#allowableValues}} {{#enumVars}} {{{name}}}({{{value}}}){{^-last}}, @@ -12,7 +12,7 @@ {{/allowableValues}} private {{dataType}} value; - {{#datatypeWithEnum}}{{.}}{{/datatypeWithEnum}}{{^datatypeWithEnum}}{{classname}}{{/datatypeWithEnum}}({{dataType}} value) { + {{datatypeWithEnum}}{{^datatypeWithEnum}}{{classname}}{{/datatypeWithEnum}}({{dataType}} value) { this.value = value; } diff --git a/modules/openapi-generator/src/main/resources/JavaJaxRS/resteasy/eap/formParams.mustache b/modules/openapi-generator/src/main/resources/JavaJaxRS/resteasy/eap/formParams.mustache index 79d5e482e3d0d787caa47ee7dd2a8a80d9579258..1d72d944c2fdb9c85f12856f60204327b75446f5 100644 --- a/modules/openapi-generator/src/main/resources/JavaJaxRS/resteasy/eap/formParams.mustache +++ b/modules/openapi-generator/src/main/resources/JavaJaxRS/resteasy/eap/formParams.mustache @@ -1 +1 @@ -{{#isFormParam}}{{^isFile}}@ApiParam(value = "{{{description}}}"{{#required}}, required=true{{/required}}{{#allowableValues}}, {{> allowableValues }}{{/allowableValues}}{{#defaultValue}}, defaultValue="{{{defaultValue}}}"{{/defaultValue}}) @FormParam("{{baseName}}") {{{dataType}}} {{paramName}}{{/isFile}}{{/isFormParam}} \ No newline at end of file +{{#isFormParam}}{{^isFile}}@ApiParam(value = "{{{description}}}"{{#required}}, required=true{{/required}}{{#allowableValues}}, {{> allowableValues }}{{/allowableValues}}{{#defaultValue}}, defaultValue="{{{.}}}"{{/defaultValue}}) @FormParam("{{baseName}}") {{{dataType}}} {{paramName}}{{/isFile}}{{/isFormParam}} \ No newline at end of file diff --git a/modules/openapi-generator/src/main/resources/JavaJaxRS/resteasy/eap/headerParams.mustache b/modules/openapi-generator/src/main/resources/JavaJaxRS/resteasy/eap/headerParams.mustache index 6dafce8fe79bfda1633eecb4d4b8a607176021a6..3e047779034fe8eec2744c28af8f8e5bd2e8c492 100644 --- a/modules/openapi-generator/src/main/resources/JavaJaxRS/resteasy/eap/headerParams.mustache +++ b/modules/openapi-generator/src/main/resources/JavaJaxRS/resteasy/eap/headerParams.mustache @@ -1 +1 @@ -{{#isHeaderParam}}{{#useBeanValidation}}{{>beanValidationHeaderParams}}{{/useBeanValidation}} @ApiParam(value = "{{{description}}}" {{#required}},required=true{{/required}}{{#allowableValues}}, {{> allowableValues }}{{/allowableValues}}{{#defaultValue}}, defaultValue="{{{defaultValue}}}"{{/defaultValue}}) @HeaderParam("{{baseName}}") {{{dataType}}} {{paramName}}{{/isHeaderParam}} \ No newline at end of file +{{#isHeaderParam}}{{#useBeanValidation}}{{>beanValidationHeaderParams}}{{/useBeanValidation}} @ApiParam(value = "{{{description}}}" {{#required}},required=true{{/required}}{{#allowableValues}}, {{> allowableValues }}{{/allowableValues}}{{#defaultValue}}, defaultValue="{{{.}}}"{{/defaultValue}}) @HeaderParam("{{baseName}}") {{{dataType}}} {{paramName}}{{/isHeaderParam}} \ No newline at end of file diff --git a/modules/openapi-generator/src/main/resources/JavaJaxRS/resteasy/eap/pojo.mustache b/modules/openapi-generator/src/main/resources/JavaJaxRS/resteasy/eap/pojo.mustache index 343fe1933b1f6c72e550702c25ebc17555523597..eaa4f0a0d6a54cd370bde3a8aa98a349c356bab1 100644 --- a/modules/openapi-generator/src/main/resources/JavaJaxRS/resteasy/eap/pojo.mustache +++ b/modules/openapi-generator/src/main/resources/JavaJaxRS/resteasy/eap/pojo.mustache @@ -1,7 +1,7 @@ import io.swagger.annotations.*; -{{#description}}@ApiModel(description="{{{description}}}"){{/description}}{{>additionalModelTypeAnnotations}}{{>generatedAnnotation}}{{#discriminator}}{{>typeInfoAnnotation}}{{/discriminator}} -public class {{classname}} {{#parent}}extends {{{parent}}}{{/parent}} {{#serializableModel}}implements Serializable{{/serializableModel}} { +{{#description}}@ApiModel(description="{{{.}}}"){{/description}}{{>additionalModelTypeAnnotations}}{{>generatedAnnotation}}{{#discriminator}}{{>typeInfoAnnotation}}{{/discriminator}} +public class {{classname}} {{#parent}}extends {{{.}}}{{/parent}} {{#serializableModel}}implements Serializable{{/serializableModel}} { {{#serializableModel}} private static final long serialVersionUID = 1L; {{/serializableModel}} @@ -11,22 +11,22 @@ public class {{classname}} {{#parent}}extends {{{parent}}}{{/parent}} {{#seriali {{>enumClass}}{{/mostInnerItems}}{{/isContainer}}{{/isEnum}} - private {{{datatypeWithEnum}}} {{name}}{{#defaultValue}} = {{{defaultValue}}}{{/defaultValue}};{{/vars}} + private {{{datatypeWithEnum}}} {{name}}{{#defaultValue}} = {{{.}}}{{/defaultValue}};{{/vars}} {{#vars}} /** {{#description}} - * {{description}} + * {{.}} {{/description}} {{#minimum}} - * minimum: {{minimum}} + * minimum: {{.}} {{/minimum}} {{#maximum}} - * maximum: {{maximum}} + * maximum: {{.}} {{/maximum}} **/ {{#vendorExtensions.x-extra-annotation}}{{{vendorExtensions.x-extra-annotation}}}{{/vendorExtensions.x-extra-annotation}} - @ApiModelProperty({{#example}}example = "{{{example}}}", {{/example}}{{#required}}required = {{required}}, {{/required}}value = "{{{description}}}") + @ApiModelProperty({{#example}}example = "{{{.}}}", {{/example}}{{#required}}required = {{required}}, {{/required}}value = "{{{description}}}") @JsonProperty("{{baseName}}") {{#useBeanValidation}}{{>beanValidation}}{{/useBeanValidation}} public {{{datatypeWithEnum}}} {{getter}}() { return {{name}}; diff --git a/modules/openapi-generator/src/main/resources/JavaJaxRS/resteasy/eap/pom.mustache b/modules/openapi-generator/src/main/resources/JavaJaxRS/resteasy/eap/pom.mustache index 48d331f4aee31633fe14a1de5226a11fa9527943..6f7f2c245150d79be1f7f61cadcf1ce59cda5f6a 100644 --- a/modules/openapi-generator/src/main/resources/JavaJaxRS/resteasy/eap/pom.mustache +++ b/modules/openapi-generator/src/main/resources/JavaJaxRS/resteasy/eap/pom.mustache @@ -166,7 +166,7 @@ <version>2.9.9</version> </dependency> {{/java8}} - + </dependencies> <repositories> <repository> diff --git a/modules/openapi-generator/src/main/resources/JavaJaxRS/resteasy/eap/queryParams.mustache b/modules/openapi-generator/src/main/resources/JavaJaxRS/resteasy/eap/queryParams.mustache index 86b8bdf7b5b88669a3000a42011218bc60f8b065..88a7eb85a2f8b96bbc9d6d3ee2002becb608dbcc 100644 --- a/modules/openapi-generator/src/main/resources/JavaJaxRS/resteasy/eap/queryParams.mustache +++ b/modules/openapi-generator/src/main/resources/JavaJaxRS/resteasy/eap/queryParams.mustache @@ -1 +1 @@ -{{#isQueryParam}}{{#useBeanValidation}}{{>beanValidationQueryParams}}{{/useBeanValidation}}{{^isContainer}}{{#allowableValues}}, {{> allowableValues }}{{/allowableValues}}{{#defaultValue}} @DefaultValue("{{{defaultValue}}}"){{/defaultValue}}{{/isContainer}} @QueryParam("{{baseName}}") {{{dataType}}} {{paramName}}{{/isQueryParam}} \ No newline at end of file +{{#isQueryParam}}{{#useBeanValidation}}{{>beanValidationQueryParams}}{{/useBeanValidation}}{{^isContainer}}{{#allowableValues}}, {{> allowableValues }}{{/allowableValues}}{{#defaultValue}} @DefaultValue("{{{.}}}"){{/defaultValue}}{{/isContainer}} @QueryParam("{{baseName}}") {{{dataType}}} {{paramName}}{{/isQueryParam}} \ No newline at end of file diff --git a/modules/openapi-generator/src/main/resources/JavaJaxRS/resteasy/eap/web.mustache b/modules/openapi-generator/src/main/resources/JavaJaxRS/resteasy/eap/web.mustache index be8e25fc2c69f2466485e97676cc84c221d68c83..0a3de16aea928880ef129cf6bad97497661bc60a 100644 --- a/modules/openapi-generator/src/main/resources/JavaJaxRS/resteasy/eap/web.mustache +++ b/modules/openapi-generator/src/main/resources/JavaJaxRS/resteasy/eap/web.mustache @@ -2,8 +2,8 @@ <web-app version="2.4" xmlns="http://java.sun.com/xml/ns/j2ee" xmlns:j2ee="http://java.sun.com/xml/ns/j2ee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd"> - <context-param> - <param-name>resteasy.providers</param-name> + <context-param> + <param-name>resteasy.providers</param-name> <param-value>{{invokerPackage}}.JacksonConfig</param-value> </context-param> </web-app> diff --git a/modules/openapi-generator/src/main/resources/JavaJaxRS/resteasy/enumClass.mustache b/modules/openapi-generator/src/main/resources/JavaJaxRS/resteasy/enumClass.mustache index 6e41c39177f649026bac2d73e541e245a09140fb..5dca420a51c0b5c2807940ef7deb3dd5176756ce 100644 --- a/modules/openapi-generator/src/main/resources/JavaJaxRS/resteasy/enumClass.mustache +++ b/modules/openapi-generator/src/main/resources/JavaJaxRS/resteasy/enumClass.mustache @@ -1,7 +1,7 @@ /** - * {{^description}}Gets or Sets {{{name}}}{{/description}}{{#description}}{{description}}{{/description}} + * {{description}}{{^description}}Gets or Sets {{{name}}}{{/description}} */ - {{>additionalEnumTypeAnnotations}}public enum {{#datatypeWithEnum}}{{.}}{{/datatypeWithEnum}}{{^datatypeWithEnum}}{{classname}}{{/datatypeWithEnum}} { + {{>additionalEnumTypeAnnotations}}public enum {{datatypeWithEnum}}{{^datatypeWithEnum}}{{classname}}{{/datatypeWithEnum}} { {{#allowableValues}} {{#enumVars}} {{{name}}}({{{value}}}){{^-last}}, @@ -12,7 +12,7 @@ {{/allowableValues}} private {{dataType}} value; - {{#datatypeWithEnum}}{{.}}{{/datatypeWithEnum}}{{^datatypeWithEnum}}{{classname}}{{/datatypeWithEnum}}({{dataType}} value) { + {{datatypeWithEnum}}{{^datatypeWithEnum}}{{classname}}{{/datatypeWithEnum}}({{dataType}} value) { this.value = value; } diff --git a/modules/openapi-generator/src/main/resources/JavaJaxRS/resteasy/formParams.mustache b/modules/openapi-generator/src/main/resources/JavaJaxRS/resteasy/formParams.mustache index 79d5e482e3d0d787caa47ee7dd2a8a80d9579258..1d72d944c2fdb9c85f12856f60204327b75446f5 100644 --- a/modules/openapi-generator/src/main/resources/JavaJaxRS/resteasy/formParams.mustache +++ b/modules/openapi-generator/src/main/resources/JavaJaxRS/resteasy/formParams.mustache @@ -1 +1 @@ -{{#isFormParam}}{{^isFile}}@ApiParam(value = "{{{description}}}"{{#required}}, required=true{{/required}}{{#allowableValues}}, {{> allowableValues }}{{/allowableValues}}{{#defaultValue}}, defaultValue="{{{defaultValue}}}"{{/defaultValue}}) @FormParam("{{baseName}}") {{{dataType}}} {{paramName}}{{/isFile}}{{/isFormParam}} \ No newline at end of file +{{#isFormParam}}{{^isFile}}@ApiParam(value = "{{{description}}}"{{#required}}, required=true{{/required}}{{#allowableValues}}, {{> allowableValues }}{{/allowableValues}}{{#defaultValue}}, defaultValue="{{{.}}}"{{/defaultValue}}) @FormParam("{{baseName}}") {{{dataType}}} {{paramName}}{{/isFile}}{{/isFormParam}} \ No newline at end of file diff --git a/modules/openapi-generator/src/main/resources/JavaJaxRS/resteasy/headerParams.mustache b/modules/openapi-generator/src/main/resources/JavaJaxRS/resteasy/headerParams.mustache index 6dafce8fe79bfda1633eecb4d4b8a607176021a6..3e047779034fe8eec2744c28af8f8e5bd2e8c492 100644 --- a/modules/openapi-generator/src/main/resources/JavaJaxRS/resteasy/headerParams.mustache +++ b/modules/openapi-generator/src/main/resources/JavaJaxRS/resteasy/headerParams.mustache @@ -1 +1 @@ -{{#isHeaderParam}}{{#useBeanValidation}}{{>beanValidationHeaderParams}}{{/useBeanValidation}} @ApiParam(value = "{{{description}}}" {{#required}},required=true{{/required}}{{#allowableValues}}, {{> allowableValues }}{{/allowableValues}}{{#defaultValue}}, defaultValue="{{{defaultValue}}}"{{/defaultValue}}) @HeaderParam("{{baseName}}") {{{dataType}}} {{paramName}}{{/isHeaderParam}} \ No newline at end of file +{{#isHeaderParam}}{{#useBeanValidation}}{{>beanValidationHeaderParams}}{{/useBeanValidation}} @ApiParam(value = "{{{description}}}" {{#required}},required=true{{/required}}{{#allowableValues}}, {{> allowableValues }}{{/allowableValues}}{{#defaultValue}}, defaultValue="{{{.}}}"{{/defaultValue}}) @HeaderParam("{{baseName}}") {{{dataType}}} {{paramName}}{{/isHeaderParam}} \ No newline at end of file diff --git a/modules/openapi-generator/src/main/resources/JavaJaxRS/resteasy/pojo.mustache b/modules/openapi-generator/src/main/resources/JavaJaxRS/resteasy/pojo.mustache index 4478f50ae29ac8943a17900a712060da288a7545..f962101b9880a483b714874076f6d0b2b3eb66c4 100644 --- a/modules/openapi-generator/src/main/resources/JavaJaxRS/resteasy/pojo.mustache +++ b/modules/openapi-generator/src/main/resources/JavaJaxRS/resteasy/pojo.mustache @@ -1,7 +1,7 @@ import io.swagger.annotations.*; -{{#description}}@ApiModel(description="{{{description}}}"){{/description}}{{>additionalModelTypeAnnotations}}{{>generatedAnnotation}}{{#discriminator}}{{>typeInfoAnnotation}}{{/discriminator}} -public class {{classname}} {{#parent}}extends {{{parent}}}{{/parent}} {{#serializableModel}}implements Serializable{{/serializableModel}} { +{{#description}}@ApiModel(description="{{{.}}}"){{/description}}{{>additionalModelTypeAnnotations}}{{>generatedAnnotation}}{{#discriminator}}{{>typeInfoAnnotation}}{{/discriminator}} +public class {{classname}} {{#parent}}extends {{{.}}}{{/parent}} {{#serializableModel}}implements Serializable{{/serializableModel}} { {{#serializableModel}} private static final long serialVersionUID = 1L; {{/serializableModel}} @@ -10,22 +10,22 @@ public class {{classname}} {{#parent}}extends {{{parent}}}{{/parent}} {{#seriali {{>enumClass}}{{/isContainer}}{{#isContainer}}{{#mostInnerItems}} {{>enumClass}}{{/mostInnerItems}}{{/isContainer}}{{/isEnum}} - private {{{datatypeWithEnum}}} {{name}}{{#defaultValue}} = {{{defaultValue}}}{{/defaultValue}};{{/vars}} + private {{{datatypeWithEnum}}} {{name}}{{#defaultValue}} = {{{.}}}{{/defaultValue}};{{/vars}} {{#vars}} /** {{#description}} - * {{description}} + * {{.}} {{/description}} {{#minimum}} - * minimum: {{minimum}} + * minimum: {{.}} {{/minimum}} {{#maximum}} - * maximum: {{maximum}} + * maximum: {{.}} {{/maximum}} **/ {{#vendorExtensions.x-extra-annotation}}{{{vendorExtensions.x-extra-annotation}}}{{/vendorExtensions.x-extra-annotation}} - @ApiModelProperty({{#example}}example = "{{{example}}}", {{/example}}{{#required}}required = {{required}}, {{/required}}value = "{{{description}}}") + @ApiModelProperty({{#example}}example = "{{{.}}}", {{/example}}{{#required}}required = {{required}}, {{/required}}value = "{{{description}}}") @JsonProperty("{{baseName}}") {{#useBeanValidation}}{{>beanValidation}}{{/useBeanValidation}} public {{{datatypeWithEnum}}} {{getter}}() { return {{name}}; diff --git a/modules/openapi-generator/src/main/resources/JavaJaxRS/resteasy/pom.mustache b/modules/openapi-generator/src/main/resources/JavaJaxRS/resteasy/pom.mustache index 997588b8b75476cc8c673bd9c1cc69175a5264fe..f233909cbd797ddfa9862068ccb5f653107fd0a1 100644 --- a/modules/openapi-generator/src/main/resources/JavaJaxRS/resteasy/pom.mustache +++ b/modules/openapi-generator/src/main/resources/JavaJaxRS/resteasy/pom.mustache @@ -184,8 +184,8 @@ <version>1.1.0.Final</version> <scope>provided</scope> </dependency> -{{/useBeanValidation}} - +{{/useBeanValidation}} + </dependencies> <repositories> <repository> diff --git a/modules/openapi-generator/src/main/resources/JavaJaxRS/resteasy/queryParams.mustache b/modules/openapi-generator/src/main/resources/JavaJaxRS/resteasy/queryParams.mustache index 86b8bdf7b5b88669a3000a42011218bc60f8b065..88a7eb85a2f8b96bbc9d6d3ee2002becb608dbcc 100644 --- a/modules/openapi-generator/src/main/resources/JavaJaxRS/resteasy/queryParams.mustache +++ b/modules/openapi-generator/src/main/resources/JavaJaxRS/resteasy/queryParams.mustache @@ -1 +1 @@ -{{#isQueryParam}}{{#useBeanValidation}}{{>beanValidationQueryParams}}{{/useBeanValidation}}{{^isContainer}}{{#allowableValues}}, {{> allowableValues }}{{/allowableValues}}{{#defaultValue}} @DefaultValue("{{{defaultValue}}}"){{/defaultValue}}{{/isContainer}} @QueryParam("{{baseName}}") {{{dataType}}} {{paramName}}{{/isQueryParam}} \ No newline at end of file +{{#isQueryParam}}{{#useBeanValidation}}{{>beanValidationQueryParams}}{{/useBeanValidation}}{{^isContainer}}{{#allowableValues}}, {{> allowableValues }}{{/allowableValues}}{{#defaultValue}} @DefaultValue("{{{.}}}"){{/defaultValue}}{{/isContainer}} @QueryParam("{{baseName}}") {{{dataType}}} {{paramName}}{{/isQueryParam}} \ No newline at end of file diff --git a/modules/openapi-generator/src/main/resources/JavaJaxRS/spec/apiInterface.mustache b/modules/openapi-generator/src/main/resources/JavaJaxRS/spec/apiInterface.mustache index e4bf4e05bfad08c0d26dc9ca98d6698a5d1af100..0fcf5420c2828a70db860c63e3bc720b7ca17239 100644 --- a/modules/openapi-generator/src/main/resources/JavaJaxRS/spec/apiInterface.mustache +++ b/modules/openapi-generator/src/main/resources/JavaJaxRS/spec/apiInterface.mustache @@ -9,5 +9,5 @@ {{^isOAuth}}@Authorization(value = "{{name}}"){{^-last}},{{/-last}} {{/isOAuth}}{{/authMethods}} }{{/hasAuthMethods}}, tags={ {{#vendorExtensions.x-tags}}"{{tag}}"{{^-last}}, {{/-last}}{{/vendorExtensions.x-tags}} }) @ApiResponses(value = { {{#responses}} - @ApiResponse(code = {{{code}}}, message = "{{{message}}}", response = {{{baseType}}}.class{{#returnContainer}}, responseContainer = "{{{returnContainer}}}"{{/returnContainer}}){{^-last}},{{/-last}}{{/responses}} }){{/useSwaggerAnnotations}} + @ApiResponse(code = {{{code}}}, message = "{{{message}}}", response = {{{baseType}}}.class{{#returnContainer}}, responseContainer = "{{{.}}}"{{/returnContainer}}){{^-last}},{{/-last}}{{/responses}} }){{/useSwaggerAnnotations}} {{#returnResponse}}Response{{/returnResponse}}{{^returnResponse}}{{>returnTypeInterface}}{{/returnResponse}} {{nickname}}({{#allParams}}{{>queryParams}}{{>pathParams}}{{>headerParams}}{{>bodyParams}}{{>formParams}}{{^-last}},{{/-last}}{{/allParams}}); \ No newline at end of file diff --git a/modules/openapi-generator/src/main/resources/JavaJaxRS/spec/apiMethod.mustache b/modules/openapi-generator/src/main/resources/JavaJaxRS/spec/apiMethod.mustache index 09db050cd767e9aeceb3bccda904ad37f6d13bd9..d6c4ae7c82c1e8d4b3ee1c3d8ea3d0dd9561b295 100644 --- a/modules/openapi-generator/src/main/resources/JavaJaxRS/spec/apiMethod.mustache +++ b/modules/openapi-generator/src/main/resources/JavaJaxRS/spec/apiMethod.mustache @@ -2,14 +2,14 @@ @Path("{{{path}}}"){{/subresourceOperation}}{{#hasConsumes}} @Consumes({ {{#consumes}}"{{{mediaType}}}"{{^-last}}, {{/-last}}{{/consumes}} }){{/hasConsumes}}{{#hasProduces}} @Produces({ {{#produces}}"{{{mediaType}}}"{{^-last}}, {{/-last}}{{/produces}} }){{/hasProduces}}{{#useSwaggerAnnotations}} - @ApiOperation(value = "{{{summary}}}", notes = "{{{notes}}}", response = {{{returnBaseType}}}.class{{#returnContainer}}, responseContainer = "{{{returnContainer}}}"{{/returnContainer}}{{#hasAuthMethods}}, authorizations = { + @ApiOperation(value = "{{{summary}}}", notes = "{{{notes}}}", response = {{{returnBaseType}}}.class{{#returnContainer}}, responseContainer = "{{{.}}}"{{/returnContainer}}{{#hasAuthMethods}}, authorizations = { {{#authMethods}}{{#isOAuth}}@Authorization(value = "{{name}}", scopes = { {{#scopes}}@AuthorizationScope(scope = "{{scope}}", description = "{{description}}"){{^-last}}, {{/-last}}{{/scopes}} }){{^-last}},{{/-last}}{{/isOAuth}} {{^isOAuth}}@Authorization(value = "{{name}}"){{^-last}},{{/-last}} {{/isOAuth}}{{/authMethods}} }{{/hasAuthMethods}}, tags={ {{#vendorExtensions.x-tags}}"{{tag}}"{{^-last}}, {{/-last}}{{/vendorExtensions.x-tags}} }) @ApiResponses(value = { {{#responses}} - @ApiResponse(code = {{{code}}}, message = "{{{message}}}", response = {{{baseType}}}.class{{#containerType}}, responseContainer = "{{{containerType}}}"{{/containerType}}){{^-last}},{{/-last}}{{/responses}} + @ApiResponse(code = {{{code}}}, message = "{{{message}}}", response = {{{baseType}}}.class{{#containerType}}, responseContainer = "{{{.}}}"{{/containerType}}){{^-last}},{{/-last}}{{/responses}} }){{/useSwaggerAnnotations}} public Response {{nickname}}({{#allParams}}{{>queryParams}}{{>pathParams}}{{>cookieParams}}{{>headerParams}}{{>bodyParams}}{{>formParams}}{{^-last}},{{/-last}}{{/allParams}}) { return Response.ok().entity("magic!").build(); diff --git a/modules/openapi-generator/src/main/resources/JavaJaxRS/spec/beanValidationCore.mustache b/modules/openapi-generator/src/main/resources/JavaJaxRS/spec/beanValidationCore.mustache index ae26b2739f1ec55ac037aa4d4717ea4550bd8efb..d6e2f13b457c49057b5d6fc420150bbd682fa1d1 100644 --- a/modules/openapi-generator/src/main/resources/JavaJaxRS/spec/beanValidationCore.mustache +++ b/modules/openapi-generator/src/main/resources/JavaJaxRS/spec/beanValidationCore.mustache @@ -1,20 +1,20 @@ -{{#pattern}} @Pattern(regexp="{{{pattern}}}"){{/pattern}}{{! +{{#pattern}} @Pattern(regexp="{{{.}}}"){{/pattern}}{{! minLength && maxLength set }}{{#minLength}}{{#maxLength}} @Size(min={{minLength}},max={{maxLength}}){{/maxLength}}{{/minLength}}{{! minLength set, maxLength not }}{{#minLength}}{{^maxLength}} @Size(min={{minLength}}){{/maxLength}}{{/minLength}}{{! minLength not set, maxLength set -}}{{^minLength}}{{#maxLength}} @Size(max={{maxLength}}){{/maxLength}}{{/minLength}}{{! +}}{{^minLength}}{{#maxLength}} @Size(max={{.}}){{/maxLength}}{{/minLength}}{{! @Size: minItems && maxItems set }}{{#minItems}}{{#maxItems}} @Size(min={{minItems}},max={{maxItems}}){{/maxItems}}{{/minItems}}{{! @Size: minItems set, maxItems not }}{{#minItems}}{{^maxItems}} @Size(min={{minItems}}){{/maxItems}}{{/minItems}}{{! @Size: minItems not set && maxItems set -}}{{^minItems}}{{#maxItems}} @Size(max={{maxItems}}){{/maxItems}}{{/minItems}}{{! +}}{{^minItems}}{{#maxItems}} @Size(max={{.}}){{/maxItems}}{{/minItems}}{{! check for integer or long / all others=decimal type with @Decimal* isInteger set -}}{{#isInteger}}{{#minimum}} @Min({{minimum}}){{/minimum}}{{#maximum}} @Max({{maximum}}){{/maximum}}{{/isInteger}}{{! +}}{{#isInteger}}{{#minimum}} @Min({{.}}){{/minimum}}{{#maximum}} @Max({{.}}){{/maximum}}{{/isInteger}}{{! isLong set -}}{{#isLong}}{{#minimum}} @Min({{minimum}}L){{/minimum}}{{#maximum}} @Max({{maximum}}L){{/maximum}}{{/isLong}}{{! +}}{{#isLong}}{{#minimum}} @Min({{.}}L){{/minimum}}{{#maximum}} @Max({{.}}L){{/maximum}}{{/isLong}}{{! Not Integer, not Long => we have a decimal value! }}{{^isInteger}}{{^isLong}}{{#minimum}} @DecimalMin({{#exclusiveMinimum}}value={{/exclusiveMinimum}}"{{minimum}}"{{#exclusiveMinimum}},inclusive=false{{/exclusiveMinimum}}){{/minimum}}{{#maximum}} @DecimalMax({{#exclusiveMaximum}}value={{/exclusiveMaximum}}"{{maximum}}"{{#exclusiveMaximum}},inclusive=false{{/exclusiveMaximum}}){{/maximum}}{{/isLong}}{{/isInteger}} \ No newline at end of file diff --git a/modules/openapi-generator/src/main/resources/JavaJaxRS/spec/beanValidationHeaderParams.mustache b/modules/openapi-generator/src/main/resources/JavaJaxRS/spec/beanValidationHeaderParams.mustache index f8eef8f94c7bea30e95938e16cc856b53036d82b..c4ff01d7e5526b8718f1385ee9416523e0d1c860 100644 --- a/modules/openapi-generator/src/main/resources/JavaJaxRS/spec/beanValidationHeaderParams.mustache +++ b/modules/openapi-generator/src/main/resources/JavaJaxRS/spec/beanValidationHeaderParams.mustache @@ -1 +1 @@ -{{#required}} @NotNull{{/required}}{{>beanValidationCore}} \ No newline at end of file +{{#required}} @NotNull{{/required}}{{>beanValidationCore}} \ No newline at end of file diff --git a/modules/openapi-generator/src/main/resources/JavaJaxRS/spec/beanValidationQueryParams.mustache b/modules/openapi-generator/src/main/resources/JavaJaxRS/spec/beanValidationQueryParams.mustache index f8eef8f94c7bea30e95938e16cc856b53036d82b..c4ff01d7e5526b8718f1385ee9416523e0d1c860 100644 --- a/modules/openapi-generator/src/main/resources/JavaJaxRS/spec/beanValidationQueryParams.mustache +++ b/modules/openapi-generator/src/main/resources/JavaJaxRS/spec/beanValidationQueryParams.mustache @@ -1 +1 @@ -{{#required}} @NotNull{{/required}}{{>beanValidationCore}} \ No newline at end of file +{{#required}} @NotNull{{/required}}{{>beanValidationCore}} \ No newline at end of file diff --git a/modules/openapi-generator/src/main/resources/JavaJaxRS/spec/cookieParams.mustache b/modules/openapi-generator/src/main/resources/JavaJaxRS/spec/cookieParams.mustache index 71dbe46aba2a226b81873273ca7fcd872ecfe0f1..0d015d6cf68fa8e99e9443896a38f8c75ebfbd43 100644 --- a/modules/openapi-generator/src/main/resources/JavaJaxRS/spec/cookieParams.mustache +++ b/modules/openapi-generator/src/main/resources/JavaJaxRS/spec/cookieParams.mustache @@ -1 +1 @@ -{{#isCookieParam}}@CookieParam("{{baseName}}"){{#useBeanValidation}}{{>beanValidationQueryParams}}{{/useBeanValidation}}{{^isContainer}}{{#defaultValue}} @DefaultValue("{{{defaultValue}}}"){{/defaultValue}}{{/isContainer}} {{#useSwaggerAnnotations}}{{#description}} @ApiParam("{{description}}"){{/description}}{{/useSwaggerAnnotations}} {{{dataType}}} {{paramName}}{{/isCookieParam}} \ No newline at end of file +{{#isCookieParam}}@CookieParam("{{baseName}}"){{#useBeanValidation}}{{>beanValidationQueryParams}}{{/useBeanValidation}}{{^isContainer}}{{#defaultValue}} @DefaultValue("{{{.}}}"){{/defaultValue}}{{/isContainer}} {{#useSwaggerAnnotations}}{{#description}} @ApiParam("{{.}}"){{/description}}{{/useSwaggerAnnotations}} {{{dataType}}} {{paramName}}{{/isCookieParam}} \ No newline at end of file diff --git a/modules/openapi-generator/src/main/resources/JavaJaxRS/spec/enumClass.mustache b/modules/openapi-generator/src/main/resources/JavaJaxRS/spec/enumClass.mustache index 9a4bb71d9d758b2ae8e2dabce919a08f4d4a1379..4b1114571539a08de3f04a74dc41cb695d6e8491 100644 --- a/modules/openapi-generator/src/main/resources/JavaJaxRS/spec/enumClass.mustache +++ b/modules/openapi-generator/src/main/resources/JavaJaxRS/spec/enumClass.mustache @@ -23,7 +23,7 @@ @JsonCreator public static {{datatypeWithEnum}} fromValue({{dataType}} value) { - for ({{#datatypeWithEnum}}{{{.}}}{{/datatypeWithEnum}}{{^datatypeWithEnum}}{{{classname}}}{{/datatypeWithEnum}} b : {{#datatypeWithEnum}}{{{.}}}{{/datatypeWithEnum}}{{^datatypeWithEnum}}{{{classname}}}{{/datatypeWithEnum}}.values()) { + for ({{{datatypeWithEnum}}}{{^datatypeWithEnum}}{{{classname}}}{{/datatypeWithEnum}} b : {{{datatypeWithEnum}}}{{^datatypeWithEnum}}{{{classname}}}{{/datatypeWithEnum}}.values()) { if (b.value.equals(value)) { return b; } diff --git a/modules/openapi-generator/src/main/resources/JavaJaxRS/spec/enumOuterClass.mustache b/modules/openapi-generator/src/main/resources/JavaJaxRS/spec/enumOuterClass.mustache index dd9020ea9b8f6be271864daecde39226a4cdcad4..66f6745ff9fd68464bc326a9dc509eeab2dd443a 100644 --- a/modules/openapi-generator/src/main/resources/JavaJaxRS/spec/enumOuterClass.mustache +++ b/modules/openapi-generator/src/main/resources/JavaJaxRS/spec/enumOuterClass.mustache @@ -4,9 +4,9 @@ import com.fasterxml.jackson.annotation.JsonValue; {{/jackson}} /** - * {{^description}}Gets or Sets {{{name}}}{{/description}}{{#description}}{{description}}{{/description}} + * {{description}}{{^description}}Gets or Sets {{{name}}}{{/description}} */ -{{>additionalEnumTypeAnnotations}}public enum {{#datatypeWithEnum}}{{{.}}}{{/datatypeWithEnum}}{{^datatypeWithEnum}}{{{classname}}}{{/datatypeWithEnum}} { +{{>additionalEnumTypeAnnotations}}public enum {{{datatypeWithEnum}}}{{^datatypeWithEnum}}{{{classname}}}{{/datatypeWithEnum}} { {{#gson}} {{#allowableValues}}{{#enumVars}} @SerializedName({{#isInteger}}"{{/isInteger}}{{#isDouble}}"{{/isDouble}}{{#isLong}}"{{/isLong}}{{#isFloat}}"{{/isFloat}}{{{value}}}{{#isInteger}}"{{/isInteger}}{{#isDouble}}"{{/isDouble}}{{#isLong}}"{{/isLong}}{{#isFloat}}"{{/isFloat}}) @@ -21,7 +21,7 @@ import com.fasterxml.jackson.annotation.JsonValue; private {{{dataType}}} value; - {{#datatypeWithEnum}}{{{.}}}{{/datatypeWithEnum}}{{^datatypeWithEnum}}{{{classname}}}{{/datatypeWithEnum}}({{{dataType}}} value) { + {{{datatypeWithEnum}}}{{^datatypeWithEnum}}{{{classname}}}{{/datatypeWithEnum}}({{{dataType}}} value) { this.value = value; } @@ -32,8 +32,8 @@ import com.fasterxml.jackson.annotation.JsonValue; } @JsonCreator - public static {{#datatypeWithEnum}}{{{.}}}{{/datatypeWithEnum}}{{^datatypeWithEnum}}{{{classname}}}{{/datatypeWithEnum}} fromValue({{{dataType}}} value) { - for ({{#datatypeWithEnum}}{{{.}}}{{/datatypeWithEnum}}{{^datatypeWithEnum}}{{{classname}}}{{/datatypeWithEnum}} b : {{#datatypeWithEnum}}{{{.}}}{{/datatypeWithEnum}}{{^datatypeWithEnum}}{{{classname}}}{{/datatypeWithEnum}}.values()) { + public static {{{datatypeWithEnum}}}{{^datatypeWithEnum}}{{{classname}}}{{/datatypeWithEnum}} fromValue({{{dataType}}} value) { + for ({{{datatypeWithEnum}}}{{^datatypeWithEnum}}{{{classname}}}{{/datatypeWithEnum}} b : {{{datatypeWithEnum}}}{{^datatypeWithEnum}}{{{classname}}}{{/datatypeWithEnum}}.values()) { if (b.value.equals(value)) { return b; } diff --git a/modules/openapi-generator/src/main/resources/JavaJaxRS/spec/headerParams.mustache b/modules/openapi-generator/src/main/resources/JavaJaxRS/spec/headerParams.mustache index 77f98a049344e0cdc82f9adc9731df752beeb519..4f978d3c36b3a434d8dac2a14a9eb0847b342253 100644 --- a/modules/openapi-generator/src/main/resources/JavaJaxRS/spec/headerParams.mustache +++ b/modules/openapi-generator/src/main/resources/JavaJaxRS/spec/headerParams.mustache @@ -1 +1 @@ -{{#isHeaderParam}}@HeaderParam("{{baseName}}"){{#useBeanValidation}}{{>beanValidationHeaderParams}}{{/useBeanValidation}} {{#defaultValue}} @DefaultValue("{{{defaultValue}}}"){{/defaultValue}} {{#useSwaggerAnnotations}}{{#description}} @ApiParam("{{description}}"){{/description}}{{/useSwaggerAnnotations}} {{{dataType}}} {{paramName}}{{/isHeaderParam}} \ No newline at end of file +{{#isHeaderParam}}@HeaderParam("{{baseName}}"){{#useBeanValidation}}{{>beanValidationHeaderParams}}{{/useBeanValidation}} {{#defaultValue}} @DefaultValue("{{{.}}}"){{/defaultValue}} {{#useSwaggerAnnotations}}{{#description}} @ApiParam("{{.}}"){{/description}}{{/useSwaggerAnnotations}} {{{dataType}}} {{paramName}}{{/isHeaderParam}} \ No newline at end of file diff --git a/modules/openapi-generator/src/main/resources/JavaJaxRS/spec/libraries/helidon/README.mustache b/modules/openapi-generator/src/main/resources/JavaJaxRS/spec/libraries/helidon/README.mustache index 1f328b17165efae71485bec4e210065eeb18c381..d7982e6e6a6618e232c962232994af80277f4d09 100644 --- a/modules/openapi-generator/src/main/resources/JavaJaxRS/spec/libraries/helidon/README.mustache +++ b/modules/openapi-generator/src/main/resources/JavaJaxRS/spec/libraries/helidon/README.mustache @@ -5,7 +5,7 @@ This server was generated by the [OpenAPI Generator](https://openapi-generator.t [OpenAPI-Spec](https://openapis.org), you can easily generate a server stub. This is an example of building a OpenAPI-enabled JAX-RS server. -This example uses the [JAX-RS](https://jax-rs-spec.java.net/) framework and +This example uses the [JAX-RS](https://jax-rs-spec.java.net/) framework and the [Eclipse-MicroProfile-OpenAPI](https://github.com/eclipse/microprofile-open-api) addition. The pom file is configured to use [Helidon](https://helidon.io/) as application server. diff --git a/modules/openapi-generator/src/main/resources/JavaJaxRS/spec/libraries/openliberty/MANIFEST.MF.mustache b/modules/openapi-generator/src/main/resources/JavaJaxRS/spec/libraries/openliberty/MANIFEST.MF.mustache index e3c07ab38a4ee37d3a50a2c4d4878b2b43f7941e..65b9fe16a698af7b7e2b58ca4bdb62168c23a9b3 100644 --- a/modules/openapi-generator/src/main/resources/JavaJaxRS/spec/libraries/openliberty/MANIFEST.MF.mustache +++ b/modules/openapi-generator/src/main/resources/JavaJaxRS/spec/libraries/openliberty/MANIFEST.MF.mustache @@ -1,2 +1,2 @@ Manifest-Version: 1.0 -Class-Path: +Class-Path: diff --git a/modules/openapi-generator/src/main/resources/JavaJaxRS/spec/libraries/openliberty/README.mustache b/modules/openapi-generator/src/main/resources/JavaJaxRS/spec/libraries/openliberty/README.mustache index f3389b0ef0375bc9460e9c8dac56d1afb5dc5104..21a76d827106bfa98a45ed3b3954578c85a8b5d6 100644 --- a/modules/openapi-generator/src/main/resources/JavaJaxRS/spec/libraries/openliberty/README.mustache +++ b/modules/openapi-generator/src/main/resources/JavaJaxRS/spec/libraries/openliberty/README.mustache @@ -5,7 +5,7 @@ This server was generated by the [OpenAPI Generator](https://openapi-generator.t [OpenAPI-Spec](https://openapis.org), you can easily generate a server stub. This is an example of building a OpenAPI-enabled JAX-RS server. -This example uses the [JAX-RS](https://jax-rs-spec.java.net/) framework and +This example uses the [JAX-RS](https://jax-rs-spec.java.net/) framework and the [Eclipse-MicroProfile-OpenAPI](https://github.com/eclipse/microprofile-open-api) addition. The pom file is configured to use [Open Liberty](https://openliberty.io/) as application server. diff --git a/modules/openapi-generator/src/main/resources/JavaJaxRS/spec/libraries/openliberty/server.xml.mustache b/modules/openapi-generator/src/main/resources/JavaJaxRS/spec/libraries/openliberty/server.xml.mustache index 176088c512db03a31dfb94f962614b9502316754..d765cfbdc77f6bd37a26fd74090637e90a4888f7 100644 --- a/modules/openapi-generator/src/main/resources/JavaJaxRS/spec/libraries/openliberty/server.xml.mustache +++ b/modules/openapi-generator/src/main/resources/JavaJaxRS/spec/libraries/openliberty/server.xml.mustache @@ -10,10 +10,10 @@ <keyStore id="defaultKeyStore" password="mpKeystore"/> <logging traceSpecification="com.ibm.ws.microprofile.health.*=all"/> - + <!-- To access this server from a remote client add a host attribute to the following element, e.g. host="*" --> <httpEndpoint host="*" httpPort="9080" httpsPort="9443" id="defaultHttpEndpoint"/> - + <webApplication id="{{artifactId}}" location="{{artifactId}}.war" name="{{artifactId}}" contextRoot="/"/> </server> \ No newline at end of file diff --git a/modules/openapi-generator/src/main/resources/JavaJaxRS/spec/libraries/quarkus/README.mustache b/modules/openapi-generator/src/main/resources/JavaJaxRS/spec/libraries/quarkus/README.mustache index 90433afce82b80d7623292da6904729474bcdfe9..6c5ef2f11dd076b86dc9be08cb7def27dd1edbe9 100644 --- a/modules/openapi-generator/src/main/resources/JavaJaxRS/spec/libraries/quarkus/README.mustache +++ b/modules/openapi-generator/src/main/resources/JavaJaxRS/spec/libraries/quarkus/README.mustache @@ -5,7 +5,7 @@ This server was generated by the [OpenAPI Generator](https://openapi-generator.t [OpenAPI-Spec](https://openapis.org), you can easily generate a server stub. This is an example of building a OpenAPI-enabled JAX-RS server. -This example uses the [JAX-RS](https://jax-rs-spec.java.net/) framework and +This example uses the [JAX-RS](https://jax-rs-spec.java.net/) framework and the [Eclipse-MicroProfile-OpenAPI](https://github.com/eclipse/microprofile-open-api) addition. The pom file is configured to use [Quarkus](https://quarkus.io/) as application server. diff --git a/modules/openapi-generator/src/main/resources/JavaJaxRS/spec/libraries/thorntail/README.mustache b/modules/openapi-generator/src/main/resources/JavaJaxRS/spec/libraries/thorntail/README.mustache index 64d4830d4b8bd1721f0b90d9ede14daaa0841051..66e31f3b0c7afab37c0939afad67a592e61fe125 100644 --- a/modules/openapi-generator/src/main/resources/JavaJaxRS/spec/libraries/thorntail/README.mustache +++ b/modules/openapi-generator/src/main/resources/JavaJaxRS/spec/libraries/thorntail/README.mustache @@ -5,7 +5,7 @@ This server was generated by the [OpenAPI Generator](https://openapi-generator.t [OpenAPI-Spec](https://openapis.org), you can easily generate a server stub. This is an example of building a OpenAPI-enabled JAX-RS server. -This example uses the [JAX-RS](https://jax-rs-spec.java.net/) framework and +This example uses the [JAX-RS](https://jax-rs-spec.java.net/) framework and the [Eclipse-MicroProfile-OpenAPI](https://github.com/eclipse/microprofile-open-api) addition. The pom file is configured to use [Thorntail](https://thorntail.io) as application server. diff --git a/modules/openapi-generator/src/main/resources/JavaJaxRS/spec/pathParams.mustache b/modules/openapi-generator/src/main/resources/JavaJaxRS/spec/pathParams.mustache index 5c3d731f8388ef1c9686325f3736c915ae840cc1..922e107830ca6ea8f873e55fc57d696ec17a05a8 100644 --- a/modules/openapi-generator/src/main/resources/JavaJaxRS/spec/pathParams.mustache +++ b/modules/openapi-generator/src/main/resources/JavaJaxRS/spec/pathParams.mustache @@ -1 +1 @@ -{{#isPathParam}}@PathParam("{{baseName}}"){{#useBeanValidation}}{{>beanValidationPathParams}}{{/useBeanValidation}}{{#useSwaggerAnnotations}}{{#description}} @ApiParam("{{description}}"){{/description}}{{/useSwaggerAnnotations}} {{{dataType}}} {{paramName}}{{/isPathParam}} \ No newline at end of file +{{#isPathParam}}@PathParam("{{baseName}}"){{#useBeanValidation}}{{>beanValidationPathParams}}{{/useBeanValidation}}{{#useSwaggerAnnotations}}{{#description}} @ApiParam("{{.}}"){{/description}}{{/useSwaggerAnnotations}} {{{dataType}}} {{paramName}}{{/isPathParam}} \ No newline at end of file diff --git a/modules/openapi-generator/src/main/resources/JavaJaxRS/spec/pojo.mustache b/modules/openapi-generator/src/main/resources/JavaJaxRS/spec/pojo.mustache index 90430584ba7c1f8137d2f197be0abd975ebbe407..5e008a5de884d32be31c5b4dec53709f0d6b7ea3 100644 --- a/modules/openapi-generator/src/main/resources/JavaJaxRS/spec/pojo.mustache +++ b/modules/openapi-generator/src/main/resources/JavaJaxRS/spec/pojo.mustache @@ -7,26 +7,26 @@ import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonValue; {{#discriminator}}{{>typeInfoAnnotation}}{{/discriminator}}{{#description}}/** - * {{description}} + * {{.}} **/{{/description}} -{{#useSwaggerAnnotations}}{{#description}}@ApiModel(description = "{{{description}}}"){{/description}}{{/useSwaggerAnnotations}} -{{>generatedAnnotation}}{{>additionalModelTypeAnnotations}}public class {{classname}} {{#parent}}extends {{{parent}}}{{/parent}} {{#serializableModel}}implements Serializable{{/serializableModel}} { +{{#useSwaggerAnnotations}}{{#description}}@ApiModel(description = "{{{.}}}"){{/description}}{{/useSwaggerAnnotations}} +{{>generatedAnnotation}}{{>additionalModelTypeAnnotations}}public class {{classname}} {{#parent}}extends {{{.}}}{{/parent}} {{#serializableModel}}implements Serializable{{/serializableModel}} { {{#vars}}{{#isEnum}}{{^isContainer}} {{>enumClass}}{{/isContainer}}{{#isContainer}}{{#mostInnerItems}} - + {{>enumClass}}{{/mostInnerItems}}{{/isContainer}}{{/isEnum}} private {{#useBeanValidation}}@Valid {{/useBeanValidation}}{{{datatypeWithEnum}}} {{name}}{{#defaultValue}} = {{{.}}}{{/defaultValue}};{{/vars}} {{#vars}}/** {{#description}} - * {{description}} + * {{.}} {{/description}} {{#minimum}} - * minimum: {{minimum}} + * minimum: {{.}} {{/minimum}} {{#maximum}} - * maximum: {{maximum}} + * maximum: {{.}} {{/maximum}} **/ public {{classname}} {{name}}({{{datatypeWithEnum}}} {{name}}) { @@ -41,7 +41,7 @@ import com.fasterxml.jackson.annotation.JsonValue; }{{/generateBuilders}} {{#vendorExtensions.x-extra-annotation}}{{{vendorExtensions.x-extra-annotation}}}{{/vendorExtensions.x-extra-annotation}}{{#useSwaggerAnnotations}} - @ApiModelProperty({{#example}}example = "{{{example}}}", {{/example}}{{#required}}required = {{required}}, {{/required}}value = "{{{description}}}"){{/useSwaggerAnnotations}} + @ApiModelProperty({{#example}}example = "{{{.}}}", {{/example}}{{#required}}required = {{required}}, {{/required}}value = "{{{description}}}"){{/useSwaggerAnnotations}} @JsonProperty("{{baseName}}") {{#useBeanValidation}}{{>beanValidation}}{{/useBeanValidation}} public {{{datatypeWithEnum}}} {{getter}}() { return {{name}}; @@ -143,13 +143,13 @@ import com.fasterxml.jackson.annotation.JsonValue; {{#vars}} /** {{#description}} - * {{description}} + * {{.}} {{/description}} {{#minimum}} - * minimum: {{minimum}} + * minimum: {{.}} {{/minimum}} {{#maximum}} - * maximum: {{maximum}} + * maximum: {{.}} {{/maximum}} **/ public Builder {{name}}({{{datatypeWithEnum}}} {{name}}) { diff --git a/modules/openapi-generator/src/main/resources/JavaJaxRS/spec/queryParams.mustache b/modules/openapi-generator/src/main/resources/JavaJaxRS/spec/queryParams.mustache index 198098046c021161fc230963917e730aac4f7363..31ea97fd35076990f66c64894d9b80cbe1c35094 100644 --- a/modules/openapi-generator/src/main/resources/JavaJaxRS/spec/queryParams.mustache +++ b/modules/openapi-generator/src/main/resources/JavaJaxRS/spec/queryParams.mustache @@ -1 +1 @@ -{{#isQueryParam}}@QueryParam("{{baseName}}"){{#useBeanValidation}}{{>beanValidationQueryParams}}{{/useBeanValidation}}{{^isContainer}}{{#defaultValue}} @DefaultValue("{{{defaultValue}}}"){{/defaultValue}}{{/isContainer}} {{#useSwaggerAnnotations}}{{#description}} @ApiParam("{{description}}"){{/description}}{{/useSwaggerAnnotations}} {{{dataType}}} {{paramName}}{{/isQueryParam}} \ No newline at end of file +{{#isQueryParam}}@QueryParam("{{baseName}}"){{#useBeanValidation}}{{>beanValidationQueryParams}}{{/useBeanValidation}}{{^isContainer}}{{#defaultValue}} @DefaultValue("{{{.}}}"){{/defaultValue}}{{/isContainer}} {{#useSwaggerAnnotations}}{{#description}} @ApiParam("{{.}}"){{/description}}{{/useSwaggerAnnotations}} {{{dataType}}} {{paramName}}{{/isQueryParam}} \ No newline at end of file diff --git a/modules/openapi-generator/src/main/resources/JavaPlayFramework/beanValidation.mustache b/modules/openapi-generator/src/main/resources/JavaPlayFramework/beanValidation.mustache index 978069fbeecb7683d8a8bdda4ad7e541005c6c2b..2e510dc091b1d3937476aadeb730f6e0093bd3e6 100644 --- a/modules/openapi-generator/src/main/resources/JavaPlayFramework/beanValidation.mustache +++ b/modules/openapi-generator/src/main/resources/JavaPlayFramework/beanValidation.mustache @@ -2,7 +2,7 @@ @NotNull {{/required}} {{#pattern}} -@Pattern(regexp="{{{pattern}}}") +@Pattern(regexp="{{{.}}}") {{/pattern}} {{#minLength}} {{#maxLength}} @@ -16,7 +16,7 @@ {{/minLength}} {{^minLength}} {{#maxLength}} -@Size(max={{maxLength}}) +@Size(max={{.}}) {{/maxLength}} {{/minLength}} {{#minItems}} @@ -31,24 +31,24 @@ {{/minItems}} {{^minItems}} {{#maxItems}} -@Size(max={{maxItems}}) +@Size(max={{.}}) {{/maxItems}} {{/minItems}} {{! check for integer / number=decimal type}} {{#isInteger}} {{#minimum}} -@Min({{minimum}}) +@Min({{.}}) {{/minimum}} {{#maximum}} -@Max({{maximum}}) +@Max({{.}}) {{/maximum}} {{/isInteger}} {{^isInteger}} {{#minimum}} -@DecimalMin("{{minimum}}") +@DecimalMin("{{.}}") {{/minimum}} {{#maximum}} -@DecimalMax("{{maximum}}") +@DecimalMax("{{.}}") {{/maximum}} {{/isInteger}} {{^isPrimitiveType}} diff --git a/modules/openapi-generator/src/main/resources/JavaPlayFramework/beanValidationCore.mustache b/modules/openapi-generator/src/main/resources/JavaPlayFramework/beanValidationCore.mustache index cf3c47f906e71e51ae2c08af0994a1f592351f10..56f6eb83669e1aa8f3214053c3ac651342381e3c 100644 --- a/modules/openapi-generator/src/main/resources/JavaPlayFramework/beanValidationCore.mustache +++ b/modules/openapi-generator/src/main/resources/JavaPlayFramework/beanValidationCore.mustache @@ -1 +1 @@ -{{#pattern}}{{^isByteArray}} @Pattern(regexp="{{{pattern}}}"){{/isByteArray}}{{/pattern}}{{#minLength}}{{#maxLength}} @Size(min={{minLength}},max={{maxLength}}){{/maxLength}}{{/minLength}}{{#minLength}}{{^maxLength}} @Size(min={{minLength}}){{/maxLength}}{{/minLength}}{{^minLength}}{{#maxLength}} @Size(max={{maxLength}}){{/maxLength}}{{/minLength}}{{#minItems}}{{#maxItems}} @Size(min={{minItems}},max={{maxItems}}){{/maxItems}}{{/minItems}}{{#minItems}}{{^maxItems}} @Size(min={{minItems}}){{/maxItems}}{{/minItems}}{{^minItems}}{{#maxItems}} @Size(max={{maxItems}}){{/maxItems}}{{/minItems}}{{#minimum}} @Min({{minimum}}){{/minimum}}{{#maximum}} @Max({{maximum}}){{/maximum}} \ No newline at end of file +{{#pattern}}{{^isByteArray}} @Pattern(regexp="{{{pattern}}}"){{/isByteArray}}{{/pattern}}{{#minLength}}{{#maxLength}} @Size(min={{minLength}},max={{maxLength}}){{/maxLength}}{{/minLength}}{{#minLength}}{{^maxLength}} @Size(min={{minLength}}){{/maxLength}}{{/minLength}}{{^minLength}}{{#maxLength}} @Size(max={{.}}){{/maxLength}}{{/minLength}}{{#minItems}}{{#maxItems}} @Size(min={{minItems}},max={{maxItems}}){{/maxItems}}{{/minItems}}{{#minItems}}{{^maxItems}} @Size(min={{minItems}}){{/maxItems}}{{/minItems}}{{^minItems}}{{#maxItems}} @Size(max={{.}}){{/maxItems}}{{/minItems}}{{#minimum}} @Min({{.}}){{/minimum}}{{#maximum}} @Max({{.}}){{/maximum}} \ No newline at end of file diff --git a/modules/openapi-generator/src/main/resources/JavaPlayFramework/conversionBegin.mustache b/modules/openapi-generator/src/main/resources/JavaPlayFramework/conversionBegin.mustache index 199542872028f1524dc8e8b1a89d3f437af252a9..a8239f5868cac99a7329ea076f9fb71b3ee2230e 100644 --- a/modules/openapi-generator/src/main/resources/JavaPlayFramework/conversionBegin.mustache +++ b/modules/openapi-generator/src/main/resources/JavaPlayFramework/conversionBegin.mustache @@ -1 +1 @@ -{{#isBoolean}}Boolean.valueOf({{/isBoolean}}{{#isInteger}}Integer.parseInt({{/isInteger}}{{#isDouble}}Double.parseDouble({{/isDouble}}{{#isLong}}Long.parseLong({{/isLong}}{{#isFloat}}Float.parseFloat({{/isFloat}}{{#isUuid}}UUID.fromString({{/isUuid}}{{#isDateTime}}OffsetDateTime.parse({{/isDateTime}}{{#isDate}}LocalDate.parse({{/isDate}}{{#isByteArray}}{{/isByteArray}}{{#isNumber}}new BigDecimal({{/isNumber}} \ No newline at end of file +{{#isBoolean}}Boolean.valueOf({{/isBoolean}}{{#isInteger}}Integer.parseInt({{/isInteger}}{{#isDouble}}Double.parseDouble({{/isDouble}}{{#isLong}}Long.parseLong({{/isLong}}{{#isFloat}}Float.parseFloat({{/isFloat}}{{#isUuid}}UUID.fromString({{/isUuid}}{{#isDateTime}}OffsetDateTime.parse({{/isDateTime}}{{#isDate}}LocalDate.parse({{/isDate}}{{#isNumber}}new BigDecimal({{/isNumber}} \ No newline at end of file diff --git a/modules/openapi-generator/src/main/resources/JavaPlayFramework/enumClass.mustache b/modules/openapi-generator/src/main/resources/JavaPlayFramework/enumClass.mustache index 0e53213ed49ceb5ba1bcfa608d52e57e0e12b484..6afccd29a237adfb80e0c7c6c61a25e7bff6a8b2 100644 --- a/modules/openapi-generator/src/main/resources/JavaPlayFramework/enumClass.mustache +++ b/modules/openapi-generator/src/main/resources/JavaPlayFramework/enumClass.mustache @@ -1,7 +1,7 @@ /** - * {{^description}}Gets or Sets {{{name}}}{{/description}}{{#description}}{{{description}}}{{/description}} + * {{^description}}Gets or Sets {{{name}}}{{/description}}{{{description}}} */ - {{>additionalEnumTypeAnnotations}}public enum {{#datatypeWithEnum}}{{{.}}}{{/datatypeWithEnum}}{{^datatypeWithEnum}}{{classname}}{{/datatypeWithEnum}} { + {{>additionalEnumTypeAnnotations}}public enum {{{datatypeWithEnum}}}{{^datatypeWithEnum}}{{classname}}{{/datatypeWithEnum}} { {{#gson}} {{#allowableValues}} {{#enumVars}} @@ -22,7 +22,7 @@ private final {{{dataType}}} value; - {{#datatypeWithEnum}}{{{.}}}{{/datatypeWithEnum}}{{^datatypeWithEnum}}{{classname}}{{/datatypeWithEnum}}({{{dataType}}} value) { + {{{datatypeWithEnum}}}{{^datatypeWithEnum}}{{classname}}{{/datatypeWithEnum}}({{{dataType}}} value) { this.value = value; } @@ -33,8 +33,8 @@ } @JsonCreator - public static {{#datatypeWithEnum}}{{{.}}}{{/datatypeWithEnum}}{{^datatypeWithEnum}}{{{classname}}}{{/datatypeWithEnum}} fromValue({{{dataType}}} value) { - for ({{#datatypeWithEnum}}{{{.}}}{{/datatypeWithEnum}}{{^datatypeWithEnum}}{{{classname}}}{{/datatypeWithEnum}} b : {{#datatypeWithEnum}}{{{.}}}{{/datatypeWithEnum}}{{^datatypeWithEnum}}{{{classname}}}{{/datatypeWithEnum}}.values()) { + public static {{{datatypeWithEnum}}}{{^datatypeWithEnum}}{{{classname}}}{{/datatypeWithEnum}} fromValue({{{dataType}}} value) { + for ({{{datatypeWithEnum}}}{{^datatypeWithEnum}}{{{classname}}}{{/datatypeWithEnum}} b : {{{datatypeWithEnum}}}{{^datatypeWithEnum}}{{{classname}}}{{/datatypeWithEnum}}.values()) { if (b.value.equals(value)) { return b; } diff --git a/modules/openapi-generator/src/main/resources/JavaPlayFramework/enumOuterClass.mustache b/modules/openapi-generator/src/main/resources/JavaPlayFramework/enumOuterClass.mustache index 29e50e1b428d417563a8c6ba4b22fc36221bed65..9ffcc2ddcac738dfc32bcf679893bd4e0b73234b 100644 --- a/modules/openapi-generator/src/main/resources/JavaPlayFramework/enumOuterClass.mustache +++ b/modules/openapi-generator/src/main/resources/JavaPlayFramework/enumOuterClass.mustache @@ -3,9 +3,9 @@ import com.fasterxml.jackson.annotation.JsonCreator; {{/jackson}} /** - * {{^description}}Gets or Sets {{{name}}}{{/description}}{{#description}}{{{description}}}{{/description}} + * {{^description}}Gets or Sets {{{name}}}{{/description}}{{{description}}} */ -{{>additionalEnumTypeAnnotations}}public enum {{#datatypeWithEnum}}{{{.}}}{{/datatypeWithEnum}}{{^datatypeWithEnum}}{{{classname}}}{{/datatypeWithEnum}} { +{{>additionalEnumTypeAnnotations}}public enum {{{datatypeWithEnum}}}{{^datatypeWithEnum}}{{{classname}}}{{/datatypeWithEnum}} { {{#gson}} {{#allowableValues}}{{#enumVars}} @SerializedName({{#isInteger}}"{{/isInteger}}{{#isDouble}}"{{/isDouble}}{{#isLong}}"{{/isLong}}{{#isFloat}}"{{/isFloat}}{{{value}}}{{#isInteger}}"{{/isInteger}}{{#isDouble}}"{{/isDouble}}{{#isLong}}"{{/isLong}}{{#isFloat}}"{{/isFloat}}) @@ -20,7 +20,7 @@ import com.fasterxml.jackson.annotation.JsonCreator; private final {{{dataType}}} value; - {{#datatypeWithEnum}}{{{.}}}{{/datatypeWithEnum}}{{^datatypeWithEnum}}{{{classname}}}{{/datatypeWithEnum}}({{{dataType}}} value) { + {{{datatypeWithEnum}}}{{^datatypeWithEnum}}{{{classname}}}{{/datatypeWithEnum}}({{{dataType}}} value) { this.value = value; } @@ -31,8 +31,8 @@ import com.fasterxml.jackson.annotation.JsonCreator; } @JsonCreator - public static {{#datatypeWithEnum}}{{{.}}}{{/datatypeWithEnum}}{{^datatypeWithEnum}}{{{classname}}}{{/datatypeWithEnum}} fromValue({{{dataType}}} value) { - for ({{#datatypeWithEnum}}{{{.}}}{{/datatypeWithEnum}}{{^datatypeWithEnum}}{{{classname}}}{{/datatypeWithEnum}} b : {{#datatypeWithEnum}}{{{.}}}{{/datatypeWithEnum}}{{^datatypeWithEnum}}{{{classname}}}{{/datatypeWithEnum}}.values()) { + public static {{{datatypeWithEnum}}}{{^datatypeWithEnum}}{{{classname}}}{{/datatypeWithEnum}} fromValue({{{dataType}}} value) { + for ({{{datatypeWithEnum}}}{{^datatypeWithEnum}}{{{classname}}}{{/datatypeWithEnum}} b : {{{datatypeWithEnum}}}{{^datatypeWithEnum}}{{{classname}}}{{/datatypeWithEnum}}.values()) { if (b.value.equals(value)) { return b; } diff --git a/modules/openapi-generator/src/main/resources/JavaPlayFramework/itemConversionBegin.mustache b/modules/openapi-generator/src/main/resources/JavaPlayFramework/itemConversionBegin.mustache index 42b024ec34072927f07a6cb565415477809040d1..83ec7d22210cc871ca10322f7ef99a2c2f2ca573 100644 --- a/modules/openapi-generator/src/main/resources/JavaPlayFramework/itemConversionBegin.mustache +++ b/modules/openapi-generator/src/main/resources/JavaPlayFramework/itemConversionBegin.mustache @@ -1 +1 @@ -{{#items.isBoolean}}Boolean.valueOf({{/items.isBoolean}}{{#items.isInteger}}Integer.parseInt({{/items.isInteger}}{{#items.isDouble}}Double.parseDouble({{/items.isDouble}}{{#items.isLong}}Long.parseLong({{/items.isLong}}{{#items.isFloat}}Float.parseFloat({{/items.isFloat}}{{#items.isUuid}}UUID.fromString({{/items.isUuid}}{{#items.isDateTime}}OffsetDateTime.parse({{/items.isDateTime}}{{#items.isDate}}LocalDate.parse({{/items.isDate}}{{#isByteArray}}{{/isByteArray}}{{#isNumber}}new BigDecimal({{/isNumber}} \ No newline at end of file +{{#items.isBoolean}}Boolean.valueOf({{/items.isBoolean}}{{#items.isInteger}}Integer.parseInt({{/items.isInteger}}{{#items.isDouble}}Double.parseDouble({{/items.isDouble}}{{#items.isLong}}Long.parseLong({{/items.isLong}}{{#items.isFloat}}Float.parseFloat({{/items.isFloat}}{{#items.isUuid}}UUID.fromString({{/items.isUuid}}{{#items.isDateTime}}OffsetDateTime.parse({{/items.isDateTime}}{{#items.isDate}}LocalDate.parse({{/items.isDate}}{{#isNumber}}new BigDecimal({{/isNumber}} \ No newline at end of file diff --git a/modules/openapi-generator/src/main/resources/JavaPlayFramework/pojo.mustache b/modules/openapi-generator/src/main/resources/JavaPlayFramework/pojo.mustache index d25b2b8be695d9e175e5df369ab880465cbdb15d..f96ed1ee9a4d438d4330fe27691f80976fa57e5e 100644 --- a/modules/openapi-generator/src/main/resources/JavaPlayFramework/pojo.mustache +++ b/modules/openapi-generator/src/main/resources/JavaPlayFramework/pojo.mustache @@ -3,11 +3,11 @@ import java.util.Objects; import javax.validation.constraints.*; {{/useBeanValidation}} /** - * {{#description}}{{.}}{{/description}}{{^description}}{{classname}}{{/description}} + * {{description}}{{^description}}{{classname}}{{/description}} */ {{>additionalModelTypeAnnotations}}{{>generatedAnnotation}} @SuppressWarnings({"UnusedReturnValue", "WeakerAccess"}) -public class {{classname}} {{#parent}}extends {{{parent}}}{{/parent}} {{#serializableModel}}implements Serializable{{/serializableModel}} { +public class {{classname}} {{#parent}}extends {{{.}}}{{/parent}} {{#serializableModel}}implements Serializable{{/serializableModel}} { {{#vars}} {{#isEnum}} {{^isContainer}} @@ -15,7 +15,7 @@ public class {{classname}} {{#parent}}extends {{{parent}}}{{/parent}} {{#seriali {{/isContainer}} {{#isContainer}} {{#mostInnerItems}} -{{>enumClass}} +{{>enumClass}} {{/mostInnerItems}} {{/isContainer}} {{/isEnum}} @@ -71,16 +71,16 @@ public class {{classname}} {{#parent}}extends {{{parent}}}{{/parent}} {{#seriali /** {{#description}} - * {{{description}}} + * {{{.}}} {{/description}} {{^description}} * Get {{name}} {{/description}} {{#minimum}} - * minimum: {{minimum}} + * minimum: {{.}} {{/minimum}} {{#maximum}} - * maximum: {{maximum}} + * maximum: {{.}} {{/maximum}} * @return {{name}} **/ diff --git a/modules/openapi-generator/src/main/resources/JavaSpring/api.mustache b/modules/openapi-generator/src/main/resources/JavaSpring/api.mustache index 5a9522ffcfd0b77ba2f321cce6b55f6932334126..ecf4ad39ba67055f9023d6cfa4624a04deb0fa6b 100644 --- a/modules/openapi-generator/src/main/resources/JavaSpring/api.mustache +++ b/modules/openapi-generator/src/main/resources/JavaSpring/api.mustache @@ -102,14 +102,14 @@ public interface {{classname}} { {{#virtualService}} @ApiVirtual {{/virtualService}} - @ApiOperation(value = "{{{summary}}}", nickname = "{{{operationId}}}", notes = "{{{notes}}}"{{#returnBaseType}}, response = {{{returnBaseType}}}.class{{/returnBaseType}}{{#returnContainer}}, responseContainer = "{{{returnContainer}}}"{{/returnContainer}}{{#hasAuthMethods}}, authorizations = { + @ApiOperation(value = "{{{summary}}}", nickname = "{{{operationId}}}", notes = "{{{notes}}}"{{#returnBaseType}}, response = {{{.}}}.class{{/returnBaseType}}{{#returnContainer}}, responseContainer = "{{{.}}}"{{/returnContainer}}{{#hasAuthMethods}}, authorizations = { {{#authMethods}}{{#isOAuth}}@Authorization(value = "{{name}}", scopes = { {{#scopes}}@AuthorizationScope(scope = "{{scope}}", description = "{{description}}"){{^-last}}, {{/-last}}{{/scopes}} }){{^-last}},{{/-last}}{{/isOAuth}} {{^isOAuth}}@Authorization(value = "{{name}}"){{^-last}},{{/-last}} {{/isOAuth}}{{/authMethods}} }{{/hasAuthMethods}}, tags={ {{#vendorExtensions.x-tags}}"{{tag}}",{{/vendorExtensions.x-tags}} }) @ApiResponses(value = { {{#responses}} - @ApiResponse(code = {{{code}}}, message = "{{{message}}}"{{#baseType}}, response = {{{baseType}}}.class{{/baseType}}{{#containerType}}, responseContainer = "{{{containerType}}}"{{/containerType}}){{^-last}},{{/-last}}{{/responses}} }) + @ApiResponse(code = {{{code}}}, message = "{{{message}}}"{{#baseType}}, response = {{{.}}}.class{{/baseType}}{{#containerType}}, responseContainer = "{{{.}}}"{{/containerType}}){{^-last}},{{/-last}}{{/responses}} }) {{#implicitHeaders}} @ApiImplicitParams({ {{#headerParams}} diff --git a/modules/openapi-generator/src/main/resources/JavaSpring/beanValidationCore.mustache b/modules/openapi-generator/src/main/resources/JavaSpring/beanValidationCore.mustache index cc394980f786bb5e4e186524e2dcb2ed34231f9f..c7331c0cfe5e3370e53b9f97a2f40276226c648f 100644 --- a/modules/openapi-generator/src/main/resources/JavaSpring/beanValidationCore.mustache +++ b/modules/openapi-generator/src/main/resources/JavaSpring/beanValidationCore.mustache @@ -4,21 +4,21 @@ minLength && maxLength set minLength set, maxLength not }}{{#minLength}}{{^maxLength}}@Size(min={{minLength}}) {{/maxLength}}{{/minLength}}{{! minLength not set, maxLength set -}}{{^minLength}}{{#maxLength}}@Size(max={{maxLength}}) {{/maxLength}}{{/minLength}}{{! +}}{{^minLength}}{{#maxLength}}@Size(max={{.}}) {{/maxLength}}{{/minLength}}{{! @Size: minItems && maxItems set }}{{#minItems}}{{#maxItems}}@Size(min={{minItems}},max={{maxItems}}) {{/maxItems}}{{/minItems}}{{! @Size: minItems set, maxItems not }}{{#minItems}}{{^maxItems}}@Size(min={{minItems}}) {{/maxItems}}{{/minItems}}{{! @Size: minItems not set && maxItems set -}}{{^minItems}}{{#maxItems}}@Size(max={{maxItems}}) {{/maxItems}}{{/minItems}}{{! +}}{{^minItems}}{{#maxItems}}@Size(max={{.}}) {{/maxItems}}{{/minItems}}{{! @Email: useBeanValidation set && isEmail && java8 set }}{{#useBeanValidation}}{{#isEmail}}{{#java8}}@javax.validation.constraints.Email{{/java8}}{{/isEmail}}{{/useBeanValidation}}{{! @Email: performBeanValidation set && isEmail && not java8 set }}{{#performBeanValidation}}{{#isEmail}}{{^java8}}@org.hibernate.validator.constraints.Email{{/java8}}{{/isEmail}}{{/performBeanValidation}}{{! check for integer or long / all others=decimal type with @Decimal* isInteger set -}}{{#isInteger}}{{#minimum}}@Min({{minimum}}){{/minimum}}{{#maximum}} @Max({{maximum}}) {{/maximum}}{{/isInteger}}{{! +}}{{#isInteger}}{{#minimum}}@Min({{.}}){{/minimum}}{{#maximum}} @Max({{.}}) {{/maximum}}{{/isInteger}}{{! isLong set -}}{{#isLong}}{{#minimum}}@Min({{minimum}}L){{/minimum}}{{#maximum}} @Max({{maximum}}L) {{/maximum}}{{/isLong}}{{! +}}{{#isLong}}{{#minimum}}@Min({{.}}L){{/minimum}}{{#maximum}} @Max({{.}}L) {{/maximum}}{{/isLong}}{{! Not Integer, not Long => we have a decimal value! }}{{^isInteger}}{{^isLong}}{{#minimum}}@DecimalMin({{#exclusiveMinimum}}value={{/exclusiveMinimum}}"{{minimum}}"{{#exclusiveMinimum}},inclusive=false{{/exclusiveMinimum}}){{/minimum}}{{#maximum}} @DecimalMax({{#exclusiveMaximum}}value={{/exclusiveMaximum}}"{{maximum}}"{{#exclusiveMaximum}},inclusive=false{{/exclusiveMaximum}}) {{/maximum}}{{/isLong}}{{/isInteger}} \ No newline at end of file diff --git a/modules/openapi-generator/src/main/resources/JavaSpring/bodyParams.mustache b/modules/openapi-generator/src/main/resources/JavaSpring/bodyParams.mustache index 83780c73ae318401cc15d0428f0a3853565efae8..a7352af18097c18c7c5c94d6b85fce7288ff629c 100644 --- a/modules/openapi-generator/src/main/resources/JavaSpring/bodyParams.mustache +++ b/modules/openapi-generator/src/main/resources/JavaSpring/bodyParams.mustache @@ -1 +1 @@ -{{#isBodyParam}}@ApiParam(value = "{{{description}}}" {{#required}},required=true{{/required}} {{^isContainer}}{{#allowableValues}}, allowableValues="{{{allowableValues}}}"{{/allowableValues}}{{#defaultValue}}, defaultValue="{{{defaultValue}}}"{{/defaultValue}}{{/isContainer}}) {{#useBeanValidation}}@Valid{{/useBeanValidation}} @RequestBody{{^required}}(required = false){{/required}} {{^reactive}}{{{dataType}}}{{/reactive}}{{#reactive}}{{^isArray}}Mono<{{{dataType}}}>{{/isArray}}{{#isArray}}Flux<{{{baseType}}}>{{/isArray}}{{/reactive}} {{paramName}}{{/isBodyParam}} \ No newline at end of file +{{#isBodyParam}}@ApiParam(value = "{{{description}}}" {{#required}},required=true{{/required}} {{^isContainer}}{{#allowableValues}}, allowableValues="{{{.}}}"{{/allowableValues}}{{#defaultValue}}, defaultValue="{{{.}}}"{{/defaultValue}}{{/isContainer}}) {{#useBeanValidation}}@Valid{{/useBeanValidation}} @RequestBody{{^required}}(required = false){{/required}} {{^reactive}}{{{dataType}}}{{/reactive}}{{#reactive}}{{^isArray}}Mono<{{{dataType}}}>{{/isArray}}{{#isArray}}Flux<{{{baseType}}}>{{/isArray}}{{/reactive}} {{paramName}}{{/isBodyParam}} \ No newline at end of file diff --git a/modules/openapi-generator/src/main/resources/JavaSpring/cookieParams.mustache b/modules/openapi-generator/src/main/resources/JavaSpring/cookieParams.mustache index e21bd9ff4bfbc0b54f7fd13870162bef3bbb0938..93759b0f3129a3e51b7ec59e8ea5fd2ccb4a27e5 100644 --- a/modules/openapi-generator/src/main/resources/JavaSpring/cookieParams.mustache +++ b/modules/openapi-generator/src/main/resources/JavaSpring/cookieParams.mustache @@ -1 +1 @@ -{{#isCookieParam}}{{#useBeanValidation}}{{>beanValidationQueryParams}}{{/useBeanValidation}}@ApiParam(value = "{{{description}}}"{{#required}},required=true{{/required}}{{#allowableValues}}, allowableValues = "{{#enumVars}}{{#lambdaEscapeDoubleQuote}}{{{value}}}{{/lambdaEscapeDoubleQuote}}{{^-last}}, {{/-last}}{{#-last}}{{/-last}}{{/enumVars}}"{{/allowableValues}}{{^isContainer}}{{#defaultValue}}, defaultValue="{{{defaultValue}}}"{{/defaultValue}}{{/isContainer}}) @CookieValue("{{baseName}}") {{>optionalDataType}} {{paramName}}{{/isCookieParam}} \ No newline at end of file +{{#isCookieParam}}{{#useBeanValidation}}{{>beanValidationQueryParams}}{{/useBeanValidation}}@ApiParam(value = "{{{description}}}"{{#required}},required=true{{/required}}{{#allowableValues}}, allowableValues = "{{#enumVars}}{{#lambdaEscapeDoubleQuote}}{{{value}}}{{/lambdaEscapeDoubleQuote}}{{^-last}}, {{/-last}}{{#-last}}{{/-last}}{{/enumVars}}"{{/allowableValues}}{{^isContainer}}{{#defaultValue}}, defaultValue="{{{.}}}"{{/defaultValue}}{{/isContainer}}) @CookieValue("{{baseName}}") {{>optionalDataType}} {{paramName}}{{/isCookieParam}} \ No newline at end of file diff --git a/modules/openapi-generator/src/main/resources/JavaSpring/enumClass.mustache b/modules/openapi-generator/src/main/resources/JavaSpring/enumClass.mustache index 35b2bba8f6282d49e506e1fcb9e7c923d1146f45..59fa30eca3e5cc91e5a45ac692bbc7b2c555d2fe 100644 --- a/modules/openapi-generator/src/main/resources/JavaSpring/enumClass.mustache +++ b/modules/openapi-generator/src/main/resources/JavaSpring/enumClass.mustache @@ -1,7 +1,7 @@ /** - * {{^description}}Gets or Sets {{{name}}}{{/description}}{{#description}}{{{description}}}{{/description}} + * {{^description}}Gets or Sets {{{name}}}{{/description}}{{{description}}} */ - {{>additionalEnumTypeAnnotations}}public enum {{#datatypeWithEnum}}{{{.}}}{{/datatypeWithEnum}}{{^datatypeWithEnum}}{{classname}}{{/datatypeWithEnum}} { + {{>additionalEnumTypeAnnotations}}public enum {{{datatypeWithEnum}}}{{^datatypeWithEnum}}{{classname}}{{/datatypeWithEnum}} { {{#gson}} {{#allowableValues}} {{#enumVars}} @@ -22,7 +22,7 @@ private {{{dataType}}} value; - {{#datatypeWithEnum}}{{{.}}}{{/datatypeWithEnum}}{{^datatypeWithEnum}}{{classname}}{{/datatypeWithEnum}}({{{dataType}}} value) { + {{{datatypeWithEnum}}}{{^datatypeWithEnum}}{{classname}}{{/datatypeWithEnum}}({{{dataType}}} value) { this.value = value; } @@ -39,8 +39,8 @@ } @JsonCreator - public static {{#datatypeWithEnum}}{{{.}}}{{/datatypeWithEnum}}{{^datatypeWithEnum}}{{{classname}}}{{/datatypeWithEnum}} fromValue({{{dataType}}} value) { - for ({{#datatypeWithEnum}}{{{.}}}{{/datatypeWithEnum}}{{^datatypeWithEnum}}{{{classname}}}{{/datatypeWithEnum}} b : {{#datatypeWithEnum}}{{{.}}}{{/datatypeWithEnum}}{{^datatypeWithEnum}}{{{classname}}}{{/datatypeWithEnum}}.values()) { + public static {{{datatypeWithEnum}}}{{^datatypeWithEnum}}{{{classname}}}{{/datatypeWithEnum}} fromValue({{{dataType}}} value) { + for ({{{datatypeWithEnum}}}{{^datatypeWithEnum}}{{{classname}}}{{/datatypeWithEnum}} b : {{{datatypeWithEnum}}}{{^datatypeWithEnum}}{{{classname}}}{{/datatypeWithEnum}}.values()) { if (b.value.equals(value)) { return b; } diff --git a/modules/openapi-generator/src/main/resources/JavaSpring/enumOuterClass.mustache b/modules/openapi-generator/src/main/resources/JavaSpring/enumOuterClass.mustache index 334bfb6640b730e1d1d8a4fd4690f168acdda3da..387e4c30c86098dfc9a50e51ca7855f0f4915fbc 100644 --- a/modules/openapi-generator/src/main/resources/JavaSpring/enumOuterClass.mustache +++ b/modules/openapi-generator/src/main/resources/JavaSpring/enumOuterClass.mustache @@ -3,9 +3,9 @@ import com.fasterxml.jackson.annotation.JsonCreator; {{/jackson}} /** - * {{^description}}Gets or Sets {{{name}}}{{/description}}{{#description}}{{{description}}}{{/description}} + * {{^description}}Gets or Sets {{{name}}}{{/description}}{{{description}}} */ -{{>additionalEnumTypeAnnotations}}public enum {{#datatypeWithEnum}}{{{.}}}{{/datatypeWithEnum}}{{^datatypeWithEnum}}{{{classname}}}{{/datatypeWithEnum}} { +{{>additionalEnumTypeAnnotations}}public enum {{{datatypeWithEnum}}}{{^datatypeWithEnum}}{{{classname}}}{{/datatypeWithEnum}} { {{#gson}} {{#allowableValues}}{{#enumVars}} @SerializedName({{#isInteger}}"{{/isInteger}}{{#isDouble}}"{{/isDouble}}{{#isLong}}"{{/isLong}}{{#isFloat}}"{{/isFloat}}{{{value}}}{{#isInteger}}"{{/isInteger}}{{#isDouble}}"{{/isDouble}}{{#isLong}}"{{/isLong}}{{#isFloat}}"{{/isFloat}}) @@ -20,7 +20,7 @@ import com.fasterxml.jackson.annotation.JsonCreator; private {{{dataType}}} value; - {{#datatypeWithEnum}}{{{.}}}{{/datatypeWithEnum}}{{^datatypeWithEnum}}{{{classname}}}{{/datatypeWithEnum}}({{{dataType}}} value) { + {{{datatypeWithEnum}}}{{^datatypeWithEnum}}{{{classname}}}{{/datatypeWithEnum}}({{{dataType}}} value) { this.value = value; } @@ -37,8 +37,8 @@ import com.fasterxml.jackson.annotation.JsonCreator; } @JsonCreator - public static {{#datatypeWithEnum}}{{{.}}}{{/datatypeWithEnum}}{{^datatypeWithEnum}}{{{classname}}}{{/datatypeWithEnum}} fromValue({{{dataType}}} value) { - for ({{#datatypeWithEnum}}{{{.}}}{{/datatypeWithEnum}}{{^datatypeWithEnum}}{{{classname}}}{{/datatypeWithEnum}} b : {{#datatypeWithEnum}}{{{.}}}{{/datatypeWithEnum}}{{^datatypeWithEnum}}{{{classname}}}{{/datatypeWithEnum}}.values()) { + public static {{{datatypeWithEnum}}}{{^datatypeWithEnum}}{{{classname}}}{{/datatypeWithEnum}} fromValue({{{dataType}}} value) { + for ({{{datatypeWithEnum}}}{{^datatypeWithEnum}}{{{classname}}}{{/datatypeWithEnum}} b : {{{datatypeWithEnum}}}{{^datatypeWithEnum}}{{{classname}}}{{/datatypeWithEnum}}.values()) { if (b.value.equals(value)) { return b; } diff --git a/modules/openapi-generator/src/main/resources/JavaSpring/formParams.mustache b/modules/openapi-generator/src/main/resources/JavaSpring/formParams.mustache index f3291733ee478297ca2f876d1590cac531e069bb..051c24cdf6cfde6e4e7e0a8a82a805a6fb2177ec 100644 --- a/modules/openapi-generator/src/main/resources/JavaSpring/formParams.mustache +++ b/modules/openapi-generator/src/main/resources/JavaSpring/formParams.mustache @@ -1 +1 @@ -{{#isFormParam}}{{^isFile}}@ApiParam(value = "{{{description}}}"{{#required}}, required=true{{/required}}{{#allowableValues}}, allowableValues="{{#values}}{{{.}}}{{^-last}}, {{/-last}}{{#-last}}{{/-last}}{{/values}}"{{/allowableValues}}{{^isContainer}}{{#defaultValue}}, defaultValue="{{{defaultValue}}}"{{/defaultValue}}{{/isContainer}}) {{#useBeanValidation}}@Valid{{/useBeanValidation}} @RequestPart(value = "{{baseName}}"{{#required}}, required = true{{/required}}{{^required}}, required = false{{/required}}) {{{dataType}}} {{paramName}}{{/isFile}}{{#isFile}}@ApiParam(value = "{{{description}}}") {{#useBeanValidation}}@Valid{{/useBeanValidation}} @RequestPart(value = "{{baseName}}"{{#required}}, required = true{{/required}}{{^required}}, required = false{{/required}}) {{#isArray}}List<{{/isArray}}{{#reactive}}Flux<Part>{{/reactive}}{{^reactive}}MultipartFile{{/reactive}}{{#isArray}}>{{/isArray}} {{baseName}}{{/isFile}}{{/isFormParam}} \ No newline at end of file +{{#isFormParam}}{{^isFile}}@ApiParam(value = "{{{description}}}"{{#required}}, required=true{{/required}}{{#allowableValues}}, allowableValues="{{#values}}{{{.}}}{{^-last}}, {{/-last}}{{#-last}}{{/-last}}{{/values}}"{{/allowableValues}}{{^isContainer}}{{#defaultValue}}, defaultValue="{{{.}}}"{{/defaultValue}}{{/isContainer}}) {{#useBeanValidation}}@Valid{{/useBeanValidation}} @RequestPart(value = "{{baseName}}"{{#required}}, required = true{{/required}}{{^required}}, required = false{{/required}}) {{{dataType}}} {{paramName}}{{/isFile}}{{#isFile}}@ApiParam(value = "{{{description}}}") {{#useBeanValidation}}@Valid{{/useBeanValidation}} @RequestPart(value = "{{baseName}}"{{#required}}, required = true{{/required}}{{^required}}, required = false{{/required}}) {{#isArray}}List<{{/isArray}}{{#reactive}}Flux<Part>{{/reactive}}{{^reactive}}MultipartFile{{/reactive}}{{#isArray}}>{{/isArray}} {{baseName}}{{/isFile}}{{/isFormParam}} \ No newline at end of file diff --git a/modules/openapi-generator/src/main/resources/JavaSpring/headerParams.mustache b/modules/openapi-generator/src/main/resources/JavaSpring/headerParams.mustache index 2e2d907f583b82481ed27ba82905f25d62d331d0..6de7ead106088797ef679ac67e31a2925d7e82d0 100644 --- a/modules/openapi-generator/src/main/resources/JavaSpring/headerParams.mustache +++ b/modules/openapi-generator/src/main/resources/JavaSpring/headerParams.mustache @@ -1 +1 @@ -{{#isHeaderParam}}@ApiParam(value = "{{{description}}}" {{#required}},required=true{{/required}}{{#allowableValues}}, allowableValues="{{#values}}{{{.}}}{{^-last}}, {{/-last}}{{#-last}}{{/-last}}{{/values}}"{{/allowableValues}}{{^isContainer}}{{#defaultValue}}, defaultValue="{{{defaultValue}}}"{{/defaultValue}}{{/isContainer}}) @RequestHeader(value="{{baseName}}", required={{#required}}true{{/required}}{{^required}}false{{/required}}) {{>optionalDataType}} {{paramName}}{{/isHeaderParam}} \ No newline at end of file +{{#isHeaderParam}}@ApiParam(value = "{{{description}}}" {{#required}},required=true{{/required}}{{#allowableValues}}, allowableValues="{{#values}}{{{.}}}{{^-last}}, {{/-last}}{{#-last}}{{/-last}}{{/values}}"{{/allowableValues}}{{^isContainer}}{{#defaultValue}}, defaultValue="{{{.}}}"{{/defaultValue}}{{/isContainer}}) @RequestHeader(value="{{baseName}}", required={{#required}}true{{/required}}{{^required}}false{{/required}}) {{>optionalDataType}} {{paramName}}{{/isHeaderParam}} \ No newline at end of file diff --git a/modules/openapi-generator/src/main/resources/JavaSpring/libraries/spring-boot/README.mustache b/modules/openapi-generator/src/main/resources/JavaSpring/libraries/spring-boot/README.mustache index c89e7cf63853fa37362cb78e90f8800b714a9a29..196292339da4b93e4c1e55bf60dd4603d18e70dc 100644 --- a/modules/openapi-generator/src/main/resources/JavaSpring/libraries/spring-boot/README.mustache +++ b/modules/openapi-generator/src/main/resources/JavaSpring/libraries/spring-boot/README.mustache @@ -1,9 +1,9 @@ {{^interfaceOnly}}# OpenAPI generated server -Spring Boot Server +Spring Boot Server -## Overview +## Overview This server was generated by the [OpenAPI Generator](https://openapi-generator.tech) project. By using the [OpenAPI-Spec](https://openapis.org), you can easily generate a server stub. This is an example of building a OpenAPI-enabled server in Java using the SpringBoot framework. @@ -15,7 +15,7 @@ The underlying library integrating OpenAPI to SpringBoot is [springfox](https:// Start your server as a simple java application {{^reactive}} -You can view the api documentation in swagger-ui by pointing to +You can view the api documentation in swagger-ui by pointing to http://localhost:{{serverPort}}/ {{/reactive}} @@ -52,9 +52,9 @@ public interface PetClient extends PetApi { ## Virtualan : -You can view Virtualan UI by pointing to +You can view Virtualan UI by pointing to http://localhost:8080//virtualan-ui.html -How to use guide available in the Virtualan wiki +How to use guide available in the Virtualan wiki https://github.com/virtualansoftware/virtualan/wiki {{/virtualService}} \ No newline at end of file diff --git a/modules/openapi-generator/src/main/resources/JavaSpring/libraries/spring-cloud/formParams.mustache b/modules/openapi-generator/src/main/resources/JavaSpring/libraries/spring-cloud/formParams.mustache index 0eb66fdee5a7188a0480d0b84261d659c9a79e95..1be37a65d96bfa2b3dc0778a2715fdfbbf4babf6 100644 --- a/modules/openapi-generator/src/main/resources/JavaSpring/libraries/spring-cloud/formParams.mustache +++ b/modules/openapi-generator/src/main/resources/JavaSpring/libraries/spring-cloud/formParams.mustache @@ -1 +1 @@ -{{#isFormParam}}{{^isFile}}@ApiParam(value = "{{{description}}}"{{#required}}, required=true{{/required}} {{#allowableValues}}, allowableValues="{{{allowableValues}}}"{{/allowableValues}}{{^isContainer}}{{#defaultValue}}, defaultValue="{{{defaultValue}}}"{{/defaultValue}}{{/isContainer}}) @RequestParam(value="{{baseName}}"{{#required}}, required=true{{/required}}{{^required}}, required=false{{/required}}) {{{dataType}}} {{paramName}}{{/isFile}}{{#isFile}}@ApiParam(value = "{{{description}}}") @RequestParam("{{baseName}}") {{#isArray}}List<{{/isArray}}{{#reactive}}Flux<Part>{{/reactive}}{{^reactive}}MultipartFile{{/reactive}}{{#isArray}}>{{/isArray}} {{paramName}}{{/isFile}}{{/isFormParam}} \ No newline at end of file +{{#isFormParam}}{{^isFile}}@ApiParam(value = "{{{description}}}"{{#required}}, required=true{{/required}} {{#allowableValues}}, allowableValues="{{{.}}}"{{/allowableValues}}{{^isContainer}}{{#defaultValue}}, defaultValue="{{{.}}}"{{/defaultValue}}{{/isContainer}}) @RequestParam(value="{{baseName}}"{{#required}}, required=true{{/required}}{{^required}}, required=false{{/required}}) {{{dataType}}} {{paramName}}{{/isFile}}{{#isFile}}@ApiParam(value = "{{{description}}}") @RequestParam("{{baseName}}") {{#isArray}}List<{{/isArray}}{{#reactive}}Flux<Part>{{/reactive}}{{^reactive}}MultipartFile{{/reactive}}{{#isArray}}>{{/isArray}} {{paramName}}{{/isFile}}{{/isFormParam}} \ No newline at end of file diff --git a/modules/openapi-generator/src/main/resources/JavaSpring/libraries/spring-mvc/README.mustache b/modules/openapi-generator/src/main/resources/JavaSpring/libraries/spring-mvc/README.mustache index d28df1b43b4b722843cff7f90070ca0517bfdb6e..efc3e8921a6c9b3e108c23d77ce71bb46a74ba97 100644 --- a/modules/openapi-generator/src/main/resources/JavaSpring/libraries/spring-mvc/README.mustache +++ b/modules/openapi-generator/src/main/resources/JavaSpring/libraries/spring-mvc/README.mustache @@ -11,4 +11,4 @@ The underlying library integrating OpenAPI to Spring-MVC is [springfox](https:// {{/useSpringfox}} You can view the server in swagger-ui by pointing to -http://localhost:{{serverPort}}{{^contextPath}}/{{/contextPath}}{{#contextPath}}{{contextPath}}{{/contextPath}}/ \ No newline at end of file +http://localhost:{{serverPort}}{{contextPath}}{{^contextPath}}/{{/contextPath}}/ \ No newline at end of file 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 fbda18ab83c98e23fdea6830bb7b79e2cc48d354..e7ca6777fcaa1eacb8c021ab192b76f81feb0ccb 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 @@ -38,7 +38,7 @@ <version>${jetty-version}</version> <configuration> <webAppConfig> - <contextPath>{{^contextPath}}/{{/contextPath}}{{#contextPath}}{{contextPath}}{{/contextPath}}</contextPath> + <contextPath>{{contextPath}}{{^contextPath}}/{{/contextPath}}</contextPath> </webAppConfig> <webAppSourceDirectory>target/${project.artifactId}-${project.version}</webAppSourceDirectory> <stopPort>8079</stopPort> diff --git a/modules/openapi-generator/src/main/resources/JavaSpring/pathParams.mustache b/modules/openapi-generator/src/main/resources/JavaSpring/pathParams.mustache index 44cc98fff1cdb87b364f6324936071d439b61600..af17f0c4d9610f4a37b11e4189d8b6bdc34fc6bb 100644 --- a/modules/openapi-generator/src/main/resources/JavaSpring/pathParams.mustache +++ b/modules/openapi-generator/src/main/resources/JavaSpring/pathParams.mustache @@ -1 +1 @@ -{{#isPathParam}}{{#useBeanValidation}}{{>beanValidationPathParams}}{{/useBeanValidation}}@ApiParam(value = "{{{description}}}"{{#required}},required=true{{/required}}{{#allowableValues}}, allowableValues = "{{#enumVars}}{{#lambdaEscapeDoubleQuote}}{{{value}}}{{/lambdaEscapeDoubleQuote}}{{^-last}}, {{/-last}}{{#-last}}{{/-last}}{{/enumVars}}"{{/allowableValues}}{{^isContainer}}{{#defaultValue}}, defaultValue="{{{defaultValue}}}"{{/defaultValue}}{{/isContainer}}) @PathVariable("{{baseName}}") {{>optionalDataType}} {{paramName}}{{/isPathParam}} \ No newline at end of file +{{#isPathParam}}{{#useBeanValidation}}{{>beanValidationPathParams}}{{/useBeanValidation}}@ApiParam(value = "{{{description}}}"{{#required}},required=true{{/required}}{{#allowableValues}}, allowableValues = "{{#enumVars}}{{#lambdaEscapeDoubleQuote}}{{{value}}}{{/lambdaEscapeDoubleQuote}}{{^-last}}, {{/-last}}{{#-last}}{{/-last}}{{/enumVars}}"{{/allowableValues}}{{^isContainer}}{{#defaultValue}}, defaultValue="{{{.}}}"{{/defaultValue}}{{/isContainer}}) @PathVariable("{{baseName}}") {{>optionalDataType}} {{paramName}}{{/isPathParam}} \ No newline at end of file diff --git a/modules/openapi-generator/src/main/resources/JavaSpring/pojo.mustache b/modules/openapi-generator/src/main/resources/JavaSpring/pojo.mustache index de2f292341ea3a460eabb0567c923bed096a04f1..df0b98bfaf7ffd8defa6caf5d56f9e3ff17d327b 100644 --- a/modules/openapi-generator/src/main/resources/JavaSpring/pojo.mustache +++ b/modules/openapi-generator/src/main/resources/JavaSpring/pojo.mustache @@ -1,9 +1,9 @@ /** - * {{#description}}{{.}}{{/description}}{{^description}}{{classname}}{{/description}} + * {{description}}{{^description}}{{classname}}{{/description}} */{{#description}} -@ApiModel(description = "{{{description}}}"){{/description}} +@ApiModel(description = "{{{.}}}"){{/description}} {{>generatedAnnotation}}{{#discriminator}}{{>typeInfoAnnotation}}{{/discriminator}}{{>xmlAnnotation}}{{>additionalModelTypeAnnotations}} -public class {{classname}} {{#parent}}extends {{{parent}}}{{/parent}}{{^parent}}{{#hateoas}}extends RepresentationModel<{{classname}}> {{/hateoas}}{{/parent}} {{#serializableModel}}implements Serializable{{/serializableModel}} { +public class {{classname}} {{#parent}}extends {{{.}}}{{/parent}}{{^parent}}{{#hateoas}}extends RepresentationModel<{{classname}}> {{/hateoas}}{{/parent}} {{#serializableModel}}implements Serializable{{/serializableModel}} { {{#serializableModel}} private static final long serialVersionUID = 1L; @@ -14,14 +14,14 @@ public class {{classname}} {{#parent}}extends {{{parent}}}{{/parent}}{{^parent}} {{>enumClass}} {{/isContainer}} {{#isContainer}} - {{#mostInnerItems}} + {{#mostInnerItems}} {{>enumClass}} {{/mostInnerItems}} {{/isContainer}} {{/isEnum}} {{#jackson}} @JsonProperty("{{baseName}}"){{#withXml}} - @JacksonXmlProperty({{#isXmlAttribute}}isAttribute = true, {{/isXmlAttribute}}{{#xmlNamespace}}namespace="{{xmlNamespace}}", {{/xmlNamespace}}localName = "{{#xmlName}}{{xmlName}}{{/xmlName}}{{^xmlName}}{{baseName}}{{/xmlName}}"){{/withXml}} + @JacksonXmlProperty({{#isXmlAttribute}}isAttribute = true, {{/isXmlAttribute}}{{#xmlNamespace}}namespace="{{.}}", {{/xmlNamespace}}localName = "{{xmlName}}{{^xmlName}}{{baseName}}{{/xmlName}}"){{/withXml}} {{/jackson}} {{#gson}} @SerializedName("{{baseName}}") @@ -96,23 +96,23 @@ public class {{classname}} {{#parent}}extends {{{parent}}}{{/parent}}{{^parent}} /** {{#description}} - * {{{description}}} + * {{{.}}} {{/description}} {{^description}} * Get {{name}} {{/description}} {{#minimum}} - * minimum: {{minimum}} + * minimum: {{.}} {{/minimum}} {{#maximum}} - * maximum: {{maximum}} + * maximum: {{.}} {{/maximum}} * @return {{name}} */ {{#vendorExtensions.x-extra-annotation}} {{{vendorExtensions.x-extra-annotation}}} {{/vendorExtensions.x-extra-annotation}} - @ApiModelProperty({{#example}}example = "{{{example}}}", {{/example}}{{#required}}required = {{required}}, {{/required}}{{#isReadOnly}}readOnly = {{{isReadOnly}}}, {{/isReadOnly}}value = "{{{description}}}") + @ApiModelProperty({{#example}}example = "{{{.}}}", {{/example}}{{#required}}required = {{required}}, {{/required}}{{#isReadOnly}}readOnly = {{{isReadOnly}}}, {{/isReadOnly}}value = "{{{description}}}") {{#useBeanValidation}}{{>beanValidation}}{{/useBeanValidation}} public {{>nullableDataType}} {{getter}}() { return {{name}}; } diff --git a/modules/openapi-generator/src/main/resources/JavaSpring/queryParams.mustache b/modules/openapi-generator/src/main/resources/JavaSpring/queryParams.mustache index fc630e6361ee6a54457c03a827dddeb2eaa470a6..3d61a40f0581b3344d1851e59b9b1e3e30839ee7 100644 --- a/modules/openapi-generator/src/main/resources/JavaSpring/queryParams.mustache +++ b/modules/openapi-generator/src/main/resources/JavaSpring/queryParams.mustache @@ -1 +1 @@ -{{#isQueryParam}}{{#useBeanValidation}}{{>beanValidationQueryParams}}{{/useBeanValidation}}@ApiParam(value = "{{{description}}}"{{#required}}, required = true{{/required}}{{#allowableValues}}, allowableValues = "{{#values}}{{{.}}}{{^-last}}, {{/-last}}{{#-last}}{{/-last}}{{/values}}"{{/allowableValues}}{{^isContainer}}{{#defaultValue}}, defaultValue = "{{{defaultValue}}}"{{/defaultValue}}{{/isContainer}}) {{#useBeanValidation}}@Valid{{/useBeanValidation}}{{^isModel}} @RequestParam(value = {{#isMap}}""{{/isMap}}{{^isMap}}"{{baseName}}"{{/isMap}}{{#required}}, required = true{{/required}}{{^required}}, required = false{{/required}}{{^isContainer}}{{#defaultValue}}, defaultValue="{{{defaultValue}}}"{{/defaultValue}}{{/isContainer}}){{/isModel}}{{#isDate}} @org.springframework.format.annotation.DateTimeFormat(iso = org.springframework.format.annotation.DateTimeFormat.ISO.DATE){{/isDate}}{{#isDateTime}} @org.springframework.format.annotation.DateTimeFormat(iso = org.springframework.format.annotation.DateTimeFormat.ISO.DATE_TIME){{/isDateTime}} {{>optionalDataType}} {{paramName}}{{/isQueryParam}} \ No newline at end of file +{{#isQueryParam}}{{#useBeanValidation}}{{>beanValidationQueryParams}}{{/useBeanValidation}}@ApiParam(value = "{{{description}}}"{{#required}}, required = true{{/required}}{{#allowableValues}}, allowableValues = "{{#values}}{{{.}}}{{^-last}}, {{/-last}}{{#-last}}{{/-last}}{{/values}}"{{/allowableValues}}{{^isContainer}}{{#defaultValue}}, defaultValue = "{{{.}}}"{{/defaultValue}}{{/isContainer}}) {{#useBeanValidation}}@Valid{{/useBeanValidation}}{{^isModel}} @RequestParam(value = {{#isMap}}""{{/isMap}}{{^isMap}}"{{baseName}}"{{/isMap}}{{#required}}, required = true{{/required}}{{^required}}, required = false{{/required}}{{^isContainer}}{{#defaultValue}}, defaultValue="{{{.}}}"{{/defaultValue}}{{/isContainer}}){{/isModel}}{{#isDate}} @org.springframework.format.annotation.DateTimeFormat(iso = org.springframework.format.annotation.DateTimeFormat.ISO.DATE){{/isDate}}{{#isDateTime}} @org.springframework.format.annotation.DateTimeFormat(iso = org.springframework.format.annotation.DateTimeFormat.ISO.DATE_TIME){{/isDateTime}} {{>optionalDataType}} {{paramName}}{{/isQueryParam}} \ No newline at end of file diff --git a/modules/openapi-generator/src/main/resources/JavaSpring/xmlAnnotation.mustache b/modules/openapi-generator/src/main/resources/JavaSpring/xmlAnnotation.mustache index fd81a4cf5d8488d44427db713b4799fa97be5aa0..70e2626635f43eb46043858f6630dfb46e8956c8 100644 --- a/modules/openapi-generator/src/main/resources/JavaSpring/xmlAnnotation.mustache +++ b/modules/openapi-generator/src/main/resources/JavaSpring/xmlAnnotation.mustache @@ -1,6 +1,6 @@ {{#withXml}} {{#jackson}} -@JacksonXmlRootElement({{#xmlNamespace}}namespace="{{xmlNamespace}}", {{/xmlNamespace}}localName = "{{#xmlName}}{{xmlName}}{{/xmlName}}{{^xmlName}}{{classname}}{{/xmlName}}") +@JacksonXmlRootElement({{#xmlNamespace}}namespace="{{.}}", {{/xmlNamespace}}localName = "{{xmlName}}{{^xmlName}}{{classname}}{{/xmlName}}") {{/jackson}} -@XmlRootElement({{#xmlNamespace}}namespace="{{xmlNamespace}}", {{/xmlNamespace}}name = "{{#xmlName}}{{xmlName}}{{/xmlName}}{{^xmlName}}{{classname}}{{/xmlName}}") +@XmlRootElement({{#xmlNamespace}}namespace="{{.}}", {{/xmlNamespace}}name = "{{xmlName}}{{^xmlName}}{{classname}}{{/xmlName}}") @XmlAccessorType(XmlAccessType.FIELD){{/withXml}} \ No newline at end of file diff --git a/modules/openapi-generator/src/main/resources/JavaVertXServer/AsyncMethod.mustache b/modules/openapi-generator/src/main/resources/JavaVertXServer/AsyncMethod.mustache index 13725c9212e17de96eb93bd742f08d9d14d547c7..4f790cf0f56808902e7f2ef9c85d7992b81deef2 100644 --- a/modules/openapi-generator/src/main/resources/JavaVertXServer/AsyncMethod.mustache +++ b/modules/openapi-generator/src/main/resources/JavaVertXServer/AsyncMethod.mustache @@ -1 +1 @@ - void {{operationId}}({{#allParams}}{{{dataType}}} {{paramName}}{{^-last}}, {{/-last}}{{#-last}}, {{/-last}}{{/allParams}}Handler<AsyncResult<{{#returnType}}{{{returnType}}}{{/returnType}}{{^returnType}}Void{{/returnType}}>> handler); \ No newline at end of file + void {{operationId}}({{#allParams}}{{{dataType}}} {{paramName}}{{^-last}}, {{/-last}}{{#-last}}, {{/-last}}{{/allParams}}Handler<AsyncResult<{{{returnType}}}{{^returnType}}Void{{/returnType}}>> handler); \ No newline at end of file diff --git a/modules/openapi-generator/src/main/resources/JavaVertXServer/MainApiException.mustache b/modules/openapi-generator/src/main/resources/JavaVertXServer/MainApiException.mustache index 2e2b887a1176fe5b14da5d99153e025d186a19b2..27cf89ab06a9b7ff41443251d9a9f3a4ab9b3bcc 100644 --- a/modules/openapi-generator/src/main/resources/JavaVertXServer/MainApiException.mustache +++ b/modules/openapi-generator/src/main/resources/JavaVertXServer/MainApiException.mustache @@ -17,6 +17,6 @@ public class MainApiException extends Exception { public String getStatusMessage() { return statusMessage; } - - public static final MainApiException INTERNAL_SERVER_ERROR = new MainApiException(500, "Internal Server Error"); + + public static final MainApiException INTERNAL_SERVER_ERROR = new MainApiException(500, "Internal Server Error"); } \ No newline at end of file diff --git a/modules/openapi-generator/src/main/resources/JavaVertXServer/MainApiVerticle.mustache b/modules/openapi-generator/src/main/resources/JavaVertXServer/MainApiVerticle.mustache index 034d83b8f21e2fb3c5d73d1d13ecb5a9b4bc5200..594d423d40b9f3c2c9f15bb1eb63951c7b097619 100644 --- a/modules/openapi-generator/src/main/resources/JavaVertXServer/MainApiVerticle.mustache +++ b/modules/openapi-generator/src/main/resources/JavaVertXServer/MainApiVerticle.mustache @@ -50,7 +50,7 @@ public class MainApiVerticle extends AbstractVerticle { deployVerticles(startFuture); vertx.createHttpServer() - .requestHandler(swaggerRouter::accept) + .requestHandler(swaggerRouter::accept) .listen(serverPort, h -> { if (h.succeeded()) { startFuture.complete(); @@ -61,9 +61,9 @@ public class MainApiVerticle extends AbstractVerticle { } else { startFuture.fail(readFile.cause()); } - }); + }); } - + public void deployVerticles(Future<Void> startFuture) { {{#apiInfo}}{{#apis}} vertx.deployVerticle("{{apiPackage}}.{{classname}}Verticle", res -> { diff --git a/modules/openapi-generator/src/main/resources/JavaVertXServer/RxMethod.mustache b/modules/openapi-generator/src/main/resources/JavaVertXServer/RxMethod.mustache index fd183f08805fc71aea17d96a2995cb4f9481cc38..5361709387f5fe3d26e368ab914a06e0f4e4a080 100644 --- a/modules/openapi-generator/src/main/resources/JavaVertXServer/RxMethod.mustache +++ b/modules/openapi-generator/src/main/resources/JavaVertXServer/RxMethod.mustache @@ -1 +1 @@ - public {{#returnType}}Single<{{{returnType}}}>{{/returnType}}{{^returnType}}Completable{{/returnType}} {{operationId}}({{#allParams}}{{{dataType}}} {{paramName}}{{^-last}},{{/-last}}{{/allParams}}); \ No newline at end of file + public {{#returnType}}Single<{{{.}}}>{{/returnType}}{{^returnType}}Completable{{/returnType}} {{operationId}}({{#allParams}}{{{dataType}}} {{paramName}}{{^-last}},{{/-last}}{{/allParams}}); \ No newline at end of file diff --git a/modules/openapi-generator/src/main/resources/JavaVertXServer/api.mustache b/modules/openapi-generator/src/main/resources/JavaVertXServer/api.mustache index 920bbd92ea02fb43bd31709d55f682e10e80511f..183d23c28eb609829cd376cd831a3b8a7591fbe1 100644 --- a/modules/openapi-generator/src/main/resources/JavaVertXServer/api.mustache +++ b/modules/openapi-generator/src/main/resources/JavaVertXServer/api.mustache @@ -25,7 +25,7 @@ public interface {{classname}} { {{^rxInterface}} {{>AsyncMethod}} {{/rxInterface}} - + {{/operation}} {{/operations}} } diff --git a/modules/openapi-generator/src/main/resources/JavaVertXServer/apiException.mustache b/modules/openapi-generator/src/main/resources/JavaVertXServer/apiException.mustache index f3b495dfb4cb3ec154f21a9f31e87cc49f2a78bd..5678721bd8664a462a4b7e765aad4d17c9aa35d2 100644 --- a/modules/openapi-generator/src/main/resources/JavaVertXServer/apiException.mustache +++ b/modules/openapi-generator/src/main/resources/JavaVertXServer/apiException.mustache @@ -7,7 +7,7 @@ public final class {{classname}}Exception extends MainApiException { public {{classname}}Exception(int statusCode, String statusMessage) { super(statusCode, statusMessage); } - + {{#operations}}{{#operation}}{{#responses}}{{^isDefault}}public static final {{classname}}Exception {{baseName}}_{{{operationId}}}_{{{code}}}_Exception = new {{classname}}Exception({{{code}}}, "{{{message}}}"); {{/isDefault}}{{/responses}}{{/operation}}{{/operations}} diff --git a/modules/openapi-generator/src/main/resources/JavaVertXServer/apiVerticle.mustache b/modules/openapi-generator/src/main/resources/JavaVertXServer/apiVerticle.mustache index 84a896245fb9a3297c8edc72349f966207e38d73..297495efb232f697ad5cfc2ad9d2307a6ceeb344 100644 --- a/modules/openapi-generator/src/main/resources/JavaVertXServer/apiVerticle.mustache +++ b/modules/openapi-generator/src/main/resources/JavaVertXServer/apiVerticle.mustache @@ -16,7 +16,7 @@ import java.util.Map; public class {{classname}}Verticle extends AbstractVerticle { static final Logger LOGGER = LoggerFactory.getLogger({{classname}}Verticle.class); - + {{#operations}}{{#operation}}{{#vendorExtensions}}static final String {{x-serviceid-varname}} = "{{x-serviceid}}"; {{/vendorExtensions}}{{/operation}}{{/operations}} final {{classname}} service; @@ -52,7 +52,7 @@ public class {{classname}}Verticle extends AbstractVerticle { Json.mapper.getTypeFactory().constructCollectionType(List.class, {{{baseType}}}.class)); {{/required}} {{^required}} - {{{dataType}}} {{paramName}} = ({{paramName}}Param == null) ? {{#defaultValue}}{{{defaultValue}}}{{/defaultValue}}{{^defaultValue}}null{{/defaultValue}} : Json.mapper.readValue({{paramName}}Param.encode(), + {{{dataType}}} {{paramName}} = ({{paramName}}Param == null) ? {{{defaultValue}}}{{^defaultValue}}null{{/defaultValue}} : Json.mapper.readValue({{paramName}}Param.encode(), Json.mapper.getTypeFactory().constructCollectionType(List.class, {{{baseType}}}.class)); {{/required}} {{/isArray}} @@ -81,7 +81,7 @@ public class {{classname}}Verticle extends AbstractVerticle { {{{dataType}}} {{paramName}} = Json.mapper.readValue({{paramName}}Param, {{{dataType}}}.class); {{/required}} {{^required}} - {{{dataType}}} {{paramName}} = ({{paramName}}Param == null) ? {{#defaultValue}}{{{defaultValue}}}{{/defaultValue}}{{^defaultValue}}null{{/defaultValue}} : Json.mapper.readValue({{paramName}}Param, {{{dataType}}}.class); + {{{dataType}}} {{paramName}} = ({{paramName}}Param == null) ? {{{defaultValue}}}{{^defaultValue}}null{{/defaultValue}} : Json.mapper.readValue({{paramName}}Param, {{{dataType}}}.class); {{/required}} {{/isString}} {{/isPrimitiveType}} @@ -109,7 +109,7 @@ public class {{classname}}Verticle extends AbstractVerticle { }); {{/operation}}{{/operations}} } - + private void manageError(Message<JsonObject> message, Throwable cause, String serviceName) { int code = MainApiException.INTERNAL_SERVER_ERROR.getStatusCode(); String statusMessage = MainApiException.INTERNAL_SERVER_ERROR.getStatusMessage(); @@ -117,12 +117,12 @@ public class {{classname}}Verticle extends AbstractVerticle { code = ((MainApiException)cause).getStatusCode(); statusMessage = ((MainApiException)cause).getStatusMessage(); } else { - logUnexpectedError(serviceName, cause); + logUnexpectedError(serviceName, cause); } - + message.fail(code, statusMessage); } - + private void logUnexpectedError(String serviceName, Throwable cause) { LOGGER.error("Unexpected error in "+ serviceName, cause); } diff --git a/modules/openapi-generator/src/main/resources/JavaVertXServer/enumOuterClass.mustache b/modules/openapi-generator/src/main/resources/JavaVertXServer/enumOuterClass.mustache index 58748fd18b2650ca2ea81e4b037dc0ab272c2c97..0db4c73807922b196bed76ec5a2ca625787824f6 100644 --- a/modules/openapi-generator/src/main/resources/JavaVertXServer/enumOuterClass.mustache +++ b/modules/openapi-generator/src/main/resources/JavaVertXServer/enumOuterClass.mustache @@ -2,16 +2,16 @@ import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonValue; /** - * {{^description}}Gets or Sets {{{name}}}{{/description}}{{#description}}{{description}}{{/description}} + * {{description}}{{^description}}Gets or Sets {{{name}}}{{/description}} */ -{{>additionalEnumTypeAnnotations}}public enum {{#datatypeWithEnum}}{{{.}}}{{/datatypeWithEnum}}{{^datatypeWithEnum}}{{{classname}}}{{/datatypeWithEnum}} { +{{>additionalEnumTypeAnnotations}}public enum {{{datatypeWithEnum}}}{{^datatypeWithEnum}}{{{classname}}}{{/datatypeWithEnum}} { {{#allowableValues}}{{#enumVars}} {{{name}}}({{{value}}}){{^-last}}, {{/-last}}{{#-last}};{{/-last}}{{/enumVars}}{{/allowableValues}} private {{{dataType}}} value; - {{#datatypeWithEnum}}{{{.}}}{{/datatypeWithEnum}}{{^datatypeWithEnum}}{{{classname}}}{{/datatypeWithEnum}}({{{dataType}}} value) { + {{{datatypeWithEnum}}}{{^datatypeWithEnum}}{{{classname}}}{{/datatypeWithEnum}}({{{dataType}}} value) { this.value = value; } @@ -25,8 +25,8 @@ import com.fasterxml.jackson.annotation.JsonValue; return String.valueOf(value); } - public static {{#datatypeWithEnum}}{{{.}}}{{/datatypeWithEnum}}{{^datatypeWithEnum}}{{{classname}}}{{/datatypeWithEnum}} fromValue({{{dataType}}} value) { - for ({{#datatypeWithEnum}}{{{.}}}{{/datatypeWithEnum}}{{^datatypeWithEnum}}{{{classname}}}{{/datatypeWithEnum}} b : {{#datatypeWithEnum}}{{{.}}}{{/datatypeWithEnum}}{{^datatypeWithEnum}}{{{classname}}}{{/datatypeWithEnum}}.values()) { + public static {{{datatypeWithEnum}}}{{^datatypeWithEnum}}{{{classname}}}{{/datatypeWithEnum}} fromValue({{{dataType}}} value) { + for ({{{datatypeWithEnum}}}{{^datatypeWithEnum}}{{{classname}}}{{/datatypeWithEnum}} b : {{{datatypeWithEnum}}}{{^datatypeWithEnum}}{{{classname}}}{{/datatypeWithEnum}}.values()) { if (b.value.equals(value)) { return b; } diff --git a/modules/openapi-generator/src/main/resources/JavaVertXServer/model.mustache b/modules/openapi-generator/src/main/resources/JavaVertXServer/model.mustache index 46f9f77357df835d3cb96537f5a4287cadb955a5..816b64ebc526900ab4e9f551653435377ebc02dd 100644 --- a/modules/openapi-generator/src/main/resources/JavaVertXServer/model.mustache +++ b/modules/openapi-generator/src/main/resources/JavaVertXServer/model.mustache @@ -6,7 +6,7 @@ import java.util.Objects; {{#serializableModel}}import java.io.Serializable; {{/serializableModel}}{{#models}}{{#model}}{{#description}} /** - * {{description}} + * {{.}} **/ {{/description}}{{^description}} {{/description}}{{#isEnum}}{{>enumOuterClass}}{{/isEnum}}{{^isEnum}}{{>pojo}}{{/isEnum}}{{/model}}{{/models}} \ No newline at end of file diff --git a/modules/openapi-generator/src/main/resources/JavaVertXServer/pojo.mustache b/modules/openapi-generator/src/main/resources/JavaVertXServer/pojo.mustache index a2d809a9e7f43a81fe0d489c57e8ee87eca2fc21..cbcff066b1b7ab0e29e3db71f4cc3d7ac172c482 100644 --- a/modules/openapi-generator/src/main/resources/JavaVertXServer/pojo.mustache +++ b/modules/openapi-generator/src/main/resources/JavaVertXServer/pojo.mustache @@ -1,5 +1,5 @@ {{>additionalModelTypeAnnotations}}@JsonInclude(JsonInclude.Include.NON_NULL) -public class {{classname}} {{#parent}}extends {{{parent}}}{{/parent}} {{#serializableModel}}implements Serializable{{/serializableModel}} { +public class {{classname}} {{#parent}}extends {{{.}}}{{/parent}} {{#serializableModel}}implements Serializable{{/serializableModel}} { {{#vars}}{{#isEnum}}{{^isContainer}} {{>enumClass}}{{/isContainer}}{{#isContainer}}{{#mostInnerItems}} diff --git a/modules/openapi-generator/src/main/resources/JavaVertXServer/pom.mustache b/modules/openapi-generator/src/main/resources/JavaVertXServer/pom.mustache index d12dcba44b115f790381f098da8108e4a1087476..3fdedc85a2a722560e310affeb05d638e99b57a0 100644 --- a/modules/openapi-generator/src/main/resources/JavaVertXServer/pom.mustache +++ b/modules/openapi-generator/src/main/resources/JavaVertXServer/pom.mustache @@ -1,14 +1,14 @@ <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd"> <modelVersion>4.0.0</modelVersion> - + <groupId>{{groupId}}</groupId> <artifactId>{{artifactId}}</artifactId> <version>{{artifactVersion}}</version> <packaging>jar</packaging> - + <name>{{appName}}</name> - + <properties> <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding> <java.version>1.8</java.version> diff --git a/modules/openapi-generator/src/main/resources/JavaVertXWebServer/enumOuterClass.mustache b/modules/openapi-generator/src/main/resources/JavaVertXWebServer/enumOuterClass.mustache index a7b818b228fb3fe43c972eb2aa90bd523227ece0..8d64ba3eb8842938a0747b485b536cab3d00d723 100644 --- a/modules/openapi-generator/src/main/resources/JavaVertXWebServer/enumOuterClass.mustache +++ b/modules/openapi-generator/src/main/resources/JavaVertXWebServer/enumOuterClass.mustache @@ -2,16 +2,16 @@ import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonValue; /** - * {{^description}}Gets or Sets {{{name}}}{{/description}}{{#description}}{{description}}{{/description}} + * {{description}}{{^description}}Gets or Sets {{{name}}}{{/description}} */ -{{>additionalEnumTypeAnnotations}}public enum {{#datatypeWithEnum}}{{{.}}}{{/datatypeWithEnum}}{{^datatypeWithEnum}}{{{classname}}}{{/datatypeWithEnum}} { +{{>additionalEnumTypeAnnotations}}public enum {{{datatypeWithEnum}}}{{^datatypeWithEnum}}{{{classname}}}{{/datatypeWithEnum}} { {{#allowableValues}}{{#enumVars}} {{{name}}}({{{value}}}){{^-last}}, {{/-last}}{{#-last}};{{/-last}}{{/enumVars}}{{/allowableValues}} private {{{dataType}}} value; - {{#datatypeWithEnum}}{{{.}}}{{/datatypeWithEnum}}{{^datatypeWithEnum}}{{{classname}}}{{/datatypeWithEnum}}({{{dataType}}} value) { + {{{datatypeWithEnum}}}{{^datatypeWithEnum}}{{{classname}}}{{/datatypeWithEnum}}({{{dataType}}} value) { this.value = value; } @@ -25,8 +25,8 @@ import com.fasterxml.jackson.annotation.JsonValue; return String.valueOf(value); } - public static {{#datatypeWithEnum}}{{{.}}}{{/datatypeWithEnum}}{{^datatypeWithEnum}}{{{classname}}}{{/datatypeWithEnum}} fromValue({{{dataType}}} value) { - for ({{#datatypeWithEnum}}{{{.}}}{{/datatypeWithEnum}}{{^datatypeWithEnum}}{{{classname}}}{{/datatypeWithEnum}} b : {{#datatypeWithEnum}}{{{.}}}{{/datatypeWithEnum}}{{^datatypeWithEnum}}{{{classname}}}{{/datatypeWithEnum}}.values()) { + public static {{{datatypeWithEnum}}}{{^datatypeWithEnum}}{{{classname}}}{{/datatypeWithEnum}} fromValue({{{dataType}}} value) { + for ({{{datatypeWithEnum}}}{{^datatypeWithEnum}}{{{classname}}}{{/datatypeWithEnum}} b : {{{datatypeWithEnum}}}{{^datatypeWithEnum}}{{{classname}}}{{/datatypeWithEnum}}.values()) { if (b.value.equals(value)) { return b; } diff --git a/modules/openapi-generator/src/main/resources/JavaVertXWebServer/model.mustache b/modules/openapi-generator/src/main/resources/JavaVertXWebServer/model.mustache index 46f9f77357df835d3cb96537f5a4287cadb955a5..816b64ebc526900ab4e9f551653435377ebc02dd 100644 --- a/modules/openapi-generator/src/main/resources/JavaVertXWebServer/model.mustache +++ b/modules/openapi-generator/src/main/resources/JavaVertXWebServer/model.mustache @@ -6,7 +6,7 @@ import java.util.Objects; {{#serializableModel}}import java.io.Serializable; {{/serializableModel}}{{#models}}{{#model}}{{#description}} /** - * {{description}} + * {{.}} **/ {{/description}}{{^description}} {{/description}}{{#isEnum}}{{>enumOuterClass}}{{/isEnum}}{{^isEnum}}{{>pojo}}{{/isEnum}}{{/model}}{{/models}} \ No newline at end of file diff --git a/modules/openapi-generator/src/main/resources/JavaVertXWebServer/pojo.mustache b/modules/openapi-generator/src/main/resources/JavaVertXWebServer/pojo.mustache index a2d809a9e7f43a81fe0d489c57e8ee87eca2fc21..cbcff066b1b7ab0e29e3db71f4cc3d7ac172c482 100644 --- a/modules/openapi-generator/src/main/resources/JavaVertXWebServer/pojo.mustache +++ b/modules/openapi-generator/src/main/resources/JavaVertXWebServer/pojo.mustache @@ -1,5 +1,5 @@ {{>additionalModelTypeAnnotations}}@JsonInclude(JsonInclude.Include.NON_NULL) -public class {{classname}} {{#parent}}extends {{{parent}}}{{/parent}} {{#serializableModel}}implements Serializable{{/serializableModel}} { +public class {{classname}} {{#parent}}extends {{{.}}}{{/parent}} {{#serializableModel}}implements Serializable{{/serializableModel}} { {{#vars}}{{#isEnum}}{{^isContainer}} {{>enumClass}}{{/isContainer}}{{#isContainer}}{{#mostInnerItems}} diff --git a/modules/openapi-generator/src/main/resources/JavaVertXWebServer/supportFiles/ApiResponse.mustache b/modules/openapi-generator/src/main/resources/JavaVertXWebServer/supportFiles/ApiResponse.mustache index f1a435bdcc887b553bc3f1b54369a8ec39a06e83..4554dd577ae81a156b0a4c3900c0068783eb608d 100644 --- a/modules/openapi-generator/src/main/resources/JavaVertXWebServer/supportFiles/ApiResponse.mustache +++ b/modules/openapi-generator/src/main/resources/JavaVertXWebServer/supportFiles/ApiResponse.mustache @@ -33,5 +33,3 @@ public class ApiResponse<T> { return statusCode; } } - - diff --git a/modules/openapi-generator/src/main/resources/Javascript-Apollo/ApiClient.mustache b/modules/openapi-generator/src/main/resources/Javascript-Apollo/ApiClient.mustache index 445e1cef2b8640c49845d59cfbcea34797b5df53..8914ecf5e449f55790fcbe2ec93b57d56a494dd0 100644 --- a/modules/openapi-generator/src/main/resources/Javascript-Apollo/ApiClient.mustache +++ b/modules/openapi-generator/src/main/resources/Javascript-Apollo/ApiClient.mustache @@ -3,20 +3,20 @@ import RESTDataSource from 'apollo-datasource-rest'; {{#emitJSDoc}}/** -* @module {{#invokerPackage}}{{invokerPackage}}/{{/invokerPackage}}ApiClient +* @module {{#invokerPackage}}{{.}}/{{/invokerPackage}}ApiClient * @version {{projectVersion}} */ /** * Manages low level client-server communications, parameter marshalling, etc. There should not be any need for an * application to use this class directly - the *Api and model classes provide the public API for the service. -* @alias module:{{#invokerPackage}}{{invokerPackage}}/{{/invokerPackage}}ApiClient +* @alias module:{{#invokerPackage}}{{.}}/{{/invokerPackage}}ApiClient * @class */{{/emitJSDoc}} export default class ApiClient extends RESTDataSource { constructor() { super() - + {{#emitJSDoc}}/** * The authentication methods to be included for all API calls. * @type {Array.<String>} @@ -187,7 +187,7 @@ export default class ApiClient extends RESTDataSource { this.applyAuthOptions(fetchOptions, authNames); var body = null; - + if (bodyParam !== null && bodyParam !== undefined) { body = bodyParam; } else if (formParams !== null && formParams !== undefined) { diff --git a/modules/openapi-generator/src/main/resources/Javascript-Apollo/README.mustache b/modules/openapi-generator/src/main/resources/Javascript-Apollo/README.mustache index dd4a6721a2d7b0f1dc789e5fd39c3c3d5ac63916..0ac4e62d2f53227278fdc9484e8ecf90056b25d4 100644 --- a/modules/openapi-generator/src/main/resources/Javascript-Apollo/README.mustache +++ b/modules/openapi-generator/src/main/resources/Javascript-Apollo/README.mustache @@ -2,7 +2,7 @@ {{moduleName}} - JavaScript client for {{projectName}} {{#appDescriptionWithNewLines}} -{{{appDescriptionWithNewLines}}} +{{{.}}} {{/appDescriptionWithNewLines}} This SDK is automatically generated by the [OpenAPI Generator](https://openapi-generator.tech) project: @@ -64,11 +64,11 @@ npm run build #### git -If the library is hosted at a git repository, e.g.https://github.com/{{#gitUserId}}{{.}}{{/gitUserId}}{{^gitUserId}}YOUR_USERNAME{{/gitUserId}}/{{#gitRepoId}}{{.}}{{/gitRepoId}}{{^gitRepoId}}{{projectName}}{{/gitRepoId}} +If the library is hosted at a git repository, e.g.https://github.com/{{gitUserId}}{{^gitUserId}}YOUR_USERNAME{{/gitUserId}}/{{gitRepoId}}{{^gitRepoId}}{{projectName}}{{/gitRepoId}} then install it via: ```shell - npm install {{#gitUserId}}{{.}}{{/gitUserId}}{{^gitUserId}}YOUR_USERNAME{{/gitUserId}}/{{#gitRepoId}}{{.}}{{/gitRepoId}}{{^gitRepoId}}{{projectName}}{{/gitRepoId}} --save + npm install {{gitUserId}}{{^gitUserId}}YOUR_USERNAME{{/gitUserId}}/{{gitRepoId}}{{^gitRepoId}}{{projectName}}{{/gitRepoId}} --save ``` ### For browser @@ -181,7 +181,7 @@ All URIs are relative to *{{basePath}}* Class | Method | HTTP request | Description ------------ | ------------- | ------------- | ------------- -{{#apiInfo}}{{#apis}}{{#operations}}{{#operation}}*{{moduleName}}.{{classname}}* | [**{{operationId}}**]({{apiDocPath}}{{classname}}.md#{{operationId}}) | **{{httpMethod}}** {{path}} | {{#summary}}{{summary}}{{/summary}} +{{#apiInfo}}{{#apis}}{{#operations}}{{#operation}}*{{moduleName}}.{{classname}}* | [**{{operationId}}**]({{apiDocPath}}{{classname}}.md#{{operationId}}) | **{{httpMethod}}** {{path}} | {{summary}} {{/operation}}{{/operations}}{{/apis}}{{/apiInfo}} ## Documentation for Models diff --git a/modules/openapi-generator/src/main/resources/Javascript-Apollo/api_doc.mustache b/modules/openapi-generator/src/main/resources/Javascript-Apollo/api_doc.mustache index ab08ff8495b6c5e3116c629c82873c91b6a1fc98..0a68747b73d76c3355a0f743e07b6d44accb79ac 100644 --- a/modules/openapi-generator/src/main/resources/Javascript-Apollo/api_doc.mustache +++ b/modules/openapi-generator/src/main/resources/Javascript-Apollo/api_doc.mustache @@ -1,12 +1,12 @@ # {{moduleName}}.{{classname}}{{#description}} -{{description}}{{/description}} +{{.}}{{/description}} All URIs are relative to *{{basePath}}* Method | HTTP request | Description ------------- | ------------- | ------------- -{{#operations}}{{#operation}}[**{{operationId}}**]({{classname}}.md#{{operationId}}) | **{{httpMethod}}** {{path}} | {{#summary}}{{summary}}{{/summary}} +{{#operations}}{{#operation}}[**{{operationId}}**]({{classname}}.md#{{operationId}}) | **{{httpMethod}}** {{path}} | {{summary}} {{/operation}}{{/operations}} {{#operations}} @@ -14,11 +14,11 @@ Method | HTTP request | Description ## {{operationId}} -> {{#returnType}}{{returnType}} {{/returnType}}{{operationId}}({{#requiredParams}}{{{paramName}}}{{^-last}}, {{/-last}}{{/requiredParams}}{{#optionalParams}}{{#-last}}{{#hasRequiredParams}}, {{/hasRequiredParams}}opts{{/-last}}{{/optionalParams}}) +> {{#returnType}}{{.}} {{/returnType}}{{operationId}}({{#requiredParams}}{{{paramName}}}{{^-last}}, {{/-last}}{{/requiredParams}}{{#optionalParams}}{{#-last}}{{#hasRequiredParams}}, {{/hasRequiredParams}}opts{{/-last}}{{/optionalParams}}) {{summary}}{{#notes}} -{{notes}}{{/notes}} +{{.}}{{/notes}} ### Example @@ -92,7 +92,7 @@ apiInstance.{{{operationId}}}({{#requiredParams}}{{{paramName}}}{{^-last}}, {{/- {{^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}}{{#defaultValue}}[default to {{defaultValue}}]{{/defaultValue}} +{{#allParams}} **{{paramName}}** | {{#isPrimitiveType}}**{{dataType}}**{{/isPrimitiveType}}{{^isPrimitiveType}}{{#isFile}}**{{dataType}}**{{/isFile}}{{^isFile}}[**{{dataType}}**]({{baseType}}.md){{/isFile}}{{/isPrimitiveType}}| {{description}} | {{^required}}[optional] {{/required}}{{#defaultValue}}[default to {{.}}]{{/defaultValue}} {{/allParams}} ### Return type diff --git a/modules/openapi-generator/src/main/resources/Javascript-Apollo/api_test.mustache b/modules/openapi-generator/src/main/resources/Javascript-Apollo/api_test.mustache index e56b66d47e36e19fa04174bc279e9ce641c915a7..f04f1bc3cce731ab529dcf3afea8ed193b920afd 100644 --- a/modules/openapi-generator/src/main/resources/Javascript-Apollo/api_test.mustache +++ b/modules/openapi-generator/src/main/resources/Javascript-Apollo/api_test.mustache @@ -1,6 +1,6 @@ {{>licenseInfo}} // CommonJS-like environments that support module.exports, like Node. -factory(require('expect.js'), require(process.cwd()+'/src/{{#invokerPackage}}{{invokerPackage}}/{{/invokerPackage}}index')); +factory(require('expect.js'), require(process.cwd()+'/src/{{#invokerPackage}}{{.}}/{{/invokerPackage}}index')); 'use strict'; diff --git a/modules/openapi-generator/src/main/resources/Javascript-Apollo/git_push.sh.mustache b/modules/openapi-generator/src/main/resources/Javascript-Apollo/git_push.sh.mustache index 8b3f689c9121a65080ad038d37a2036b01e559a1..f0bed5bd84155f05bc3cdc67af008f524efb38a6 100644 --- a/modules/openapi-generator/src/main/resources/Javascript-Apollo/git_push.sh.mustache +++ b/modules/openapi-generator/src/main/resources/Javascript-Apollo/git_push.sh.mustache @@ -55,4 +55,3 @@ 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/Javascript-Apollo/index.mustache b/modules/openapi-generator/src/main/resources/Javascript-Apollo/index.mustache index 36b8a2032d140fd309a9e387592a47b33252742b..56213101a3407590130065d61a34ed927e7105bd 100644 --- a/modules/openapi-generator/src/main/resources/Javascript-Apollo/index.mustache +++ b/modules/openapi-generator/src/main/resources/Javascript-Apollo/index.mustache @@ -1,17 +1,17 @@ {{>licenseInfo}} import ApiClient from './ApiClient'; -{{#models}}import {{#model}}{{classFilename}}{{/model}} from './{{#modelPackage}}{{modelPackage}}/{{/modelPackage}}{{importPath}}'; -{{/models}}{{#apiInfo}}{{#apis}}import {{importPath}} from './{{#apiPackage}}{{apiPackage}}/{{/apiPackage}}{{importPath}}'; +{{#models}}import {{#model}}{{classFilename}}{{/model}} from './{{#modelPackage}}{{.}}/{{/modelPackage}}{{importPath}}'; +{{/models}}{{#apiInfo}}{{#apis}}import {{importPath}} from './{{#apiPackage}}{{.}}/{{/apiPackage}}{{importPath}}'; {{/apis}}{{/apiInfo}} {{#emitJSDoc}}/**{{#projectDescription}} -* {{projectDescription}}.<br>{{/projectDescription}} +* {{.}}.<br>{{/projectDescription}} * The <code>index</code> module provides access to constructors for all the classes which comprise the public API. * <p> * An AMD (recommended!) or CommonJS application will generally do something equivalent to the following: * <pre> -* var {{moduleName}} = require('{{#invokerPackage}}{{invokerPackage}}/{{/invokerPackage}}index'); // See note below*. +* var {{moduleName}} = require('{{#invokerPackage}}{{.}}/{{/invokerPackage}}index'); // See note below*. * var xxxSvc = new {{moduleName}}.XxxApi(); // Allocate the API class we're going to use. * var yyyModel = new {{moduleName}}.Yyy(); // Construct a model instance. * yyyModel.someProperty = 'someValue'; @@ -19,7 +19,7 @@ import ApiClient from './ApiClient'; * var zzz = xxxSvc.doSomething(yyyModel); // Invoke the service. * ... * </pre> -* <em>*NOTE: For a top-level AMD script, use require(['{{#invokerPackage}}{{invokerPackage}}/{{/invokerPackage}}index'], function(){...}) +* <em>*NOTE: For a top-level AMD script, use require(['{{#invokerPackage}}{{.}}/{{/invokerPackage}}index'], function(){...}) * and put the application logic within the callback function.</em> * </p> * <p> @@ -33,7 +33,7 @@ import ApiClient from './ApiClient'; * ... * </pre> * </p> -* @module {{#invokerPackage}}{{invokerPackage}}/{{/invokerPackage}}index +* @module {{#invokerPackage}}{{.}}/{{/invokerPackage}}index * @version {{projectVersion}} */{{/emitJSDoc}} export { diff --git a/modules/openapi-generator/src/main/resources/Javascript-Apollo/licenseInfo.mustache b/modules/openapi-generator/src/main/resources/Javascript-Apollo/licenseInfo.mustache index 40cac6d4a3c191a3411bd2bfb786fd67650e4ff2..2a386a24226d284abf4da422d663f7a0f7bec5f0 100644 --- a/modules/openapi-generator/src/main/resources/Javascript-Apollo/licenseInfo.mustache +++ b/modules/openapi-generator/src/main/resources/Javascript-Apollo/licenseInfo.mustache @@ -2,8 +2,8 @@ * {{{appName}}} * {{{appDescription}}} * - * {{#version}}The version of the OpenAPI document: {{{version}}}{{/version}} - * {{#infoEmail}}Contact: {{{infoEmail}}}{{/infoEmail}} + * {{#version}}The version of the OpenAPI document: {{{.}}}{{/version}} + * {{#infoEmail}}Contact: {{{.}}}{{/infoEmail}} * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech diff --git a/modules/openapi-generator/src/main/resources/Javascript-Apollo/model_doc.mustache b/modules/openapi-generator/src/main/resources/Javascript-Apollo/model_doc.mustache index 04ab6f949ac9be5fd57944e60dda464f4d87ae9e..fc21ae6e9f1fff21e5903f3ad7880c13416120e4 100644 --- a/modules/openapi-generator/src/main/resources/Javascript-Apollo/model_doc.mustache +++ b/modules/openapi-generator/src/main/resources/Javascript-Apollo/model_doc.mustache @@ -11,7 +11,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -{{#vars}}**{{name}}** | {{#isPrimitiveType}}**{{dataType}}**{{/isPrimitiveType}}{{^isPrimitiveType}}[**{{dataType}}**]({{complexType}}.md){{/isPrimitiveType}} | {{description}} | {{^required}}[optional] {{/required}}{{#isReadOnly}}[readonly] {{/isReadOnly}}{{#defaultValue}}[default to {{defaultValue}}]{{/defaultValue}} +{{#vars}}**{{name}}** | {{#isPrimitiveType}}**{{dataType}}**{{/isPrimitiveType}}{{^isPrimitiveType}}[**{{dataType}}**]({{complexType}}.md){{/isPrimitiveType}} | {{description}} | {{^required}}[optional] {{/required}}{{#isReadOnly}}[readonly] {{/isReadOnly}}{{#defaultValue}}[default to {{.}}]{{/defaultValue}} {{/vars}} {{#vars}}{{#isEnum}} diff --git a/modules/openapi-generator/src/main/resources/Javascript-Apollo/model_test.mustache b/modules/openapi-generator/src/main/resources/Javascript-Apollo/model_test.mustache index fb89dd9770303e13bc992f4510c92c07686ae71e..05a03a834590e7f87997368ebc568bbac494dd5f 100644 --- a/modules/openapi-generator/src/main/resources/Javascript-Apollo/model_test.mustache +++ b/modules/openapi-generator/src/main/resources/Javascript-Apollo/model_test.mustache @@ -2,10 +2,10 @@ (function(root, factory) { if (typeof define === 'function' && define.amd) { // AMD. - define(['expect.js', process.cwd()+'/src/{{#invokerPackage}}{{invokerPackage}}/{{/invokerPackage}}index'], factory); + define(['expect.js', process.cwd()+'/src/{{#invokerPackage}}{{.}}/{{/invokerPackage}}index'], factory); } else if (typeof module === 'object' && module.exports) { // CommonJS-like environments that support module.exports, like Node. - factory(require('expect.js'), require(process.cwd()+'/src/{{#invokerPackage}}{{invokerPackage}}/{{/invokerPackage}}index')); + factory(require('expect.js'), require(process.cwd()+'/src/{{#invokerPackage}}{{.}}/{{/invokerPackage}}index')); } else { // Browser globals (root is window) factory(root.expect, root.{{moduleName}}); diff --git a/modules/openapi-generator/src/main/resources/Javascript-Apollo/partial_model_generic.mustache b/modules/openapi-generator/src/main/resources/Javascript-Apollo/partial_model_generic.mustache index c16b43ec4d4d366f4d98ec394f1e60d78f633621..bc69d91c342398d7e85687d82d225a62fbc48544 100644 --- a/modules/openapi-generator/src/main/resources/Javascript-Apollo/partial_model_generic.mustache +++ b/modules/openapi-generator/src/main/resources/Javascript-Apollo/partial_model_generic.mustache @@ -1,7 +1,7 @@ {{#models}}{{#model}}{{#emitJSDoc}}/** * The {{classname}} model module. - * @module {{#invokerPackage}}{{invokerPackage}}/{{/invokerPackage}}{{#modelPackage}}{{modelPackage}}/{{/modelPackage}}{{classname}} + * @module {{#invokerPackage}}{{.}}/{{/invokerPackage}}{{#modelPackage}}{{.}}/{{/modelPackage}}{{classname}} * @version {{projectVersion}} */{{/emitJSDoc}} class {{classname}} {{#parent}}{{^parentModel}}{{#vendorExtensions.x-is-array}}extends Array {{/vendorExtensions.x-is-array}}{{/parentModel}}{{/parent}}{ @@ -9,9 +9,9 @@ class {{classname}} {{#parent}}{{^parentModel}}{{#vendorExtensions.x-is-array}}e {{#emitJSDoc}}/** * @member {{=< >=}}{<&vendorExtensions.x-jsdoc-type>}<={{ }}=> {{baseName}} * @type {{=< >=}}{<&vendorExtensions.x-jsdoc-type>}<={{ }}=>{{#defaultValue}} - * @default {{{defaultValue}}}{{/defaultValue}} + * @default {{{.}}}{{/defaultValue}} */{{/emitJSDoc}} - {{baseName}}{{#defaultValue}} = {{{defaultValue}}}{{/defaultValue}}; + {{baseName}}{{#defaultValue}} = {{{.}}}{{/defaultValue}}; {{/vars}} {{#useInheritance}}{{#interfaceModels}}{{#allVars}}{{#emitJSDoc}}/** @@ -23,11 +23,11 @@ class {{classname}} {{#parent}}{{^parentModel}}{{#vendorExtensions.x-is-array}}e {{#emitJSDoc}}/** * Constructs a new <code>{{classname}}</code>.{{#description}} - * {{description}}{{/description}} - * @alias module:{{#invokerPackage}}{{invokerPackage}}/{{/invokerPackage}}{{#modelPackage}}{{modelPackage}}/{{/modelPackage}}{{classname}}{{#useInheritance}}{{#parent}} - * @extends {{#parentModel}}module:{{#invokerPackage}}{{invokerPackage}}/{{/invokerPackage}}{{#modelPackage}}{{modelPackage}}/{{/modelPackage}}{{classname}}{{/parentModel}}{{^parentModel}}{{#vendorExtensions.x-is-array}}Array{{/vendorExtensions.x-is-array}}{{#vendorExtensions.x-is-map}}Object{{/vendorExtensions.x-is-map}}{{/parentModel}}{{/parent}}{{#interfaces}} - * @implements module:{{#invokerPackage}}{{invokerPackage}}/{{/invokerPackage}}{{#modelPackage}}{{modelPackage}}/{{/modelPackage}}{{.}}{{/interfaces}}{{/useInheritance}}{{#vendorExtensions.x-all-required}} - * @param {{name}} {{=< >=}}{<&vendorExtensions.x-jsdoc-type>}<={{ }}=> {{#description}}{{{description}}}{{/description}}{{/vendorExtensions.x-all-required}} + * {{.}}{{/description}} + * @alias module:{{#invokerPackage}}{{.}}/{{/invokerPackage}}{{#modelPackage}}{{.}}/{{/modelPackage}}{{classname}}{{#useInheritance}}{{#parent}} + * @extends {{#parentModel}}module:{{#invokerPackage}}{{.}}/{{/invokerPackage}}{{#modelPackage}}{{.}}/{{/modelPackage}}{{classname}}{{/parentModel}}{{^parentModel}}{{#vendorExtensions.x-is-array}}Array{{/vendorExtensions.x-is-array}}{{#vendorExtensions.x-is-map}}Object{{/vendorExtensions.x-is-map}}{{/parentModel}}{{/parent}}{{#interfaces}} + * @implements module:{{#invokerPackage}}{{.}}/{{/invokerPackage}}{{#modelPackage}}{{.}}/{{/modelPackage}}{{.}}{{/interfaces}}{{/useInheritance}}{{#vendorExtensions.x-all-required}} + * @param {{name}} {{=< >=}}{<&vendorExtensions.x-jsdoc-type>}<={{ }}=> {{{description}}}{{/vendorExtensions.x-all-required}} */{{/emitJSDoc}} constructor({{#vendorExtensions.x-all-required}}{{name}}{{^-last}}, {{/-last}}{{/vendorExtensions.x-all-required}}) { {{#parent}}{{^parentModel}}{{#vendorExtensions.x-is-array}} super(); diff --git a/modules/openapi-generator/src/main/resources/Javascript-Closure-Angular/api.mustache b/modules/openapi-generator/src/main/resources/Javascript-Closure-Angular/api.mustache index 069668e480c02aa6d175c5b652c0434f70781522..41a6f09bedeba339a7e80af7e3b1598df52edd92 100644 --- a/modules/openapi-generator/src/main/resources/Javascript-Closure-Angular/api.mustache +++ b/modules/openapi-generator/src/main/resources/Javascript-Closure-Angular/api.mustache @@ -4,8 +4,8 @@ * generated.{{#appDescription}} * * {{ appDescription }}{{/appDescription}}{{#version}} - * Version: {{version}}{{/version}}{{#appContact}} - * Contact: {{appContact}}{{/appContact}} + * Version: {{.}}{{/version}}{{#appContact}} + * Contact: {{.}}{{/appContact}} {{^hideGenerationTimestamp}} * Generated at: {{generatedDate}} {{/hideGenerationTimestamp}} @@ -13,7 +13,7 @@ */{{#licenseInfo}} /** * @license {{licenseInfo}}{{#licenseUrl}} - * {{licenseUrl}}{{/licenseUrl}} + * {{.}}{{/licenseUrl}} */ {{/licenseInfo}} @@ -60,7 +60,7 @@ goog.require('{{import}}'); * {{notes}}{{#allParams}} * @param {!{{{dataType}}}{{^required}}={{/required}}} {{^required}}opt_{{/required}}{{paramName}} {{description}}{{/allParams}} * @param {!angular.$http.Config=} opt_extraHttpRequestParams Extra HTTP parameters to send. - * @return {!angular.$q.Promise{{#returnType}}<!{{{returnType}}}>{{/returnType}}} + * @return {!angular.$q.Promise{{#returnType}}<!{{{.}}}>{{/returnType}}} */ {{package}}.{{classname}}.prototype.{{nickname}} = function({{#allParams}}{{^required}}opt_{{/required}}{{paramName}}, {{/allParams}}opt_extraHttpRequestParams) { /** @const {string} */ diff --git a/modules/openapi-generator/src/main/resources/Javascript-Closure-Angular/es6/api.mustache b/modules/openapi-generator/src/main/resources/Javascript-Closure-Angular/es6/api.mustache index ffb87706783656bc49eb59b5434d1621abd8aa8d..17a5c8c446aa24be4c9bb03da01565353a15caff 100644 --- a/modules/openapi-generator/src/main/resources/Javascript-Closure-Angular/es6/api.mustache +++ b/modules/openapi-generator/src/main/resources/Javascript-Closure-Angular/es6/api.mustache @@ -4,8 +4,8 @@ * generated.{{#appDescription}} * * {{ appDescription }}{{/appDescription}}{{#version}} - * Version: {{version}}{{/version}}{{#appContact}} - * Contact: {{appContact}}{{/appContact}} + * Version: {{.}}{{/version}}{{#appContact}} + * Contact: {{.}}{{/appContact}} {{^hideGenerationTimestamp}} * Generated at: {{generatedDate}} {{/hideGenerationTimestamp}} @@ -13,7 +13,7 @@ */{{#licenseInfo}} /** * @license {{licenseInfo}}{{#licenseUrl}} - * {{licenseUrl}}{{/licenseUrl}} + * {{.}}{{/licenseUrl}} */ {{/licenseInfo}} diff --git a/modules/openapi-generator/src/main/resources/Javascript-Closure-Angular/model.mustache b/modules/openapi-generator/src/main/resources/Javascript-Closure-Angular/model.mustache index 97b9574f04c82117682dce2573d6ee2f98d3efd2..ef59e84148fdd9bd819496737d46b84a815da8d2 100644 --- a/modules/openapi-generator/src/main/resources/Javascript-Closure-Angular/model.mustache +++ b/modules/openapi-generator/src/main/resources/Javascript-Closure-Angular/model.mustache @@ -8,7 +8,7 @@ goog.provide('{{package}}.{{name}}'); {{#model}} /** {{#description}} - * {{{description}}} + * {{{.}}} {{/description}} * @record */ @@ -17,7 +17,7 @@ goog.provide('{{package}}.{{name}}'); /** {{#description}} - * {{{description}}} + * {{{.}}} {{/description}} {{! Explicitly force types to be non-nullable using !. This is redundant but valid }} * @type {!{{{dataType}}}} diff --git a/modules/openapi-generator/src/main/resources/Javascript-Flowtyped/api.mustache b/modules/openapi-generator/src/main/resources/Javascript-Flowtyped/api.mustache index ccfed6298ec5aab232e4c510794ba340b4a11b93..94c168b551bbe29b9789f09dbd890af2968e331f 100644 --- a/modules/openapi-generator/src/main/resources/Javascript-Flowtyped/api.mustache +++ b/modules/openapi-generator/src/main/resources/Javascript-Flowtyped/api.mustache @@ -226,13 +226,13 @@ export const {{classname}}FetchParamCreator = function (configuration?: Configur }; export type {{classname}}Type = { {{#operation}} - {{operationId}}({{#allParams}}{{paramName}}{{^required}}?{{/required}}: {{{dataType}}}, {{/allParams}}options?: RequestOptions): Promise<{{#returnType}}{{{returnType}}}{{/returnType}}{{^returnType}}Response{{/returnType}}>, + {{operationId}}({{#allParams}}{{paramName}}{{^required}}?{{/required}}: {{{dataType}}}, {{/allParams}}options?: RequestOptions): Promise<{{{returnType}}}{{^returnType}}Response{{/returnType}}>, {{/operation}} } /** * {{classname}} - factory function to inject configuration {{#description}} - * {{{description}}}{{/description}} + * {{{.}}}{{/description}} * @export */ export const {{classname}} = function(configuration?: Configuration, fetch: FetchAPI = portableFetch): {{classname}}Type { @@ -246,7 +246,7 @@ export const {{classname}} = function(configuration?: Configuration, fetch: Fetc {{/summary}} * @throws {RequiredError} */ - {{operationId}}({{#allParams}}{{paramName}}{{^required}}?{{/required}}: {{{dataType}}}, {{/allParams}}options?: RequestOptions = {}): Promise<{{#returnType}}{{{returnType}}}{{/returnType}}{{^returnType}}Response{{/returnType}}> { + {{operationId}}({{#allParams}}{{paramName}}{{^required}}?{{/required}}: {{{dataType}}}, {{/allParams}}options?: RequestOptions = {}): Promise<{{{returnType}}}{{^returnType}}Response{{/returnType}}> { const localVarFetchArgs = {{classname}}FetchParamCreator(configuration).{{operationId}}({{#allParams}}{{paramName}}, {{/allParams}}options); return fetch(basePath + localVarFetchArgs.url, localVarFetchArgs.options).then((response) => { if (response.status >= 200 && response.status < 300) { diff --git a/modules/openapi-generator/src/main/resources/Javascript-Flowtyped/licenseInfo.mustache b/modules/openapi-generator/src/main/resources/Javascript-Flowtyped/licenseInfo.mustache index 38c3c518887374924457e2b21f6582f9167d1d8a..05f68fbd3f03740607cc9f8862377de3063463af 100644 --- a/modules/openapi-generator/src/main/resources/Javascript-Flowtyped/licenseInfo.mustache +++ b/modules/openapi-generator/src/main/resources/Javascript-Flowtyped/licenseInfo.mustache @@ -3,10 +3,10 @@ * {{{appDescription}}} * {{#version}} - * The version of the OpenAPI document: {{{version}}} + * The version of the OpenAPI document: {{{.}}} {{/version}} {{#infoEmail}} - * Contact: {{{infoEmail}}} + * Contact: {{{.}}} {{/infoEmail}} * * NOTE: This class is auto generated by OpenAPI-Generator diff --git a/modules/openapi-generator/src/main/resources/Javascript-Flowtyped/modelGeneric.mustache b/modules/openapi-generator/src/main/resources/Javascript-Flowtyped/modelGeneric.mustache index 143ca85238c4ff858da7c0fad90164f7a629e8a9..1ed248653dbd9323269884de0b5b9186398a75d1 100644 --- a/modules/openapi-generator/src/main/resources/Javascript-Flowtyped/modelGeneric.mustache +++ b/modules/openapi-generator/src/main/resources/Javascript-Flowtyped/modelGeneric.mustache @@ -23,5 +23,4 @@ export type {{classname}} = { */ {{name}}{{^required}}?{{/required}}: {{#isEnum}}{{{datatypeWithEnum}}}{{/isEnum}}{{^isEnum}}{{{datatype}}}{{/isEnum}}; {{/vars}} -}{{#parent}} & {{parent}}{{/parent}} - +}{{#parent}} & {{.}}{{/parent}} diff --git a/modules/openapi-generator/src/main/resources/Javascript/ApiClient.mustache b/modules/openapi-generator/src/main/resources/Javascript/ApiClient.mustache index 49f0c1f17e078021561f73fd29e60ccc2f253777..eebfd6bd884d224c9ac352c07b96c721aa997b01 100644 --- a/modules/openapi-generator/src/main/resources/Javascript/ApiClient.mustache +++ b/modules/openapi-generator/src/main/resources/Javascript/ApiClient.mustache @@ -17,7 +17,7 @@ 'use strict'; {{#emitJSDoc}} /** - * @module {{#invokerPackage}}{{invokerPackage}}/{{/invokerPackage}}ApiClient + * @module {{#invokerPackage}}{{.}}/{{/invokerPackage}}ApiClient * @version {{projectVersion}} */ @@ -25,7 +25,7 @@ * Manages low level client-server communications, parameter marshalling, etc. There should not be any need for an * application to use this class directly - the *Api and model classes provide the public API for the service. The * contents of this file should be regarded as internal but are documented for completeness. - * @alias module:{{#invokerPackage}}{{invokerPackage}}/{{/invokerPackage}}ApiClient + * @alias module:{{#invokerPackage}}{{.}}/{{/invokerPackage}}ApiClient * @class */ {{/emitJSDoc}} var exports = function() { @@ -296,7 +296,7 @@ /** * Builds a string representation of an array-type actual parameter, according to the given collection format. * @param {Array} param An array parameter. - * @param {module:{{#invokerPackage}}{{invokerPackage}}/{{/invokerPackage}}ApiClient.CollectionFormatEnum} collectionFormat The array element separator strategy. + * @param {module:{{#invokerPackage}}{{.}}/{{/invokerPackage}}ApiClient.CollectionFormatEnum} collectionFormat The array element separator strategy. * @returns {String|Array} A string representation of the supplied collection, using the specified delimiter. Returns * <code>param</code> as is if <code>collectionFormat</code> is <code>multi</code>. */ @@ -397,7 +397,7 @@ {{#emitJSDoc}}{{^usePromises}} /** * Callback function to receive the result of the operation. - * @callback module:{{#invokerPackage}}{{invokerPackage}}/{{/invokerPackage}}ApiClient~callApiCallback + * @callback module:{{#invokerPackage}}{{.}}/{{/invokerPackage}}ApiClient~callApiCallback * @param {String} error Error message, if any. * @param data The data returned by the service call. * @param {String} response The complete HTTP response. @@ -418,7 +418,7 @@ * @param {Array.<String>} accepts An array of acceptable response MIME types. * @param {(String|Array|ObjectFunction)} returnType The required type to return; can be a string for simple types or the * constructor for a complex type.{{^usePromises}} - * @param {module:{{#invokerPackage}}{{invokerPackage}}/{{/invokerPackage}}ApiClient~callApiCallback} callback The callback function.{{/usePromises}} + * @param {module:{{#invokerPackage}}{{.}}/{{/invokerPackage}}ApiClient~callApiCallback} callback The callback function.{{/usePromises}} * @returns {{#usePromises}}{Promise} A {@link https://www.promisejs.org/|Promise} object{{/usePromises}}{{^usePromises}}{Object} The SuperAgent request object{{/usePromises}}. */ {{/emitJSDoc}} exports.prototype.callApi = function callApi(path, httpMethod, pathParams, @@ -734,7 +734,7 @@ {{#emitJSDoc}} /** * The default API client implementation. - * @type {module:{{#invokerPackage}}{{invokerPackage}}/{{/invokerPackage}}ApiClient} + * @type {module:{{#invokerPackage}}{{.}}/{{/invokerPackage}}ApiClient} */ {{/emitJSDoc}} exports.instance = new exports(); diff --git a/modules/openapi-generator/src/main/resources/Javascript/README.mustache b/modules/openapi-generator/src/main/resources/Javascript/README.mustache index fccb79dce5b64992948b0a8d48066e905536b935..fbf461bdde46a4e64783ff1daf0010bc780c2df2 100644 --- a/modules/openapi-generator/src/main/resources/Javascript/README.mustache +++ b/modules/openapi-generator/src/main/resources/Javascript/README.mustache @@ -2,7 +2,7 @@ {{moduleName}} - JavaScript client for {{projectName}} {{#appDescriptionWithNewLines}} -{{{appDescriptionWithNewLines}}} +{{{.}}} {{/appDescriptionWithNewLines}} This SDK is automatically generated by the [OpenAPI Generator](https://openapi-generator.tech) project: @@ -54,11 +54,11 @@ You should now be able to `require('{{{projectName}}}')` in javascript files fro ### git -If the library is hosted at a git repository, e.g. https://github.com/{{#gitUserId}}{{.}}{{/gitUserId}}{{^gitUserId}}YOUR_USERNAME{{/gitUserId}}/{{#gitRepoId}}{{.}}{{/gitRepoId}}{{^gitRepoId}}{{projectName}}{{/gitRepoId}} +If the library is hosted at a git repository, e.g. https://github.com/{{gitUserId}}{{^gitUserId}}YOUR_USERNAME{{/gitUserId}}/{{gitRepoId}}{{^gitRepoId}}{{projectName}}{{/gitRepoId}} then install it via: ```shell - npm install {{#gitUserId}}{{.}}{{/gitUserId}}{{^gitUserId}}YOUR_USERNAME{{/gitUserId}}/{{#gitRepoId}}{{.}}{{/gitRepoId}}{{^gitRepoId}}{{projectName}}{{/gitRepoId}} --save + npm install {{gitUserId}}{{^gitUserId}}YOUR_USERNAME{{/gitUserId}}/{{gitRepoId}}{{^gitRepoId}}{{projectName}}{{/gitRepoId}} --save ``` ### For browser @@ -167,7 +167,7 @@ All URIs are relative to *{{basePath}}* Class | Method | HTTP request | Description ------------ | ------------- | ------------- | ------------- -{{#apiInfo}}{{#apis}}{{#operations}}{{#operation}}*{{moduleName}}.{{classname}}* | [**{{operationId}}**]({{apiDocPath}}{{classname}}.md#{{operationId}}) | **{{httpMethod}}** {{path}} | {{#summary}}{{summary}}{{/summary}} +{{#apiInfo}}{{#apis}}{{#operations}}{{#operation}}*{{moduleName}}.{{classname}}* | [**{{operationId}}**]({{apiDocPath}}{{classname}}.md#{{operationId}}) | **{{httpMethod}}** {{path}} | {{summary}} {{/operation}}{{/operations}}{{/apis}}{{/apiInfo}} ## Documentation for Models diff --git a/modules/openapi-generator/src/main/resources/Javascript/api_doc.mustache b/modules/openapi-generator/src/main/resources/Javascript/api_doc.mustache index b934e0042d1e718c7319757bd3e166f0976b3894..05a9d1e042c845c496e9450755678013cd0aa112 100644 --- a/modules/openapi-generator/src/main/resources/Javascript/api_doc.mustache +++ b/modules/openapi-generator/src/main/resources/Javascript/api_doc.mustache @@ -1,12 +1,12 @@ # {{moduleName}}.{{classname}}{{#description}} -{{description}}{{/description}} +{{.}}{{/description}} All URIs are relative to *{{basePath}}* Method | HTTP request | Description ------------- | ------------- | ------------- -{{#operations}}{{#operation}}[**{{operationId}}**]({{classname}}.md#{{operationId}}) | **{{httpMethod}}** {{path}} | {{#summary}}{{summary}}{{/summary}} +{{#operations}}{{#operation}}[**{{operationId}}**]({{classname}}.md#{{operationId}}) | **{{httpMethod}}** {{path}} | {{summary}} {{/operation}}{{/operations}} {{#operations}} @@ -14,11 +14,11 @@ Method | HTTP request | Description ## {{operationId}} -> {{#returnType}}{{returnType}} {{/returnType}}{{operationId}}({{#requiredParams}}{{{paramName}}}{{^-last}}, {{/-last}}{{/requiredParams}}{{#optionalParams}}{{#-last}}{{#hasRequiredParams}}, {{/hasRequiredParams}}opts{{/-last}}{{/optionalParams}}) +> {{#returnType}}{{.}} {{/returnType}}{{operationId}}({{#requiredParams}}{{{paramName}}}{{^-last}}, {{/-last}}{{/requiredParams}}{{#optionalParams}}{{#-last}}{{#hasRequiredParams}}, {{/hasRequiredParams}}opts{{/-last}}{{/optionalParams}}) {{summary}}{{#notes}} -{{notes}}{{/notes}} +{{.}}{{/notes}} ### Example @@ -94,7 +94,7 @@ apiInstance.{{{operationId}}}({{#requiredParams}}{{{paramName}}}{{^-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}}{{#defaultValue}}[default to {{defaultValue}}]{{/defaultValue}} +{{#allParams}} **{{paramName}}** | {{#isPrimitiveType}}**{{dataType}}**{{/isPrimitiveType}}{{^isPrimitiveType}}{{#isFile}}**{{dataType}}**{{/isFile}}{{^isFile}}[**{{dataType}}**]({{baseType}}.md){{/isFile}}{{/isPrimitiveType}}| {{description}} | {{^required}}[optional] {{/required}}{{#defaultValue}}[default to {{.}}]{{/defaultValue}} {{/allParams}} ### Return type diff --git a/modules/openapi-generator/src/main/resources/Javascript/api_test.mustache b/modules/openapi-generator/src/main/resources/Javascript/api_test.mustache index 1107702d3fa57bdba9ef5d6b05fd8bdce2eca0ca..398e3041a718e986d452687430c0eb026001a3cf 100644 --- a/modules/openapi-generator/src/main/resources/Javascript/api_test.mustache +++ b/modules/openapi-generator/src/main/resources/Javascript/api_test.mustache @@ -2,10 +2,10 @@ (function(root, factory) { if (typeof define === 'function' && define.amd) { // AMD. - define(['expect.js', process.cwd()+'/src/{{#invokerPackage}}{{invokerPackage}}/{{/invokerPackage}}index'], factory); + define(['expect.js', process.cwd()+'/src/{{#invokerPackage}}{{.}}/{{/invokerPackage}}index'], factory); } else if (typeof module === 'object' && module.exports) { // CommonJS-like environments that support module.exports, like Node. - factory(require('expect.js'), require(process.cwd()+'/src/{{#invokerPackage}}{{invokerPackage}}/{{/invokerPackage}}index')); + factory(require('expect.js'), require(process.cwd()+'/src/{{#invokerPackage}}{{.}}/{{/invokerPackage}}index')); } else { // Browser globals (root is window) factory(root.expect, root.{{moduleName}}); diff --git a/modules/openapi-generator/src/main/resources/Javascript/es6/ApiClient.mustache b/modules/openapi-generator/src/main/resources/Javascript/es6/ApiClient.mustache index 35325e5276dfffdce2446dadb07d0c684b448886..de2134ade06d7b27712735677883a25b319b44c1 100644 --- a/modules/openapi-generator/src/main/resources/Javascript/es6/ApiClient.mustache +++ b/modules/openapi-generator/src/main/resources/Javascript/es6/ApiClient.mustache @@ -4,7 +4,7 @@ import superagent from "superagent"; import querystring from "querystring"; {{#emitJSDoc}}/** -* @module {{#invokerPackage}}{{invokerPackage}}/{{/invokerPackage}}ApiClient +* @module {{#invokerPackage}}{{.}}/{{/invokerPackage}}ApiClient * @version {{projectVersion}} */ @@ -12,7 +12,7 @@ import querystring from "querystring"; * Manages low level client-server communications, parameter marshalling, etc. There should not be any need for an * application to use this class directly - the *Api and model classes provide the public API for the service. The * contents of this file should be regarded as internal but are documented for completeness. -* @alias module:{{#invokerPackage}}{{invokerPackage}}/{{/invokerPackage}}ApiClient +* @alias module:{{#invokerPackage}}{{.}}/{{/invokerPackage}}ApiClient * @class */{{/emitJSDoc}} class ApiClient { @@ -53,7 +53,7 @@ class ApiClient { * @default {} */{{/emitJSDoc}} this.defaultHeaders = { - 'User-Agent': '{{#httpUserAgent}}{{{.}}}{{/httpUserAgent}}{{^httpUserAgent}}OpenAPI-Generator/{{projectVersion}}/Javascript{{/httpUserAgent}}' + 'User-Agent': '{{{httpUserAgent}}}{{^httpUserAgent}}OpenAPI-Generator/{{projectVersion}}/Javascript{{/httpUserAgent}}' }; /** @@ -264,7 +264,7 @@ class ApiClient { {{#emitJSDoc}}/** * Builds a string representation of an array-type actual parameter, according to the given collection format. * @param {Array} param An array parameter. - * @param {module:{{#invokerPackage}}{{invokerPackage}}/{{/invokerPackage}}ApiClient.CollectionFormatEnum} collectionFormat The array element separator strategy. + * @param {module:{{#invokerPackage}}{{.}}/{{/invokerPackage}}ApiClient.CollectionFormatEnum} collectionFormat The array element separator strategy. * @returns {String|Array} A string representation of the supplied collection, using the specified delimiter. Returns * <code>param</code> as is if <code>collectionFormat</code> is <code>multi</code>. */{{/emitJSDoc}} @@ -375,7 +375,7 @@ class ApiClient { {{^usePromises}} /** * Callback function to receive the result of the operation. - * @callback module:{{#invokerPackage}}{{invokerPackage}}/{{/invokerPackage}}ApiClient~callApiCallback + * @callback module:{{#invokerPackage}}{{.}}/{{/invokerPackage}}ApiClient~callApiCallback * @param {String} error Error message, if any. * @param data The data returned by the service call. * @param {String} response The complete HTTP response. @@ -400,7 +400,7 @@ class ApiClient { * constructor for a complex type. * @param {String} apiBasePath base path defined in the operation/path level to override the default one {{^usePromises}} - * @param {module:{{#invokerPackage}}{{invokerPackage}}/{{/invokerPackage}}ApiClient~callApiCallback} callback The callback function. + * @param {module:{{#invokerPackage}}{{.}}/{{/invokerPackage}}ApiClient~callApiCallback} callback The callback function. {{/usePromises}} * @returns {{#usePromises}}{Promise} A {@link https://www.promisejs.org/|Promise} object{{/usePromises}}{{^usePromises}}{Object} The SuperAgent request object{{/usePromises}}. */ @@ -755,7 +755,7 @@ ApiClient.CollectionFormatEnum = { {{#emitJSDoc}}/** * The default API client implementation. -* @type {module:{{#invokerPackage}}{{invokerPackage}}/{{/invokerPackage}}ApiClient} +* @type {module:{{#invokerPackage}}{{.}}/{{/invokerPackage}}ApiClient} */{{/emitJSDoc}} ApiClient.instance = new ApiClient(); export default ApiClient; diff --git a/modules/openapi-generator/src/main/resources/Javascript/es6/README.mustache b/modules/openapi-generator/src/main/resources/Javascript/es6/README.mustache index dd4a6721a2d7b0f1dc789e5fd39c3c3d5ac63916..0ac4e62d2f53227278fdc9484e8ecf90056b25d4 100644 --- a/modules/openapi-generator/src/main/resources/Javascript/es6/README.mustache +++ b/modules/openapi-generator/src/main/resources/Javascript/es6/README.mustache @@ -2,7 +2,7 @@ {{moduleName}} - JavaScript client for {{projectName}} {{#appDescriptionWithNewLines}} -{{{appDescriptionWithNewLines}}} +{{{.}}} {{/appDescriptionWithNewLines}} This SDK is automatically generated by the [OpenAPI Generator](https://openapi-generator.tech) project: @@ -64,11 +64,11 @@ npm run build #### git -If the library is hosted at a git repository, e.g.https://github.com/{{#gitUserId}}{{.}}{{/gitUserId}}{{^gitUserId}}YOUR_USERNAME{{/gitUserId}}/{{#gitRepoId}}{{.}}{{/gitRepoId}}{{^gitRepoId}}{{projectName}}{{/gitRepoId}} +If the library is hosted at a git repository, e.g.https://github.com/{{gitUserId}}{{^gitUserId}}YOUR_USERNAME{{/gitUserId}}/{{gitRepoId}}{{^gitRepoId}}{{projectName}}{{/gitRepoId}} then install it via: ```shell - npm install {{#gitUserId}}{{.}}{{/gitUserId}}{{^gitUserId}}YOUR_USERNAME{{/gitUserId}}/{{#gitRepoId}}{{.}}{{/gitRepoId}}{{^gitRepoId}}{{projectName}}{{/gitRepoId}} --save + npm install {{gitUserId}}{{^gitUserId}}YOUR_USERNAME{{/gitUserId}}/{{gitRepoId}}{{^gitRepoId}}{{projectName}}{{/gitRepoId}} --save ``` ### For browser @@ -181,7 +181,7 @@ All URIs are relative to *{{basePath}}* Class | Method | HTTP request | Description ------------ | ------------- | ------------- | ------------- -{{#apiInfo}}{{#apis}}{{#operations}}{{#operation}}*{{moduleName}}.{{classname}}* | [**{{operationId}}**]({{apiDocPath}}{{classname}}.md#{{operationId}}) | **{{httpMethod}}** {{path}} | {{#summary}}{{summary}}{{/summary}} +{{#apiInfo}}{{#apis}}{{#operations}}{{#operation}}*{{moduleName}}.{{classname}}* | [**{{operationId}}**]({{apiDocPath}}{{classname}}.md#{{operationId}}) | **{{httpMethod}}** {{path}} | {{summary}} {{/operation}}{{/operations}}{{/apis}}{{/apiInfo}} ## Documentation for Models diff --git a/modules/openapi-generator/src/main/resources/Javascript/es6/api_doc.mustache b/modules/openapi-generator/src/main/resources/Javascript/es6/api_doc.mustache index ab08ff8495b6c5e3116c629c82873c91b6a1fc98..0a68747b73d76c3355a0f743e07b6d44accb79ac 100644 --- a/modules/openapi-generator/src/main/resources/Javascript/es6/api_doc.mustache +++ b/modules/openapi-generator/src/main/resources/Javascript/es6/api_doc.mustache @@ -1,12 +1,12 @@ # {{moduleName}}.{{classname}}{{#description}} -{{description}}{{/description}} +{{.}}{{/description}} All URIs are relative to *{{basePath}}* Method | HTTP request | Description ------------- | ------------- | ------------- -{{#operations}}{{#operation}}[**{{operationId}}**]({{classname}}.md#{{operationId}}) | **{{httpMethod}}** {{path}} | {{#summary}}{{summary}}{{/summary}} +{{#operations}}{{#operation}}[**{{operationId}}**]({{classname}}.md#{{operationId}}) | **{{httpMethod}}** {{path}} | {{summary}} {{/operation}}{{/operations}} {{#operations}} @@ -14,11 +14,11 @@ Method | HTTP request | Description ## {{operationId}} -> {{#returnType}}{{returnType}} {{/returnType}}{{operationId}}({{#requiredParams}}{{{paramName}}}{{^-last}}, {{/-last}}{{/requiredParams}}{{#optionalParams}}{{#-last}}{{#hasRequiredParams}}, {{/hasRequiredParams}}opts{{/-last}}{{/optionalParams}}) +> {{#returnType}}{{.}} {{/returnType}}{{operationId}}({{#requiredParams}}{{{paramName}}}{{^-last}}, {{/-last}}{{/requiredParams}}{{#optionalParams}}{{#-last}}{{#hasRequiredParams}}, {{/hasRequiredParams}}opts{{/-last}}{{/optionalParams}}) {{summary}}{{#notes}} -{{notes}}{{/notes}} +{{.}}{{/notes}} ### Example @@ -92,7 +92,7 @@ apiInstance.{{{operationId}}}({{#requiredParams}}{{{paramName}}}{{^-last}}, {{/- {{^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}}{{#defaultValue}}[default to {{defaultValue}}]{{/defaultValue}} +{{#allParams}} **{{paramName}}** | {{#isPrimitiveType}}**{{dataType}}**{{/isPrimitiveType}}{{^isPrimitiveType}}{{#isFile}}**{{dataType}}**{{/isFile}}{{^isFile}}[**{{dataType}}**]({{baseType}}.md){{/isFile}}{{/isPrimitiveType}}| {{description}} | {{^required}}[optional] {{/required}}{{#defaultValue}}[default to {{.}}]{{/defaultValue}} {{/allParams}} ### Return type diff --git a/modules/openapi-generator/src/main/resources/Javascript/es6/api_test.mustache b/modules/openapi-generator/src/main/resources/Javascript/es6/api_test.mustache index 1107702d3fa57bdba9ef5d6b05fd8bdce2eca0ca..398e3041a718e986d452687430c0eb026001a3cf 100644 --- a/modules/openapi-generator/src/main/resources/Javascript/es6/api_test.mustache +++ b/modules/openapi-generator/src/main/resources/Javascript/es6/api_test.mustache @@ -2,10 +2,10 @@ (function(root, factory) { if (typeof define === 'function' && define.amd) { // AMD. - define(['expect.js', process.cwd()+'/src/{{#invokerPackage}}{{invokerPackage}}/{{/invokerPackage}}index'], factory); + define(['expect.js', process.cwd()+'/src/{{#invokerPackage}}{{.}}/{{/invokerPackage}}index'], factory); } else if (typeof module === 'object' && module.exports) { // CommonJS-like environments that support module.exports, like Node. - factory(require('expect.js'), require(process.cwd()+'/src/{{#invokerPackage}}{{invokerPackage}}/{{/invokerPackage}}index')); + factory(require('expect.js'), require(process.cwd()+'/src/{{#invokerPackage}}{{.}}/{{/invokerPackage}}index')); } else { // Browser globals (root is window) factory(root.expect, root.{{moduleName}}); diff --git a/modules/openapi-generator/src/main/resources/Javascript/es6/git_push.sh.mustache b/modules/openapi-generator/src/main/resources/Javascript/es6/git_push.sh.mustache index 8b3f689c9121a65080ad038d37a2036b01e559a1..f0bed5bd84155f05bc3cdc67af008f524efb38a6 100644 --- a/modules/openapi-generator/src/main/resources/Javascript/es6/git_push.sh.mustache +++ b/modules/openapi-generator/src/main/resources/Javascript/es6/git_push.sh.mustache @@ -55,4 +55,3 @@ 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/Javascript/es6/index.mustache b/modules/openapi-generator/src/main/resources/Javascript/es6/index.mustache index 36b8a2032d140fd309a9e387592a47b33252742b..56213101a3407590130065d61a34ed927e7105bd 100644 --- a/modules/openapi-generator/src/main/resources/Javascript/es6/index.mustache +++ b/modules/openapi-generator/src/main/resources/Javascript/es6/index.mustache @@ -1,17 +1,17 @@ {{>licenseInfo}} import ApiClient from './ApiClient'; -{{#models}}import {{#model}}{{classFilename}}{{/model}} from './{{#modelPackage}}{{modelPackage}}/{{/modelPackage}}{{importPath}}'; -{{/models}}{{#apiInfo}}{{#apis}}import {{importPath}} from './{{#apiPackage}}{{apiPackage}}/{{/apiPackage}}{{importPath}}'; +{{#models}}import {{#model}}{{classFilename}}{{/model}} from './{{#modelPackage}}{{.}}/{{/modelPackage}}{{importPath}}'; +{{/models}}{{#apiInfo}}{{#apis}}import {{importPath}} from './{{#apiPackage}}{{.}}/{{/apiPackage}}{{importPath}}'; {{/apis}}{{/apiInfo}} {{#emitJSDoc}}/**{{#projectDescription}} -* {{projectDescription}}.<br>{{/projectDescription}} +* {{.}}.<br>{{/projectDescription}} * The <code>index</code> module provides access to constructors for all the classes which comprise the public API. * <p> * An AMD (recommended!) or CommonJS application will generally do something equivalent to the following: * <pre> -* var {{moduleName}} = require('{{#invokerPackage}}{{invokerPackage}}/{{/invokerPackage}}index'); // See note below*. +* var {{moduleName}} = require('{{#invokerPackage}}{{.}}/{{/invokerPackage}}index'); // See note below*. * var xxxSvc = new {{moduleName}}.XxxApi(); // Allocate the API class we're going to use. * var yyyModel = new {{moduleName}}.Yyy(); // Construct a model instance. * yyyModel.someProperty = 'someValue'; @@ -19,7 +19,7 @@ import ApiClient from './ApiClient'; * var zzz = xxxSvc.doSomething(yyyModel); // Invoke the service. * ... * </pre> -* <em>*NOTE: For a top-level AMD script, use require(['{{#invokerPackage}}{{invokerPackage}}/{{/invokerPackage}}index'], function(){...}) +* <em>*NOTE: For a top-level AMD script, use require(['{{#invokerPackage}}{{.}}/{{/invokerPackage}}index'], function(){...}) * and put the application logic within the callback function.</em> * </p> * <p> @@ -33,7 +33,7 @@ import ApiClient from './ApiClient'; * ... * </pre> * </p> -* @module {{#invokerPackage}}{{invokerPackage}}/{{/invokerPackage}}index +* @module {{#invokerPackage}}{{.}}/{{/invokerPackage}}index * @version {{projectVersion}} */{{/emitJSDoc}} export { diff --git a/modules/openapi-generator/src/main/resources/Javascript/es6/licenseInfo.mustache b/modules/openapi-generator/src/main/resources/Javascript/es6/licenseInfo.mustache index 40cac6d4a3c191a3411bd2bfb786fd67650e4ff2..2a386a24226d284abf4da422d663f7a0f7bec5f0 100644 --- a/modules/openapi-generator/src/main/resources/Javascript/es6/licenseInfo.mustache +++ b/modules/openapi-generator/src/main/resources/Javascript/es6/licenseInfo.mustache @@ -2,8 +2,8 @@ * {{{appName}}} * {{{appDescription}}} * - * {{#version}}The version of the OpenAPI document: {{{version}}}{{/version}} - * {{#infoEmail}}Contact: {{{infoEmail}}}{{/infoEmail}} + * {{#version}}The version of the OpenAPI document: {{{.}}}{{/version}} + * {{#infoEmail}}Contact: {{{.}}}{{/infoEmail}} * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech diff --git a/modules/openapi-generator/src/main/resources/Javascript/es6/model_doc.mustache b/modules/openapi-generator/src/main/resources/Javascript/es6/model_doc.mustache index 04ab6f949ac9be5fd57944e60dda464f4d87ae9e..fc21ae6e9f1fff21e5903f3ad7880c13416120e4 100644 --- a/modules/openapi-generator/src/main/resources/Javascript/es6/model_doc.mustache +++ b/modules/openapi-generator/src/main/resources/Javascript/es6/model_doc.mustache @@ -11,7 +11,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -{{#vars}}**{{name}}** | {{#isPrimitiveType}}**{{dataType}}**{{/isPrimitiveType}}{{^isPrimitiveType}}[**{{dataType}}**]({{complexType}}.md){{/isPrimitiveType}} | {{description}} | {{^required}}[optional] {{/required}}{{#isReadOnly}}[readonly] {{/isReadOnly}}{{#defaultValue}}[default to {{defaultValue}}]{{/defaultValue}} +{{#vars}}**{{name}}** | {{#isPrimitiveType}}**{{dataType}}**{{/isPrimitiveType}}{{^isPrimitiveType}}[**{{dataType}}**]({{complexType}}.md){{/isPrimitiveType}} | {{description}} | {{^required}}[optional] {{/required}}{{#isReadOnly}}[readonly] {{/isReadOnly}}{{#defaultValue}}[default to {{.}}]{{/defaultValue}} {{/vars}} {{#vars}}{{#isEnum}} diff --git a/modules/openapi-generator/src/main/resources/Javascript/es6/model_test.mustache b/modules/openapi-generator/src/main/resources/Javascript/es6/model_test.mustache index 8769cfeb8708724f1e4bcdea0968fd0f1f89e89b..ec7842a6722d96d3dc16f6fed590a75cb3395456 100644 --- a/modules/openapi-generator/src/main/resources/Javascript/es6/model_test.mustache +++ b/modules/openapi-generator/src/main/resources/Javascript/es6/model_test.mustache @@ -2,10 +2,10 @@ (function(root, factory) { if (typeof define === 'function' && define.amd) { // AMD. - define(['expect.js', process.cwd()+'/src/{{#invokerPackage}}{{invokerPackage}}/{{/invokerPackage}}index'], factory); + define(['expect.js', process.cwd()+'/src/{{#invokerPackage}}{{.}}/{{/invokerPackage}}index'], factory); } else if (typeof module === 'object' && module.exports) { // CommonJS-like environments that support module.exports, like Node. - factory(require('expect.js'), require(process.cwd()+'/src/{{#invokerPackage}}{{invokerPackage}}/{{/invokerPackage}}index')); + factory(require('expect.js'), require(process.cwd()+'/src/{{#invokerPackage}}{{.}}/{{/invokerPackage}}index')); } else { // Browser globals (root is window) factory(root.expect, root.{{moduleName}}); 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 c59eff4b03339562b88d61eccba28d44f9468c33..06b3a11c266f4b92104b74cb0684eec0513a3ae5 100644 --- a/modules/openapi-generator/src/main/resources/Javascript/es6/package.mustache +++ b/modules/openapi-generator/src/main/resources/Javascript/es6/package.mustache @@ -3,7 +3,7 @@ "version": "{{{projectVersion}}}", "description": "{{{projectDescription}}}", "license": "{{licenseName}}", - "main": "dist{{#invokerPackage}}/{{invokerPackage}}{{/invokerPackage}}/index.js", + "main": "dist{{#invokerPackage}}/{{.}}{{/invokerPackage}}/index.js", "scripts": { "build": "babel src -d dist", "prepare": "npm run build", diff --git a/modules/openapi-generator/src/main/resources/Javascript/es6/partial_model_generic.mustache b/modules/openapi-generator/src/main/resources/Javascript/es6/partial_model_generic.mustache index cc82b99becbd14228bb087f57dc9e334683ea9cd..c367e4b82010ce414f20fcf7d467063f7833841d 100644 --- a/modules/openapi-generator/src/main/resources/Javascript/es6/partial_model_generic.mustache +++ b/modules/openapi-generator/src/main/resources/Javascript/es6/partial_model_generic.mustache @@ -1,17 +1,17 @@ {{#models}}{{#model}}{{#emitJSDoc}}/** * The {{classname}} model module. - * @module {{#invokerPackage}}{{invokerPackage}}/{{/invokerPackage}}{{#modelPackage}}{{modelPackage}}/{{/modelPackage}}{{classname}} + * @module {{#invokerPackage}}{{.}}/{{/invokerPackage}}{{#modelPackage}}{{.}}/{{/modelPackage}}{{classname}} * @version {{projectVersion}} */{{/emitJSDoc}} class {{classname}} {{#parent}}{{^parentModel}}{{#vendorExtensions.x-is-array}}extends Array {{/vendorExtensions.x-is-array}}{{/parentModel}}{{/parent}}{ {{#emitJSDoc}}/** * Constructs a new <code>{{classname}}</code>.{{#description}} - * {{description}}{{/description}} - * @alias module:{{#invokerPackage}}{{invokerPackage}}/{{/invokerPackage}}{{#modelPackage}}{{modelPackage}}/{{/modelPackage}}{{classname}}{{#useInheritance}}{{#parent}} - * @extends {{#parentModel}}module:{{#invokerPackage}}{{invokerPackage}}/{{/invokerPackage}}{{#modelPackage}}{{modelPackage}}/{{/modelPackage}}{{classname}}{{/parentModel}}{{^parentModel}}{{#vendorExtensions.x-is-array}}Array{{/vendorExtensions.x-is-array}}{{#vendorExtensions.x-is-map}}Object{{/vendorExtensions.x-is-map}}{{/parentModel}}{{/parent}}{{#interfaces}} - * @implements module:{{#invokerPackage}}{{invokerPackage}}/{{/invokerPackage}}{{#modelPackage}}{{modelPackage}}/{{/modelPackage}}{{.}}{{/interfaces}}{{/useInheritance}}{{#vendorExtensions.x-all-required}} - * @param {{name}} {{=< >=}}{<&vendorExtensions.x-jsdoc-type>}<={{ }}=> {{#description}}{{{description}}}{{/description}}{{/vendorExtensions.x-all-required}} + * {{.}}{{/description}} + * @alias module:{{#invokerPackage}}{{.}}/{{/invokerPackage}}{{#modelPackage}}{{.}}/{{/modelPackage}}{{classname}}{{#useInheritance}}{{#parent}} + * @extends {{#parentModel}}module:{{#invokerPackage}}{{.}}/{{/invokerPackage}}{{#modelPackage}}{{.}}/{{/modelPackage}}{{classname}}{{/parentModel}}{{^parentModel}}{{#vendorExtensions.x-is-array}}Array{{/vendorExtensions.x-is-array}}{{#vendorExtensions.x-is-map}}Object{{/vendorExtensions.x-is-map}}{{/parentModel}}{{/parent}}{{#interfaces}} + * @implements module:{{#invokerPackage}}{{.}}/{{/invokerPackage}}{{#modelPackage}}{{.}}/{{/modelPackage}}{{.}}{{/interfaces}}{{/useInheritance}}{{#vendorExtensions.x-all-required}} + * @param {{name}} {{=< >=}}{<&vendorExtensions.x-jsdoc-type>}<={{ }}=> {{{description}}}{{/vendorExtensions.x-all-required}} */{{/emitJSDoc}} constructor({{#vendorExtensions.x-all-required}}{{name}}{{^-last}}, {{/-last}}{{/vendorExtensions.x-all-required}}) { {{#parent}}{{^parentModel}}{{#vendorExtensions.x-is-array}} super(); @@ -55,9 +55,9 @@ class {{classname}} {{#parent}}{{^parentModel}}{{#vendorExtensions.x-is-array}}e } {{#emitModelMethods}}{{#vars}}{{#emitJSDoc}}/**{{#description}} - * Returns {{{description}}}{{/description}}{{#minimum}} - * minimum: {{minimum}}{{/minimum}}{{#maximum}} - * maximum: {{maximum}}{{/maximum}} + * Returns {{{.}}}{{/description}}{{#minimum}} + * minimum: {{.}}{{/minimum}}{{#maximum}} + * maximum: {{.}}{{/maximum}} * @return {{=< >=}}{<&vendorExtensions.x-jsdoc-type>}<={{ }}=> */{{/emitJSDoc}} {{getter}}() { @@ -65,8 +65,8 @@ class {{classname}} {{#parent}}{{^parentModel}}{{#vendorExtensions.x-is-array}}e } {{#emitJSDoc}}/**{{#description}} - * Sets {{{description}}}{{/description}} - * @param {{=< >=}}{<&vendorExtensions.x-jsdoc-type>}<={{ }}=> {{name}}{{#description}} {{{description}}}{{/description}} + * Sets {{{.}}}{{/description}} + * @param {{=< >=}}{<&vendorExtensions.x-jsdoc-type>}<={{ }}=> {{name}}{{#description}} {{{.}}}{{/description}} */{{/emitJSDoc}} {{setter}}({{name}}) { this['{{baseName}}'] = {{name}}; @@ -75,21 +75,21 @@ class {{classname}} {{#parent}}{{^parentModel}}{{#vendorExtensions.x-is-array}}e } {{#vars}}{{#emitJSDoc}}/**{{#description}} - * {{{description}}}{{/description}} + * {{{.}}}{{/description}} * @member {{=< >=}}{<&vendorExtensions.x-jsdoc-type>}<={{ }}=> {{baseName}}{{#defaultValue}} - * @default {{{defaultValue}}}{{/defaultValue}} + * @default {{{.}}}{{/defaultValue}} */{{/emitJSDoc}} -{{classname}}.prototype['{{baseName}}'] = {{#defaultValue}}{{{defaultValue}}}{{/defaultValue}}{{^defaultValue}}undefined{{/defaultValue}}; +{{classname}}.prototype['{{baseName}}'] = {{{defaultValue}}}{{^defaultValue}}undefined{{/defaultValue}}; {{/vars}} {{#useInheritance}}{{#interfaceModels}}// Implement {{classname}} interface: {{#allVars}}{{#emitJSDoc}}/**{{#description}} - * {{{description}}}{{/description}} + * {{{.}}}{{/description}} * @member {{=< >=}}{<&vendorExtensions.x-jsdoc-type>}<={{ }}=> {{baseName}}{{#defaultValue}} - * @default {{{defaultValue}}}{{/defaultValue}} + * @default {{{.}}}{{/defaultValue}} */{{/emitJSDoc}} -{{classname}}.prototype['{{baseName}}'] = {{#defaultValue}}{{{defaultValue}}}{{/defaultValue}}{{^defaultValue}}undefined{{/defaultValue}}; +{{classname}}.prototype['{{baseName}}'] = {{{defaultValue}}}{{^defaultValue}}undefined{{/defaultValue}}; {{/allVars}}{{/interfaceModels}}{{/useInheritance}} {{#vars}}{{#isEnum}}{{^isContainer}} diff --git a/modules/openapi-generator/src/main/resources/Javascript/git_push.sh.mustache b/modules/openapi-generator/src/main/resources/Javascript/git_push.sh.mustache index 8b3f689c9121a65080ad038d37a2036b01e559a1..f0bed5bd84155f05bc3cdc67af008f524efb38a6 100755 --- a/modules/openapi-generator/src/main/resources/Javascript/git_push.sh.mustache +++ b/modules/openapi-generator/src/main/resources/Javascript/git_push.sh.mustache @@ -55,4 +55,3 @@ 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/Javascript/index.mustache b/modules/openapi-generator/src/main/resources/Javascript/index.mustache index d6ca3cff70421542aef14d09b660b35ff4b7e6ea..1286f772bf942c4db92849da79c40432f6aee5b0 100644 --- a/modules/openapi-generator/src/main/resources/Javascript/index.mustache +++ b/modules/openapi-generator/src/main/resources/Javascript/index.mustache @@ -2,21 +2,21 @@ (function(factory) { if (typeof define === 'function' && define.amd) { // AMD. Register as an anonymous module. - define(['{{#invokerPackage}}{{invokerPackage}}/{{/invokerPackage}}ApiClient'{{#models}}, '{{#invokerPackage}}{{invokerPackage}}/{{/invokerPackage}}{{#modelPackage}}{{modelPackage}}/{{/modelPackage}}{{importPath}}'{{/models}}{{#apiInfo}}{{#apis}}, '{{#invokerPackage}}{{invokerPackage}}/{{/invokerPackage}}{{#apiPackage}}{{apiPackage}}/{{/apiPackage}}{{importPath}}'{{/apis}}{{/apiInfo}}], factory); + define(['{{#invokerPackage}}{{.}}/{{/invokerPackage}}ApiClient'{{#models}}, '{{#invokerPackage}}{{.}}/{{/invokerPackage}}{{#modelPackage}}{{.}}/{{/modelPackage}}{{importPath}}'{{/models}}{{#apiInfo}}{{#apis}}, '{{#invokerPackage}}{{.}}/{{/invokerPackage}}{{#apiPackage}}{{.}}/{{/apiPackage}}{{importPath}}'{{/apis}}{{/apiInfo}}], factory); } else if (typeof module === 'object' && module.exports) { // CommonJS-like environments that support module.exports, like Node. - module.exports = factory(require('./ApiClient'){{#models}}, require('./{{#modelPackage}}{{modelPackage}}/{{/modelPackage}}{{importPath}}'){{/models}}{{#apiInfo}}{{#apis}}, require('./{{#apiPackage}}{{apiPackage}}/{{/apiPackage}}{{importPath}}'){{/apis}}{{/apiInfo}}); + module.exports = factory(require('./ApiClient'){{#models}}, require('./{{#modelPackage}}{{.}}/{{/modelPackage}}{{importPath}}'){{/models}}{{#apiInfo}}{{#apis}}, require('./{{#apiPackage}}{{.}}/{{/apiPackage}}{{importPath}}'){{/apis}}{{/apiInfo}}); } }(function(ApiClient{{#models}}{{#model}}, {{classFilename}}{{/model}}{{/models}}{{#apiInfo}}{{#apis}}, {{importPath}}{{/apis}}{{/apiInfo}}) { 'use strict'; {{#emitJSDoc}} /**{{#projectDescription}} - * {{projectDescription}}.<br>{{/projectDescription}} + * {{.}}.<br>{{/projectDescription}} * The <code>index</code> module provides access to constructors for all the classes which comprise the public API. * <p> * An AMD (recommended!) or CommonJS application will generally do something equivalent to the following: * <pre> - * var {{moduleName}} = require('{{#invokerPackage}}{{invokerPackage}}/{{/invokerPackage}}index'); // See note below*. + * var {{moduleName}} = require('{{#invokerPackage}}{{.}}/{{/invokerPackage}}index'); // See note below*. * var xxxSvc = new {{moduleName}}.XxxApi(); // Allocate the API class we're going to use. * var yyyModel = new {{moduleName}}.Yyy(); // Construct a model instance. * yyyModel.someProperty = 'someValue'; @@ -24,7 +24,7 @@ * var zzz = xxxSvc.doSomething(yyyModel); // Invoke the service. * ... * </pre> - * <em>*NOTE: For a top-level AMD script, use require(['{{#invokerPackage}}{{invokerPackage}}/{{/invokerPackage}}index'], function(){...}) + * <em>*NOTE: For a top-level AMD script, use require(['{{#invokerPackage}}{{.}}/{{/invokerPackage}}index'], function(){...}) * and put the application logic within the callback function.</em> * </p> * <p> @@ -38,7 +38,7 @@ * ... * </pre> * </p> - * @module {{#invokerPackage}}{{invokerPackage}}/{{/invokerPackage}}index + * @module {{#invokerPackage}}{{.}}/{{/invokerPackage}}index * @version {{projectVersion}} */{{/emitJSDoc}} {{=< >=}} var exports = {<#emitJSDoc> diff --git a/modules/openapi-generator/src/main/resources/Javascript/licenseInfo.mustache b/modules/openapi-generator/src/main/resources/Javascript/licenseInfo.mustache index 4a27ba7c5cd18266f785fdfbf5009dd077723033..571d22d4a65e71deb24d56d626f54cc96ff6ceae 100644 --- a/modules/openapi-generator/src/main/resources/Javascript/licenseInfo.mustache +++ b/modules/openapi-generator/src/main/resources/Javascript/licenseInfo.mustache @@ -3,10 +3,10 @@ * {{{appDescription}}} * {{#version}} - * The version of the OpenAPI document: {{{version}}} + * The version of the OpenAPI document: {{{.}}} {{/version}} {{#infoEmail}} - * Contact: {{{infoEmail}}} + * Contact: {{{.}}} {{/infoEmail}} * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/modules/openapi-generator/src/main/resources/Javascript/model.mustache b/modules/openapi-generator/src/main/resources/Javascript/model.mustache index 95f2b2df81dddbc2b126ee54ccbeaa03454707e1..2621ddcba6524053a6482bce2521ca73b17deda7 100644 --- a/modules/openapi-generator/src/main/resources/Javascript/model.mustache +++ b/modules/openapi-generator/src/main/resources/Javascript/model.mustache @@ -2,7 +2,7 @@ (function(root, factory) { if (typeof define === 'function' && define.amd) { // AMD. Register as an anonymous module. - define(['{{#invokerPackage}}{{invokerPackage}}/{{/invokerPackage}}ApiClient'{{#imports}}, '{{#invokerPackage}}{{invokerPackage}}/{{/invokerPackage}}{{#modelPackage}}{{modelPackage}}/{{/modelPackage}}{{import}}'{{/imports}}], factory); + define(['{{#invokerPackage}}{{.}}/{{/invokerPackage}}ApiClient'{{#imports}}, '{{#invokerPackage}}{{.}}/{{/invokerPackage}}{{#modelPackage}}{{.}}/{{/modelPackage}}{{import}}'{{/imports}}], factory); } else if (typeof module === 'object' && module.exports) { // CommonJS-like environments that support module.exports, like Node. module.exports = factory(require('../ApiClient'){{#imports}}, require('./{{import}}'){{/imports}}); diff --git a/modules/openapi-generator/src/main/resources/Javascript/model_doc.mustache b/modules/openapi-generator/src/main/resources/Javascript/model_doc.mustache index 04ab6f949ac9be5fd57944e60dda464f4d87ae9e..fc21ae6e9f1fff21e5903f3ad7880c13416120e4 100644 --- a/modules/openapi-generator/src/main/resources/Javascript/model_doc.mustache +++ b/modules/openapi-generator/src/main/resources/Javascript/model_doc.mustache @@ -11,7 +11,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -{{#vars}}**{{name}}** | {{#isPrimitiveType}}**{{dataType}}**{{/isPrimitiveType}}{{^isPrimitiveType}}[**{{dataType}}**]({{complexType}}.md){{/isPrimitiveType}} | {{description}} | {{^required}}[optional] {{/required}}{{#isReadOnly}}[readonly] {{/isReadOnly}}{{#defaultValue}}[default to {{defaultValue}}]{{/defaultValue}} +{{#vars}}**{{name}}** | {{#isPrimitiveType}}**{{dataType}}**{{/isPrimitiveType}}{{^isPrimitiveType}}[**{{dataType}}**]({{complexType}}.md){{/isPrimitiveType}} | {{description}} | {{^required}}[optional] {{/required}}{{#isReadOnly}}[readonly] {{/isReadOnly}}{{#defaultValue}}[default to {{.}}]{{/defaultValue}} {{/vars}} {{#vars}}{{#isEnum}} diff --git a/modules/openapi-generator/src/main/resources/Javascript/model_test.mustache b/modules/openapi-generator/src/main/resources/Javascript/model_test.mustache index 0680e194f15bd19f5e8d0c8ef741c8bd4e16c482..53071a6ce09b64f5da4ee9e8a218fdf2456381d6 100644 --- a/modules/openapi-generator/src/main/resources/Javascript/model_test.mustache +++ b/modules/openapi-generator/src/main/resources/Javascript/model_test.mustache @@ -2,10 +2,10 @@ (function(root, factory) { if (typeof define === 'function' && define.amd) { // AMD. - define(['expect.js', process.cwd()+'/src/{{#invokerPackage}}{{invokerPackage}}/{{/invokerPackage}}index'], factory); + define(['expect.js', process.cwd()+'/src/{{#invokerPackage}}{{.}}/{{/invokerPackage}}index'], factory); } else if (typeof module === 'object' && module.exports) { // CommonJS-like environments that support module.exports, like Node. - factory(require('expect.js'), require(process.cwd()+'/src/{{#invokerPackage}}{{invokerPackage}}/{{/invokerPackage}}index')); + factory(require('expect.js'), require(process.cwd()+'/src/{{#invokerPackage}}{{.}}/{{/invokerPackage}}index')); } else { // Browser globals (root is window) factory(root.expect, root.{{moduleName}}); diff --git a/modules/openapi-generator/src/main/resources/Javascript/package.mustache b/modules/openapi-generator/src/main/resources/Javascript/package.mustache index 2fe23d57d745b0462afd507a77d9cbeb20c73e15..50f02589eff5ebfe2a27f56f151c3f8c24ae0288 100644 --- a/modules/openapi-generator/src/main/resources/Javascript/package.mustache +++ b/modules/openapi-generator/src/main/resources/Javascript/package.mustache @@ -3,7 +3,7 @@ "version": "{{{projectVersion}}}", "description": "{{{projectDescription}}}", "license": "{{licenseName}}", - "main": "{{sourceFolder}}{{#invokerPackage}}/{{invokerPackage}}{{/invokerPackage}}/index.js", + "main": "{{sourceFolder}}{{#invokerPackage}}/{{.}}{{/invokerPackage}}/index.js", "scripts": { "test": "mocha --recursive" }, diff --git a/modules/openapi-generator/src/main/resources/Javascript/partial_model_generic.mustache b/modules/openapi-generator/src/main/resources/Javascript/partial_model_generic.mustache index e6fcc62c9e3cab29c81abc7b0f19ad3a9f700c1b..6da2a98af9dc08212920a1a0e66c97e354d5f37e 100644 --- a/modules/openapi-generator/src/main/resources/Javascript/partial_model_generic.mustache +++ b/modules/openapi-generator/src/main/resources/Javascript/partial_model_generic.mustache @@ -2,18 +2,18 @@ {{#emitJSDoc}} /** * The {{classname}} model module. - * @module {{#invokerPackage}}{{invokerPackage}}/{{/invokerPackage}}{{#modelPackage}}{{modelPackage}}/{{/modelPackage}}{{classname}} + * @module {{#invokerPackage}}{{.}}/{{/invokerPackage}}{{#modelPackage}}{{.}}/{{/modelPackage}}{{classname}} * @version {{projectVersion}} */ /** * Constructs a new <code>{{classname}}</code>.{{#description}} - * {{description}}{{/description}} - * @alias module:{{#invokerPackage}}{{invokerPackage}}/{{/invokerPackage}}{{#modelPackage}}{{modelPackage}}/{{/modelPackage}}{{classname}} + * {{.}}{{/description}} + * @alias module:{{#invokerPackage}}{{.}}/{{/invokerPackage}}{{#modelPackage}}{{.}}/{{/modelPackage}}{{classname}} * @class{{#useInheritance}}{{#parent}} - * @extends {{#parentModel}}module:{{#invokerPackage}}{{invokerPackage}}/{{/invokerPackage}}{{#modelPackage}}{{modelPackage}}/{{/modelPackage}}{{classname}}{{/parentModel}}{{^parentModel}}{{#vendorExtensions.x-is-array}}Array{{/vendorExtensions.x-is-array}}{{#vendorExtensions.x-is-map}}Object{{/vendorExtensions.x-is-map}}{{/parentModel}}{{/parent}}{{#interfaces}} - * @implements module:{{#invokerPackage}}{{invokerPackage}}/{{/invokerPackage}}{{#modelPackage}}{{modelPackage}}/{{/modelPackage}}{{.}}{{/interfaces}}{{/useInheritance}}{{#vendorExtensions.x-all-required}} - * @param {{name}} {{=< >=}}{<&vendorExtensions.x-jsdoc-type>}<={{ }}=> {{#description}}{{{description}}}{{/description}}{{/vendorExtensions.x-all-required}} + * @extends {{#parentModel}}module:{{#invokerPackage}}{{.}}/{{/invokerPackage}}{{#modelPackage}}{{.}}/{{/modelPackage}}{{classname}}{{/parentModel}}{{^parentModel}}{{#vendorExtensions.x-is-array}}Array{{/vendorExtensions.x-is-array}}{{#vendorExtensions.x-is-map}}Object{{/vendorExtensions.x-is-map}}{{/parentModel}}{{/parent}}{{#interfaces}} + * @implements module:{{#invokerPackage}}{{.}}/{{/invokerPackage}}{{#modelPackage}}{{.}}/{{/modelPackage}}{{.}}{{/interfaces}}{{/useInheritance}}{{#vendorExtensions.x-all-required}} + * @param {{name}} {{=< >=}}{<&vendorExtensions.x-jsdoc-type>}<={{ }}=> {{{description}}}{{/vendorExtensions.x-all-required}} */ {{/emitJSDoc}} var exports = function({{#vendorExtensions.x-all-required}}{{name}}{{^-last}}, {{/-last}}{{/vendorExtensions.x-all-required}}) { @@ -97,29 +97,29 @@ {{#vars}} {{#emitJSDoc}} /**{{#description}} - * {{{description}}}{{/description}} + * {{{.}}}{{/description}} * @member {{=< >=}}{<&vendorExtensions.x-jsdoc-type>}<={{ }}=> {{baseName}}{{#defaultValue}} - * @default {{{defaultValue}}}{{/defaultValue}} + * @default {{{.}}}{{/defaultValue}} */ {{/emitJSDoc}} - exports.prototype['{{baseName}}'] = {{#defaultValue}}{{{defaultValue}}}{{/defaultValue}}{{^defaultValue}}undefined{{/defaultValue}}; + exports.prototype['{{baseName}}'] = {{{defaultValue}}}{{^defaultValue}}undefined{{/defaultValue}}; {{/vars}}{{#useInheritance}}{{#interfaceModels}} // Implement {{classname}} interface:{{#allVars}} {{#emitJSDoc}} /**{{#description}} - * {{{description}}}{{/description}} + * {{{.}}}{{/description}} * @member {{=< >=}}{<&vendorExtensions.x-jsdoc-type>}<={{ }}=> {{baseName}}{{#defaultValue}} - * @default {{{defaultValue}}}{{/defaultValue}} + * @default {{{.}}}{{/defaultValue}} */ {{/emitJSDoc}} -exports.prototype['{{baseName}}'] = {{#defaultValue}}{{{defaultValue}}}{{/defaultValue}}{{^defaultValue}}undefined{{/defaultValue}}; +exports.prototype['{{baseName}}'] = {{{defaultValue}}}{{^defaultValue}}undefined{{/defaultValue}}; {{/allVars}}{{/interfaceModels}}{{/useInheritance}} {{#emitModelMethods}}{{#vars}} {{#emitJSDoc}} /**{{#description}} - * Returns {{{description}}}{{/description}}{{#minimum}} - * minimum: {{minimum}}{{/minimum}}{{#maximum}} - * maximum: {{maximum}}{{/maximum}} + * Returns {{{.}}}{{/description}}{{#minimum}} + * minimum: {{.}}{{/minimum}}{{#maximum}} + * maximum: {{.}}{{/maximum}} * @return {{=< >=}}{<&vendorExtensions.x-jsdoc-type>}<={{ }}=> */ {{/emitJSDoc}} @@ -129,8 +129,8 @@ exports.prototype['{{baseName}}'] = {{#defaultValue}}{{{defaultValue}}}{{/defaul {{#emitJSDoc}} /**{{#description}} - * Sets {{{description}}}{{/description}} - * @param {{=< >=}}{<&vendorExtensions.x-jsdoc-type>}<={{ }}=> {{name}}{{#description}} {{{description}}}{{/description}} + * Sets {{{.}}}{{/description}} + * @param {{=< >=}}{<&vendorExtensions.x-jsdoc-type>}<={{ }}=> {{name}}{{#description}} {{{.}}}{{/description}} */ {{/emitJSDoc}} exports.prototype.{{setter}} = function({{name}}) { diff --git a/modules/openapi-generator/src/main/resources/android/README.mustache b/modules/openapi-generator/src/main/resources/android/README.mustache index 0f0ef9d155e464a92f2699c3d5ff946a9b01bde8..d61a46e981d94e58aa4e06e01705f4a947a10c20 100644 --- a/modules/openapi-generator/src/main/resources/android/README.mustache +++ b/modules/openapi-generator/src/main/resources/android/README.mustache @@ -68,7 +68,7 @@ public class {{{classname}}}Example { {{{dataType}}} {{{paramName}}} = {{{example}}}; // {{{dataType}}} | {{{description}}} {{/allParams}} try { - {{#returnType}}{{{returnType}}} result = {{/returnType}}apiInstance.{{{operationId}}}({{#allParams}}{{{paramName}}}{{^-last}}, {{/-last}}{{/allParams}});{{#returnType}} + {{#returnType}}{{{.}}} result = {{/returnType}}apiInstance.{{{operationId}}}({{#allParams}}{{{paramName}}}{{^-last}}, {{/-last}}{{/allParams}});{{#returnType}} System.out.println(result);{{/returnType}} } catch (ApiException e) { System.err.println("Exception when calling {{{classname}}}#{{{operationId}}}"); @@ -85,7 +85,7 @@ All URIs are relative to *{{basePath}}* Class | Method | HTTP request | Description ------------ | ------------- | ------------- | ------------- -{{#apiInfo}}{{#apis}}{{#operations}}{{#operation}}*{{classname}}* | [**{{operationId}}**]({{apiDocPath}}{{classname}}.md#{{operationId}}) | **{{httpMethod}}** {{path}} | {{#summary}}{{summary}}{{/summary}} +{{#apiInfo}}{{#apis}}{{#operations}}{{#operation}}*{{classname}}* | [**{{operationId}}**]({{apiDocPath}}{{classname}}.md#{{operationId}}) | **{{httpMethod}}** {{path}} | {{summary}} {{/operation}}{{/operations}}{{/apis}}{{/apiInfo}} ## Documentation for Models diff --git a/modules/openapi-generator/src/main/resources/android/api.mustache b/modules/openapi-generator/src/main/resources/android/api.mustache index 188c52253c6d48c9c85761729f62a29407b9baec..6a82dd69f09fa1bbc2201c4bfb28738000620f17 100644 --- a/modules/openapi-generator/src/main/resources/android/api.mustache +++ b/modules/openapi-generator/src/main/resources/android/api.mustache @@ -46,9 +46,9 @@ public class {{classname}} { * {{summary}} * {{notes}} {{#allParams}} * @param {{paramName}} {{description}} -{{/allParams}} * @return {{#returnType}}{{{returnType}}}{{/returnType}}{{^returnType}}void{{/returnType}} +{{/allParams}} * @return {{{returnType}}}{{^returnType}}void{{/returnType}} */ - public {{#returnType}}{{{returnType}}} {{/returnType}}{{^returnType}}void {{/returnType}} {{nickname}} ({{#allParams}}{{{dataType}}} {{paramName}}{{^-last}}, {{/-last}}{{/allParams}}) throws ApiException { + public {{#returnType}}{{{.}}} {{/returnType}}{{^returnType}}void {{/returnType}} {{nickname}} ({{#allParams}}{{{dataType}}} {{paramName}}{{^-last}}, {{/-last}}{{/allParams}}) throws ApiException { Object localVarPostBody = {{#bodyParam}}{{paramName}}{{/bodyParam}}{{^bodyParam}}null{{/bodyParam}}; {{#allParams}} {{#required}} @@ -70,7 +70,7 @@ public class {{classname}} { Map<String, String> localVarFormParams = new HashMap<String, String>(); {{#queryParams}} - localVarQueryParams.addAll(ApiInvoker.parameterToPairs("{{#collectionFormat}}{{{collectionFormat}}}{{/collectionFormat}}", "{{baseName}}", {{paramName}})); + localVarQueryParams.addAll(ApiInvoker.parameterToPairs("{{{collectionFormat}}}", "{{baseName}}", {{paramName}})); {{/queryParams}} {{#headerParams}} diff --git a/modules/openapi-generator/src/main/resources/android/apiInvoker.mustache b/modules/openapi-generator/src/main/resources/android/apiInvoker.mustache index e77cc60b8ca873662a1849642c44f17ab5feb180..ffa99306de81b32b6a17ec4ff26e6dbee94e3b46 100644 --- a/modules/openapi-generator/src/main/resources/android/apiInvoker.mustache +++ b/modules/openapi-generator/src/main/resources/android/apiInvoker.mustache @@ -84,7 +84,7 @@ public class ApiInvoker { DATE_FORMAT.setTimeZone(TimeZone.getTimeZone("UTC")); // Set default User-Agent. - setUserAgent("{{#httpUserAgent}}{{{.}}}{{/httpUserAgent}}{{^httpUserAgent}}OpenAPI-Generator/{{{artifactVersion}}}/android{{/httpUserAgent}}"); + setUserAgent("{{{httpUserAgent}}}{{^httpUserAgent}}OpenAPI-Generator/{{{artifactVersion}}}/android{{/httpUserAgent}}"); } public static void setUserAgent(String userAgent) { diff --git a/modules/openapi-generator/src/main/resources/android/api_doc.mustache b/modules/openapi-generator/src/main/resources/android/api_doc.mustache index d7ea617e2fb626aa7b2f389daff2cb0f4cad73df..be7bb2701cb0e1138a61041ee47e8b04a696a31e 100644 --- a/modules/openapi-generator/src/main/resources/android/api_doc.mustache +++ b/modules/openapi-generator/src/main/resources/android/api_doc.mustache @@ -1,12 +1,12 @@ # {{classname}}{{#description}} -{{description}}{{/description}} +{{.}}{{/description}} All URIs are relative to *{{basePath}}* Method | HTTP request | Description ------------- | ------------- | ------------- -{{#operations}}{{#operation}}[**{{operationId}}**]({{classname}}.md#{{operationId}}) | **{{httpMethod}}** {{path}} | {{#summary}}{{summary}}{{/summary}} +{{#operations}}{{#operation}}[**{{operationId}}**]({{classname}}.md#{{operationId}}) | **{{httpMethod}}** {{path}} | {{summary}} {{/operation}}{{/operations}} {{#operations}} @@ -14,11 +14,11 @@ Method | HTTP request | Description ## {{operationId}} -> {{#returnType}}{{returnType}} {{/returnType}}{{operationId}}({{#allParams}}{{{paramName}}}{{^-last}}, {{/-last}}{{/allParams}}) +> {{#returnType}}{{.}} {{/returnType}}{{operationId}}({{#allParams}}{{{paramName}}}{{^-last}}, {{/-last}}{{/allParams}}) {{summary}}{{#notes}} -{{notes}}{{/notes}} +{{.}}{{/notes}} ### Example @@ -31,7 +31,7 @@ Method | HTTP request | Description {{{dataType}}} {{{paramName}}} = {{{example}}}; // {{{dataType}}} | {{{description}}} {{/allParams}} try { - {{#returnType}}{{{returnType}}} result = {{/returnType}}apiInstance.{{{operationId}}}({{#allParams}}{{{paramName}}}{{^-last}}, {{/-last}}{{/allParams}});{{#returnType}} + {{#returnType}}{{{.}}} result = {{/returnType}}apiInstance.{{{operationId}}}({{#allParams}}{{{paramName}}}{{^-last}}, {{/-last}}{{/allParams}});{{#returnType}} System.out.println(result);{{/returnType}} } catch (ApiException e) { System.err.println("Exception when calling {{{classname}}}#{{{operationId}}}"); @@ -44,7 +44,7 @@ try { {{^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}}{{#defaultValue}} [default to {{defaultValue}}]{{/defaultValue}}{{#allowableValues}} [enum: {{#values}}{{{.}}}{{^-last}}, {{/-last}}{{/values}}]{{/allowableValues}} +{{#allParams}} **{{paramName}}** | {{#isPrimitiveType}}**{{dataType}}**{{/isPrimitiveType}}{{^isPrimitiveType}}{{#isFile}}**{{dataType}}**{{/isFile}}{{^isFile}}[**{{dataType}}**]({{baseType}}.md){{/isFile}}{{/isPrimitiveType}}| {{description}} |{{^required}} [optional]{{/required}}{{#defaultValue}} [default to {{.}}]{{/defaultValue}}{{#allowableValues}} [enum: {{#values}}{{{.}}}{{^-last}}, {{/-last}}{{/values}}]{{/allowableValues}} {{/allParams}} ### Return type diff --git a/modules/openapi-generator/src/main/resources/android/build.mustache b/modules/openapi-generator/src/main/resources/android/build.mustache index 4d465c7b9a8263ac440265c448a1e730045a0212..1a5ba2185eafdf2b4bcd07fe03eadcbc86f9b56f 100644 --- a/modules/openapi-generator/src/main/resources/android/build.mustache +++ b/modules/openapi-generator/src/main/resources/android/build.mustache @@ -10,7 +10,7 @@ buildscript { } dependencies { {{#androidGradleVersion}} - classpath 'com.android.tools.build:gradle:{{{androidGradleVersion}}}' + classpath 'com.android.tools.build:gradle:{{{.}}}' {{/androidGradleVersion}} {{^androidGradleVersion}} classpath 'com.android.tools.build:gradle:2.3.+' @@ -35,13 +35,13 @@ apply plugin: 'com.github.dcendents.android-maven' android { {{#androidSdkVersion}} - compileSdkVersion {{{androidSdkVersion}}} + compileSdkVersion {{{.}}} {{/androidSdkVersion}} {{^androidSdkVersion}} compileSdkVersion 25 {{/androidSdkVersion}} {{#androidBuildToolsVersion}} - buildToolsVersion '{{{androidBuildToolsVersion}}}' + buildToolsVersion '{{{.}}}' {{/androidBuildToolsVersion}} {{^androidBuildToolsVersion}} buildToolsVersion '25.0.2' @@ -50,7 +50,7 @@ android { defaultConfig { minSdkVersion 14 {{#androidSdkVersion}} - targetSdkVersion {{{androidSdkVersion}}} + targetSdkVersion {{{.}}} {{/androidSdkVersion}} {{^androidSdkVersion}} targetSdkVersion 25 diff --git a/modules/openapi-generator/src/main/resources/android/git_push.sh.mustache b/modules/openapi-generator/src/main/resources/android/git_push.sh.mustache index 8b3f689c9121a65080ad038d37a2036b01e559a1..f0bed5bd84155f05bc3cdc67af008f524efb38a6 100755 --- a/modules/openapi-generator/src/main/resources/android/git_push.sh.mustache +++ b/modules/openapi-generator/src/main/resources/android/git_push.sh.mustache @@ -55,4 +55,3 @@ 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/android/libraries/volley/api.mustache b/modules/openapi-generator/src/main/resources/android/libraries/volley/api.mustache index fdae8995f1f6ae1b803f85eb497fdd95f38f425e..51f5cd840b4ccd49be34b9b2329bbe31bc430bba 100644 --- a/modules/openapi-generator/src/main/resources/android/libraries/volley/api.mustache +++ b/modules/openapi-generator/src/main/resources/android/libraries/volley/api.mustache @@ -53,9 +53,9 @@ public class {{classname}} { * {{summary}} * {{notes}} {{#allParams}} * @param {{paramName}} {{description}} -{{/allParams}} * @return {{#returnType}}{{{returnType}}}{{/returnType}}{{^returnType}}void{{/returnType}} +{{/allParams}} * @return {{{returnType}}}{{^returnType}}void{{/returnType}} */ - public {{#returnType}}{{{returnType}}}{{/returnType}}{{^returnType}}void{{/returnType}} {{nickname}} ({{#allParams}}{{{dataType}}} {{paramName}}{{^-last}}, {{/-last}}{{/allParams}}) throws TimeoutException, ExecutionException, InterruptedException, ApiException { + public {{{returnType}}}{{^returnType}}void{{/returnType}} {{nickname}} ({{#allParams}}{{{dataType}}} {{paramName}}{{^-last}}, {{/-last}}{{/allParams}}) throws TimeoutException, ExecutionException, InterruptedException, ApiException { Object postBody = {{#bodyParam}}{{paramName}}{{/bodyParam}}{{^bodyParam}}null{{/bodyParam}}; {{#allParams}} {{#required}} @@ -77,7 +77,7 @@ public class {{classname}} { // form params Map<String, String> formParams = new HashMap<String, String>(); {{#queryParams}} - queryParams.addAll(ApiInvoker.parameterToPairs("{{#collectionFormat}}{{{collectionFormat}}}{{/collectionFormat}}", "{{baseName}}", {{paramName}})); + queryParams.addAll(ApiInvoker.parameterToPairs("{{{collectionFormat}}}", "{{baseName}}", {{paramName}})); {{/queryParams}} {{#headerParams}} headerParams.put("{{baseName}}", ApiInvoker.parameterToString({{paramName}})); @@ -146,7 +146,7 @@ public class {{classname}} { * {{notes}} {{#allParams}} * @param {{paramName}} {{description}}{{/allParams}} */ - public void {{nickname}} ({{#allParams}}{{{dataType}}} {{paramName}}{{^-last}}, {{/-last}}{{#-last}}, {{/-last}}{{/allParams}}final Response.Listener<{{#returnType}}{{{returnType}}}{{/returnType}}{{^returnType}}String{{/returnType}}> responseListener, final Response.ErrorListener errorListener) { + public void {{nickname}} ({{#allParams}}{{{dataType}}} {{paramName}}{{^-last}}, {{/-last}}{{#-last}}, {{/-last}}{{/allParams}}final Response.Listener<{{{returnType}}}{{^returnType}}String{{/returnType}}> responseListener, final Response.ErrorListener errorListener) { Object postBody = {{#bodyParam}}{{paramName}}{{/bodyParam}}{{^bodyParam}}null{{/bodyParam}}; {{#allParams}} @@ -170,7 +170,7 @@ public class {{classname}} { Map<String, String> formParams = new HashMap<String, String>(); {{#queryParams}} - queryParams.addAll(ApiInvoker.parameterToPairs("{{#collectionFormat}}{{{collectionFormat}}}{{/collectionFormat}}", "{{baseName}}", {{paramName}})); + queryParams.addAll(ApiInvoker.parameterToPairs("{{{collectionFormat}}}", "{{baseName}}", {{paramName}})); {{/queryParams}} {{#headerParams}} diff --git a/modules/openapi-generator/src/main/resources/android/libraries/volley/apiInvoker.mustache b/modules/openapi-generator/src/main/resources/android/libraries/volley/apiInvoker.mustache index defb844693ea3f97f36ffcb20ed2b89147ff16b5..db0fcd2e6295ef4226048a83016c32bcb96b1441 100644 --- a/modules/openapi-generator/src/main/resources/android/libraries/volley/apiInvoker.mustache +++ b/modules/openapi-generator/src/main/resources/android/libraries/volley/apiInvoker.mustache @@ -188,7 +188,7 @@ public class ApiInvoker { public static void initializeInstance(Cache cache, Network network, int threadPoolSize, ResponseDelivery delivery, int connectionTimeout) { INSTANCE = new ApiInvoker(cache, network, threadPoolSize, delivery, connectionTimeout); - setUserAgent("{{#httpUserAgent}}{{{.}}}{{/httpUserAgent}}{{^httpUserAgent}}OpenAPI-Generator/{{{artifactVersion}}}/android{{/httpUserAgent}}"); + setUserAgent("{{{httpUserAgent}}}{{^httpUserAgent}}OpenAPI-Generator/{{{artifactVersion}}}/android{{/httpUserAgent}}"); // Setup authentications (key: authentication name, value: authentication). INSTANCE.authentications = new HashMap<String, Authentication>(); diff --git a/modules/openapi-generator/src/main/resources/android/libraries/volley/git_push.sh.mustache b/modules/openapi-generator/src/main/resources/android/libraries/volley/git_push.sh.mustache index 8b3f689c9121a65080ad038d37a2036b01e559a1..f0bed5bd84155f05bc3cdc67af008f524efb38a6 100644 --- a/modules/openapi-generator/src/main/resources/android/libraries/volley/git_push.sh.mustache +++ b/modules/openapi-generator/src/main/resources/android/libraries/volley/git_push.sh.mustache @@ -55,4 +55,3 @@ 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/android/libraries/volley/model.mustache b/modules/openapi-generator/src/main/resources/android/libraries/volley/model.mustache index 110c218e45a12a7694199f06e1baae6099379b33..5778c739af0a6f2adddd71b5de0bab2c4bec8e65 100644 --- a/modules/openapi-generator/src/main/resources/android/libraries/volley/model.mustache +++ b/modules/openapi-generator/src/main/resources/android/libraries/volley/model.mustache @@ -13,11 +13,11 @@ import java.io.Serializable; {{#model}} {{#description}} /** - * {{description}} + * {{.}} **/ {{/description}} @ApiModel(description = "{{{description}}}") -public class {{classname}} {{#parent}}extends {{{parent}}} {{/parent}}{{#serializableModel}}implements Serializable {{/serializableModel}}{ +public class {{classname}} {{#parent}}extends {{{.}}} {{/parent}}{{#serializableModel}}implements Serializable {{/serializableModel}}{ {{#vars}}{{#isEnum}} public enum {{datatypeWithEnum}} { {{#allowableValues}}{{#values}} {{.}}, {{/values}}{{/allowableValues}} @@ -29,9 +29,9 @@ public class {{classname}} {{#parent}}extends {{{parent}}} {{/parent}}{{#seriali {{#vars}} /**{{#description}} - * {{{description}}}{{/description}}{{#minimum}} - * minimum: {{minimum}}{{/minimum}}{{#maximum}} - * maximum: {{maximum}}{{/maximum}} + * {{{.}}}{{/description}}{{#minimum}} + * minimum: {{.}}{{/minimum}}{{#maximum}} + * maximum: {{.}}{{/maximum}} **/ @ApiModelProperty({{#required}}required = {{required}}, {{/required}}value = "{{{description}}}") public {{{datatypeWithEnum}}} {{getter}}() { diff --git a/modules/openapi-generator/src/main/resources/android/licenseInfo.mustache b/modules/openapi-generator/src/main/resources/android/licenseInfo.mustache index 9866f297a4d7e43b6e321965c75edff6e152b50a..be193d0c4fe807d927a4e2a2329b5c615954608c 100644 --- a/modules/openapi-generator/src/main/resources/android/licenseInfo.mustache +++ b/modules/openapi-generator/src/main/resources/android/licenseInfo.mustache @@ -2,8 +2,8 @@ * {{{appName}}} * {{{appDescription}}} * - * {{#version}}The version of the OpenAPI document: {{{version}}}{{/version}} - * {{#infoEmail}}Contact: {{{infoEmail}}}{{/infoEmail}} + * {{#version}}The version of the OpenAPI document: {{{.}}}{{/version}} + * {{#infoEmail}}Contact: {{{.}}}{{/infoEmail}} * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech diff --git a/modules/openapi-generator/src/main/resources/android/model.mustache b/modules/openapi-generator/src/main/resources/android/model.mustache index 498409cfb23d6fff565398ea5718633fb353350f..35949bc59814b4352710f6be9e88fc0b4ba3d43d 100644 --- a/modules/openapi-generator/src/main/resources/android/model.mustache +++ b/modules/openapi-generator/src/main/resources/android/model.mustache @@ -9,10 +9,10 @@ import com.google.gson.annotations.SerializedName; {{#model}}{{#description}} /** - * {{description}} + * {{.}} **/{{/description}} @ApiModel(description = "{{{description}}}") -public class {{classname}} {{#parent}}extends {{{parent}}}{{/parent}} { +public class {{classname}} {{#parent}}extends {{{.}}}{{/parent}} { {{#vars}}{{#isEnum}} public enum {{datatypeWithEnum}} { {{#allowableValues}}{{#values}} {{.}}, {{/values}}{{/allowableValues}} @@ -24,9 +24,9 @@ public class {{classname}} {{#parent}}extends {{{parent}}}{{/parent}} { {{#vars}} /**{{#description}} - * {{{description}}}{{/description}}{{#minimum}} - * minimum: {{minimum}}{{/minimum}}{{#maximum}} - * maximum: {{maximum}}{{/maximum}} + * {{{.}}}{{/description}}{{#minimum}} + * minimum: {{.}}{{/minimum}}{{#maximum}} + * maximum: {{.}}{{/maximum}} **/ @ApiModelProperty({{#required}}required = {{required}}, {{/required}}value = "{{{description}}}") public {{{datatypeWithEnum}}} {{getter}}() { diff --git a/modules/openapi-generator/src/main/resources/apex/README_ant.mustache b/modules/openapi-generator/src/main/resources/apex/README_ant.mustache index b41000afa5f03379aae6d1a18a8c1de7466e85e5..a51ef6a12399ac3de028af1186e18a001cc338a1 100644 --- a/modules/openapi-generator/src/main/resources/apex/README_ant.mustache +++ b/modules/openapi-generator/src/main/resources/apex/README_ant.mustache @@ -2,7 +2,7 @@ {{#appDescription}} -{{{appDescription}}} +{{{.}}} {{/appDescription}} ## Requirements @@ -52,7 +52,7 @@ For more information, see <https://developer.salesforce.com/docs/atlas.en-us.daa {{/gitUserId}}{{/gitRepoId}} 2. Set the `SF_USERNAME` and `SF_PASSWORD` environment variables to your Salesforce username and password. Alternatively, they may be set in `build.properties`. Environment variables will override the values in `build.properties` if set. `SF_SESSIONID` may also be set instead of `SF_USERNAME` and `SF_PASSWORD` (more info in `build.properties`) -3. Open up a command prompt in the root project directory {{#gitRepoId}}`{{gitRepoId}}` {{/gitRepoId}}(the same directory as this README and `build.xml`) +3. Open up a command prompt in the root project directory {{#gitRepoId}}`{{.}}` {{/gitRepoId}}(the same directory as this README and `build.xml`) 4. Deploy to your Salesforce org ```bash @@ -131,7 +131,7 @@ Map<String, Object> params = new Map<String, Object>{ try { // cross your fingers - {{#returnType}}{{{returnType}}} result = {{/returnType}}api.{{{operationId}}}({{#hasParams}}params{{/hasParams}}); + {{#returnType}}{{{.}}} result = {{/returnType}}api.{{{operationId}}}({{#hasParams}}params{{/hasParams}}); {{#returnType}} System.debug(result); {{/returnType}} @@ -146,7 +146,7 @@ All URIs are relative to *{{basePath}}* Class | Method | HTTP request | Description ------------ | ------------- | ------------- | ------------- -{{#apiInfo}}{{#apis}}{{#operations}}{{#operation}}*{{classname}}* | [**{{operationId}}**]({{apiDocPath}}{{classname}}.md#{{operationId}}) | **{{httpMethod}}** {{path}} | {{#summary}}{{summary}}{{/summary}} +{{#apiInfo}}{{#apis}}{{#operations}}{{#operation}}*{{classname}}* | [**{{operationId}}**]({{apiDocPath}}{{classname}}.md#{{operationId}}) | **{{httpMethod}}** {{path}} | {{summary}} {{/operation}}{{/operations}}{{/apis}}{{/apiInfo}} ## Documentation for Models diff --git a/modules/openapi-generator/src/main/resources/apex/README_sfdx.mustache b/modules/openapi-generator/src/main/resources/apex/README_sfdx.mustache index 4058dbc786b716d64aa8e992594f2347075e491e..27e446e928e599b4b1566e385d023b8a3b5d8ea7 100644 --- a/modules/openapi-generator/src/main/resources/apex/README_sfdx.mustache +++ b/modules/openapi-generator/src/main/resources/apex/README_sfdx.mustache @@ -2,7 +2,7 @@ {{#appDescription}} -{{{appDescription}}} +{{{.}}} {{/appDescription}} ## Requirements @@ -63,7 +63,7 @@ Map<String, Object> params = new Map<String, Object>{ try { // cross your fingers - {{#returnType}}{{{returnType}}} result = {{/returnType}}api.{{{operationId}}}({{#hasParams}}params{{/hasParams}}); + {{#returnType}}{{{.}}} result = {{/returnType}}api.{{{operationId}}}({{#hasParams}}params{{/hasParams}}); {{#returnType}} System.debug(result); {{/returnType}} @@ -78,7 +78,7 @@ All URIs are relative to *{{basePath}}* Class | Method | HTTP request | Description ------------ | ------------- | ------------- | ------------- -{{#apiInfo}}{{#apis}}{{#operations}}{{#operation}}*{{classname}}* | [**{{operationId}}**]({{apiDocPath}}{{classname}}.md#{{operationId}}) | **{{httpMethod}}** {{path}} | {{#summary}}{{summary}}{{/summary}} +{{#apiInfo}}{{#apis}}{{#operations}}{{#operation}}*{{classname}}* | [**{{operationId}}**]({{apiDocPath}}{{classname}}.md#{{operationId}}) | **{{httpMethod}}** {{path}} | {{summary}} {{/operation}}{{/operations}}{{/apis}}{{/apiInfo}} ## Documentation for Models diff --git a/modules/openapi-generator/src/main/resources/apex/api.mustache b/modules/openapi-generator/src/main/resources/apex/api.mustache index 3683b7cf5b1fabbbc98a61375a764f3e907508ce..eff84988e223db4260507c67dd754b95934ef48f 100644 --- a/modules/openapi-generator/src/main/resources/apex/api.mustache +++ b/modules/openapi-generator/src/main/resources/apex/api.mustache @@ -23,11 +23,11 @@ public class {{classname}} { * @param {{paramName}} {{description}}{{#required}} (required){{/required}}{{^required}} (optional{{#defaultValue}}, default to {{{.}}}{{/defaultValue}}){{/required}} {{/allParams}} {{#returnType}} - * @return {{{returnType}}} + * @return {{{.}}} {{/returnType}} * @throws OAS.ApiException if fails to make API call */ - public {{#returnType}}{{{returnType}}}{{/returnType}}{{^returnType}}void{{/returnType}} {{operationId}}({{#hasParams}}Map<String, Object> params{{/hasParams}}) { + public {{{returnType}}}{{^returnType}}void{{/returnType}} {{operationId}}({{#hasParams}}Map<String, Object> params{{/hasParams}}) { {{#allParams}} {{#required}} client.assertNotNull(params.get('{{paramName}}'), '{{paramName}}'); @@ -73,7 +73,7 @@ public class {{classname}} { {{/isArray}} {{/formParams}} - {{#returnType}}return ({{{returnType}}}) {{/returnType}}client.invoke( + {{#returnType}}return ({{{.}}}) {{/returnType}}client.invoke( '{{httpMethod}}', '{{path}}',{{#bodyParam}} ({{{dataType}}}) params.get('{{paramName}}'){{/bodyParam}}{{^bodyParam}} ''{{/bodyParam}}, query, form, @@ -106,7 +106,7 @@ public class {{classname}} { new List<String>(), {{/hasAuthMethods}} {{#returnType}} - {{{returnType}}}.class + {{{.}}}.class {{/returnType}} {{^returnType}} null diff --git a/modules/openapi-generator/src/main/resources/apex/api_doc.mustache b/modules/openapi-generator/src/main/resources/apex/api_doc.mustache index 2b5bb7234155c5dd26e18662491407fe476733c5..39a1770f24c8ed3cd5ce960b9b4aa44c141ef361 100644 --- a/modules/openapi-generator/src/main/resources/apex/api_doc.mustache +++ b/modules/openapi-generator/src/main/resources/apex/api_doc.mustache @@ -1,12 +1,12 @@ # {{classname}}{{#description}} -{{description}}{{/description}} +{{.}}{{/description}} All URIs are relative to *{{basePath}}* Method | HTTP request | Description ------------- | ------------- | ------------- -{{#operations}}{{#operation}}[**{{operationId}}**]({{classname}}.md#{{operationId}}) | **{{httpMethod}}** {{path}} | {{#summary}}{{summary}}{{/summary}} +{{#operations}}{{#operation}}[**{{operationId}}**]({{classname}}.md#{{operationId}}) | **{{httpMethod}}** {{path}} | {{summary}} {{/operation}}{{/operations}} {{#operations}} @@ -14,11 +14,11 @@ Method | HTTP request | Description ## {{operationId}} -> {{#returnType}}{{returnType}} {{/returnType}}{{operationId}}({{#allParams}}{{{paramName}}}{{^-last}}, {{/-last}}{{/allParams}}) +> {{#returnType}}{{.}} {{/returnType}}{{operationId}}({{#allParams}}{{{paramName}}}{{^-last}}, {{/-last}}{{/allParams}}) {{summary}}{{#notes}} -{{notes}}{{/notes}} +{{.}}{{/notes}} ### Example @@ -53,7 +53,7 @@ Map<String, Object> params = new Map<String, Object>{ try { // cross your fingers - {{#returnType}}{{{returnType}}} result = {{/returnType}}api.{{{operationId}}}({{#hasParams}}params{{/hasParams}}); + {{#returnType}}{{{.}}} result = {{/returnType}}api.{{{operationId}}}({{#hasParams}}params{{/hasParams}}); {{#returnType}} System.debug(result); {{/returnType}} @@ -67,7 +67,7 @@ try { {{^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}}{{#defaultValue}} [default to {{defaultValue}}]{{/defaultValue}}{{#allowableValues}} [enum: {{#values}}{{{.}}}{{^-last}}, {{/-last}}{{/values}}]{{/allowableValues}} +{{#allParams}} **{{paramName}}** | {{#isPrimitiveType}}**{{dataType}}**{{/isPrimitiveType}}{{^isPrimitiveType}}{{#isFile}}**{{dataType}}**{{/isFile}}{{^isFile}}[**{{dataType}}**]({{baseType}}.md){{/isFile}}{{/isPrimitiveType}}| {{description}} |{{^required}} [optional]{{/required}}{{#defaultValue}} [default to {{.}}]{{/defaultValue}}{{#allowableValues}} [enum: {{#values}}{{{.}}}{{^-last}}, {{/-last}}{{/values}}]{{/allowableValues}} {{/allParams}} ### Return type diff --git a/modules/openapi-generator/src/main/resources/apex/git_push.sh.mustache b/modules/openapi-generator/src/main/resources/apex/git_push.sh.mustache index 8b3f689c9121a65080ad038d37a2036b01e559a1..f0bed5bd84155f05bc3cdc67af008f524efb38a6 100644 --- a/modules/openapi-generator/src/main/resources/apex/git_push.sh.mustache +++ b/modules/openapi-generator/src/main/resources/apex/git_push.sh.mustache @@ -55,4 +55,3 @@ 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/apex/licenseInfo.mustache b/modules/openapi-generator/src/main/resources/apex/licenseInfo.mustache index 3f52a36757f1b465902af10cdada7e93363c7a80..0ef467e83212e848774a1de639cae66dd4f5f95b 100644 --- a/modules/openapi-generator/src/main/resources/apex/licenseInfo.mustache +++ b/modules/openapi-generator/src/main/resources/apex/licenseInfo.mustache @@ -2,8 +2,8 @@ * {{{appName}}} * {{{appDescription}}} * - * {{#version}}The version of the OpenAPI document: {{{version}}}{{/version}} - * {{#infoEmail}}Contact: {{{infoEmail}}}{{/infoEmail}} + * {{#version}}The version of the OpenAPI document: {{{.}}}{{/version}} + * {{#infoEmail}}Contact: {{{.}}}{{/infoEmail}} * * NOTE: This class is auto generated by the OAS code generator program. * https://github.com/OpenAPITools/openapi-generator diff --git a/modules/openapi-generator/src/main/resources/apex/modelEnum.mustache b/modules/openapi-generator/src/main/resources/apex/modelEnum.mustache index ad4d173fe5da7473ffff1055ff90ff167f98e430..909b57af16f5493bbbb93047ba5b1f3b72698855 100644 --- a/modules/openapi-generator/src/main/resources/apex/modelEnum.mustache +++ b/modules/openapi-generator/src/main/resources/apex/modelEnum.mustache @@ -1,7 +1,7 @@ /** - * {{^description}}Gets or Sets {{{name}}}{{/description}}{{#description}}{{{description}}}{{/description}} + * {{^description}}Gets or Sets {{{name}}}{{/description}}{{{description}}} */ -{{>additionalEnumTypeAnnotations}}public enum {{#datatypeWithEnum}}{{{.}}}{{/datatypeWithEnum}}{{^datatypeWithEnum}}{{{classname}}}{{/datatypeWithEnum}} { +{{>additionalEnumTypeAnnotations}}public enum {{{datatypeWithEnum}}}{{^datatypeWithEnum}}{{{classname}}}{{/datatypeWithEnum}} { {{#allowableValues}} {{#enumVars}} {{name}}{{^-last}},{{/-last}} diff --git a/modules/openapi-generator/src/main/resources/apex/modelInnerEnum.mustache b/modules/openapi-generator/src/main/resources/apex/modelInnerEnum.mustache index c21dd1e3f0d53eff7c22aeba77d8aea140bdcdb8..d0b3c7a08a30553eb71782a7b3fa8ecf21ad7fcf 100644 --- a/modules/openapi-generator/src/main/resources/apex/modelInnerEnum.mustache +++ b/modules/openapi-generator/src/main/resources/apex/modelInnerEnum.mustache @@ -1,7 +1,7 @@ /** - * {{^description}}Gets or Sets {{{name}}}{{/description}}{{#description}}{{{description}}}{{/description}} + * {{^description}}Gets or Sets {{{name}}}{{/description}}{{{description}}} */ - {{>additionalEnumTypeAnnotations}}public enum {{#datatypeWithEnum}}{{{.}}}{{/datatypeWithEnum}}{{^datatypeWithEnum}}{{classname}}{{/datatypeWithEnum}} { + {{>additionalEnumTypeAnnotations}}public enum {{{datatypeWithEnum}}}{{^datatypeWithEnum}}{{classname}}{{/datatypeWithEnum}} { {{#allowableValues}} {{#enumVars}} {{{name}}}{{^-last}},{{/-last}} diff --git a/modules/openapi-generator/src/main/resources/apex/package.mustache b/modules/openapi-generator/src/main/resources/apex/package.mustache index cee1920838363afb861356f9616ee8628f3ece5a..ec3d92d2510227d9562ff6846ad05106ff433e0e 100644 --- a/modules/openapi-generator/src/main/resources/apex/package.mustache +++ b/modules/openapi-generator/src/main/resources/apex/package.mustache @@ -2,7 +2,7 @@ <Package xmlns="http://soap.sforce.com/2006/04/metadata"> <fullName>{{appName}} API Client</fullName> <description>Client library for calling the {{appName}} API.{{#appDescription}} -{{{appDescription}}}{{/appDescription}} +{{{.}}}{{/appDescription}} Generated with OAS Codegen (github.com/OAS-api/OAS-codegen)</description> <types> {{#apiInfo}} diff --git a/modules/openapi-generator/src/main/resources/apex/pojo.mustache b/modules/openapi-generator/src/main/resources/apex/pojo.mustache index c3a5126aeb67087bcd1583e0f0d385969bf1fc22..bb21f63f5482d9cc36ac3bc1cb894af7b3a844ab 100644 --- a/modules/openapi-generator/src/main/resources/apex/pojo.mustache +++ b/modules/openapi-generator/src/main/resources/apex/pojo.mustache @@ -1,7 +1,7 @@ /** - * {{#description}}{{.}}{{/description}}{{^description}}{{classname}}{{/description}} + * {{description}}{{^description}}{{classname}}{{/description}} */{{>additionalModelTypeAnnotations}} -public class {{classname}}{{#parent}} extends {{{parent}}}{{/parent}}{{#interfaces}}{{#-first}} implements {{/-first}}{{^-first}}, {{/-first}}{{.}}{{/interfaces}} { +public class {{classname}}{{#parent}} extends {{{.}}}{{/parent}}{{#interfaces}}{{#-first}} implements {{/-first}}{{^-first}}, {{/-first}}{{.}}{{/interfaces}} { {{#vars}} {{#isEnum}} {{^isContainer}} @@ -17,16 +17,16 @@ public class {{classname}}{{#parent}} extends {{{parent}}}{{/parent}}{{#interfac {{/items.isEnum}} /** {{#description}} - * {{{description}}} + * {{{.}}} {{/description}} {{^description}} * Get {{name}} {{/description}} {{#minimum}} - * minimum: {{minimum}} + * minimum: {{.}} {{/minimum}} {{#maximum}} - * maximum: {{maximum}} + * maximum: {{.}} {{/maximum}} * @return {{name}} */ diff --git a/modules/openapi-generator/src/main/resources/asciidoc-documentation/index.mustache b/modules/openapi-generator/src/main/resources/asciidoc-documentation/index.mustache index fcab76298ef10ed80fc3538148cb06c8825f02d5..48d810d038aceaf3804578e91faace6f5f429a2a 100644 --- a/modules/openapi-generator/src/main/resources/asciidoc-documentation/index.mustache +++ b/modules/openapi-generator/src/main/resources/asciidoc-documentation/index.mustache @@ -1,12 +1,12 @@ = {{{appName}}} -{{#headerAttributes}} +{{#headerAttributes}} {{infoEmail}} -{{#version}}{{{version}}}{{/version}} +{{{version}}} :toc: left :numbered: :toclevels: 3 :source-highlighter: highlightjs -:keywords: openapi, rest, {{appName}} +:keywords: openapi, rest, {{appName}} :specDir: {{specDir}} :snippetDir: {{snippetDir}} :generator-template: v1 2019-12-20 @@ -59,13 +59,13 @@ Operation Id:: {{nickname}} {{/useMethodAndPath}} {{^useMethodAndPath}} ==== {{nickname}} - + `{{httpMethod}} {{path}}` {{/useMethodAndPath}} {{{summary}}} -===== Description +===== Description {{{notes}}} @@ -81,7 +81,7 @@ Operation Id:: {{nickname}} {{/hasReference}} {{^hasReference}} -{{#returnType}}<<{{returnType}}>>{{/returnType}} +{{#returnType}}<<{{.}}>>{{/returnType}} {{^returnType}}-{{/returnType}} {{/hasReference}} @@ -97,8 +97,8 @@ Operation Id:: {{nickname}} .http response codes [cols="2,3,1"] -|=== -| Code | Message | Datatype +|=== +| Code | Message | Datatype {{#responses}} @@ -107,7 +107,7 @@ Operation Id:: {{nickname}} | {{^simpleType}}{{dataType}}[<<{{baseType}}>>]{{/simpleType}} {{#simpleType}}<<{{dataType}}>>{{/simpleType}} {{/responses}} -|=== +|=== {{^skipExamples}} ===== Samples diff --git a/modules/openapi-generator/src/main/resources/asciidoc-documentation/model.mustache b/modules/openapi-generator/src/main/resources/asciidoc-documentation/model.mustache index c5f93d6afdbb6e6c7950fab043eb2ae414094105..604d7d14c4a6e1d79a63c9350d2f73fa0d512dbb 100644 --- a/modules/openapi-generator/src/main/resources/asciidoc-documentation/model.mustache +++ b/modules/openapi-generator/src/main/resources/asciidoc-documentation/model.mustache @@ -11,13 +11,13 @@ [.fields-{{classname}}] [cols="2,1,2,4,1"] -|=== +|=== | Field Name| Required| Type| Description| Format {{#vars}} -| {{baseName}} -| {{#required}}X{{/required}} -| {{dataType}} {{#isContainer}} of <<{{complexType}}>>{{/isContainer}} +| {{baseName}} +| {{#required}}X{{/required}} +| {{dataType}} {{#isContainer}} of <<{{complexType}}>>{{/isContainer}} | {{description}} | {{{dataFormat}}} {{#isEnum}}_Enum:_ {{#_enum}}{{this}}, {{/_enum}}{{/isEnum}} diff --git a/modules/openapi-generator/src/main/resources/asciidoc-documentation/param.mustache b/modules/openapi-generator/src/main/resources/asciidoc-documentation/param.mustache index 563e7976fdfce285bee59f9e0530dc7be44e63fb..df96a59769f438cbb5e8de3882ffad01c5a6d9ea 100644 --- a/modules/openapi-generator/src/main/resources/asciidoc-documentation/param.mustache +++ b/modules/openapi-generator/src/main/resources/asciidoc-documentation/param.mustache @@ -1,5 +1,5 @@ -| {{baseName}} -| {{description}} {{#baseType}}<<{{baseType}}>>{{/baseType}} -| {{^required}}-{{/required}}{{#required}}X{{/required}} -| {{defaultValue}} -| {{{pattern}}} +| {{baseName}} +| {{description}} {{#baseType}}<<{{.}}>>{{/baseType}} +| {{^required}}-{{/required}}{{#required}}X{{/required}} +| {{defaultValue}} +| {{{pattern}}} diff --git a/modules/openapi-generator/src/main/resources/asciidoc-documentation/params.mustache b/modules/openapi-generator/src/main/resources/asciidoc-documentation/params.mustache index 7307bf155e838f226dc5c0da9994d8e56cc4a114..76409161eff1854a00fe9baf779db9cd6efdd6f0 100644 --- a/modules/openapi-generator/src/main/resources/asciidoc-documentation/params.mustache +++ b/modules/openapi-generator/src/main/resources/asciidoc-documentation/params.mustache @@ -9,13 +9,13 @@ {{#useTableTitles}} .Path Parameters {{/useTableTitles}} -|=== +|=== |Name| Description| Required| Default| Pattern {{#pathParams}} {{>param}} {{/pathParams}} -|=== +|=== {{/hasPathParams}} {{#hasBodyParam}} @@ -27,13 +27,13 @@ {{#useTableTitles}} .Body Parameter {{/useTableTitles}} -|=== +|=== |Name| Description| Required| Default| Pattern {{#bodyParams}} {{>param}} {{/bodyParams}} -|=== +|=== {{/hasBodyParam}} {{#hasFormParams}} @@ -45,13 +45,13 @@ {{#useTableTitles}} .Form Parameters {{/useTableTitles}} -|=== +|=== |Name| Description| Required| Default| Pattern {{#formParams}} {{>param}} {{/formParams}} -|=== +|=== {{/hasFormParams}} {{#hasHeaderParams}} @@ -63,13 +63,13 @@ {{#useTableTitles}} .Header Parameters {{/useTableTitles}} -|=== +|=== |Name| Description| Required| Default| Pattern {{#headerParams}} {{>param}} {{/headerParams}} -|=== +|=== {{/hasHeaderParams}} {{#hasQueryParams}} @@ -81,11 +81,11 @@ {{#useTableTitles}} .Query Parameters {{/useTableTitles}} -|=== +|=== |Name| Description| Required| Default| Pattern {{#queryParams}} {{>param}} {{/queryParams}} -|=== +|=== {{/hasQueryParams}} diff --git a/modules/openapi-generator/src/main/resources/aspnetcore/2.0/Filters/GeneratePathParamsValidationFilter.mustache b/modules/openapi-generator/src/main/resources/aspnetcore/2.0/Filters/GeneratePathParamsValidationFilter.mustache index d857a4a0f960c9df6768a8061e785b4c64b4fbb5..e990e87db3b46f1726a98daf435f82ecb6539d19 100644 --- a/modules/openapi-generator/src/main/resources/aspnetcore/2.0/Filters/GeneratePathParamsValidationFilter.mustache +++ b/modules/openapi-generator/src/main/resources/aspnetcore/2.0/Filters/GeneratePathParamsValidationFilter.mustache @@ -94,4 +94,3 @@ namespace {{packageName}}.Filters } } } - diff --git a/modules/openapi-generator/src/main/resources/aspnetcore/2.0/Formatters/InputFormatterStream.mustache b/modules/openapi-generator/src/main/resources/aspnetcore/2.0/Formatters/InputFormatterStream.mustache index f1a002ded67c39c075a431b250b70d97699f2e86..e24d0a237a118e1f1f626f23ad4deb1a967fee53 100644 --- a/modules/openapi-generator/src/main/resources/aspnetcore/2.0/Formatters/InputFormatterStream.mustache +++ b/modules/openapi-generator/src/main/resources/aspnetcore/2.0/Formatters/InputFormatterStream.mustache @@ -13,7 +13,7 @@ namespace {{packageName}}.Formatters SupportedMediaTypes.Add("application/octet-stream"); SupportedMediaTypes.Add("image/jpeg"); } - + protected override bool CanReadType(Type type) { if (type == typeof(Stream)) diff --git a/modules/openapi-generator/src/main/resources/aspnetcore/2.0/Program.mustache b/modules/openapi-generator/src/main/resources/aspnetcore/2.0/Program.mustache index 7de837799830b7fa382d5dbdccd74b91351a9ad3..75b5d9d0675a6ba2f30d48b763c63bc830fa8af6 100644 --- a/modules/openapi-generator/src/main/resources/aspnetcore/2.0/Program.mustache +++ b/modules/openapi-generator/src/main/resources/aspnetcore/2.0/Program.mustache @@ -24,8 +24,8 @@ namespace {{packageName}} /// <returns>Webhost</returns> public static IWebHost BuildWebHost(string[] args) => WebHost.CreateDefaultBuilder(args) - .UseStartup<Startup>() - .UseUrls("http://0.0.0.0:{{#serverPort}}{{serverPort}}{{/serverPort}}{{^serverPort}}8080{{/serverPort}}/") + .UseStartup<Startup>() + .UseUrls("http://0.0.0.0:{{serverPort}}{{^serverPort}}8080{{/serverPort}}/") .Build(); } } diff --git a/modules/openapi-generator/src/main/resources/aspnetcore/2.0/Project.csproj.mustache b/modules/openapi-generator/src/main/resources/aspnetcore/2.0/Project.csproj.mustache index 6732557feeb80fc5210c69a59d41840fdf613670..c67bdaab8786e4e92c9072f786daaa0b734830e5 100644 --- a/modules/openapi-generator/src/main/resources/aspnetcore/2.0/Project.csproj.mustache +++ b/modules/openapi-generator/src/main/resources/aspnetcore/2.0/Project.csproj.mustache @@ -1,6 +1,6 @@ <Project Sdk="Microsoft.NET.Sdk.Web"> <PropertyGroup> - <Description>{{^packageDescription}}{{packageName}}{{/packageDescription}}{{packageDescription}}</Description> + <Description>{{packageDescription}}{{^packageDescription}}{{packageName}}{{/packageDescription}}</Description> <Copyright>{{packageCopyright}}</Copyright> <Authors>{{packageAuthors}}</Authors> <TargetFramework>netcoreapp2.0</TargetFramework> diff --git a/modules/openapi-generator/src/main/resources/aspnetcore/2.0/README.mustache b/modules/openapi-generator/src/main/resources/aspnetcore/2.0/README.mustache index 37794bd48e04c0b038afacc3a326c1bd8ad9ec47..eb041c5f9e857424658f7a3c94264265f223f6a8 100644 --- a/modules/openapi-generator/src/main/resources/aspnetcore/2.0/README.mustache +++ b/modules/openapi-generator/src/main/resources/aspnetcore/2.0/README.mustache @@ -1,7 +1,7 @@ # {{packageName}} - ASP.NET Core 2.0 Server {{#appDescriptionWithNewLines}} -{{{appDescriptionWithNewLines}}} +{{{.}}} {{/appDescriptionWithNewLines}} ## Run diff --git a/modules/openapi-generator/src/main/resources/aspnetcore/2.0/Startup.mustache b/modules/openapi-generator/src/main/resources/aspnetcore/2.0/Startup.mustache index 044ce0c80e073938db7d1d50cbf9b28369a55dca..fd0b75634c4b2f2e0e9216430601512d7ff07736 100644 --- a/modules/openapi-generator/src/main/resources/aspnetcore/2.0/Startup.mustache +++ b/modules/openapi-generator/src/main/resources/aspnetcore/2.0/Startup.mustache @@ -56,25 +56,25 @@ namespace {{packageName}} services .AddSwaggerGen(c => { - c.SwaggerDoc("{{#version}}{{{version}}}{{/version}}{{^version}}v1{{/version}}", new Info + c.SwaggerDoc("{{{version}}}{{^version}}v1{{/version}}", new Info { - Version = "{{#version}}{{{version}}}{{/version}}{{^version}}v1{{/version}}", - Title = "{{#appName}}{{{appName}}}{{/appName}}{{^appName}}{{packageName}}{{/appName}}", - Description = "{{#appName}}{{{appName}}}{{/appName}}{{^appName}}{{packageName}}{{/appName}} (ASP.NET Core 2.0)", + Version = "{{{version}}}{{^version}}v1{{/version}}", + Title = "{{{appName}}}{{^appName}}{{packageName}}{{/appName}}", + Description = "{{{appName}}}{{^appName}}{{packageName}}{{/appName}} (ASP.NET Core 2.0)", Contact = new Contact() { - Name = "{{#infoName}}{{{infoName}}}{{/infoName}}{{^infoName}}OpenAPI-Generator Contributors{{/infoName}}", - Url = "{{#infoUrl}}{{{infoUrl}}}{{/infoUrl}}{{^infoUrl}}https://github.com/openapitools/openapi-generator{{/infoUrl}}", - Email = "{{#infoEmail}}{{{infoEmail}}}{{/infoEmail}}" + Name = "{{{infoName}}}{{^infoName}}OpenAPI-Generator Contributors{{/infoName}}", + Url = "{{{infoUrl}}}{{^infoUrl}}https://github.com/openapitools/openapi-generator{{/infoUrl}}", + Email = "{{{infoEmail}}}" }, - TermsOfService = "{{#termsOfService}}{{{termsOfService}}}{{/termsOfService}}" + TermsOfService = "{{{termsOfService}}}" }); c.CustomSchemaIds(type => type.FriendlyId(true)); c.DescribeAllEnumsAsStrings(); c.IncludeXmlComments($"{AppContext.BaseDirectory}{Path.DirectorySeparatorChar}{_hostingEnv.ApplicationName}.xml"); {{#basePathWithoutHost}} // Sets the basePath property in the Swagger document generated - c.DocumentFilter<BasePathFilter>("{{{basePathWithoutHost}}}"); + c.DocumentFilter<BasePathFilter>("{{{.}}}"); {{/basePathWithoutHost}} // Include DataAnnotation attributes on Controller Action parameters as Swagger validation rules (e.g required, pattern, ..) @@ -100,10 +100,10 @@ namespace {{packageName}} .UseSwaggerUI(c => { //TODO: Either use the SwaggerGen generated Swagger contract (generated from C# classes) - c.SwaggerEndpoint("/swagger/{{#version}}{{{version}}}{{/version}}{{^version}}v1{{/version}}/openapi.json", "{{#appName}}{{{appName}}}{{/appName}}{{^appName}}{{packageName}}{{/appName}}"); + c.SwaggerEndpoint("/swagger/{{{version}}}{{^version}}v1{{/version}}/openapi.json", "{{{appName}}}{{^appName}}{{packageName}}{{/appName}}"); //TODO: Or alternatively use the original Swagger contract that's included in the static files - // c.SwaggerEndpoint("/openapi-original.json", "{{#appName}}{{{appName}}}{{/appName}}{{^appName}}{{packageName}}{{/appName}} Original"); + // c.SwaggerEndpoint("/openapi-original.json", "{{{appName}}}{{^appName}}{{packageName}}{{/appName}} Original"); }){{/useSwashbuckle}}; if (_hostingEnv.IsDevelopment()) diff --git a/modules/openapi-generator/src/main/resources/aspnetcore/2.0/controller.mustache b/modules/openapi-generator/src/main/resources/aspnetcore/2.0/controller.mustache index a1b1701985d5f89fecd0ee0e5684bad8d6fc9fff..ac89e53c31a985142aeeac1565642f7da0a31bdd 100644 --- a/modules/openapi-generator/src/main/resources/aspnetcore/2.0/controller.mustache +++ b/modules/openapi-generator/src/main/resources/aspnetcore/2.0/controller.mustache @@ -16,13 +16,13 @@ namespace {{packageName}}.Controllers /// <summary> /// {{description}} /// </summary>{{#description}} - [Description("{{description}}")]{{/description}} + [Description("{{.}}")]{{/description}} public class {{classname}}Controller : Controller { {{#operation}} /// <summary> - /// {{#summary}}{{summary}}{{/summary}} + /// {{summary}} /// </summary>{{#notes}} - /// <remarks>{{notes}}</remarks>{{/notes}}{{#allParams}} + /// <remarks>{{.}}</remarks>{{/notes}}{{#allParams}} /// <param name="{{paramName}}">{{description}}{{#isDeprecated}} (deprecated){{/isDeprecated}}</param>{{/allParams}}{{#responses}} /// <response code="{{code}}">{{message}}</response>{{/responses}} [{{httpMethod}}] @@ -32,7 +32,7 @@ namespace {{packageName}}.Controllers {{/vendorExtensions.x-aspnetcore-consumes}} [ValidateModelState]{{#useSwashbuckle}} [SwaggerOperation("{{operationId}}")]{{#responses}}{{#dataType}} - [SwaggerResponse(statusCode: {{code}}, type: typeof({{&dataType}}), description: "{{message}}")]{{/dataType}}{{^dataType}}{{/dataType}}{{/responses}}{{/useSwashbuckle}} + [SwaggerResponse(statusCode: {{code}}, type: typeof({{&dataType}}), description: "{{message}}")]{{/dataType}}{{/responses}}{{/useSwashbuckle}} {{#isDeprecated}} [Obsolete] {{/isDeprecated}} diff --git a/modules/openapi-generator/src/main/resources/aspnetcore/2.0/enumClass.mustache b/modules/openapi-generator/src/main/resources/aspnetcore/2.0/enumClass.mustache index a8a68b99844940f605ab87bea0ef219b6b6198b0..ba23434982afea4e33ee69cc48a37e40f0a9fdff 100644 --- a/modules/openapi-generator/src/main/resources/aspnetcore/2.0/enumClass.mustache +++ b/modules/openapi-generator/src/main/resources/aspnetcore/2.0/enumClass.mustache @@ -1,12 +1,12 @@ /// <summary> - /// {{^description}}Gets or Sets {{{name}}}{{/description}}{{#description}}{{{description}}}{{/description}} + /// {{^description}}Gets or Sets {{{name}}}{{/description}}{{{description}}} /// </summary> {{#description}} - /// <value>{{{description}}}</value> + /// <value>{{{.}}}</value> {{/description}} {{#allowableValues}}{{#enumVars}}{{#-first}}{{#isString}}[JsonConverter(typeof(Newtonsoft.Json.Converters.StringEnumConverter))]{{/isString}}{{/-first}}{{/enumVars}}{{/allowableValues}} - public enum {{#datatypeWithEnum}}{{.}}{{/datatypeWithEnum}}{{^datatypeWithEnum}}{{classname}}{{/datatypeWithEnum}} + public enum {{datatypeWithEnum}}{{^datatypeWithEnum}}{{classname}}{{/datatypeWithEnum}} { {{#allowableValues}}{{#enumVars}} /// <summary> diff --git a/modules/openapi-generator/src/main/resources/aspnetcore/2.0/formParam.mustache b/modules/openapi-generator/src/main/resources/aspnetcore/2.0/formParam.mustache index 7c9085c62dfe310a9bd2574f5da071ebba161d42..e2c1c23a4078323217984aaa298d1284733b44f3 100644 --- a/modules/openapi-generator/src/main/resources/aspnetcore/2.0/formParam.mustache +++ b/modules/openapi-generator/src/main/resources/aspnetcore/2.0/formParam.mustache @@ -1 +1 @@ -{{#isFormParam}}{{^isBinary}}[FromForm (Name = "{{baseName}}")]{{/isBinary}}{{#required}}[Required()]{{/required}}{{#pattern}}[RegularExpression("{{{pattern}}}")]{{/pattern}}{{#minLength}}{{#maxLength}}[StringLength({{maxLength}}, MinimumLength={{minLength}})]{{/maxLength}}{{/minLength}}{{#minLength}}{{^maxLength}} [MinLength({{minLength}})]{{/maxLength}}{{/minLength}}{{^minLength}}{{#maxLength}} [MaxLength({{maxLength}})]{{/maxLength}}{{/minLength}}{{#minimum}}{{#maximum}}[Range({{minimum}}, {{maximum}})]{{/maximum}}{{/minimum}}{{&dataType}} {{paramName}}{{/isFormParam}} \ No newline at end of file +{{#isFormParam}}{{^isBinary}}[FromForm (Name = "{{baseName}}")]{{/isBinary}}{{#required}}[Required()]{{/required}}{{#pattern}}[RegularExpression("{{{.}}}")]{{/pattern}}{{#minLength}}{{#maxLength}}[StringLength({{maxLength}}, MinimumLength={{minLength}})]{{/maxLength}}{{/minLength}}{{#minLength}}{{^maxLength}} [MinLength({{minLength}})]{{/maxLength}}{{/minLength}}{{^minLength}}{{#maxLength}} [MaxLength({{.}})]{{/maxLength}}{{/minLength}}{{#minimum}}{{#maximum}}[Range({{minimum}}, {{maximum}})]{{/maximum}}{{/minimum}}{{&dataType}} {{paramName}}{{/isFormParam}} \ No newline at end of file diff --git a/modules/openapi-generator/src/main/resources/aspnetcore/2.0/headerParam.mustache b/modules/openapi-generator/src/main/resources/aspnetcore/2.0/headerParam.mustache index 45a5be9d7b5ba3b27918fffd3a1766ee7783f23c..674e03952fdd587c6362b852825c19b2e8f28931 100644 --- a/modules/openapi-generator/src/main/resources/aspnetcore/2.0/headerParam.mustache +++ b/modules/openapi-generator/src/main/resources/aspnetcore/2.0/headerParam.mustache @@ -1 +1 @@ -{{#isHeaderParam}}[FromHeader]{{#required}}[Required()]{{/required}}{{#pattern}}[RegularExpression("{{{pattern}}}")]{{/pattern}}{{#minLength}}{{#maxLength}}[StringLength({{maxLength}}, MinimumLength={{minLength}}){{/maxLength}}{{/minLength}}{{#minLength}}{{^maxLength}} [MinLength({{minLength}})]{{/maxLength}}{{/minLength}}{{^minLength}}{{#maxLength}} [MaxLength({{maxLength}})]{{/maxLength}}{{/minLength}}{{#minimum}}{{#maximum}}[Range({{minimum}}, {{maximum}})]{{/maximum}}{{/minimum}}{{&dataType}} {{paramName}}{{/isHeaderParam}} \ No newline at end of file +{{#isHeaderParam}}[FromHeader]{{#required}}[Required()]{{/required}}{{#pattern}}[RegularExpression("{{{.}}}")]{{/pattern}}{{#minLength}}{{#maxLength}}[StringLength({{maxLength}}, MinimumLength={{minLength}}){{/maxLength}}{{/minLength}}{{#minLength}}{{^maxLength}} [MinLength({{minLength}})]{{/maxLength}}{{/minLength}}{{^minLength}}{{#maxLength}} [MaxLength({{.}})]{{/maxLength}}{{/minLength}}{{#minimum}}{{#maximum}}[Range({{minimum}}, {{maximum}})]{{/maximum}}{{/minimum}}{{&dataType}} {{paramName}}{{/isHeaderParam}} \ No newline at end of file diff --git a/modules/openapi-generator/src/main/resources/aspnetcore/2.0/listReturn.mustache b/modules/openapi-generator/src/main/resources/aspnetcore/2.0/listReturn.mustache index d609e67148c260e253e93ef98dfba4db7d427d57..9f18d71d04c1336c3ca855cf701be6199bf1fb2b 100644 --- a/modules/openapi-generator/src/main/resources/aspnetcore/2.0/listReturn.mustache +++ b/modules/openapi-generator/src/main/resources/aspnetcore/2.0/listReturn.mustache @@ -1,4 +1,4 @@ var example = exampleJson != null - ? JsonConvert.DeserializeObject<{{returnContainer}}<{{#returnType}}{{{returnType}}}{{/returnType}}>>(exampleJson) - : Enumerable.Empty<{{#returnType}}{{{returnType}}}{{/returnType}}>(); \ No newline at end of file + ? JsonConvert.DeserializeObject<{{returnContainer}}<{{{returnType}}}>>(exampleJson) + : Enumerable.Empty<{{{returnType}}}>(); \ No newline at end of file diff --git a/modules/openapi-generator/src/main/resources/aspnetcore/2.0/mapReturn.mustache b/modules/openapi-generator/src/main/resources/aspnetcore/2.0/mapReturn.mustache index 856fb1b3507c413e240d3bf3eee5a60bfe6ec9a3..94f16e11fdc5e7a5acb882e0083a4799a043b46f 100644 --- a/modules/openapi-generator/src/main/resources/aspnetcore/2.0/mapReturn.mustache +++ b/modules/openapi-generator/src/main/resources/aspnetcore/2.0/mapReturn.mustache @@ -1,4 +1,4 @@ var example = exampleJson != null - ? JsonConvert.DeserializeObject<Dictionary<{{#returnType}}{{{returnType}}}{{/returnType}}>>(exampleJson) - : new Dictionary<{{#returnType}}{{{returnType}}}{{/returnType}}>(); \ No newline at end of file + ? JsonConvert.DeserializeObject<Dictionary<{{{returnType}}}>>(exampleJson) + : new Dictionary<{{{returnType}}}>(); \ No newline at end of file diff --git a/modules/openapi-generator/src/main/resources/aspnetcore/2.0/model.mustache b/modules/openapi-generator/src/main/resources/aspnetcore/2.0/model.mustache index bf30b9f5795d1c2f3b4f713c8a06298217e768fd..d28375e4b9b451a130d0547c5a09dea5b2686433 100644 --- a/modules/openapi-generator/src/main/resources/aspnetcore/2.0/model.mustache +++ b/modules/openapi-generator/src/main/resources/aspnetcore/2.0/model.mustache @@ -15,7 +15,7 @@ namespace {{packageName}}.Models /// {{description}} /// </summary> [DataContract] - public partial class {{classname}} : {{#parent}}{{{parent}}}, {{/parent}}IEquatable<{{classname}}> + public partial class {{classname}} : {{#parent}}{{{.}}}, {{/parent}}IEquatable<{{classname}}> { {{#vars}} {{#items.isEnum}} @@ -31,20 +31,20 @@ namespace {{packageName}}.Models {{/complexType}} {{/isEnum}} /// <summary> - /// {{^description}}Gets or Sets {{{name}}}{{/description}}{{#description}}{{description}}{{/description}} + /// {{description}}{{^description}}Gets or Sets {{{name}}}{{/description}} /// </summary> {{#description}} - /// <value>{{description}}</value> + /// <value>{{.}}</value> {{/description}} {{#required}} [Required] {{/required}} [DataMember(Name="{{baseName}}", EmitDefaultValue={{#isNullable}}true{{/isNullable}}{{^isNullable}}false{{/isNullable}})] {{#isEnum}} - public {{{datatypeWithEnum}}}{{#isEnum}}{{^isContainer}}?{{/isContainer}}{{/isEnum}} {{name}} { get; set; }{{#defaultValue}} = {{{defaultValue}}};{{/defaultValue}} + public {{{datatypeWithEnum}}}{{#isEnum}}{{^isContainer}}?{{/isContainer}}{{/isEnum}} {{name}} { get; set; }{{#defaultValue}} = {{{.}}};{{/defaultValue}} {{/isEnum}} {{^isEnum}} - public {{{dataType}}} {{name}} { get; {{#isReadOnly}}private {{/isReadOnly}}set; }{{#defaultValue}} = {{{defaultValue}}};{{/defaultValue}} + public {{{dataType}}} {{name}} { get; {{#isReadOnly}}private {{/isReadOnly}}set; }{{#defaultValue}} = {{{.}}};{{/defaultValue}} {{/isEnum}} {{^-last}} diff --git a/modules/openapi-generator/src/main/resources/aspnetcore/2.0/objectReturn.mustache b/modules/openapi-generator/src/main/resources/aspnetcore/2.0/objectReturn.mustache index 4059a61ac0b814719f81e883dec39a78d9a1f253..b037a14ceba6a9e2dbcffd77270f878feb396962 100644 --- a/modules/openapi-generator/src/main/resources/aspnetcore/2.0/objectReturn.mustache +++ b/modules/openapi-generator/src/main/resources/aspnetcore/2.0/objectReturn.mustache @@ -1,4 +1,4 @@ var example = exampleJson != null - ? JsonConvert.DeserializeObject<{{#returnType}}{{{returnType}}}{{/returnType}}>(exampleJson) - : default({{#returnType}}{{{returnType}}}{{/returnType}}); \ No newline at end of file + ? JsonConvert.DeserializeObject<{{{returnType}}}>(exampleJson) + : default({{{returnType}}}); \ No newline at end of file diff --git a/modules/openapi-generator/src/main/resources/aspnetcore/2.0/partial_header.mustache b/modules/openapi-generator/src/main/resources/aspnetcore/2.0/partial_header.mustache index 9eb233d1197c657adddffb63eab190532c1c4e53..408d841df26d1f9e71d44a023a8711444d5fe9aa 100644 --- a/modules/openapi-generator/src/main/resources/aspnetcore/2.0/partial_header.mustache +++ b/modules/openapi-generator/src/main/resources/aspnetcore/2.0/partial_header.mustache @@ -1,13 +1,13 @@ /* {{#appName}} - * {{{appName}}} + * {{{.}}} * {{/appName}} {{#appDescription}} - * {{{appDescription}}} + * {{{.}}} * {{/appDescription}} - * {{#version}}The version of the OpenAPI document: {{{version}}}{{/version}} - * {{#infoEmail}}Contact: {{{infoEmail}}}{{/infoEmail}} + * {{#version}}The version of the OpenAPI document: {{{.}}}{{/version}} + * {{#infoEmail}}Contact: {{{.}}}{{/infoEmail}} * Generated by: https://openapi-generator.tech */ diff --git a/modules/openapi-generator/src/main/resources/aspnetcore/2.0/pathParam.mustache b/modules/openapi-generator/src/main/resources/aspnetcore/2.0/pathParam.mustache index e2a30150536fe67cf8fef95d867e42e44ef3b428..240144e0a8064d82483dff0cbc05516967c28b69 100644 --- a/modules/openapi-generator/src/main/resources/aspnetcore/2.0/pathParam.mustache +++ b/modules/openapi-generator/src/main/resources/aspnetcore/2.0/pathParam.mustache @@ -1 +1 @@ -{{#isPathParam}}[FromRoute (Name = "{{baseName}}")]{{#required}}[Required]{{/required}}{{#pattern}}[RegularExpression("{{{pattern}}}")]{{/pattern}}{{#minLength}}{{#maxLength}}[StringLength({{maxLength}}, MinimumLength={{minLength}}){{/maxLength}}{{/minLength}}{{#minLength}}{{^maxLength}} [MinLength({{minLength}})]{{/maxLength}}{{/minLength}}{{^minLength}}{{#maxLength}} [MaxLength({{maxLength}})]{{/maxLength}}{{/minLength}}{{#minimum}}{{#maximum}}[Range({{minimum}}, {{maximum}})]{{/maximum}}{{/minimum}}{{&dataType}} {{paramName}}{{/isPathParam}} \ No newline at end of file +{{#isPathParam}}[FromRoute (Name = "{{baseName}}")]{{#required}}[Required]{{/required}}{{#pattern}}[RegularExpression("{{{.}}}")]{{/pattern}}{{#minLength}}{{#maxLength}}[StringLength({{maxLength}}, MinimumLength={{minLength}}){{/maxLength}}{{/minLength}}{{#minLength}}{{^maxLength}} [MinLength({{minLength}})]{{/maxLength}}{{/minLength}}{{^minLength}}{{#maxLength}} [MaxLength({{.}})]{{/maxLength}}{{/minLength}}{{#minimum}}{{#maximum}}[Range({{minimum}}, {{maximum}})]{{/maximum}}{{/minimum}}{{&dataType}} {{paramName}}{{/isPathParam}} \ No newline at end of file diff --git a/modules/openapi-generator/src/main/resources/aspnetcore/2.0/queryParam.mustache b/modules/openapi-generator/src/main/resources/aspnetcore/2.0/queryParam.mustache index cafc0ccf8680e676a811dac456727241fc5c5e75..b1d9a57e09d129d15fbcd470305f267c303722ca 100644 --- a/modules/openapi-generator/src/main/resources/aspnetcore/2.0/queryParam.mustache +++ b/modules/openapi-generator/src/main/resources/aspnetcore/2.0/queryParam.mustache @@ -1 +1 @@ -{{#isQueryParam}}[FromQuery (Name = "{{baseName}}")]{{#required}}[Required()]{{/required}}{{#pattern}}[RegularExpression("{{{pattern}}}")]{{/pattern}}{{#minLength}}{{#maxLength}}[StringLength({{maxLength}}, MinimumLength={{minLength}}){{/maxLength}}{{/minLength}}{{#minLength}}{{^maxLength}} [MinLength({{minLength}})]{{/maxLength}}{{/minLength}}{{^minLength}}{{#maxLength}} [MaxLength({{maxLength}})]{{/maxLength}}{{/minLength}}{{#minimum}}{{#maximum}}[Range({{minimum}}, {{maximum}})]{{/maximum}}{{/minimum}}{{&dataType}} {{paramName}}{{/isQueryParam}} \ No newline at end of file +{{#isQueryParam}}[FromQuery (Name = "{{baseName}}")]{{#required}}[Required()]{{/required}}{{#pattern}}[RegularExpression("{{{.}}}")]{{/pattern}}{{#minLength}}{{#maxLength}}[StringLength({{maxLength}}, MinimumLength={{minLength}}){{/maxLength}}{{/minLength}}{{#minLength}}{{^maxLength}} [MinLength({{minLength}})]{{/maxLength}}{{/minLength}}{{^minLength}}{{#maxLength}} [MaxLength({{.}})]{{/maxLength}}{{/minLength}}{{#minimum}}{{#maximum}}[Range({{minimum}}, {{maximum}})]{{/maximum}}{{/minimum}}{{&dataType}} {{paramName}}{{/isQueryParam}} \ No newline at end of file diff --git a/modules/openapi-generator/src/main/resources/aspnetcore/2.0/validateModel.mustache b/modules/openapi-generator/src/main/resources/aspnetcore/2.0/validateModel.mustache index e11aaa5d2708d1736441dc6c1058dc9099ba10dc..0b2d5fdb70f0c0b8c9c1dfafac645ddbf6d37455 100644 --- a/modules/openapi-generator/src/main/resources/aspnetcore/2.0/validateModel.mustache +++ b/modules/openapi-generator/src/main/resources/aspnetcore/2.0/validateModel.mustache @@ -26,7 +26,7 @@ namespace {{packageName}}.Attributes { object args = null; if (context.ActionArguments.ContainsKey(parameter.Name)) - { + { args = context.ActionArguments[parameter.Name]; } diff --git a/modules/openapi-generator/src/main/resources/aspnetcore/2.1/Authentication/ApiAuthentication.mustache b/modules/openapi-generator/src/main/resources/aspnetcore/2.1/Authentication/ApiAuthentication.mustache index 755fefbd50640ac4dda782422300e94a44afb1d0..10ca7809ab8c73795f4472a45a3fedf634ce6998 100644 --- a/modules/openapi-generator/src/main/resources/aspnetcore/2.1/Authentication/ApiAuthentication.mustache +++ b/modules/openapi-generator/src/main/resources/aspnetcore/2.1/Authentication/ApiAuthentication.mustache @@ -69,4 +69,3 @@ namespace {{packageName}}.Authentication } } } - diff --git a/modules/openapi-generator/src/main/resources/aspnetcore/2.1/Filters/GeneratePathParamsValidationFilter.mustache b/modules/openapi-generator/src/main/resources/aspnetcore/2.1/Filters/GeneratePathParamsValidationFilter.mustache index d857a4a0f960c9df6768a8061e785b4c64b4fbb5..e990e87db3b46f1726a98daf435f82ecb6539d19 100644 --- a/modules/openapi-generator/src/main/resources/aspnetcore/2.1/Filters/GeneratePathParamsValidationFilter.mustache +++ b/modules/openapi-generator/src/main/resources/aspnetcore/2.1/Filters/GeneratePathParamsValidationFilter.mustache @@ -94,4 +94,3 @@ namespace {{packageName}}.Filters } } } - diff --git a/modules/openapi-generator/src/main/resources/aspnetcore/2.1/Formatters/InputFormatterStream.mustache b/modules/openapi-generator/src/main/resources/aspnetcore/2.1/Formatters/InputFormatterStream.mustache index f1a002ded67c39c075a431b250b70d97699f2e86..e24d0a237a118e1f1f626f23ad4deb1a967fee53 100644 --- a/modules/openapi-generator/src/main/resources/aspnetcore/2.1/Formatters/InputFormatterStream.mustache +++ b/modules/openapi-generator/src/main/resources/aspnetcore/2.1/Formatters/InputFormatterStream.mustache @@ -13,7 +13,7 @@ namespace {{packageName}}.Formatters SupportedMediaTypes.Add("application/octet-stream"); SupportedMediaTypes.Add("image/jpeg"); } - + protected override bool CanReadType(Type type) { if (type == typeof(Stream)) diff --git a/modules/openapi-generator/src/main/resources/aspnetcore/2.1/Program.mustache b/modules/openapi-generator/src/main/resources/aspnetcore/2.1/Program.mustache index 73cb81a3e4111b943942a838af1746bf3c2f2400..ebe8176de556697580499a2be87831310e18bdd2 100644 --- a/modules/openapi-generator/src/main/resources/aspnetcore/2.1/Program.mustache +++ b/modules/openapi-generator/src/main/resources/aspnetcore/2.1/Program.mustache @@ -25,6 +25,6 @@ namespace {{packageName}} public static IWebHostBuilder CreateWebHostBuilder(string[] args) => WebHost.CreateDefaultBuilder(args) .UseStartup<Startup>() - .UseUrls("http://0.0.0.0:{{#serverPort}}{{serverPort}}{{/serverPort}}{{^serverPort}}8080{{/serverPort}}/"); + .UseUrls("http://0.0.0.0:{{serverPort}}{{^serverPort}}8080{{/serverPort}}/"); } } \ No newline at end of file diff --git a/modules/openapi-generator/src/main/resources/aspnetcore/2.1/Project.csproj.mustache b/modules/openapi-generator/src/main/resources/aspnetcore/2.1/Project.csproj.mustache index 88a0fd7e44efc9b9670eba236af0d2f0e6baeb0a..f257cb18acaf3685c46d21c40edaf12e812ff669 100644 --- a/modules/openapi-generator/src/main/resources/aspnetcore/2.1/Project.csproj.mustache +++ b/modules/openapi-generator/src/main/resources/aspnetcore/2.1/Project.csproj.mustache @@ -1,6 +1,6 @@ <Project Sdk="{{projectSdk}}"> <PropertyGroup> - <Description>{{^packageDescription}}{{packageName}}{{/packageDescription}}{{packageDescription}}</Description> + <Description>{{packageDescription}}{{^packageDescription}}{{packageName}}{{/packageDescription}}</Description> <Copyright>{{packageCopyright}}</Copyright> <Authors>{{packageAuthors}}</Authors> <TargetFramework>netcoreapp{{aspnetCoreVersion}}</TargetFramework> diff --git a/modules/openapi-generator/src/main/resources/aspnetcore/2.1/Project.nuspec.mustache b/modules/openapi-generator/src/main/resources/aspnetcore/2.1/Project.nuspec.mustache index d6a52c2c20a9169e500e6d0f9af2745b09919ab0..0849b54d06dbccb669b299fd3682df588127544a 100644 --- a/modules/openapi-generator/src/main/resources/aspnetcore/2.1/Project.nuspec.mustache +++ b/modules/openapi-generator/src/main/resources/aspnetcore/2.1/Project.nuspec.mustache @@ -12,7 +12,7 @@ <iconUrl>http://ICON_URL_HERE_OR_DELETE_THIS_LINE</iconUrl> --> <requireLicenseAcceptance>false</requireLicenseAcceptance> - <description>{{^packageDescription}}{{packageName}}{{/packageDescription}}{{packageDescription}}</description> + <description>{{packageDescription}}{{^packageDescription}}{{packageName}}{{/packageDescription}}</description> <releaseNotes>Summary of changes made in this release of the package.</releaseNotes> <copyright>{{packageCopyright}}</copyright> <tags>{{packageName}}</tags> diff --git a/modules/openapi-generator/src/main/resources/aspnetcore/2.1/README.mustache b/modules/openapi-generator/src/main/resources/aspnetcore/2.1/README.mustache index c5673ac9d1db0d2602296435471ad0ba843b06e5..3602e5d507da26eea2aa2d1760b55a9255ced9f2 100644 --- a/modules/openapi-generator/src/main/resources/aspnetcore/2.1/README.mustache +++ b/modules/openapi-generator/src/main/resources/aspnetcore/2.1/README.mustache @@ -1,7 +1,7 @@ # {{packageName}} - ASP.NET Core {{aspnetCoreVersion}} Server {{#appDescriptionWithNewLines}} -{{{appDescriptionWithNewLines}}} +{{{.}}} {{/appDescriptionWithNewLines}} ## Run diff --git a/modules/openapi-generator/src/main/resources/aspnetcore/2.1/Startup.mustache b/modules/openapi-generator/src/main/resources/aspnetcore/2.1/Startup.mustache index 50ad25a5e419b7b81453853b889abefbed3aa4b8..7c25355f3914c4edac36692d0112f531c5da9849 100644 --- a/modules/openapi-generator/src/main/resources/aspnetcore/2.1/Startup.mustache +++ b/modules/openapi-generator/src/main/resources/aspnetcore/2.1/Startup.mustache @@ -62,7 +62,7 @@ namespace {{packageName}} opts.InputFormatters.Insert(0, new InputFormatterStream()); }) {{#compatibilityVersion}} - .SetCompatibilityVersion(CompatibilityVersion.{{compatibilityVersion}}) + .SetCompatibilityVersion(CompatibilityVersion.{{.}}) {{/compatibilityVersion}} .{{#useNewtonsoft}}AddNewtonsoftJson{{/useNewtonsoft}}{{^useNewtonsoft}}AddJsonOptions{{/useNewtonsoft}}(opts => { @@ -77,25 +77,25 @@ namespace {{packageName}} services .AddSwaggerGen(c => { - c.SwaggerDoc("{{#version}}{{{version}}}{{/version}}{{^version}}v1{{/version}}", new Info + c.SwaggerDoc("{{{version}}}{{^version}}v1{{/version}}", new Info { - Version = "{{#version}}{{{version}}}{{/version}}{{^version}}v1{{/version}}", - Title = "{{#appName}}{{{appName}}}{{/appName}}{{^appName}}{{packageName}}{{/appName}}", - Description = "{{#appName}}{{{appName}}}{{/appName}}{{^appName}}{{packageName}}{{/appName}} (ASP.NET Core {{aspnetCoreVersion}})", + Version = "{{{version}}}{{^version}}v1{{/version}}", + Title = "{{{appName}}}{{^appName}}{{packageName}}{{/appName}}", + Description = "{{{appName}}}{{^appName}}{{packageName}}{{/appName}} (ASP.NET Core {{aspnetCoreVersion}})", Contact = new Contact() { - Name = "{{#infoName}}{{{infoName}}}{{/infoName}}{{^infoName}}OpenAPI-Generator Contributors{{/infoName}}", - Url = "{{#infoUrl}}{{{infoUrl}}}{{/infoUrl}}{{^infoUrl}}https://github.com/openapitools/openapi-generator{{/infoUrl}}", - Email = "{{#infoEmail}}{{{infoEmail}}}{{/infoEmail}}" + Name = "{{{infoName}}}{{^infoName}}OpenAPI-Generator Contributors{{/infoName}}", + Url = "{{{infoUrl}}}{{^infoUrl}}https://github.com/openapitools/openapi-generator{{/infoUrl}}", + Email = "{{{infoEmail}}}" }, - TermsOfService = "{{#termsOfService}}{{{termsOfService}}}{{/termsOfService}}" + TermsOfService = "{{{termsOfService}}}" }); c.CustomSchemaIds(type => type.FriendlyId(true)); c.DescribeAllEnumsAsStrings(); c.IncludeXmlComments($"{AppContext.BaseDirectory}{Path.DirectorySeparatorChar}{Assembly.GetEntryAssembly().GetName().Name}.xml"); {{#basePathWithoutHost}} // Sets the basePath property in the Swagger document generated - c.DocumentFilter<BasePathFilter>("{{{basePathWithoutHost}}}"); + c.DocumentFilter<BasePathFilter>("{{{.}}}"); {{/basePathWithoutHost}} // Include DataAnnotation attributes on Controller Action parameters as Swagger validation rules (e.g required, pattern, ..) @@ -123,10 +123,10 @@ namespace {{packageName}} .UseSwaggerUI(c => { //TODO: Either use the SwaggerGen generated Swagger contract (generated from C# classes) - c.SwaggerEndpoint("/swagger/{{#version}}{{{version}}}{{/version}}{{^version}}v1{{/version}}/openapi.json", "{{#appName}}{{{appName}}}{{/appName}}{{^appName}}{{packageName}}{{/appName}}"); + c.SwaggerEndpoint("/swagger/{{{version}}}{{^version}}v1{{/version}}/openapi.json", "{{{appName}}}{{^appName}}{{packageName}}{{/appName}}"); //TODO: Or alternatively use the original Swagger contract that's included in the static files - // c.SwaggerEndpoint("/openapi-original.json", "{{#appName}}{{{appName}}}{{/appName}}{{^appName}}{{packageName}}{{/appName}} Original"); + // c.SwaggerEndpoint("/openapi-original.json", "{{{appName}}}{{^appName}}{{packageName}}{{/appName}} Original"); }){{/useSwashbuckle}}; {{^useDefaultRouting}} app.UseRouting(); diff --git a/modules/openapi-generator/src/main/resources/aspnetcore/2.1/controller.mustache b/modules/openapi-generator/src/main/resources/aspnetcore/2.1/controller.mustache index c8203923b9dea7419c4390582d9e5c5a53e84e81..52b6ec5c5ee7da9e5731fa353fd4c56a8ebd87ce 100644 --- a/modules/openapi-generator/src/main/resources/aspnetcore/2.1/controller.mustache +++ b/modules/openapi-generator/src/main/resources/aspnetcore/2.1/controller.mustache @@ -23,14 +23,14 @@ namespace {{apiPackage}} /// <summary> /// {{description}} /// </summary>{{#description}} - [Description("{{description}}")]{{/description}} + [Description("{{.}}")]{{/description}} [ApiController] - public {{#classModifier}}{{classModifier}} {{/classModifier}}class {{classname}}Controller : ControllerBase + public {{#classModifier}}{{.}} {{/classModifier}}class {{classname}}Controller : ControllerBase { {{#operation}} /// <summary> - /// {{#summary}}{{summary}}{{/summary}} + /// {{summary}} /// </summary>{{#notes}} - /// <remarks>{{notes}}</remarks>{{/notes}}{{#allParams}} + /// <remarks>{{.}}</remarks>{{/notes}}{{#allParams}} /// <param name="{{paramName}}">{{description}}{{#isDeprecated}} (deprecated){{/isDeprecated}}</param>{{/allParams}}{{#responses}} /// <response code="{{code}}">{{message}}</response>{{/responses}} [{{httpMethod}}] @@ -48,14 +48,14 @@ namespace {{apiPackage}} {{/vendorExtensions.x-aspnetcore-consumes}} [ValidateModelState]{{#useSwashbuckle}} [SwaggerOperation("{{operationId}}")]{{#responses}}{{#dataType}} - [SwaggerResponse(statusCode: {{code}}, type: typeof({{&dataType}}), description: "{{message}}")]{{/dataType}}{{^dataType}}{{/dataType}}{{/responses}}{{/useSwashbuckle}}{{^useSwashbuckle}}{{#responses}}{{#dataType}} - [ProducesResponseType(statusCode: {{code}}, type: typeof({{&dataType}}))]{{/dataType}}{{^dataType}}{{/dataType}}{{/responses}}{{/useSwashbuckle}} + [SwaggerResponse(statusCode: {{code}}, type: typeof({{&dataType}}), description: "{{message}}")]{{/dataType}}{{/responses}}{{/useSwashbuckle}}{{^useSwashbuckle}}{{#responses}}{{#dataType}} + [ProducesResponseType(statusCode: {{code}}, type: typeof({{&dataType}}))]{{/dataType}}{{/responses}}{{/useSwashbuckle}} {{#isDeprecated}} [Obsolete] {{/isDeprecated}} public {{operationModifier}} {{#operationResultTask}}{{#operationIsAsync}}async {{/operationIsAsync}}Task<{{/operationResultTask}}IActionResult{{#operationResultTask}}>{{/operationResultTask}} {{operationId}}({{#allParams}}{{>pathParam}}{{>queryParam}}{{>bodyParam}}{{>formParam}}{{>headerParam}}{{^-last}}{{^isCookieParam}}, {{/isCookieParam}}{{/-last}}{{/allParams}}){{^generateBody}};{{/generateBody}} {{#generateBody}} - { + { {{#cookieParams}} var {{paramName}} = Request.Cookies["{{paramName}}"]; {{/cookieParams}} diff --git a/modules/openapi-generator/src/main/resources/aspnetcore/2.1/enumClass.mustache b/modules/openapi-generator/src/main/resources/aspnetcore/2.1/enumClass.mustache index 8a932b5ade61148c2e1f006cf6d87619429e0819..cd6595452ae48b5b2ebf6259b23ca46a809d9e92 100644 --- a/modules/openapi-generator/src/main/resources/aspnetcore/2.1/enumClass.mustache +++ b/modules/openapi-generator/src/main/resources/aspnetcore/2.1/enumClass.mustache @@ -1,13 +1,13 @@ /// <summary> - /// {{^description}}Gets or Sets {{{name}}}{{/description}}{{#description}}{{{description}}}{{/description}} + /// {{^description}}Gets or Sets {{{name}}}{{/description}}{{{description}}} /// </summary> {{#description}} - /// <value>{{{description}}}</value> + /// <value>{{{.}}}</value> {{/description}} - {{#allowableValues}}{{#enumVars}}{{#-first}}{{#isString}}[TypeConverter(typeof(CustomEnumConverter<{{#datatypeWithEnum}}{{.}}{{/datatypeWithEnum}}{{^datatypeWithEnum}}{{classname}}{{/datatypeWithEnum}}>))] + {{#allowableValues}}{{#enumVars}}{{#-first}}{{#isString}}[TypeConverter(typeof(CustomEnumConverter<{{datatypeWithEnum}}{{^datatypeWithEnum}}{{classname}}{{/datatypeWithEnum}}>))] [JsonConverter(typeof(Newtonsoft.Json.Converters.StringEnumConverter))]{{/isString}}{{/-first}}{{/enumVars}}{{/allowableValues}} - public enum {{#datatypeWithEnum}}{{.}}{{/datatypeWithEnum}}{{^datatypeWithEnum}}{{classname}}{{/datatypeWithEnum}} + public enum {{datatypeWithEnum}}{{^datatypeWithEnum}}{{classname}}{{/datatypeWithEnum}} { {{#allowableValues}}{{#enumVars}} /// <summary> diff --git a/modules/openapi-generator/src/main/resources/aspnetcore/2.1/formParam.mustache b/modules/openapi-generator/src/main/resources/aspnetcore/2.1/formParam.mustache index 7c9085c62dfe310a9bd2574f5da071ebba161d42..e2c1c23a4078323217984aaa298d1284733b44f3 100644 --- a/modules/openapi-generator/src/main/resources/aspnetcore/2.1/formParam.mustache +++ b/modules/openapi-generator/src/main/resources/aspnetcore/2.1/formParam.mustache @@ -1 +1 @@ -{{#isFormParam}}{{^isBinary}}[FromForm (Name = "{{baseName}}")]{{/isBinary}}{{#required}}[Required()]{{/required}}{{#pattern}}[RegularExpression("{{{pattern}}}")]{{/pattern}}{{#minLength}}{{#maxLength}}[StringLength({{maxLength}}, MinimumLength={{minLength}})]{{/maxLength}}{{/minLength}}{{#minLength}}{{^maxLength}} [MinLength({{minLength}})]{{/maxLength}}{{/minLength}}{{^minLength}}{{#maxLength}} [MaxLength({{maxLength}})]{{/maxLength}}{{/minLength}}{{#minimum}}{{#maximum}}[Range({{minimum}}, {{maximum}})]{{/maximum}}{{/minimum}}{{&dataType}} {{paramName}}{{/isFormParam}} \ No newline at end of file +{{#isFormParam}}{{^isBinary}}[FromForm (Name = "{{baseName}}")]{{/isBinary}}{{#required}}[Required()]{{/required}}{{#pattern}}[RegularExpression("{{{.}}}")]{{/pattern}}{{#minLength}}{{#maxLength}}[StringLength({{maxLength}}, MinimumLength={{minLength}})]{{/maxLength}}{{/minLength}}{{#minLength}}{{^maxLength}} [MinLength({{minLength}})]{{/maxLength}}{{/minLength}}{{^minLength}}{{#maxLength}} [MaxLength({{.}})]{{/maxLength}}{{/minLength}}{{#minimum}}{{#maximum}}[Range({{minimum}}, {{maximum}})]{{/maximum}}{{/minimum}}{{&dataType}} {{paramName}}{{/isFormParam}} \ No newline at end of file diff --git a/modules/openapi-generator/src/main/resources/aspnetcore/2.1/headerParam.mustache b/modules/openapi-generator/src/main/resources/aspnetcore/2.1/headerParam.mustache index a3a929904c625a7fbee66d6af0dc64880feee5ac..a742a222236d64d1a5035469dd75ed82d5082fe5 100644 --- a/modules/openapi-generator/src/main/resources/aspnetcore/2.1/headerParam.mustache +++ b/modules/openapi-generator/src/main/resources/aspnetcore/2.1/headerParam.mustache @@ -1 +1 @@ -{{#isHeaderParam}}[FromHeader]{{#required}}[Required()]{{/required}}{{#pattern}}[RegularExpression("{{{pattern}}}")]{{/pattern}}{{#minLength}}{{#maxLength}}[StringLength({{maxLength}}, MinimumLength={{minLength}})]{{/maxLength}}{{/minLength}}{{#minLength}}{{^maxLength}} [MinLength({{minLength}})]{{/maxLength}}{{/minLength}}{{^minLength}}{{#maxLength}} [MaxLength({{maxLength}})]{{/maxLength}}{{/minLength}}{{#minimum}}{{#maximum}}[Range({{minimum}}, {{maximum}})]{{/maximum}}{{/minimum}}{{&dataType}} {{paramName}}{{/isHeaderParam}} \ No newline at end of file +{{#isHeaderParam}}[FromHeader]{{#required}}[Required()]{{/required}}{{#pattern}}[RegularExpression("{{{.}}}")]{{/pattern}}{{#minLength}}{{#maxLength}}[StringLength({{maxLength}}, MinimumLength={{minLength}})]{{/maxLength}}{{/minLength}}{{#minLength}}{{^maxLength}} [MinLength({{minLength}})]{{/maxLength}}{{/minLength}}{{^minLength}}{{#maxLength}} [MaxLength({{.}})]{{/maxLength}}{{/minLength}}{{#minimum}}{{#maximum}}[Range({{minimum}}, {{maximum}})]{{/maximum}}{{/minimum}}{{&dataType}} {{paramName}}{{/isHeaderParam}} \ No newline at end of file diff --git a/modules/openapi-generator/src/main/resources/aspnetcore/2.1/listReturn.mustache b/modules/openapi-generator/src/main/resources/aspnetcore/2.1/listReturn.mustache index d609e67148c260e253e93ef98dfba4db7d427d57..9f18d71d04c1336c3ca855cf701be6199bf1fb2b 100644 --- a/modules/openapi-generator/src/main/resources/aspnetcore/2.1/listReturn.mustache +++ b/modules/openapi-generator/src/main/resources/aspnetcore/2.1/listReturn.mustache @@ -1,4 +1,4 @@ var example = exampleJson != null - ? JsonConvert.DeserializeObject<{{returnContainer}}<{{#returnType}}{{{returnType}}}{{/returnType}}>>(exampleJson) - : Enumerable.Empty<{{#returnType}}{{{returnType}}}{{/returnType}}>(); \ No newline at end of file + ? JsonConvert.DeserializeObject<{{returnContainer}}<{{{returnType}}}>>(exampleJson) + : Enumerable.Empty<{{{returnType}}}>(); \ No newline at end of file diff --git a/modules/openapi-generator/src/main/resources/aspnetcore/2.1/mapReturn.mustache b/modules/openapi-generator/src/main/resources/aspnetcore/2.1/mapReturn.mustache index 856fb1b3507c413e240d3bf3eee5a60bfe6ec9a3..94f16e11fdc5e7a5acb882e0083a4799a043b46f 100644 --- a/modules/openapi-generator/src/main/resources/aspnetcore/2.1/mapReturn.mustache +++ b/modules/openapi-generator/src/main/resources/aspnetcore/2.1/mapReturn.mustache @@ -1,4 +1,4 @@ var example = exampleJson != null - ? JsonConvert.DeserializeObject<Dictionary<{{#returnType}}{{{returnType}}}{{/returnType}}>>(exampleJson) - : new Dictionary<{{#returnType}}{{{returnType}}}{{/returnType}}>(); \ No newline at end of file + ? JsonConvert.DeserializeObject<Dictionary<{{{returnType}}}>>(exampleJson) + : new Dictionary<{{{returnType}}}>(); \ No newline at end of file diff --git a/modules/openapi-generator/src/main/resources/aspnetcore/2.1/model.mustache b/modules/openapi-generator/src/main/resources/aspnetcore/2.1/model.mustache index 491b39e54a1413e422da2924b05acfaf94185d94..9b146b1587150227d152e1ec5b4318f58cbcd777 100644 --- a/modules/openapi-generator/src/main/resources/aspnetcore/2.1/model.mustache +++ b/modules/openapi-generator/src/main/resources/aspnetcore/2.1/model.mustache @@ -17,7 +17,7 @@ namespace {{modelPackage}} /// {{description}} /// </summary> [DataContract] - public {{#modelClassModifier}}{{modelClassModifier}} {{/modelClassModifier}}class {{classname}} : {{#parent}}{{{parent}}}, {{/parent}}IEquatable<{{classname}}> + public {{#modelClassModifier}}{{.}} {{/modelClassModifier}}class {{classname}} : {{#parent}}{{{.}}}, {{/parent}}IEquatable<{{classname}}> { {{#vars}} {{#items.isEnum}} @@ -33,21 +33,21 @@ namespace {{modelPackage}} {{/complexType}} {{/isEnum}} /// <summary> - /// {{^description}}Gets or Sets {{{name}}}{{/description}}{{#description}}{{description}}{{/description}} + /// {{description}}{{^description}}Gets or Sets {{{name}}}{{/description}} /// </summary>{{#description}} - /// <value>{{description}}</value>{{/description}}{{#required}} + /// <value>{{.}}</value>{{/description}}{{#required}} [Required]{{/required}}{{#pattern}} - [RegularExpression("{{{pattern}}}")]{{/pattern}}{{#minLength}}{{#maxLength}} + [RegularExpression("{{{.}}}")]{{/pattern}}{{#minLength}}{{#maxLength}} [StringLength({{maxLength}}, MinimumLength={{minLength}})]{{/maxLength}}{{/minLength}}{{#minLength}}{{^maxLength}} [MinLength({{minLength}})]{{/maxLength}}{{/minLength}}{{^minLength}}{{#maxLength}} - [MaxLength({{maxLength}})]{{/maxLength}}{{/minLength}}{{#minimum}}{{#maximum}} + [MaxLength({{.}})]{{/maxLength}}{{/minLength}}{{#minimum}}{{#maximum}} [Range({{minimum}}, {{maximum}})]{{/maximum}}{{/minimum}} [DataMember(Name="{{baseName}}", EmitDefaultValue={{#isNullable}}true{{/isNullable}}{{^isNullable}}false{{/isNullable}})] {{#isEnum}} - public {{{datatypeWithEnum}}}{{#isNullable}}?{{/isNullable}} {{name}} { get; set; }{{#defaultValue}} = {{{defaultValue}}};{{/defaultValue}} + public {{{datatypeWithEnum}}}{{#isNullable}}?{{/isNullable}} {{name}} { get; set; }{{#defaultValue}} = {{{.}}};{{/defaultValue}} {{/isEnum}} {{^isEnum}} - public {{{dataType}}} {{name}} { get; {{#isReadOnly}}private {{/isReadOnly}}set; }{{#defaultValue}} = {{{defaultValue}}};{{/defaultValue}} + public {{{dataType}}} {{name}} { get; {{#isReadOnly}}private {{/isReadOnly}}set; }{{#defaultValue}} = {{{.}}};{{/defaultValue}} {{/isEnum}} {{^-last}} diff --git a/modules/openapi-generator/src/main/resources/aspnetcore/2.1/objectReturn.mustache b/modules/openapi-generator/src/main/resources/aspnetcore/2.1/objectReturn.mustache index 4059a61ac0b814719f81e883dec39a78d9a1f253..b037a14ceba6a9e2dbcffd77270f878feb396962 100644 --- a/modules/openapi-generator/src/main/resources/aspnetcore/2.1/objectReturn.mustache +++ b/modules/openapi-generator/src/main/resources/aspnetcore/2.1/objectReturn.mustache @@ -1,4 +1,4 @@ var example = exampleJson != null - ? JsonConvert.DeserializeObject<{{#returnType}}{{{returnType}}}{{/returnType}}>(exampleJson) - : default({{#returnType}}{{{returnType}}}{{/returnType}}); \ No newline at end of file + ? JsonConvert.DeserializeObject<{{{returnType}}}>(exampleJson) + : default({{{returnType}}}); \ No newline at end of file diff --git a/modules/openapi-generator/src/main/resources/aspnetcore/2.1/partial_header.mustache b/modules/openapi-generator/src/main/resources/aspnetcore/2.1/partial_header.mustache index 9eb233d1197c657adddffb63eab190532c1c4e53..408d841df26d1f9e71d44a023a8711444d5fe9aa 100644 --- a/modules/openapi-generator/src/main/resources/aspnetcore/2.1/partial_header.mustache +++ b/modules/openapi-generator/src/main/resources/aspnetcore/2.1/partial_header.mustache @@ -1,13 +1,13 @@ /* {{#appName}} - * {{{appName}}} + * {{{.}}} * {{/appName}} {{#appDescription}} - * {{{appDescription}}} + * {{{.}}} * {{/appDescription}} - * {{#version}}The version of the OpenAPI document: {{{version}}}{{/version}} - * {{#infoEmail}}Contact: {{{infoEmail}}}{{/infoEmail}} + * {{#version}}The version of the OpenAPI document: {{{.}}}{{/version}} + * {{#infoEmail}}Contact: {{{.}}}{{/infoEmail}} * Generated by: https://openapi-generator.tech */ diff --git a/modules/openapi-generator/src/main/resources/aspnetcore/2.1/pathParam.mustache b/modules/openapi-generator/src/main/resources/aspnetcore/2.1/pathParam.mustache index 3447b8005d1316335f7527c568ce14850a3ca36e..83de202f6558280ef48e5c5cfdf53272e8480704 100644 --- a/modules/openapi-generator/src/main/resources/aspnetcore/2.1/pathParam.mustache +++ b/modules/openapi-generator/src/main/resources/aspnetcore/2.1/pathParam.mustache @@ -1 +1 @@ -{{#isPathParam}}[FromRoute (Name = "{{baseName}}")]{{#required}}[Required]{{/required}}{{#pattern}}[RegularExpression("{{{pattern}}}")]{{/pattern}}{{#minLength}}{{#maxLength}}[StringLength({{maxLength}}, MinimumLength={{minLength}})]{{/maxLength}}{{/minLength}}{{#minLength}}{{^maxLength}} [MinLength({{minLength}})]{{/maxLength}}{{/minLength}}{{^minLength}}{{#maxLength}} [MaxLength({{maxLength}})]{{/maxLength}}{{/minLength}}{{#minimum}}{{#maximum}}[Range({{minimum}}, {{maximum}})]{{/maximum}}{{/minimum}}{{&dataType}} {{paramName}}{{/isPathParam}} \ No newline at end of file +{{#isPathParam}}[FromRoute (Name = "{{baseName}}")]{{#required}}[Required]{{/required}}{{#pattern}}[RegularExpression("{{{.}}}")]{{/pattern}}{{#minLength}}{{#maxLength}}[StringLength({{maxLength}}, MinimumLength={{minLength}})]{{/maxLength}}{{/minLength}}{{#minLength}}{{^maxLength}} [MinLength({{minLength}})]{{/maxLength}}{{/minLength}}{{^minLength}}{{#maxLength}} [MaxLength({{.}})]{{/maxLength}}{{/minLength}}{{#minimum}}{{#maximum}}[Range({{minimum}}, {{maximum}})]{{/maximum}}{{/minimum}}{{&dataType}} {{paramName}}{{/isPathParam}} \ No newline at end of file diff --git a/modules/openapi-generator/src/main/resources/aspnetcore/2.1/queryParam.mustache b/modules/openapi-generator/src/main/resources/aspnetcore/2.1/queryParam.mustache index 3a052802fcd72653a023a7d6a1558b86b7e8eda0..a0eedc432ff4c51be45fd05040347e03e98d8a28 100644 --- a/modules/openapi-generator/src/main/resources/aspnetcore/2.1/queryParam.mustache +++ b/modules/openapi-generator/src/main/resources/aspnetcore/2.1/queryParam.mustache @@ -1 +1 @@ -{{#isQueryParam}}[FromQuery (Name = "{{baseName}}")]{{#required}}[Required()]{{/required}}{{#pattern}}[RegularExpression("{{{pattern}}}")]{{/pattern}}{{#minLength}}{{#maxLength}}[StringLength({{maxLength}}, MinimumLength={{minLength}})]{{/maxLength}}{{/minLength}}{{#minLength}}{{^maxLength}} [MinLength({{minLength}})]{{/maxLength}}{{/minLength}}{{^minLength}}{{#maxLength}} [MaxLength({{maxLength}})]{{/maxLength}}{{/minLength}}{{#minimum}}{{#maximum}}[Range({{minimum}}, {{maximum}})]{{/maximum}}{{/minimum}}{{&dataType}} {{paramName}}{{/isQueryParam}} \ No newline at end of file +{{#isQueryParam}}[FromQuery (Name = "{{baseName}}")]{{#required}}[Required()]{{/required}}{{#pattern}}[RegularExpression("{{{.}}}")]{{/pattern}}{{#minLength}}{{#maxLength}}[StringLength({{maxLength}}, MinimumLength={{minLength}})]{{/maxLength}}{{/minLength}}{{#minLength}}{{^maxLength}} [MinLength({{minLength}})]{{/maxLength}}{{/minLength}}{{^minLength}}{{#maxLength}} [MaxLength({{.}})]{{/maxLength}}{{/minLength}}{{#minimum}}{{#maximum}}[Range({{minimum}}, {{maximum}})]{{/maximum}}{{/minimum}}{{&dataType}} {{paramName}}{{/isQueryParam}} \ No newline at end of file diff --git a/modules/openapi-generator/src/main/resources/aspnetcore/2.1/validateModel.mustache b/modules/openapi-generator/src/main/resources/aspnetcore/2.1/validateModel.mustache index e11aaa5d2708d1736441dc6c1058dc9099ba10dc..0b2d5fdb70f0c0b8c9c1dfafac645ddbf6d37455 100644 --- a/modules/openapi-generator/src/main/resources/aspnetcore/2.1/validateModel.mustache +++ b/modules/openapi-generator/src/main/resources/aspnetcore/2.1/validateModel.mustache @@ -26,7 +26,7 @@ namespace {{packageName}}.Attributes { object args = null; if (context.ActionArguments.ContainsKey(parameter.Name)) - { + { args = context.ActionArguments[parameter.Name]; } diff --git a/modules/openapi-generator/src/main/resources/aspnetcore/3.0/Authentication/ApiAuthentication.mustache b/modules/openapi-generator/src/main/resources/aspnetcore/3.0/Authentication/ApiAuthentication.mustache index a9de368316d413036dd7dbc47122d42eb476e19b..125b1e8ef2afee4746f1c3011434d7f565bc4513 100644 --- a/modules/openapi-generator/src/main/resources/aspnetcore/3.0/Authentication/ApiAuthentication.mustache +++ b/modules/openapi-generator/src/main/resources/aspnetcore/3.0/Authentication/ApiAuthentication.mustache @@ -68,4 +68,3 @@ namespace {{packageName}}.Authentication } } } - diff --git a/modules/openapi-generator/src/main/resources/aspnetcore/3.0/Filters/GeneratePathParamsValidationFilter.mustache b/modules/openapi-generator/src/main/resources/aspnetcore/3.0/Filters/GeneratePathParamsValidationFilter.mustache index f86af9fdd42408fd97a7281599057a8ba6733ccd..f62a1df4944423d927aa23497fd79fbc8686e70b 100644 --- a/modules/openapi-generator/src/main/resources/aspnetcore/3.0/Filters/GeneratePathParamsValidationFilter.mustache +++ b/modules/openapi-generator/src/main/resources/aspnetcore/3.0/Filters/GeneratePathParamsValidationFilter.mustache @@ -95,4 +95,3 @@ namespace {{packageName}}.Filters } } } - diff --git a/modules/openapi-generator/src/main/resources/aspnetcore/3.0/Formatters/InputFormatterStream.mustache b/modules/openapi-generator/src/main/resources/aspnetcore/3.0/Formatters/InputFormatterStream.mustache index f1a002ded67c39c075a431b250b70d97699f2e86..e24d0a237a118e1f1f626f23ad4deb1a967fee53 100644 --- a/modules/openapi-generator/src/main/resources/aspnetcore/3.0/Formatters/InputFormatterStream.mustache +++ b/modules/openapi-generator/src/main/resources/aspnetcore/3.0/Formatters/InputFormatterStream.mustache @@ -13,7 +13,7 @@ namespace {{packageName}}.Formatters SupportedMediaTypes.Add("application/octet-stream"); SupportedMediaTypes.Add("image/jpeg"); } - + protected override bool CanReadType(Type type) { if (type == typeof(Stream)) diff --git a/modules/openapi-generator/src/main/resources/aspnetcore/3.0/Program.mustache b/modules/openapi-generator/src/main/resources/aspnetcore/3.0/Program.mustache index 38cd18fc61f2e8bcfcd307f6e8bf3669a81145dc..f575d1f5b63f6f036bc6d09f0af3160fdbf77e65 100644 --- a/modules/openapi-generator/src/main/resources/aspnetcore/3.0/Program.mustache +++ b/modules/openapi-generator/src/main/resources/aspnetcore/3.0/Program.mustache @@ -27,7 +27,7 @@ namespace {{packageName}} .ConfigureWebHostDefaults(webBuilder => { webBuilder.UseStartup<Startup>() - .UseUrls("http://0.0.0.0:{{#serverPort}}{{serverPort}}{{/serverPort}}{{^serverPort}}8080{{/serverPort}}/"); + .UseUrls("http://0.0.0.0:{{serverPort}}{{^serverPort}}8080{{/serverPort}}/"); }); } } diff --git a/modules/openapi-generator/src/main/resources/aspnetcore/3.0/Project.csproj.mustache b/modules/openapi-generator/src/main/resources/aspnetcore/3.0/Project.csproj.mustache index ee3ced7ba192addf14bc382b7058a65e33ac03a1..889efc0161d2b60cf8014a9e163bd132b4096179 100644 --- a/modules/openapi-generator/src/main/resources/aspnetcore/3.0/Project.csproj.mustache +++ b/modules/openapi-generator/src/main/resources/aspnetcore/3.0/Project.csproj.mustache @@ -1,6 +1,6 @@ <Project Sdk="{{projectSdk}}"> <PropertyGroup> - <Description>{{^packageDescription}}{{packageName}}{{/packageDescription}}{{packageDescription}}</Description> + <Description>{{packageDescription}}{{^packageDescription}}{{packageName}}{{/packageDescription}}</Description> <Copyright>{{packageCopyright}}</Copyright> <Authors>{{packageAuthors}}</Authors> <TargetFramework>{{targetFramework}}</TargetFramework> diff --git a/modules/openapi-generator/src/main/resources/aspnetcore/3.0/Project.nuspec.mustache b/modules/openapi-generator/src/main/resources/aspnetcore/3.0/Project.nuspec.mustache index b97c14d13d3584713b0307f928fe27ad20a2bb49..1d24d3316421e2e408128119988df1b6f33f1b30 100644 --- a/modules/openapi-generator/src/main/resources/aspnetcore/3.0/Project.nuspec.mustache +++ b/modules/openapi-generator/src/main/resources/aspnetcore/3.0/Project.nuspec.mustache @@ -12,7 +12,7 @@ <iconUrl>http://ICON_URL_HERE_OR_DELETE_THIS_LINE</iconUrl> --> <requireLicenseAcceptance>false</requireLicenseAcceptance> - <description>{{^packageDescription}}{{packageName}}{{/packageDescription}}{{packageDescription}}</description> + <description>{{packageDescription}}{{^packageDescription}}{{packageName}}{{/packageDescription}}</description> <releaseNotes>Summary of changes made in this release of the package.</releaseNotes> <copyright>{{packageCopyright}}</copyright> <tags>{{packageName}}</tags> diff --git a/modules/openapi-generator/src/main/resources/aspnetcore/3.0/README.mustache b/modules/openapi-generator/src/main/resources/aspnetcore/3.0/README.mustache index c5673ac9d1db0d2602296435471ad0ba843b06e5..3602e5d507da26eea2aa2d1760b55a9255ced9f2 100644 --- a/modules/openapi-generator/src/main/resources/aspnetcore/3.0/README.mustache +++ b/modules/openapi-generator/src/main/resources/aspnetcore/3.0/README.mustache @@ -1,7 +1,7 @@ # {{packageName}} - ASP.NET Core {{aspnetCoreVersion}} Server {{#appDescriptionWithNewLines}} -{{{appDescriptionWithNewLines}}} +{{{.}}} {{/appDescriptionWithNewLines}} ## Run diff --git a/modules/openapi-generator/src/main/resources/aspnetcore/3.0/Startup.mustache b/modules/openapi-generator/src/main/resources/aspnetcore/3.0/Startup.mustache index 250dcf6658481553c5661f002f01dd418757ad77..d94e1e6bb193075ae69bd489da39b27f01031803 100644 --- a/modules/openapi-generator/src/main/resources/aspnetcore/3.0/Startup.mustache +++ b/modules/openapi-generator/src/main/resources/aspnetcore/3.0/Startup.mustache @@ -71,7 +71,7 @@ namespace {{packageName}} }) {{#compatibilityVersion}} // Don't need this for 3.x - see https://docs.microsoft.com/en-us/aspnet/core/mvc/compatibility-version?view=aspnetcore-3.1 - //.SetCompatibilityVersion(CompatibilityVersion.{{compatibilityVersion}}) + //.SetCompatibilityVersion(CompatibilityVersion.{{.}}) {{/compatibilityVersion}} .{{#useNewtonsoft}}AddNewtonsoftJson{{/useNewtonsoft}}{{^useNewtonsoft}}AddJsonOptions{{/useNewtonsoft}}(opts => { @@ -86,29 +86,29 @@ namespace {{packageName}} services .AddSwaggerGen(c => { - c.SwaggerDoc("{{#version}}{{{version}}}{{/version}}{{^version}}v1{{/version}}", new OpenApiInfo + c.SwaggerDoc("{{{version}}}{{^version}}v1{{/version}}", new OpenApiInfo { - Title = "{{#appName}}{{{appName}}}{{/appName}}{{^appName}}{{packageName}}{{/appName}}", - Description = "{{#appName}}{{{appName}}}{{/appName}}{{^appName}}{{packageName}}{{/appName}} (ASP.NET Core {{aspnetCoreVersion}})", - TermsOfService = new Uri("{{#termsOfService}}{{{termsOfService}}}{{/termsOfService}}{{^termsOfService}}https://github.com/openapitools/openapi-generator{{/termsOfService}}"), + Title = "{{{appName}}}{{^appName}}{{packageName}}{{/appName}}", + Description = "{{{appName}}}{{^appName}}{{packageName}}{{/appName}} (ASP.NET Core {{aspnetCoreVersion}})", + TermsOfService = new Uri("{{{termsOfService}}}{{^termsOfService}}https://github.com/openapitools/openapi-generator{{/termsOfService}}"), Contact = new OpenApiContact { - Name = "{{#infoName}}{{{infoName}}}{{/infoName}}{{^infoName}}OpenAPI-Generator Contributors{{/infoName}}", - Url = new Uri("{{#infoUrl}}{{{infoUrl}}}{{/infoUrl}}{{^infoUrl}}https://github.com/openapitools/openapi-generator{{/infoUrl}}"), - Email = "{{#infoEmail}}{{{infoEmail}}}{{/infoEmail}}" + Name = "{{{infoName}}}{{^infoName}}OpenAPI-Generator Contributors{{/infoName}}", + Url = new Uri("{{{infoUrl}}}{{^infoUrl}}https://github.com/openapitools/openapi-generator{{/infoUrl}}"), + Email = "{{{infoEmail}}}" }, License = new OpenApiLicense { Name = "{{licenseName}}", Url = new Uri("{{licenseUrl}}") }, - Version = "{{#version}}{{{version}}}{{/version}}{{^version}}v1{{/version}}", + Version = "{{{version}}}{{^version}}v1{{/version}}", }); c.CustomSchemaIds(type => type.FriendlyId(true)); c.IncludeXmlComments($"{AppContext.BaseDirectory}{Path.DirectorySeparatorChar}{Assembly.GetEntryAssembly().GetName().Name}.xml"); {{#basePathWithoutHost}} // Sets the basePath property in the OpenAPI document generated - c.DocumentFilter<BasePathFilter>("{{{basePathWithoutHost}}}"); + c.DocumentFilter<BasePathFilter>("{{{.}}}"); {{/basePathWithoutHost}} // Include DataAnnotation attributes on Controller Action parameters as OpenAPI validation rules (e.g required, pattern, ..) @@ -151,10 +151,10 @@ namespace {{packageName}} // set route prefix to openapi, e.g. http://localhost:8080/openapi/index.html c.RoutePrefix = "openapi"; //TODO: Either use the SwaggerGen generated OpenAPI contract (generated from C# classes) - c.SwaggerEndpoint("/openapi/{{#version}}{{{version}}}{{/version}}{{^version}}v1{{/version}}/openapi.json", "{{#appName}}{{{appName}}}{{/appName}}{{^appName}}{{packageName}}{{/appName}}"); + c.SwaggerEndpoint("/openapi/{{{version}}}{{^version}}v1{{/version}}/openapi.json", "{{{appName}}}{{^appName}}{{packageName}}{{/appName}}"); //TODO: Or alternatively use the original OpenAPI contract that's included in the static files - // c.SwaggerEndpoint("/openapi-original.json", "{{#appName}}{{{appName}}}{{/appName}}{{^appName}}{{packageName}}{{/appName}} Original"); + // c.SwaggerEndpoint("/openapi-original.json", "{{{appName}}}{{^appName}}{{packageName}}{{/appName}} Original"); }){{/useSwashbuckle}}; app.UseRouting(); app.UseEndpoints(endpoints => diff --git a/modules/openapi-generator/src/main/resources/aspnetcore/3.0/controller.mustache b/modules/openapi-generator/src/main/resources/aspnetcore/3.0/controller.mustache index 9f6fcc803df6ffa09ce261db518d346f8aeab634..ba1d43982a7db7ac03d151d4d0927130ee583153 100644 --- a/modules/openapi-generator/src/main/resources/aspnetcore/3.0/controller.mustache +++ b/modules/openapi-generator/src/main/resources/aspnetcore/3.0/controller.mustache @@ -23,14 +23,14 @@ namespace {{apiPackage}} /// <summary> /// {{description}} /// </summary>{{#description}} - [Description("{{description}}")]{{/description}} + [Description("{{.}}")]{{/description}} [ApiController] - public {{#classModifier}}{{classModifier}} {{/classModifier}}class {{classname}}Controller : ControllerBase + public {{#classModifier}}{{.}} {{/classModifier}}class {{classname}}Controller : ControllerBase { {{#operation}} /// <summary> - /// {{#summary}}{{summary}}{{/summary}} + /// {{summary}} /// </summary>{{#notes}} - /// <remarks>{{notes}}</remarks>{{/notes}}{{#allParams}} + /// <remarks>{{.}}</remarks>{{/notes}}{{#allParams}} /// <param name="{{paramName}}">{{description}}{{#isDeprecated}} (deprecated){{/isDeprecated}}</param>{{/allParams}}{{#responses}} /// <response code="{{code}}">{{message}}</response>{{/responses}} [{{httpMethod}}] @@ -48,14 +48,14 @@ namespace {{apiPackage}} {{/vendorExtensions.x-aspnetcore-consumes}} [ValidateModelState]{{#useSwashbuckle}} [SwaggerOperation("{{operationId}}")]{{#responses}}{{#dataType}} - [SwaggerResponse(statusCode: {{code}}, type: typeof({{&dataType}}), description: "{{message}}")]{{/dataType}}{{^dataType}}{{/dataType}}{{/responses}}{{/useSwashbuckle}}{{^useSwashbuckle}}{{#responses}}{{#dataType}} - [ProducesResponseType(statusCode: {{code}}, type: typeof({{&dataType}}))]{{/dataType}}{{^dataType}}{{/dataType}}{{/responses}}{{/useSwashbuckle}} + [SwaggerResponse(statusCode: {{code}}, type: typeof({{&dataType}}), description: "{{message}}")]{{/dataType}}{{/responses}}{{/useSwashbuckle}}{{^useSwashbuckle}}{{#responses}}{{#dataType}} + [ProducesResponseType(statusCode: {{code}}, type: typeof({{&dataType}}))]{{/dataType}}{{/responses}}{{/useSwashbuckle}} {{#isDeprecated}} [Obsolete] {{/isDeprecated}} public {{operationModifier}} {{#operationResultTask}}{{#operationIsAsync}}async {{/operationIsAsync}}Task<{{/operationResultTask}}IActionResult{{#operationResultTask}}>{{/operationResultTask}} {{operationId}}({{#allParams}}{{>pathParam}}{{>queryParam}}{{>bodyParam}}{{>formParam}}{{>headerParam}}{{^-last}}{{^isCookieParam}}, {{/isCookieParam}}{{/-last}}{{/allParams}}){{^generateBody}};{{/generateBody}} {{#generateBody}} - { + { {{#cookieParams}} var {{paramName}} = Request.Cookies["{{paramName}}"]; {{/cookieParams}} diff --git a/modules/openapi-generator/src/main/resources/aspnetcore/3.0/enumClass.mustache b/modules/openapi-generator/src/main/resources/aspnetcore/3.0/enumClass.mustache index 8a932b5ade61148c2e1f006cf6d87619429e0819..cd6595452ae48b5b2ebf6259b23ca46a809d9e92 100644 --- a/modules/openapi-generator/src/main/resources/aspnetcore/3.0/enumClass.mustache +++ b/modules/openapi-generator/src/main/resources/aspnetcore/3.0/enumClass.mustache @@ -1,13 +1,13 @@ /// <summary> - /// {{^description}}Gets or Sets {{{name}}}{{/description}}{{#description}}{{{description}}}{{/description}} + /// {{^description}}Gets or Sets {{{name}}}{{/description}}{{{description}}} /// </summary> {{#description}} - /// <value>{{{description}}}</value> + /// <value>{{{.}}}</value> {{/description}} - {{#allowableValues}}{{#enumVars}}{{#-first}}{{#isString}}[TypeConverter(typeof(CustomEnumConverter<{{#datatypeWithEnum}}{{.}}{{/datatypeWithEnum}}{{^datatypeWithEnum}}{{classname}}{{/datatypeWithEnum}}>))] + {{#allowableValues}}{{#enumVars}}{{#-first}}{{#isString}}[TypeConverter(typeof(CustomEnumConverter<{{datatypeWithEnum}}{{^datatypeWithEnum}}{{classname}}{{/datatypeWithEnum}}>))] [JsonConverter(typeof(Newtonsoft.Json.Converters.StringEnumConverter))]{{/isString}}{{/-first}}{{/enumVars}}{{/allowableValues}} - public enum {{#datatypeWithEnum}}{{.}}{{/datatypeWithEnum}}{{^datatypeWithEnum}}{{classname}}{{/datatypeWithEnum}} + public enum {{datatypeWithEnum}}{{^datatypeWithEnum}}{{classname}}{{/datatypeWithEnum}} { {{#allowableValues}}{{#enumVars}} /// <summary> diff --git a/modules/openapi-generator/src/main/resources/aspnetcore/3.0/formParam.mustache b/modules/openapi-generator/src/main/resources/aspnetcore/3.0/formParam.mustache index f0b9d704280e946d8211f66f7f9595862853115d..d22f70b0e2606a8bd7ba7c0c90689416e1e5230f 100644 --- a/modules/openapi-generator/src/main/resources/aspnetcore/3.0/formParam.mustache +++ b/modules/openapi-generator/src/main/resources/aspnetcore/3.0/formParam.mustache @@ -1 +1 @@ -{{#isFormParam}}{{^isBinary}}[FromForm{{^isModel}} (Name = "{{baseName}}"){{/isModel}}]{{/isBinary}}{{#required}}[Required()]{{/required}}{{#pattern}}[RegularExpression("{{{pattern}}}")]{{/pattern}}{{#minLength}}{{#maxLength}}[StringLength({{maxLength}}, MinimumLength={{minLength}})]{{/maxLength}}{{/minLength}}{{#minLength}}{{^maxLength}} [MinLength({{minLength}})]{{/maxLength}}{{/minLength}}{{^minLength}}{{#maxLength}} [MaxLength({{maxLength}})]{{/maxLength}}{{/minLength}}{{#minimum}}{{#maximum}}[Range({{minimum}}, {{maximum}})]{{/maximum}}{{/minimum}}{{&dataType}} {{paramName}}{{/isFormParam}} \ No newline at end of file +{{#isFormParam}}{{^isBinary}}[FromForm{{^isModel}} (Name = "{{baseName}}"){{/isModel}}]{{/isBinary}}{{#required}}[Required()]{{/required}}{{#pattern}}[RegularExpression("{{{.}}}")]{{/pattern}}{{#minLength}}{{#maxLength}}[StringLength({{maxLength}}, MinimumLength={{minLength}})]{{/maxLength}}{{/minLength}}{{#minLength}}{{^maxLength}} [MinLength({{minLength}})]{{/maxLength}}{{/minLength}}{{^minLength}}{{#maxLength}} [MaxLength({{.}})]{{/maxLength}}{{/minLength}}{{#minimum}}{{#maximum}}[Range({{minimum}}, {{maximum}})]{{/maximum}}{{/minimum}}{{&dataType}} {{paramName}}{{/isFormParam}} \ No newline at end of file diff --git a/modules/openapi-generator/src/main/resources/aspnetcore/3.0/headerParam.mustache b/modules/openapi-generator/src/main/resources/aspnetcore/3.0/headerParam.mustache index a3a929904c625a7fbee66d6af0dc64880feee5ac..a742a222236d64d1a5035469dd75ed82d5082fe5 100644 --- a/modules/openapi-generator/src/main/resources/aspnetcore/3.0/headerParam.mustache +++ b/modules/openapi-generator/src/main/resources/aspnetcore/3.0/headerParam.mustache @@ -1 +1 @@ -{{#isHeaderParam}}[FromHeader]{{#required}}[Required()]{{/required}}{{#pattern}}[RegularExpression("{{{pattern}}}")]{{/pattern}}{{#minLength}}{{#maxLength}}[StringLength({{maxLength}}, MinimumLength={{minLength}})]{{/maxLength}}{{/minLength}}{{#minLength}}{{^maxLength}} [MinLength({{minLength}})]{{/maxLength}}{{/minLength}}{{^minLength}}{{#maxLength}} [MaxLength({{maxLength}})]{{/maxLength}}{{/minLength}}{{#minimum}}{{#maximum}}[Range({{minimum}}, {{maximum}})]{{/maximum}}{{/minimum}}{{&dataType}} {{paramName}}{{/isHeaderParam}} \ No newline at end of file +{{#isHeaderParam}}[FromHeader]{{#required}}[Required()]{{/required}}{{#pattern}}[RegularExpression("{{{.}}}")]{{/pattern}}{{#minLength}}{{#maxLength}}[StringLength({{maxLength}}, MinimumLength={{minLength}})]{{/maxLength}}{{/minLength}}{{#minLength}}{{^maxLength}} [MinLength({{minLength}})]{{/maxLength}}{{/minLength}}{{^minLength}}{{#maxLength}} [MaxLength({{.}})]{{/maxLength}}{{/minLength}}{{#minimum}}{{#maximum}}[Range({{minimum}}, {{maximum}})]{{/maximum}}{{/minimum}}{{&dataType}} {{paramName}}{{/isHeaderParam}} \ No newline at end of file diff --git a/modules/openapi-generator/src/main/resources/aspnetcore/3.0/listReturn.mustache b/modules/openapi-generator/src/main/resources/aspnetcore/3.0/listReturn.mustache index d609e67148c260e253e93ef98dfba4db7d427d57..9f18d71d04c1336c3ca855cf701be6199bf1fb2b 100644 --- a/modules/openapi-generator/src/main/resources/aspnetcore/3.0/listReturn.mustache +++ b/modules/openapi-generator/src/main/resources/aspnetcore/3.0/listReturn.mustache @@ -1,4 +1,4 @@ var example = exampleJson != null - ? JsonConvert.DeserializeObject<{{returnContainer}}<{{#returnType}}{{{returnType}}}{{/returnType}}>>(exampleJson) - : Enumerable.Empty<{{#returnType}}{{{returnType}}}{{/returnType}}>(); \ No newline at end of file + ? JsonConvert.DeserializeObject<{{returnContainer}}<{{{returnType}}}>>(exampleJson) + : Enumerable.Empty<{{{returnType}}}>(); \ No newline at end of file diff --git a/modules/openapi-generator/src/main/resources/aspnetcore/3.0/mapReturn.mustache b/modules/openapi-generator/src/main/resources/aspnetcore/3.0/mapReturn.mustache index 856fb1b3507c413e240d3bf3eee5a60bfe6ec9a3..94f16e11fdc5e7a5acb882e0083a4799a043b46f 100644 --- a/modules/openapi-generator/src/main/resources/aspnetcore/3.0/mapReturn.mustache +++ b/modules/openapi-generator/src/main/resources/aspnetcore/3.0/mapReturn.mustache @@ -1,4 +1,4 @@ var example = exampleJson != null - ? JsonConvert.DeserializeObject<Dictionary<{{#returnType}}{{{returnType}}}{{/returnType}}>>(exampleJson) - : new Dictionary<{{#returnType}}{{{returnType}}}{{/returnType}}>(); \ No newline at end of file + ? JsonConvert.DeserializeObject<Dictionary<{{{returnType}}}>>(exampleJson) + : new Dictionary<{{{returnType}}}>(); \ No newline at end of file diff --git a/modules/openapi-generator/src/main/resources/aspnetcore/3.0/model.mustache b/modules/openapi-generator/src/main/resources/aspnetcore/3.0/model.mustache index 5bd13ab9058a10277b10c9981e51268847e6ffed..917e36804923f366c1a291d3d23c7b5055d48be2 100644 --- a/modules/openapi-generator/src/main/resources/aspnetcore/3.0/model.mustache +++ b/modules/openapi-generator/src/main/resources/aspnetcore/3.0/model.mustache @@ -30,7 +30,7 @@ namespace {{modelPackage}} [JsonSubtypes.KnownSubType(typeof({{{modelName}}}), "{{^vendorExtensions.x-discriminator-value}}{{{mappingName}}}{{/vendorExtensions.x-discriminator-value}}{{#vendorExtensions.x-discriminator-value}}{{{.}}}{{/vendorExtensions.x-discriminator-value}}")] {{/mappedModels}} {{/discriminator}} - public {{#modelClassModifier}}{{modelClassModifier}} {{/modelClassModifier}}class {{classname}} : {{#parent}}{{{parent}}}, {{/parent}}IEquatable<{{classname}}> + public {{#modelClassModifier}}{{.}} {{/modelClassModifier}}class {{classname}} : {{#parent}}{{{.}}}, {{/parent}}IEquatable<{{classname}}> { {{#vars}} {{#items.isEnum}} @@ -46,21 +46,21 @@ namespace {{modelPackage}} {{/complexType}} {{/isEnum}} /// <summary> - /// {{^description}}Gets or Sets {{{name}}}{{/description}}{{#description}}{{description}}{{/description}} + /// {{description}}{{^description}}Gets or Sets {{{name}}}{{/description}} /// </summary>{{#description}} - /// <value>{{description}}</value>{{/description}}{{#required}} + /// <value>{{.}}</value>{{/description}}{{#required}} [Required]{{/required}}{{#pattern}} - [RegularExpression("{{{pattern}}}")]{{/pattern}}{{#minLength}}{{#maxLength}} + [RegularExpression("{{{.}}}")]{{/pattern}}{{#minLength}}{{#maxLength}} [StringLength({{maxLength}}, MinimumLength={{minLength}})]{{/maxLength}}{{/minLength}}{{#minLength}}{{^maxLength}} [MinLength({{minLength}})]{{/maxLength}}{{/minLength}}{{^minLength}}{{#maxLength}} - [MaxLength({{maxLength}})]{{/maxLength}}{{/minLength}}{{#minimum}}{{#maximum}} + [MaxLength({{.}})]{{/maxLength}}{{/minLength}}{{#minimum}}{{#maximum}} [Range({{minimum}}, {{maximum}})]{{/maximum}}{{/minimum}} [DataMember(Name="{{baseName}}", EmitDefaultValue={{#isNullable}}true{{/isNullable}}{{^isNullable}}false{{/isNullable}})] {{#isEnum}} - public {{{datatypeWithEnum}}}{{#isNullable}}?{{/isNullable}} {{name}} { get; set; }{{#defaultValue}} = {{{defaultValue}}};{{/defaultValue}} + public {{{datatypeWithEnum}}}{{#isNullable}}?{{/isNullable}} {{name}} { get; set; }{{#defaultValue}} = {{{.}}};{{/defaultValue}} {{/isEnum}} {{^isEnum}} - public {{{dataType}}} {{name}} { get; {{#isReadOnly}}private {{/isReadOnly}}set; }{{#defaultValue}} = {{{defaultValue}}};{{/defaultValue}} + public {{{dataType}}} {{name}} { get; {{#isReadOnly}}private {{/isReadOnly}}set; }{{#defaultValue}} = {{{.}}};{{/defaultValue}} {{/isEnum}} {{^-last}} diff --git a/modules/openapi-generator/src/main/resources/aspnetcore/3.0/objectReturn.mustache b/modules/openapi-generator/src/main/resources/aspnetcore/3.0/objectReturn.mustache index 4059a61ac0b814719f81e883dec39a78d9a1f253..b037a14ceba6a9e2dbcffd77270f878feb396962 100644 --- a/modules/openapi-generator/src/main/resources/aspnetcore/3.0/objectReturn.mustache +++ b/modules/openapi-generator/src/main/resources/aspnetcore/3.0/objectReturn.mustache @@ -1,4 +1,4 @@ var example = exampleJson != null - ? JsonConvert.DeserializeObject<{{#returnType}}{{{returnType}}}{{/returnType}}>(exampleJson) - : default({{#returnType}}{{{returnType}}}{{/returnType}}); \ No newline at end of file + ? JsonConvert.DeserializeObject<{{{returnType}}}>(exampleJson) + : default({{{returnType}}}); \ No newline at end of file diff --git a/modules/openapi-generator/src/main/resources/aspnetcore/3.0/partial_header.mustache b/modules/openapi-generator/src/main/resources/aspnetcore/3.0/partial_header.mustache index 9eb233d1197c657adddffb63eab190532c1c4e53..408d841df26d1f9e71d44a023a8711444d5fe9aa 100644 --- a/modules/openapi-generator/src/main/resources/aspnetcore/3.0/partial_header.mustache +++ b/modules/openapi-generator/src/main/resources/aspnetcore/3.0/partial_header.mustache @@ -1,13 +1,13 @@ /* {{#appName}} - * {{{appName}}} + * {{{.}}} * {{/appName}} {{#appDescription}} - * {{{appDescription}}} + * {{{.}}} * {{/appDescription}} - * {{#version}}The version of the OpenAPI document: {{{version}}}{{/version}} - * {{#infoEmail}}Contact: {{{infoEmail}}}{{/infoEmail}} + * {{#version}}The version of the OpenAPI document: {{{.}}}{{/version}} + * {{#infoEmail}}Contact: {{{.}}}{{/infoEmail}} * Generated by: https://openapi-generator.tech */ diff --git a/modules/openapi-generator/src/main/resources/aspnetcore/3.0/pathParam.mustache b/modules/openapi-generator/src/main/resources/aspnetcore/3.0/pathParam.mustache index 3447b8005d1316335f7527c568ce14850a3ca36e..83de202f6558280ef48e5c5cfdf53272e8480704 100644 --- a/modules/openapi-generator/src/main/resources/aspnetcore/3.0/pathParam.mustache +++ b/modules/openapi-generator/src/main/resources/aspnetcore/3.0/pathParam.mustache @@ -1 +1 @@ -{{#isPathParam}}[FromRoute (Name = "{{baseName}}")]{{#required}}[Required]{{/required}}{{#pattern}}[RegularExpression("{{{pattern}}}")]{{/pattern}}{{#minLength}}{{#maxLength}}[StringLength({{maxLength}}, MinimumLength={{minLength}})]{{/maxLength}}{{/minLength}}{{#minLength}}{{^maxLength}} [MinLength({{minLength}})]{{/maxLength}}{{/minLength}}{{^minLength}}{{#maxLength}} [MaxLength({{maxLength}})]{{/maxLength}}{{/minLength}}{{#minimum}}{{#maximum}}[Range({{minimum}}, {{maximum}})]{{/maximum}}{{/minimum}}{{&dataType}} {{paramName}}{{/isPathParam}} \ No newline at end of file +{{#isPathParam}}[FromRoute (Name = "{{baseName}}")]{{#required}}[Required]{{/required}}{{#pattern}}[RegularExpression("{{{.}}}")]{{/pattern}}{{#minLength}}{{#maxLength}}[StringLength({{maxLength}}, MinimumLength={{minLength}})]{{/maxLength}}{{/minLength}}{{#minLength}}{{^maxLength}} [MinLength({{minLength}})]{{/maxLength}}{{/minLength}}{{^minLength}}{{#maxLength}} [MaxLength({{.}})]{{/maxLength}}{{/minLength}}{{#minimum}}{{#maximum}}[Range({{minimum}}, {{maximum}})]{{/maximum}}{{/minimum}}{{&dataType}} {{paramName}}{{/isPathParam}} \ No newline at end of file diff --git a/modules/openapi-generator/src/main/resources/aspnetcore/3.0/queryParam.mustache b/modules/openapi-generator/src/main/resources/aspnetcore/3.0/queryParam.mustache index 3a052802fcd72653a023a7d6a1558b86b7e8eda0..a0eedc432ff4c51be45fd05040347e03e98d8a28 100644 --- a/modules/openapi-generator/src/main/resources/aspnetcore/3.0/queryParam.mustache +++ b/modules/openapi-generator/src/main/resources/aspnetcore/3.0/queryParam.mustache @@ -1 +1 @@ -{{#isQueryParam}}[FromQuery (Name = "{{baseName}}")]{{#required}}[Required()]{{/required}}{{#pattern}}[RegularExpression("{{{pattern}}}")]{{/pattern}}{{#minLength}}{{#maxLength}}[StringLength({{maxLength}}, MinimumLength={{minLength}})]{{/maxLength}}{{/minLength}}{{#minLength}}{{^maxLength}} [MinLength({{minLength}})]{{/maxLength}}{{/minLength}}{{^minLength}}{{#maxLength}} [MaxLength({{maxLength}})]{{/maxLength}}{{/minLength}}{{#minimum}}{{#maximum}}[Range({{minimum}}, {{maximum}})]{{/maximum}}{{/minimum}}{{&dataType}} {{paramName}}{{/isQueryParam}} \ No newline at end of file +{{#isQueryParam}}[FromQuery (Name = "{{baseName}}")]{{#required}}[Required()]{{/required}}{{#pattern}}[RegularExpression("{{{.}}}")]{{/pattern}}{{#minLength}}{{#maxLength}}[StringLength({{maxLength}}, MinimumLength={{minLength}})]{{/maxLength}}{{/minLength}}{{#minLength}}{{^maxLength}} [MinLength({{minLength}})]{{/maxLength}}{{/minLength}}{{^minLength}}{{#maxLength}} [MaxLength({{.}})]{{/maxLength}}{{/minLength}}{{#minimum}}{{#maximum}}[Range({{minimum}}, {{maximum}})]{{/maximum}}{{/minimum}}{{&dataType}} {{paramName}}{{/isQueryParam}} \ No newline at end of file diff --git a/modules/openapi-generator/src/main/resources/aspnetcore/3.0/validateModel.mustache b/modules/openapi-generator/src/main/resources/aspnetcore/3.0/validateModel.mustache index e11aaa5d2708d1736441dc6c1058dc9099ba10dc..0b2d5fdb70f0c0b8c9c1dfafac645ddbf6d37455 100644 --- a/modules/openapi-generator/src/main/resources/aspnetcore/3.0/validateModel.mustache +++ b/modules/openapi-generator/src/main/resources/aspnetcore/3.0/validateModel.mustache @@ -26,7 +26,7 @@ namespace {{packageName}}.Attributes { object args = null; if (context.ActionArguments.ContainsKey(parameter.Name)) - { + { args = context.ActionArguments[parameter.Name]; } diff --git a/modules/openapi-generator/src/main/resources/bash/README.mustache b/modules/openapi-generator/src/main/resources/bash/README.mustache index 74f700ceb9e80f3fe4b953c1bd7b77d64bd9743c..e320d2f999270ca3bb7b59494c1afb10f84dc35d 100644 --- a/modules/openapi-generator/src/main/resources/bash/README.mustache +++ b/modules/openapi-generator/src/main/resources/bash/README.mustache @@ -100,7 +100,7 @@ All URIs are relative to *{{basePathWithoutHost}}* Class | Method | HTTP request | Description ------------ | ------------- | ------------- | ------------- -{{#apiInfo}}{{#apis}}{{#operations}}{{#operation}}*{{classname}}* | [**{{operationId}}**]({{apiDocPath}}{{classname}}.md#{{operationIdLowerCase}}) | **{{httpMethod}}** {{path}} | {{#summary}}{{summary}}{{/summary}} +{{#apiInfo}}{{#apis}}{{#operations}}{{#operation}}*{{classname}}* | [**{{operationId}}**]({{apiDocPath}}{{classname}}.md#{{operationIdLowerCase}}) | **{{httpMethod}}** {{path}} | {{summary}} {{/operation}}{{/operations}}{{/apis}}{{/apiInfo}} ## Documentation For Models @@ -126,8 +126,8 @@ Class | Method | HTTP request | Description - **Type**: OAuth - **Flow**: {{{flow}}}{{#authorizationUrl}} -- **Authorization URL**: {{{authorizationUrl}}}{{/authorizationUrl}}{{#tokenUrl}} -- **Token URL**: {{{tokenUrl}}}{{/tokenUrl}} +- **Authorization URL**: {{{.}}}{{/authorizationUrl}}{{#tokenUrl}} +- **Token URL**: {{{.}}}{{/tokenUrl}} - **Scopes**:{{^scopes}} N/A{{/scopes}} {{#scopes}} - **{{{scope}}}**: {{{description}}} {{/scopes}} diff --git a/modules/openapi-generator/src/main/resources/bash/api_doc.mustache b/modules/openapi-generator/src/main/resources/bash/api_doc.mustache index 0d7dbab61a7b97495fdd24c126a8e99fc6eaa9f0..00bfe70e186d6126ac747aab7ec4cc117ea9c10d 100644 --- a/modules/openapi-generator/src/main/resources/bash/api_doc.mustache +++ b/modules/openapi-generator/src/main/resources/bash/api_doc.mustache @@ -1,12 +1,12 @@ # {{classname}}{{#description}} -{{description}}{{/description}} +{{.}}{{/description}} All URIs are relative to *{{basePathWithoutHost}}* Method | HTTP request | Description ------------- | ------------- | ------------- -{{#operations}}{{#operation}}[**{{operationId}}**]({{classname}}.md#{{operationId}}) | **{{httpMethod}}** {{path}} | {{#summary}}{{summary}}{{/summary}} +{{#operations}}{{#operation}}[**{{operationId}}**]({{classname}}.md#{{operationId}}) | **{{httpMethod}}** {{path}} | {{summary}} {{/operation}}{{/operations}} {{#operations}} @@ -16,7 +16,7 @@ Method | HTTP request | Description {{{summary}}}{{#notes}} -{{{notes}}}{{/notes}} +{{{.}}}{{/notes}} ### Example @@ -29,7 +29,7 @@ Method | HTTP request | Description {{^allParams}}This endpoint does not need any parameter.{{/allParams}}{{#allParams}}{{#-last}} Name | Type | Description | Notes ------------- | ------------- | ------------- | -------------{{/-last}}{{/allParams}} -{{#allParams}} **{{paramName}}** | {{#isFile}}**{{dataType}}**{{/isFile}}{{^isFile}}{{#isPrimitiveType}}**{{dataType}}**{{/isPrimitiveType}}{{^isPrimitiveType}}[**{{dataType}}**]({{baseType}}.md){{/isPrimitiveType}}{{/isFile}} | {{{description}}} |{{^required}} [optional]{{/required}}{{#defaultValue}} [default to {{defaultValue}}]{{/defaultValue}} +{{#allParams}} **{{paramName}}** | {{#isFile}}**{{dataType}}**{{/isFile}}{{^isFile}}{{#isPrimitiveType}}**{{dataType}}**{{/isPrimitiveType}}{{^isPrimitiveType}}[**{{dataType}}**]({{baseType}}.md){{/isPrimitiveType}}{{/isFile}} | {{{description}}} |{{^required}} [optional]{{/required}}{{#defaultValue}} [default to {{.}}]{{/defaultValue}} {{/allParams}} ### Return type diff --git a/modules/openapi-generator/src/main/resources/bash/client.mustache b/modules/openapi-generator/src/main/resources/bash/client.mustache index 3f5dcc0e2918b623e4dff172004659df43fcdad6..634577842687c051d86937450c0eda05f986710b 100644 --- a/modules/openapi-generator/src/main/resources/bash/client.mustache +++ b/modules/openapi-generator/src/main/resources/bash/client.mustache @@ -580,9 +580,9 @@ EOF {{#isOAuth}} echo -e " - ${MAGENTA}OAuth2 (flow: {{flow}})${OFF}"{{#authorizationUrl}} echo -e " Authorization URL: " - echo -e " * {{authorizationUrl}}"{{/authorizationUrl}}{{#tokenUrl}} + echo -e " * {{.}}"{{/authorizationUrl}}{{#tokenUrl}} echo -e " Token URL: " - echo -e " * {{tokenUrl}}"{{/tokenUrl}} + echo -e " * {{.}}"{{/tokenUrl}} echo -e " Scopes:" {{#scopes}} echo -e " * {{scope}} - {{description}}" @@ -613,7 +613,7 @@ echo " $ops" | column -t -s ';' echo -e " --about\\t\\t\\t\\tPrint the information about service" echo -e " --host ${CYAN}<url>${OFF}\\t\\t\\t\\tSpecify the host URL " {{#openAPI}} -{{#host}}echo -e " \\t\\t\\t\\t(e.g. 'https://{{host}}')"{{/host}} +{{#host}}echo -e " \\t\\t\\t\\t(e.g. 'https://{{.}}')"{{/host}} {{^host}}echo -e " \\t\\t\\t\\t(e.g. 'https://127.0.0.1:8080')"{{/host}} {{/openAPI}} echo -e " --force\\t\\t\\t\\tForce command invocation in spite of missing" @@ -679,14 +679,14 @@ print_{{operationId}}_help() { {{/x-bash-codegen-description}} {{^x-bash-codegen-description}} {{#notes}} - echo -e "{{{notes}}}" | paste -sd' ' | fold -sw 80 + echo -e "{{{.}}}" | paste -sd' ' | fold -sw 80 echo -e "" {{/notes}} {{/x-bash-codegen-description}} {{/vendorExtensions}} {{^vendorExtensions}} {{#notes}} - echo -e "{{{notes}}}" | paste -sd' ' | fold -sw 80 + echo -e "{{{.}}}" | paste -sd' ' | fold -sw 80 echo -e "" {{/notes}} {{/vendorExtensions}} diff --git a/modules/openapi-generator/src/main/resources/clojure/git_push.sh.mustache b/modules/openapi-generator/src/main/resources/clojure/git_push.sh.mustache index 8b3f689c9121a65080ad038d37a2036b01e559a1..f0bed5bd84155f05bc3cdc67af008f524efb38a6 100755 --- a/modules/openapi-generator/src/main/resources/clojure/git_push.sh.mustache +++ b/modules/openapi-generator/src/main/resources/clojure/git_push.sh.mustache @@ -55,4 +55,3 @@ 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/codegen/README.mustache b/modules/openapi-generator/src/main/resources/codegen/README.mustache index c55f0b6ce132b806ed9c73100a0f41175242ba50..0ab1584ea15c2f9caee6d9bab2530870a17df336 100644 --- a/modules/openapi-generator/src/main/resources/codegen/README.mustache +++ b/modules/openapi-generator/src/main/resources/codegen/README.mustache @@ -10,7 +10,7 @@ The goal of OpenAPI is to define a standard, language-agnostic interface to REST When properly described with OpenAPI, a consumer can understand and interact with the remote service with a minimal amount of implementation logic. Similar to what interfaces have done for lower-level programming, OpenAPI removes the guesswork in calling the service. -Check out [OpenAPI-Spec](https://github.com/OAI/OpenAPI-Specification) for additional information about the OpenAPI project, including additional libraries with support for other languages and more. +Check out [OpenAPI-Spec](https://github.com/OAI/OpenAPI-Specification) for additional information about the OpenAPI project, including additional libraries with support for other languages and more. ## How do I use this? At this point, you've likely generated a client setup. It will include something along these lines: @@ -65,7 +65,7 @@ for reading the code more, though. See how the `{{generatorClass}}` implements That class has the signature of all values that can be overridden. You can also step through {{generatorClass}}.java in a debugger. Just debug the JUnit -test in DebugCodegenLauncher. That runs the command line tool and lets you inspect what the code is doing. +test in DebugCodegenLauncher. That runs the command line tool and lets you inspect what the code is doing. For the templates themselves, you have a number of values available to you for generation. You can execute the `java` command from above while passing different debug flags to show diff --git a/modules/openapi-generator/src/main/resources/codegen/generatorClass.mustache b/modules/openapi-generator/src/main/resources/codegen/generatorClass.mustache index d7b220b680f55c8825770a1fdaf9d0e451590e7f..72755d960eb86e2cd5c6cfe2470d4d59d012d61e 100644 --- a/modules/openapi-generator/src/main/resources/codegen/generatorClass.mustache +++ b/modules/openapi-generator/src/main/resources/codegen/generatorClass.mustache @@ -14,7 +14,7 @@ public class {{generatorClass}} extends DefaultCodegen implements CodegenConfig /** * Configures the type of generator. - * + * * @return the CodegenType for this generator * @see org.openapitools.codegen.CodegenType */ @@ -25,7 +25,7 @@ public class {{generatorClass}} extends DefaultCodegen implements CodegenConfig /** * Configures a friendly name for the generator. This will be used by the generator * to select the library with the -g flag. - * + * * @return the friendly name for the generator */ public String getName() { @@ -60,7 +60,7 @@ public class {{generatorClass}} extends DefaultCodegen implements CodegenConfig /** * Returns human-friendly help for the generator. Provide the consumer with help * tips, parameters here - * + * * @return A string value for the help message */ public String getHelp() { @@ -147,7 +147,7 @@ public class {{generatorClass}} extends DefaultCodegen implements CodegenConfig /** * Escapes a reserved word as defined in the `reservedWords` array. Handle escaping * those terms here. This logic is only called if a variable matches the reserved words - * + * * @return the escaped term */ @Override diff --git a/modules/openapi-generator/src/main/resources/codegen/generatorClassTest.mustache b/modules/openapi-generator/src/main/resources/codegen/generatorClassTest.mustache index 4267a928fcf4d1549121e9d8f42fccec629059bb..d4773b14f813e52a9f8c152ec6479c27e5ca6daf 100644 --- a/modules/openapi-generator/src/main/resources/codegen/generatorClassTest.mustache +++ b/modules/openapi-generator/src/main/resources/codegen/generatorClassTest.mustache @@ -7,8 +7,8 @@ import org.openapitools.codegen.config.CodegenConfigurator; /*** * This test allows you to easily launch your code generation software under a debugger. - * Then run this test under debug mode. You will be able to step through your java code - * and then see the results in the out directory. + * Then run this test under debug mode. You will be able to step through your java code + * and then see the results in the out directory. * * To experiment with debugging your code generator: * 1) Set a break point in {{generatorClass}}.java in the postProcessOperationsWithModels() method. @@ -22,7 +22,7 @@ public class {{generatorClass}}Test { @Test public void launchCodeGenerator() { // to understand how the 'openapi-generator-cli' module is using 'CodegenConfigurator', have a look at the 'Generate' class: - // https://github.com/OpenAPITools/openapi-generator/blob/master/modules/openapi-generator-cli/src/main/java/org/openapitools/codegen/cmd/Generate.java + // https://github.com/OpenAPITools/openapi-generator/blob/master/modules/openapi-generator-cli/src/main/java/org/openapitools/codegen/cmd/Generate.java final CodegenConfigurator configurator = new CodegenConfigurator() .setGeneratorName("{{name}}") // use this codegen library .setInputSpec("../../../modules/openapi-generator/src/test/resources/2_0/petstore.yaml") // sample OpenAPI file diff --git a/modules/openapi-generator/src/main/resources/codegen/kotlin/README.mustache b/modules/openapi-generator/src/main/resources/codegen/kotlin/README.mustache index 940ebbc0fa473e155660b7e5a6fd10add69cf541..1c026bed904d3ffe10105b1809d1a2ef3e9ca5c5 100644 --- a/modules/openapi-generator/src/main/resources/codegen/kotlin/README.mustache +++ b/modules/openapi-generator/src/main/resources/codegen/kotlin/README.mustache @@ -17,7 +17,7 @@ ```bash java -jar build/libs/{{kebabName}}-openapi-generator-standalone.jar config-help -g {{name}} ``` - + ## Building ### Standalone diff --git a/modules/openapi-generator/src/main/resources/codegen/pom.mustache b/modules/openapi-generator/src/main/resources/codegen/pom.mustache index 628dd6552f7552d30ee9dee6cfd16536b5e34b2b..a4f01d1cbbd8a17c24db5034a1b66342a0e80c02 100644 --- a/modules/openapi-generator/src/main/resources/codegen/pom.mustache +++ b/modules/openapi-generator/src/main/resources/codegen/pom.mustache @@ -117,7 +117,7 @@ <groupId>junit</groupId> <artifactId>junit</artifactId> <version>${junit-version}</version> - </dependency> + </dependency> </dependencies> <properties> <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding> diff --git a/modules/openapi-generator/src/main/resources/confluenceWikiDocs/index.mustache b/modules/openapi-generator/src/main/resources/confluenceWikiDocs/index.mustache index 9ddece9da19669d9dd335eb400403f0b92c54595..86c92f99dfb3f5b1d2a34436f080b3e1812a184b 100644 --- a/modules/openapi-generator/src/main/resources/confluenceWikiDocs/index.mustache +++ b/modules/openapi-generator/src/main/resources/confluenceWikiDocs/index.mustache @@ -2,7 +2,7 @@ h1. {{{appName}}} {{{appDescription}}} -{{#version}}*Version:* {{{version}}}{{/version}} +{{#version}}*Version:* {{{.}}}{{/version}} ---- @@ -15,7 +15,7 @@ h2. Endpoints h3. {{nickname}} {panel:title={{nickname}}|borderStyle=solid|borderColor=#003b6f|titleBGColor=#003b6f|titleColor=#a6b8c7|bgColor=#ffffff} - {{#summary}}*Summary:* {{summary}}{{/summary}} + {{#summary}}*Summary:* {{.}}{{/summary}} *Description:* {{notes}}{{^notes}}*No Description*{{/notes}} || HttpMethod | {status:colour=Yellow|title={{httpMethod}}|subtle=false} | @@ -76,10 +76,10 @@ h2. Models h3. {{classname}} {{{description}}} - + {{#isEnum}} ||Name||Value||Description|| {{#allowableValues}} {{#enumVars}} |{{{name}}} |{{{value}}} |{{{enumDescription}}} | - {{/enumVars}} + {{/enumVars}} {{/allowableValues}} {{/isEnum}} {{^isEnum}}||Field Name||Required||Type||Description||Enum|| {{#vars}} |{{baseName}} |{{#required}}(/){{/required}}{{^required}}(x){{/required}} |{noformat:nopanel=true}{{{dataType}}}{noformat} |{{description}} | {{#isEnum}} {{_enum}} {{/isEnum}} | diff --git a/modules/openapi-generator/src/main/resources/cpp-pistache-server/helpers-source.mustache b/modules/openapi-generator/src/main/resources/cpp-pistache-server/helpers-source.mustache index 214086354d516ba0df0dee35905144d39547223b..575dcf7b59c507e6fbef3d6a02f16ecfb8916007 100644 --- a/modules/openapi-generator/src/main/resources/cpp-pistache-server/helpers-source.mustache +++ b/modules/openapi-generator/src/main/resources/cpp-pistache-server/helpers-source.mustache @@ -11,7 +11,7 @@ const std::regex regexRfc3339_date_time( ); -namespace +namespace { // Determine if given year is a leap year // See RFC 3339, Appendix C https://tools.ietf.org/html/rfc3339#appendix-C diff --git a/modules/openapi-generator/src/main/resources/cpp-pistache-server/licenseInfo.mustache b/modules/openapi-generator/src/main/resources/cpp-pistache-server/licenseInfo.mustache index 3a547de74bb7a2be286e81242b14c95c0f560690..8d5259173a1b4a1af3099f3c019bce041f91f7a9 100644 --- a/modules/openapi-generator/src/main/resources/cpp-pistache-server/licenseInfo.mustache +++ b/modules/openapi-generator/src/main/resources/cpp-pistache-server/licenseInfo.mustache @@ -2,8 +2,8 @@ * {{{appName}}} * {{{appDescription}}} * -* {{#version}}The version of the OpenAPI document: {{{version}}}{{/version}} -* {{#infoEmail}}Contact: {{{infoEmail}}}{{/infoEmail}} +* {{#version}}The version of the OpenAPI document: {{{.}}}{{/version}} +* {{#infoEmail}}Contact: {{{.}}}{{/infoEmail}} * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech diff --git a/modules/openapi-generator/src/main/resources/cpp-pistache-server/main-api-server.mustache b/modules/openapi-generator/src/main/resources/cpp-pistache-server/main-api-server.mustache index 01d7882fa9842f740d1a73e450f4006a52914ecf..118db3cd98b66c8fb6be1ddb723454cc07b2f870 100644 --- a/modules/openapi-generator/src/main/resources/cpp-pistache-server/main-api-server.mustache +++ b/modules/openapi-generator/src/main/resources/cpp-pistache-server/main-api-server.mustache @@ -54,7 +54,7 @@ int main() { std::vector<int> sigs{SIGQUIT, SIGINT, SIGTERM, SIGHUP}; setUpUnixSignals(sigs); #endif - Pistache::Address addr(Pistache::Ipv4::any(), Pistache::Port({{#serverPort}}{{serverPort}}{{/serverPort}}{{^serverPort}}8080{{/serverPort}})); + Pistache::Address addr(Pistache::Ipv4::any(), Pistache::Port({{serverPort}}{{^serverPort}}8080{{/serverPort}})); httpEndpoint = new Pistache::Http::Endpoint((addr)); auto router = std::make_shared<Pistache::Rest::Router>(); @@ -76,4 +76,3 @@ int main() { httpEndpoint->shutdown(); } - diff --git a/modules/openapi-generator/src/main/resources/cpp-qt-client/HttpRequest.cpp.mustache b/modules/openapi-generator/src/main/resources/cpp-qt-client/HttpRequest.cpp.mustache index bf88363b51cfb7d4c7194440ff901eb1abc109d4..0da1decf03a44a8489b831d483bc0415f5e0c783 100644 --- a/modules/openapi-generator/src/main/resources/cpp-qt-client/HttpRequest.cpp.mustache +++ b/modules/openapi-generator/src/main/resources/cpp-qt-client/HttpRequest.cpp.mustache @@ -328,7 +328,7 @@ void {{prefix}}HttpRequestWorker::execute({{prefix}}HttpRequestInput *input) { if ({{prefix}}HttpRequestWorker::sslDefaultConfiguration != nullptr) { request.setSslConfiguration(*{{prefix}}HttpRequestWorker::sslDefaultConfiguration); } - request.setRawHeader("User-Agent", "{{#httpUserAgent}}{{.}}{{/httpUserAgent}}{{^httpUserAgent}}OpenAPI-Generator/{{apiVersion}}/cpp-qt{{/httpUserAgent}}"); + request.setRawHeader("User-Agent", "{{httpUserAgent}}{{^httpUserAgent}}OpenAPI-Generator/{{apiVersion}}/cpp-qt{{/httpUserAgent}}"); foreach (QString key, input->headers.keys()) { request.setRawHeader(key.toStdString().c_str(), input->headers.value(key).toStdString().c_str()); } if (request_content.size() > 0 && !isFormData && (input->var_layout != MULTIPART)) { diff --git a/modules/openapi-generator/src/main/resources/cpp-qt-client/Project.mustache b/modules/openapi-generator/src/main/resources/cpp-qt-client/Project.mustache index a815942bc7d05e87d81d94a6c9bf745768b5db48..c48c32708b9c68dd6c1030b5b11f8546c6c78242 100644 --- a/modules/openapi-generator/src/main/resources/cpp-qt-client/Project.mustache +++ b/modules/openapi-generator/src/main/resources/cpp-qt-client/Project.mustache @@ -43,4 +43,3 @@ SOURCES += \ $${PWD}/{{prefix}}Helpers.cpp \ $${PWD}/{{prefix}}HttpRequest.cpp \ $${PWD}/{{prefix}}HttpFileElement.cpp - diff --git a/modules/openapi-generator/src/main/resources/cpp-qt-client/README.mustache b/modules/openapi-generator/src/main/resources/cpp-qt-client/README.mustache index 9692bf79152c898ab463b76a4d5e8eaf56d29f87..0460040d2193115e086d8d0dacf0ebed1f08dc95 100644 --- a/modules/openapi-generator/src/main/resources/cpp-qt-client/README.mustache +++ b/modules/openapi-generator/src/main/resources/cpp-qt-client/README.mustache @@ -8,7 +8,7 @@ - Build date: {{generatedDate}} {{/hideGenerationTimestamp}} -{{#appDescriptionWithNewLines}}{{{appDescriptionWithNewLines}}}{{/appDescriptionWithNewLines}} +{{{appDescriptionWithNewLines}}} {{#infoUrl}} For more information, please visit [{{{infoUrl}}}]({{{infoUrl}}}) @@ -89,7 +89,7 @@ example.cpp: #include "../client/{{{classname}}}.h" #include "example.h" #include <QTimer> -#include <QEventLoop> +#include <QEventLoop> {{#allParams}} {{dataType}} Example::create(){ @@ -113,7 +113,7 @@ void Example::exampleFunction1(){ {{/authMethods}} {{/hasAuthMethods}} {{#allParams}} - + QEventLoop loop; connect(&apiInstance, &{{{classname}}}::{{nickname}}Signal, [&]() { loop.quit(); @@ -138,7 +138,7 @@ All URIs are relative to *{{basePath}}* Class | Method | HTTP request | Description ------------ | ------------- | ------------- | ------------- -{{#apiInfo}}{{#apis}}{{#operations}}{{#operation}}*{{classname}}* | [**{{operationId}}**]({{apiDocPath}}{{classname}}.md#{{operationId}}) | **{{httpMethod}}** {{commonPath}}{{path}} | {{#summary}}{{summary}}{{/summary}} +{{#apiInfo}}{{#apis}}{{#operations}}{{#operation}}*{{classname}}* | [**{{operationId}}**]({{apiDocPath}}{{classname}}.md#{{operationId}}) | **{{httpMethod}}** {{commonPath}}{{path}} | {{summary}} {{/operation}}{{/operations}}{{/apis}}{{/apiInfo}} ## Documentation for Models @@ -148,7 +148,7 @@ Class | Method | HTTP request | Description ## Documentation for Servers -Parameterized Servers are supported. Define a server in the API for each endpoint with arbitrary numbers of variables: +Parameterized Servers are supported. Define a server in the API for each endpoint with arbitrary numbers of variables: ``` servers: @@ -173,7 +173,7 @@ To change the default variable, use this function in each Api: ``` int setDefaultServerValue(int serverIndex,const QString &operation, const QString &variable,const QString &val); ``` -The parameter "serverIndex" will choose a server from the server list for each endpoint. There is always at least one server with index 0. The Paramter "operation" should be the desired endpoint operationid. +The parameter "serverIndex" will choose a server from the server list for each endpoint. There is always at least one server with index 0. The Paramter "operation" should be the desired endpoint operationid. Variable is the name of the variable you wish to change and the value is the new default Value. The function will return -1 when the variable does not exists, -2 if value is not defined in the variable enum and -3 if the operation is not found. diff --git a/modules/openapi-generator/src/main/resources/cpp-qt-client/ServerVariable.mustache b/modules/openapi-generator/src/main/resources/cpp-qt-client/ServerVariable.mustache index 04abcf783ffca05492aa14f0ab05b30213ebba89..6f5b287416ba832307196daa7a639e8dec31c339 100644 --- a/modules/openapi-generator/src/main/resources/cpp-qt-client/ServerVariable.mustache +++ b/modules/openapi-generator/src/main/resources/cpp-qt-client/ServerVariable.mustache @@ -19,11 +19,11 @@ public: * @param defaultValue The default value to use for substitution. * @param enumValues An enumeration of string values to be used if the substitution options are from a limited set. */ - {{prefix}}ServerVariable(const QString &description, const QString &defaultValue, const QSet<QString> &enumValues) + {{prefix}}ServerVariable(const QString &description, const QString &defaultValue, const QSet<QString> &enumValues) : _defaultValue(defaultValue), _description(description), _enumValues(enumValues){} - + {{prefix}}ServerVariable(){} ~{{prefix}}ServerVariable(){} diff --git a/modules/openapi-generator/src/main/resources/cpp-qt-client/api-header.mustache b/modules/openapi-generator/src/main/resources/cpp-qt-client/api-header.mustache index 639f2f766eaaf9715105bba26c4903ac21d4f106..09449281ecd01c844e19445772510dfd6129fb76 100644 --- a/modules/openapi-generator/src/main/resources/cpp-qt-client/api-header.mustache +++ b/modules/openapi-generator/src/main/resources/cpp-qt-client/api-header.mustache @@ -78,11 +78,11 @@ private: signals: {{#operations}}{{#operation}} - void {{nickname}}Signal({{#returnType}}{{{returnType}}} summary{{/returnType}});{{/operation}}{{/operations}} + void {{nickname}}Signal({{#returnType}}{{{.}}} summary{{/returnType}});{{/operation}}{{/operations}} {{#operations}}{{#operation}} - void {{nickname}}SignalFull({{prefix}}HttpRequestWorker *worker{{#returnType}}, {{{returnType}}} summary{{/returnType}});{{/operation}}{{/operations}} + void {{nickname}}SignalFull({{prefix}}HttpRequestWorker *worker{{#returnType}}, {{{.}}} summary{{/returnType}});{{/operation}}{{/operations}} {{#operations}}{{#operation}} - void {{nickname}}SignalE({{#returnType}}{{{returnType}}} summary, {{/returnType}}QNetworkReply::NetworkError error_type, QString error_str);{{/operation}}{{/operations}} + void {{nickname}}SignalE({{#returnType}}{{{.}}} summary, {{/returnType}}QNetworkReply::NetworkError error_type, QString error_str);{{/operation}}{{/operations}} {{#operations}}{{#operation}} void {{nickname}}SignalEFull({{prefix}}HttpRequestWorker *worker, QNetworkReply::NetworkError error_type, QString error_str);{{/operation}}{{/operations}} diff --git a/modules/openapi-generator/src/main/resources/cpp-qt-client/licenseInfo.mustache b/modules/openapi-generator/src/main/resources/cpp-qt-client/licenseInfo.mustache index 360883d9f9dbae7aae3504d13a6ee357b1a2bc37..166d1da53c5790c95fec05af5da2e26950f59135 100644 --- a/modules/openapi-generator/src/main/resources/cpp-qt-client/licenseInfo.mustache +++ b/modules/openapi-generator/src/main/resources/cpp-qt-client/licenseInfo.mustache @@ -2,8 +2,8 @@ * {{{appName}}} * {{{appDescription}}} * - * {{#version}}The version of the OpenAPI document: {{{version}}}{{/version}} - *{{#infoEmail}} Contact: {{{infoEmail}}} + * {{#version}}The version of the OpenAPI document: {{{.}}}{{/version}} + *{{#infoEmail}} Contact: {{{.}}} *{{/infoEmail}} * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech diff --git a/modules/openapi-generator/src/main/resources/cpp-qt-client/model-header.mustache b/modules/openapi-generator/src/main/resources/cpp-qt-client/model-header.mustache index 143f1424bfab2abca3216091954e3bd08ca4ef21..9179d3c7f7de7a6d6a457e82f1e97e0d98f7e391 100644 --- a/modules/openapi-generator/src/main/resources/cpp-qt-client/model-header.mustache +++ b/modules/openapi-generator/src/main/resources/cpp-qt-client/model-header.mustache @@ -46,7 +46,7 @@ public: {{#enumVars}} {{#enumDescription}} /** - * {{enumDescription}} + * {{.}} */ {{/enumDescription}} {{{name}}}{{^-last}}, {{/-last}} diff --git a/modules/openapi-generator/src/main/resources/cpp-qt-qhttpengine-server/apihandler.cpp.mustache b/modules/openapi-generator/src/main/resources/cpp-qt-qhttpengine-server/apihandler.cpp.mustache index 90af1b39df39fb40b74701a2f01fbfe99fbbb47d..27f5a4a97c10e3298ebe39641e824a7b8d04b843 100644 --- a/modules/openapi-generator/src/main/resources/cpp-qt-qhttpengine-server/apihandler.cpp.mustache +++ b/modules/openapi-generator/src/main/resources/cpp-qt-qhttpengine-server/apihandler.cpp.mustache @@ -20,16 +20,16 @@ namespace {{this}} { } -{{#operations}}{{#operation}}void {{classname}}Handler::{{nickname}}({{#allParams}}{{{dataType}}}{{#isBodyParam}}{{/isBodyParam}} {{paramName}}{{^-last}}, {{/-last}}{{/allParams}}) { +{{#operations}}{{#operation}}void {{classname}}Handler::{{nickname}}({{#allParams}}{{{dataType}}} {{paramName}}{{^-last}}, {{/-last}}{{/allParams}}) { {{#allParams}} Q_UNUSED({{paramName}}); {{/allParams}} auto reqObj = qobject_cast<{{classname}}Request*>(sender()); - if( reqObj != nullptr ) - { - {{#returnType}}{{{returnType}}} res;{{/returnType}} + if( reqObj != nullptr ) + { + {{#returnType}}{{{.}}} res;{{/returnType}} reqObj->{{nickname}}Response({{#returnType}}res{{/returnType}}); - } + } } {{/operation}}{{/operations}} diff --git a/modules/openapi-generator/src/main/resources/cpp-qt-qhttpengine-server/apihandler.h.mustache b/modules/openapi-generator/src/main/resources/cpp-qt-qhttpengine-server/apihandler.h.mustache index ab3fdb3d6a42448dda1f12d3475f31add3a69cf7..55a3e3db47fbb529518249ab2c4e219158e2999d 100644 --- a/modules/openapi-generator/src/main/resources/cpp-qt-qhttpengine-server/apihandler.h.mustache +++ b/modules/openapi-generator/src/main/resources/cpp-qt-qhttpengine-server/apihandler.h.mustache @@ -14,14 +14,14 @@ namespace {{this}} { class {{classname}}Handler : public QObject { Q_OBJECT - + public: {{classname}}Handler(); virtual ~{{classname}}Handler(); public slots: - {{#operations}}{{#operation}}virtual void {{nickname}}({{#allParams}}{{{dataType}}}{{#isBodyParam}}{{/isBodyParam}} {{paramName}}{{^-last}}, {{/-last}}{{/allParams}}); + {{#operations}}{{#operation}}virtual void {{nickname}}({{#allParams}}{{{dataType}}} {{paramName}}{{^-last}}, {{/-last}}{{/allParams}}); {{/operation}}{{/operations}} }; diff --git a/modules/openapi-generator/src/main/resources/cpp-qt-qhttpengine-server/apirequest.cpp.mustache b/modules/openapi-generator/src/main/resources/cpp-qt-qhttpengine-server/apirequest.cpp.mustache index ca8513d078dcfd27a0f3f8ba17548a0def4e3942..7799749ee8aab7119980ec5441fac3e5b6f03211 100644 --- a/modules/openapi-generator/src/main/resources/cpp-qt-qhttpengine-server/apirequest.cpp.mustache +++ b/modules/openapi-generator/src/main/resources/cpp-qt-qhttpengine-server/apirequest.cpp.mustache @@ -108,12 +108,12 @@ void {{classname}}Request::{{nickname}}Request({{#hasPathParams}}{{#pathParams}} {{/isArray}} {{/bodyParam}}{{/bodyParams}} - emit {{nickname}}({{#allParams}}{{#isBodyParam}}{{/isBodyParam}}{{paramName}}{{^-last}}, {{/-last}}{{/allParams}}); + emit {{nickname}}({{#allParams}}{{paramName}}{{^-last}}, {{/-last}}{{/allParams}}); } {{/operation}}{{/operations}} -{{#operations}}{{#operation}}void {{classname}}Request::{{nickname}}Response({{#returnType}}const {{{returnType}}}& res{{/returnType}}){ +{{#operations}}{{#operation}}void {{classname}}Request::{{nickname}}Response({{#returnType}}const {{{.}}}& res{{/returnType}}){ setSocketResponseHeaders();{{#returnType}}{{#isMap}} QJsonDocument resDoc(::{{cppNamespace}}::toJsonValue(res).toObject()); socket->writeJson(resDoc);{{/isMap}}{{^isMap}}{{^returnTypeIsPrimitive}}{{^vendorExtensions.x-returns-enum}} @@ -129,7 +129,7 @@ void {{classname}}Request::{{nickname}}Request({{#hasPathParams}}{{#pathParams}} } {{/operation}}{{/operations}} -{{#operations}}{{#operation}}void {{classname}}Request::{{nickname}}Error({{#returnType}}const {{{returnType}}}& res, {{/returnType}}QNetworkReply::NetworkError error_type, QString& error_str){ +{{#operations}}{{#operation}}void {{classname}}Request::{{nickname}}Error({{#returnType}}const {{{.}}}& res, {{/returnType}}QNetworkReply::NetworkError error_type, QString& error_str){ Q_UNUSED(error_type); // TODO: Remap error_type to QHttpEngine::Socket errors setSocketResponseHeaders();{{#returnType}} Q_UNUSED(error_str); // response will be used instead of error string{{#isMap}} @@ -152,7 +152,7 @@ void {{classname}}Request::sendCustomResponse(QByteArray & res, QNetworkReply::N socket->write(res); if(socket->isOpen()){ socket->close(); - } + } } void {{classname}}Request::sendCustomResponse(QIODevice *res, QNetworkReply::NetworkError error_type){ diff --git a/modules/openapi-generator/src/main/resources/cpp-qt-qhttpengine-server/apirequest.h.mustache b/modules/openapi-generator/src/main/resources/cpp-qt-qhttpengine-server/apirequest.h.mustache index 7f78b9631737ceb734e5505708a14ff0b8d80bfc..b2fad55940be1d0cd8c3d892b2ebc25d7606333f 100644 --- a/modules/openapi-generator/src/main/resources/cpp-qt-qhttpengine-server/apirequest.h.mustache +++ b/modules/openapi-generator/src/main/resources/cpp-qt-qhttpengine-server/apirequest.h.mustache @@ -28,10 +28,10 @@ public: {{#operations}}{{#operation}}void {{nickname}}Request({{#hasPathParams}}{{#pathParams}}const QString& {{{paramName}}}{{^-last}}, {{/-last}}{{/pathParams}}{{/hasPathParams}}); {{/operation}}{{/operations}} - {{#operations}}{{#operation}}void {{nickname}}Response({{#returnType}}const {{{returnType}}}& res{{/returnType}}); + {{#operations}}{{#operation}}void {{nickname}}Response({{#returnType}}const {{{.}}}& res{{/returnType}}); {{/operation}}{{/operations}} - {{#operations}}{{#operation}}void {{nickname}}Error({{#returnType}}const {{{returnType}}}& res, {{/returnType}}QNetworkReply::NetworkError error_type, QString& error_str); + {{#operations}}{{#operation}}void {{nickname}}Error({{#returnType}}const {{{.}}}& res, {{/returnType}}QNetworkReply::NetworkError error_type, QString& error_str); {{/operation}}{{/operations}} void sendCustomResponse(QByteArray & res, QNetworkReply::NetworkError error_type); diff --git a/modules/openapi-generator/src/main/resources/cpp-qt-qhttpengine-server/apirouter.h.mustache b/modules/openapi-generator/src/main/resources/cpp-qt-qhttpengine-server/apirouter.h.mustache index 2b1c0cf75da9e89ebc674cb86755c7c436799c41..028a3097e2568df62b785e70df2621c96a12328d 100644 --- a/modules/openapi-generator/src/main/resources/cpp-qt-qhttpengine-server/apirouter.h.mustache +++ b/modules/openapi-generator/src/main/resources/cpp-qt-qhttpengine-server/apirouter.h.mustache @@ -89,7 +89,7 @@ private : } return QStringLiteral(""); } - + inline QRegularExpressionMatch getRequestMatch(QString serverTemplatePath, QString requestPath){ QRegularExpression parExpr( R"(\{([^\/\\s]+)\})" ); serverTemplatePath.replace( parExpr, R"((?<\1>[^\/\s]+))" ); diff --git a/modules/openapi-generator/src/main/resources/cpp-qt-qhttpengine-server/licenseInfo.mustache b/modules/openapi-generator/src/main/resources/cpp-qt-qhttpengine-server/licenseInfo.mustache index 360883d9f9dbae7aae3504d13a6ee357b1a2bc37..166d1da53c5790c95fec05af5da2e26950f59135 100644 --- a/modules/openapi-generator/src/main/resources/cpp-qt-qhttpengine-server/licenseInfo.mustache +++ b/modules/openapi-generator/src/main/resources/cpp-qt-qhttpengine-server/licenseInfo.mustache @@ -2,8 +2,8 @@ * {{{appName}}} * {{{appDescription}}} * - * {{#version}}The version of the OpenAPI document: {{{version}}}{{/version}} - *{{#infoEmail}} Contact: {{{infoEmail}}} + * {{#version}}The version of the OpenAPI document: {{{.}}}{{/version}} + *{{#infoEmail}} Contact: {{{.}}} *{{/infoEmail}} * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech diff --git a/modules/openapi-generator/src/main/resources/cpp-qt-qhttpengine-server/main.cpp.mustache b/modules/openapi-generator/src/main/resources/cpp-qt-qhttpengine-server/main.cpp.mustache index 5b4954ae4ff8dca7aeff54367827092a26ba93d1..87b94f71ec6dcd940f76a8a8077e6fef6eb9aaf1 100644 --- a/modules/openapi-generator/src/main/resources/cpp-qt-qhttpengine-server/main.cpp.mustache +++ b/modules/openapi-generator/src/main/resources/cpp-qt-qhttpengine-server/main.cpp.mustache @@ -58,7 +58,7 @@ int main(int argc, char * argv[]) QStringList() << "p" << "port", "port to listen on", "port", - "{{#serverPort}}{{serverPort}}{{/serverPort}}{{^serverPort}}8080{{/serverPort}}" + "{{serverPort}}{{^serverPort}}8080{{/serverPort}}" ); parser.addOption(portOption); parser.addHelpOption(); diff --git a/modules/openapi-generator/src/main/resources/cpp-qt-qhttpengine-server/model-header.mustache b/modules/openapi-generator/src/main/resources/cpp-qt-qhttpengine-server/model-header.mustache index 5bbe8c8c20e1fc704c6fd31545f11e97a5d97a3c..8a56eb6669e45ac73477689ae93b2527e2ce5b35 100644 --- a/modules/openapi-generator/src/main/resources/cpp-qt-qhttpengine-server/model-header.mustache +++ b/modules/openapi-generator/src/main/resources/cpp-qt-qhttpengine-server/model-header.mustache @@ -44,7 +44,7 @@ public: {{#enumVars}} {{#enumDescription}} /** - * {{enumDescription}} + * {{.}} */ {{/enumDescription}} {{{name}}}{{^-last}}, {{/-last}} diff --git a/modules/openapi-generator/src/main/resources/cpp-rest-sdk-client/README.mustache b/modules/openapi-generator/src/main/resources/cpp-rest-sdk-client/README.mustache index fa672709a8a9d58c94c8a18e32ce34fc10f2c2a1..62f5bac46d0b8c552dc342a11e33cd8389f8b254 100644 --- a/modules/openapi-generator/src/main/resources/cpp-rest-sdk-client/README.mustache +++ b/modules/openapi-generator/src/main/resources/cpp-rest-sdk-client/README.mustache @@ -1,7 +1,7 @@ # C++ API client {{#appDescriptionWithNewLines}} -{{{appDescriptionWithNewLines}}} +{{{.}}} {{/appDescriptionWithNewLines}} ## Overview diff --git a/modules/openapi-generator/src/main/resources/cpp-rest-sdk-client/api-gmock.mustache b/modules/openapi-generator/src/main/resources/cpp-rest-sdk-client/api-gmock.mustache index 4eac5d61d49769a726712dfef16924a428bcfb0a..d144bf6a064a45771d6cc779a8175c296bd6122a 100644 --- a/modules/openapi-generator/src/main/resources/cpp-rest-sdk-client/api-gmock.mustache +++ b/modules/openapi-generator/src/main/resources/cpp-rest-sdk-client/api-gmock.mustache @@ -24,7 +24,7 @@ public: ~{{classname}}Mock() override = default; {{#operation}} - MOCK_METHOD{{allParams.size}}( {{operationId}}, pplx::task<{{#returnType}}{{{returnType}}}{{/returnType}}{{^returnType}}void{{/returnType}}> ( + MOCK_METHOD{{allParams.size}}( {{operationId}}, pplx::task<{{{returnType}}}{{^returnType}}void{{/returnType}}> ( {{#allParams}} {{^required}}boost::optional<{{/required}}{{#isFile}}std::shared_ptr<{{/isFile}}{{{dataType}}}{{#isFile}}>{{/isFile}}{{^required}}>{{/required}} {{paramName}}{{^-last}},{{/-last}} {{/allParams}} diff --git a/modules/openapi-generator/src/main/resources/cpp-rest-sdk-client/api-header.mustache b/modules/openapi-generator/src/main/resources/cpp-rest-sdk-client/api-header.mustache index 4d2e796717a80894bc34fb1347d05788126649f3..3b1c75e86d15ca880dbb0e7787d7f9a40271571d 100644 --- a/modules/openapi-generator/src/main/resources/cpp-rest-sdk-client/api-header.mustache +++ b/modules/openapi-generator/src/main/resources/cpp-rest-sdk-client/api-header.mustache @@ -31,7 +31,7 @@ public: virtual ~I{{classname}}() = default; {{#operation}} - virtual pplx::task<{{#returnType}}{{{returnType}}}{{/returnType}}{{^returnType}}void{{/returnType}}> {{operationId}}( + virtual pplx::task<{{{returnType}}}{{^returnType}}void{{/returnType}}> {{operationId}}( {{#allParams}} {{^required}}boost::optional<{{/required}}{{{dataType}}}{{^required}}>{{/required}} {{paramName}}{{^-last}},{{/-last}} {{/allParams}} @@ -65,7 +65,7 @@ public: {{#allParams}} /// <param name="{{paramName}}">{{#lambda.multiline_comment_4}}{{description}}{{/lambda.multiline_comment_4}}{{^required}} (optional{{#defaultValue}}, default to {{.}}{{/defaultValue}}){{/required}}</param> {{/allParams}} - pplx::task<{{#returnType}}{{{returnType}}}{{/returnType}}{{^returnType}}void{{/returnType}}> {{operationId}}( + pplx::task<{{{returnType}}}{{^returnType}}void{{/returnType}}> {{operationId}}( {{#allParams}} {{^required}}boost::optional<{{/required}}{{{dataType}}}{{^required}}>{{/required}} {{paramName}}{{^-last}},{{/-last}} {{/allParams}} diff --git a/modules/openapi-generator/src/main/resources/cpp-rest-sdk-client/api-source.mustache b/modules/openapi-generator/src/main/resources/cpp-rest-sdk-client/api-source.mustache index 145f613b0b18de670e6e8dbdad279eb16bbcccbb..517af2c5d08a946eba8db732954acfe25fb03bbe 100644 --- a/modules/openapi-generator/src/main/resources/cpp-rest-sdk-client/api-source.mustache +++ b/modules/openapi-generator/src/main/resources/cpp-rest-sdk-client/api-source.mustache @@ -26,7 +26,7 @@ using namespace {{modelNamespace}}; } {{#operation}} -pplx::task<{{#returnType}}{{{returnType}}}{{/returnType}}{{^returnType}}void{{/returnType}}> {{classname}}::{{operationId}}({{#allParams}}{{^required}}boost::optional<{{/required}}{{{dataType}}}{{^required}}>{{/required}} {{paramName}}{{^-last}}, {{/-last}}{{/allParams}}) const +pplx::task<{{{returnType}}}{{^returnType}}void{{/returnType}}> {{classname}}::{{operationId}}({{#allParams}}{{^required}}boost::optional<{{/required}}{{{dataType}}}{{^required}}>{{/required}} {{paramName}}{{^-last}}, {{/-last}}{{/allParams}}) const { {{#allParams}}{{#required}}{{^isPrimitiveType}}{{^isContainer}} // verify the required parameter '{{paramName}}' is set diff --git a/modules/openapi-generator/src/main/resources/cpp-rest-sdk-client/git_push.sh.mustache b/modules/openapi-generator/src/main/resources/cpp-rest-sdk-client/git_push.sh.mustache index 8b3f689c9121a65080ad038d37a2036b01e559a1..f0bed5bd84155f05bc3cdc67af008f524efb38a6 100644 --- a/modules/openapi-generator/src/main/resources/cpp-rest-sdk-client/git_push.sh.mustache +++ b/modules/openapi-generator/src/main/resources/cpp-rest-sdk-client/git_push.sh.mustache @@ -55,4 +55,3 @@ 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/cpp-rest-sdk-client/licenseInfo.mustache b/modules/openapi-generator/src/main/resources/cpp-rest-sdk-client/licenseInfo.mustache index 0342fdbca19345c342a11f5a98387d87e99ca731..4b9c44b14bc05608e03ebf645e05ce6364fa76d4 100644 --- a/modules/openapi-generator/src/main/resources/cpp-rest-sdk-client/licenseInfo.mustache +++ b/modules/openapi-generator/src/main/resources/cpp-rest-sdk-client/licenseInfo.mustache @@ -3,10 +3,10 @@ * {{{appDescription}}} * {{#version}} - * The version of the OpenAPI document: {{{version}}} + * The version of the OpenAPI document: {{{.}}} {{/version}} {{#infoEmail}} - * Contact: {{{infoEmail}}} + * Contact: {{{.}}} {{/infoEmail}} * * NOTE: This class is auto generated by OpenAPI-Generator {{{generatorVersion}}}. diff --git a/modules/openapi-generator/src/main/resources/cpp-rest-sdk-client/model-header.mustache b/modules/openapi-generator/src/main/resources/cpp-rest-sdk-client/model-header.mustache index 109596f437e329e9549d9bb8d7f9b49216dca8ce..f8ba4b95e7fb0c20c67850214499e9ff941ee8f0 100644 --- a/modules/openapi-generator/src/main/resources/cpp-rest-sdk-client/model-header.mustache +++ b/modules/openapi-generator/src/main/resources/cpp-rest-sdk-client/model-header.mustache @@ -26,7 +26,7 @@ namespace {{this}} { {{/vendorExtensions.x-has-forward-declarations}} {{#isEnum}} class {{declspec}} {{classname}} - : public {{#parent}}{{{parent}}}{{/parent}}{{^parent}}ModelBase{{/parent}} + : public {{{parent}}}{{^parent}}ModelBase{{/parent}} { public: {{classname}}(); @@ -49,7 +49,7 @@ public: {{#enumVars}} {{#enumDescription}} /// <summary> - /// {{enumDescription}} + /// {{.}} /// </summary> {{/enumDescription}} {{classname}}_{{{name}}}{{^last}},{{/last}} @@ -70,7 +70,7 @@ public: /// {{description}} /// </summary> class {{declspec}} {{classname}} - : public {{#parent}}{{{parent}}}{{/parent}}{{^parent}}ModelBase{{/parent}} + : public {{{parent}}}{{^parent}}ModelBase{{/parent}} { public: {{classname}}(); diff --git a/modules/openapi-generator/src/main/resources/cpp-rest-sdk-client/model-source.mustache b/modules/openapi-generator/src/main/resources/cpp-rest-sdk-client/model-source.mustache index 41eb29a561094060a54cbdb7d0a09b4b2d834f67..f9714b7b63fc6c538fdf25641a1ae4e618e1b5fa 100644 --- a/modules/openapi-generator/src/main/resources/cpp-rest-sdk-client/model-source.mustache +++ b/modules/openapi-generator/src/main/resources/cpp-rest-sdk-client/model-source.mustache @@ -127,7 +127,7 @@ void {{classname}}::validate() web::json::value {{classname}}::toJson() const { {{#parent}} - web::json::value val = this->{{{parent}}}::toJson();{{/parent}} + web::json::value val = this->{{{.}}}::toJson();{{/parent}} {{^parent}} web::json::value val = web::json::value::object(); {{/parent}} @@ -144,7 +144,7 @@ bool {{classname}}::fromJson(const web::json::value& val) { bool ok = true; {{#parent}} - ok &= this->{{{parent}}}::fromJson(val); + ok &= this->{{{.}}}::fromJson(val); {{/parent}} {{#vars}}{{^isInherited}} if(val.has_field(utility::conversions::to_string_t("{{baseName}}"))) diff --git a/modules/openapi-generator/src/main/resources/cpp-rest-sdk-client/modelbase-header.mustache b/modules/openapi-generator/src/main/resources/cpp-rest-sdk-client/modelbase-header.mustache index e9e60bd6983894df08ed4e172ac4544ed1b8156b..b688c4fd1e5778e7a4e935987c6d93f0be67a092 100644 --- a/modules/openapi-generator/src/main/resources/cpp-rest-sdk-client/modelbase-header.mustache +++ b/modules/openapi-generator/src/main/resources/cpp-rest-sdk-client/modelbase-header.mustache @@ -201,7 +201,7 @@ bool ModelBase::fromString( const utility::string_t& val, std::shared_ptr<T>& ou if(outVal == nullptr) { outVal = std::shared_ptr<T>(new T()); - } + } if( outVal != nullptr ) { ok = outVal->fromJson(web::json::value::parse(val)); 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 c74cec16a4feb2c17ee6d4890db5ce25b2986c27..30e1154cff5e002ae253a172b9e994e3413563d3 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 @@ -84,11 +84,11 @@ public: ~{{classname}}(); void startService(int const& port); void stopService(); - + protected: {{#operation}} std::shared_ptr<{{classname}}{{vendorExtensions.x-codegen-resource-name}}Resource> m_sp{{classname}}{{vendorExtensions.x-codegen-resource-name}}Resource; - {{/operation}} + {{/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 4ded701c2ee1b2d9177317a11d5447cb41f581a0..e80c89321fcda1bee8a6dc1959d95c4e5595eb61 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 @@ -33,7 +33,7 @@ void {{classname}}::startService(int const& port) { std::shared_ptr<restbed::Settings> settings = std::make_shared<restbed::Settings>(); settings->set_port(port); settings->set_root("{{contextPath}}"); - + this->start(settings); } @@ -217,7 +217,7 @@ void {{classname}}{{vendorExtensions.x-codegen-resource-name}}Resource::{{httpMe }); {{/hasBodyParam}} } -{{/vendorExtensions.x-codegen-other-methods}} +{{/vendorExtensions.x-codegen-other-methods}} {{/operation}} diff --git a/modules/openapi-generator/src/main/resources/cpp-restbed-server/git_push.sh.mustache b/modules/openapi-generator/src/main/resources/cpp-restbed-server/git_push.sh.mustache index 8b3f689c9121a65080ad038d37a2036b01e559a1..f0bed5bd84155f05bc3cdc67af008f524efb38a6 100644 --- a/modules/openapi-generator/src/main/resources/cpp-restbed-server/git_push.sh.mustache +++ b/modules/openapi-generator/src/main/resources/cpp-restbed-server/git_push.sh.mustache @@ -55,4 +55,3 @@ 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/cpp-restbed-server/licenseInfo.mustache b/modules/openapi-generator/src/main/resources/cpp-restbed-server/licenseInfo.mustache index e0d370894bbc35f444e07515651916d18982fad4..85213c8b15c771c8be19c9eee9f079c694e647bb 100644 --- a/modules/openapi-generator/src/main/resources/cpp-restbed-server/licenseInfo.mustache +++ b/modules/openapi-generator/src/main/resources/cpp-restbed-server/licenseInfo.mustache @@ -2,8 +2,8 @@ * {{{appName}}} * {{{appDescription}}} * - * {{#version}}The version of the OpenAPI document: {{{version}}}{{/version}} - * {{#infoEmail}}Contact: {{{infoEmail}}}{{/infoEmail}} + * {{#version}}The version of the OpenAPI document: {{{.}}}{{/version}} + * {{#infoEmail}}Contact: {{{.}}}{{/infoEmail}} * * NOTE: This class is auto generated by OpenAPI-Generator {{{generatorVersion}}}. * https://openapi-generator.tech 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 090481e0a16cffe6f4868b517078470e60c83384..805b0664ab2b7c3626c5538dc82ea4b92b52b32e 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 @@ -30,7 +30,7 @@ class {{declspec}} {{classname}} {{#interfaces}}{{#-first}}:{{/-first}}{{^-first public: {{classname}}(); virtual ~{{classname}}(); - + std::string toJsonString(bool prettyJson = false); void fromJsonString(std::string const& jsonString); boost::property_tree::ptree toPropertyTree(); diff --git a/modules/openapi-generator/src/main/resources/cpp-tiny/README.mustache b/modules/openapi-generator/src/main/resources/cpp-tiny/README.mustache index e749562a0aa37e4b71a3685c11a0ac21bf623d75..2a47e520d3e96b1de7c414d7d4d08751bb5555a6 100644 --- a/modules/openapi-generator/src/main/resources/cpp-tiny/README.mustache +++ b/modules/openapi-generator/src/main/resources/cpp-tiny/README.mustache @@ -40,4 +40,3 @@ All URIs are relative to {{{scheme}}}://{{{host}}}{{{basePath}}} |------------- | -------------| {{#models}}{{#model}}|*{{classname}}* | {{{description}}}| {{/model}}{{/models}} - diff --git a/modules/openapi-generator/src/main/resources/cpp-tiny/helpers-body.mustache b/modules/openapi-generator/src/main/resources/cpp-tiny/helpers-body.mustache index c3935b37cde97e1e8912a3f820d58a26c54cca30..5fc0fc2f991afecd6f061e6abd95e2be1abd3eed 100644 --- a/modules/openapi-generator/src/main/resources/cpp-tiny/helpers-body.mustache +++ b/modules/openapi-generator/src/main/resources/cpp-tiny/helpers-body.mustache @@ -23,39 +23,39 @@ jsonToValue(void* target, bourne::json value, std::string type) { if (target == NULL || value.is_null()) { return; - } - - else if (type.compare("bool") == 0) + } + + else if (type.compare("bool") == 0) { bool* val = static_cast<bool*> (target); *val = value.to_bool(); - } - - else if (type.compare("int") == 0) + } + + else if (type.compare("int") == 0) { int* val = static_cast<int*> (target); *val = value.to_int(); - } - - else if (type.compare("float") == 0) + } + + else if (type.compare("float") == 0) { float* val = static_cast<float*> (target); *val = (float)(value.to_float()); - } + } else if (type.compare("long") == 0) { long* val = static_cast<long*> (target); *val = (long)(value.to_int()); - } - - else if (type.compare("double") == 0) + } + + else if (type.compare("double") == 0) { double* val = static_cast<double*> (target); *val = value.to_float(); - } - - else if (type.compare("std::string") == 0) + } + + else if (type.compare("std::string") == 0) { std::string* val = static_cast<std::string*> (target); *val = value.to_string(); diff --git a/modules/openapi-generator/src/main/resources/cpp-tiny/helpers-header.mustache b/modules/openapi-generator/src/main/resources/cpp-tiny/helpers-header.mustache index 5ef7d9afdf77aa341eff4c41dbcdee370b36074d..710a3333f5877deada7cd9bb3022a48e0c559eb7 100644 --- a/modules/openapi-generator/src/main/resources/cpp-tiny/helpers-header.mustache +++ b/modules/openapi-generator/src/main/resources/cpp-tiny/helpers-header.mustache @@ -19,4 +19,3 @@ std::string stringify(float input); std::string stringify(std::string input); #endif /* TINY_CPP_CLIENT_HELPERS_H_ */ - diff --git a/modules/openapi-generator/src/main/resources/cpp-tiny/model-body.mustache b/modules/openapi-generator/src/main/resources/cpp-tiny/model-body.mustache index b2f2ee66fd9d18c7017b5b18e9bcc8bd7609fd7c..056ff957c200fdac18ce41a370e6772ce7f55ffb 100644 --- a/modules/openapi-generator/src/main/resources/cpp-tiny/model-body.mustache +++ b/modules/openapi-generator/src/main/resources/cpp-tiny/model-body.mustache @@ -28,13 +28,13 @@ using namespace Tiny; void {{classname}}::fromJson(std::string jsonObj) -{ +{ bourne::json object = bourne::json::parse(jsonObj); {{#vars}} const char *{{name}}Key = "{{baseName}}"; - - if(object.has_key({{name}}Key)) + + if(object.has_key({{name}}Key)) { bourne::json value = object[{{name}}Key]; @@ -50,11 +50,11 @@ void {{#isPrimitiveType}} jsonToValue(&element, var, "{{dataType}}"); {{/isPrimitiveType}} - + {{^isPrimitiveType}} element.fromJson(var.dump()); {{/isPrimitiveType}} - + {{/items}} {{name}}_list.push_back(element); } @@ -64,7 +64,7 @@ void {{/isContainer}} {{^isContainer}} - + {{#isPrimitiveType}} jsonToValue(&{{name}}, value, "{{baseType}}"); {{/isPrimitiveType}} @@ -87,13 +87,13 @@ bourne::json bourne::json object = bourne::json::object(); {{#vars}} - + {{#isContainer}} {{#isArray}} - + {{#items}} {{#isPrimitiveType}} - + std::list<{{dataType}}> {{name}}_list = {{getter}}(); bourne::json {{name}}_arr = bourne::json::array(); @@ -103,7 +103,7 @@ bourne::json } object["{{name}}"] = {{name}}_arr; - + {{/isPrimitiveType}} {{^isPrimitiveType}} @@ -117,7 +117,7 @@ bourne::json } object["{{name}}"] = {{name}}_arr; - {{/isPrimitiveType}} + {{/isPrimitiveType}} {{/items}} {{/isArray}} {{/isContainer}} diff --git a/modules/openapi-generator/src/main/resources/cpp-tiny/root.cert.mustache b/modules/openapi-generator/src/main/resources/cpp-tiny/root.cert.mustache index bad9c08efad1a4772b312336cc585f8e8fcef86f..59d760f1e167641b8e6dcc5cca64991afe776c9d 100644 --- a/modules/openapi-generator/src/main/resources/cpp-tiny/root.cert.mustache +++ b/modules/openapi-generator/src/main/resources/cpp-tiny/root.cert.mustache @@ -50,4 +50,3 @@ "rqXRfboQnoZsG4q5WTP468SQvvG5\n" \ "-----END CERTIFICATE-----\n" \ */ - diff --git a/modules/openapi-generator/src/main/resources/cpp-tiny/run-tests.mustache b/modules/openapi-generator/src/main/resources/cpp-tiny/run-tests.mustache index 54bf326c43a39b3d29362952d8da0829740ce418..dd22e715258223bb7a359a954dc6e50a9776b650 100644 --- a/modules/openapi-generator/src/main/resources/cpp-tiny/run-tests.mustache +++ b/modules/openapi-generator/src/main/resources/cpp-tiny/run-tests.mustache @@ -24,7 +24,7 @@ void runTests(){ {{/vars}} {{/model}}{{/models}} - + } int main(void) { @@ -40,5 +40,5 @@ void setup() { } void loop() { - + } diff --git a/modules/openapi-generator/src/main/resources/cpp-tiny/service/Response.h.mustache b/modules/openapi-generator/src/main/resources/cpp-tiny/service/Response.h.mustache index 9b7b616b8f1b97c232794c9d01978fd712cd9c30..af7543e0c9b81761e7b1dbee3c7dec4bf644461d 100644 --- a/modules/openapi-generator/src/main/resources/cpp-tiny/service/Response.h.mustache +++ b/modules/openapi-generator/src/main/resources/cpp-tiny/service/Response.h.mustache @@ -21,5 +21,5 @@ template <typename T = std::string> T obj; }; } // namespace Tinyclient - + #endif /* TINY_CPP_CLIENT_RESPONSE_H_ */ diff --git a/modules/openapi-generator/src/main/resources/cpp-tiny/service/api-body.mustache b/modules/openapi-generator/src/main/resources/cpp-tiny/service/api-body.mustache index dc1298688372dda03262d4c5ce17d01d3d6f43ac..c151d92c4d87601ec9c3d0d2124a8e02cd4ee1a3 100644 --- a/modules/openapi-generator/src/main/resources/cpp-tiny/service/api-body.mustache +++ b/modules/openapi-generator/src/main/resources/cpp-tiny/service/api-body.mustache @@ -216,4 +216,3 @@ using namespace Tiny; {{/operations}} - diff --git a/modules/openapi-generator/src/main/resources/cpp-tiny/unit-test-model.mustache b/modules/openapi-generator/src/main/resources/cpp-tiny/unit-test-model.mustache index 14894973b81f30a9984801c36444aefd24b23096..c6b008606ed2041f8abc2c9bbc04e966aa1b23e3 100644 --- a/modules/openapi-generator/src/main/resources/cpp-tiny/unit-test-model.mustache +++ b/modules/openapi-generator/src/main/resources/cpp-tiny/unit-test-model.mustache @@ -14,7 +14,7 @@ using namespace Tiny; void test_{{classname}}_{{name}}_is_assigned_from_json() { {{#isInteger}} - bourne::json input = + bourne::json input = { "{{name}}", 1 }; @@ -26,7 +26,7 @@ void test_{{classname}}_{{name}}_is_assigned_from_json() {{#isString}} - bourne::json input = + bourne::json input = { "{{name}}", "hello" }; @@ -38,7 +38,7 @@ void test_{{classname}}_{{name}}_is_assigned_from_json() {{#isBoolean}} - bourne::json input = + bourne::json input = { "{{name}}", true }; @@ -50,7 +50,7 @@ void test_{{classname}}_{{name}}_is_assigned_from_json() {{#isLong}} - bourne::json input = + bourne::json input = { "{{name}}", 1 }; @@ -62,7 +62,7 @@ void test_{{classname}}_{{name}}_is_assigned_from_json() {{#isFloat}} - bourne::json input = + bourne::json input = { "{{name}}", 1.0 }; @@ -80,7 +80,7 @@ void test_{{classname}}_{{name}}_is_assigned_from_json() void test_{{classname}}_{{name}}_is_converted_to_json() { {{#isInteger}} - bourne::json input = + bourne::json input = { "{{name}}", 1 }; @@ -95,7 +95,7 @@ void test_{{classname}}_{{name}}_is_converted_to_json() {{/isInteger}} {{#isString}} - bourne::json input = + bourne::json input = { "{{name}}", "hello" }; @@ -110,7 +110,7 @@ void test_{{classname}}_{{name}}_is_converted_to_json() {{/isString}} {{#isBoolean}} - bourne::json input = + bourne::json input = { "{{name}}", true }; @@ -125,7 +125,7 @@ void test_{{classname}}_{{name}}_is_converted_to_json() {{/isBoolean}} {{#isLong}} - bourne::json input = + bourne::json input = { "{{name}}", 1 }; @@ -140,7 +140,7 @@ void test_{{classname}}_{{name}}_is_converted_to_json() {{/isLong}} {{#isFloat}} - bourne::json input = + bourne::json input = { "{{name}}", 1.0 }; diff --git a/modules/openapi-generator/src/main/resources/cpp-tiny/unittest.mustache b/modules/openapi-generator/src/main/resources/cpp-tiny/unittest.mustache index c6a1f23a6e398bfc75e8e151b5d150c5e73803cb..6cb35dfc332c26f17ca404c951b6c40ad8ef9b16 100644 --- a/modules/openapi-generator/src/main/resources/cpp-tiny/unittest.mustache +++ b/modules/openapi-generator/src/main/resources/cpp-tiny/unittest.mustache @@ -4,7 +4,7 @@ #include <unity.h> #include "bourne/json.hpp" -void setUp(){ +void setUp(){ } @@ -12,7 +12,7 @@ void tearDown(){ } void test_id_is_assigned(){ - bourne::json petJSON = + bourne::json petJSON = { "id", 1 }; @@ -24,19 +24,19 @@ void test_id_is_assigned(){ } void test_name_is_assigned(){ - bourne::json petJSON = + bourne::json petJSON = { "name", "Shiba" }; Tiny::Pet pet(petJSON.dump()); - + TEST_ASSERT_EQUAL_STRING("Shiba", pet.getName().c_str()); } void test_status_is_assigned(){ - bourne::json petJSON = + bourne::json petJSON = { "status", "Sold" }; @@ -48,13 +48,13 @@ void test_status_is_assigned(){ void test_category_object_is_assigned(){ - bourne::json catJSON = + bourne::json catJSON = { "id", 3, "name", "Small dog" }; - bourne::json petJSON = + bourne::json petJSON = { "category", catJSON, }; @@ -73,7 +73,7 @@ void test_photo_string_list_is_assigned(){ bourne::json photoARR = bourne::json::array("url1", "url2", "url3", "url4"); - bourne::json petJSON = + bourne::json petJSON = { "photoUrls", photoARR, }; @@ -84,14 +84,14 @@ void test_photo_string_list_is_assigned(){ } void test_tags_object_list_is_assigned(){ - bourne::json aTag = + bourne::json aTag = { "id", 2, "name", "Hello" }; bourne::json tagsARR = bourne::json::array(aTag); - bourne::json petJSON = + bourne::json petJSON = { "tags", tagsARR, }; @@ -126,7 +126,5 @@ void setup() { } void loop() { - -} - +} diff --git a/modules/openapi-generator/src/main/resources/cpp-tizen-client/Doxyfile.mustache b/modules/openapi-generator/src/main/resources/cpp-tizen-client/Doxyfile.mustache index a1bae5840c68b2bd4fa5910a5630da5ec527d76c..e4fc0125bf003d3b97c0780b0438a230b9e8e9c6 100644 --- a/modules/openapi-generator/src/main/resources/cpp-tizen-client/Doxyfile.mustache +++ b/modules/openapi-generator/src/main/resources/cpp-tizen-client/Doxyfile.mustache @@ -154,7 +154,7 @@ FULL_PATH_NAMES = NO # will be relative from the directory where doxygen is started. # This tag requires that the tag FULL_PATH_NAMES is set to YES. -STRIP_FROM_PATH = +STRIP_FROM_PATH = # The STRIP_FROM_INC_PATH tag can be used to strip a user-defined part of the # path mentioned in the documentation of a class, which tells the reader which @@ -163,7 +163,7 @@ STRIP_FROM_PATH = # specify the list of include paths that are normally passed to the compiler # using the -I flag. -STRIP_FROM_INC_PATH = +STRIP_FROM_INC_PATH = # If the SHORT_NAMES tag is set to YES, doxygen will generate much shorter (but # less readable) file names. This can be useful is your file systems doesn't @@ -230,13 +230,13 @@ TAB_SIZE = 4 # "Side Effects:". You can put \n's in the value part of an alias to insert # newlines. -ALIASES = +ALIASES = # This tag can be used to specify a number of word-keyword mappings (TCL only). # A mapping has the form "name=value". For example adding "class=itcl::class" # will allow you to use the command class in the itcl::class meaning. -TCL_SUBST = +TCL_SUBST = # Set the OPTIMIZE_OUTPUT_FOR_C tag to YES if your project consists of C sources # only. Doxygen will then generate output that is more tailored for C. For @@ -280,7 +280,7 @@ OPTIMIZE_OUTPUT_VHDL = NO # Note that for custom extensions you also need to set FILE_PATTERNS otherwise # the files are not read by doxygen. -EXTENSION_MAPPING = +EXTENSION_MAPPING = # If the MARKDOWN_SUPPORT tag is enabled then doxygen pre-processes all comments # according to the Markdown format, which allows for more readable @@ -616,7 +616,7 @@ GENERATE_DEPRECATEDLIST= YES # sections, marked by \if <section_label> ... \endif and \cond <section_label> # ... \endcond blocks. -ENABLED_SECTIONS = +ENABLED_SECTIONS = # The MAX_INITIALIZER_LINES tag determines the maximum number of lines that the # initial value of a variable or macro / define can have for it to appear in the @@ -658,7 +658,7 @@ SHOW_NAMESPACES = YES # by doxygen. Whatever the program writes to standard output is used as the file # version. For an example see the documentation. -FILE_VERSION_FILTER = +FILE_VERSION_FILTER = # The LAYOUT_FILE tag can be used to specify a layout file which will be parsed # by doxygen. The layout file controls the global structure of the generated @@ -671,7 +671,7 @@ FILE_VERSION_FILTER = # DoxygenLayout.xml, doxygen will parse it automatically even if the LAYOUT_FILE # tag is left empty. -LAYOUT_FILE = +LAYOUT_FILE = # The CITE_BIB_FILES tag can be used to specify one or more bib files containing # the reference definitions. This must be a list of .bib files. The .bib @@ -682,7 +682,7 @@ LAYOUT_FILE = # search path. Do not use file names with spaces, bibtex cannot handle them. See # also \cite for info how to create references. -CITE_BIB_FILES = +CITE_BIB_FILES = #--------------------------------------------------------------------------- # Configuration options related to warning and progress messages @@ -741,7 +741,7 @@ WARN_FORMAT = "$file:$line: $text" # messages should be written. If left blank the output is written to standard # error (stderr). -WARN_LOGFILE = +WARN_LOGFILE = #--------------------------------------------------------------------------- # Configuration options related to the input files @@ -788,7 +788,7 @@ RECURSIVE = NO # Note that relative paths are relative to the directory from which doxygen is # run. -EXCLUDE = +EXCLUDE = # The EXCLUDE_SYMLINKS tag can be used to select whether or not files or # directories that are symbolic links (a Unix file system feature) are excluded @@ -804,7 +804,7 @@ EXCLUDE_SYMLINKS = NO # Note that the wildcards are matched against the file with absolute path, so to # exclude all test directories for example use the pattern */test/* -EXCLUDE_PATTERNS = +EXCLUDE_PATTERNS = # The EXCLUDE_SYMBOLS tag can be used to specify one or more symbol names # (namespaces, classes, functions, etc.) that should be excluded from the @@ -815,13 +815,13 @@ EXCLUDE_PATTERNS = # Note that the wildcards are matched against the file with absolute path, so to # exclude all test directories use the pattern */test/* -EXCLUDE_SYMBOLS = +EXCLUDE_SYMBOLS = # The EXAMPLE_PATH tag can be used to specify one or more files or directories # that contain example code fragments that are included (see the \include # command). -EXAMPLE_PATH = +EXAMPLE_PATH = # If the value of the EXAMPLE_PATH tag contains directories, you can use the # EXAMPLE_PATTERNS tag to specify one or more wildcard pattern (like *.cpp and @@ -841,7 +841,7 @@ EXAMPLE_RECURSIVE = NO # that contain images that are to be included in the documentation (see the # \image command). -IMAGE_PATH = +IMAGE_PATH = # The INPUT_FILTER tag can be used to specify a program that doxygen should # invoke to filter for each input file. Doxygen will invoke the filter program @@ -858,7 +858,7 @@ IMAGE_PATH = # code is scanned, but not when the output code is generated. If lines are added # or removed, the anchors will not be placed correctly. -INPUT_FILTER = +INPUT_FILTER = # The FILTER_PATTERNS tag can be used to specify filters on a per file pattern # basis. Doxygen will compare the file name with each pattern and apply the @@ -867,7 +867,7 @@ INPUT_FILTER = # filters are used. If the FILTER_PATTERNS tag is empty or if none of the # patterns match the file name, INPUT_FILTER is applied. -FILTER_PATTERNS = +FILTER_PATTERNS = # If the FILTER_SOURCE_FILES tag is set to YES, the input filter (if set using # INPUT_FILTER ) will also be used to filter the input files that are used for @@ -882,14 +882,14 @@ FILTER_SOURCE_FILES = NO # *.ext= (so without naming a filter). # This tag requires that the tag FILTER_SOURCE_FILES is set to YES. -FILTER_SOURCE_PATTERNS = +FILTER_SOURCE_PATTERNS = # If the USE_MDFILE_AS_MAINPAGE tag refers to the name of a markdown file that # is part of the input, its contents will be placed on the main page # (index.html). This can be useful if you have a project on for instance GitHub # and want to reuse the introduction page also for the doxygen output. -USE_MDFILE_AS_MAINPAGE = +USE_MDFILE_AS_MAINPAGE = #--------------------------------------------------------------------------- # Configuration options related to source browsing @@ -1001,7 +1001,7 @@ COLS_IN_ALPHA_INDEX = 5 # while generating the index headers. # This tag requires that the tag ALPHABETICAL_INDEX is set to YES. -IGNORE_PREFIX = +IGNORE_PREFIX = #--------------------------------------------------------------------------- # Configuration options related to the HTML output @@ -1045,7 +1045,7 @@ HTML_FILE_EXTENSION = .html # of the possible markers and block names see the documentation. # This tag requires that the tag GENERATE_HTML is set to YES. -HTML_HEADER = +HTML_HEADER = # The HTML_FOOTER tag can be used to specify a user-defined HTML footer for each # generated HTML page. If the tag is left blank doxygen will generate a standard @@ -1055,7 +1055,7 @@ HTML_HEADER = # that doxygen normally uses. # This tag requires that the tag GENERATE_HTML is set to YES. -HTML_FOOTER = +HTML_FOOTER = # The HTML_STYLESHEET tag can be used to specify a user-defined cascading style # sheet that is used by each HTML page. It can be used to fine-tune the look of @@ -1067,7 +1067,7 @@ HTML_FOOTER = # obsolete. # This tag requires that the tag GENERATE_HTML is set to YES. -HTML_STYLESHEET = +HTML_STYLESHEET = # The HTML_EXTRA_STYLESHEET tag can be used to specify an additional user- # defined cascading style sheet that is included after the standard style sheets @@ -1078,7 +1078,7 @@ HTML_STYLESHEET = # see the documentation. # This tag requires that the tag GENERATE_HTML is set to YES. -HTML_EXTRA_STYLESHEET = +HTML_EXTRA_STYLESHEET = # The HTML_EXTRA_FILES tag can be used to specify one or more extra images or # other source files which should be copied to the HTML output directory. Note @@ -1088,7 +1088,7 @@ HTML_EXTRA_STYLESHEET = # files will be copied as-is; there are no commands or markers available. # This tag requires that the tag GENERATE_HTML is set to YES. -HTML_EXTRA_FILES = +HTML_EXTRA_FILES = # The HTML_COLORSTYLE_HUE tag controls the color of the HTML output. Doxygen # will adjust the colors in the stylesheet and background images according to @@ -1216,7 +1216,7 @@ GENERATE_HTMLHELP = NO # written to the html output directory. # This tag requires that the tag GENERATE_HTMLHELP is set to YES. -CHM_FILE = +CHM_FILE = # The HHC_LOCATION tag can be used to specify the location (absolute path # including file name) of the HTML help compiler ( hhc.exe). If non-empty @@ -1224,7 +1224,7 @@ CHM_FILE = # The file has to be specified with full path. # This tag requires that the tag GENERATE_HTMLHELP is set to YES. -HHC_LOCATION = +HHC_LOCATION = # The GENERATE_CHI flag controls if a separate .chi index file is generated ( # YES) or that it should be included in the master .chm file ( NO). @@ -1237,7 +1237,7 @@ GENERATE_CHI = NO # and project file content. # This tag requires that the tag GENERATE_HTMLHELP is set to YES. -CHM_INDEX_ENCODING = +CHM_INDEX_ENCODING = # The BINARY_TOC flag controls whether a binary table of contents is generated ( # YES) or a normal table of contents ( NO) in the .chm file. @@ -1267,7 +1267,7 @@ GENERATE_QHP = NO # the HTML output folder. # This tag requires that the tag GENERATE_QHP is set to YES. -QCH_FILE = +QCH_FILE = # The QHP_NAMESPACE tag specifies the namespace to use when generating Qt Help # Project output. For more information please see Qt Help Project / Namespace @@ -1292,7 +1292,7 @@ QHP_VIRTUAL_FOLDER = doc # filters). # This tag requires that the tag GENERATE_QHP is set to YES. -QHP_CUST_FILTER_NAME = +QHP_CUST_FILTER_NAME = # The QHP_CUST_FILTER_ATTRS tag specifies the list of the attributes of the # custom filter to add. For more information please see Qt Help Project / Custom @@ -1300,21 +1300,21 @@ QHP_CUST_FILTER_NAME = # filters). # This tag requires that the tag GENERATE_QHP is set to YES. -QHP_CUST_FILTER_ATTRS = +QHP_CUST_FILTER_ATTRS = # The QHP_SECT_FILTER_ATTRS tag specifies the list of the attributes this # project's filter section matches. Qt Help Project / Filter Attributes (see: # http://qt-project.org/doc/qt-4.8/qthelpproject.html#filter-attributes). # This tag requires that the tag GENERATE_QHP is set to YES. -QHP_SECT_FILTER_ATTRS = +QHP_SECT_FILTER_ATTRS = # The QHG_LOCATION tag can be used to specify the location of Qt's # qhelpgenerator. If non-empty doxygen will try to run qhelpgenerator on the # generated .qhp file. # This tag requires that the tag GENERATE_QHP is set to YES. -QHG_LOCATION = +QHG_LOCATION = # If the GENERATE_ECLIPSEHELP tag is set to YES, additional index files will be # generated, together with the HTML files, they form an Eclipse help plugin. To @@ -1447,7 +1447,7 @@ MATHJAX_RELPATH = http://cdn.mathjax.org/mathjax/latest # MATHJAX_EXTENSIONS = TeX/AMSmath TeX/AMSsymbols # This tag requires that the tag USE_MATHJAX is set to YES. -MATHJAX_EXTENSIONS = +MATHJAX_EXTENSIONS = # The MATHJAX_CODEFILE tag can be used to specify a file with javascript pieces # of code that will be used on startup of the MathJax code. See the MathJax site @@ -1455,7 +1455,7 @@ MATHJAX_EXTENSIONS = # example see the documentation. # This tag requires that the tag USE_MATHJAX is set to YES. -MATHJAX_CODEFILE = +MATHJAX_CODEFILE = # When the SEARCHENGINE tag is enabled doxygen will generate a search box for # the HTML output. The underlying search engine uses javascript and DHTML and @@ -1515,7 +1515,7 @@ EXTERNAL_SEARCH = NO # Searching" for details. # This tag requires that the tag SEARCHENGINE is set to YES. -SEARCHENGINE_URL = +SEARCHENGINE_URL = # When SERVER_BASED_SEARCH and EXTERNAL_SEARCH are both enabled the unindexed # search data is written to a file for indexing by an external tool. With the @@ -1531,7 +1531,7 @@ SEARCHDATA_FILE = searchdata.xml # projects and redirect the results back to the right project. # This tag requires that the tag SEARCHENGINE is set to YES. -EXTERNAL_SEARCH_ID = +EXTERNAL_SEARCH_ID = # The EXTRA_SEARCH_MAPPINGS tag can be used to enable searching through doxygen # projects other than the one defined by this configuration file, but that are @@ -1541,7 +1541,7 @@ EXTERNAL_SEARCH_ID = # EXTRA_SEARCH_MAPPINGS = tagname1=loc1 tagname2=loc2 ... # This tag requires that the tag SEARCHENGINE is set to YES. -EXTRA_SEARCH_MAPPINGS = +EXTRA_SEARCH_MAPPINGS = #--------------------------------------------------------------------------- # Configuration options related to the LaTeX output @@ -1602,7 +1602,7 @@ PAPER_TYPE = a4 # If left blank no extra packages will be included. # This tag requires that the tag GENERATE_LATEX is set to YES. -EXTRA_PACKAGES = +EXTRA_PACKAGES = # The LATEX_HEADER tag can be used to specify a personal LaTeX header for the # generated LaTeX document. The header should contain everything until the first @@ -1618,7 +1618,7 @@ EXTRA_PACKAGES = # PROJECT_NAME), or the project number (see PROJECT_NUMBER). # This tag requires that the tag GENERATE_LATEX is set to YES. -LATEX_HEADER = +LATEX_HEADER = # The LATEX_FOOTER tag can be used to specify a personal LaTeX footer for the # generated LaTeX document. The footer should contain everything after the last @@ -1627,7 +1627,7 @@ LATEX_HEADER = # Note: Only use a user-defined footer if you know what you are doing! # This tag requires that the tag GENERATE_LATEX is set to YES. -LATEX_FOOTER = +LATEX_FOOTER = # The LATEX_EXTRA_FILES tag can be used to specify one or more extra images or # other source files which should be copied to the LATEX_OUTPUT output @@ -1635,7 +1635,7 @@ LATEX_FOOTER = # markers available. # This tag requires that the tag GENERATE_LATEX is set to YES. -LATEX_EXTRA_FILES = +LATEX_EXTRA_FILES = # If the PDF_HYPERLINKS tag is set to YES, the LaTeX that is generated is # prepared for conversion to PDF (using ps2pdf or pdflatex). The PDF file will @@ -1735,14 +1735,14 @@ RTF_HYPERLINKS = NO # default style sheet that doxygen normally uses. # This tag requires that the tag GENERATE_RTF is set to YES. -RTF_STYLESHEET_FILE = +RTF_STYLESHEET_FILE = # Set optional variables used in the generation of an RTF document. Syntax is # similar to doxygen's config file. A template extensions file can be generated # using doxygen -e rtf extensionFile. # This tag requires that the tag GENERATE_RTF is set to YES. -RTF_EXTENSIONS_FILE = +RTF_EXTENSIONS_FILE = #--------------------------------------------------------------------------- # Configuration options related to the man page output @@ -1803,13 +1803,13 @@ XML_OUTPUT = xml # validating XML parser to check the syntax of the XML files. # This tag requires that the tag GENERATE_XML is set to YES. -XML_SCHEMA = +XML_SCHEMA = # The XML_DTD tag can be used to specify a XML DTD, which can be used by a # validating XML parser to check the syntax of the XML files. # This tag requires that the tag GENERATE_XML is set to YES. -XML_DTD = +XML_DTD = # If the XML_PROGRAMLISTING tag is set to YES doxygen will dump the program # listings (including syntax highlighting and cross-referencing information) to @@ -1886,7 +1886,7 @@ PERLMOD_PRETTY = YES # overwrite each other's variables. # This tag requires that the tag GENERATE_PERLMOD is set to YES. -PERLMOD_MAKEVAR_PREFIX = +PERLMOD_MAKEVAR_PREFIX = #--------------------------------------------------------------------------- # Configuration options related to the preprocessor @@ -1927,7 +1927,7 @@ SEARCH_INCLUDES = YES # preprocessor. # This tag requires that the tag SEARCH_INCLUDES is set to YES. -INCLUDE_PATH = +INCLUDE_PATH = # You can use the INCLUDE_FILE_PATTERNS tag to specify one or more wildcard # patterns (like *.h and *.hpp) to filter out the header-files in the @@ -1935,7 +1935,7 @@ INCLUDE_PATH = # used. # This tag requires that the tag ENABLE_PREPROCESSING is set to YES. -INCLUDE_FILE_PATTERNS = +INCLUDE_FILE_PATTERNS = # The PREDEFINED tag can be used to specify one or more macro names that are # defined before the preprocessor is started (similar to the -D option of e.g. @@ -1945,7 +1945,7 @@ INCLUDE_FILE_PATTERNS = # recursively expanded use the := operator instead of the = operator. # This tag requires that the tag ENABLE_PREPROCESSING is set to YES. -PREDEFINED = +PREDEFINED = # If the MACRO_EXPANSION and EXPAND_ONLY_PREDEF tags are set to YES then this # tag can be used to specify a list of macro names that should be expanded. The @@ -1954,7 +1954,7 @@ PREDEFINED = # definition found in the source code. # This tag requires that the tag ENABLE_PREPROCESSING is set to YES. -EXPAND_AS_DEFINED = +EXPAND_AS_DEFINED = # If the SKIP_FUNCTION_MACROS tag is set to YES then doxygen's preprocessor will # remove all references to function-like macros that are alone on a line, have an @@ -1983,13 +1983,13 @@ SKIP_FUNCTION_MACROS = YES # the path). If a tag file is not located in the directory in which doxygen is # run, you must also specify the path to the tagfile here. -TAGFILES = +TAGFILES = # When a file name is specified after GENERATE_TAGFILE, doxygen will create a # tag file that is based on the input files it reads. See section "Linking to # external documentation" for more information about the usage of tag files. -GENERATE_TAGFILE = +GENERATE_TAGFILE = # If the ALLEXTERNALS tag is set to YES all external class will be listed in the # class index. If set to NO only the inherited external classes will be listed. @@ -2037,14 +2037,14 @@ CLASS_DIAGRAMS = YES # the mscgen tool resides. If left empty the tool is assumed to be found in the # default search path. -MSCGEN_PATH = +MSCGEN_PATH = # You can include diagrams made with dia in doxygen documentation. Doxygen will # then run dia to produce the diagram and insert it in the documentation. The # DIA_PATH tag allows you to specify the directory where the dia binary resides. # If left empty dia is assumed to be found in the default search path. -DIA_PATH = +DIA_PATH = # If set to YES, the inheritance and collaboration graphs will hide inheritance # and usage relations if the target is undocumented or is not a class. @@ -2093,7 +2093,7 @@ DOT_FONTSIZE = 10 # the path where dot can find it using this tag. # This tag requires that the tag HAVE_DOT is set to YES. -DOT_FONTPATH = +DOT_FONTPATH = # If the CLASS_GRAPH tag is set to YES then doxygen will generate a graph for # each documented class showing the direct and indirect inheritance relations. @@ -2231,26 +2231,26 @@ INTERACTIVE_SVG = NO # found. If left blank, it is assumed the dot tool can be found in the path. # This tag requires that the tag HAVE_DOT is set to YES. -DOT_PATH = +DOT_PATH = # The DOTFILE_DIRS tag can be used to specify one or more directories that # contain dot files that are included in the documentation (see the \dotfile # command). # This tag requires that the tag HAVE_DOT is set to YES. -DOTFILE_DIRS = +DOTFILE_DIRS = # The MSCFILE_DIRS tag can be used to specify one or more directories that # contain msc files that are included in the documentation (see the \mscfile # command). -MSCFILE_DIRS = +MSCFILE_DIRS = # The DIAFILE_DIRS tag can be used to specify one or more directories that # contain dia files that are included in the documentation (see the \diafile # command). -DIAFILE_DIRS = +DIAFILE_DIRS = # The DOT_GRAPH_MAX_NODES tag can be used to set the maximum number of nodes # that will be shown in the graph. If the number of nodes in a graph becomes diff --git a/modules/openapi-generator/src/main/resources/cpp-ue4/api-header.mustache b/modules/openapi-generator/src/main/resources/cpp-ue4/api-header.mustache index b6059901809dfbe15e988e23b1de08b726db7b42..4f2bec0027a1c82389938e0a8eb33697922ab0f6 100644 --- a/modules/openapi-generator/src/main/resources/cpp-ue4/api-header.mustache +++ b/modules/openapi-generator/src/main/resources/cpp-ue4/api-header.mustache @@ -5,7 +5,7 @@ #include "{{modelNamePrefix}}BaseModel.h" {{#cppNamespaceDeclarations}} -namespace {{this}} +namespace {{this}} { {{/cppNamespaceDeclarations}} @@ -15,16 +15,16 @@ public: {{classname}}(); ~{{classname}}(); - /* Sets the URL Endpoint. + /* Sets the URL Endpoint. * Note: several fallback endpoints can be configured in request retry policies, see Request::SetShouldRetry */ void SetURL(const FString& Url); /* Adds global header params to all requests */ void AddHeaderParam(const FString& Key, const FString& Value); void ClearHeaderParams(); - + /* Sets the retry manager to the user-defined retry manager. User must manage the lifetime of the retry manager. - * If no retry manager is specified and a request needs retries, a default retry manager will be used. + * If no retry manager is specified and a request needs retries, a default retry manager will be used. * See also: Request::SetShouldRetry */ void SetHttpRetryManager(FHttpRetrySystem::FManager& RetryManager); FHttpRetrySystem::FManager& GetHttpRetryManager(); @@ -34,7 +34,7 @@ public: {{/operation}}{{/operations}} {{#operations}}{{#operation}}DECLARE_DELEGATE_OneParam(F{{operationIdCamelCase}}Delegate, const {{operationIdCamelCase}}Response&); {{/operation}}{{/operations}} - {{#operations}}{{#operation}}{{#description}}/* {{{description}}} */ + {{#operations}}{{#operation}}{{#description}}/* {{{.}}} */ {{/description}}FHttpRequestPtr {{operationIdCamelCase}}(const {{operationIdCamelCase}}Request& Request, const F{{operationIdCamelCase}}Delegate& Delegate = F{{operationIdCamelCase}}Delegate()) const; {{/operation}}{{/operations}} private: @@ -49,7 +49,7 @@ private: mutable FHttpRetrySystem::FManager* RetryManager = nullptr; mutable TUniquePtr<HttpRetryManager> DefaultRetryManager; }; - + {{#cppNamespaceDeclarations}} } {{/cppNamespaceDeclarations}} diff --git a/modules/openapi-generator/src/main/resources/cpp-ue4/api-operations-header.mustache b/modules/openapi-generator/src/main/resources/cpp-ue4/api-operations-header.mustache index f4810ba58888cfc944e69d11d19bf309d23f35a1..99b57ea20ae6d3cb9a725923410400f88482eb0f 100644 --- a/modules/openapi-generator/src/main/resources/cpp-ue4/api-operations-header.mustache +++ b/modules/openapi-generator/src/main/resources/cpp-ue4/api-operations-header.mustache @@ -8,7 +8,7 @@ {{/imports}} {{#cppNamespaceDeclarations}} -namespace {{this}} +namespace {{this}} { {{/cppNamespaceDeclarations}} @@ -16,7 +16,7 @@ namespace {{this}} {{#operation}} /* {{summary}} {{#notes}} * - * {{notes}}{{/notes}} + * {{.}}{{/notes}} */ class {{dllapi}} {{classname}}::{{operationIdCamelCase}}Request : public Request { @@ -24,7 +24,7 @@ public: virtual ~{{operationIdCamelCase}}Request() {} void SetupHttpRequest(const FHttpRequestRef& HttpRequest) const final; FString ComputePath() const final; - + {{#allParams}} {{#isEnum}} {{#allowableValues}} @@ -38,12 +38,12 @@ public: static FString EnumToString(const {{{enumName}}}& EnumValue); static bool EnumFromString(const FString& EnumAsString, {{{enumName}}}& EnumValue); - {{#description}}/* {{{description}}} */ - {{/description}}{{^required}}TOptional<{{/required}}{{{datatypeWithEnum}}}{{^required}}>{{/required}} {{paramName}}{{#required}}{{#defaultValue}} = {{{defaultValue}}}{{/defaultValue}}{{/required}}; + {{#description}}/* {{{.}}} */ + {{/description}}{{^required}}TOptional<{{/required}}{{{datatypeWithEnum}}}{{^required}}>{{/required}} {{paramName}}{{#required}}{{#defaultValue}} = {{{.}}}{{/defaultValue}}{{/required}}; {{/isEnum}} {{^isEnum}} - {{#description}}/* {{{description}}} */ - {{/description}}{{^required}}TOptional<{{/required}}{{{dataType}}}{{^required}}>{{/required}} {{paramName}}{{#required}}{{#defaultValue}} = {{{defaultValue}}}{{/defaultValue}}{{/required}}; + {{#description}}/* {{{.}}} */ + {{/description}}{{^required}}TOptional<{{/required}}{{{dataType}}}{{^required}}>{{/required}} {{paramName}}{{#required}}{{#defaultValue}} = {{{.}}}{{/defaultValue}}{{/required}}; {{/isEnum}} {{/allParams}} }; @@ -56,8 +56,8 @@ public: void SetHttpResponseCode(EHttpResponseCodes::Type InHttpResponseCode) final; {{/responses.0}} bool FromJson(const TSharedPtr<FJsonValue>& JsonValue) final; - - {{#returnType}}{{{returnType}}} Content;{{/returnType}} + + {{#returnType}}{{{.}}} Content;{{/returnType}} }; {{/operation}} diff --git a/modules/openapi-generator/src/main/resources/cpp-ue4/api-operations-source.mustache b/modules/openapi-generator/src/main/resources/cpp-ue4/api-operations-source.mustache index 4d262483e1f3edcfd4d591e8d328bc231abcb9c7..30ed25d2658f2b66f9cc87f82b74994691ee561a 100644 --- a/modules/openapi-generator/src/main/resources/cpp-ue4/api-operations-source.mustache +++ b/modules/openapi-generator/src/main/resources/cpp-ue4/api-operations-source.mustache @@ -10,7 +10,7 @@ #include "PlatformHttp.h" {{#cppNamespaceDeclarations}} -namespace {{this}} +namespace {{this}} { {{/cppNamespaceDeclarations}} {{#operations}}{{#operation}} @@ -28,7 +28,7 @@ inline FString ToString(const {{classname}}::{{operationIdCamelCase}}Request::{{ } {{/allowableValues}} - UE_LOG(Log{{unrealModuleName}}, Error, TEXT("Invalid {{classname}}::{{operationIdCamelCase}}Request::{{{enumName}}} Value (%d)"), (int)Value); + UE_LOG(Log{{unrealModuleName}}, Error, TEXT("Invalid {{classname}}::{{operationIdCamelCase}}Request::{{{enumName}}} Value (%d)"), (int)Value); return TEXT(""); } @@ -46,7 +46,7 @@ inline bool FromString(const FString& EnumAsString, {{classname}}::{{operationId if(Found) Value = *Found; - return Found != nullptr; + return Found != nullptr; } bool {{classname}}::{{operationIdCamelCase}}Request::EnumFromString(const FString& EnumAsString, {{classname}}::{{operationIdCamelCase}}Request::{{{enumName}}}& EnumValue) @@ -89,9 +89,9 @@ FString {{classname}}::{{operationIdCamelCase}}Request::ComputePath() const { TEXT("{{baseName}}"), ToStringFormatArg({{paramName}}) }{{^-last}},{{/-last}}{{/pathParams}} }; FString Path = FString::Format(TEXT("{{{path}}}"), PathParams); - + {{/pathParams.0}} - {{#queryParams.0}} + {{#queryParams.0}} TArray<FString> QueryParams; {{#queryParams}} {{#required}} @@ -143,7 +143,7 @@ void {{classname}}::{{operationIdCamelCase}}Request::SetupHttpRequest(const FHtt HttpRequest->SetHeader(TEXT("{{baseName}}"), {{paramName}}.GetValue()); } {{/required}} - {{/headerParams}} + {{/headerParams}} {{/headerParams.0}} // Default to Json Body request @@ -178,7 +178,7 @@ void {{classname}}::{{operationIdCamelCase}}Request::SetupHttpRequest(const FHtt } else if (Consumes.Contains(TEXT("multipart/form-data"))) { - {{#formParams.0}} + {{#formParams.0}} HttpMultipartFormData FormData; {{#formParams}} {{#isContainer}} @@ -227,7 +227,7 @@ void {{classname}}::{{operationIdCamelCase}}Request::SetupHttpRequest(const FHtt } else if (Consumes.Contains(TEXT("application/x-www-form-urlencoded"))) { - {{#formParams.0}} + {{#formParams.0}} TArray<FString> FormParams; {{#formParams}} {{#isContainer}} @@ -250,7 +250,7 @@ void {{classname}}::{{operationIdCamelCase}}Request::SetupHttpRequest(const FHtt {{/isContainer}} {{/isFile}} {{/formParams}} - + HttpRequest->SetHeader(TEXT("Content-Type"), TEXT("application/x-www-form-urlencoded; charset=utf-8")); HttpRequest->SetContentAsString(FString::Join(FormParams, TEXT("&"))); {{/formParams.0}} diff --git a/modules/openapi-generator/src/main/resources/cpp-ue4/api-source.mustache b/modules/openapi-generator/src/main/resources/cpp-ue4/api-source.mustache index 2ab5b0db9cda3a41f3fc74e661249892bc32981c..d2821b2daaa2effeaf8ba2a33aa032a3ca2316e5 100644 --- a/modules/openapi-generator/src/main/resources/cpp-ue4/api-source.mustache +++ b/modules/openapi-generator/src/main/resources/cpp-ue4/api-source.mustache @@ -8,11 +8,11 @@ #include "Serialization/JsonSerializer.h" {{#cppNamespaceDeclarations}} -namespace {{this}} +namespace {{this}} { {{/cppNamespaceDeclarations}} -{{classname}}::{{classname}}() +{{classname}}::{{classname}}() : Url(TEXT("{{basePath}}")) { } @@ -139,7 +139,7 @@ FHttpRequestPtr {{classname}}::{{operationIdCamelCase}}(const {{operationIdCamel } Request.SetupHttpRequest(HttpRequest); - + HttpRequest->OnProcessRequestComplete().BindRaw(this, &{{classname}}::On{{operationIdCamelCase}}Response, Delegate); HttpRequest->ProcessRequest(); return HttpRequest; diff --git a/modules/openapi-generator/src/main/resources/cpp-ue4/helpers-header.mustache b/modules/openapi-generator/src/main/resources/cpp-ue4/helpers-header.mustache index cdbf87653d6363117bcd384c23957e23008aa559..c584eadee58111348e9a6f128c61d6dda3039e9c 100644 --- a/modules/openapi-generator/src/main/resources/cpp-ue4/helpers-header.mustache +++ b/modules/openapi-generator/src/main/resources/cpp-ue4/helpers-header.mustache @@ -11,7 +11,7 @@ class IHttpRequest; {{#cppNamespaceDeclarations}} -namespace {{this}} +namespace {{this}} { {{/cppNamespaceDeclarations}} diff --git a/modules/openapi-generator/src/main/resources/cpp-ue4/helpers-source.mustache b/modules/openapi-generator/src/main/resources/cpp-ue4/helpers-source.mustache index b2dc14f3578ee7ba4a4876eadae8d508b427619a..6c7842d825a708e0efcce6f8e03ee8c578d4fa59 100644 --- a/modules/openapi-generator/src/main/resources/cpp-ue4/helpers-source.mustache +++ b/modules/openapi-generator/src/main/resources/cpp-ue4/helpers-source.mustache @@ -9,7 +9,7 @@ #include "Misc/Paths.h" {{#cppNamespaceDeclarations}} -namespace {{this}} +namespace {{this}} { {{/cppNamespaceDeclarations}} diff --git a/modules/openapi-generator/src/main/resources/cpp-ue4/licenseInfo.mustache b/modules/openapi-generator/src/main/resources/cpp-ue4/licenseInfo.mustache index 147bb985790b103d5689a4805d2a220dfa4eb7e9..b0182eea28a77a1513baf3ff98dccb09badb1f28 100644 --- a/modules/openapi-generator/src/main/resources/cpp-ue4/licenseInfo.mustache +++ b/modules/openapi-generator/src/main/resources/cpp-ue4/licenseInfo.mustache @@ -2,8 +2,8 @@ * {{{appName}}} * {{{appDescription}}} * - * {{#version}}OpenAPI spec version: {{{version}}}{{/version}} - * {{#infoEmail}}Contact: {{{infoEmail}}}{{/infoEmail}} + * {{#version}}OpenAPI spec version: {{{.}}}{{/version}} + * {{#infoEmail}}Contact: {{{.}}}{{/infoEmail}} * * NOTE: This class is auto generated by OpenAPI Generator * https://github.com/OpenAPITools/openapi-generator diff --git a/modules/openapi-generator/src/main/resources/cpp-ue4/model-base-header.mustache b/modules/openapi-generator/src/main/resources/cpp-ue4/model-base-header.mustache index 2f5b6255f54a59a7599b289db1abddc74973034c..7f083d7e26a803913feed8f4016f207ef642ab28 100644 --- a/modules/openapi-generator/src/main/resources/cpp-ue4/model-base-header.mustache +++ b/modules/openapi-generator/src/main/resources/cpp-ue4/model-base-header.mustache @@ -9,7 +9,7 @@ #include "Containers/Ticker.h" {{#cppNamespaceDeclarations}} -namespace {{this}} +namespace {{this}} { {{/cppNamespaceDeclarations}} @@ -41,7 +41,7 @@ struct {{dllapi}} HttpRetryParams }; class {{dllapi}} Model -{ +{ public: virtual ~Model() {} virtual void WriteJson(JsonWriter& Writer) const = 0; diff --git a/modules/openapi-generator/src/main/resources/cpp-ue4/model-base-source.mustache b/modules/openapi-generator/src/main/resources/cpp-ue4/model-base-source.mustache index 57dc4fb4151cd8b3eae0b1fb1359199f148fe350..1a551ca531526aa7024392e75690d3a4d6163e4e 100644 --- a/modules/openapi-generator/src/main/resources/cpp-ue4/model-base-source.mustache +++ b/modules/openapi-generator/src/main/resources/cpp-ue4/model-base-source.mustache @@ -2,7 +2,7 @@ #include "{{modelNamePrefix}}BaseModel.h" {{#cppNamespaceDeclarations}} -namespace {{this}} +namespace {{this}} { {{/cppNamespaceDeclarations}} @@ -12,10 +12,10 @@ bool HttpRetryManager::Tick(float DeltaTime) return true; } -HttpRetryParams::HttpRetryParams(const FRetryLimitCountSetting& InRetryLimitCountOverride /*= FRetryLimitCountSetting()*/, - const FRetryTimeoutRelativeSecondsSetting& InRetryTimeoutRelativeSecondsOverride /*= FRetryTimeoutRelativeSecondsSetting()*/, - const FRetryResponseCodes& InRetryResponseCodes /*= FRetryResponseCodes()*/, - const FRetryVerbs& InRetryVerbs /*= FRetryVerbs()*/, +HttpRetryParams::HttpRetryParams(const FRetryLimitCountSetting& InRetryLimitCountOverride /*= FRetryLimitCountSetting()*/, + const FRetryTimeoutRelativeSecondsSetting& InRetryTimeoutRelativeSecondsOverride /*= FRetryTimeoutRelativeSecondsSetting()*/, + const FRetryResponseCodes& InRetryResponseCodes /*= FRetryResponseCodes()*/, + const FRetryVerbs& InRetryVerbs /*= FRetryVerbs()*/, const FRetryDomainsPtr& InRetryDomains /*= FRetryDomainsPtr() */) : RetryLimitCountOverride(InRetryLimitCountOverride) , RetryTimeoutRelativeSecondsOverride(InRetryTimeoutRelativeSecondsOverride) diff --git a/modules/openapi-generator/src/main/resources/cpp-ue4/model-header.mustache b/modules/openapi-generator/src/main/resources/cpp-ue4/model-header.mustache index 8742ad7a85f5c2e9d6ac800130c2ad6ecf1256ba..ee709e587e3cf1024836a6d14ee1fb33dd5b0d76 100644 --- a/modules/openapi-generator/src/main/resources/cpp-ue4/model-header.mustache +++ b/modules/openapi-generator/src/main/resources/cpp-ue4/model-header.mustache @@ -6,7 +6,7 @@ {{/imports}} {{#cppNamespaceDeclarations}} -namespace {{this}} +namespace {{this}} { {{/cppNamespaceDeclarations}} {{#models}} @@ -34,14 +34,14 @@ public: {{/enumVars}} }; - Values Value{{#defaultValue}} = {{{defaultValue}}}{{/defaultValue}}; + Values Value{{#defaultValue}} = {{{.}}}{{/defaultValue}}; {{/allowableValues}} static FString EnumToString(const Values& EnumValue); static bool EnumFromString(const FString& EnumAsString, Values& EnumValue); {{/isEnum}} {{^isEnum}} - FString Value{{#defaultValue}} = {{{defaultValue}}}{{/defaultValue}}; + FString Value{{#defaultValue}} = {{{.}}}{{/defaultValue}}; {{/isEnum}} {{/isString}} {{#vars}} @@ -54,15 +54,15 @@ public: {{/enumVars}} }; {{/allowableValues}} - + static FString EnumToString(const {{{enumName}}}& EnumValue); static bool EnumFromString(const FString& EnumAsString, {{{enumName}}}& EnumValue); - {{#description}}/* {{{description}}} */ - {{/description}}{{^required}}TOptional<{{/required}}{{{datatypeWithEnum}}}{{^required}}>{{/required}} {{name}}{{#required}}{{#defaultValue}} = {{{defaultValue}}}{{/defaultValue}}{{/required}}; + {{#description}}/* {{{.}}} */ + {{/description}}{{^required}}TOptional<{{/required}}{{{datatypeWithEnum}}}{{^required}}>{{/required}} {{name}}{{#required}}{{#defaultValue}} = {{{.}}}{{/defaultValue}}{{/required}}; {{/isEnum}} {{^isEnum}} - {{#description}}/* {{{description}}} */ - {{/description}}{{^required}}TOptional<{{/required}}{{{datatype}}}{{^required}}>{{/required}} {{name}}{{#required}}{{#defaultValue}} = {{{defaultValue}}}{{/defaultValue}}{{/required}}; + {{#description}}/* {{{.}}} */ + {{/description}}{{^required}}TOptional<{{/required}}{{{datatype}}}{{^required}}>{{/required}} {{name}}{{#required}}{{#defaultValue}} = {{{.}}}{{/defaultValue}}{{/required}}; {{/isEnum}} {{/vars}} }; diff --git a/modules/openapi-generator/src/main/resources/cpp-ue4/model-source.mustache b/modules/openapi-generator/src/main/resources/cpp-ue4/model-source.mustache index 3022a7a935d7c8f97eb22c6fca6bd7c6fcd17d90..d75b9dfa0d9c50f34485b8f0e4fecb7c098a47d0 100644 --- a/modules/openapi-generator/src/main/resources/cpp-ue4/model-source.mustache +++ b/modules/openapi-generator/src/main/resources/cpp-ue4/model-source.mustache @@ -7,7 +7,7 @@ #include "Templates/SharedPointer.h" {{#cppNamespaceDeclarations}} -namespace {{this}} +namespace {{this}} { {{/cppNamespaceDeclarations}} {{#models}}{{#model}} @@ -24,7 +24,7 @@ inline FString ToString(const {{classname}}::Values& Value) } {{/allowableValues}} - UE_LOG(Log{{unrealModuleName}}, Error, TEXT("Invalid {{classname}}::Values Value (%d)"), (int)Value); + UE_LOG(Log{{unrealModuleName}}, Error, TEXT("Invalid {{classname}}::Values Value (%d)"), (int)Value); return TEXT(""); } @@ -89,7 +89,7 @@ inline FString ToString(const {{classname}}::{{{enumName}}}& Value) } {{/allowableValues}} - UE_LOG(Log{{unrealModuleName}}, Error, TEXT("Invalid {{classname}}::{{{enumName}}} Value (%d)"), (int)Value); + UE_LOG(Log{{unrealModuleName}}, Error, TEXT("Invalid {{classname}}::{{{enumName}}} Value (%d)"), (int)Value); return TEXT(""); } @@ -155,7 +155,7 @@ void {{classname}}::WriteJson(JsonWriter& Writer) const {{^required}} if ({{name}}.IsSet()) { - Writer->WriteIdentifierPrefix(TEXT("{{baseName}}")); WriteJsonValue(Writer, {{name}}.GetValue()); + Writer->WriteIdentifierPrefix(TEXT("{{baseName}}")); WriteJsonValue(Writer, {{name}}.GetValue()); } {{/required}} {{/vars}} diff --git a/modules/openapi-generator/src/main/resources/cpp-ue4/module-source.mustache b/modules/openapi-generator/src/main/resources/cpp-ue4/module-source.mustache index 676633ea0d9fd0d2d544ad0fa03fb55b25189605..e89bb28ed089a836504adb2d1d719ab8752cbeb1 100644 --- a/modules/openapi-generator/src/main/resources/cpp-ue4/module-source.mustache +++ b/modules/openapi-generator/src/main/resources/cpp-ue4/module-source.mustache @@ -11,4 +11,3 @@ void {{unrealModuleName}}Module::StartupModule() void {{unrealModuleName}}Module::ShutdownModule() { } - diff --git a/modules/openapi-generator/src/main/resources/crystal/README.mustache b/modules/openapi-generator/src/main/resources/crystal/README.mustache index 56a8bbf09d88499d77323581b52a7b8df8063948..5a385b6bb4561d98fa4463302f29e7459693c8ec 100644 --- a/modules/openapi-generator/src/main/resources/crystal/README.mustache +++ b/modules/openapi-generator/src/main/resources/crystal/README.mustache @@ -3,7 +3,7 @@ The Crystal module for the {{appName}} {{#appDescriptionWithNewLines}} -{{{appDescriptionWithNewLines}}} +{{{.}}} {{/appDescriptionWithNewLines}} This SDK is automatically generated by the [OpenAPI Generator](https://openapi-generator.tech) project: @@ -27,7 +27,7 @@ Add the following to shard.yaml ```yaml dependencies: {{{shardName}}}: - github: {{#gitUserId}}{{.}}{{/gitUserId}}{{^gitUserId}}YOUR_GIT_USERNAME{{/gitUserId}}/{{#gitRepoId}}{{.}}{{/gitRepoId}}{{^gitRepoId}}YOUR_GIT_REPO{{/gitRepoId}} + github: {{gitUserId}}{{^gitUserId}}YOUR_GIT_USERNAME{{/gitUserId}}/{{gitRepoId}}{{^gitRepoId}}YOUR_GIT_REPO{{/gitRepoId}} version: ~> {{shardVersion}} ``` diff --git a/modules/openapi-generator/src/main/resources/crystal/api.mustache b/modules/openapi-generator/src/main/resources/crystal/api.mustache index 787189be85442873389d84a590345bd5706a73ac..81af036027eeb48deb7ec01ed6fddc02272219c9 100644 --- a/modules/openapi-generator/src/main/resources/crystal/api.mustache +++ b/modules/openapi-generator/src/main/resources/crystal/api.mustache @@ -12,34 +12,34 @@ module {{moduleName}} end {{#operation}} {{#summary}} - # {{{summary}}} + # {{{.}}} {{/summary}} {{#notes}} - # {{{notes}}} + # {{{.}}} {{/notes}} {{#allParams}} {{#required}} # @param {{paramName}} [{{{dataType}}}{{^required}}?{{/required}}] {{description}} {{/required}} {{/allParams}} - # @return [{{#returnType}}{{{returnType}}}{{/returnType}}{{^returnType}}nil{{/returnType}}] + # @return [{{{returnType}}}{{^returnType}}nil{{/returnType}}] def {{operationId}}({{#allParams}}{{paramName}} : {{{dataType}}}{{^required}}?{{/required}}{{^-last}}, {{/-last}}{{/allParams}}) {{#returnType}}data, _status_code, _headers = {{/returnType}}{{operationId}}_with_http_info({{#allParams}}{{paramName}}{{^-last}}, {{/-last}}{{/allParams}}) {{#returnType}}data{{/returnType}}{{^returnType}}nil{{/returnType}} end {{#summary}} - # {{summary}} + # {{.}} {{/summary}} {{#notes}} - # {{notes}} + # {{.}} {{/notes}} {{#allParams}} {{#required}} # @param {{paramName}} [{{{dataType}}}{{^required}}?{{/required}}] {{description}} {{/required}} {{/allParams}} - # @return [Array<({{#returnType}}{{{returnType}}}{{/returnType}}{{^returnType}}nil{{/returnType}}, Integer, Hash)>] {{#returnType}}{{{returnType}}} data{{/returnType}}{{^returnType}}nil{{/returnType}}, response status code and response headers + # @return [Array<({{{returnType}}}{{^returnType}}nil{{/returnType}}, Integer, Hash)>] {{#returnType}}{{{.}}} data{{/returnType}}{{^returnType}}nil{{/returnType}}, response status code and response headers def {{operationId}}_with_http_info({{#allParams}}{{paramName}} : {{{dataType}}}{{^required}}?{{/required}}{{^-last}}, {{/-last}}{{/allParams}}) if @api_client.config.debugging Log.debug {"Calling API: {{classname}}.{{operationId}} ..."} diff --git a/modules/openapi-generator/src/main/resources/crystal/api_client.mustache b/modules/openapi-generator/src/main/resources/crystal/api_client.mustache index 9852faa90f9ccb728b0f282b855d7fa1dc4d9548..a22a0b196d9d5c8787655926f73b46d62801d90b 100644 --- a/modules/openapi-generator/src/main/resources/crystal/api_client.mustache +++ b/modules/openapi-generator/src/main/resources/crystal/api_client.mustache @@ -16,7 +16,7 @@ module {{moduleName}} # Initializes the ApiClient # @option config [Configuration] Configuration for initializing the object, default to Configuration.default def initialize(@config = Configuration.default) - @user_agent = "{{#httpUserAgent}}{{{.}}}{{/httpUserAgent}}{{^httpUserAgent}}OpenAPI-Generator/#{VERSION}/crystal{{/httpUserAgent}}" + @user_agent = "{{{httpUserAgent}}}{{^httpUserAgent}}OpenAPI-Generator/#{VERSION}/crystal{{/httpUserAgent}}" @default_headers = { "User-Agent" => @user_agent } diff --git a/modules/openapi-generator/src/main/resources/crystal/api_doc.mustache b/modules/openapi-generator/src/main/resources/crystal/api_doc.mustache index bdeeb56891220a442b15f1eb19b621e78db3160f..e02ac96a0bd7fd456f9de5109ab96f04e3d35109 100644 --- a/modules/openapi-generator/src/main/resources/crystal/api_doc.mustache +++ b/modules/openapi-generator/src/main/resources/crystal/api_doc.mustache @@ -1,6 +1,6 @@ # {{moduleName}}::{{classname}}{{#description}} -{{description}}{{/description}} +{{.}}{{/description}} All URIs are relative to *{{basePath}}* @@ -8,7 +8,7 @@ All URIs are relative to *{{basePath}}* | ------ | ------------ | ----------- | {{#operations}} {{#operation}} -| [**{{operationId}}**]({{classname}}.md#{{operationId}}) | **{{httpMethod}}** {{path}} | {{#summary}}{{summary}}{{/summary}} | +| [**{{operationId}}**]({{classname}}.md#{{operationId}}) | **{{httpMethod}}** {{path}} | {{summary}} | {{/operation}} {{/operations}} @@ -21,7 +21,7 @@ All URIs are relative to *{{basePath}}* {{{summary}}}{{#notes}} -{{{notes}}}{{/notes}} +{{{.}}}{{/notes}} ### Examples @@ -98,7 +98,7 @@ This endpoint does not need any parameter. | Name | Type | Description | Notes | | ---- | ---- | ----------- | ----- | {{/-first}} -| **{{paramName}}** | {{#isPrimitiveType}}**{{dataType}}**{{/isPrimitiveType}}{{^isPrimitiveType}}{{#isFile}}**{{dataType}}**{{/isFile}}{{^isFile}}[**{{dataType}}**]({{baseType}}.md){{/isFile}}{{/isPrimitiveType}} | {{description}} | {{^required}}[optional]{{/required}}{{#defaultValue}}[default to {{defaultValue}}]{{/defaultValue}} | +| **{{paramName}}** | {{#isPrimitiveType}}**{{dataType}}**{{/isPrimitiveType}}{{^isPrimitiveType}}{{#isFile}}**{{dataType}}**{{/isFile}}{{^isFile}}[**{{dataType}}**]({{baseType}}.md){{/isFile}}{{/isPrimitiveType}} | {{description}} | {{^required}}[optional]{{/required}}{{#defaultValue}}[default to {{.}}]{{/defaultValue}} | {{/allParams}} ### Return type diff --git a/modules/openapi-generator/src/main/resources/crystal/api_info.mustache b/modules/openapi-generator/src/main/resources/crystal/api_info.mustache index 1b3f9cb5ac4579884ed94c34f2fc34e9ce6df733..272f72624d5847fd111232120322e822964fa1a8 100644 --- a/modules/openapi-generator/src/main/resources/crystal/api_info.mustache +++ b/modules/openapi-generator/src/main/resources/crystal/api_info.mustache @@ -1,12 +1,12 @@ {{#appName}} -#{{{appName}}} +#{{{.}}} {{/appName}} {{#appDescription}} -#{{{appDescription}}} +#{{{.}}} {{/appDescription}} -{{#version}}The version of the OpenAPI document: {{version}}{{/version}} -{{#infoEmail}}Contact: {{{infoEmail}}}{{/infoEmail}} +{{#version}}The version of the OpenAPI document: {{.}}{{/version}} +{{#infoEmail}}Contact: {{{.}}}{{/infoEmail}} Generated by: https://openapi-generator.tech OpenAPI Generator version: {{{generatorVersion}}} diff --git a/modules/openapi-generator/src/main/resources/crystal/api_test.mustache b/modules/openapi-generator/src/main/resources/crystal/api_test.mustache index f4e0eb49e64894ad1fee25709d59863bf1251ac3..71d88915868f49d57a2699318d1ccc9163d42f4d 100644 --- a/modules/openapi-generator/src/main/resources/crystal/api_test.mustache +++ b/modules/openapi-generator/src/main/resources/crystal/api_test.mustache @@ -18,15 +18,15 @@ require "time" {{#operation}} # unit tests for {{operationId}} {{#summary}} - # {{summary}} + # {{.}} {{/summary}} {{#notes}} - # {{notes}} + # {{.}} {{/notes}} {{#allParams}}{{#required}} # @param {{paramName}} {{description}} {{/required}}{{/allParams}} # @param [Hash] opts the optional parameters {{#allParams}}{{^required}} # @option opts [{{{dataType}}}] :{{paramName}} {{description}} -{{/required}}{{/allParams}} # @return [{{#returnType}}{{{returnType}}}{{/returnType}}{{^returnType}}nil{{/returnType}}] +{{/required}}{{/allParams}} # @return [{{{returnType}}}{{^returnType}}nil{{/returnType}}] describe "{{operationId}} test" do it "should work" do # assertion here. ref: https://crystal-lang.org/reference/guides/testing.html diff --git a/modules/openapi-generator/src/main/resources/crystal/git_push.sh.mustache b/modules/openapi-generator/src/main/resources/crystal/git_push.sh.mustache index 8b3f689c9121a65080ad038d37a2036b01e559a1..f0bed5bd84155f05bc3cdc67af008f524efb38a6 100755 --- a/modules/openapi-generator/src/main/resources/crystal/git_push.sh.mustache +++ b/modules/openapi-generator/src/main/resources/crystal/git_push.sh.mustache @@ -55,4 +55,3 @@ 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/crystal/partial_model_generic.mustache b/modules/openapi-generator/src/main/resources/crystal/partial_model_generic.mustache index eaf47753fbad0be3807ae33c7e3ab8bc4429cae0..3109cec791459c31776fb990daa7eb995efde9a5 100644 --- a/modules/openapi-generator/src/main/resources/crystal/partial_model_generic.mustache +++ b/modules/openapi-generator/src/main/resources/crystal/partial_model_generic.mustache @@ -1,12 +1,12 @@ {{#description}} - # {{{description}}} + # {{{.}}} {{/description}} class {{classname}}{{#parent}} < {{{.}}}{{/parent}} include JSON::Serializable {{#vars}} {{#description}} - # {{{description}}} + # {{{.}}} {{/description}} @[JSON::Field(key: {{{baseName}}}, type: {{{dataType}}}{{#default}}, default: {{{.}}}{{/default}}{{#isNullable}}, nilable: true, emit_null: true{{/isNullable}})] property {{{name}}} : {{{dataType}}} diff --git a/modules/openapi-generator/src/main/resources/crystal/partial_model_generic_doc.mustache b/modules/openapi-generator/src/main/resources/crystal/partial_model_generic_doc.mustache index f188dd23e6ecb921d8ec69771ce0c7452f09bf40..95bdb7107c223ae13165490f93e8b9d640eb48f3 100644 --- a/modules/openapi-generator/src/main/resources/crystal/partial_model_generic_doc.mustache +++ b/modules/openapi-generator/src/main/resources/crystal/partial_model_generic_doc.mustache @@ -5,7 +5,7 @@ | Name | Type | Description | Notes | | ---- | ---- | ----------- | ----- | {{#vars}} -| **{{name}}** | {{#isPrimitiveType}}**{{dataType}}**{{/isPrimitiveType}}{{^isPrimitiveType}}[**{{dataType}}**]({{complexType}}.md){{/isPrimitiveType}} | {{description}} | {{^required}}[optional]{{/required}}{{#isReadOnly}}[readonly]{{/isReadOnly}}{{#defaultValue}}[default to {{defaultValue}}]{{/defaultValue}} | +| **{{name}}** | {{#isPrimitiveType}}**{{dataType}}**{{/isPrimitiveType}}{{^isPrimitiveType}}[**{{dataType}}**]({{complexType}}.md){{/isPrimitiveType}} | {{description}} | {{^required}}[optional]{{/required}}{{#isReadOnly}}[readonly]{{/isReadOnly}}{{#defaultValue}}[default to {{.}}]{{/defaultValue}} | {{/vars}} ## Example diff --git a/modules/openapi-generator/src/main/resources/crystal/partial_oneof_module.mustache b/modules/openapi-generator/src/main/resources/crystal/partial_oneof_module.mustache index 18c0a0cffdb27fb811dd660235057a65e44c3a9d..024071e45a3e44247fbb8a9089777622087b886b 100644 --- a/modules/openapi-generator/src/main/resources/crystal/partial_oneof_module.mustache +++ b/modules/openapi-generator/src/main/resources/crystal/partial_oneof_module.mustache @@ -1,5 +1,5 @@ {{#description}} - # {{{description}}} + # {{{.}}} {{/description}} module {{classname}} class << self diff --git a/modules/openapi-generator/src/main/resources/csharp-dotnet2/README.mustache b/modules/openapi-generator/src/main/resources/csharp-dotnet2/README.mustache index 064df8eeafd0e2998678dbca5a27be0947923020..16bd2ca86feb42142454bd979b9002373305515d 100644 --- a/modules/openapi-generator/src/main/resources/csharp-dotnet2/README.mustache +++ b/modules/openapi-generator/src/main/resources/csharp-dotnet2/README.mustache @@ -1,7 +1,7 @@ # {{packageName}} - the C# library for the {{appName}} {{#appDescriptionWithNewLines}} -{{{appDescriptionWithNewLines}}} +{{{.}}} {{/appDescriptionWithNewLines}} This C# SDK is automatically generated by the [OpenAPI Generator](https://openapi-generator.tech) project: @@ -117,7 +117,7 @@ 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}} +{{#apiInfo}}{{#apis}}{{#operations}}{{#operation}}*{{classname}}* | [**{{operationId}}**]({{apiDocPath}}{{classname}}.md#{{operationIdLowerCase}}) | **{{httpMethod}}** {{path}} | {{{summary}}} {{/operation}}{{/operations}}{{/apis}}{{/apiInfo}} <a name="documentation-for-models"></a> diff --git a/modules/openapi-generator/src/main/resources/csharp-dotnet2/api.mustache b/modules/openapi-generator/src/main/resources/csharp-dotnet2/api.mustache index 5990a0fbbd8edf4249c62d1a8670f76cf46673bb..40e59a1ffb677eb30c26f7083114c2625d90c7a6 100644 --- a/modules/openapi-generator/src/main/resources/csharp-dotnet2/api.mustache +++ b/modules/openapi-generator/src/main/resources/csharp-dotnet2/api.mustache @@ -18,11 +18,11 @@ namespace {{apiPackage}} /// {{summary}} {{notes}} /// </summary> {{#allParams}}/// <param name="{{paramName}}">{{description}}{{#isDeprecated}} (deprecated){{/isDeprecated}}</param> - {{/allParams}}/// <returns>{{#returnType}}{{returnType}}{{/returnType}}</returns> + {{/allParams}}/// <returns>{{returnType}}</returns> {{#isDeprecated}} [Obsolete] {{/isDeprecated}} - {{#returnType}}{{{returnType}}}{{/returnType}}{{^returnType}}void{{/returnType}} {{nickname}} ({{#allParams}}{{{dataType}}} {{paramName}}{{^-last}}, {{/-last}}{{/allParams}}); + {{{returnType}}}{{^returnType}}void{{/returnType}} {{nickname}} ({{#allParams}}{{{dataType}}} {{paramName}}{{^-last}}, {{/-last}}{{/allParams}}); {{/operation}} } @@ -84,11 +84,11 @@ namespace {{apiPackage}} /// {{summary}} {{notes}} /// </summary> {{#allParams}}/// <param name="{{paramName}}">{{description}}{{#isDeprecated}} (deprecated){{/isDeprecated}}</param> - {{/allParams}}/// <returns>{{#returnType}}{{returnType}}{{/returnType}}</returns> + {{/allParams}}/// <returns>{{returnType}}</returns> {{#isDeprecated}} [Obsolete] {{/isDeprecated}} - public {{#returnType}}{{{returnType}}}{{/returnType}}{{^returnType}}void{{/returnType}} {{nickname}} ({{#allParams}}{{{dataType}}} {{paramName}}{{^-last}}, {{/-last}}{{/allParams}}) + public {{{returnType}}}{{^returnType}}void{{/returnType}} {{nickname}} ({{#allParams}}{{{dataType}}} {{paramName}}{{^-last}}, {{/-last}}{{/allParams}}) { {{#allParams}}{{#required}} // verify the required parameter '{{paramName}}' is set diff --git a/modules/openapi-generator/src/main/resources/csharp-dotnet2/api_doc.mustache b/modules/openapi-generator/src/main/resources/csharp-dotnet2/api_doc.mustache index 4b1e7d263b919cbf2da842ba2477e03844648ddf..ea459620cdce894534d4c64f570fc8f468924d42 100644 --- a/modules/openapi-generator/src/main/resources/csharp-dotnet2/api_doc.mustache +++ b/modules/openapi-generator/src/main/resources/csharp-dotnet2/api_doc.mustache @@ -1,22 +1,22 @@ # {{apiPackage}}.{{classname}}{{#description}} -{{description}}{{/description}} +{{.}}{{/description}} All URIs are relative to *{{{basePath}}}* Method | HTTP request | Description ------------- | ------------- | ------------- -{{#operations}}{{#operation}}[**{{operationId}}**]({{classname}}.md#{{operationIdLowerCase}}) | **{{httpMethod}}** {{path}} | {{#summary}}{{summary}}{{/summary}} +{{#operations}}{{#operation}}[**{{operationId}}**]({{classname}}.md#{{operationIdLowerCase}}) | **{{httpMethod}}** {{path}} | {{summary}} {{/operation}}{{/operations}} {{#operations}} {{#operation}} <a name="{{{operationIdLowerCase}}}"></a> # **{{{operationId}}}** -> {{#returnType}}{{{returnType}}}{{/returnType}}{{^returnType}}void{{/returnType}} {{operationId}} ({{#allParams}}{{{dataType}}} {{paramName}}{{^required}}{{#optionalMethodArgument}} = null{{/optionalMethodArgument}}{{/required}}{{^-last}}, {{/-last}}{{/allParams}}) +> {{{returnType}}}{{^returnType}}void{{/returnType}} {{operationId}} ({{#allParams}}{{{dataType}}} {{paramName}}{{^required}}{{#optionalMethodArgument}} = null{{/optionalMethodArgument}}{{/required}}{{^-last}}, {{/-last}}{{/allParams}}) {{{summary}}}{{#notes}} -{{{notes}}}{{/notes}} +{{{.}}}{{/notes}} ### Example ```csharp @@ -78,7 +78,7 @@ namespace Example {{#summary}} // {{{.}}} {{/summary}} - {{#returnType}}{{returnType}} result = {{/returnType}}apiInstance.{{{operationId}}}({{#allParams}}{{paramName}}{{^-last}}, {{/-last}}{{/allParams}});{{#returnType}} + {{#returnType}}{{.}} result = {{/returnType}}apiInstance.{{{operationId}}}({{#allParams}}{{paramName}}{{^-last}}, {{/-last}}{{/allParams}});{{#returnType}} Debug.WriteLine(result);{{/returnType}} } catch (Exception e) @@ -94,7 +94,7 @@ namespace Example {{^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}} **{{paramName}}** | {{#isPrimitiveType}}**{{{dataType}}}**{{/isPrimitiveType}}{{^isPrimitiveType}}[**{{{dataType}}}**]({{baseType}}.md){{/isPrimitiveType}}| {{description}} | {{^required}}[optional] {{/required}}{{#defaultValue}}[default to {{.}}]{{/defaultValue}} {{/allParams}} ### Return type diff --git a/modules/openapi-generator/src/main/resources/csharp-dotnet2/model.mustache b/modules/openapi-generator/src/main/resources/csharp-dotnet2/model.mustache index f9e13ed8f3ccec1ca5850477a33bb3045bc4cb11..4a642e80e42ade1f25a9f5ddb43859974364496d 100644 --- a/modules/openapi-generator/src/main/resources/csharp-dotnet2/model.mustache +++ b/modules/openapi-generator/src/main/resources/csharp-dotnet2/model.mustache @@ -13,12 +13,12 @@ namespace {{modelPackage}} { /// {{description}} /// </summary> [DataContract] - public class {{classname}}{{#parent}} : {{{parent}}}{{/parent}} { + public class {{classname}}{{#parent}} : {{{.}}}{{/parent}} { {{#vars}} /// <summary> - /// {{^description}}Gets or Sets {{{name}}}{{/description}}{{#description}}{{{description}}}{{/description}} + /// {{^description}}Gets or Sets {{{name}}}{{/description}}{{{description}}} /// </summary>{{#description}} - /// <value>{{{description}}}</value>{{/description}} + /// <value>{{{.}}}</value>{{/description}} [DataMember(Name="{{baseName}}", EmitDefaultValue=false)] [JsonProperty(PropertyName = "{{baseName}}")] {{#deprecated}} diff --git a/modules/openapi-generator/src/main/resources/csharp-nancyfx/Project.mustache b/modules/openapi-generator/src/main/resources/csharp-nancyfx/Project.mustache index 8ff5398633dd2da9d821c69f01216e06b81da9a2..0b24e4c020ace88dbc30164b532de54ff7a1b551 100644 --- a/modules/openapi-generator/src/main/resources/csharp-nancyfx/Project.mustache +++ b/modules/openapi-generator/src/main/resources/csharp-nancyfx/Project.mustache @@ -59,7 +59,7 @@ <HintPath>..\..\packages\{{dependency}}.{{dependencyVersion}}\lib\{{dependencyFramework}}\{{dependency}}.dll</HintPath> <Private>True</Private> </Reference> - {{/dependencies}} + {{/dependencies}} <Reference Include="System"/> <Reference Include="System.Core"/> <Reference Include="System.Xml.Linq"/> @@ -77,4 +77,3 @@ </ItemGroup> <Import Project="$(MsBuildToolsPath)\Microsoft.CSharp.targets"/> </Project> - diff --git a/modules/openapi-generator/src/main/resources/csharp-nancyfx/api.mustache b/modules/openapi-generator/src/main/resources/csharp-nancyfx/api.mustache index eb34a7fd50e1406e0e23121c0b43e9971b36e76a..c680c47a114d3be538a397edfc3b65f77a2e1fc6 100644 --- a/modules/openapi-generator/src/main/resources/csharp-nancyfx/api.mustache +++ b/modules/openapi-generator/src/main/resources/csharp-nancyfx/api.mustache @@ -46,11 +46,11 @@ namespace {{packageName}}.{{packageContext}}.Modules /// </summary> /// <param name="context">Context of request</param> {{#allParams}}/// <param name="{{paramName}}">{{description}}{{^required}} (optional{{#defaultValue}}, default to {{.}}{{/defaultValue}}){{/required}}{{#isDeprecated}} (deprecated){{/isDeprecated}}</param> - {{/allParams}}/// <returns>{{#returnType}}{{returnType}}{{/returnType}}</returns> + {{/allParams}}/// <returns>{{returnType}}</returns> {{#isDeprecated}} [Obsolete] {{/isDeprecated}} - {{#asyncServer}}{{#returnType}}Task<{{{returnType}}}>{{/returnType}}{{^returnType}}Task{{/returnType}}{{/asyncServer}}{{^asyncServer}}{{#returnType}}{{&returnType}}{{/returnType}}{{^returnType}}void{{/returnType}}{{/asyncServer}} {{operationId}}(NancyContext context{{#allParams.0}}, {{/allParams.0}}{{>paramsList}});{{^-last}} + {{#asyncServer}}{{#returnType}}Task<{{{.}}}>{{/returnType}}{{^returnType}}Task{{/returnType}}{{/asyncServer}}{{^asyncServer}}{{#returnType}}{{&returnType}}{{/returnType}}{{^returnType}}void{{/returnType}}{{/asyncServer}} {{operationId}}(NancyContext context{{#allParams.0}}, {{/allParams.0}}{{>paramsList}});{{^-last}} {{/-last}}{{/operation}} } @@ -61,7 +61,7 @@ namespace {{packageName}}.{{packageContext}}.Modules public abstract class Abstract{{classname}}Service: {{interfacePrefix}}{{classname}}Service { {{#operation}}{{#isDeprecated}}[Obsolete] - {{/isDeprecated}}public virtual {{#asyncServer}}{{#returnType}}Task<{{{returnType}}}>{{/returnType}}{{^returnType}}Task{{/returnType}}{{/asyncServer}}{{^asyncServer}}{{#returnType}}{{&returnType}}{{/returnType}}{{^returnType}}void{{/returnType}}{{/asyncServer}} {{operationId}}(NancyContext context{{#allParams.0}}, {{/allParams.0}}{{>paramsList}}) + {{/isDeprecated}}public virtual {{#asyncServer}}{{#returnType}}Task<{{{.}}}>{{/returnType}}{{^returnType}}Task{{/returnType}}{{/asyncServer}}{{^asyncServer}}{{#returnType}}{{&returnType}}{{/returnType}}{{^returnType}}void{{/returnType}}{{/asyncServer}} {{operationId}}(NancyContext context{{#allParams.0}}, {{/allParams.0}}{{>paramsList}}) { {{^asyncServer}}{{#returnType}}return {{/returnType}}{{/asyncServer}}{{#asyncServer}}return {{/asyncServer}}{{operationId}}({{#allParams}}{{paramName}}{{^-last}}, {{/-last}}{{/allParams}}); }{{^-last}} @@ -69,7 +69,7 @@ namespace {{packageName}}.{{packageContext}}.Modules {{/-last}}{{/operation}} {{#operation}}{{#isDeprecated}}[Obsolete] - {{/isDeprecated}}protected abstract {{#asyncServer}}{{#returnType}}Task<{{{returnType}}}>{{/returnType}}{{^returnType}}Task{{/returnType}}{{/asyncServer}}{{^asyncServer}}{{#returnType}}{{&returnType}}{{/returnType}}{{^returnType}}void{{/returnType}}{{/asyncServer}} {{operationId}}({{>paramsList}});{{^-last}} + {{/isDeprecated}}protected abstract {{#asyncServer}}{{#returnType}}Task<{{{.}}}>{{/returnType}}{{^returnType}}Task{{/returnType}}{{/asyncServer}}{{^asyncServer}}{{#returnType}}{{&returnType}}{{/returnType}}{{^returnType}}void{{/returnType}}{{/asyncServer}} {{operationId}}({{>paramsList}});{{^-last}} {{/-last}}{{/operation}} } diff --git a/modules/openapi-generator/src/main/resources/csharp-nancyfx/innerApiEnum.mustache b/modules/openapi-generator/src/main/resources/csharp-nancyfx/innerApiEnum.mustache index 586b0e423c74352e7872c645404faae3ebac5ae1..eb456ababf9ed8fea1d1f06d7435ef3954338580 100644 --- a/modules/openapi-generator/src/main/resources/csharp-nancyfx/innerApiEnum.mustache +++ b/modules/openapi-generator/src/main/resources/csharp-nancyfx/innerApiEnum.mustache @@ -1,5 +1,5 @@ /// <summary> - /// {{#description}}{{.}}{{/description}}{{^description}}{{classname}}{{/description}} + /// {{description}}{{^description}}{{classname}}{{/description}} /// </summary> public enum {{>innerApiEnumName}} { diff --git a/modules/openapi-generator/src/main/resources/csharp-nancyfx/innerModelEnum.mustache b/modules/openapi-generator/src/main/resources/csharp-nancyfx/innerModelEnum.mustache index 19e4731f2cf44d8a5e6bc831aa2db0a38aef69f3..3fd8e401dcf81aa5f03ea3993bdb02439896da72 100644 --- a/modules/openapi-generator/src/main/resources/csharp-nancyfx/innerModelEnum.mustache +++ b/modules/openapi-generator/src/main/resources/csharp-nancyfx/innerModelEnum.mustache @@ -1 +1 @@ -public enum {{#datatypeWithEnum}}{{.}}{{/datatypeWithEnum}}{{^datatypeWithEnum}}{{classname}}{{/datatypeWithEnum}} { {{#allowableValues}}{{#enumVars}}{{{name}}}{{^-last}}, {{/-last}}{{/enumVars}}{{/allowableValues}} }; \ No newline at end of file +public enum {{datatypeWithEnum}}{{^datatypeWithEnum}}{{classname}}{{/datatypeWithEnum}} { {{#allowableValues}}{{#enumVars}}{{{name}}}{{^-last}}, {{/-last}}{{/enumVars}}{{/allowableValues}} }; \ No newline at end of file diff --git a/modules/openapi-generator/src/main/resources/csharp-nancyfx/localDateConverter.mustache b/modules/openapi-generator/src/main/resources/csharp-nancyfx/localDateConverter.mustache index f8495d6fadd1f6aa5c1261c1c63b49ec996aafe3..d709c22cc1b5e38d5cb8508d081e9a4977c32cfa 100644 --- a/modules/openapi-generator/src/main/resources/csharp-nancyfx/localDateConverter.mustache +++ b/modules/openapi-generator/src/main/resources/csharp-nancyfx/localDateConverter.mustache @@ -8,8 +8,8 @@ using System.Collections.Generic; namespace {{packageName}}.{{packageContext}}.Utils { /// <summary> - /// (De)serializes a <see cref="NodaTime.LocalDate"/> to a string using - /// the <a href="https://xml2rfc.tools.ietf.org/public/rfc/html/rfc3339.html#anchor14">RFC3339</a> + /// (De)serializes a <see cref="NodaTime.LocalDate"/> to a string using + /// the <a href="https://xml2rfc.tools.ietf.org/public/rfc/html/rfc3339.html#anchor14">RFC3339</a> /// <code>full-date</code> format. /// </summary> public class LocalDateConverter : JavaScriptPrimitiveConverter, IApplicationStartup diff --git a/modules/openapi-generator/src/main/resources/csharp-nancyfx/modelEnum.mustache b/modules/openapi-generator/src/main/resources/csharp-nancyfx/modelEnum.mustache index 303e4c71c26f1299a915365e25140d6105f9f9bd..01c5ec32aa1fa62eb370edb82e0b2c789b7276c1 100644 --- a/modules/openapi-generator/src/main/resources/csharp-nancyfx/modelEnum.mustache +++ b/modules/openapi-generator/src/main/resources/csharp-nancyfx/modelEnum.mustache @@ -1,10 +1,10 @@ /// <summary> - /// {{^description}}Defines {{{name}}}{{/description}}{{#description}}{{description}}{{/description}} + /// {{description}}{{^description}}Defines {{{name}}}{{/description}} /// </summary> {{#description}} - /// <value>{{description}}</value> + /// <value>{{.}}</value> {{/description}} - public enum {{#datatypeWithEnum}}{{.}}{{/datatypeWithEnum}}{{^datatypeWithEnum}}{{classname}}{{/datatypeWithEnum}} + public enum {{datatypeWithEnum}}{{^datatypeWithEnum}}{{classname}}{{/datatypeWithEnum}} { {{#allowableValues}}{{#enumVars}} /// <summary> diff --git a/modules/openapi-generator/src/main/resources/csharp-nancyfx/modelGeneric.mustache b/modules/openapi-generator/src/main/resources/csharp-nancyfx/modelGeneric.mustache index cb217c51c55a8a22de8d1bfe360de2cd68d3c128..8bb564a79713902e1f2b1e997f2aefea524049bb 100644 --- a/modules/openapi-generator/src/main/resources/csharp-nancyfx/modelGeneric.mustache +++ b/modules/openapi-generator/src/main/resources/csharp-nancyfx/modelGeneric.mustache @@ -1,10 +1,10 @@ /// <summary> - /// {{#description}}{{.}}{{/description}}{{^description}}{{classname}}{{/description}} + /// {{description}}{{^description}}{{classname}}{{/description}} /// </summary> - public {{^hasChildren}}sealed {{/hasChildren}}class {{classname}}: {{#parent}}{{{parent}}}, {{/parent}} IEquatable<{{classname}}> + public {{^hasChildren}}sealed {{/hasChildren}}class {{classname}}: {{#parent}}{{{.}}}, {{/parent}} IEquatable<{{classname}}> { {{#vars}}{{^isInherited}} /// <summary> - /// {{^description}}{{{name}}}{{/description}}{{#description}}{{description}}{{/description}} + /// {{description}}{{^description}}{{{name}}}{{/description}} /// </summary> public {{>nullableDataType}} {{name}} { get; private set; } {{/isInherited}}{{/vars}} @@ -118,7 +118,7 @@ /// <summary> /// Sets value for {{classname}}.{{{name}}} property. /// </summary> - /// <param name="value">{{^description}}{{{name}}}{{/description}}{{#description}}{{description}}{{/description}}</param> + /// <param name="value">{{description}}{{^description}}{{{name}}}{{/description}}</param> public {{classname}}Builder {{name}}({{>nullableDataType}} value) { _{{name}} = value; diff --git a/modules/openapi-generator/src/main/resources/csharp-nancyfx/modelMutable.mustache b/modules/openapi-generator/src/main/resources/csharp-nancyfx/modelMutable.mustache index a9ef6c90bd336f9a017fd3fea11fdd5a698e9df9..3ab64e3b06e4aef9d07e35b633743c7d49b7f9b9 100644 --- a/modules/openapi-generator/src/main/resources/csharp-nancyfx/modelMutable.mustache +++ b/modules/openapi-generator/src/main/resources/csharp-nancyfx/modelMutable.mustache @@ -15,12 +15,12 @@ namespace {{packageName}}.{{packageContext}}.Models {{#items}}{{>innerModelEnum}}{{/items}}{{/items.isEnum}}{{/vars}} /// <summary> - /// {{#description}}{{.}}{{/description}}{{^description}}{{classname}}{{/description}} + /// {{description}}{{^description}}{{classname}}{{/description}} /// </summary> - public {{^hasChildren}}sealed {{/hasChildren}}class {{classname}}: {{#parent}}{{{parent}}}, {{/parent}} IEquatable<{{classname}}> + public {{^hasChildren}}sealed {{/hasChildren}}class {{classname}}: {{#parent}}{{{.}}}, {{/parent}} IEquatable<{{classname}}> { {{#vars}}{{^isInherited}} /// <summary> - /// {{^description}}{{{name}}}{{/description}}{{#description}}{{description}}{{/description}} + /// {{description}}{{^description}}{{{name}}}{{/description}} /// </summary> public {{>nullableDataType}} {{name}} { get; set; } {{/isInherited}}{{/vars}} diff --git a/modules/openapi-generator/src/main/resources/csharp-nancyfx/nuspec.mustache b/modules/openapi-generator/src/main/resources/csharp-nancyfx/nuspec.mustache index 3ef4c7bbe261732de734f8a28dc6973dba8e8005..65912590d191a16aa8b69f88f99e35469ec46c66 100644 --- a/modules/openapi-generator/src/main/resources/csharp-nancyfx/nuspec.mustache +++ b/modules/openapi-generator/src/main/resources/csharp-nancyfx/nuspec.mustache @@ -8,7 +8,7 @@ <owners>openapi-generator</owners> <requireLicenseAcceptance>false</requireLicenseAcceptance> <description>NancyFx {{packageName}} API</description>{{#termsOfService}} - <copyright>{{termsOfService}}</copyright>{{/termsOfService}}{{#licenseUrl}} - <licenseUrl>{{licenseUrl}}</licenseUrl>{{/licenseUrl}} + <copyright>{{.}}</copyright>{{/termsOfService}}{{#licenseUrl}} + <licenseUrl>{{.}}</licenseUrl>{{/licenseUrl}} </metadata> </package> \ No newline at end of file diff --git a/modules/openapi-generator/src/main/resources/csharp-netcore/Configuration.mustache b/modules/openapi-generator/src/main/resources/csharp-netcore/Configuration.mustache index ead5641444124a4cbcd067820356c8f791cfaaa2..fe7eeb0b58046381d9a6ee49f0499de0d8a6514d 100644 --- a/modules/openapi-generator/src/main/resources/csharp-netcore/Configuration.mustache +++ b/modules/openapi-generator/src/main/resources/csharp-netcore/Configuration.mustache @@ -111,7 +111,7 @@ namespace {{packageName}}.Client public Configuration() { Proxy = null; - UserAgent = "{{#httpUserAgent}}{{.}}{{/httpUserAgent}}{{^httpUserAgent}}OpenAPI-Generator/{{packageVersion}}/csharp{{/httpUserAgent}}"; + UserAgent = "{{httpUserAgent}}{{^httpUserAgent}}OpenAPI-Generator/{{packageVersion}}/csharp{{/httpUserAgent}}"; BasePath = "{{{basePath}}}"; DefaultHeaders = new {{^net35}}Concurrent{{/net35}}Dictionary<string, string>(); ApiKey = new {{^net35}}Concurrent{{/net35}}Dictionary<string, string>(); 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 b15d2a25bf192067eccb580eb12df78434310e00..1d1a37e16ae4066b2206c5eb4c3c51d6a26d6d12 100644 --- a/modules/openapi-generator/src/main/resources/csharp-netcore/README.mustache +++ b/modules/openapi-generator/src/main/resources/csharp-netcore/README.mustache @@ -1,7 +1,7 @@ # {{packageName}} - the C# library for the {{appName}} {{#appDescriptionWithNewLines}} -{{{appDescriptionWithNewLines}}} +{{{.}}} {{/appDescriptionWithNewLines}} This C# SDK is automatically generated by the [OpenAPI Generator](https://openapi-generator.tech) project: @@ -114,7 +114,7 @@ HttpClient yourHttpClient = new HttpClient(yourHandler); var api = new YourApiClass(yourHttpClient, yourHandler); ``` -If you want to use an HttpClient and don't have access to the handler, for example in a DI context in Asp.net Core when using IHttpClientFactory. +If you want to use an HttpClient and don't have access to the handler, for example in a DI context in Asp.net Core when using IHttpClientFactory. ```csharp HttpClient yourHttpClient = new HttpClient(); @@ -125,7 +125,7 @@ You'll loose some configuration settings, the features affected are: Setting and Here an example of DI setup in a sample web project: ```csharp -services.AddHttpClient<YourApiClass>(httpClient => +services.AddHttpClient<YourApiClass>(httpClient => new PetApi(httpClient)); ``` @@ -200,7 +200,7 @@ namespace Example {{#summary}} // {{{.}}} {{/summary}} - {{#returnType}}{{{returnType}}} result = {{/returnType}}apiInstance.{{{operationId}}}({{#allParams}}{{paramName}}{{^-last}}, {{/-last}}{{/allParams}});{{#returnType}} + {{#returnType}}{{{.}}} result = {{/returnType}}apiInstance.{{{operationId}}}({{#allParams}}{{paramName}}{{^-last}}, {{/-last}}{{/allParams}});{{#returnType}} Debug.WriteLine(result);{{/returnType}} } catch (ApiException e) @@ -222,7 +222,7 @@ 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}} +{{#apiInfo}}{{#apis}}{{#operations}}{{#operation}}*{{classname}}* | [**{{operationId}}**]({{apiDocPath}}{{classname}}.md#{{operationIdLowerCase}}) | **{{httpMethod}}** {{path}} | {{{summary}}} {{/operation}}{{/operations}}{{/apis}}{{/apiInfo}} <a name="documentation-for-models"></a> diff --git a/modules/openapi-generator/src/main/resources/csharp-netcore/TestProject.mustache b/modules/openapi-generator/src/main/resources/csharp-netcore/TestProject.mustache index b1a50ae778e34cd4b08baec5da543f51cbdc2b86..57e1455087f007614b523b97d86d3e23988bcd14 100644 --- a/modules/openapi-generator/src/main/resources/csharp-netcore/TestProject.mustache +++ b/modules/openapi-generator/src/main/resources/csharp-netcore/TestProject.mustache @@ -1,15 +1,15 @@ <?xml version="1.0" encoding="utf-8"?> <!-- {{#appName}} -{{{appName}}} +{{{.}}} {{/appName}} {{#appDescription}} -{{{appDescription}}} +{{{.}}} {{/appDescription}} -{{#version}}The version of the OpenAPI document: {{{version}}}{{/version}} -{{#infoEmail}}Contact: {{{infoEmail}}}{{/infoEmail}} +{{#version}}The version of the OpenAPI document: {{{.}}}{{/version}} +{{#infoEmail}}Contact: {{{.}}}{{/infoEmail}} --> <Project Sdk="Microsoft.NET.Sdk"> <PropertyGroup> @@ -33,4 +33,3 @@ </ProjectReference> </ItemGroup> </Project> - diff --git a/modules/openapi-generator/src/main/resources/csharp-netcore/api.mustache b/modules/openapi-generator/src/main/resources/csharp-netcore/api.mustache index bb4894411bc09fa8101e0831e94be54746ea2168..237a14f92b7f7d67186e473dfa57c1a456253323 100644 --- a/modules/openapi-generator/src/main/resources/csharp-netcore/api.mustache +++ b/modules/openapi-generator/src/main/resources/csharp-netcore/api.mustache @@ -26,16 +26,16 @@ namespace {{packageName}}.{{apiPackage}} /// </summary> {{#notes}} /// <remarks> - /// {{notes}} + /// {{.}} /// </remarks> {{/notes}} /// <exception cref="{{packageName}}.Client.ApiException">Thrown when fails to make API call</exception> {{#allParams}}/// <param name="{{paramName}}">{{description}}{{^required}} (optional{{#defaultValue}}, default to {{.}}{{/defaultValue}}){{/required}}{{#isDeprecated}} (deprecated){{/isDeprecated}}</param> - {{/allParams}}/// <returns>{{#returnType}}{{returnType}}{{/returnType}}</returns> + {{/allParams}}/// <returns>{{returnType}}</returns> {{#isDeprecated}} [Obsolete] {{/isDeprecated}} - {{#returnType}}{{{returnType}}}{{/returnType}}{{^returnType}}void{{/returnType}} {{operationId}}({{#allParams}}{{{dataType}}} {{paramName}}{{^required}}{{#optionalMethodArgument}} = default({{{dataType}}}){{/optionalMethodArgument}}{{/required}}{{^-last}}, {{/-last}}{{/allParams}}); + {{{returnType}}}{{^returnType}}void{{/returnType}} {{operationId}}({{#allParams}}{{{dataType}}} {{paramName}}{{^required}}{{#optionalMethodArgument}} = default({{{dataType}}}){{/optionalMethodArgument}}{{/required}}{{^-last}}, {{/-last}}{{/allParams}}); /// <summary> /// {{summary}} @@ -45,11 +45,11 @@ namespace {{packageName}}.{{apiPackage}} /// </remarks> /// <exception cref="{{packageName}}.Client.ApiException">Thrown when fails to make API call</exception> {{#allParams}}/// <param name="{{paramName}}">{{description}}{{^required}} (optional{{#defaultValue}}, default to {{.}}{{/defaultValue}}){{/required}}{{#isDeprecated}} (deprecated){{/isDeprecated}}</param> - {{/allParams}}/// <returns>ApiResponse of {{#returnType}}{{returnType}}{{/returnType}}{{^returnType}}Object(void){{/returnType}}</returns> + {{/allParams}}/// <returns>ApiResponse of {{returnType}}{{^returnType}}Object(void){{/returnType}}</returns> {{#isDeprecated}} [Obsolete] {{/isDeprecated}} - ApiResponse<{{#returnType}}{{{returnType}}}{{/returnType}}{{^returnType}}Object{{/returnType}}> {{operationId}}WithHttpInfo({{#allParams}}{{{dataType}}} {{paramName}}{{^required}}{{#optionalMethodArgument}} = default({{{dataType}}}){{/optionalMethodArgument}}{{/required}}{{^-last}}, {{/-last}}{{/allParams}}); + ApiResponse<{{{returnType}}}{{^returnType}}Object{{/returnType}}> {{operationId}}WithHttpInfo({{#allParams}}{{{dataType}}} {{paramName}}{{^required}}{{#optionalMethodArgument}} = default({{{dataType}}}){{/optionalMethodArgument}}{{/required}}{{^-last}}, {{/-last}}{{/allParams}}); {{/operation}} #endregion Synchronous Operations } @@ -73,11 +73,11 @@ namespace {{packageName}}.{{apiPackage}} /// <param name="{{paramName}}">{{description}}{{^required}} (optional{{#defaultValue}}, default to {{.}}{{/defaultValue}}){{/required}}{{#isDeprecated}} (deprecated){{/isDeprecated}}</param> {{/allParams}} /// <param name="cancellationToken">Cancellation Token to cancel the request.</param> - /// <returns>Task of {{#returnType}}{{returnType}}{{/returnType}}{{^returnType}}void{{/returnType}}</returns> + /// <returns>Task of {{returnType}}{{^returnType}}void{{/returnType}}</returns> {{#isDeprecated}} [Obsolete] {{/isDeprecated}} - {{#returnType}}System.Threading.Tasks.Task<{{{returnType}}}>{{/returnType}}{{^returnType}}System.Threading.Tasks.Task{{/returnType}} {{operationId}}Async({{#allParams}}{{{dataType}}} {{paramName}}{{^required}}{{#optionalMethodArgument}} = default({{{dataType}}}){{/optionalMethodArgument}}{{/required}}{{^-last}}, {{/-last}}{{/allParams}}{{#allParams.0}}, {{/allParams.0}}System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + {{#returnType}}System.Threading.Tasks.Task<{{{.}}}>{{/returnType}}{{^returnType}}System.Threading.Tasks.Task{{/returnType}} {{operationId}}Async({{#allParams}}{{{dataType}}} {{paramName}}{{^required}}{{#optionalMethodArgument}} = default({{{dataType}}}){{/optionalMethodArgument}}{{/required}}{{^-last}}, {{/-last}}{{/allParams}}{{#allParams.0}}, {{/allParams.0}}System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); /// <summary> /// {{summary}} @@ -90,11 +90,11 @@ namespace {{packageName}}.{{apiPackage}} /// <param name="{{paramName}}">{{description}}{{^required}} (optional{{#defaultValue}}, default to {{.}}{{/defaultValue}}){{/required}}{{#isDeprecated}} (deprecated){{/isDeprecated}}</param> {{/allParams}} /// <param name="cancellationToken">Cancellation Token to cancel the request.</param> - /// <returns>Task of ApiResponse{{#returnType}} ({{returnType}}){{/returnType}}</returns> + /// <returns>Task of ApiResponse{{#returnType}} ({{.}}){{/returnType}}</returns> {{#isDeprecated}} [Obsolete] {{/isDeprecated}} - System.Threading.Tasks.Task<ApiResponse<{{#returnType}}{{{returnType}}}{{/returnType}}{{^returnType}}Object{{/returnType}}>> {{operationId}}WithHttpInfoAsync({{#allParams}}{{{dataType}}} {{paramName}}{{^required}}{{#optionalMethodArgument}} = default({{{dataType}}}){{/optionalMethodArgument}}{{/required}}{{^-last}}, {{/-last}}{{/allParams}}{{#allParams.0}}, {{/allParams.0}}System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task<ApiResponse<{{{returnType}}}{{^returnType}}Object{{/returnType}}>> {{operationId}}WithHttpInfoAsync({{#allParams}}{{{dataType}}} {{paramName}}{{^required}}{{#optionalMethodArgument}} = default({{{dataType}}}){{/optionalMethodArgument}}{{/required}}{{^-last}}, {{/-last}}{{/allParams}}{{#allParams.0}}, {{/allParams.0}}System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); {{/operation}} #endregion Asynchronous Operations } @@ -233,11 +233,11 @@ namespace {{packageName}}.{{apiPackage}} /// </summary> /// <exception cref="{{packageName}}.Client.ApiException">Thrown when fails to make API call</exception> {{#allParams}}/// <param name="{{paramName}}">{{description}}{{^required}} (optional{{#defaultValue}}, default to {{.}}{{/defaultValue}}){{/required}}{{#isDeprecated}} (deprecated){{/isDeprecated}}</param> - {{/allParams}}/// <returns>{{#returnType}}{{returnType}}{{/returnType}}</returns> + {{/allParams}}/// <returns>{{returnType}}</returns> {{#isDeprecated}} [Obsolete] {{/isDeprecated}} - public {{#returnType}}{{{returnType}}}{{/returnType}}{{^returnType}}void{{/returnType}} {{operationId}}({{#allParams}}{{{dataType}}} {{paramName}}{{^required}}{{#optionalMethodArgument}} = default({{{dataType}}}){{/optionalMethodArgument}}{{/required}}{{^-last}}, {{/-last}}{{/allParams}}) + public {{{returnType}}}{{^returnType}}void{{/returnType}} {{operationId}}({{#allParams}}{{{dataType}}} {{paramName}}{{^required}}{{#optionalMethodArgument}} = default({{{dataType}}}){{/optionalMethodArgument}}{{/required}}{{^-last}}, {{/-last}}{{/allParams}}) { {{#returnType}}{{packageName}}.Client.ApiResponse<{{{returnType}}}> localVarResponse = {{operationId}}WithHttpInfo({{#allParams}}{{paramName}}{{^-last}}, {{/-last}}{{/allParams}}); return localVarResponse.Data;{{/returnType}}{{^returnType}}{{operationId}}WithHttpInfo({{#allParams}}{{paramName}}{{^-last}}, {{/-last}}{{/allParams}});{{/returnType}} @@ -248,11 +248,11 @@ namespace {{packageName}}.{{apiPackage}} /// </summary> /// <exception cref="{{packageName}}.Client.ApiException">Thrown when fails to make API call</exception> {{#allParams}}/// <param name="{{paramName}}">{{description}}{{^required}} (optional{{#defaultValue}}, default to {{.}}{{/defaultValue}}){{/required}}{{#isDeprecated}} (deprecated){{/isDeprecated}}</param> - {{/allParams}}/// <returns>ApiResponse of {{#returnType}}{{returnType}}{{/returnType}}{{^returnType}}Object(void){{/returnType}}</returns> + {{/allParams}}/// <returns>ApiResponse of {{returnType}}{{^returnType}}Object(void){{/returnType}}</returns> {{#isDeprecated}} [Obsolete] {{/isDeprecated}} - public {{packageName}}.Client.ApiResponse<{{#returnType}}{{{returnType}}}{{/returnType}}{{^returnType}}Object{{/returnType}}> {{operationId}}WithHttpInfo({{#allParams}}{{{dataType}}} {{paramName}}{{^required}}{{#optionalMethodArgument}} = default({{{dataType}}}){{/optionalMethodArgument}}{{/required}}{{^-last}}, {{/-last}}{{/allParams}}) + public {{packageName}}.Client.ApiResponse<{{{returnType}}}{{^returnType}}Object{{/returnType}}> {{operationId}}WithHttpInfo({{#allParams}}{{{dataType}}} {{paramName}}{{^required}}{{#optionalMethodArgument}} = default({{{dataType}}}){{/optionalMethodArgument}}{{/required}}{{^-last}}, {{/-last}}{{/allParams}}) { {{#allParams}} {{#required}} @@ -300,14 +300,14 @@ namespace {{packageName}}.{{apiPackage}} {{#required}} {{#isDeepObject}} {{#items.vars}} - localVarRequestOptions.QueryParameters.Add({{packageName}}.Client.ClientUtils.ParameterToMultiMap("{{#collectionFormat}}{{collectionFormat}}{{/collectionFormat}}", "{{baseName}}", {{paramName}}.{{name}})); + localVarRequestOptions.QueryParameters.Add({{packageName}}.Client.ClientUtils.ParameterToMultiMap("{{collectionFormat}}", "{{baseName}}", {{paramName}}.{{name}})); {{/items.vars}} {{^items}} localVarRequestOptions.QueryParameters.Add({{packageName}}.Client.ClientUtils.ParameterToMultiMap("deepObject", "{{baseName}}", {{paramName}})); {{/items}} {{/isDeepObject}} {{^isDeepObject}} - localVarRequestOptions.QueryParameters.Add({{packageName}}.Client.ClientUtils.ParameterToMultiMap("{{#collectionFormat}}{{collectionFormat}}{{/collectionFormat}}", "{{baseName}}", {{paramName}})); + localVarRequestOptions.QueryParameters.Add({{packageName}}.Client.ClientUtils.ParameterToMultiMap("{{collectionFormat}}", "{{baseName}}", {{paramName}})); {{/isDeepObject}} {{/required}} {{^required}} @@ -317,7 +317,7 @@ namespace {{packageName}}.{{apiPackage}} {{#items.vars}} if ({{paramName}}.{{name}} != null) { - localVarRequestOptions.QueryParameters.Add({{packageName}}.Client.ClientUtils.ParameterToMultiMap("{{#collectionFormat}}{{collectionFormat}}{{/collectionFormat}}", "{{baseName}}", {{paramName}}.{{name}})); + localVarRequestOptions.QueryParameters.Add({{packageName}}.Client.ClientUtils.ParameterToMultiMap("{{collectionFormat}}", "{{baseName}}", {{paramName}}.{{name}})); } {{/items.vars}} {{^items}} @@ -325,7 +325,7 @@ namespace {{packageName}}.{{apiPackage}} {{/items}} {{/isDeepObject}} {{^isDeepObject}} - localVarRequestOptions.QueryParameters.Add({{packageName}}.Client.ClientUtils.ParameterToMultiMap("{{#collectionFormat}}{{collectionFormat}}{{/collectionFormat}}", "{{baseName}}", {{paramName}})); + localVarRequestOptions.QueryParameters.Add({{packageName}}.Client.ClientUtils.ParameterToMultiMap("{{collectionFormat}}", "{{baseName}}", {{paramName}})); {{/isDeepObject}} } {{/required}} @@ -430,7 +430,7 @@ namespace {{packageName}}.{{apiPackage}} {{/authMethods}} // make the HTTP request - var localVarResponse = this.Client.{{#lambda.titlecase}}{{#lambda.lowercase}}{{httpMethod}}{{/lambda.lowercase}}{{/lambda.titlecase}}<{{#returnType}}{{{returnType}}}{{/returnType}}{{^returnType}}Object{{/returnType}}>("{{{path}}}", localVarRequestOptions, this.Configuration); + var localVarResponse = this.Client.{{#lambda.titlecase}}{{#lambda.lowercase}}{{httpMethod}}{{/lambda.lowercase}}{{/lambda.titlecase}}<{{{returnType}}}{{^returnType}}Object{{/returnType}}>("{{{path}}}", localVarRequestOptions, this.Configuration); if (this.ExceptionFactory != null) { @@ -450,11 +450,11 @@ namespace {{packageName}}.{{apiPackage}} /// <param name="{{paramName}}">{{description}}{{^required}} (optional{{#defaultValue}}, default to {{.}}{{/defaultValue}}){{/required}}{{#isDeprecated}} (deprecated){{/isDeprecated}}</param> {{/allParams}} /// <param name="cancellationToken">Cancellation Token to cancel the request.</param> - /// <returns>Task of {{#returnType}}{{returnType}}{{/returnType}}{{^returnType}}void{{/returnType}}</returns> + /// <returns>Task of {{returnType}}{{^returnType}}void{{/returnType}}</returns> {{#isDeprecated}} [Obsolete] {{/isDeprecated}} - {{#returnType}}public async System.Threading.Tasks.Task<{{{returnType}}}>{{/returnType}}{{^returnType}}public async System.Threading.Tasks.Task{{/returnType}} {{operationId}}Async({{#allParams}}{{{dataType}}} {{paramName}}{{^required}}{{#optionalMethodArgument}} = default({{{dataType}}}){{/optionalMethodArgument}}{{/required}}{{^-last}}, {{/-last}}{{/allParams}}{{#allParams.0}}, {{/allParams.0}}System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + {{#returnType}}public async System.Threading.Tasks.Task<{{{.}}}>{{/returnType}}{{^returnType}}public async System.Threading.Tasks.Task{{/returnType}} {{operationId}}Async({{#allParams}}{{{dataType}}} {{paramName}}{{^required}}{{#optionalMethodArgument}} = default({{{dataType}}}){{/optionalMethodArgument}}{{/required}}{{^-last}}, {{/-last}}{{/allParams}}{{#allParams.0}}, {{/allParams.0}}System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { {{#returnType}}{{packageName}}.Client.ApiResponse<{{{returnType}}}> localVarResponse = await {{operationId}}WithHttpInfoAsync({{#allParams}}{{paramName}}{{^-last}}, {{/-last}}{{/allParams}}{{#allParams.0}}, {{/allParams.0}}cancellationToken).ConfigureAwait(false); return localVarResponse.Data;{{/returnType}}{{^returnType}}await {{operationId}}WithHttpInfoAsync({{#allParams}}{{paramName}}{{^-last}}, {{/-last}}{{/allParams}}{{#allParams.0}}, {{/allParams.0}}cancellationToken).ConfigureAwait(false);{{/returnType}} @@ -468,11 +468,11 @@ namespace {{packageName}}.{{apiPackage}} /// <param name="{{paramName}}">{{description}}{{^required}} (optional{{#defaultValue}}, default to {{.}}{{/defaultValue}}){{/required}}{{#isDeprecated}} (deprecated){{/isDeprecated}}</param> {{/allParams}} /// <param name="cancellationToken">Cancellation Token to cancel the request.</param> - /// <returns>Task of ApiResponse{{#returnType}} ({{returnType}}){{/returnType}}</returns> + /// <returns>Task of ApiResponse{{#returnType}} ({{.}}){{/returnType}}</returns> {{#isDeprecated}} [Obsolete] {{/isDeprecated}} - public async System.Threading.Tasks.Task<{{packageName}}.Client.ApiResponse<{{#returnType}}{{{returnType}}}{{/returnType}}{{^returnType}}Object{{/returnType}}>> {{operationId}}WithHttpInfoAsync({{#allParams}}{{{dataType}}} {{paramName}}{{^required}}{{#optionalMethodArgument}} = default({{{dataType}}}){{/optionalMethodArgument}}{{/required}}{{^-last}}, {{/-last}}{{/allParams}}{{#allParams.0}}, {{/allParams.0}}System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task<{{packageName}}.Client.ApiResponse<{{{returnType}}}{{^returnType}}Object{{/returnType}}>> {{operationId}}WithHttpInfoAsync({{#allParams}}{{{dataType}}} {{paramName}}{{^required}}{{#optionalMethodArgument}} = default({{{dataType}}}){{/optionalMethodArgument}}{{/required}}{{^-last}}, {{/-last}}{{/allParams}}{{#allParams.0}}, {{/allParams.0}}System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { {{#allParams}} {{#required}} @@ -520,12 +520,12 @@ namespace {{packageName}}.{{apiPackage}} {{/pathParams}} {{#queryParams}} {{#required}} - localVarRequestOptions.QueryParameters.Add({{packageName}}.Client.ClientUtils.ParameterToMultiMap("{{#collectionFormat}}{{collectionFormat}}{{/collectionFormat}}", "{{baseName}}", {{paramName}})); + localVarRequestOptions.QueryParameters.Add({{packageName}}.Client.ClientUtils.ParameterToMultiMap("{{collectionFormat}}", "{{baseName}}", {{paramName}})); {{/required}} {{^required}} if ({{paramName}} != null) { - localVarRequestOptions.QueryParameters.Add({{packageName}}.Client.ClientUtils.ParameterToMultiMap("{{#collectionFormat}}{{collectionFormat}}{{/collectionFormat}}", "{{baseName}}", {{paramName}})); + localVarRequestOptions.QueryParameters.Add({{packageName}}.Client.ClientUtils.ParameterToMultiMap("{{collectionFormat}}", "{{baseName}}", {{paramName}})); } {{/required}} {{/queryParams}} @@ -632,7 +632,7 @@ namespace {{packageName}}.{{apiPackage}} // make the HTTP request - var localVarResponse = await this.AsynchronousClient.{{#lambda.titlecase}}{{#lambda.lowercase}}{{httpMethod}}{{/lambda.lowercase}}{{/lambda.titlecase}}Async<{{#returnType}}{{{returnType}}}{{/returnType}}{{^returnType}}Object{{/returnType}}>("{{{path}}}", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); + var localVarResponse = await this.AsynchronousClient.{{#lambda.titlecase}}{{#lambda.lowercase}}{{httpMethod}}{{/lambda.lowercase}}{{/lambda.titlecase}}Async<{{{returnType}}}{{^returnType}}Object{{/returnType}}>("{{{path}}}", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); if (this.ExceptionFactory != null) { 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 d12ee22ea3883892ec5968909b0aa8518a6f6dbf..1286829ad4026bdae3364e9aea990511373cf62f 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 @@ -1,22 +1,22 @@ # {{packageName}}.{{apiPackage}}.{{classname}}{{#description}} -{{description}}{{/description}} +{{.}}{{/description}} All URIs are relative to *{{{basePath}}}* Method | HTTP request | Description ------------- | ------------- | ------------- -{{#operations}}{{#operation}}[**{{operationId}}**]({{classname}}.md#{{operationIdLowerCase}}) | **{{httpMethod}}** {{path}} | {{#summary}}{{summary}}{{/summary}} +{{#operations}}{{#operation}}[**{{operationId}}**]({{classname}}.md#{{operationIdLowerCase}}) | **{{httpMethod}}** {{path}} | {{summary}} {{/operation}}{{/operations}} {{#operations}} {{#operation}} <a name="{{{operationIdLowerCase}}}"></a> # **{{{operationId}}}** -> {{#returnType}}{{returnType}}{{/returnType}}{{^returnType}}void{{/returnType}} {{operationId}} ({{#allParams}}{{{dataType}}} {{paramName}}{{^required}}{{#optionalMethodArgument}} = null{{/optionalMethodArgument}}{{/required}}{{^-last}}, {{/-last}}{{/allParams}}) +> {{returnType}}{{^returnType}}void{{/returnType}} {{operationId}} ({{#allParams}}{{{dataType}}} {{paramName}}{{^required}}{{#optionalMethodArgument}} = null{{/optionalMethodArgument}}{{/required}}{{^-last}}, {{/-last}}{{/allParams}}) {{{summary}}}{{#notes}} -{{{notes}}}{{/notes}} +{{{.}}}{{/notes}} ### Example ```csharp @@ -84,7 +84,7 @@ namespace Example {{#summary}} // {{{.}}} {{/summary}} - {{#returnType}}{{{returnType}}} result = {{/returnType}}apiInstance.{{{operationId}}}({{#allParams}}{{paramName}}{{^-last}}, {{/-last}}{{/allParams}});{{#returnType}} + {{#returnType}}{{{.}}} result = {{/returnType}}apiInstance.{{{operationId}}}({{#allParams}}{{paramName}}{{^-last}}, {{/-last}}{{/allParams}});{{#returnType}} Debug.WriteLine(result);{{/returnType}} } catch (ApiException e) @@ -102,7 +102,7 @@ namespace Example {{^allParams}}This endpoint does not need any parameter.{{/allParams}}{{#allParams}}{{#-last}} Name | Type | Description | Notes ------------- | ------------- | ------------- | -------------{{/-last}}{{/allParams}} -{{#allParams}} **{{paramName}}** | {{#isFile}}**{{dataType}}**{{/isFile}}{{#isPrimitiveType}}**{{dataType}}**{{/isPrimitiveType}}{{^isPrimitiveType}}{{^isFile}}[**{{dataType}}**]({{#isContainer}}{{baseType}}{{/isContainer}}{{^isContainer}}{{dataType}}{{/isContainer}}.md){{/isFile}}{{/isPrimitiveType}}| {{description}} | {{^required}}[optional] {{/required}}{{#defaultValue}}[default to {{defaultValue}}]{{/defaultValue}} +{{#allParams}} **{{paramName}}** | {{#isFile}}**{{dataType}}**{{/isFile}}{{#isPrimitiveType}}**{{dataType}}**{{/isPrimitiveType}}{{^isPrimitiveType}}{{^isFile}}[**{{dataType}}**]({{#isContainer}}{{baseType}}{{/isContainer}}{{^isContainer}}{{dataType}}{{/isContainer}}.md){{/isFile}}{{/isPrimitiveType}}| {{description}} | {{^required}}[optional] {{/required}}{{#defaultValue}}[default to {{.}}]{{/defaultValue}} {{/allParams}} ### Return type diff --git a/modules/openapi-generator/src/main/resources/csharp-netcore/api_test.mustache b/modules/openapi-generator/src/main/resources/csharp-netcore/api_test.mustache index 02ca26b5f16954ecfd563c8ec286f44f1fedbc7a..3f2f1de5bb3751531f60f15a12f5b47239eda544 100644 --- a/modules/openapi-generator/src/main/resources/csharp-netcore/api_test.mustache +++ b/modules/openapi-generator/src/main/resources/csharp-netcore/api_test.mustache @@ -64,7 +64,7 @@ namespace {{packageName}}.Test.Api {{/allParams}} //{{#returnType}}var response = {{/returnType}}instance.{{operationId}}({{#allParams}}{{paramName}}{{^-last}}, {{/-last}}{{/allParams}}); {{#returnType}} - //Assert.IsType<{{{returnType}}}>(response); + //Assert.IsType<{{{.}}}>(response); {{/returnType}} } {{/operation}} diff --git a/modules/openapi-generator/src/main/resources/csharp-netcore/git_push.sh.mustache b/modules/openapi-generator/src/main/resources/csharp-netcore/git_push.sh.mustache index 8b3f689c9121a65080ad038d37a2036b01e559a1..f0bed5bd84155f05bc3cdc67af008f524efb38a6 100644 --- a/modules/openapi-generator/src/main/resources/csharp-netcore/git_push.sh.mustache +++ b/modules/openapi-generator/src/main/resources/csharp-netcore/git_push.sh.mustache @@ -55,4 +55,3 @@ 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/csharp-netcore/libraries/httpclient/ApiClient.mustache b/modules/openapi-generator/src/main/resources/csharp-netcore/libraries/httpclient/ApiClient.mustache index e9c39ea9f6d6f87ac225454eac610a54b2a23f4c..6f3790641768da1c7f34502355bbdd6dac99cae0 100644 --- a/modules/openapi-generator/src/main/resources/csharp-netcore/libraries/httpclient/ApiClient.mustache +++ b/modules/openapi-generator/src/main/resources/csharp-netcore/libraries/httpclient/ApiClient.mustache @@ -169,7 +169,7 @@ namespace {{packageName}}.Client private readonly string _baseUrl; private readonly HttpClientHandler _httpClientHandler; - private readonly HttpClient _httpClient; + private readonly HttpClient _httpClient; private readonly bool _disposeClient; /// <summary> @@ -196,9 +196,9 @@ namespace {{packageName}}.Client /// </summary> public ApiClient() : this({{packageName}}.Client.GlobalConfiguration.Instance.BasePath) - { + { } - + /// <summary> /// Initializes a new instance of the <see cref="ApiClient" />. /// **IMPORTANT** This will also create an istance of HttpClient, which is less than ideal. @@ -207,7 +207,7 @@ namespace {{packageName}}.Client /// <param name="basePath">The target service's base path in URL format.</param> /// <exception cref="ArgumentException"></exception> public ApiClient(string basePath) - { + { if (string.IsNullOrEmpty(basePath)) throw new ArgumentException("basePath cannot be empty"); _httpClientHandler = new HttpClientHandler(); @@ -215,7 +215,7 @@ namespace {{packageName}}.Client _disposeClient = true; _baseUrl = basePath; } - + /// <summary> /// Initializes a new instance of the <see cref="ApiClient" />, defaulting to the global configurations' base url. /// </summary> @@ -228,9 +228,9 @@ namespace {{packageName}}.Client /// </remarks> public ApiClient(HttpClient client, HttpClientHandler handler = null) : this(client, {{packageName}}.Client.GlobalConfiguration.Instance.BasePath, handler) - { + { } - + /// <summary> /// Initializes a new instance of the <see cref="ApiClient" />. /// </summary> @@ -244,10 +244,10 @@ namespace {{packageName}}.Client /// The features affected are: Setting and Retrieving Cookies, Client Certificates, Proxy settings. /// </remarks> public ApiClient(HttpClient client, string basePath, HttpClientHandler handler = null) - { + { if (client == null) throw new ArgumentNullException("client cannot be null"); if (string.IsNullOrEmpty(basePath)) throw new ArgumentException("basePath cannot be empty"); - + _httpClientHandler = handler; _httpClient = client; _baseUrl = basePath; @@ -509,7 +509,7 @@ namespace {{packageName}}.Client { return await ToApiResponse<T>(response, default(T), req.RequestUri); } - + object responseData = await deserializer.Deserialize<T>(response); // if the response type is oneOf/anyOf, call FromJSON to deserialize the data diff --git a/modules/openapi-generator/src/main/resources/csharp-netcore/libraries/httpclient/api.mustache b/modules/openapi-generator/src/main/resources/csharp-netcore/libraries/httpclient/api.mustache index bf3e4377995e2fc4f96dd40e3a96b516d5340c7e..7f85a719ddf9f4ec6ee724c714501216ffe480c4 100644 --- a/modules/openapi-generator/src/main/resources/csharp-netcore/libraries/httpclient/api.mustache +++ b/modules/openapi-generator/src/main/resources/csharp-netcore/libraries/httpclient/api.mustache @@ -27,16 +27,16 @@ namespace {{packageName}}.{{apiPackage}} /// </summary> {{#notes}} /// <remarks> - /// {{notes}} + /// {{.}} /// </remarks> {{/notes}} /// <exception cref="{{packageName}}.Client.ApiException">Thrown when fails to make API call</exception> {{#allParams}}/// <param name="{{paramName}}">{{description}}{{^required}} (optional{{#defaultValue}}, default to {{.}}{{/defaultValue}}){{/required}}{{#isDeprecated}} (deprecated){{/isDeprecated}}</param> - {{/allParams}}/// <returns>{{#returnType}}{{returnType}}{{/returnType}}</returns> + {{/allParams}}/// <returns>{{returnType}}</returns> {{#isDeprecated}} [Obsolete] {{/isDeprecated}} - {{#returnType}}{{{returnType}}}{{/returnType}}{{^returnType}}void{{/returnType}} {{operationId}}({{#allParams}}{{{dataType}}} {{paramName}}{{^required}}{{#optionalMethodArgument}} = default({{{dataType}}}){{/optionalMethodArgument}}{{/required}}{{^-last}}, {{/-last}}{{/allParams}}); + {{{returnType}}}{{^returnType}}void{{/returnType}} {{operationId}}({{#allParams}}{{{dataType}}} {{paramName}}{{^required}}{{#optionalMethodArgument}} = default({{{dataType}}}){{/optionalMethodArgument}}{{/required}}{{^-last}}, {{/-last}}{{/allParams}}); /// <summary> /// {{summary}} @@ -46,11 +46,11 @@ namespace {{packageName}}.{{apiPackage}} /// </remarks> /// <exception cref="{{packageName}}.Client.ApiException">Thrown when fails to make API call</exception> {{#allParams}}/// <param name="{{paramName}}">{{description}}{{^required}} (optional{{#defaultValue}}, default to {{.}}{{/defaultValue}}){{/required}}{{#isDeprecated}} (deprecated){{/isDeprecated}}</param> - {{/allParams}}/// <returns>ApiResponse of {{#returnType}}{{returnType}}{{/returnType}}{{^returnType}}Object(void){{/returnType}}</returns> + {{/allParams}}/// <returns>ApiResponse of {{returnType}}{{^returnType}}Object(void){{/returnType}}</returns> {{#isDeprecated}} [Obsolete] {{/isDeprecated}} - ApiResponse<{{#returnType}}{{{returnType}}}{{/returnType}}{{^returnType}}Object{{/returnType}}> {{operationId}}WithHttpInfo({{#allParams}}{{{dataType}}} {{paramName}}{{^required}}{{#optionalMethodArgument}} = default({{{dataType}}}){{/optionalMethodArgument}}{{/required}}{{^-last}}, {{/-last}}{{/allParams}}); + ApiResponse<{{{returnType}}}{{^returnType}}Object{{/returnType}}> {{operationId}}WithHttpInfo({{#allParams}}{{{dataType}}} {{paramName}}{{^required}}{{#optionalMethodArgument}} = default({{{dataType}}}){{/optionalMethodArgument}}{{/required}}{{^-last}}, {{/-last}}{{/allParams}}); {{/operation}} #endregion Synchronous Operations } @@ -74,11 +74,11 @@ namespace {{packageName}}.{{apiPackage}} /// <param name="{{paramName}}">{{description}}{{^required}} (optional{{#defaultValue}}, default to {{.}}{{/defaultValue}}){{/required}}{{#isDeprecated}} (deprecated){{/isDeprecated}}</param> {{/allParams}} /// <param name="cancellationToken">Cancellation Token to cancel the request.</param> - /// <returns>Task of {{#returnType}}{{returnType}}{{/returnType}}{{^returnType}}void{{/returnType}}</returns> + /// <returns>Task of {{returnType}}{{^returnType}}void{{/returnType}}</returns> {{#isDeprecated}} [Obsolete] {{/isDeprecated}} - {{#returnType}}System.Threading.Tasks.Task<{{{returnType}}}>{{/returnType}}{{^returnType}}System.Threading.Tasks.Task{{/returnType}} {{operationId}}Async({{#allParams}}{{{dataType}}} {{paramName}}{{^required}}{{#optionalMethodArgument}} = default({{{dataType}}}){{/optionalMethodArgument}}{{/required}}{{^-last}}, {{/-last}}{{/allParams}}{{#allParams.0}}, {{/allParams.0}}System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + {{#returnType}}System.Threading.Tasks.Task<{{{.}}}>{{/returnType}}{{^returnType}}System.Threading.Tasks.Task{{/returnType}} {{operationId}}Async({{#allParams}}{{{dataType}}} {{paramName}}{{^required}}{{#optionalMethodArgument}} = default({{{dataType}}}){{/optionalMethodArgument}}{{/required}}{{^-last}}, {{/-last}}{{/allParams}}{{#allParams.0}}, {{/allParams.0}}System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); /// <summary> /// {{summary}} @@ -91,11 +91,11 @@ namespace {{packageName}}.{{apiPackage}} /// <param name="{{paramName}}">{{description}}{{^required}} (optional{{#defaultValue}}, default to {{.}}{{/defaultValue}}){{/required}}{{#isDeprecated}} (deprecated){{/isDeprecated}}</param> {{/allParams}} /// <param name="cancellationToken">Cancellation Token to cancel the request.</param> - /// <returns>Task of ApiResponse{{#returnType}} ({{returnType}}){{/returnType}}</returns> + /// <returns>Task of ApiResponse{{#returnType}} ({{.}}){{/returnType}}</returns> {{#isDeprecated}} [Obsolete] {{/isDeprecated}} - System.Threading.Tasks.Task<ApiResponse<{{#returnType}}{{{returnType}}}{{/returnType}}{{^returnType}}Object{{/returnType}}>> {{operationId}}WithHttpInfoAsync({{#allParams}}{{{dataType}}} {{paramName}}{{^required}}{{#optionalMethodArgument}} = default({{{dataType}}}){{/optionalMethodArgument}}{{/required}}{{^-last}}, {{/-last}}{{/allParams}}{{#allParams.0}}, {{/allParams.0}}System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task<ApiResponse<{{{returnType}}}{{^returnType}}Object{{/returnType}}>> {{operationId}}WithHttpInfoAsync({{#allParams}}{{{dataType}}} {{paramName}}{{^required}}{{#optionalMethodArgument}} = default({{{dataType}}}){{/optionalMethodArgument}}{{/required}}{{^-last}}, {{/-last}}{{/allParams}}{{#allParams.0}}, {{/allParams.0}}System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); {{/operation}} #endregion Asynchronous Operations } @@ -331,11 +331,11 @@ namespace {{packageName}}.{{apiPackage}} /// </summary> /// <exception cref="{{packageName}}.Client.ApiException">Thrown when fails to make API call</exception> {{#allParams}}/// <param name="{{paramName}}">{{description}}{{^required}} (optional{{#defaultValue}}, default to {{.}}{{/defaultValue}}){{/required}}{{#isDeprecated}} (deprecated){{/isDeprecated}}</param> - {{/allParams}}/// <returns>{{#returnType}}{{returnType}}{{/returnType}}</returns> + {{/allParams}}/// <returns>{{returnType}}</returns> {{#isDeprecated}} [Obsolete] {{/isDeprecated}} - public {{#returnType}}{{{returnType}}}{{/returnType}}{{^returnType}}void{{/returnType}} {{operationId}}({{#allParams}}{{{dataType}}} {{paramName}}{{^required}}{{#optionalMethodArgument}} = default({{{dataType}}}){{/optionalMethodArgument}}{{/required}}{{^-last}}, {{/-last}}{{/allParams}}) + public {{{returnType}}}{{^returnType}}void{{/returnType}} {{operationId}}({{#allParams}}{{{dataType}}} {{paramName}}{{^required}}{{#optionalMethodArgument}} = default({{{dataType}}}){{/optionalMethodArgument}}{{/required}}{{^-last}}, {{/-last}}{{/allParams}}) { {{#returnType}}{{packageName}}.Client.ApiResponse<{{{returnType}}}> localVarResponse = {{operationId}}WithHttpInfo({{#allParams}}{{paramName}}{{^-last}}, {{/-last}}{{/allParams}}); return localVarResponse.Data;{{/returnType}}{{^returnType}}{{operationId}}WithHttpInfo({{#allParams}}{{paramName}}{{^-last}}, {{/-last}}{{/allParams}});{{/returnType}} @@ -346,11 +346,11 @@ namespace {{packageName}}.{{apiPackage}} /// </summary> /// <exception cref="{{packageName}}.Client.ApiException">Thrown when fails to make API call</exception> {{#allParams}}/// <param name="{{paramName}}">{{description}}{{^required}} (optional{{#defaultValue}}, default to {{.}}{{/defaultValue}}){{/required}}{{#isDeprecated}} (deprecated){{/isDeprecated}}</param> - {{/allParams}}/// <returns>ApiResponse of {{#returnType}}{{returnType}}{{/returnType}}{{^returnType}}Object(void){{/returnType}}</returns> + {{/allParams}}/// <returns>ApiResponse of {{returnType}}{{^returnType}}Object(void){{/returnType}}</returns> {{#isDeprecated}} [Obsolete] {{/isDeprecated}} - public {{packageName}}.Client.ApiResponse<{{#returnType}}{{{returnType}}}{{/returnType}}{{^returnType}}Object{{/returnType}}> {{operationId}}WithHttpInfo({{#allParams}}{{{dataType}}} {{paramName}}{{^required}}{{#optionalMethodArgument}} = default({{{dataType}}}){{/optionalMethodArgument}}{{/required}}{{^-last}}, {{/-last}}{{/allParams}}) + public {{packageName}}.Client.ApiResponse<{{{returnType}}}{{^returnType}}Object{{/returnType}}> {{operationId}}WithHttpInfo({{#allParams}}{{{dataType}}} {{paramName}}{{^required}}{{#optionalMethodArgument}} = default({{{dataType}}}){{/optionalMethodArgument}}{{/required}}{{^-last}}, {{/-last}}{{/allParams}}) { {{#allParams}} {{#required}} @@ -398,14 +398,14 @@ namespace {{packageName}}.{{apiPackage}} {{#required}} {{#isDeepObject}} {{#items.vars}} - localVarRequestOptions.QueryParameters.Add({{packageName}}.Client.ClientUtils.ParameterToMultiMap("{{#collectionFormat}}{{collectionFormat}}{{/collectionFormat}}", "{{baseName}}", {{paramName}}.{{name}})); + localVarRequestOptions.QueryParameters.Add({{packageName}}.Client.ClientUtils.ParameterToMultiMap("{{collectionFormat}}", "{{baseName}}", {{paramName}}.{{name}})); {{/items.vars}} {{^items}} localVarRequestOptions.QueryParameters.Add({{packageName}}.Client.ClientUtils.ParameterToMultiMap("deepObject", "{{baseName}}", {{paramName}})); {{/items}} {{/isDeepObject}} {{^isDeepObject}} - localVarRequestOptions.QueryParameters.Add({{packageName}}.Client.ClientUtils.ParameterToMultiMap("{{#collectionFormat}}{{collectionFormat}}{{/collectionFormat}}", "{{baseName}}", {{paramName}})); + localVarRequestOptions.QueryParameters.Add({{packageName}}.Client.ClientUtils.ParameterToMultiMap("{{collectionFormat}}", "{{baseName}}", {{paramName}})); {{/isDeepObject}} {{/required}} {{^required}} @@ -415,7 +415,7 @@ namespace {{packageName}}.{{apiPackage}} {{#items.vars}} if ({{paramName}}.{{name}} != null) { - localVarRequestOptions.QueryParameters.Add({{packageName}}.Client.ClientUtils.ParameterToMultiMap("{{#collectionFormat}}{{collectionFormat}}{{/collectionFormat}}", "{{baseName}}", {{paramName}}.{{name}})); + localVarRequestOptions.QueryParameters.Add({{packageName}}.Client.ClientUtils.ParameterToMultiMap("{{collectionFormat}}", "{{baseName}}", {{paramName}}.{{name}})); } {{/items.vars}} {{^items}} @@ -423,7 +423,7 @@ namespace {{packageName}}.{{apiPackage}} {{/items}} {{/isDeepObject}} {{^isDeepObject}} - localVarRequestOptions.QueryParameters.Add({{packageName}}.Client.ClientUtils.ParameterToMultiMap("{{#collectionFormat}}{{collectionFormat}}{{/collectionFormat}}", "{{baseName}}", {{paramName}})); + localVarRequestOptions.QueryParameters.Add({{packageName}}.Client.ClientUtils.ParameterToMultiMap("{{collectionFormat}}", "{{baseName}}", {{paramName}})); {{/isDeepObject}} } {{/required}} @@ -528,7 +528,7 @@ namespace {{packageName}}.{{apiPackage}} {{/authMethods}} // make the HTTP request - var localVarResponse = this.Client.{{#lambda.titlecase}}{{#lambda.lowercase}}{{httpMethod}}{{/lambda.lowercase}}{{/lambda.titlecase}}<{{#returnType}}{{{returnType}}}{{/returnType}}{{^returnType}}Object{{/returnType}}>("{{{path}}}", localVarRequestOptions, this.Configuration); + var localVarResponse = this.Client.{{#lambda.titlecase}}{{#lambda.lowercase}}{{httpMethod}}{{/lambda.lowercase}}{{/lambda.titlecase}}<{{{returnType}}}{{^returnType}}Object{{/returnType}}>("{{{path}}}", localVarRequestOptions, this.Configuration); if (this.ExceptionFactory != null) { @@ -548,11 +548,11 @@ namespace {{packageName}}.{{apiPackage}} /// <param name="{{paramName}}">{{description}}{{^required}} (optional{{#defaultValue}}, default to {{.}}{{/defaultValue}}){{/required}}{{#isDeprecated}} (deprecated){{/isDeprecated}}</param> {{/allParams}} /// <param name="cancellationToken">Cancellation Token to cancel the request.</param> - /// <returns>Task of {{#returnType}}{{returnType}}{{/returnType}}{{^returnType}}void{{/returnType}}</returns> + /// <returns>Task of {{returnType}}{{^returnType}}void{{/returnType}}</returns> {{#isDeprecated}} [Obsolete] {{/isDeprecated}} - {{#returnType}}public async System.Threading.Tasks.Task<{{{returnType}}}>{{/returnType}}{{^returnType}}public async System.Threading.Tasks.Task{{/returnType}} {{operationId}}Async({{#allParams}}{{{dataType}}} {{paramName}}{{^required}}{{#optionalMethodArgument}} = default({{{dataType}}}){{/optionalMethodArgument}}{{/required}}{{^-last}}, {{/-last}}{{/allParams}}{{#allParams.0}}, {{/allParams.0}}System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + {{#returnType}}public async System.Threading.Tasks.Task<{{{.}}}>{{/returnType}}{{^returnType}}public async System.Threading.Tasks.Task{{/returnType}} {{operationId}}Async({{#allParams}}{{{dataType}}} {{paramName}}{{^required}}{{#optionalMethodArgument}} = default({{{dataType}}}){{/optionalMethodArgument}}{{/required}}{{^-last}}, {{/-last}}{{/allParams}}{{#allParams.0}}, {{/allParams.0}}System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { {{#returnType}}{{packageName}}.Client.ApiResponse<{{{returnType}}}> localVarResponse = await {{operationId}}WithHttpInfoAsync({{#allParams}}{{paramName}}{{^-last}}, {{/-last}}{{/allParams}}{{#allParams.0}}, {{/allParams.0}}cancellationToken).ConfigureAwait(false); return localVarResponse.Data;{{/returnType}}{{^returnType}}await {{operationId}}WithHttpInfoAsync({{#allParams}}{{paramName}}{{^-last}}, {{/-last}}{{/allParams}}{{#allParams.0}}, {{/allParams.0}}cancellationToken).ConfigureAwait(false);{{/returnType}} @@ -566,11 +566,11 @@ namespace {{packageName}}.{{apiPackage}} /// <param name="{{paramName}}">{{description}}{{^required}} (optional{{#defaultValue}}, default to {{.}}{{/defaultValue}}){{/required}}{{#isDeprecated}} (deprecated){{/isDeprecated}}</param> {{/allParams}} /// <param name="cancellationToken">Cancellation Token to cancel the request.</param> - /// <returns>Task of ApiResponse{{#returnType}} ({{returnType}}){{/returnType}}</returns> + /// <returns>Task of ApiResponse{{#returnType}} ({{.}}){{/returnType}}</returns> {{#isDeprecated}} [Obsolete] {{/isDeprecated}} - public async System.Threading.Tasks.Task<{{packageName}}.Client.ApiResponse<{{#returnType}}{{{returnType}}}{{/returnType}}{{^returnType}}Object{{/returnType}}>> {{operationId}}WithHttpInfoAsync({{#allParams}}{{{dataType}}} {{paramName}}{{^required}}{{#optionalMethodArgument}} = default({{{dataType}}}){{/optionalMethodArgument}}{{/required}}{{^-last}}, {{/-last}}{{/allParams}}{{#allParams.0}}, {{/allParams.0}}System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task<{{packageName}}.Client.ApiResponse<{{{returnType}}}{{^returnType}}Object{{/returnType}}>> {{operationId}}WithHttpInfoAsync({{#allParams}}{{{dataType}}} {{paramName}}{{^required}}{{#optionalMethodArgument}} = default({{{dataType}}}){{/optionalMethodArgument}}{{/required}}{{^-last}}, {{/-last}}{{/allParams}}{{#allParams.0}}, {{/allParams.0}}System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { {{#allParams}} {{#required}} @@ -618,12 +618,12 @@ namespace {{packageName}}.{{apiPackage}} {{/pathParams}} {{#queryParams}} {{#required}} - localVarRequestOptions.QueryParameters.Add({{packageName}}.Client.ClientUtils.ParameterToMultiMap("{{#collectionFormat}}{{collectionFormat}}{{/collectionFormat}}", "{{baseName}}", {{paramName}})); + localVarRequestOptions.QueryParameters.Add({{packageName}}.Client.ClientUtils.ParameterToMultiMap("{{collectionFormat}}", "{{baseName}}", {{paramName}})); {{/required}} {{^required}} if ({{paramName}} != null) { - localVarRequestOptions.QueryParameters.Add({{packageName}}.Client.ClientUtils.ParameterToMultiMap("{{#collectionFormat}}{{collectionFormat}}{{/collectionFormat}}", "{{baseName}}", {{paramName}})); + localVarRequestOptions.QueryParameters.Add({{packageName}}.Client.ClientUtils.ParameterToMultiMap("{{collectionFormat}}", "{{baseName}}", {{paramName}})); } {{/required}} {{/queryParams}} @@ -730,7 +730,7 @@ namespace {{packageName}}.{{apiPackage}} // make the HTTP request - var localVarResponse = await this.AsynchronousClient.{{#lambda.titlecase}}{{#lambda.lowercase}}{{httpMethod}}{{/lambda.lowercase}}{{/lambda.titlecase}}Async<{{#returnType}}{{{returnType}}}{{/returnType}}{{^returnType}}Object{{/returnType}}>("{{{path}}}", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); + var localVarResponse = await this.AsynchronousClient.{{#lambda.titlecase}}{{#lambda.lowercase}}{{httpMethod}}{{/lambda.lowercase}}{{/lambda.titlecase}}Async<{{{returnType}}}{{^returnType}}Object{{/returnType}}>("{{{path}}}", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); if (this.ExceptionFactory != null) { diff --git a/modules/openapi-generator/src/main/resources/csharp-netcore/modelAnyOf.mustache b/modules/openapi-generator/src/main/resources/csharp-netcore/modelAnyOf.mustache index c1b96657ae089ec56e7f26676421a8b4f66cd37d..807aa3b47ef7c734c75e125a60b8d606cb0b4734 100644 --- a/modules/openapi-generator/src/main/resources/csharp-netcore/modelAnyOf.mustache +++ b/modules/openapi-generator/src/main/resources/csharp-netcore/modelAnyOf.mustache @@ -1,9 +1,9 @@ /// <summary> - /// {{#description}}{{.}}{{/description}}{{^description}}{{classname}}{{/description}} + /// {{description}}{{^description}}{{classname}}{{/description}} /// </summary> [JsonConverter(typeof({{classname}}JsonConverter))] [DataContract(Name = "{{{name}}}")] - {{>visibility}} partial class {{classname}} : AbstractOpenAPISchema, {{#parent}}{{{parent}}}, {{/parent}}IEquatable<{{classname}}>{{#validatable}}, IValidatableObject{{/validatable}} + {{>visibility}} partial class {{classname}} : AbstractOpenAPISchema, {{#parent}}{{{.}}}, {{/parent}}IEquatable<{{classname}}>{{#validatable}}, IValidatableObject{{/validatable}} { {{#isNullable}} /// <summary> diff --git a/modules/openapi-generator/src/main/resources/csharp-netcore/modelEnum.mustache b/modules/openapi-generator/src/main/resources/csharp-netcore/modelEnum.mustache index c977374019f90cf88403bb5b6d09069f204fa4ef..d781952b4e090738449ed9b5cd980cd5d1e74bca 100644 --- a/modules/openapi-generator/src/main/resources/csharp-netcore/modelEnum.mustache +++ b/modules/openapi-generator/src/main/resources/csharp-netcore/modelEnum.mustache @@ -1,8 +1,8 @@ /// <summary> - /// {{^description}}Defines {{{name}}}{{/description}}{{#description}}{{description}}{{/description}} + /// {{description}}{{^description}}Defines {{{name}}}{{/description}} /// </summary> {{#description}} - /// <value>{{description}}</value> + /// <value>{{.}}</value> {{/description}} {{#allowableValues}} {{#enumVars}} @@ -13,7 +13,7 @@ {{/-first}} {{/enumVars}} {{/allowableValues}} - {{>visibility}} enum {{#datatypeWithEnum}}{{.}}{{/datatypeWithEnum}}{{^datatypeWithEnum}}{{classname}}{{/datatypeWithEnum}}{{#vendorExtensions.x-enum-byte}}: byte{{/vendorExtensions.x-enum-byte}} + {{>visibility}} enum {{datatypeWithEnum}}{{^datatypeWithEnum}}{{classname}}{{/datatypeWithEnum}}{{#vendorExtensions.x-enum-byte}}: byte{{/vendorExtensions.x-enum-byte}} { {{#allowableValues}} {{#enumVars}} diff --git a/modules/openapi-generator/src/main/resources/csharp-netcore/modelGeneric.mustache b/modules/openapi-generator/src/main/resources/csharp-netcore/modelGeneric.mustache index ad65a3b836133477410a31bb29fa32ffcd62372b..aaff4be3e25512af21cdbfd1ca69c2477ae36df0 100644 --- a/modules/openapi-generator/src/main/resources/csharp-netcore/modelGeneric.mustache +++ b/modules/openapi-generator/src/main/resources/csharp-netcore/modelGeneric.mustache @@ -1,5 +1,5 @@ /// <summary> - /// {{#description}}{{.}}{{/description}}{{^description}}{{classname}}{{/description}} + /// {{description}}{{^description}}{{classname}}{{/description}} /// </summary> [DataContract(Name = "{{{name}}}")] {{#discriminator}} @@ -8,7 +8,7 @@ [JsonSubtypes.KnownSubType(typeof({{{modelName}}}), "{{^vendorExtensions.x-discriminator-value}}{{{mappingName}}}{{/vendorExtensions.x-discriminator-value}}{{#vendorExtensions.x-discriminator-value}}{{{.}}}{{/vendorExtensions.x-discriminator-value}}")] {{/mappedModels}} {{/discriminator}} - {{>visibility}} partial class {{classname}} : {{#parent}}{{{parent}}}, {{/parent}}IEquatable<{{classname}}>{{#validatable}}, IValidatableObject{{/validatable}} + {{>visibility}} partial class {{classname}} : {{#parent}}{{{.}}}, {{/parent}}IEquatable<{{classname}}>{{#validatable}}, IValidatableObject{{/validatable}} { {{#vars}} {{#items.isEnum}} @@ -26,17 +26,17 @@ {{#isEnum}} /// <summary> - /// {{^description}}Gets or Sets {{{name}}}{{/description}}{{#description}}{{description}}{{/description}} + /// {{description}}{{^description}}Gets or Sets {{{name}}}{{/description}} /// </summary> {{#description}} - /// <value>{{description}}</value> + /// <value>{{.}}</value> {{/description}} {{^conditionalSerialization}} [DataMember(Name = "{{baseName}}"{{#required}}, IsRequired = true{{/required}}, EmitDefaultValue = {{#vendorExtensions.x-emit-default-value}}true{{/vendorExtensions.x-emit-default-value}}{{^vendorExtensions.x-emit-default-value}}{{#isBoolean}}true{{/isBoolean}}{{^isBoolean}}{{#isNullable}}true{{/isNullable}}{{^isNullable}}false{{/isNullable}}{{/isBoolean}}{{/vendorExtensions.x-emit-default-value}})] {{#deprecated}} [Obsolete] {{/deprecated}} - public {{#complexType}}{{{complexType}}}{{/complexType}}{{^complexType}}{{{datatypeWithEnum}}}{{/complexType}}{{^isContainer}}{{^required}}?{{/required}}{{/isContainer}} {{name}} { get; set; } + public {{{complexType}}}{{^complexType}}{{{datatypeWithEnum}}}{{/complexType}}{{^isContainer}}{{^required}}?{{/required}}{{/isContainer}} {{name}} { get; set; } {{#isReadOnly}} /// <summary> @@ -55,8 +55,8 @@ {{#deprecated}} [Obsolete] {{/deprecated}} - public {{#complexType}}{{{complexType}}}{{/complexType}}{{^complexType}}{{{datatypeWithEnum}}}{{/complexType}}{{^isContainer}}{{^required}}?{{/required}}{{/isContainer}} {{name}} { get; set; } - + public {{{complexType}}}{{^complexType}}{{{datatypeWithEnum}}}{{/complexType}}{{^isContainer}}{{^required}}?{{/required}}{{/isContainer}} {{name}} { get; set; } + /// <summary> /// Returns false as {{name}} should not be serialized given that it's read-only. @@ -67,14 +67,14 @@ return false; } {{/isReadOnly}} - + {{^isReadOnly}} [DataMember(Name = "{{baseName}}"{{#required}}, IsRequired = true{{/required}}, EmitDefaultValue = {{#vendorExtensions.x-emit-default-value}}true{{/vendorExtensions.x-emit-default-value}}{{^vendorExtensions.x-emit-default-value}}{{#isBoolean}}true{{/isBoolean}}{{^isBoolean}}{{#isNullable}}true{{/isNullable}}{{^isNullable}}false{{/isNullable}}{{/isBoolean}}{{/vendorExtensions.x-emit-default-value}})] {{#deprecated}} [Obsolete] {{/deprecated}} - public {{#complexType}}{{{complexType}}}{{/complexType}}{{^complexType}}{{{datatypeWithEnum}}}{{/complexType}}{{^isContainer}}{{^required}}?{{/required}}{{/isContainer}} {{name}} - { + public {{{complexType}}}{{^complexType}}{{{datatypeWithEnum}}}{{/complexType}}{{^isContainer}}{{^required}}?{{/required}}{{/isContainer}} {{name}} + { get{ return _{{name}};} set { @@ -82,7 +82,7 @@ _flag{{name}} = true; } } - private {{#complexType}}{{{complexType}}}{{/complexType}}{{^complexType}}{{{datatypeWithEnum}}}{{/complexType}}{{^isContainer}}{{^required}}?{{/required}}{{/isContainer}} _{{name}}; + private {{{complexType}}}{{^complexType}}{{{datatypeWithEnum}}}{{/complexType}}{{^isContainer}}{{^required}}?{{/required}}{{/isContainer}} _{{name}}; private bool _flag{{name}}; /// <summary> @@ -118,7 +118,7 @@ /// Initializes a new instance of the <see cref="{{classname}}" /> class. /// </summary> {{#readWriteVars}} - /// <param name="{{#lambda.camelcase_param}}{{name}}{{/lambda.camelcase_param}}">{{#description}}{{description}}{{/description}}{{^description}}{{#lambda.camelcase_param}}{{name}}{{/lambda.camelcase_param}}{{/description}}{{#required}} (required){{/required}}{{#defaultValue}} (default to {{defaultValue}}){{/defaultValue}}.</param> + /// <param name="{{#lambda.camelcase_param}}{{name}}{{/lambda.camelcase_param}}">{{description}}{{^description}}{{#lambda.camelcase_param}}{{name}}{{/lambda.camelcase_param}}{{/description}}{{#required}} (required){{/required}}{{#defaultValue}} (default to {{.}}){{/defaultValue}}.</param> {{/readWriteVars}} {{#hasOnlyReadOnly}} [JsonConstructorAttribute] @@ -185,9 +185,9 @@ {{^isInherited}} {{^isEnum}} /// <summary> - /// {{^description}}Gets or Sets {{{name}}}{{/description}}{{#description}}{{description}}{{/description}} + /// {{description}}{{^description}}Gets or Sets {{{name}}}{{/description}} /// </summary>{{#description}} - /// <value>{{description}}</value>{{/description}} + /// <value>{{.}}</value>{{/description}} {{^conditionalSerialization}} [DataMember(Name = "{{baseName}}"{{#required}}, IsRequired = true{{/required}}, EmitDefaultValue = {{#vendorExtensions.x-emit-default-value}}true{{/vendorExtensions.x-emit-default-value}}{{^vendorExtensions.x-emit-default-value}}{{#isBoolean}}true{{/isBoolean}}{{^isBoolean}}{{#isNullable}}true{{/isNullable}}{{^isNullable}}false{{/isNullable}}{{/isBoolean}}{{/vendorExtensions.x-emit-default-value}})] {{#isDate}} @@ -219,7 +219,7 @@ [Obsolete] {{/deprecated}} public {{{dataType}}} {{name}} { get; private set; } - + /// <summary> /// Returns false as {{name}} should not be serialized given that it's read-only. /// </summary> @@ -238,13 +238,13 @@ [Obsolete] {{/deprecated}} public {{{dataType}}} {{name}} - { + { get{ return _{{name}};} set { _{{name}} = value; _flag{{name}} = true; - } + } } private {{{dataType}}} _{{name}}; private bool _flag{{name}}; diff --git a/modules/openapi-generator/src/main/resources/csharp-netcore/modelInnerEnum.mustache b/modules/openapi-generator/src/main/resources/csharp-netcore/modelInnerEnum.mustache index 90090fea8c932d447066bc6a93afca9c23c06d94..6af921832af48986f6ebfbc0cee3d7809d6b433c 100644 --- a/modules/openapi-generator/src/main/resources/csharp-netcore/modelInnerEnum.mustache +++ b/modules/openapi-generator/src/main/resources/csharp-netcore/modelInnerEnum.mustache @@ -1,14 +1,14 @@ {{^isContainer}} /// <summary> - /// {{^description}}Defines {{{name}}}{{/description}}{{#description}}{{description}}{{/description}} + /// {{description}}{{^description}}Defines {{{name}}}{{/description}} /// </summary> {{#description}} - /// <value>{{description}}</value> + /// <value>{{.}}</value> {{/description}} {{#isString}} [JsonConverter(typeof(StringEnumConverter))] {{/isString}} - {{>visibility}} enum {{#datatypeWithEnum}}{{.}}{{/datatypeWithEnum}}{{^datatypeWithEnum}}{{classname}}{{/datatypeWithEnum}}{{#vendorExtensions.x-enum-byte}}: byte{{/vendorExtensions.x-enum-byte}} + {{>visibility}} enum {{datatypeWithEnum}}{{^datatypeWithEnum}}{{classname}}{{/datatypeWithEnum}}{{#vendorExtensions.x-enum-byte}}: byte{{/vendorExtensions.x-enum-byte}} { {{#allowableValues}} {{#enumVars}} diff --git a/modules/openapi-generator/src/main/resources/csharp-netcore/modelOneOf.mustache b/modules/openapi-generator/src/main/resources/csharp-netcore/modelOneOf.mustache index 59e2dbf19eb4d5862bd56aec66db2cb73e241b0b..9d8247195b600157f015906bf7da8586590b7948 100644 --- a/modules/openapi-generator/src/main/resources/csharp-netcore/modelOneOf.mustache +++ b/modules/openapi-generator/src/main/resources/csharp-netcore/modelOneOf.mustache @@ -1,9 +1,9 @@ /// <summary> - /// {{#description}}{{.}}{{/description}}{{^description}}{{classname}}{{/description}} + /// {{description}}{{^description}}{{classname}}{{/description}} /// </summary> [JsonConverter(typeof({{classname}}JsonConverter))] [DataContract(Name = "{{{name}}}")] - {{>visibility}} partial class {{classname}} : AbstractOpenAPISchema, {{#parent}}{{{parent}}}, {{/parent}}IEquatable<{{classname}}>{{#validatable}}, IValidatableObject{{/validatable}} + {{>visibility}} partial class {{classname}} : AbstractOpenAPISchema, {{#parent}}{{{.}}}, {{/parent}}IEquatable<{{classname}}>{{#validatable}}, IValidatableObject{{/validatable}} { {{#isNullable}} /// <summary> diff --git a/modules/openapi-generator/src/main/resources/csharp-netcore/netcore_project.mustache b/modules/openapi-generator/src/main/resources/csharp-netcore/netcore_project.mustache index 4f29dcf3d34c0e8aef383e02eba7a0f12951a8b1..3be35749bea8b6800a44a39c6dfbe24d12b98525 100644 --- a/modules/openapi-generator/src/main/resources/csharp-netcore/netcore_project.mustache +++ b/modules/openapi-generator/src/main/resources/csharp-netcore/netcore_project.mustache @@ -14,11 +14,11 @@ <RootNamespace>{{packageName}}</RootNamespace> <Version>{{packageVersion}}</Version> <DocumentationFile>bin\$(Configuration)\$(TargetFramework)\{{packageName}}.xml</DocumentationFile>{{#licenseId}} - <PackageLicenseExpression>{{licenseId}}</PackageLicenseExpression>{{/licenseId}} + <PackageLicenseExpression>{{.}}</PackageLicenseExpression>{{/licenseId}} <RepositoryUrl>https://{{{gitHost}}}/{{{gitUserId}}}/{{{gitRepoId}}}.git</RepositoryUrl> <RepositoryType>git</RepositoryType>{{#releaseNote}} - <PackageReleaseNotes>{{releaseNote}}</PackageReleaseNotes>{{/releaseNote}}{{#packageTags}} - <PackageTags>{{{packageTags}}}</PackageTags>{{/packageTags}} + <PackageReleaseNotes>{{.}}</PackageReleaseNotes>{{/releaseNote}}{{#packageTags}} + <PackageTags>{{{.}}}</PackageTags>{{/packageTags}} {{#nullableReferenceTypes}} <Nullable>annotations</Nullable> {{/nullableReferenceTypes}} diff --git a/modules/openapi-generator/src/main/resources/csharp-netcore/nuspec.mustache b/modules/openapi-generator/src/main/resources/csharp-netcore/nuspec.mustache index 66254acffd4085e139cd05c756e8b656b03b2401..9370bb01d64bb872f72064383e1abf85d73a7148 100644 --- a/modules/openapi-generator/src/main/resources/csharp-netcore/nuspec.mustache +++ b/modules/openapi-generator/src/main/resources/csharp-netcore/nuspec.mustache @@ -21,10 +21,10 @@ nuget.org gallery uses information you add in the portal. --> <description>{{packageDescription}}</description> {{#termsOfService}} - <copyright>{{termsOfService}}</copyright> + <copyright>{{.}}</copyright> {{/termsOfService}} {{#licenseUrl}} - <licenseUrl>{{licenseUrl}}</licenseUrl> + <licenseUrl>{{.}}</licenseUrl> {{/licenseUrl}} <!-- Dependencies are automatically installed when the package is installed --> diff --git a/modules/openapi-generator/src/main/resources/csharp-netcore/partial_header.mustache b/modules/openapi-generator/src/main/resources/csharp-netcore/partial_header.mustache index 755e937d23b5003ea369245459afa6457f2a9a93..1562058ad8a0b1fc13c11d8677511bcb0916fbb7 100644 --- a/modules/openapi-generator/src/main/resources/csharp-netcore/partial_header.mustache +++ b/modules/openapi-generator/src/main/resources/csharp-netcore/partial_header.mustache @@ -1,17 +1,17 @@ /* {{#appName}} - * {{{appName}}} + * {{{.}}} * {{/appName}} {{#appDescription}} - * {{{appDescription}}} + * {{{.}}} * {{/appDescription}} {{#version}} - * The version of the OpenAPI document: {{{version}}} + * The version of the OpenAPI document: {{{.}}} {{/version}} {{#infoEmail}} - * Contact: {{{infoEmail}}} + * Contact: {{{.}}} {{/infoEmail}} * Generated by: https://github.com/openapitools/openapi-generator.git */ diff --git a/modules/openapi-generator/src/main/resources/csharp/Configuration.mustache b/modules/openapi-generator/src/main/resources/csharp/Configuration.mustache index 65f1de6a8d899e7bfeacef241047a5f23e72b5e1..b21c370a0434c0717271780183055b40840dd378 100644 --- a/modules/openapi-generator/src/main/resources/csharp/Configuration.mustache +++ b/modules/openapi-generator/src/main/resources/csharp/Configuration.mustache @@ -107,7 +107,7 @@ namespace {{packageName}}.Client /// </summary> public Configuration() { - UserAgent = "{{#httpUserAgent}}{{.}}{{/httpUserAgent}}{{^httpUserAgent}}OpenAPI-Generator/{{packageVersion}}/csharp{{/httpUserAgent}}"; + UserAgent = "{{httpUserAgent}}{{^httpUserAgent}}OpenAPI-Generator/{{packageVersion}}/csharp{{/httpUserAgent}}"; BasePath = "{{{basePath}}}"; DefaultHeader = new {{^net35}}Concurrent{{/net35}}Dictionary<string, string>(); ApiKey = new {{^net35}}Concurrent{{/net35}}Dictionary<string, string>(); @@ -180,7 +180,7 @@ namespace {{packageName}}.Client string tempFolderPath = null, string dateTimeFormat = null, int timeout = 100000, - string userAgent = "{{#httpUserAgent}}{{.}}{{/httpUserAgent}}{{^httpUserAgent}}OpenAPI-Generator/{{packageVersion}}/csharp{{/httpUserAgent}}" + string userAgent = "{{httpUserAgent}}{{^httpUserAgent}}OpenAPI-Generator/{{packageVersion}}/csharp{{/httpUserAgent}}" // ReSharper restore UnusedParameter.Local ) { diff --git a/modules/openapi-generator/src/main/resources/csharp/Project.mustache b/modules/openapi-generator/src/main/resources/csharp/Project.mustache index c1862f7cb8c2921d156e3e6217acc8f93c1e8388..04458a3d1684b73c2936b93b3fa5939b5311c723 100644 --- a/modules/openapi-generator/src/main/resources/csharp/Project.mustache +++ b/modules/openapi-generator/src/main/resources/csharp/Project.mustache @@ -1,15 +1,15 @@ <?xml version="1.0" encoding="utf-8"?> <!-- {{#appName}} -{{{appName}}} +{{{.}}} {{/appName}} {{#appDescription}} -{{{appDescription}}} +{{{.}}} {{/appDescription}} -{{#version}}The version of the OpenAPI document: {{version}}{{/version}} -{{#infoEmail}}Contact: {{{infoEmail}}}{{/infoEmail}} +{{#version}}The version of the OpenAPI document: {{.}}{{/version}} +{{#infoEmail}}Contact: {{{.}}}{{/infoEmail}} --> <Project ToolsVersion="{{^netStandard}}12.0{{/netStandard}}{{#netStandard}}14.0{{/netStandard}}" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> <PropertyGroup> @@ -118,4 +118,3 @@ <Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" /> {{/netStandard}} </Project> - diff --git a/modules/openapi-generator/src/main/resources/csharp/README.mustache b/modules/openapi-generator/src/main/resources/csharp/README.mustache index 4b0d636d62cc6e1ef03f65489996b543afc41379..19fdde43db576354ce2a3f123fea3bb8245cca68 100644 --- a/modules/openapi-generator/src/main/resources/csharp/README.mustache +++ b/modules/openapi-generator/src/main/resources/csharp/README.mustache @@ -1,7 +1,7 @@ # {{packageName}} - the C# library for the {{appName}} {{#appDescriptionWithNewLines}} -{{{appDescriptionWithNewLines}}} +{{{.}}} {{/appDescriptionWithNewLines}} This C# SDK is automatically generated by the [OpenAPI Generator](https://openapi-generator.tech) project: @@ -178,7 +178,7 @@ 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}} +{{#apiInfo}}{{#apis}}{{#operations}}{{#operation}}*{{classname}}* | [**{{operationId}}**]({{apiDocPath}}{{classname}}.md#{{operationIdLowerCase}}) | **{{httpMethod}}** {{path}} | {{{summary}}} {{/operation}}{{/operations}}{{/apis}}{{/apiInfo}} ## Documentation for Models diff --git a/modules/openapi-generator/src/main/resources/csharp/TestProject.mustache b/modules/openapi-generator/src/main/resources/csharp/TestProject.mustache index 3e850f2f3ac6beea95d62aa44ff8a05bda88e0c0..1068f8db24737ff740fbca351c377158347574dd 100644 --- a/modules/openapi-generator/src/main/resources/csharp/TestProject.mustache +++ b/modules/openapi-generator/src/main/resources/csharp/TestProject.mustache @@ -1,15 +1,15 @@ <?xml version="1.0" encoding="utf-8"?> <!-- {{#appName}} -{{{appName}}} +{{{.}}} {{/appName}} {{#appDescription}} -{{{appDescription}}} +{{{.}}} {{/appDescription}} -{{#version}}The version of the OpenAPI document: {{{version}}}{{/version}} -{{#infoEmail}}Contact: {{{infoEmail}}}{{/infoEmail}} +{{#version}}The version of the OpenAPI document: {{{.}}}{{/version}} +{{#infoEmail}}Contact: {{{.}}}{{/infoEmail}} --> <Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> <PropertyGroup> @@ -98,4 +98,3 @@ </ProjectReference> </ItemGroup> </Project> - diff --git a/modules/openapi-generator/src/main/resources/csharp/api.mustache b/modules/openapi-generator/src/main/resources/csharp/api.mustache index 8e80b857ad5e25e47985bd775b30d7211b90fa85..d2dda8824f67dc7d7d52947a4132150c5ef0aeae 100644 --- a/modules/openapi-generator/src/main/resources/csharp/api.mustache +++ b/modules/openapi-generator/src/main/resources/csharp/api.mustache @@ -32,11 +32,11 @@ namespace {{packageName}}.{{apiPackage}} /// </remarks> /// <exception cref="{{packageName}}.Client.ApiException">Thrown when fails to make API call</exception> {{#allParams}}/// <param name="{{paramName}}">{{description}}{{^required}} (optional{{#defaultValue}}, default to {{.}}{{/defaultValue}}){{/required}}{{#isDeprecated}} (deprecated){{/isDeprecated}}</param> - {{/allParams}}/// <returns>{{#returnType}}{{returnType}}{{/returnType}}</returns> + {{/allParams}}/// <returns>{{returnType}}</returns> {{#isDeprecated}} [Obsolete] {{/isDeprecated}} - {{#returnType}}{{{returnType}}}{{/returnType}}{{^returnType}}void{{/returnType}} {{operationId}} ({{#allParams}}{{{dataType}}} {{paramName}}{{^required}}{{#optionalMethodArgument}} = default({{{dataType}}}){{/optionalMethodArgument}}{{/required}}{{^-last}}, {{/-last}}{{/allParams}}); + {{{returnType}}}{{^returnType}}void{{/returnType}} {{operationId}} ({{#allParams}}{{{dataType}}} {{paramName}}{{^required}}{{#optionalMethodArgument}} = default({{{dataType}}}){{/optionalMethodArgument}}{{/required}}{{^-last}}, {{/-last}}{{/allParams}}); /// <summary> /// {{summary}} @@ -46,11 +46,11 @@ namespace {{packageName}}.{{apiPackage}} /// </remarks> /// <exception cref="{{packageName}}.Client.ApiException">Thrown when fails to make API call</exception> {{#allParams}}/// <param name="{{paramName}}">{{description}}{{^required}} (optional{{#defaultValue}}, default to {{.}}{{/defaultValue}}){{/required}}{{#isDeprecated}} (deprecated){{/isDeprecated}}</param> - {{/allParams}}/// <returns>ApiResponse of {{#returnType}}{{returnType}}{{/returnType}}{{^returnType}}Object(void){{/returnType}}</returns> + {{/allParams}}/// <returns>ApiResponse of {{returnType}}{{^returnType}}Object(void){{/returnType}}</returns> {{#isDeprecated}} [Obsolete] {{/isDeprecated}} - ApiResponse<{{#returnType}}{{{returnType}}}{{/returnType}}{{^returnType}}Object{{/returnType}}> {{operationId}}WithHttpInfo ({{#allParams}}{{{dataType}}} {{paramName}}{{^required}}{{#optionalMethodArgument}} = default({{{dataType}}}){{/optionalMethodArgument}}{{/required}}{{^-last}}, {{/-last}}{{/allParams}}); + ApiResponse<{{{returnType}}}{{^returnType}}Object{{/returnType}}> {{operationId}}WithHttpInfo ({{#allParams}}{{{dataType}}} {{paramName}}{{^required}}{{#optionalMethodArgument}} = default({{{dataType}}}){{/optionalMethodArgument}}{{/required}}{{^-last}}, {{/-last}}{{/allParams}}); {{/operation}} #endregion Synchronous Operations {{#supportsAsync}} @@ -65,11 +65,11 @@ namespace {{packageName}}.{{apiPackage}} /// <exception cref="{{packageName}}.Client.ApiException">Thrown when fails to make API call</exception> {{#allParams}}/// <param name="{{paramName}}">{{description}}{{^required}} (optional{{#defaultValue}}, default to {{.}}{{/defaultValue}}){{/required}}{{#isDeprecated}} (deprecated){{/isDeprecated}}</param> {{/allParams}}/// <param name="cancellationToken">Cancellation Token to cancel request (optional) </param> - /// <returns>Task of {{#returnType}}{{returnType}}{{/returnType}}{{^returnType}}void{{/returnType}}</returns> + /// <returns>Task of {{returnType}}{{^returnType}}void{{/returnType}}</returns> {{#isDeprecated}} [Obsolete] {{/isDeprecated}} - {{#returnType}}System.Threading.Tasks.Task<{{{returnType}}}>{{/returnType}}{{^returnType}}System.Threading.Tasks.Task{{/returnType}} {{operationId}}Async ({{#allParams}}{{{dataType}}} {{paramName}}{{^required}}{{#optionalMethodArgument}} = default({{{dataType}}}){{/optionalMethodArgument}}{{/required}}{{^-last}}, {{/-last}}{{/allParams}}{{#allParams.0}}, {{/allParams.0}}CancellationToken cancellationToken = default(CancellationToken)); + {{#returnType}}System.Threading.Tasks.Task<{{{.}}}>{{/returnType}}{{^returnType}}System.Threading.Tasks.Task{{/returnType}} {{operationId}}Async ({{#allParams}}{{{dataType}}} {{paramName}}{{^required}}{{#optionalMethodArgument}} = default({{{dataType}}}){{/optionalMethodArgument}}{{/required}}{{^-last}}, {{/-last}}{{/allParams}}{{#allParams.0}}, {{/allParams.0}}CancellationToken cancellationToken = default(CancellationToken)); /// <summary> /// {{summary}} @@ -80,11 +80,11 @@ namespace {{packageName}}.{{apiPackage}} /// <exception cref="{{packageName}}.Client.ApiException">Thrown when fails to make API call</exception> {{#allParams}}/// <param name="{{paramName}}">{{description}}{{^required}} (optional{{#defaultValue}}, default to {{.}}{{/defaultValue}}){{/required}}{{#isDeprecated}} (deprecated){{/isDeprecated}}</param> {{/allParams}}/// <param name="cancellationToken">Cancellation Token to cancel request (optional) </param> - /// <returns>Task of ApiResponse{{#returnType}} ({{returnType}}){{/returnType}}</returns> + /// <returns>Task of ApiResponse{{#returnType}} ({{.}}){{/returnType}}</returns> {{#isDeprecated}} [Obsolete] {{/isDeprecated}} - System.Threading.Tasks.Task<ApiResponse<{{#returnType}}{{{returnType}}}{{/returnType}}{{^returnType}}Object{{/returnType}}>> {{operationId}}WithHttpInfoAsync ({{#allParams}}{{{dataType}}} {{paramName}}{{^required}}{{#optionalMethodArgument}} = default({{{dataType}}}){{/optionalMethodArgument}}{{/required}}{{^-last}}, {{/-last}}{{/allParams}}{{#allParams.0}}, {{/allParams.0}}CancellationToken cancellationToken = default(CancellationToken)); + System.Threading.Tasks.Task<ApiResponse<{{{returnType}}}{{^returnType}}Object{{/returnType}}>> {{operationId}}WithHttpInfoAsync ({{#allParams}}{{{dataType}}} {{paramName}}{{^required}}{{#optionalMethodArgument}} = default({{{dataType}}}){{/optionalMethodArgument}}{{/required}}{{^-last}}, {{/-last}}{{/allParams}}{{#allParams.0}}, {{/allParams.0}}CancellationToken cancellationToken = default(CancellationToken)); {{/operation}} #endregion Asynchronous Operations {{/supportsAsync}} @@ -204,11 +204,11 @@ namespace {{packageName}}.{{apiPackage}} /// </summary> /// <exception cref="{{packageName}}.Client.ApiException">Thrown when fails to make API call</exception> {{#allParams}}/// <param name="{{paramName}}">{{description}}{{^required}} (optional{{#defaultValue}}, default to {{.}}{{/defaultValue}}){{/required}}{{#isDeprecated}} (deprecated){{/isDeprecated}}</param> - {{/allParams}}/// <returns>{{#returnType}}{{returnType}}{{/returnType}}</returns> + {{/allParams}}/// <returns>{{returnType}}</returns> {{#isDeprecated}} [Obsolete] {{/isDeprecated}} - public {{#returnType}}{{{returnType}}}{{/returnType}}{{^returnType}}void{{/returnType}} {{operationId}} ({{#allParams}}{{{dataType}}} {{paramName}}{{^required}}{{#optionalMethodArgument}} = default({{{dataType}}}){{/optionalMethodArgument}}{{/required}}{{^-last}}, {{/-last}}{{/allParams}}) + public {{{returnType}}}{{^returnType}}void{{/returnType}} {{operationId}} ({{#allParams}}{{{dataType}}} {{paramName}}{{^required}}{{#optionalMethodArgument}} = default({{{dataType}}}){{/optionalMethodArgument}}{{/required}}{{^-last}}, {{/-last}}{{/allParams}}) { {{#returnType}}ApiResponse<{{{returnType}}}> localVarResponse = {{operationId}}WithHttpInfo({{#allParams}}{{paramName}}{{^-last}}, {{/-last}}{{/allParams}}); return localVarResponse.Data;{{/returnType}}{{^returnType}}{{operationId}}WithHttpInfo({{#allParams}}{{paramName}}{{^-last}}, {{/-last}}{{/allParams}});{{/returnType}} @@ -219,11 +219,11 @@ namespace {{packageName}}.{{apiPackage}} /// </summary> /// <exception cref="{{packageName}}.Client.ApiException">Thrown when fails to make API call</exception> {{#allParams}}/// <param name="{{paramName}}">{{description}}{{^required}} (optional{{#defaultValue}}, default to {{.}}{{/defaultValue}}){{/required}}{{#isDeprecated}} (deprecated){{/isDeprecated}}</param> - {{/allParams}}/// <returns>ApiResponse of {{#returnType}}{{returnType}}{{/returnType}}{{^returnType}}Object(void){{/returnType}}</returns> + {{/allParams}}/// <returns>ApiResponse of {{returnType}}{{^returnType}}Object(void){{/returnType}}</returns> {{#isDeprecated}} [Obsolete] {{/isDeprecated}} - public ApiResponse<{{#returnType}}{{{returnType}}}{{/returnType}}{{^returnType}}Object{{/returnType}}> {{operationId}}WithHttpInfo ({{#allParams}}{{{dataType}}} {{paramName}}{{^required}}{{#optionalMethodArgument}} = default({{{dataType}}}){{/optionalMethodArgument}}{{/required}}{{^-last}}, {{/-last}}{{/allParams}}) + public ApiResponse<{{{returnType}}}{{^returnType}}Object{{/returnType}}> {{operationId}}WithHttpInfo ({{#allParams}}{{{dataType}}} {{paramName}}{{^required}}{{#optionalMethodArgument}} = default({{{dataType}}}){{/optionalMethodArgument}}{{/required}}{{^-last}}, {{/-last}}{{/allParams}}) { {{#allParams}} {{#required}} @@ -263,7 +263,7 @@ namespace {{packageName}}.{{apiPackage}} if ({{paramName}} != null) localVarPathParams.Add("{{baseName}}", this.Configuration.ApiClient.ParameterToString({{paramName}})); // path parameter {{/pathParams}} {{#queryParams}} - if ({{paramName}} != null) localVarQueryParams.AddRange(this.Configuration.ApiClient.ParameterToKeyValuePairs("{{#collectionFormat}}{{collectionFormat}}{{/collectionFormat}}", "{{baseName}}", {{paramName}})); // query parameter + if ({{paramName}} != null) localVarQueryParams.AddRange(this.Configuration.ApiClient.ParameterToKeyValuePairs("{{collectionFormat}}", "{{baseName}}", {{paramName}})); // query parameter {{/queryParams}} {{#headerParams}} if ({{paramName}} != null) localVarHeaderParams.Add("{{baseName}}", this.Configuration.ApiClient.ParameterToString({{paramName}})); // header parameter @@ -339,7 +339,7 @@ namespace {{packageName}}.{{apiPackage}} {{#returnType}} return new ApiResponse<{{{returnType}}}>(localVarStatusCode, localVarResponse.Headers.ToDictionary(x => x.{{^netStandard}}Name{{/netStandard}}{{#netStandard}}Key{{/netStandard}}, x => string.Join(",", x.Value){{#caseInsensitiveResponseHeaders}}, StringComparer.OrdinalIgnoreCase{{/caseInsensitiveResponseHeaders}}), - ({{{returnType}}}) this.Configuration.ApiClient.Deserialize(localVarResponse, typeof({{#returnContainer}}{{{returnContainer}}}{{/returnContainer}}{{^returnContainer}}{{{returnType}}}{{/returnContainer}}))); + ({{{returnType}}}) this.Configuration.ApiClient.Deserialize(localVarResponse, typeof({{{returnContainer}}}{{^returnContainer}}{{{returnType}}}{{/returnContainer}}))); {{/returnType}} {{^returnType}} return new ApiResponse<Object>(localVarStatusCode, @@ -355,11 +355,11 @@ namespace {{packageName}}.{{apiPackage}} /// <exception cref="{{packageName}}.Client.ApiException">Thrown when fails to make API call</exception> {{#allParams}}/// <param name="{{paramName}}">{{description}}{{^required}} (optional{{#defaultValue}}, default to {{.}}{{/defaultValue}}){{/required}}{{#isDeprecated}} (deprecated){{/isDeprecated}}</param> {{/allParams}}/// <param name="cancellationToken">Cancellation Token to cancel request (optional) </param> - /// <returns>Task of {{#returnType}}{{returnType}}{{/returnType}}{{^returnType}}void{{/returnType}}</returns> + /// <returns>Task of {{returnType}}{{^returnType}}void{{/returnType}}</returns> {{#isDeprecated}} [Obsolete] {{/isDeprecated}} - {{#returnType}}public async System.Threading.Tasks.Task<{{{returnType}}}>{{/returnType}}{{^returnType}}public async System.Threading.Tasks.Task{{/returnType}} {{operationId}}Async ({{#allParams}}{{{dataType}}} {{paramName}}{{^required}}{{#optionalMethodArgument}} = default({{{dataType}}}){{/optionalMethodArgument}}{{/required}}{{^-last}}, {{/-last}}{{/allParams}}{{#allParams.0}}, {{/allParams.0}}CancellationToken cancellationToken = default(CancellationToken)) + {{#returnType}}public async System.Threading.Tasks.Task<{{{.}}}>{{/returnType}}{{^returnType}}public async System.Threading.Tasks.Task{{/returnType}} {{operationId}}Async ({{#allParams}}{{{dataType}}} {{paramName}}{{^required}}{{#optionalMethodArgument}} = default({{{dataType}}}){{/optionalMethodArgument}}{{/required}}{{^-last}}, {{/-last}}{{/allParams}}{{#allParams.0}}, {{/allParams.0}}CancellationToken cancellationToken = default(CancellationToken)) { {{#returnType}}ApiResponse<{{{returnType}}}> localVarResponse = await {{operationId}}WithHttpInfoAsync({{#allParams}}{{paramName}}{{^-last}}, {{/-last}}{{/allParams}}{{#allParams.0}}, {{/allParams.0}}cancellationToken); return localVarResponse.Data;{{/returnType}}{{^returnType}}await {{operationId}}WithHttpInfoAsync({{#allParams}}{{paramName}}{{^-last}}, {{/-last}}{{/allParams}}{{#allParams.0}}, {{/allParams.0}}cancellationToken);{{/returnType}} @@ -372,11 +372,11 @@ namespace {{packageName}}.{{apiPackage}} /// <exception cref="{{packageName}}.Client.ApiException">Thrown when fails to make API call</exception> {{#allParams}}/// <param name="{{paramName}}">{{description}}{{^required}} (optional{{#defaultValue}}, default to {{.}}{{/defaultValue}}){{/required}}{{#isDeprecated}} (deprecated){{/isDeprecated}}</param> {{/allParams}}/// <param name="cancellationToken">Cancellation Token to cancel request (optional) </param> - /// <returns>Task of ApiResponse{{#returnType}} ({{returnType}}){{/returnType}}</returns> + /// <returns>Task of ApiResponse{{#returnType}} ({{.}}){{/returnType}}</returns> {{#isDeprecated}} [Obsolete] {{/isDeprecated}} - public async System.Threading.Tasks.Task<ApiResponse<{{#returnType}}{{{returnType}}}{{/returnType}}{{^returnType}}Object{{/returnType}}>> {{operationId}}WithHttpInfoAsync ({{#allParams}}{{{dataType}}} {{paramName}}{{^required}}{{#optionalMethodArgument}} = default({{{dataType}}}){{/optionalMethodArgument}}{{/required}}{{^-last}}, {{/-last}}{{/allParams}}{{#allParams.0}}, {{/allParams.0}}CancellationToken cancellationToken = default(CancellationToken)) + public async System.Threading.Tasks.Task<ApiResponse<{{{returnType}}}{{^returnType}}Object{{/returnType}}>> {{operationId}}WithHttpInfoAsync ({{#allParams}}{{{dataType}}} {{paramName}}{{^required}}{{#optionalMethodArgument}} = default({{{dataType}}}){{/optionalMethodArgument}}{{/required}}{{^-last}}, {{/-last}}{{/allParams}}{{#allParams.0}}, {{/allParams.0}}CancellationToken cancellationToken = default(CancellationToken)) { {{#allParams}} {{#required}} @@ -416,7 +416,7 @@ namespace {{packageName}}.{{apiPackage}} if ({{paramName}} != null) localVarPathParams.Add("{{baseName}}", this.Configuration.ApiClient.ParameterToString({{paramName}})); // path parameter {{/pathParams}} {{#queryParams}} - if ({{paramName}} != null) localVarQueryParams.AddRange(this.Configuration.ApiClient.ParameterToKeyValuePairs("{{#collectionFormat}}{{collectionFormat}}{{/collectionFormat}}", "{{baseName}}", {{paramName}})); // query parameter + if ({{paramName}} != null) localVarQueryParams.AddRange(this.Configuration.ApiClient.ParameterToKeyValuePairs("{{collectionFormat}}", "{{baseName}}", {{paramName}})); // query parameter {{/queryParams}} {{#headerParams}} if ({{paramName}} != null) localVarHeaderParams.Add("{{baseName}}", this.Configuration.ApiClient.ParameterToString({{paramName}})); // header parameter @@ -492,7 +492,7 @@ namespace {{packageName}}.{{apiPackage}} {{#returnType}} return new ApiResponse<{{{returnType}}}>(localVarStatusCode, localVarResponse.Headers.ToDictionary(x => x.{{^netStandard}}Name{{/netStandard}}{{#netStandard}}Key{{/netStandard}}, x => string.Join(",", x.Value){{#caseInsensitiveResponseHeaders}}, StringComparer.OrdinalIgnoreCase{{/caseInsensitiveResponseHeaders}}), - ({{{returnType}}}) this.Configuration.ApiClient.Deserialize(localVarResponse, typeof({{#returnContainer}}{{{returnContainer}}}{{/returnContainer}}{{^returnContainer}}{{{returnType}}}{{/returnContainer}}))); + ({{{returnType}}}) this.Configuration.ApiClient.Deserialize(localVarResponse, typeof({{{returnContainer}}}{{^returnContainer}}{{{returnType}}}{{/returnContainer}}))); {{/returnType}} {{^returnType}} return new ApiResponse<Object>(localVarStatusCode, diff --git a/modules/openapi-generator/src/main/resources/csharp/api_doc.mustache b/modules/openapi-generator/src/main/resources/csharp/api_doc.mustache index 5b1c686cd37133c4524966e9dd83a3c8a89dc263..617e197006de3ec3f1b637f39063ac11e140cd02 100644 --- a/modules/openapi-generator/src/main/resources/csharp/api_doc.mustache +++ b/modules/openapi-generator/src/main/resources/csharp/api_doc.mustache @@ -1,12 +1,12 @@ # {{packageName}}.{{apiPackage}}.{{classname}}{{#description}} -{{description}}{{/description}} +{{.}}{{/description}} All URIs are relative to *{{{basePath}}}* Method | HTTP request | Description ------------- | ------------- | ------------- -{{#operations}}{{#operation}}[**{{operationId}}**]({{classname}}.md#{{operationIdLowerCase}}) | **{{httpMethod}}** {{path}} | {{#summary}}{{summary}}{{/summary}} +{{#operations}}{{#operation}}[**{{operationId}}**]({{classname}}.md#{{operationIdLowerCase}}) | **{{httpMethod}}** {{path}} | {{summary}} {{/operation}}{{/operations}} {{#operations}} @@ -14,11 +14,11 @@ Method | HTTP request | Description ## {{{operationId}}} -> {{#returnType}}{{returnType}}{{/returnType}}{{^returnType}}void{{/returnType}} {{operationId}} ({{#allParams}}{{{dataType}}} {{paramName}}{{^required}}{{#optionalMethodArgument}} = null{{/optionalMethodArgument}}{{/required}}{{^-last}}, {{/-last}}{{/allParams}}) +> {{returnType}}{{^returnType}}void{{/returnType}} {{operationId}} ({{#allParams}}{{{dataType}}} {{paramName}}{{^required}}{{#optionalMethodArgument}} = null{{/optionalMethodArgument}}{{/required}}{{^-last}}, {{/-last}}{{/allParams}}) {{{summary}}}{{#notes}} -{{{notes}}}{{/notes}} +{{{.}}}{{/notes}} ### Example @@ -77,7 +77,7 @@ namespace Example {{#summary}} // {{{.}}} {{/summary}} - {{#returnType}}{{{returnType}}} result = {{/returnType}}apiInstance.{{{operationId}}}({{#allParams}}{{paramName}}{{^-last}}, {{/-last}}{{/allParams}});{{#returnType}} + {{#returnType}}{{{.}}} result = {{/returnType}}apiInstance.{{{operationId}}}({{#allParams}}{{paramName}}{{^-last}}, {{/-last}}{{/allParams}});{{#returnType}} Debug.WriteLine(result);{{/returnType}} } catch (ApiException e) @@ -96,7 +96,7 @@ namespace Example {{^allParams}}This endpoint does not need any parameter.{{/allParams}}{{#allParams}}{{#-last}} Name | Type | Description | Notes ------------- | ------------- | ------------- | -------------{{/-last}}{{/allParams}} -{{#allParams}} **{{paramName}}** | {{#isPrimitiveType}}**{{dataType}}**{{/isPrimitiveType}}{{^isPrimitiveType}}[**{{dataType}}**]({{#isContainer}}{{baseType}}{{/isContainer}}{{^isContainer}}{{dataType}}{{/isContainer}}.md){{/isPrimitiveType}}| {{description}} | {{^required}}[optional] {{/required}}{{#defaultValue}}[default to {{defaultValue}}]{{/defaultValue}} +{{#allParams}} **{{paramName}}** | {{#isPrimitiveType}}**{{dataType}}**{{/isPrimitiveType}}{{^isPrimitiveType}}[**{{dataType}}**]({{#isContainer}}{{baseType}}{{/isContainer}}{{^isContainer}}{{dataType}}{{/isContainer}}.md){{/isPrimitiveType}}| {{description}} | {{^required}}[optional] {{/required}}{{#defaultValue}}[default to {{.}}]{{/defaultValue}} {{/allParams}} ### Return type diff --git a/modules/openapi-generator/src/main/resources/csharp/compile.mustache b/modules/openapi-generator/src/main/resources/csharp/compile.mustache index f80911357fd23bd15a32140f16a51078788f0520..920ce2c2427d3c5e5b9eef15b71129da7e43acdb 100644 --- a/modules/openapi-generator/src/main/resources/csharp/compile.mustache +++ b/modules/openapi-generator/src/main/resources/csharp/compile.mustache @@ -24,4 +24,3 @@ copy packages\PropertyChanged.Fody.{{propertychanged-fody.version}}\PropertyChan copy packages\PropertyChanged.Fody.{{propertychanged-fody.version}}\Lib\dotnet\PropertyChanged.dll bin\PropertyChanged.dll {{/generatePropertyChanged}} %CSCPATH%\csc /reference:bin\Newtonsoft.Json.dll;bin\JsonSubTypes.dll;bin\RestSharp.dll;System.ComponentModel.DataAnnotations.dll {{#generatePropertyChanged}}/r:bin\Fody.dll;bin\PropertyChanged.Fody.dll;bin\PropertyChanged.dll{{/generatePropertyChanged}} /target:library /out:bin\{{packageName}}.dll /recurse:src\{{packageName}}\*.cs /doc:bin\{{packageName}}.xml - diff --git a/modules/openapi-generator/src/main/resources/csharp/enumClass.mustache b/modules/openapi-generator/src/main/resources/csharp/enumClass.mustache index de8c602a14dc757d15710f43e6b39a7354568c6d..ee1d5a1885aea2a8cb9fc5c7a38b643ad318cd1c 100644 --- a/modules/openapi-generator/src/main/resources/csharp/enumClass.mustache +++ b/modules/openapi-generator/src/main/resources/csharp/enumClass.mustache @@ -1,11 +1,11 @@ /// <summary> - /// {{^description}}Gets or Sets {{{name}}}{{/description}}{{#description}}{{description}}{{/description}} + /// {{description}}{{^description}}Gets or Sets {{{name}}}{{/description}} /// </summary> {{#description}} - /// <value>{{description}}</value> + /// <value>{{.}}</value> {{/description}} [JsonConverter(typeof(StringEnumConverter))] - {{>visibility}} enum {{#datatypeWithEnum}}{{.}}{{/datatypeWithEnum}}{{^datatypeWithEnum}}{{classname}}{{/datatypeWithEnum}} + {{>visibility}} enum {{datatypeWithEnum}}{{^datatypeWithEnum}}{{classname}}{{/datatypeWithEnum}} { {{#allowableValues}} {{#enumVars}} diff --git a/modules/openapi-generator/src/main/resources/csharp/git_push.sh.mustache b/modules/openapi-generator/src/main/resources/csharp/git_push.sh.mustache index 8b3f689c9121a65080ad038d37a2036b01e559a1..f0bed5bd84155f05bc3cdc67af008f524efb38a6 100755 --- a/modules/openapi-generator/src/main/resources/csharp/git_push.sh.mustache +++ b/modules/openapi-generator/src/main/resources/csharp/git_push.sh.mustache @@ -55,4 +55,3 @@ 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/csharp/modelEnum.mustache b/modules/openapi-generator/src/main/resources/csharp/modelEnum.mustache index c1a70a37f2ddfdde7d1d92ba9aeb122ce41c57f6..91be597da01a00f82b8c5646e0cfe55ac6f0b79e 100644 --- a/modules/openapi-generator/src/main/resources/csharp/modelEnum.mustache +++ b/modules/openapi-generator/src/main/resources/csharp/modelEnum.mustache @@ -1,13 +1,13 @@ /// <summary> - /// {{^description}}Defines {{{name}}}{{/description}}{{#description}}{{description}}{{/description}} + /// {{description}}{{^description}}Defines {{{name}}}{{/description}} /// </summary> {{#description}} - /// <value>{{description}}</value> + /// <value>{{.}}</value> {{/description}} {{#allowableValues}}{{#enumVars}}{{#-first}}{{#isString}} [JsonConverter(typeof(StringEnumConverter))] {{/isString}}{{/-first}}{{/enumVars}}{{/allowableValues}} - {{>visibility}} enum {{#datatypeWithEnum}}{{.}}{{/datatypeWithEnum}}{{^datatypeWithEnum}}{{classname}}{{/datatypeWithEnum}}{{#vendorExtensions.x-enum-byte}}: byte{{/vendorExtensions.x-enum-byte}} + {{>visibility}} enum {{datatypeWithEnum}}{{^datatypeWithEnum}}{{classname}}{{/datatypeWithEnum}}{{#vendorExtensions.x-enum-byte}}: byte{{/vendorExtensions.x-enum-byte}} { {{#allowableValues}} {{#enumVars}} diff --git a/modules/openapi-generator/src/main/resources/csharp/modelGeneric.mustache b/modules/openapi-generator/src/main/resources/csharp/modelGeneric.mustache index 933ba0824aebc92ad606f407966fa4d5aed96ae9..bf8b1de91b3e67caa83325cab9d50b2faabd5261 100644 --- a/modules/openapi-generator/src/main/resources/csharp/modelGeneric.mustache +++ b/modules/openapi-generator/src/main/resources/csharp/modelGeneric.mustache @@ -1,5 +1,5 @@ /// <summary> - /// {{#description}}{{.}}{{/description}}{{^description}}{{classname}}{{/description}} + /// {{description}}{{^description}}{{classname}}{{/description}} /// </summary> [DataContract] {{#discriminator}} @@ -9,7 +9,7 @@ {{#generatePropertyChanged}} [ImplementPropertyChanged] {{/generatePropertyChanged}} - {{>visibility}} partial class {{classname}} : {{#parent}}{{{parent}}}, {{/parent}} IEquatable<{{classname}}>{{^netStandard}}{{#validatable}}, IValidatableObject{{/validatable}}{{/netStandard}} + {{>visibility}} partial class {{classname}} : {{#parent}}{{{.}}}, {{/parent}} IEquatable<{{classname}}>{{^netStandard}}{{#validatable}}, IValidatableObject{{/validatable}}{{/netStandard}} { {{#vars}} {{#items.isEnum}} @@ -26,16 +26,16 @@ {{/isEnum}} {{#isEnum}} /// <summary> - /// {{^description}}Gets or Sets {{{name}}}{{/description}}{{#description}}{{description}}{{/description}} + /// {{description}}{{^description}}Gets or Sets {{{name}}}{{/description}} /// </summary> {{#description}} - /// <value>{{description}}</value> + /// <value>{{.}}</value> {{/description}} [DataMember(Name="{{baseName}}", EmitDefaultValue={{#vendorExtensions.x-emit-default-value}}true{{/vendorExtensions.x-emit-default-value}}{{^vendorExtensions.x-emit-default-value}}{{#isNullable}}true{{/isNullable}}{{^isNullable}}{{#required}}true{{/required}}{{^required}}false{{/required}}{{/isNullable}}{{/vendorExtensions.x-emit-default-value}})] {{#deprecated}} [Obsolete] {{/deprecated}} - public {{#complexType}}{{{complexType}}}{{/complexType}}{{^complexType}}{{{datatypeWithEnum}}}{{/complexType}}{{^isContainer}}{{^required}}?{{/required}}{{/isContainer}} {{name}} { get; set; } + public {{{complexType}}}{{^complexType}}{{{datatypeWithEnum}}}{{/complexType}}{{^isContainer}}{{^required}}?{{/required}}{{/isContainer}} {{name}} { get; set; } {{/isEnum}} {{/vars}} {{#hasRequired}} @@ -52,13 +52,13 @@ /// </summary> {{#vars}} {{^isReadOnly}} - /// <param name="{{#lambda.camelcase_param}}{{name}}{{/lambda.camelcase_param}}">{{#description}}{{description}}{{/description}}{{^description}}{{#lambda.camelcase_param}}{{name}}{{/lambda.camelcase_param}}{{/description}}{{#required}} (required){{/required}}{{#defaultValue}} (default to {{defaultValue}}){{/defaultValue}}.</param> + /// <param name="{{#lambda.camelcase_param}}{{name}}{{/lambda.camelcase_param}}">{{description}}{{^description}}{{#lambda.camelcase_param}}{{name}}{{/lambda.camelcase_param}}{{/description}}{{#required}} (required){{/required}}{{#defaultValue}} (default to {{.}}){{/defaultValue}}.</param> {{/isReadOnly}} {{/vars}} {{#hasOnlyReadOnly}} [JsonConstructorAttribute] {{/hasOnlyReadOnly}} - public {{classname}}({{#readWriteVars}}{{{datatypeWithEnum}}}{{#isEnum}}{{^isContainer}}{{^required}}?{{/required}}{{/isContainer}}{{/isEnum}} {{#lambda.camelcase_param}}{{name}}{{/lambda.camelcase_param}} = {{#defaultValue}}{{{defaultValue}}}{{/defaultValue}}{{^defaultValue}}default({{{datatypeWithEnum}}}{{#isEnum}}{{^isContainer}}{{^required}}?{{/required}}{{/isContainer}}{{/isEnum}}){{/defaultValue}}{{^-last}}, {{/-last}}{{/readWriteVars}}){{#parent}} : base({{#parentVars}}{{#lambda.camelcase_param}}{{name}}{{/lambda.camelcase_param}}{{^-last}}, {{/-last}}{{/parentVars}}){{/parent}} + public {{classname}}({{#readWriteVars}}{{{datatypeWithEnum}}}{{#isEnum}}{{^isContainer}}{{^required}}?{{/required}}{{/isContainer}}{{/isEnum}} {{#lambda.camelcase_param}}{{name}}{{/lambda.camelcase_param}} = {{{defaultValue}}}{{^defaultValue}}default({{{datatypeWithEnum}}}{{#isEnum}}{{^isContainer}}{{^required}}?{{/required}}{{/isContainer}}{{/isEnum}}){{/defaultValue}}{{^-last}}, {{/-last}}{{/readWriteVars}}){{#parent}} : base({{#parentVars}}{{#lambda.camelcase_param}}{{name}}{{/lambda.camelcase_param}}{{^-last}}, {{/-last}}{{/parentVars}}){{/parent}} { {{#vars}} {{^isInherited}} @@ -108,9 +108,9 @@ this.{{name}} = {{#lambda.camelcase_param}}{{name}}{{/lambda.camelcase_param}}; {{^isInherited}} {{^isEnum}} /// <summary> - /// {{^description}}Gets or Sets {{{name}}}{{/description}}{{#description}}{{description}}{{/description}} + /// {{description}}{{^description}}Gets or Sets {{{name}}}{{/description}} /// </summary>{{#description}} - /// <value>{{description}}</value>{{/description}} + /// <value>{{.}}</value>{{/description}} [DataMember(Name="{{baseName}}", EmitDefaultValue={{#vendorExtensions.x-emit-default-value}}true{{/vendorExtensions.x-emit-default-value}}{{^vendorExtensions.x-emit-default-value}}{{#isNullable}}true{{/isNullable}}{{^isNullable}}{{#required}}true{{/required}}{{^required}}false{{/required}}{{/isNullable}}{{/vendorExtensions.x-emit-default-value}})]{{#isDate}} [JsonConverter(typeof(OpenAPIDateConverter))]{{/isDate}} {{#deprecated}} @@ -302,7 +302,7 @@ this.{{name}} = {{#lambda.camelcase_param}}{{name}}{{/lambda.camelcase_param}}; } {{/minLength}} {{/isEnum}} - + {{#maximum}} // {{{name}}} ({{{dataType}}}) maximum if(this.{{{name}}} > ({{{dataType}}}){{maximum}}) diff --git a/modules/openapi-generator/src/main/resources/csharp/modelInnerEnum.mustache b/modules/openapi-generator/src/main/resources/csharp/modelInnerEnum.mustache index d9e96dccdb3cd14daf72eceff21ade2c919a4d1b..4187d95bd049ad8cdb4545abc35d826d74a1792c 100644 --- a/modules/openapi-generator/src/main/resources/csharp/modelInnerEnum.mustache +++ b/modules/openapi-generator/src/main/resources/csharp/modelInnerEnum.mustache @@ -1,14 +1,14 @@ {{^isContainer}} /// <summary> - /// {{^description}}Defines {{{name}}}{{/description}}{{#description}}{{description}}{{/description}} + /// {{description}}{{^description}}Defines {{{name}}}{{/description}} /// </summary> {{#description}} - /// <value>{{description}}</value> + /// <value>{{.}}</value> {{/description}} {{#isString}} [JsonConverter(typeof(StringEnumConverter))] {{/isString}} - {{>visibility}} enum {{#datatypeWithEnum}}{{.}}{{/datatypeWithEnum}}{{^datatypeWithEnum}}{{classname}}{{/datatypeWithEnum}}{{#vendorExtensions.x-enum-byte}}: byte{{/vendorExtensions.x-enum-byte}} + {{>visibility}} enum {{datatypeWithEnum}}{{^datatypeWithEnum}}{{classname}}{{/datatypeWithEnum}}{{#vendorExtensions.x-enum-byte}}: byte{{/vendorExtensions.x-enum-byte}} { {{#allowableValues}} {{#enumVars}} diff --git a/modules/openapi-generator/src/main/resources/csharp/nuspec.mustache b/modules/openapi-generator/src/main/resources/csharp/nuspec.mustache index 45ba3381de63db46af94432021a91ed922309d1e..623a37f914407b68dfc32df0dac1db81bd81c072 100644 --- a/modules/openapi-generator/src/main/resources/csharp/nuspec.mustache +++ b/modules/openapi-generator/src/main/resources/csharp/nuspec.mustache @@ -21,10 +21,10 @@ nuget.org gallery uses information you add in the portal. --> <description>{{packageDescription}}</description> {{#termsOfService}} - <copyright>{{termsOfService}}</copyright> + <copyright>{{.}}</copyright> {{/termsOfService}} {{#licenseUrl}} - <licenseUrl>{{licenseUrl}}</licenseUrl> + <licenseUrl>{{.}}</licenseUrl> {{/licenseUrl}} <!-- Dependencies are automatically installed when the package is installed --> diff --git a/modules/openapi-generator/src/main/resources/csharp/partial_header.mustache b/modules/openapi-generator/src/main/resources/csharp/partial_header.mustache index 8c6a0fc032a4a546274b401ae992cfb2998a8e75..2c741c79595a058b12cfd925c39da9eb51040b40 100644 --- a/modules/openapi-generator/src/main/resources/csharp/partial_header.mustache +++ b/modules/openapi-generator/src/main/resources/csharp/partial_header.mustache @@ -1,13 +1,13 @@ /* {{#appName}} - * {{{appName}}} + * {{{.}}} * {{/appName}} {{#appDescription}} - * {{{appDescription}}} + * {{{.}}} * {{/appDescription}} - * {{#version}}The version of the OpenAPI document: {{{version}}}{{/version}} - * {{#infoEmail}}Contact: {{{infoEmail}}}{{/infoEmail}} + * {{#version}}The version of the OpenAPI document: {{{.}}}{{/version}} + * {{#infoEmail}}Contact: {{{.}}}{{/infoEmail}} * Generated by: https://github.com/openapitools/openapi-generator.git */ diff --git a/modules/openapi-generator/src/main/resources/dart-dio/README.mustache b/modules/openapi-generator/src/main/resources/dart-dio/README.mustache index 0b375af727d967aaa4be08d4753d9519188f0c43..e76a9e8b63a3bdbdfbc91d099652741e5febf305 100644 --- a/modules/openapi-generator/src/main/resources/dart-dio/README.mustache +++ b/modules/openapi-generator/src/main/resources/dart-dio/README.mustache @@ -1,13 +1,13 @@ # {{pubName}} {{#appDescriptionWithNewLines}} -{{{appDescriptionWithNewLines}}} +{{{.}}} {{/appDescriptionWithNewLines}} This Dart package is automatically generated by the [OpenAPI Generator](https://openapi-generator.tech) project: - API version: {{appVersion}} {{#artifactVersion}} -- Package version: {{artifactVersion}} +- Package version: {{.}} {{/artifactVersion}} {{^hideGenerationTimestamp}} - Build date: {{generatedDate}} @@ -73,7 +73,7 @@ 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}} +{{#apiInfo}}{{#apis}}{{#operations}}{{#operation}}*{{classname}}* | [**{{operationId}}**]({{apiDocPath}}{{classname}}.md#{{operationIdLowerCase}}) | **{{httpMethod}}** {{path}} | {{summary}} {{/operation}}{{/operations}}{{/apis}}{{/apiInfo}} ## Documentation For Models @@ -107,4 +107,3 @@ Class | Method | HTTP request | Description {{#apiInfo}}{{#apis}}{{#-last}}{{infoEmail}} {{/-last}}{{/apis}}{{/apiInfo}} - 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 522815498c5c9e6ca6e2d9dee27a244582971486..3feee916193257a3497dd058a537aa1fbde6b263 100644 --- a/modules/openapi-generator/src/main/resources/dart-dio/api.mustache +++ b/modules/openapi-generator/src/main/resources/dart-dio/api.mustache @@ -19,7 +19,7 @@ class {{classname}} { /// {{{summary}}} /// /// {{{notes}}} - Future<Response<{{#returnType}}{{{returnType}}}{{/returnType}}{{^returnType}}void{{/returnType}}>> {{nickname}}({{^hasRequiredParams}}{ {{/hasRequiredParams}}{{#requiredParams}} + Future<Response<{{{returnType}}}{{^returnType}}void{{/returnType}}>> {{nickname}}({{^hasRequiredParams}}{ {{/hasRequiredParams}}{{#requiredParams}} {{{dataType}}} {{paramName}},{{#-last}} { {{/-last}}{{/requiredParams}}{{#optionalParams}} {{{dataType}}} {{paramName}},{{/optionalParams}} CancelToken cancelToken, diff --git a/modules/openapi-generator/src/main/resources/dart-dio/api_doc.mustache b/modules/openapi-generator/src/main/resources/dart-dio/api_doc.mustache index 1e28b16012e4068736a12f4ae6bdecd7dd256b68..ff0dd731eebb98a6d81c0f217e3437979cc8fef4 100644 --- a/modules/openapi-generator/src/main/resources/dart-dio/api_doc.mustache +++ b/modules/openapi-generator/src/main/resources/dart-dio/api_doc.mustache @@ -1,5 +1,5 @@ # {{pubName}}.api.{{classname}}{{#description}} -{{description}}{{/description}} +{{.}}{{/description}} ## Load the API package ```dart @@ -10,19 +10,19 @@ All URIs are relative to *{{basePath}}* Method | HTTP request | Description ------------- | ------------- | ------------- -{{#operations}}{{#operation}}[**{{operationId}}**]({{classname}}.md#{{operationIdLowerCase}}) | **{{httpMethod}}** {{path}} | {{#summary}}{{summary}}{{/summary}} +{{#operations}}{{#operation}}[**{{operationId}}**]({{classname}}.md#{{operationIdLowerCase}}) | **{{httpMethod}}** {{path}} | {{summary}} {{/operation}}{{/operations}} {{#operations}} {{#operation}} # **{{{operationId}}}** -> {{#returnType}}{{{returnType}}} {{/returnType}}{{{operationId}}}({{#allParams}}{{paramName}}{{^-last}}, {{/-last}}{{/allParams}}) +> {{#returnType}}{{{.}}} {{/returnType}}{{{operationId}}}({{#allParams}}{{paramName}}{{^-last}}, {{/-last}}{{/allParams}}) {{{summary}}}{{#notes}} -{{{notes}}}{{/notes}} +{{{.}}}{{/notes}} -### Example +### Example ```dart import 'package:{{pubName}}/api.dart'; {{#hasAuthMethods}} @@ -50,7 +50,7 @@ var api_instance = new {{classname}}(); var {{paramName}} = {{#isArray}}[{{/isArray}}{{#isBodyParam}}new {{{dataType}}}(){{/isBodyParam}}{{^isBodyParam}}{{{example}}}{{/isBodyParam}}{{#isArray}}]{{/isArray}}; // {{{dataType}}} | {{{description}}} {{/allParams}} -try { +try { {{#returnType}}var result = {{/returnType}}api_instance.{{{operationId}}}({{#allParams}}{{paramName}}{{^-last}}, {{/-last}}{{/allParams}}); {{#returnType}} print(result); @@ -64,7 +64,7 @@ try { {{^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}} **{{paramName}}** | {{#isPrimitiveType}}**{{{dataType}}}**{{/isPrimitiveType}}{{^isPrimitiveType}}[**{{{dataType}}}**]({{baseType}}.md){{/isPrimitiveType}}| {{{description}}} | {{^required}}[optional] {{/required}}{{#defaultValue}}[default to {{{.}}}]{{/defaultValue}} {{/allParams}} ### Return type diff --git a/modules/openapi-generator/src/main/resources/dart-dio/api_test.mustache b/modules/openapi-generator/src/main/resources/dart-dio/api_test.mustache index f4dd8e65fad8e4293f3cb3647611795c7e15e6ba..2ea19b30c81d9fb3da8d6d64e99c45e28f44810a 100644 --- a/modules/openapi-generator/src/main/resources/dart-dio/api_test.mustache +++ b/modules/openapi-generator/src/main/resources/dart-dio/api_test.mustache @@ -19,7 +19,7 @@ void main() { // {{{.}}} // {{/notes}} - //{{#returnType}}Future<{{{returnType}}}> {{/returnType}}{{^returnType}}Future {{/returnType}}{{{operationId}}}({{#allParams}}{{#required}}{{{dataType}}} {{{paramName}}}{{^-last}}, {{/-last}}{{/required}}{{/allParams}}{{#hasOptionalParams}}{ {{#allParams}}{{^required}}{{{dataType}}} {{{paramName}}}{{^-last}}, {{/-last}}{{/required}}{{/allParams}} }{{/hasOptionalParams}}) async + //{{#returnType}}Future<{{{.}}}> {{/returnType}}{{^returnType}}Future {{/returnType}}{{{operationId}}}({{#allParams}}{{#required}}{{{dataType}}} {{{paramName}}}{{^-last}}, {{/-last}}{{/required}}{{/allParams}}{{#hasOptionalParams}}{ {{#allParams}}{{^required}}{{{dataType}}} {{{paramName}}}{{^-last}}, {{/-last}}{{/required}}{{/allParams}} }{{/hasOptionalParams}}) async test('test {{{operationId}}}', () async { // TODO }); 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 0fce16365a32a96ed839f0fd51d8c912f4f8c001..f4d2c1e4e76d8c4ca5002d0967488e853b92589a 100644 --- a/modules/openapi-generator/src/main/resources/dart-dio/class.mustache +++ b/modules/openapi-generator/src/main/resources/dart-dio/class.mustache @@ -7,7 +7,7 @@ abstract class {{classname}} implements Built<{{classname}}, {{classname}}Builde {{#vars}} {{#description}} - /// {{{description}}} + /// {{{.}}} {{/description}} {{! A field is @nullable in built_value when it is diff --git a/modules/openapi-generator/src/main/resources/dart-dio/enum.mustache b/modules/openapi-generator/src/main/resources/dart-dio/enum.mustache index 35049426b9e6bae0a86df475f9111c18d4226ae7..16ab3eeb243b4ab0ea5ba3144d29ab5ed2cb3bc1 100644 --- a/modules/openapi-generator/src/main/resources/dart-dio/enum.mustache +++ b/modules/openapi-generator/src/main/resources/dart-dio/enum.mustache @@ -9,7 +9,7 @@ class {{classname}} extends EnumClass { {{#allowableValues}} {{#enumVars}} {{#description}} - /// {{{description}}} + /// {{{.}}} {{/description}} @BuiltValueEnumConst({{#isInteger}}wireNumber: {{{value}}}{{/isInteger}}{{^isInteger}}wireName: r{{#lambda.escapeBuiltValueEnum}}{{{value}}}{{/lambda.escapeBuiltValueEnum}}{{/isInteger}}) static const {{classname}} {{name}} = _${{name}}; diff --git a/modules/openapi-generator/src/main/resources/dart-dio/enum_inline.mustache b/modules/openapi-generator/src/main/resources/dart-dio/enum_inline.mustache index f18008d92bf0f8ce62c105dc608b8a6aa76ba155..d9432ae28f00d567c819bff83df82ebe9a6142fe 100644 --- a/modules/openapi-generator/src/main/resources/dart-dio/enum_inline.mustache +++ b/modules/openapi-generator/src/main/resources/dart-dio/enum_inline.mustache @@ -3,7 +3,7 @@ class {{{enumName}}} extends EnumClass { {{#allowableValues}} {{#enumVars}} {{#description}} - /// {{{description}}} + /// {{{.}}} {{/description}} @BuiltValueEnumConst({{#isInteger}}wireNumber: {{{value}}}{{/isInteger}}{{^isInteger}}wireName: r{{#lambda.escapeBuiltValueEnum}}{{{value}}}{{/lambda.escapeBuiltValueEnum}}{{/isInteger}}) static const {{{enumName}}} {{name}} = _${{#lambda.camelcase}}{{{enumName}}}{{/lambda.camelcase}}_{{name}}; diff --git a/modules/openapi-generator/src/main/resources/dart-dio/gitignore.mustache b/modules/openapi-generator/src/main/resources/dart-dio/gitignore.mustache index 6d2ac22c0b41764110b373e78b89df314e77397e..4298cdcbd1a24268bccd159b376ff8a9c4722868 100644 --- a/modules/openapi-generator/src/main/resources/dart-dio/gitignore.mustache +++ b/modules/openapi-generator/src/main/resources/dart-dio/gitignore.mustache @@ -10,7 +10,7 @@ build/ **/packages/ # Files created by dart2js -# (Most Dart developers will use pub build to compile Dart, use/modify these +# (Most Dart developers will use pub build to compile Dart, use/modify these # rules if you intend to use dart2js directly # Convention is to use extension '.dart.js' for Dart compiled to Javascript to # differentiate from explicit Javascript files) @@ -23,7 +23,7 @@ build/ # Directory created by dartdoc doc/api/ -# Don't commit pubspec lock file +# Don't commit pubspec lock file # (Library packages only! Remove pattern if developing an application package) pubspec.lock diff --git a/modules/openapi-generator/src/main/resources/dart-dio/model_test.mustache b/modules/openapi-generator/src/main/resources/dart-dio/model_test.mustache index e9aab10347ecbef33d8562884cb05e6ce068f806..9cd8f2a9c97017e50387301e684918a049494198 100644 --- a/modules/openapi-generator/src/main/resources/dart-dio/model_test.mustache +++ b/modules/openapi-generator/src/main/resources/dart-dio/model_test.mustache @@ -15,7 +15,7 @@ void main() { group({{{classname}}}, () { {{#vars}} {{#description}} - // {{{description}}} + // {{{.}}} {{/description}} // {{{dataType}}} {{{name}}}{{#defaultValue}} (default value: {{{.}}}){{/defaultValue}} test('to test the property `{{{name}}}`', () async { diff --git a/modules/openapi-generator/src/main/resources/dart-dio/object_doc.mustache b/modules/openapi-generator/src/main/resources/dart-dio/object_doc.mustache index f2a52db11a4bd02883c91ae54b48448c58a37ebc..cb6505fcf4eca33eacd45d38c994dcf48496c358 100644 --- a/modules/openapi-generator/src/main/resources/dart-dio/object_doc.mustache +++ b/modules/openapi-generator/src/main/resources/dart-dio/object_doc.mustache @@ -8,7 +8,7 @@ import 'package:{{pubName}}/api.dart'; ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -{{#vars}}**{{name}}** | {{#isPrimitiveType}}**{{{dataType}}}**{{/isPrimitiveType}}{{^isPrimitiveType}}[**{{{dataType}}}**]({{complexType}}.md){{/isPrimitiveType}} | {{{description}}} | {{^required}}[optional] {{/required}}{{#readOnly}}[readonly] {{/readOnly}}{{#defaultValue}}[default to {{{defaultValue}}}]{{/defaultValue}} +{{#vars}}**{{name}}** | {{#isPrimitiveType}}**{{{dataType}}}**{{/isPrimitiveType}}{{^isPrimitiveType}}[**{{{dataType}}}**]({{complexType}}.md){{/isPrimitiveType}} | {{{description}}} | {{^required}}[optional] {{/required}}{{#readOnly}}[readonly] {{/readOnly}}{{#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) diff --git a/modules/openapi-generator/src/main/resources/dart-jaguar/README.mustache b/modules/openapi-generator/src/main/resources/dart-jaguar/README.mustache index 3e2d427c4d42804cbbce13c67e2e741e96fc8ace..9296cc8590465f7f50038b21bc704a53aff93264 100644 --- a/modules/openapi-generator/src/main/resources/dart-jaguar/README.mustache +++ b/modules/openapi-generator/src/main/resources/dart-jaguar/README.mustache @@ -1,13 +1,13 @@ # {{pubName}} {{#appDescriptionWithNewLines}} -{{{appDescriptionWithNewLines}}} +{{{.}}} {{/appDescriptionWithNewLines}} This Dart package is automatically generated by the [Open API Codegen](https://github.com/OpenAPITools/openapi-generator) project: - API version: {{appVersion}} {{#artifactVersion}} -- Package version: {{artifactVersion}} +- Package version: {{.}} {{/artifactVersion}} {{^hideGenerationTimestamp}} - Build date: {{generatedDate}} @@ -105,7 +105,7 @@ 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}} +{{#apiInfo}}{{#apis}}{{#operations}}{{#operation}}*{{classname}}* | [**{{operationId}}**]({{apiDocPath}}/{{classname}}.md#{{operationIdLowerCase}}) | **{{httpMethod}}** {{path}} | {{summary}} {{/operation}}{{/operations}}{{/apis}}{{/apiInfo}} ## Documentation For Models @@ -139,4 +139,3 @@ Class | Method | HTTP request | Description {{#apiInfo}}{{#apis}}{{#-last}}{{infoEmail}} {{/-last}}{{/apis}}{{/apiInfo}} - diff --git a/modules/openapi-generator/src/main/resources/dart-jaguar/api.mustache b/modules/openapi-generator/src/main/resources/dart-jaguar/api.mustache index db992b6faf7fad5b4debaa04625a9caaa34a31bb..7aef336eda4bb408003fd3282e8fba2aea086cd2 100644 --- a/modules/openapi-generator/src/main/resources/dart-jaguar/api.mustache +++ b/modules/openapi-generator/src/main/resources/dart-jaguar/api.mustache @@ -25,7 +25,7 @@ class {{classname}} extends ApiClient with _${{classname}}Client { /// /// {{notes}} @{{httpMethod}}Req(path: "{{path}}"{{#hasAuthMethods}}, metadata: {"auth": [{{#authMethods}} {"type": "{{type}}", "name": "{{name}}"{{#isApiKey}}, "keyName": "{{keyParamName}}", "where": "{{#isKeyInQuery}}query{{/isKeyInQuery}}{{#isKeyInHeader}}header{{/isKeyInHeader}}"{{/isApiKey}} }{{^-last}}, {{/-last}}{{/authMethods}}]}{{/hasAuthMethods}}) - Future<{{#returnType}}{{{returnType}}}{{/returnType}}{{^returnType}}void{{/returnType}}> {{nickname}}( + Future<{{{returnType}}}{{^returnType}}void{{/returnType}}> {{nickname}}( {{#pathParams}} @PathParam("{{baseName}}") {{dataType}} {{paramName}}{{^-last}}, {{/-last}} {{/pathParams}} diff --git a/modules/openapi-generator/src/main/resources/dart-jaguar/api_doc.mustache b/modules/openapi-generator/src/main/resources/dart-jaguar/api_doc.mustache index 243e2486755c22cf6576085c035b2e5e914be123..ad0c61a6673f8c41b08f3ba45d15230c0496d929 100644 --- a/modules/openapi-generator/src/main/resources/dart-jaguar/api_doc.mustache +++ b/modules/openapi-generator/src/main/resources/dart-jaguar/api_doc.mustache @@ -1,5 +1,5 @@ # {{pubName}}.api.{{classname}}{{#description}} -{{description}}{{/description}} +{{.}}{{/description}} ## Load the API package ```dart @@ -10,19 +10,19 @@ All URIs are relative to *{{basePath}}* Method | HTTP request | Description ------------- | ------------- | ------------- -{{#operations}}{{#operation}}[**{{operationId}}**]({{classname}}.md#{{operationId}}) | **{{httpMethod}}** {{path}} | {{#summary}}{{summary}}{{/summary}} +{{#operations}}{{#operation}}[**{{operationId}}**]({{classname}}.md#{{operationId}}) | **{{httpMethod}}** {{path}} | {{summary}} {{/operation}}{{/operations}} {{#operations}} {{#operation}} # **{{{operationId}}}** -> {{#returnType}}{{{returnType}}} {{/returnType}}{{{operationId}}}({{#allParams}}{{paramName}}{{^-last}}, {{/-last}}{{/allParams}}) +> {{#returnType}}{{{.}}} {{/returnType}}{{{operationId}}}({{#allParams}}{{paramName}}{{^-last}}, {{/-last}}{{/allParams}}) {{{summary}}}{{#notes}} -{{{notes}}}{{/notes}} +{{{.}}}{{/notes}} -### Example +### Example ```dart import 'package:{{pubName}}/api.dart'; {{#hasAuthMethods}} @@ -50,7 +50,7 @@ var api_instance = new {{classname}}(); var {{paramName}} = {{#isArray}}[{{/isArray}}{{#isBodyParam}}new {{dataType}}(){{/isBodyParam}}{{^isBodyParam}}{{{example}}}{{/isBodyParam}}{{#isArray}}]{{/isArray}}; // {{{dataType}}} | {{{description}}} {{/allParams}} -try { +try { {{#returnType}}var result = {{/returnType}}api_instance.{{{operationId}}}({{#allParams}}{{paramName}}{{^-last}}, {{/-last}}{{/allParams}}); {{#returnType}} print(result); @@ -64,7 +64,7 @@ try { {{^allParams}}This endpoint does not need any parameter.{{/allParams}}{{#allParams}}{{#-last}} Name | Type | Description | Notes ------------- | ------------- | ------------- | -------------{{/-last}}{{/allParams}} -{{#allParams}} **{{paramName}}** | {{#isFile}}**{{dataType}}**{{/isFile}}{{#isPrimitiveType}}**{{dataType}}**{{/isPrimitiveType}}{{^isPrimitiveType}}{{^isFile}}[**{{dataType}}**]({{baseType}}.md){{/isFile}}{{/isPrimitiveType}}| {{description}} | {{^required}}[optional] {{/required}}{{#defaultValue}}[default to {{defaultValue}}]{{/defaultValue}} +{{#allParams}} **{{paramName}}** | {{#isFile}}**{{dataType}}**{{/isFile}}{{#isPrimitiveType}}**{{dataType}}**{{/isPrimitiveType}}{{^isPrimitiveType}}{{^isFile}}[**{{dataType}}**]({{baseType}}.md){{/isFile}}{{/isPrimitiveType}}| {{description}} | {{^required}}[optional] {{/required}}{{#defaultValue}}[default to {{.}}]{{/defaultValue}} {{/allParams}} ### Return type diff --git a/modules/openapi-generator/src/main/resources/dart-jaguar/api_test.mustache b/modules/openapi-generator/src/main/resources/dart-jaguar/api_test.mustache index f5211efaff22c0ee7d940db339759fc2435c7a42..d44b5bdef2f228be5d62be81991a4c878b6e5017 100644 --- a/modules/openapi-generator/src/main/resources/dart-jaguar/api_test.mustache +++ b/modules/openapi-generator/src/main/resources/dart-jaguar/api_test.mustache @@ -17,7 +17,7 @@ void main() { // {{{.}}} // {{/notes}} - //{{#returnType}}Future<{{{returnType}}}> {{/returnType}}{{^returnType}}Future {{/returnType}}{{operationId}}({{#allParams}}{{#required}}{{{dataType}}} {{paramName}}{{^-last}}, {{/-last}}{{/required}}{{/allParams}}{{#hasOptionalParams}}{ {{#allParams}}{{^required}}{{{dataType}}} {{paramName}}{{^-last}}, {{/-last}}{{/required}}{{/allParams}} }{{/hasOptionalParams}}) async + //{{#returnType}}Future<{{{.}}}> {{/returnType}}{{^returnType}}Future {{/returnType}}{{operationId}}({{#allParams}}{{#required}}{{{dataType}}} {{paramName}}{{^-last}}, {{/-last}}{{/required}}{{/allParams}}{{#hasOptionalParams}}{ {{#allParams}}{{^required}}{{{dataType}}} {{paramName}}{{^-last}}, {{/-last}}{{/required}}{{/allParams}} }{{/hasOptionalParams}}) async test('test {{operationId}}', () async { // TODO }); diff --git a/modules/openapi-generator/src/main/resources/dart-jaguar/class.mustache b/modules/openapi-generator/src/main/resources/dart-jaguar/class.mustache index 0bb3c10674486fce5dcf8972111a5d20ea987fe7..6178bba374fb251b42e8ee0e78489192eea287ee 100644 --- a/modules/openapi-generator/src/main/resources/dart-jaguar/class.mustache +++ b/modules/openapi-generator/src/main/resources/dart-jaguar/class.mustache @@ -9,7 +9,7 @@ message {{classname}} { part '{{classFilename}}.jser.dart'; class {{classname}} { - {{#vars}}{{#description}} /* {{{description}}} */{{/description}} + {{#vars}}{{#description}} /* {{{.}}} */{{/description}} @Alias('{{{baseName}}}', isNullable:{{#isNullable}} true{{/isNullable}}{{^isNullable}} false{{/isNullable}},{{#allowableValues}} {{^enumVars.empty}}{{^isString}}{{! isString because inline enums are not handled for now }} processor: const {{{datatype}}}FieldProcessor(), diff --git a/modules/openapi-generator/src/main/resources/dart-jaguar/enum.mustache b/modules/openapi-generator/src/main/resources/dart-jaguar/enum.mustache index ef2c35e2c2ad02c5da93b2907e487a3dfda063ce..da8322afbe9f4fe44d8b376d2fbe7d849c6abfff 100644 --- a/modules/openapi-generator/src/main/resources/dart-jaguar/enum.mustache +++ b/modules/openapi-generator/src/main/resources/dart-jaguar/enum.mustache @@ -9,7 +9,7 @@ class {{classname}} { {{#allowableValues}} {{#enumVars}} {{#description}} - /// {{description}} + /// {{.}} {{/description}} static const {{classname}} {{{name}}} = const {{classname}}._internal({{{value}}}); {{/enumVars}} diff --git a/modules/openapi-generator/src/main/resources/dart-jaguar/git_push.sh.mustache b/modules/openapi-generator/src/main/resources/dart-jaguar/git_push.sh.mustache index 8b3f689c9121a65080ad038d37a2036b01e559a1..f0bed5bd84155f05bc3cdc67af008f524efb38a6 100755 --- a/modules/openapi-generator/src/main/resources/dart-jaguar/git_push.sh.mustache +++ b/modules/openapi-generator/src/main/resources/dart-jaguar/git_push.sh.mustache @@ -55,4 +55,3 @@ 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/dart-jaguar/gitignore.mustache b/modules/openapi-generator/src/main/resources/dart-jaguar/gitignore.mustache index 7c280441649860d99e9df07c398b32012ea8fffd..8b7331fd822c517d1df2cce63114175ef8005879 100644 --- a/modules/openapi-generator/src/main/resources/dart-jaguar/gitignore.mustache +++ b/modules/openapi-generator/src/main/resources/dart-jaguar/gitignore.mustache @@ -9,7 +9,7 @@ build/ **/packages/ # Files created by dart2js -# (Most Dart developers will use pub build to compile Dart, use/modify these +# (Most Dart developers will use pub build to compile Dart, use/modify these # rules if you intend to use dart2js directly # Convention is to use extension '.dart.js' for Dart compiled to Javascript to # differentiate from explicit Javascript files) @@ -22,6 +22,6 @@ build/ # Directory created by dartdoc doc/api/ -# Don't commit pubspec lock file +# Don't commit pubspec lock file # (Library packages only! Remove pattern if developing an application package) pubspec.lock diff --git a/modules/openapi-generator/src/main/resources/dart-jaguar/model_test.mustache b/modules/openapi-generator/src/main/resources/dart-jaguar/model_test.mustache index b766bf143e7831e6dac0be663a767cebd0596821..8e36f3df9a2ff9ec8406305081d7eef828814e97 100644 --- a/modules/openapi-generator/src/main/resources/dart-jaguar/model_test.mustache +++ b/modules/openapi-generator/src/main/resources/dart-jaguar/model_test.mustache @@ -10,7 +10,7 @@ void main() { group('test {{classname}}', () { {{#vars}} {{#description}} - // {{{description}}} + // {{{.}}} {{/description}} // {{{dataType}}} {{name}}{{#defaultValue}} (default value: {{{.}}}){{/defaultValue}} test('to test the property `{{name}}`', () async { diff --git a/modules/openapi-generator/src/main/resources/dart-jaguar/object_doc.mustache b/modules/openapi-generator/src/main/resources/dart-jaguar/object_doc.mustache index 793c8df8ae02bc4d66de3512fec3331eb0f48b65..ee17fcd02274b7083499f43be21faba05503e0dd 100644 --- a/modules/openapi-generator/src/main/resources/dart-jaguar/object_doc.mustache +++ b/modules/openapi-generator/src/main/resources/dart-jaguar/object_doc.mustache @@ -8,7 +8,7 @@ import 'package:{{pubName}}/api.dart'; ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -{{#vars}}**{{name}}** | {{#isPrimitiveType}}**{{datatype}}**{{/isPrimitiveType}}{{^isPrimitiveType}}[**{{datatype}}**]({{complexType}}.md){{/isPrimitiveType}} | {{description}} | {{^required}}[optional] {{/required}}{{#isReadOnly}}[readonly] {{/isReadOnly}}{{#defaultValue}}[default to {{defaultValue}}]{{/defaultValue}} +{{#vars}}**{{name}}** | {{#isPrimitiveType}}**{{datatype}}**{{/isPrimitiveType}}{{^isPrimitiveType}}[**{{datatype}}**]({{complexType}}.md){{/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) diff --git a/modules/openapi-generator/src/main/resources/dart/libraries/dio/README.mustache b/modules/openapi-generator/src/main/resources/dart/libraries/dio/README.mustache index 69591ce24a3cd75839ef5db2db8ba8277c3cb6f2..3efaca1cb66099c0be5fd579161dd6fecc354846 100644 --- a/modules/openapi-generator/src/main/resources/dart/libraries/dio/README.mustache +++ b/modules/openapi-generator/src/main/resources/dart/libraries/dio/README.mustache @@ -1,13 +1,13 @@ # {{pubName}} (EXPERIMENTAL) {{#appDescriptionWithNewLines}} -{{{appDescriptionWithNewLines}}} +{{{.}}} {{/appDescriptionWithNewLines}} This Dart package is automatically generated by the [OpenAPI Generator](https://openapi-generator.tech) project: - API version: {{appVersion}} {{#artifactVersion}} -- Package version: {{artifactVersion}} +- Package version: {{.}} {{/artifactVersion}} {{^hideGenerationTimestamp}} - Build date: {{generatedDate}} @@ -82,7 +82,7 @@ All URIs are relative to *{{basePath}}* Class | Method | HTTP request | Description ------------ | ------------- | ------------- | ------------- -{{#apiInfo}}{{#apis}}{{#operations}}{{#operation}}[*{{classname}}*]({{modelDocPath}}{{{classname}}}.md) | [**{{operationId}}**]({{apiDocPath}}{{classname}}.md#{{operationIdLowerCase}}) | **{{httpMethod}}** {{path}} | {{#summary}}{{summary}}{{/summary}} +{{#apiInfo}}{{#apis}}{{#operations}}{{#operation}}[*{{classname}}*]({{modelDocPath}}{{{classname}}}.md) | [**{{operationId}}**]({{apiDocPath}}{{classname}}.md#{{operationIdLowerCase}}) | **{{httpMethod}}** {{path}} | {{summary}} {{/operation}}{{/operations}}{{/apis}}{{/apiInfo}} ## Documentation For Models @@ -116,4 +116,3 @@ Class | Method | HTTP request | Description {{#apiInfo}}{{#apis}}{{#-last}}{{infoEmail}} {{/-last}}{{/apis}}{{/apiInfo}} - diff --git a/modules/openapi-generator/src/main/resources/dart/libraries/dio/api.mustache b/modules/openapi-generator/src/main/resources/dart/libraries/dio/api.mustache index bcb912d6c268e07a78a1cdb208ac23f87790eb25..a25dc2189203ddd78801ca6a5a76e8be78100bbd 100644 --- a/modules/openapi-generator/src/main/resources/dart/libraries/dio/api.mustache +++ b/modules/openapi-generator/src/main/resources/dart/libraries/dio/api.mustache @@ -19,7 +19,7 @@ class {{classname}} { const {{classname}}(this._dio{{#useBuiltValue}}, this._serializers{{/useBuiltValue}}); {{#operation}} - /// {{#summary}}{{.}}{{/summary}}{{^summary}}{{nickname}}{{/summary}} + /// {{summary}}{{^summary}}{{nickname}}{{/summary}} /// {{notes}} /// /// Parameters: @@ -33,7 +33,7 @@ class {{classname}} { /// * [onSendProgress] - A [ProgressCallback] that can be used to get the send progress /// * [onReceiveProgress] - A [ProgressCallback] that can be used to get the receive progress /// - /// Returns a [Future]{{#returnType}} containing a [Response] with a [{{{returnType}}}] as data{{/returnType}} + /// Returns a [Future]{{#returnType}} containing a [Response] with a [{{{.}}}] as data{{/returnType}} /// Throws [DioError] if API call or serialization fails {{#externalDocs}} /// {{description}} @@ -42,7 +42,7 @@ class {{classname}} { {{#isDeprecated}} @Deprecated('This operation has been deprecated') {{/isDeprecated}} - Future<Response<{{#returnType}}{{{returnType}}}{{/returnType}}{{^returnType}}void{{/returnType}}>> {{nickname}}({ {{#allParams}}{{#isPathParam}} + Future<Response<{{{returnType}}}{{^returnType}}void{{/returnType}}>> {{nickname}}({ {{#allParams}}{{#isPathParam}} required {{{dataType}}} {{paramName}},{{/isPathParam}}{{#isQueryParam}} {{#required}}required {{/required}}{{{dataType}}}{{^required}}?{{/required}} {{paramName}},{{/isQueryParam}}{{#isHeaderParam}} {{#required}}required {{/required}}{{{dataType}}}{{^required}}?{{/required}} {{paramName}},{{/isHeaderParam}}{{#isBodyParam}} @@ -74,7 +74,7 @@ class {{classname}} { 'secure': <Map<String, String>>[{{^hasAuthMethods}}],{{/hasAuthMethods}}{{#hasAuthMethods}} {{#authMethods}}{ 'type': '{{type}}',{{#scheme}} - 'scheme': '{{scheme}}',{{/scheme}} + 'scheme': '{{.}}',{{/scheme}} 'name': '{{name}}',{{#isApiKey}} 'keyName': '{{keyParamName}}', 'where': '{{#isKeyInQuery}}query{{/isKeyInQuery}}{{#isKeyInHeader}}header{{/isKeyInHeader}}',{{/isApiKey}} diff --git a/modules/openapi-generator/src/main/resources/dart/libraries/dio/api_doc.mustache b/modules/openapi-generator/src/main/resources/dart/libraries/dio/api_doc.mustache index 548c8b140ce2ad0bcbdadda2bb5b89ebe7cb4fa8..39e9163d75d8d982d64c85809407087ae8a8921a 100644 --- a/modules/openapi-generator/src/main/resources/dart/libraries/dio/api_doc.mustache +++ b/modules/openapi-generator/src/main/resources/dart/libraries/dio/api_doc.mustache @@ -1,5 +1,5 @@ # {{pubName}}.api.{{classname}}{{#description}} -{{description}}{{/description}} +{{.}}{{/description}} ## Load the API package ```dart @@ -10,19 +10,19 @@ All URIs are relative to *{{basePath}}* Method | HTTP request | Description ------------- | ------------- | ------------- -{{#operations}}{{#operation}}[**{{operationId}}**]({{classname}}.md#{{operationIdLowerCase}}) | **{{httpMethod}}** {{path}} | {{#summary}}{{summary}}{{/summary}} +{{#operations}}{{#operation}}[**{{operationId}}**]({{classname}}.md#{{operationIdLowerCase}}) | **{{httpMethod}}** {{path}} | {{summary}} {{/operation}}{{/operations}} {{#operations}} {{#operation}} # **{{{operationId}}}** -> {{#returnType}}{{{returnType}}} {{/returnType}}{{{operationId}}}({{#allParams}}{{paramName}}{{^-last}}, {{/-last}}{{/allParams}}) +> {{#returnType}}{{{.}}} {{/returnType}}{{{operationId}}}({{#allParams}}{{paramName}}{{^-last}}, {{/-last}}{{/allParams}}) {{{summary}}}{{#notes}} -{{{notes}}}{{/notes}} +{{{.}}}{{/notes}} -### Example +### Example ```dart import 'package:{{pubName}}/api.dart'; {{#hasAuthMethods}} @@ -50,7 +50,7 @@ final api = {{clientName}}().get{{classname}}(); final {{{dataType}}} {{paramName}} = {{{example}}}; // {{{dataType}}} | {{{description}}} {{/allParams}} -try { +try { {{#returnType}}final response = {{/returnType}}api.{{{operationId}}}({{#allParams}}{{paramName}}{{^-last}}, {{/-last}}{{/allParams}}); {{#returnType}} print(response); @@ -64,7 +64,7 @@ try { {{^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}} **{{paramName}}** | {{#isPrimitiveType}}**{{dataType}}**{{/isPrimitiveType}}{{^isPrimitiveType}}[**{{dataType}}**]({{baseType}}.md){{/isPrimitiveType}}| {{{description}}} | {{^required}}[optional] {{/required}}{{#defaultValue}}[default to {{{.}}}]{{/defaultValue}} {{/allParams}} ### Return type diff --git a/modules/openapi-generator/src/main/resources/dart/libraries/dio/api_test.mustache b/modules/openapi-generator/src/main/resources/dart/libraries/dio/api_test.mustache index 056920d91aa1689fbf1b3f312e47a4077ee2a72e..8420ac5dfaf723100d8e81232b25e80a0ba4d4d0 100644 --- a/modules/openapi-generator/src/main/resources/dart/libraries/dio/api_test.mustache +++ b/modules/openapi-generator/src/main/resources/dart/libraries/dio/api_test.mustache @@ -17,7 +17,7 @@ void main() { // {{{.}}} // {{/notes}} - //{{#returnType}}Future<{{{returnType}}}> {{/returnType}}{{^returnType}}Future {{/returnType}}{{{operationId}}}({{#allParams}}{{#required}}{{{dataType}}} {{{paramName}}}{{^-last}}, {{/-last}}{{/required}}{{/allParams}}{{#hasOptionalParams}}{ {{#allParams}}{{^required}}{{{dataType}}} {{{paramName}}}{{^-last}}, {{/-last}}{{/required}}{{/allParams}} }{{/hasOptionalParams}}) async + //{{#returnType}}Future<{{{.}}}> {{/returnType}}{{^returnType}}Future {{/returnType}}{{{operationId}}}({{#allParams}}{{#required}}{{{dataType}}} {{{paramName}}}{{^-last}}, {{/-last}}{{/required}}{{/allParams}}{{#hasOptionalParams}}{ {{#allParams}}{{^required}}{{{dataType}}} {{{paramName}}}{{^-last}}, {{/-last}}{{/required}}{{/allParams}} }{{/hasOptionalParams}}) async test('test {{{operationId}}}', () async { // TODO }); diff --git a/modules/openapi-generator/src/main/resources/dart/libraries/dio/gitignore.mustache b/modules/openapi-generator/src/main/resources/dart/libraries/dio/gitignore.mustache index 6d2ac22c0b41764110b373e78b89df314e77397e..4298cdcbd1a24268bccd159b376ff8a9c4722868 100644 --- a/modules/openapi-generator/src/main/resources/dart/libraries/dio/gitignore.mustache +++ b/modules/openapi-generator/src/main/resources/dart/libraries/dio/gitignore.mustache @@ -10,7 +10,7 @@ build/ **/packages/ # Files created by dart2js -# (Most Dart developers will use pub build to compile Dart, use/modify these +# (Most Dart developers will use pub build to compile Dart, use/modify these # rules if you intend to use dart2js directly # Convention is to use extension '.dart.js' for Dart compiled to Javascript to # differentiate from explicit Javascript files) @@ -23,7 +23,7 @@ build/ # Directory created by dartdoc doc/api/ -# Don't commit pubspec lock file +# Don't commit pubspec lock file # (Library packages only! Remove pattern if developing an application package) pubspec.lock diff --git a/modules/openapi-generator/src/main/resources/dart/libraries/dio/model_test.mustache b/modules/openapi-generator/src/main/resources/dart/libraries/dio/model_test.mustache index eaa57022a416c79f8b9229dc28039cd2f12d6bdc..56686dc889aa5ff551785f7d44982a0cc6f0e497 100644 --- a/modules/openapi-generator/src/main/resources/dart/libraries/dio/model_test.mustache +++ b/modules/openapi-generator/src/main/resources/dart/libraries/dio/model_test.mustache @@ -14,7 +14,7 @@ void main() { group({{{classname}}}, () { {{#vars}} {{#description}} - // {{{description}}} + // {{{.}}} {{/description}} // {{{dataType}}} {{{name}}}{{#defaultValue}} (default value: {{{.}}}){{/defaultValue}} test('to test the property `{{{name}}}`', () async { diff --git a/modules/openapi-generator/src/main/resources/dart/libraries/dio/object_doc.mustache b/modules/openapi-generator/src/main/resources/dart/libraries/dio/object_doc.mustache index 84b70087bf481bbb9de3b0a693d584afaadbbe90..9abc25d5123523d22bf73fe17e895ce8afa636dc 100644 --- a/modules/openapi-generator/src/main/resources/dart/libraries/dio/object_doc.mustache +++ b/modules/openapi-generator/src/main/resources/dart/libraries/dio/object_doc.mustache @@ -8,7 +8,7 @@ import 'package:{{pubName}}/api.dart'; ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -{{#vars}}**{{name}}** | {{#isPrimitiveType}}**{{dataType}}**{{/isPrimitiveType}}{{^isPrimitiveType}}[**{{dataType}}**]({{complexType}}.md){{/isPrimitiveType}} | {{{description}}} | {{^required}}[optional] {{/required}}{{#readOnly}}[readonly] {{/readOnly}}{{#defaultValue}}[default to {{{defaultValue}}}]{{/defaultValue}} +{{#vars}}**{{name}}** | {{#isPrimitiveType}}**{{dataType}}**{{/isPrimitiveType}}{{^isPrimitiveType}}[**{{dataType}}**]({{complexType}}.md){{/isPrimitiveType}} | {{{description}}} | {{^required}}[optional] {{/required}}{{#readOnly}}[readonly] {{/readOnly}}{{#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) diff --git a/modules/openapi-generator/src/main/resources/dart/libraries/dio/serialization/built_value/class.mustache b/modules/openapi-generator/src/main/resources/dart/libraries/dio/serialization/built_value/class.mustache index 9eb53c756c78f81761b6573e2013cd3b6a5ccd3b..bd407907931cd016f5106785fa7c40cec4d84627 100644 --- a/modules/openapi-generator/src/main/resources/dart/libraries/dio/serialization/built_value/class.mustache +++ b/modules/openapi-generator/src/main/resources/dart/libraries/dio/serialization/built_value/class.mustache @@ -11,7 +11,7 @@ part '{{classFilename}}.g.dart'; // ignore_for_file: unused_import {{/parentModel}} -/// {{#description}}{{{.}}}{{/description}}{{^description}}{{classname}}{{/description}} +/// {{{description}}}{{^description}}{{classname}}{{/description}} {{#hasVars}} /// /// Properties: @@ -22,7 +22,7 @@ part '{{classFilename}}.g.dart'; abstract class {{classname}} implements Built<{{classname}}, {{classname}}Builder> { {{#vars}} {{#description}} - /// {{{description}}} + /// {{{.}}} {{/description}} @BuiltValueField(wireName: r'{{baseName}}') {{{datatypeWithEnum}}}{{#isNullable}}?{{/isNullable}}{{^isNullable}}{{^required}}?{{/required}}{{/isNullable}} get {{name}}; diff --git a/modules/openapi-generator/src/main/resources/dart/libraries/dio/serialization/built_value/enum.mustache b/modules/openapi-generator/src/main/resources/dart/libraries/dio/serialization/built_value/enum.mustache index 4e299b1faa3bc2748bc430e1d571f1c09836816e..e3cc6755362e0758c317bb536226bbbc6366823d 100644 --- a/modules/openapi-generator/src/main/resources/dart/libraries/dio/serialization/built_value/enum.mustache +++ b/modules/openapi-generator/src/main/resources/dart/libraries/dio/serialization/built_value/enum.mustache @@ -9,7 +9,7 @@ class {{classname}} extends EnumClass { {{#allowableValues}} {{#enumVars}} {{#description}} - /// {{{description}}} + /// {{{.}}} {{/description}} @BuiltValueEnumConst({{#isInteger}}wireNumber: {{{value}}}{{/isInteger}}{{^isInteger}}wireName: r{{{value}}}{{/isInteger}}) static const {{classname}} {{name}} = _${{name}}; diff --git a/modules/openapi-generator/src/main/resources/dart/libraries/dio/serialization/built_value/enum_inline.mustache b/modules/openapi-generator/src/main/resources/dart/libraries/dio/serialization/built_value/enum_inline.mustache index 2d0c898cd3c9234959b0bd9c5cd12d50ba6720f8..5f5dfd499135db89473e07e05f0c0141bc68af6f 100644 --- a/modules/openapi-generator/src/main/resources/dart/libraries/dio/serialization/built_value/enum_inline.mustache +++ b/modules/openapi-generator/src/main/resources/dart/libraries/dio/serialization/built_value/enum_inline.mustache @@ -3,7 +3,7 @@ class {{{enumName}}} extends EnumClass { {{#allowableValues}} {{#enumVars}} {{#description}} - /// {{{description}}} + /// {{{.}}} {{/description}} @BuiltValueEnumConst({{#isInteger}}wireNumber: {{{value}}}{{/isInteger}}{{^isInteger}}wireName: r{{{value}}}{{/isInteger}}) static const {{{enumName}}} {{name}} = _${{#lambda.camelcase}}{{{enumName}}}{{/lambda.camelcase}}_{{name}}; diff --git a/modules/openapi-generator/src/main/resources/dart2/README.mustache b/modules/openapi-generator/src/main/resources/dart2/README.mustache index 01718999fd2b24a36fd11d5e6d658d7ddc83c82d..1b11291595609f77132325dd94ff3bc8b0362e39 100644 --- a/modules/openapi-generator/src/main/resources/dart2/README.mustache +++ b/modules/openapi-generator/src/main/resources/dart2/README.mustache @@ -1,13 +1,13 @@ # {{{pubName}}} {{#appDescriptionWithNewLines}} -{{{appDescriptionWithNewLines}}} +{{{.}}} {{/appDescriptionWithNewLines}} This Dart package is automatically generated by the [OpenAPI Generator](https://openapi-generator.tech) project: - API version: {{{appVersion}}} {{#artifactVersion}} -- Package version: {{{artifactVersion}}} +- Package version: {{{.}}} {{/artifactVersion}} {{^hideGenerationTimestamp}} - Build date: {{{generatedDate}}} @@ -102,7 +102,7 @@ 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}} +{{#apiInfo}}{{#apis}}{{#operations}}{{#operation}}*{{{classname}}}* | [**{{{operationId}}}**]({{{apiDocPath}}}/{{{classname}}}.md#{{{operationIdLowerCase}}}) | **{{{httpMethod}}}** {{{path}}} | {{{summary}}} {{/operation}}{{/operations}}{{/apis}}{{/apiInfo}} ## Documentation For Models @@ -142,4 +142,3 @@ Class | Method | HTTP request | Description {{#apiInfo}}{{#apis}}{{#-last}}{{{infoEmail}}} {{/-last}}{{/apis}}{{/apiInfo}} - diff --git a/modules/openapi-generator/src/main/resources/dart2/api.mustache b/modules/openapi-generator/src/main/resources/dart2/api.mustache index a7bb92891431a4215e00a305d05b4e25642fc9b1..b86bdb0222882ddb2f242b34925b9a49f543ea2f 100644 --- a/modules/openapi-generator/src/main/resources/dart2/api.mustache +++ b/modules/openapi-generator/src/main/resources/dart2/api.mustache @@ -9,7 +9,7 @@ class {{{classname}}} { {{#operation}} {{#summary}} - /// {{{summary}}} + /// {{{.}}} {{/summary}} {{#notes}} {{#summary}} @@ -43,7 +43,7 @@ class {{{classname}}} { {{#allParams}} /// * [{{{dataType}}}] {{{paramName}}}{{#required}} (required){{/required}}{{#optional}} (optional){{/optional}}: {{#description}} - /// {{{description}}} + /// {{{.}}} {{/description}} {{^-last}} /// @@ -144,7 +144,7 @@ class {{{classname}}} { } {{#summary}} - /// {{{summary}}} + /// {{{.}}} {{/summary}} {{#notes}} {{#summary}} @@ -167,13 +167,13 @@ class {{{classname}}} { {{#allParams}} /// * [{{{dataType}}}] {{{paramName}}}{{#required}} (required){{/required}}{{#optional}} (optional){{/optional}}: {{#description}} - /// {{{description}}} + /// {{{.}}} {{/description}} {{^-last}} /// {{/-last}} {{/allParams}} - Future<{{#returnType}}{{{returnType}}}{{/returnType}}{{^returnType}}void{{/returnType}}> {{{nickname}}}({{#allParams}}{{#required}}{{{dataType}}} {{{paramName}}}{{^-last}}, {{/-last}}{{/required}}{{/allParams}}{{#hasOptionalParams}}{ {{#allParams}}{{^required}}{{{dataType}}} {{{paramName}}}{{^-last}}, {{/-last}}{{/required}}{{/allParams}} }{{/hasOptionalParams}}) async { + Future<{{{returnType}}}{{^returnType}}void{{/returnType}}> {{{nickname}}}({{#allParams}}{{#required}}{{{dataType}}} {{{paramName}}}{{^-last}}, {{/-last}}{{/required}}{{/allParams}}{{#hasOptionalParams}}{ {{#allParams}}{{^required}}{{{dataType}}} {{{paramName}}}{{^-last}}, {{/-last}}{{/required}}{{/allParams}} }{{/hasOptionalParams}}) async { final response = await {{{nickname}}}WithHttpInfo({{#allParams}}{{#required}}{{{paramName}}}{{^-last}}, {{/-last}}{{/required}}{{/allParams}}{{#hasOptionalParams}} {{#allParams}}{{^required}}{{{paramName}}}: {{{paramName}}}{{^-last}}, {{/-last}}{{/required}}{{/allParams}} {{/hasOptionalParams}}); if (response.statusCode >= HttpStatus.badRequest) { throw ApiException(response.statusCode, await _decodeBodyBytes(response)); diff --git a/modules/openapi-generator/src/main/resources/dart2/api_doc.mustache b/modules/openapi-generator/src/main/resources/dart2/api_doc.mustache index b7e91eb72c8521624e7b1662325a05a001eae6d3..3332ff1f205d07c8020b8536e8ce1510e49fcce1 100644 --- a/modules/openapi-generator/src/main/resources/dart2/api_doc.mustache +++ b/modules/openapi-generator/src/main/resources/dart2/api_doc.mustache @@ -1,5 +1,5 @@ # {{{pubName}}}.api.{{{classname}}}{{#description}} -{{{description}}}{{/description}} +{{{.}}}{{/description}} ## Load the API package ```dart @@ -10,19 +10,19 @@ All URIs are relative to *{{{basePath}}}* Method | HTTP request | Description ------------- | ------------- | ------------- -{{#operations}}{{#operation}}[**{{{operationId}}}**]({{{classname}}}.md#{{{operationIdLowerCase}}}) | **{{{httpMethod}}}** {{{path}}} | {{#summary}}{{{summary}}}{{/summary}} +{{#operations}}{{#operation}}[**{{{operationId}}}**]({{{classname}}}.md#{{{operationIdLowerCase}}}) | **{{{httpMethod}}}** {{{path}}} | {{{summary}}} {{/operation}}{{/operations}} {{#operations}} {{#operation}} # **{{{operationId}}}** -> {{#returnType}}{{{returnType}}} {{/returnType}}{{{operationId}}}({{#allParams}}{{{paramName}}}{{^-last}}, {{/-last}}{{/allParams}}) +> {{#returnType}}{{{.}}} {{/returnType}}{{{operationId}}}({{#allParams}}{{{paramName}}}{{^-last}}, {{/-last}}{{/allParams}}) {{{summary}}}{{#notes}} -{{{notes}}}{{/notes}} +{{{.}}}{{/notes}} -### Example +### Example ```dart import 'package:{{{pubName}}}/api.dart'; {{#hasAuthMethods}} @@ -60,7 +60,7 @@ final api_instance = {{{classname}}}(); final {{{paramName}}} = {{#isArray}}[{{/isArray}}{{#isBodyParam}}{{{dataType}}}(){{/isBodyParam}}{{^isBodyParam}}{{{example}}}{{/isBodyParam}}{{#isArray}}]{{/isArray}}; // {{{dataType}}} | {{{description}}} {{/allParams}} -try { +try { {{#returnType}}final result = {{/returnType}}api_instance.{{{operationId}}}({{#allParams}}{{{paramName}}}{{^-last}}, {{/-last}}{{/allParams}}); {{#returnType}} print(result); @@ -74,7 +74,7 @@ try { {{^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}} **{{{paramName}}}** | {{#isPrimitiveType}}**{{{dataType}}}**{{/isPrimitiveType}}{{^isPrimitiveType}}[**{{{dataType}}}**]({{{baseType}}}.md){{/isPrimitiveType}}| {{{description}}} | {{^required}}[optional] {{/required}}{{#defaultValue}}[default to {{{.}}}]{{/defaultValue}} {{/allParams}} ### Return type diff --git a/modules/openapi-generator/src/main/resources/dart2/api_test.mustache b/modules/openapi-generator/src/main/resources/dart2/api_test.mustache index eb0aeb076436b1aba8e675ac173b0fa63bbefc04..319945b2c3b55c5950d340519570ae0413c37425 100644 --- a/modules/openapi-generator/src/main/resources/dart2/api_test.mustache +++ b/modules/openapi-generator/src/main/resources/dart2/api_test.mustache @@ -18,7 +18,7 @@ void main() { // {{{.}}} // {{/notes}} - //{{#returnType}}Future<{{{returnType}}}> {{/returnType}}{{^returnType}}Future {{/returnType}}{{{operationId}}}({{#allParams}}{{#required}}{{{dataType}}} {{{paramName}}}{{^-last}}, {{/-last}}{{/required}}{{/allParams}}{{#hasOptionalParams}}{ {{#allParams}}{{^required}}{{{dataType}}} {{{paramName}}}{{^-last}}, {{/-last}}{{/required}}{{/allParams}} }{{/hasOptionalParams}}) async + //{{#returnType}}Future<{{{.}}}> {{/returnType}}{{^returnType}}Future {{/returnType}}{{{operationId}}}({{#allParams}}{{#required}}{{{dataType}}} {{{paramName}}}{{^-last}}, {{/-last}}{{/required}}{{/allParams}}{{#hasOptionalParams}}{ {{#allParams}}{{^required}}{{{dataType}}} {{{paramName}}}{{^-last}}, {{/-last}}{{/required}}{{/allParams}} }{{/hasOptionalParams}}) async test('test {{{operationId}}}', () async { // TODO }); diff --git a/modules/openapi-generator/src/main/resources/dart2/apilib.mustache b/modules/openapi-generator/src/main/resources/dart2/apilib.mustache index df10d80401100a7c8b8363b10374c35e3019f7cb..e2233d95ec49ff8430013d16c5e123183e50de2b 100644 --- a/modules/openapi-generator/src/main/resources/dart2/apilib.mustache +++ b/modules/openapi-generator/src/main/resources/dart2/apilib.mustache @@ -1,5 +1,5 @@ {{>header}} -{{#pubLibrary}}library {{{pubLibrary}}};{{/pubLibrary}}{{^pubLibrary}}library {{{pubName}}}.api;{{/pubLibrary}} +{{#pubLibrary}}library {{{.}}};{{/pubLibrary}}{{^pubLibrary}}library {{{pubName}}}.api;{{/pubLibrary}} import 'dart:async'; import 'dart:convert'; diff --git a/modules/openapi-generator/src/main/resources/dart2/auth/part_of.mustache b/modules/openapi-generator/src/main/resources/dart2/auth/part_of.mustache index d9f1d409755caf67a97eb603594bed42d8770652..d31ade250360257dfe6411292be8f80c9d203f38 100644 --- a/modules/openapi-generator/src/main/resources/dart2/auth/part_of.mustache +++ b/modules/openapi-generator/src/main/resources/dart2/auth/part_of.mustache @@ -1 +1 @@ -{{#pubLibrary}}part of {{{pubLibrary}}};{{/pubLibrary}}{{^pubLibrary}}part of {{{pubName}}}.api;{{/pubLibrary}} +{{#pubLibrary}}part of {{{.}}};{{/pubLibrary}}{{^pubLibrary}}part of {{{pubName}}}.api;{{/pubLibrary}} diff --git a/modules/openapi-generator/src/main/resources/dart2/git_push.sh.mustache b/modules/openapi-generator/src/main/resources/dart2/git_push.sh.mustache index 8b3f689c9121a65080ad038d37a2036b01e559a1..f0bed5bd84155f05bc3cdc67af008f524efb38a6 100755 --- a/modules/openapi-generator/src/main/resources/dart2/git_push.sh.mustache +++ b/modules/openapi-generator/src/main/resources/dart2/git_push.sh.mustache @@ -55,4 +55,3 @@ 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/dart2/gitignore.mustache b/modules/openapi-generator/src/main/resources/dart2/gitignore.mustache index 7c280441649860d99e9df07c398b32012ea8fffd..8b7331fd822c517d1df2cce63114175ef8005879 100644 --- a/modules/openapi-generator/src/main/resources/dart2/gitignore.mustache +++ b/modules/openapi-generator/src/main/resources/dart2/gitignore.mustache @@ -9,7 +9,7 @@ build/ **/packages/ # Files created by dart2js -# (Most Dart developers will use pub build to compile Dart, use/modify these +# (Most Dart developers will use pub build to compile Dart, use/modify these # rules if you intend to use dart2js directly # Convention is to use extension '.dart.js' for Dart compiled to Javascript to # differentiate from explicit Javascript files) @@ -22,6 +22,6 @@ build/ # Directory created by dartdoc doc/api/ -# Don't commit pubspec lock file +# Don't commit pubspec lock file # (Library packages only! Remove pattern if developing an application package) pubspec.lock diff --git a/modules/openapi-generator/src/main/resources/dart2/model_test.mustache b/modules/openapi-generator/src/main/resources/dart2/model_test.mustache index 7de9c7b840eab9da685b25f11bf5977d964ac854..5d4f1c161c529a0bc0d79b436e2fd914c33674df 100644 --- a/modules/openapi-generator/src/main/resources/dart2/model_test.mustache +++ b/modules/openapi-generator/src/main/resources/dart2/model_test.mustache @@ -13,7 +13,7 @@ void main() { group('test {{{classname}}}', () { {{#vars}} {{#description}} - // {{{description}}} + // {{{.}}} {{/description}} // {{{dataType}}} {{{name}}}{{#defaultValue}} (default value: {{{.}}}){{/defaultValue}} test('to test the property `{{{name}}}`', () async { diff --git a/modules/openapi-generator/src/main/resources/dart2/object_doc.mustache b/modules/openapi-generator/src/main/resources/dart2/object_doc.mustache index 94402b858e0db0d31ac85f989421bd29e4e76197..441b2c7bd1bb52e5988d0e3eadbab0dd2c8e3f1b 100644 --- a/modules/openapi-generator/src/main/resources/dart2/object_doc.mustache +++ b/modules/openapi-generator/src/main/resources/dart2/object_doc.mustache @@ -8,7 +8,7 @@ import 'package:{{{pubName}}}/api.dart'; ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -{{#vars}}**{{{name}}}** | {{#isPrimitiveType}}**{{{dataType}}}**{{/isPrimitiveType}}{{^isPrimitiveType}}[**{{{dataType}}}**]({{{complexType}}}.md){{/isPrimitiveType}} | {{{description}}} | {{^required}}[optional] {{/required}}{{#isReadOnly}}[readonly] {{/isReadOnly}}{{#defaultValue}}[default to {{{defaultValue}}}]{{/defaultValue}} +{{#vars}}**{{{name}}}** | {{#isPrimitiveType}}**{{{dataType}}}**{{/isPrimitiveType}}{{^isPrimitiveType}}[**{{{dataType}}}**]({{{complexType}}}.md){{/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) diff --git a/modules/openapi-generator/src/main/resources/dart2/part_of.mustache b/modules/openapi-generator/src/main/resources/dart2/part_of.mustache index d9f1d409755caf67a97eb603594bed42d8770652..d31ade250360257dfe6411292be8f80c9d203f38 100644 --- a/modules/openapi-generator/src/main/resources/dart2/part_of.mustache +++ b/modules/openapi-generator/src/main/resources/dart2/part_of.mustache @@ -1 +1 @@ -{{#pubLibrary}}part of {{{pubLibrary}}};{{/pubLibrary}}{{^pubLibrary}}part of {{{pubName}}}.api;{{/pubLibrary}} +{{#pubLibrary}}part of {{{.}}};{{/pubLibrary}}{{^pubLibrary}}part of {{{pubName}}}.api;{{/pubLibrary}} diff --git a/modules/openapi-generator/src/main/resources/dart2/serialization/json_serializable/json_serializable_class.mustache b/modules/openapi-generator/src/main/resources/dart2/serialization/json_serializable/json_serializable_class.mustache index 3a9ff0362b3313eca06971ed67417fb2c5e288e0..f3c1ba77cb604393709fde306978769052c2e4c3 100644 --- a/modules/openapi-generator/src/main/resources/dart2/serialization/json_serializable/json_serializable_class.mustache +++ b/modules/openapi-generator/src/main/resources/dart2/serialization/json_serializable/json_serializable_class.mustache @@ -9,19 +9,19 @@ class {{{classname}}} { {{#vars}} {{#description}} - /// {{{description}}} + /// {{{.}}} {{/description}} {{^isEnum}} {{#minimum}} - // minimum: {{{minimum}}} + // minimum: {{{.}}} {{/minimum}} {{#maximum}} - // maximum: {{{maximum}}} + // maximum: {{{.}}} {{/maximum}} {{/isEnum}} {{^isBinary}} @JsonKey( - {{#defaultValue}}defaultValue: {{{defaultValue}}},{{/defaultValue}}{{^defaultValue}}nullable: {{isNullable}},{{/defaultValue}} + {{#defaultValue}}defaultValue: {{{.}}},{{/defaultValue}}{{^defaultValue}}nullable: {{isNullable}},{{/defaultValue}} name: r'{{{baseName}}}', required: {{#required}}true{{/required}}{{^required}}false{{/required}}, ) diff --git a/modules/openapi-generator/src/main/resources/dart2/serialization/json_serializable/json_serializable_enum_inline.mustache b/modules/openapi-generator/src/main/resources/dart2/serialization/json_serializable/json_serializable_enum_inline.mustache index 5249f86b398ededebfff8e587004129f025d68f5..6e9f9016750b05eee99245d2970d1a27a55940e4 100644 --- a/modules/openapi-generator/src/main/resources/dart2/serialization/json_serializable/json_serializable_enum_inline.mustache +++ b/modules/openapi-generator/src/main/resources/dart2/serialization/json_serializable/json_serializable_enum_inline.mustache @@ -1,4 +1,4 @@ -{{#description}}/// {{{description}}}{{/description}} +{{#description}}/// {{{.}}}{{/description}} enum {{{enumName}}} { {{#allowableValues}} {{#enumVars}} diff --git a/modules/openapi-generator/src/main/resources/dart2/serialization/native/native_class.mustache b/modules/openapi-generator/src/main/resources/dart2/serialization/native/native_class.mustache index 1d599915a0ad6420f68cf47e55211fff71f787d0..396236bd6f59b2ec5adb078ba6ad277698d849c2 100644 --- a/modules/openapi-generator/src/main/resources/dart2/serialization/native/native_class.mustache +++ b/modules/openapi-generator/src/main/resources/dart2/serialization/native/native_class.mustache @@ -3,14 +3,14 @@ class {{{classname}}} { {{#vars}} {{#description}} - /// {{{description}}} + /// {{{.}}} {{/description}} {{^isEnum}} {{#minimum}} - // minimum: {{{minimum}}} + // minimum: {{{.}}} {{/minimum}} {{#maximum}} - // maximum: {{{maximum}}} + // maximum: {{{.}}} {{/maximum}} {{/isEnum}} {{{datatypeWithEnum}}} {{{name}}}; diff --git a/modules/openapi-generator/src/main/resources/dart2/serialization/native/native_enum.mustache b/modules/openapi-generator/src/main/resources/dart2/serialization/native/native_enum.mustache index d3ba3f350a809c42ac377f406ef13771dfcbe478..e9c7e5d2d720227728b89c59395b917725b79d89 100644 --- a/modules/openapi-generator/src/main/resources/dart2/serialization/native/native_enum.mustache +++ b/modules/openapi-generator/src/main/resources/dart2/serialization/native/native_enum.mustache @@ -1,4 +1,4 @@ -{{#description}}/// {{{description}}}{{/description}} +{{#description}}/// {{{.}}}{{/description}} class {{{classname}}} { /// Instantiate a new enum with the provided [value]. const {{{classname}}}._(this.value); diff --git a/modules/openapi-generator/src/main/resources/dart2/serialization/native/native_enum_inline.mustache b/modules/openapi-generator/src/main/resources/dart2/serialization/native/native_enum_inline.mustache index d14c5a5648a0a8e88b163cf9e3e5c7b0d4ad5540..139f4d0287985021ffefd6ddeda1034f1f7cb81e 100644 --- a/modules/openapi-generator/src/main/resources/dart2/serialization/native/native_enum_inline.mustache +++ b/modules/openapi-generator/src/main/resources/dart2/serialization/native/native_enum_inline.mustache @@ -1,4 +1,4 @@ -{{#description}}/// {{{description}}}{{/description}} +{{#description}}/// {{{.}}}{{/description}} class {{{enumName}}} { /// Instantiate a new enum with the provided [value]. const {{{enumName}}}._(this.value); diff --git a/modules/openapi-generator/src/main/resources/elixir/api.mustache b/modules/openapi-generator/src/main/resources/elixir/api.mustache index 7979112f5604bcdf6ef0c3af43bc4461923a3f9c..eb923cb3920475af949c21bc1c087c8c416f5c62 100644 --- a/modules/openapi-generator/src/main/resources/elixir/api.mustache +++ b/modules/openapi-generator/src/main/resources/elixir/api.mustache @@ -35,7 +35,7 @@ defmodule {{moduleName}}.Api.{{classname}} do {{/optionalParams}} ## Returns - {:ok, {{#isArray}}[%{{&returnBaseType}}{}, ...]{{/isArray}}{{#isMap}}%{}{{/isMap}}{{^returnType}}nil{{/returnType}}{{#returnSimpleType}}{{#returnType}}{{#isMap}}{{/isMap}}{{{returnType}}}{{/returnType}}{{/returnSimpleType}}} on success + {:ok, {{#isArray}}[%{{&returnBaseType}}{}, ...]{{/isArray}}{{#isMap}}%{}{{/isMap}}{{^returnType}}nil{{/returnType}}{{#returnSimpleType}}{{#returnType}}{{{.}}}{{/returnType}}{{/returnSimpleType}}} on success {:error, Tesla.Env.t} on failure """ {{{typespec}}} diff --git a/modules/openapi-generator/src/main/resources/elixir/connection.ex.mustache b/modules/openapi-generator/src/main/resources/elixir/connection.ex.mustache index 801049004637ed7e8016aa10dae806714909652a..fe86fe1f06b7b7f7028a41cb08e550a6aa55d477 100644 --- a/modules/openapi-generator/src/main/resources/elixir/connection.ex.mustache +++ b/modules/openapi-generator/src/main/resources/elixir/connection.ex.mustache @@ -16,7 +16,7 @@ defmodule {{moduleName}}.Connection do {{#isOAuth}} @scopes [ {{#scopes}} - "{{scope}}"{{^-last}},{{/-last}} {{#description}}# {{description}}{{/description}} + "{{scope}}"{{^-last}},{{/-last}} {{#description}}# {{.}}{{/description}} {{/scopes}} ] diff --git a/modules/openapi-generator/src/main/resources/elixir/licenseInfo.mustache b/modules/openapi-generator/src/main/resources/elixir/licenseInfo.mustache index b364930dee9339dd52d48763dcc9f296bc3add12..6e4e7a44c6c796233f1864ce2c224f2ca02eabc7 100644 --- a/modules/openapi-generator/src/main/resources/elixir/licenseInfo.mustache +++ b/modules/openapi-generator/src/main/resources/elixir/licenseInfo.mustache @@ -1,4 +1,4 @@ -{{#licenseHeader}}{{licenseHeader}} +{{#licenseHeader}}{{.}} {{/licenseHeader}} # NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/modules/openapi-generator/src/main/resources/elm/README.mustache b/modules/openapi-generator/src/main/resources/elm/README.mustache index 932f287c0fae3cbc026eec50b23076d47d056bc2..36be424bcdaaf3e6c4fa18b6a7f803f409475189 100644 --- a/modules/openapi-generator/src/main/resources/elm/README.mustache +++ b/modules/openapi-generator/src/main/resources/elm/README.mustache @@ -1,7 +1,7 @@ # Elm API client {{#appDescriptionWithNewLines}} -{{{appDescriptionWithNewLines}}} +{{{.}}} {{/appDescriptionWithNewLines}} ## Overview diff --git a/modules/openapi-generator/src/main/resources/elm/licenseInfo.mustache b/modules/openapi-generator/src/main/resources/elm/licenseInfo.mustache index 19a72ee62407866410a5121d89586b4a8a7ec370..9ee1c264742ef54cd18dd81ae2856eddbb1c3f6a 100644 --- a/modules/openapi-generator/src/main/resources/elm/licenseInfo.mustache +++ b/modules/openapi-generator/src/main/resources/elm/licenseInfo.mustache @@ -3,10 +3,10 @@ {{{appDescription}}} {{#version}} - The version of the OpenAPI document: {{{version}}} + The version of the OpenAPI document: {{{.}}} {{/version}} {{#infoEmail}} - Contact: {{{infoEmail}}} + Contact: {{{.}}} {{/infoEmail}} NOTE: This file is auto generated by the openapi-generator. diff --git a/modules/openapi-generator/src/main/resources/elm/operation.mustache b/modules/openapi-generator/src/main/resources/elm/operation.mustache index de4d54d179822c4982eb71acb6c6a050d8fbd629..496e7954f69f078348a9118e8ae908617cb8b670 100644 --- a/modules/openapi-generator/src/main/resources/elm/operation.mustache +++ b/modules/openapi-generator/src/main/resources/elm/operation.mustache @@ -33,7 +33,7 @@ import Uuid exposing (Uuid){{/includeUuid}} {-| {{{notes}}} -} {{/notes}} -{{operationId}} : {{#allParams}}{{^required}}Maybe {{/required}}{{#isArray}}List {{/isArray}}{{#datatypeWithEnum}}{{.}}{{/datatypeWithEnum}}{{^datatypeWithEnum}}{{#isModel}}Api.Data.{{/isModel}}{{dataType}}{{/datatypeWithEnum}} -> {{/allParams}}{{#authMethods}}{{#isBasicBearer}}String -> {{/isBasicBearer}}{{/authMethods}}Api.Request {{^responses}}(){{/responses}}{{#responses}}{{#is2xx}}{{^dataType}}(){{/dataType}}{{#isMap}}(Dict.Dict String {{/isMap}}{{#isArray}}(List {{#items}}{{#isModel}}Api.Data.{{/isModel}}{{/items}}{{/isArray}}{{^isArray}}{{^primitiveType}}{{^isUuid}}Api.Data.{{/isUuid}}{{/primitiveType}}{{/isArray}}{{dataType}}{{#isArray}}){{/isArray}}{{#isMap}}){{/isMap}}{{/is2xx}}{{/responses}} +{{operationId}} : {{#allParams}}{{^required}}Maybe {{/required}}{{#isArray}}List {{/isArray}}{{datatypeWithEnum}}{{^datatypeWithEnum}}{{#isModel}}Api.Data.{{/isModel}}{{dataType}}{{/datatypeWithEnum}} -> {{/allParams}}{{#authMethods}}{{#isBasicBearer}}String -> {{/isBasicBearer}}{{/authMethods}}Api.Request {{^responses}}(){{/responses}}{{#responses}}{{#is2xx}}{{^dataType}}(){{/dataType}}{{#isMap}}(Dict.Dict String {{/isMap}}{{#isArray}}(List {{#items}}{{#isModel}}Api.Data.{{/isModel}}{{/items}}{{/isArray}}{{^isArray}}{{^primitiveType}}{{^isUuid}}Api.Data.{{/isUuid}}{{/primitiveType}}{{/isArray}}{{dataType}}{{#isArray}}){{/isArray}}{{#isMap}}){{/isMap}}{{/is2xx}}{{/responses}} {{operationId}}{{#allParams}} {{>paramName}}{{/allParams}}{{#authMethods}}{{#isBasicBearer}} auth_token{{/isBasicBearer}}{{/authMethods}} = Api.request "{{httpMethod}}" diff --git a/modules/openapi-generator/src/main/resources/erlang-client/api.mustache b/modules/openapi-generator/src/main/resources/erlang-client/api.mustache index ddb5dee0138900edd0eae8d92bd62d6ea210570d..3d7162eca51aca6071f3309120f775de5aaf9312 100644 --- a/modules/openapi-generator/src/main/resources/erlang-client/api.mustache +++ b/modules/openapi-generator/src/main/resources/erlang-client/api.mustache @@ -11,11 +11,11 @@ {{^notes.isEmpty}} %% {{{notes}}} {{/notes.isEmpty}} --spec {{operationId}}(ctx:ctx(){{#allParams}}{{#required}}, {{{dataType}}}{{/required}}{{/allParams}}) -> {ok, {{#returnType}}{{{returnType}}}{{/returnType}}{{^returnType}}[]{{/returnType}}, {{packageName}}_utils:response_info()} | {ok, hackney:client_ref()} | {error, term(), {{packageName}}_utils:response_info()}. +-spec {{operationId}}(ctx:ctx(){{#allParams}}{{#required}}, {{{dataType}}}{{/required}}{{/allParams}}) -> {ok, {{{returnType}}}{{^returnType}}[]{{/returnType}}, {{packageName}}_utils:response_info()} | {ok, hackney:client_ref()} | {error, term(), {{packageName}}_utils:response_info()}. {{operationId}}(Ctx{{#allParams}}{{#required}}, {{paramName}}{{/required}}{{/allParams}}) -> {{operationId}}(Ctx{{#allParams}}{{#required}}, {{paramName}}{{/required}}{{/allParams}}, #{}). --spec {{operationId}}(ctx:ctx(){{#allParams}}{{#required}}, {{{dataType}}}{{/required}}{{/allParams}}, maps:map()) -> {ok, {{#returnType}}{{{returnType}}}{{/returnType}}{{^returnType}}[]{{/returnType}}, {{packageName}}_utils:response_info()} | {ok, hackney:client_ref()} | {error, term(), {{packageName}}_utils:response_info()}. +-spec {{operationId}}(ctx:ctx(){{#allParams}}{{#required}}, {{{dataType}}}{{/required}}{{/allParams}}, maps:map()) -> {ok, {{{returnType}}}{{^returnType}}[]{{/returnType}}, {{packageName}}_utils:response_info()} | {ok, hackney:client_ref()} | {error, term(), {{packageName}}_utils:response_info()}. {{operationId}}(Ctx{{#allParams}}{{#required}}, {{paramName}}{{/required}}{{/allParams}}, Optional) -> _OptionalParams = maps:get(params, Optional, #{}), Cfg = maps:get(cfg, Optional, application:get_env(kuberl, config, #{})), diff --git a/modules/openapi-generator/src/main/resources/erlang-client/app.src.mustache b/modules/openapi-generator/src/main/resources/erlang-client/app.src.mustache index 7d9dc3f55fe60b15384e6786fc7409b300c5b5dd..f41c881524a5e78fee5276ba256af9aad570739a 100644 --- a/modules/openapi-generator/src/main/resources/erlang-client/app.src.mustache +++ b/modules/openapi-generator/src/main/resources/erlang-client/app.src.mustache @@ -1,6 +1,6 @@ {application, {{packageName}}, - [{description, {{#appDescription}}"{{appDescription}}"{{/appDescription}}{{^appDescription}}"OpenAPI client library"{{/appDescription}}}, - {vsn, "{{#apiVersion}}{{apiVersion}}{{/apiVersion}}{{^apiVersion}}0.1.0{{/apiVersion}}"}, + [{description, {{#appDescription}}"{{.}}"{{/appDescription}}{{^appDescription}}"OpenAPI client library"{{/appDescription}}}, + {vsn, "{{apiVersion}}{{^apiVersion}}0.1.0{{/apiVersion}}"}, {registered, []}, {applications, [kernel, @@ -9,10 +9,10 @@ hackney, ctx ]}, - {env, [{host, "{{#host}}{{{host}}}{{/host}}{{^host}}localhost{{/host}}"}]}, + {env, [{host, "{{{host}}}{{^host}}localhost{{/host}}"}]}, {modules, []}, {maintainers, []}, - {licenses, [{{#licenseInfo}}"{{licenseInfo}}"{{/licenseInfo}}]}, - {links, [{{#infoUrl}}"{{infoUrl}}"{{/infoUrl}}]} + {licenses, [{{#licenseInfo}}"{{.}}"{{/licenseInfo}}]}, + {links, [{{#infoUrl}}"{{.}}"{{/infoUrl}}]} ]}. diff --git a/modules/openapi-generator/src/main/resources/erlang-proper/app.src.mustache b/modules/openapi-generator/src/main/resources/erlang-proper/app.src.mustache index 0c9bc9c2ae0a81bc02557f4a0130e555206f687b..54b3656ffd9e8b8c0408407ce3b424511edc9a07 100644 --- a/modules/openapi-generator/src/main/resources/erlang-proper/app.src.mustache +++ b/modules/openapi-generator/src/main/resources/erlang-proper/app.src.mustache @@ -1,6 +1,6 @@ { application, {{packageName}} -, [ {description, {{#appDescription}}"{{appDescription}}"{{/appDescription}}{{^appDescription}}"OpenAPI client library for EQC testing"{{/appDescription}}} - , {vsn, "{{#apiVersion}}{{apiVersion}}{{/apiVersion}}{{^apiVersion}}0.1.0{{/apiVersion}}"} +, [ {description, {{#appDescription}}"{{.}}"{{/appDescription}}{{^appDescription}}"OpenAPI client library for EQC testing"{{/appDescription}}} + , {vsn, "{{apiVersion}}{{^apiVersion}}0.1.0{{/apiVersion}}"} , {registered, []} , { applications , [ kernel @@ -10,12 +10,12 @@ ] } , { env - , [ {host, "http://{{#host}}{{{host}}}{{/host}}{{^host}}localhost:8080{{/host}}"} + , [ {host, "http://{{{host}}}{{^host}}localhost:8080{{/host}}"} , {basic_auth, {"admin", "admin"}} ] } , {modules, []} , {maintainers, []} - , {licenses, [{{#licenseInfo}}"{{licenseInfo}}"{{/licenseInfo}}]} - , {links, [{{#infoUrl}}"{{infoUrl}}"{{/infoUrl}}]} + , {licenses, [{{#licenseInfo}}"{{.}}"{{/licenseInfo}}]} + , {links, [{{#infoUrl}}"{{.}}"{{/infoUrl}}]} ]}. diff --git a/modules/openapi-generator/src/main/resources/erlang-proper/model.mustache b/modules/openapi-generator/src/main/resources/erlang-proper/model.mustache index 6aecad001cf015467026d6519eddc6232107e95f..e82269834dd51f4f8d2ab938bdf2a9d05aaab4a6 100644 --- a/modules/openapi-generator/src/main/resources/erlang-proper/model.mustache +++ b/modules/openapi-generator/src/main/resources/erlang-proper/model.mustache @@ -23,7 +23,7 @@ {{/isEnum}} {{#isArray}} {{classname}}() -> - list({{arrayModelType}}{{#minItems}}, {{minItems}}{{#maxItems}}, {{maxItems}}{{/maxItems}}{{/minItems}}). + list({{arrayModelType}}{{#minItems}}, {{minItems}}{{#maxItems}}, {{.}}{{/maxItems}}{{/minItems}}). {{/isArray}} {{^isEnum}}{{^isArray}} {{classname}}() -> @@ -31,7 +31,7 @@ {{classname}}(Fields) -> Default = [ {{#vars}}{{^-first}} - , {{/-first}}{'{{baseName}}', {{#isString}}{{#isEnum}}elements([{{#allowableValues.values}}{{^-first}}, {{/-first}}<<"{{.}}">>{{/allowableValues.values}}]){{/isEnum}}{{^isEnum}}binary({{#minLength}}{{minLength}}{{#maxLength}}, {{maxLength}}{{/maxLength}}{{/minLength}}){{/isEnum}}{{/isString}}{{^isString}}{{baseType}}{{/isString}} }{{/vars}} + , {{/-first}}{'{{baseName}}', {{#isString}}{{#isEnum}}elements([{{#allowableValues.values}}{{^-first}}, {{/-first}}<<"{{.}}">>{{/allowableValues.values}}]){{/isEnum}}{{^isEnum}}binary({{#minLength}}{{minLength}}{{#maxLength}}, {{.}}{{/maxLength}}{{/minLength}}){{/isEnum}}{{/isString}}{{^isString}}{{baseType}}{{/isString}} }{{/vars}} ], lists:ukeymerge(1, lists:sort(Fields), lists:sort(Default)). {{/isArray}}{{/isEnum}} diff --git a/modules/openapi-generator/src/main/resources/erlang-server/README.mustache b/modules/openapi-generator/src/main/resources/erlang-server/README.mustache index 9593d7162a8553b6df184f279d8031d8d29bffc2..5d36ca07576b6d8db867ffc68c3ec09a97db4ed5 100644 --- a/modules/openapi-generator/src/main/resources/erlang-server/README.mustache +++ b/modules/openapi-generator/src/main/resources/erlang-server/README.mustache @@ -55,4 +55,3 @@ Use erlang-server with erlang.mk $erl -pa ./deps/cowboy/ebin -pa ./deps/cowlib/ebin -pa ./deps/ranch/ebin -pa ./deps/jsx/ebin -pa ./deps/jesse/ebin -pa ./deps/rfc3339/ebin -pa ./ebin 4, Start project application:ensure_all_started(http_server). - diff --git a/modules/openapi-generator/src/main/resources/erlang-server/api.mustache b/modules/openapi-generator/src/main/resources/erlang-server/api.mustache index 7a6a7c26a90b2b33633de2f64c91c8d8a7735a7d..b97e4a2c5ecab477637925478e5ae786dedb3cb2 100644 --- a/modules/openapi-generator/src/main/resources/erlang-server/api.mustache +++ b/modules/openapi-generator/src/main/resources/erlang-server/api.mustache @@ -297,7 +297,7 @@ validation_error(ViolatedRule, Name, Info) -> throw({wrong_param, Name, ViolatedRule, Info}). -spec get_value(body | qs_val | header | binding, Name :: any(), Req0 :: cowboy_req:req()) -> - {Value :: any(), Req :: cowboy_req:req()} | + {Value :: any(), Req :: cowboy_req:req()} | {error, Reason :: any(), Req :: cowboy_req:req()}. get_value(body, _Name, Req0) -> {ok, Body, Req} = cowboy_req:read_body(Req0), @@ -327,7 +327,7 @@ prepare_body(Body) -> <<"">> -> <<"">>; _ -> try - jsx:decode(Body, [return_maps]) + jsx:decode(Body, [return_maps]) catch error:_ -> {error, {invalid_body, not_json, Body}} diff --git a/modules/openapi-generator/src/main/resources/erlang-server/app.src.mustache b/modules/openapi-generator/src/main/resources/erlang-server/app.src.mustache index 5fdef5bf790227bc744c0d424425ca925d9d31a6..a90c4e7cae7765d94bfc6a8d7ae9a483941e972c 100644 --- a/modules/openapi-generator/src/main/resources/erlang-server/app.src.mustache +++ b/modules/openapi-generator/src/main/resources/erlang-server/app.src.mustache @@ -1,5 +1,5 @@ {application, {{packageName}}, [ - {description, {{#appDescription}}"{{appDescription}}"{{/appDescription}}{{^appDescription}}"OpenAPI rest server library"{{/appDescription}}}, + {description, {{#appDescription}}"{{.}}"{{/appDescription}}{{^appDescription}}"OpenAPI rest server library"{{/appDescription}}}, {vsn, "{{apiVersion}}"}, {registered, []}, {applications, [ @@ -14,6 +14,6 @@ {env, [ ]}, {modules, []}, - {licenses, [{{#licenseInfo}}"{{licenseInfo}}"{{/licenseInfo}}]}, - {links, [{{#infoUrl}}"{{infoUrl}}"{{/infoUrl}}]} + {licenses, [{{#licenseInfo}}"{{.}}"{{/licenseInfo}}]}, + {links, [{{#infoUrl}}"{{.}}"{{/infoUrl}}]} ]}. diff --git a/modules/openapi-generator/src/main/resources/erlang-server/auth.mustache b/modules/openapi-generator/src/main/resources/erlang-server/auth.mustache index 3f3e9e94553d24709776bc1cd32d9cf651ad81b9..3159e352a9c5c73952bea074b632ab6473421f26 100644 --- a/modules/openapi-generator/src/main/resources/erlang-server/auth.mustache +++ b/modules/openapi-generator/src/main/resources/erlang-server/auth.mustache @@ -50,6 +50,3 @@ get_api_key(header, KeyParam, Req) -> get_api_key(qs_val, KeyParam, Req) -> QS = cowboy_req:parse_qs(Req), { {{packageName}}_utils:get_opt(KeyParam, QS), Req}. - - - diff --git a/modules/openapi-generator/src/main/resources/erlang-server/router.mustache b/modules/openapi-generator/src/main/resources/erlang-server/router.mustache index d0136c5a190d622aae978a71d0845169ec13676c..e2efc2206bc19ea48e02487995e2b70bab339579 100644 --- a/modules/openapi-generator/src/main/resources/erlang-server/router.mustache +++ b/modules/openapi-generator/src/main/resources/erlang-server/router.mustache @@ -76,5 +76,3 @@ prepare_validator() -> get_openapi_path() -> {ok, AppName} = application:get_application(?MODULE), filename:join({{packageName}}_utils:priv_dir(AppName), "{{{openAPISpecName}}}.json"). - - diff --git a/modules/openapi-generator/src/main/resources/fsharp-functions-server/Handler.mustache b/modules/openapi-generator/src/main/resources/fsharp-functions-server/Handler.mustache index 8c8aebc852a5e9dea38ebd24284ae19b90865fd3..1a87cdd1a9726cb03c783145517424c14fd2389c 100644 --- a/modules/openapi-generator/src/main/resources/fsharp-functions-server/Handler.mustache +++ b/modules/openapi-generator/src/main/resources/fsharp-functions-server/Handler.mustache @@ -18,36 +18,36 @@ module {{classname}}Handlers = {{#operation}} //#region {{operationId}} /// <summary> - /// {{#summary}}{{summary}}{{/summary}} + /// {{summary}} /// </summary> [<FunctionName("{{operationId}}")>] let {{operationId}} ([<HttpTrigger(Extensions.Http.AuthorizationLevel.Anonymous, "{{httpMethod}}", Route = "{{contextPath}}{{path}}")>] req:HttpRequest ) = - + {{#hasBodyParam}} use reader = StreamReader(req.Body) let mediaTypes = [{{#consumes}}"{{mediaType}}";{{/consumes}}] // currently unused - + {{#bodyParam}} - let bind (contentType:string) body = - match (contentType.ToLower()) with - | "application/json" -> - body |> JsonConvert.DeserializeObject<{{operationId}}BodyParams> + let bind (contentType:string) body = + match (contentType.ToLower()) with + | "application/json" -> + body |> JsonConvert.DeserializeObject<{{operationId}}BodyParams> | _ -> failwith (sprintf "TODO - ContentType %s not currently supported" contentType) {{/bodyParam}} - let bodyParams = reader.ReadToEnd() |> bind req.ContentType + let bodyParams = reader.ReadToEnd() |> bind req.ContentType let result = {{classname}}Service.{{operationId}} bodyParams {{/hasBodyParam}} {{^hasBodyParam}} let result = {{classname}}Service.{{operationId}} () {{/hasBodyParam}} - match result with + match result with {{#responses}} | {{operationId}}{{#isDefault}}Default{{/isDefault}}StatusCode{{^isDefault}}{{code}}{{/isDefault}} resolved -> - {{^primitiveType}} + {{^primitiveType}} let content = JsonConvert.SerializeObject resolved.content let responseContentType = "application/json" {{/primitiveType}} @@ -55,11 +55,8 @@ module {{classname}}Handlers = let content = resolved.content let responseContentType = "text/plain" {{/primitiveType}} - ContentResult(Content = content, ContentType = responseContentType, StatusCode = System.Nullable({{code}})) + ContentResult(Content = content, ContentType = responseContentType, StatusCode = System.Nullable({{code}})) {{/responses}} {{/operation}} {{/operations}} - - - diff --git a/modules/openapi-generator/src/main/resources/fsharp-functions-server/HandlerParams.mustache b/modules/openapi-generator/src/main/resources/fsharp-functions-server/HandlerParams.mustache index 5b14e1520d186b9d1d299e734f525dd36eed1d44..ca4d361c02ca92c82c95d6b7ccc7a7c90ccf2bc0 100644 --- a/modules/openapi-generator/src/main/resources/fsharp-functions-server/HandlerParams.mustache +++ b/modules/openapi-generator/src/main/resources/fsharp-functions-server/HandlerParams.mustache @@ -2,13 +2,13 @@ namespace {{packageName}} {{#imports}} {{#import}} -open {{import}} +open {{.}} {{/import}} {{/imports}} open System.Collections.Generic open System -module {{classname}}HandlerParams = +module {{classname}}HandlerParams = {{#operations}} {{#operation}} @@ -21,7 +21,7 @@ module {{classname}}HandlerParams = {{paramName}} : {{dataType}} {{^required}}option{{/required}}; {{#-last}} } - {{/-last}} + {{/-last}} //#endregion {{/pathParams}} {{#queryParams}} @@ -32,11 +32,11 @@ module {{classname}}HandlerParams = type {{operationId}}QueryParams = { {{/-first}} {{paramName}} : {{dataType}} {{^required}}option{{/required}}; - + {{#-last}} } //#endregion - {{/-last}} + {{/-last}} {{/queryParams}} {{#bodyParams}} @@ -44,10 +44,10 @@ module {{classname}}HandlerParams = //#region Body parameters [<CLIMutable>] {{#-last}} - type {{operationId}}BodyParams = {{dataType}} + type {{operationId}}BodyParams = {{dataType}} {{/-last}} {{^-last}} - type {{operationId}}BodyParams = { + type {{operationId}}BodyParams = { {{paramName}} : {{dataType}}; {{/-last}} {{/-first}} @@ -59,7 +59,7 @@ module {{classname}}HandlerParams = } {{/-first}} //#endregion - {{/-last}} + {{/-last}} {{/bodyParams}} {{#formParams}} @@ -71,7 +71,7 @@ module {{classname}}HandlerParams = {{paramName}} : {{dataType}} {{^required}}option{{/required}}; {{#-last}} } - {{/-last}} + {{/-last}} //#endregion {{/formParams}} {{#headerParams}} @@ -84,11 +84,11 @@ module {{classname}}HandlerParams = {{paramName}} : {{dataType}} {{^required}}option{{/required}}; {{#-last}} } - {{/-last}} + {{/-last}} //#endregion {{/headerParams}} {{#cookieParams}} - + //#region Cookie parameters {{#-first}} type {{operationId}}CookieParams = { @@ -96,14 +96,14 @@ module {{classname}}HandlerParams = {{paramName}} : {{dataType}} {{^required}}option{{/required}}; {{#-last}} } - {{/-last}} + {{/-last}} //#endregion {{/cookieParams}} {{#responses}} - + type {{operationId}}{{#isDefault}}Default{{/isDefault}}StatusCode{{^isDefault}}{{code}}{{/isDefault}}Response = { - content:{{#dataType}}{{{.}}}{{/dataType}}{{^dataType}}string{{/dataType}}; + content:{{{dataType}}}{{^dataType}}string{{/dataType}}; {{^code}}code:int{{/code}} } {{/responses}} @@ -144,4 +144,3 @@ module {{classname}}HandlerParams = {{/allParams}} {{/operation}} {{/operations}} - \ No newline at end of file diff --git a/modules/openapi-generator/src/main/resources/fsharp-functions-server/Model.mustache b/modules/openapi-generator/src/main/resources/fsharp-functions-server/Model.mustache index 8084cc0cf8f8a0bd24b2811823d79da497541e3d..97ed754375d9331dc74fa502b5f490101b8bdddf 100644 --- a/modules/openapi-generator/src/main/resources/fsharp-functions-server/Model.mustache +++ b/modules/openapi-generator/src/main/resources/fsharp-functions-server/Model.mustache @@ -7,13 +7,13 @@ open Newtonsoft.Json open {{import}} {{/imports}} -module {{classname}} = +module {{classname}} = {{#models}} {{#model}} //#region {{classname}} - {{^allowableValues}} + {{^allowableValues}} [<CLIMutable>] type {{classname}} = { {{#vars}} @@ -21,15 +21,14 @@ module {{classname}} = {{name}} : {{#isDateTime}}{{^required}}Nullable<{{/required}}{{/isDateTime}}{{{dataType}}}{{#isDateTime}}{{^required}}>{{/required}}{{/isDateTime}}; {{/vars}} } - {{/allowableValues}} + {{/allowableValues}} {{#allowableValues}} {{#enumVars}} let {{name}} = {{#isString}}"{{value}}"{{/isString}}{{#isInteger}}"{{value}}"{{/isInteger}} {{/enumVars}} type {{classname}} = {{#isString}}string{{/isString}}{{#isInteger}}int{{/isInteger}} {{/allowableValues}} - + //#endregion {{/model}} {{/models}} - \ No newline at end of file diff --git a/modules/openapi-generator/src/main/resources/fsharp-functions-server/Project.fsproj.mustache b/modules/openapi-generator/src/main/resources/fsharp-functions-server/Project.fsproj.mustache index c0b479a470f2011c9edec316086a33780305a726..b48652f82a7f8692b1976e73e1cba13fd9bde403 100644 --- a/modules/openapi-generator/src/main/resources/fsharp-functions-server/Project.fsproj.mustache +++ b/modules/openapi-generator/src/main/resources/fsharp-functions-server/Project.fsproj.mustache @@ -10,7 +10,7 @@ <PackageReference Include="Microsoft.NET.Sdk.Functions" Version="1.0.24" /> <PackageReference Include="Newtonsoft.Json" Version="12.0.1" /> </ItemGroup> - <ItemGroup> + <ItemGroup> <None Include="host.json"> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </None> diff --git a/modules/openapi-generator/src/main/resources/fsharp-functions-server/README.mustache b/modules/openapi-generator/src/main/resources/fsharp-functions-server/README.mustache index 9441f3981f6f15e3aef34291ba782728ff23f74c..630bfdb543c0c79941027b586ead4d12472f5591 100644 --- a/modules/openapi-generator/src/main/resources/fsharp-functions-server/README.mustache +++ b/modules/openapi-generator/src/main/resources/fsharp-functions-server/README.mustache @@ -64,9 +64,9 @@ Each Service/operation function must accept the [OperationId]Params object and r `type AddPetArgs = { bodyParams:AddPetBodyParams } type IPetApiService = abstract member AddPet:HttpContext -> AddPetArgs->AddPetResult` -[OperationId]Result is a discriminated union of all possible OpenAPI response types for that operation. +[OperationId]Result is a discriminated union of all possible OpenAPI response types for that operation. -This means that service implementations can only return status codes that have been declared in the OpenAPI specification. +This means that service implementations can only return status codes that have been declared in the OpenAPI specification. However, if the OpenAPI spec declares a default Response for an operation, the service can manually set the status code. For example: @@ -93,7 +93,7 @@ Additional handlers can be configured in the Customization.fs `let handlers : HttpHandler list = [ // insert your handlers here - GET >=> + GET >=> choose [ route "/login" >=> redirectToLogin route "/logout" >=> logout @@ -110,7 +110,7 @@ Additional handlers can be configured in the Customization.fs ## .openapi-generator-ignore -It is recommended to add src/impl/** and the project's .fsproj file to the .openapi-generator-ignore file. +It is recommended to add src/impl/** and the project's .fsproj file to the .openapi-generator-ignore file. This will allow you to regenerate model, operation and parameter files without overriding your implementations of business logic, authentication, data layers, and so on. diff --git a/modules/openapi-generator/src/main/resources/fsharp-functions-server/ServiceImpl.mustache b/modules/openapi-generator/src/main/resources/fsharp-functions-server/ServiceImpl.mustache index 543a1030190ff7674a7b599abebcc741fc4d32f7..a4c82647d3b75f3d7e7ecfc20cbd782cf9aae1b7 100644 --- a/modules/openapi-generator/src/main/resources/fsharp-functions-server/ServiceImpl.mustache +++ b/modules/openapi-generator/src/main/resources/fsharp-functions-server/ServiceImpl.mustache @@ -1,7 +1,7 @@ namespace {{packageName}} {{#imports}} {{#import}} -open {{import}} +open {{.}} {{/import}} {{/imports}} open {{classname}}HandlerParams @@ -10,23 +10,23 @@ open System.Collections.Generic open System module {{classname}}ServiceImplementation = - + //#region Service implementation - type {{classname}}ServiceImpl() = + type {{classname}}ServiceImpl() = interface I{{classname}}Service with - + {{#operations}} {{#operation}} member this.{{operationId}} {{^hasBodyParam}}(){{/hasBodyParam}}{{#hasBodyParam}}(parameters:{{operationId}}BodyParams){{/hasBodyParam}} = {{#responses}} {{#-first}} {{^-last}} - if true then + if true then {{/-last}} {{/-first}} {{^-first}} {{^-last}} - else if true then + else if true then {{/-last}} {{#-last}} else diff --git a/modules/openapi-generator/src/main/resources/fsharp-functions-server/ServiceInterface.mustache b/modules/openapi-generator/src/main/resources/fsharp-functions-server/ServiceInterface.mustache index c57b01778fd9911743de0d66ae7a755f3d5ffb11..8b4f02e6aff17eeb798321a2f38ca8f9fb78ac37 100644 --- a/modules/openapi-generator/src/main/resources/fsharp-functions-server/ServiceInterface.mustache +++ b/modules/openapi-generator/src/main/resources/fsharp-functions-server/ServiceInterface.mustache @@ -5,9 +5,9 @@ open Microsoft.AspNetCore.Http module {{classname}}ServiceInterface = - + //#region Service interface - type I{{classname}}Service = + type I{{classname}}Service = {{#operations}} {{#operation}} abstract member {{operationId}} : {{^hasBodyParam}}unit{{/hasBodyParam}}{{#hasBodyParam}}{{operationId}}BodyParams{{/hasBodyParam}} -> {{operationId}}Result diff --git a/modules/openapi-generator/src/main/resources/fsharp-functions-server/build.bat.mustache b/modules/openapi-generator/src/main/resources/fsharp-functions-server/build.bat.mustache index 9e7afd0a272fa88acb0fcf088bf33ca2faaf1c22..b3ec3de1aead753fd578dd7eef2286c72df9f206 100644 --- a/modules/openapi-generator/src/main/resources/fsharp-functions-server/build.bat.mustache +++ b/modules/openapi-generator/src/main/resources/fsharp-functions-server/build.bat.mustache @@ -1,3 +1,2 @@ dotnet restore {{packageName}}.fsproj dotnet build {{packageName}}.fsproj - diff --git a/modules/openapi-generator/src/main/resources/fsharp-functions-server/build.sh.mustache b/modules/openapi-generator/src/main/resources/fsharp-functions-server/build.sh.mustache index ab63b07a1420b5953a0acccadba587e3ae70baec..c1cabe1d3845bd4707734b56fcbd9322c721916d 100644 --- a/modules/openapi-generator/src/main/resources/fsharp-functions-server/build.sh.mustache +++ b/modules/openapi-generator/src/main/resources/fsharp-functions-server/build.sh.mustache @@ -1,4 +1,3 @@ #!/bin/sh dotnet restore {{packageName}}.fsproj dotnet build {{packageName}}.fsproj - diff --git a/modules/openapi-generator/src/main/resources/fsharp-giraffe-server/AuthSchemes.mustache b/modules/openapi-generator/src/main/resources/fsharp-giraffe-server/AuthSchemes.mustache index cabb34132a618f26f799d3b9c2a6b2f167b152d2..8afe7e7ea3a85dbfd96285206bb0b74040df4f09 100644 --- a/modules/openapi-generator/src/main/resources/fsharp-giraffe-server/AuthSchemes.mustache +++ b/modules/openapi-generator/src/main/resources/fsharp-giraffe-server/AuthSchemes.mustache @@ -17,14 +17,14 @@ module AuthSchemes = let accessDenied : HttpHandler = setStatusCode 401 >=> text "Access Denied" - let buildGoogle (builder:AuthenticationBuilder) name authorizationUrl scopes (settings:IConfiguration) = + let buildGoogle (builder:AuthenticationBuilder) name authorizationUrl scopes (settings:IConfiguration) = builder.AddGoogle(fun googleOptions -> CustomHandlers.setOAuthOptions "Google" googleOptions scopes settings) - let buildGitHub (builder:AuthenticationBuilder) name authorizationUrl scopes (settings:IConfiguration) = + let buildGitHub (builder:AuthenticationBuilder) name authorizationUrl scopes (settings:IConfiguration) = builder.AddGitHub(fun githubOptions -> CustomHandlers.setOAuthOptions "GitHub" githubOptions scopes settings) - let buildOAuth (builder:AuthenticationBuilder) (name:string) authorizationUrl scopes (settings:IConfiguration) = - builder.AddOAuth(name, (fun (options:OAuthOptions) -> + let buildOAuth (builder:AuthenticationBuilder) (name:string) authorizationUrl scopes (settings:IConfiguration) = + builder.AddOAuth(name, (fun (options:OAuthOptions) -> options.AuthorizationEndpoint <- authorizationUrl options.TokenEndpoint <- settings.[name + "TokenUrl"] options.CallbackPath <- PathString(settings.[name + "CallbackPath"]) @@ -39,7 +39,7 @@ module AuthSchemes = else if (isNull settings.[name + "ClientSecret"]) then raise (Exception((name + "ClientSecret is not set."))) - let getOAuthBuilder settings name = + let getOAuthBuilder settings name = // check that "xxxClientId" and "xxxClientSecret" configuration variables have been set for all OAuth providers checkEnvironment settings name if OAuthBuilders.ContainsKey(name) then @@ -55,7 +55,7 @@ module AuthSchemes = {{/authMethods}} let buildApiKeyAuth name (services:AuthenticationBuilder) = - services.AddApiKey(fun options -> + services.AddApiKey(fun options -> options.Header <- name options.HeaderKey <- String.Empty let events = ApiKeyEvents() @@ -78,16 +78,16 @@ module AuthSchemes = let configureCookie (builder:AuthenticationBuilder) = builder.AddCookie(CustomHandlers.cookieAuth) - let configureServices (services:IServiceCollection) = + let configureServices (services:IServiceCollection) = let serviceProvider = services.BuildServiceProvider() let settings = serviceProvider.GetService<IConfiguration>() services.AddAuthentication(fun o -> o.DefaultScheme <- CookieAuthenticationDefaults.AuthenticationScheme) - |> configureOAuth settings + |> configureOAuth settings |> configureApiKeyAuth settings |> configureCookie - - let (|||) v1 v2 = - match v1 with + + let (|||) v1 v2 = + match v1 with | Some v -> v1 | None -> v2 @@ -96,5 +96,3 @@ module AuthSchemes = match ctx.Request.Cookies.TryGetValue key with | true , cookie -> Some cookie | false, _ -> None - - \ No newline at end of file diff --git a/modules/openapi-generator/src/main/resources/fsharp-giraffe-server/CustomHandlers.mustache b/modules/openapi-generator/src/main/resources/fsharp-giraffe-server/CustomHandlers.mustache index cc176cdb66edee7c6dd86e99941c3347f2b3d1a2..d8fc28a36122c14d69c34b92a909205eddd52a9e 100644 --- a/modules/openapi-generator/src/main/resources/fsharp-giraffe-server/CustomHandlers.mustache +++ b/modules/openapi-generator/src/main/resources/fsharp-giraffe-server/CustomHandlers.mustache @@ -21,7 +21,7 @@ open Microsoft.AspNetCore.Authentication.OAuth open System.Threading.Tasks open AspNet.Security.ApiKey.Providers.Events -module CustomHandlers = +module CustomHandlers = let cookieAuth (o : CookieAuthenticationOptions) = do @@ -30,22 +30,22 @@ module CustomHandlers = o.SlidingExpiration <- true o.ExpireTimeSpan <- TimeSpan.FromDays 7.0 - - let onCreatingTicket name (ctx:OAuthCreatingTicketContext) = + + let onCreatingTicket name (ctx:OAuthCreatingTicketContext) = task { // implement post-authentication logic for oAuth handlers here () } :> Task - let validateApiKey key = + let validateApiKey key = raise (NotImplementedException("API key validation must be implemented")) - let setApiKeyEvents name (events:ApiKeyEvents) = - events.OnApiKeyValidated <- (fun ctx -> + let setApiKeyEvents name (events:ApiKeyEvents) = + events.OnApiKeyValidated <- (fun ctx -> task { // implement your validation/authentication logic for api key handlers here - if validateApiKey ctx.ApiKey then - // to interact properly with Giraffe's handlers, you will need to manually set the identity + if validateApiKey ctx.ApiKey then + // to interact properly with Giraffe's handlers, you will need to manually set the identity // let claims = ... // let identity = ClaimsIdentity(claims, ApiKeyDefaults.AuthenticationScheme) // ctx.HttpContext.User <- ClaimsPrincipal([|identity|]) @@ -54,7 +54,7 @@ module CustomHandlers = ) events - let setOAuthOptions name (options:OAuthOptions) scopes (settings:IConfiguration) = + let setOAuthOptions name (options:OAuthOptions) scopes (settings:IConfiguration) = options.ClientId <- settings.[name + "ClientId"] options.ClientSecret <- settings.[name + "ClientSecret"] for scope in scopes do @@ -63,12 +63,12 @@ module CustomHandlers = options.Events.OnCreatingTicket <- Func<OAuthCreatingTicketContext,Tasks.Task>(onCreatingTicket name) match name with | "Google" -> - () + () | "GitHub" -> () - | _ -> + | _ -> () - + let logout = signOut CookieAuthenticationDefaults.AuthenticationScheme >=> redirectTo false "/" let loginView = @@ -83,13 +83,13 @@ module CustomHandlers = {{/authMethods}} ] ] - - let redirectToLogin : HttpHandler = - htmlView loginView - + + let redirectToLogin : HttpHandler = + htmlView loginView + let handlers : HttpHandler list = [ // insert your handlers here - GET >=> + GET >=> choose [ route "/login" >=> redirectToLogin {{#authMethods}} @@ -108,5 +108,5 @@ module CustomHandlers = let configureApp (app : IApplicationBuilder) = app - let configureServices (services:IServiceCollection) (authBuilder:AuthenticationBuilder) = + let configureServices (services:IServiceCollection) (authBuilder:AuthenticationBuilder) = () diff --git a/modules/openapi-generator/src/main/resources/fsharp-giraffe-server/Handler.mustache b/modules/openapi-generator/src/main/resources/fsharp-giraffe-server/Handler.mustache index 02d959293c5822f58b10bb491e295f4ebe7690ff..1a3a87d3d9d7399b59e484d2e99188b4bc61a547 100644 --- a/modules/openapi-generator/src/main/resources/fsharp-giraffe-server/Handler.mustache +++ b/modules/openapi-generator/src/main/resources/fsharp-giraffe-server/Handler.mustache @@ -9,11 +9,11 @@ open {{classname}}ServiceInterface open {{classname}}ServiceImplementation {{#imports}} {{#import}} -open {{import}} +open {{.}} {{/import}} {{/imports}} -module {{classname}}Handler = +module {{classname}}Handler = {{#operations}} /// <summary> @@ -23,17 +23,17 @@ module {{classname}}Handler = {{#operation}} //#region {{operationId}} /// <summary> - /// {{#summary}}{{summary}}{{/summary}} + /// {{summary}} /// </summary> - let {{operationId}} {{#hasPathParams}}(pathParams:{{operationId}}PathParams){{/hasPathParams}} : HttpHandler = + let {{operationId}} {{#hasPathParams}}(pathParams:{{operationId}}PathParams){{/hasPathParams}} : HttpHandler = fun (next : HttpFunc) (ctx : HttpContext) -> task { {{#hasQueryParams}} let queryParams = ctx.TryBindQueryString<{{operationId}}QueryParams>() {{/hasQueryParams}} {{#hasBodyParam}} - let! bodyParams = + let! bodyParams = ctx.BindJsonAsync<{{operationId}}BodyParams>() {{/hasBodyParam}} {{#hasFormParams}} @@ -52,7 +52,7 @@ module {{classname}}Handler = {{/-first}} {{/allParams}} let result = {{classname}}Service.{{operationId}} ctx {{#allParams}}{{#-first}}serviceArgs{{/-first}}{{/allParams}} - return! (match result with + return! (match result with {{#responses}} | {{operationId}}{{#isDefault}}Default{{/isDefault}}StatusCode{{^isDefault}}{{code}}{{/isDefault}} resolved -> setStatusCode {{code}} >=> {{#primitiveType}}{{^isMap}}text{{/isMap}}{{/primitiveType}}{{^primitiveType}}json{{/primitiveType}} resolved.content @@ -63,5 +63,3 @@ module {{classname}}Handler = {{/operation}} {{/operations}} - - diff --git a/modules/openapi-generator/src/main/resources/fsharp-giraffe-server/HandlerParams.mustache b/modules/openapi-generator/src/main/resources/fsharp-giraffe-server/HandlerParams.mustache index 5b14e1520d186b9d1d299e734f525dd36eed1d44..ca4d361c02ca92c82c95d6b7ccc7a7c90ccf2bc0 100644 --- a/modules/openapi-generator/src/main/resources/fsharp-giraffe-server/HandlerParams.mustache +++ b/modules/openapi-generator/src/main/resources/fsharp-giraffe-server/HandlerParams.mustache @@ -2,13 +2,13 @@ namespace {{packageName}} {{#imports}} {{#import}} -open {{import}} +open {{.}} {{/import}} {{/imports}} open System.Collections.Generic open System -module {{classname}}HandlerParams = +module {{classname}}HandlerParams = {{#operations}} {{#operation}} @@ -21,7 +21,7 @@ module {{classname}}HandlerParams = {{paramName}} : {{dataType}} {{^required}}option{{/required}}; {{#-last}} } - {{/-last}} + {{/-last}} //#endregion {{/pathParams}} {{#queryParams}} @@ -32,11 +32,11 @@ module {{classname}}HandlerParams = type {{operationId}}QueryParams = { {{/-first}} {{paramName}} : {{dataType}} {{^required}}option{{/required}}; - + {{#-last}} } //#endregion - {{/-last}} + {{/-last}} {{/queryParams}} {{#bodyParams}} @@ -44,10 +44,10 @@ module {{classname}}HandlerParams = //#region Body parameters [<CLIMutable>] {{#-last}} - type {{operationId}}BodyParams = {{dataType}} + type {{operationId}}BodyParams = {{dataType}} {{/-last}} {{^-last}} - type {{operationId}}BodyParams = { + type {{operationId}}BodyParams = { {{paramName}} : {{dataType}}; {{/-last}} {{/-first}} @@ -59,7 +59,7 @@ module {{classname}}HandlerParams = } {{/-first}} //#endregion - {{/-last}} + {{/-last}} {{/bodyParams}} {{#formParams}} @@ -71,7 +71,7 @@ module {{classname}}HandlerParams = {{paramName}} : {{dataType}} {{^required}}option{{/required}}; {{#-last}} } - {{/-last}} + {{/-last}} //#endregion {{/formParams}} {{#headerParams}} @@ -84,11 +84,11 @@ module {{classname}}HandlerParams = {{paramName}} : {{dataType}} {{^required}}option{{/required}}; {{#-last}} } - {{/-last}} + {{/-last}} //#endregion {{/headerParams}} {{#cookieParams}} - + //#region Cookie parameters {{#-first}} type {{operationId}}CookieParams = { @@ -96,14 +96,14 @@ module {{classname}}HandlerParams = {{paramName}} : {{dataType}} {{^required}}option{{/required}}; {{#-last}} } - {{/-last}} + {{/-last}} //#endregion {{/cookieParams}} {{#responses}} - + type {{operationId}}{{#isDefault}}Default{{/isDefault}}StatusCode{{^isDefault}}{{code}}{{/isDefault}}Response = { - content:{{#dataType}}{{{.}}}{{/dataType}}{{^dataType}}string{{/dataType}}; + content:{{{dataType}}}{{^dataType}}string{{/dataType}}; {{^code}}code:int{{/code}} } {{/responses}} @@ -144,4 +144,3 @@ module {{classname}}HandlerParams = {{/allParams}} {{/operation}} {{/operations}} - \ No newline at end of file diff --git a/modules/openapi-generator/src/main/resources/fsharp-giraffe-server/Helpers.mustache b/modules/openapi-generator/src/main/resources/fsharp-giraffe-server/Helpers.mustache index 6dcbe4ad94c0481a4cbc7c8c0bf7de0d50f66701..5297ff251806354fdc496c66d2f780c8f82317b1 100644 --- a/modules/openapi-generator/src/main/resources/fsharp-giraffe-server/Helpers.mustache +++ b/modules/openapi-generator/src/main/resources/fsharp-giraffe-server/Helpers.mustache @@ -1,12 +1,12 @@ namespace OpenAPI - module Helpers = + module Helpers = let (>=>) switch1 switch2 = - match switch1 with - | Ok v1 -> - match switch2 with + match switch1 with + | Ok v1 -> + match switch2 with | Ok v2 -> Ok(v1, v2) - | Error e -> Error e + | Error e -> Error e | Error e -> Error e \ No newline at end of file diff --git a/modules/openapi-generator/src/main/resources/fsharp-giraffe-server/Model.mustache b/modules/openapi-generator/src/main/resources/fsharp-giraffe-server/Model.mustache index de115478e262f9ce43c288e703e9e6badddbbfa8..afb74b9a1ac5c0cc3955f7788c70fa1f512ad20f 100644 --- a/modules/openapi-generator/src/main/resources/fsharp-giraffe-server/Model.mustache +++ b/modules/openapi-generator/src/main/resources/fsharp-giraffe-server/Model.mustache @@ -6,7 +6,7 @@ open System.Collections.Generic open {{import}} {{/imports}} -module {{classname}} = +module {{classname}} = {{#models}} {{#model}} @@ -33,4 +33,3 @@ module {{classname}} = //#endregion {{/model}} {{/models}} - \ No newline at end of file diff --git a/modules/openapi-generator/src/main/resources/fsharp-giraffe-server/Program.mustache b/modules/openapi-generator/src/main/resources/fsharp-giraffe-server/Program.mustache index 74f0f7b2af9635783c150f384779d21a7d3484ea..7029285307ac9a3036b5792037e1f9dc737b7061 100644 --- a/modules/openapi-generator/src/main/resources/fsharp-giraffe-server/Program.mustache +++ b/modules/openapi-generator/src/main/resources/fsharp-giraffe-server/Program.mustache @@ -45,7 +45,7 @@ module App = let HttpPut = PUT let HttpDelete = DELETE - let authFailure : HttpHandler = + let authFailure : HttpHandler = setStatusCode 401 >=> text "You must be authenticated to access this resource." let webApp = @@ -58,7 +58,7 @@ module App = {{/operation}} {{/operations}} {{/apis}} - RequestErrors.notFound (text "Not Found") + RequestErrors.notFound (text "Not Found") {{/apiInfo}} ]) // --------------------------------- @@ -72,13 +72,13 @@ module App = .UseResponseCaching() |> ignore CustomHandlers.configureApp app |> ignore app.UseGiraffe webApp |> ignore - + let configureServices (services : IServiceCollection) = services .AddResponseCaching() .AddGiraffe() - |> AuthSchemes.configureServices + |> AuthSchemes.configureServices |> CustomHandlers.configureServices services |> ignore services.AddDataProtection() |> ignore diff --git a/modules/openapi-generator/src/main/resources/fsharp-giraffe-server/README.mustache b/modules/openapi-generator/src/main/resources/fsharp-giraffe-server/README.mustache index 21d41400b228258d02f5f15673472f5cafc8251d..8f02693beb9828f734b0dbde15a881123fb4d11d 100644 --- a/modules/openapi-generator/src/main/resources/fsharp-giraffe-server/README.mustache +++ b/modules/openapi-generator/src/main/resources/fsharp-giraffe-server/README.mustache @@ -64,9 +64,9 @@ Each Service/operation function must accept the [OperationId]Params object and r `type AddPetArgs = { bodyParams:AddPetBodyParams } type IPetApiService = abstract member AddPet:HttpContext -> AddPetArgs->AddPetResult` -[OperationId]Result is a discriminated union of all possible OpenAPI response types for that operation. +[OperationId]Result is a discriminated union of all possible OpenAPI response types for that operation. -This means that service implementations can only return status codes that have been declared in the OpenAPI specification. +This means that service implementations can only return status codes that have been declared in the OpenAPI specification. However, if the OpenAPI spec declares a default Response for an operation, the service can manually set the status code. For example: @@ -75,7 +75,7 @@ For example: type FindPetsByStatusStatusCode400Response = { content:string; } type FindPetsByStatusResult = FindPetsByStatusDefaultStatusCode of FindPetsByStatusDefaultStatusCodeResponse | FindPetsByStatusStatusCode400 of FindPetsByStatusStatusCode400Response` -## Note on nullable/optional properties +## Note on nullable/optional properties Currently, handler parameters and models do not distinguish between required properties and optional (or nullable) properties***. @@ -121,7 +121,7 @@ Additional handlers can be configured in the Customization.fs `let handlers : HttpHandler list = [ // insert your handlers here - GET >=> + GET >=> choose [ route "/login" >=> redirectToLogin route "/logout" >=> logout @@ -165,7 +165,7 @@ You must implement your own validation logic for the key in CustomHandlers.setAp ## .openapi-generator-ignore -It is recommended to add src/impl/** and the project's .fsproj file to the .openapi-generator-ignore file. +It is recommended to add src/impl/** and the project's .fsproj file to the .openapi-generator-ignore file. This will allow you to regenerate model, operation and parameter files without overriding your implementations of business logic, authentication, data layers, and so on. diff --git a/modules/openapi-generator/src/main/resources/fsharp-giraffe-server/ServiceImpl.mustache b/modules/openapi-generator/src/main/resources/fsharp-giraffe-server/ServiceImpl.mustache index 0ab72e64e776aa3a6d593d166fbb9ab978dc6426..a43ba4f2f8d481028ee2ca5b5f8f86e5e349705c 100644 --- a/modules/openapi-generator/src/main/resources/fsharp-giraffe-server/ServiceImpl.mustache +++ b/modules/openapi-generator/src/main/resources/fsharp-giraffe-server/ServiceImpl.mustache @@ -1,7 +1,7 @@ namespace {{packageName}} {{#imports}} {{#import}} -open {{import}} +open {{.}} {{/import}} {{/imports}} open {{classname}}HandlerParams @@ -11,23 +11,23 @@ open System open Giraffe module {{classname}}ServiceImplementation = - + //#region Service implementation - type {{classname}}ServiceImpl() = + type {{classname}}ServiceImpl() = interface I{{classname}}Service with - + {{#operations}} {{#operation}} member this.{{operationId}} ctx {{#allParams}}{{#-first}}args{{/-first}}{{/allParams}} = {{#responses}} {{#-first}} {{^-last}} - if true then + if true then {{/-last}} {{/-first}} {{^-first}} {{^-last}} - else if true then + else if true then {{/-last}} {{#-last}} else diff --git a/modules/openapi-generator/src/main/resources/fsharp-giraffe-server/ServiceInterface.mustache b/modules/openapi-generator/src/main/resources/fsharp-giraffe-server/ServiceInterface.mustache index 68b14c67c26405e44a2e42b2f958a8eed3d4edb2..41d887e2131aaadd0cad0af664f8bbf00aaa8065 100644 --- a/modules/openapi-generator/src/main/resources/fsharp-giraffe-server/ServiceInterface.mustache +++ b/modules/openapi-generator/src/main/resources/fsharp-giraffe-server/ServiceInterface.mustache @@ -6,9 +6,9 @@ open Microsoft.AspNetCore.Http module {{classname}}ServiceInterface = - + //#region Service interface - type I{{classname}}Service = + type I{{classname}}Service = {{#operations}} {{#operation}} abstract member {{operationId}}:HttpContext {{#allParams}}{{#-first}}-> {{operationId}}Args{{/-first}}{{/allParams}}->{{operationId}}Result diff --git a/modules/openapi-generator/src/main/resources/fsharp-giraffe-server/TestHelper.mustache b/modules/openapi-generator/src/main/resources/fsharp-giraffe-server/TestHelper.mustache index c8437d7002ee0a17be18f400abe7d6a62d0055c0..e72e3664fdf6f1daf52055b0823ca16c880e8d36 100644 --- a/modules/openapi-generator/src/main/resources/fsharp-giraffe-server/TestHelper.mustache +++ b/modules/openapi-generator/src/main/resources/fsharp-giraffe-server/TestHelper.mustache @@ -12,7 +12,7 @@ open FSharp.Control.Tasks.V2.ContextInsensitive open Xunit open System.Text -module TestHelper = +module TestHelper = // --------------------------------- // Test server/client setup // --------------------------------- @@ -70,14 +70,14 @@ module TestHelper = let readText (response : HttpResponseMessage) = response.Content.ReadAsStringAsync() - |> Async.AwaitTask + |> Async.AwaitTask |> Async.RunSynchronously let shouldEqual expected actual = Assert.Equal(expected, actual) - let getConverter mediaType = - (fun (x:string) -> + let getConverter mediaType = + (fun (x:string) -> match mediaType with | "application/x-www-form-urlencoded" -> raise (NotSupportedException()) // TODO - implement FormUrlEncodedContent | _ -> x |> Encoding.UTF8.GetBytes |> MemoryStream |> StreamContent) \ No newline at end of file diff --git a/modules/openapi-generator/src/main/resources/fsharp-giraffe-server/build.bat.mustache b/modules/openapi-generator/src/main/resources/fsharp-giraffe-server/build.bat.mustache index 5c6ac5b1d17535267fe76b38e82a5bac419c398d..fbe14427eb144703b3386d1b070a6cdbbbd2fa33 100644 --- a/modules/openapi-generator/src/main/resources/fsharp-giraffe-server/build.bat.mustache +++ b/modules/openapi-generator/src/main/resources/fsharp-giraffe-server/build.bat.mustache @@ -1,3 +1,2 @@ dotnet restore src/{{packageName}}.fsproj dotnet build src/{{packageName}}.fsproj - diff --git a/modules/openapi-generator/src/main/resources/fsharp-giraffe-server/build.sh.mustache b/modules/openapi-generator/src/main/resources/fsharp-giraffe-server/build.sh.mustache index 2a97c479bc9eca5725114a9e8fd7dbf74ef66950..ebf8f4ca9b089571a9314f1cfca22941b6497364 100644 --- a/modules/openapi-generator/src/main/resources/fsharp-giraffe-server/build.sh.mustache +++ b/modules/openapi-generator/src/main/resources/fsharp-giraffe-server/build.sh.mustache @@ -1,4 +1,3 @@ #!/bin/sh dotnet restore src/{{packageName}}.fsproj dotnet build src/{{packageName}}.fsproj - diff --git a/modules/openapi-generator/src/main/resources/go-deprecated/README.mustache b/modules/openapi-generator/src/main/resources/go-deprecated/README.mustache index 2e52e2061759f8b23190bb5b790e93467712f923..94cc83ad70c24739a4b1a745432ff4009757b15c 100644 --- a/modules/openapi-generator/src/main/resources/go-deprecated/README.mustache +++ b/modules/openapi-generator/src/main/resources/go-deprecated/README.mustache @@ -1,7 +1,7 @@ # Go API client for {{packageName}} {{#appDescriptionWithNewLines}} -{{{appDescriptionWithNewLines}}} +{{{.}}} {{/appDescriptionWithNewLines}} ## Overview @@ -43,7 +43,7 @@ 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}} +{{#apiInfo}}{{#apis}}{{#operations}}{{#operation}}*{{classname}}* | [**{{operationId}}**]({{apiDocPath}}{{classname}}.md#{{operationIdLowerCase}}) | **{{httpMethod}}** {{path}} | {{summary}} {{/operation}}{{/operations}}{{/apis}}{{/apiInfo}} ## Documentation For Models diff --git a/modules/openapi-generator/src/main/resources/go-deprecated/api.mustache b/modules/openapi-generator/src/main/resources/go-deprecated/api.mustache index f85854a4fc9f51def18d7132697f5432d27e1f7e..b837934add780de7fee3d8d982bc4c73704163e5 100644 --- a/modules/openapi-generator/src/main/resources/go-deprecated/api.mustache +++ b/modules/openapi-generator/src/main/resources/go-deprecated/api.mustache @@ -25,7 +25,7 @@ type {{classname}} interface { * {{operationId}}{{#summary}} {{{.}}}{{/summary}}{{^summary}} Method for {{operationId}}{{/summary}} * {{#notes}} - * {{notes}} + * {{.}} * {{/notes}} * @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). @@ -43,10 +43,10 @@ type {{classname}} interface { {{/allParams}} {{/hasOptionalParams}} {{#returnType}} - * @return {{{returnType}}} + * @return {{{.}}} {{/returnType}} */ - {{{nickname}}}(ctx _context.Context{{#hasParams}}, {{/hasParams}}{{#allParams}}{{#required}}{{paramName}} {{{dataType}}}{{^-last}}, {{/-last}}{{/required}}{{/allParams}}{{#hasOptionalParams}}localVarOptionals *{{#structPrefix}}{{&classname}}{{/structPrefix}}{{{nickname}}}Opts{{/hasOptionalParams}}) ({{#returnType}}{{{returnType}}}, {{/returnType}}*_nethttp.Response, error) + {{{nickname}}}(ctx _context.Context{{#hasParams}}, {{/hasParams}}{{#allParams}}{{#required}}{{paramName}} {{{dataType}}}{{^-last}}, {{/-last}}{{/required}}{{/allParams}}{{#hasOptionalParams}}localVarOptionals *{{#structPrefix}}{{&classname}}{{/structPrefix}}{{{nickname}}}Opts{{/hasOptionalParams}}) ({{#returnType}}{{{.}}}, {{/returnType}}*_nethttp.Response, error) {{/operation}} } @@ -80,7 +80,7 @@ type {{#structPrefix}}{{&classname}}{{/structPrefix}}{{{nickname}}}Opts struct { * {{operationId}}{{#summary}} {{{.}}}{{/summary}}{{^summary}} Method for {{operationId}}{{/summary}} * {{#notes}} - * {{notes}} + * {{.}} * {{/notes}} * @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). @@ -98,10 +98,10 @@ type {{#structPrefix}}{{&classname}}{{/structPrefix}}{{{nickname}}}Opts struct { {{/allParams}} {{/hasOptionalParams}} {{#returnType}} - * @return {{{returnType}}} + * @return {{{.}}} {{/returnType}} */ -func (a *{{{classname}}}Service) {{{nickname}}}(ctx _context.Context{{#hasParams}}, {{/hasParams}}{{#allParams}}{{#required}}{{paramName}} {{{dataType}}}{{^-last}}, {{/-last}}{{/required}}{{/allParams}}{{#hasOptionalParams}}localVarOptionals *{{#structPrefix}}{{&classname}}{{/structPrefix}}{{{nickname}}}Opts{{/hasOptionalParams}}) ({{#returnType}}{{{returnType}}}, {{/returnType}}*_nethttp.Response, error) { +func (a *{{{classname}}}Service) {{{nickname}}}(ctx _context.Context{{#hasParams}}, {{/hasParams}}{{#allParams}}{{#required}}{{paramName}} {{{dataType}}}{{^-last}}, {{/-last}}{{/required}}{{/allParams}}{{#hasOptionalParams}}localVarOptionals *{{#structPrefix}}{{&classname}}{{/structPrefix}}{{{nickname}}}Opts{{/hasOptionalParams}}) ({{#returnType}}{{{.}}}, {{/returnType}}*_nethttp.Response, error) { var ( localVarHTTPMethod = _nethttp.Method{{httpMethod}} localVarPostBody interface{} @@ -109,13 +109,13 @@ func (a *{{{classname}}}Service) {{{nickname}}}(ctx _context.Context{{#hasParams localVarFileName string localVarFileBytes []byte {{#returnType}} - localVarReturnValue {{{returnType}}} + localVarReturnValue {{{.}}} {{/returnType}} ) // create path and map variables localVarPath := a.client.cfg.BasePath + "{{{path}}}"{{#pathParams}} - localVarPath = strings.Replace(localVarPath, "{"+"{{baseName}}"+"}", _neturl.PathEscape(parameterToString({{paramName}}, "{{#collectionFormat}}{{collectionFormat}}{{/collectionFormat}}")) , -1) + localVarPath = strings.Replace(localVarPath, "{"+"{{baseName}}"+"}", _neturl.PathEscape(parameterToString({{paramName}}, "{{collectionFormat}}")) , -1) {{/pathParams}} localVarHeaderParams := make(map[string]string) @@ -177,15 +177,15 @@ func (a *{{{classname}}}Service) {{{nickname}}}(ctx _context.Context{{#hasParams if reflect.TypeOf(t).Kind() == reflect.Slice { s := reflect.ValueOf(t) for i := 0; i < s.Len(); i++ { - localVarQueryParams.Add("{{baseName}}", parameterToString(s.Index(i), "{{#collectionFormat}}{{collectionFormat}}{{/collectionFormat}}")) + localVarQueryParams.Add("{{baseName}}", parameterToString(s.Index(i), "{{collectionFormat}}")) } } else { - localVarQueryParams.Add("{{baseName}}", parameterToString(t, "{{#collectionFormat}}{{collectionFormat}}{{/collectionFormat}}")) + localVarQueryParams.Add("{{baseName}}", parameterToString(t, "{{collectionFormat}}")) } } {{/isCollectionFormatMulti}} {{^isCollectionFormatMulti}} - localVarQueryParams.Add("{{baseName}}", parameterToString({{paramName}}, "{{#collectionFormat}}{{collectionFormat}}{{/collectionFormat}}")) + localVarQueryParams.Add("{{baseName}}", parameterToString({{paramName}}, "{{collectionFormat}}")) {{/isCollectionFormatMulti}} {{/required}} {{^required}} @@ -195,14 +195,14 @@ func (a *{{{classname}}}Service) {{{nickname}}}(ctx _context.Context{{#hasParams if reflect.TypeOf(t).Kind() == reflect.Slice { s := reflect.ValueOf(t) for i := 0; i < s.Len(); i++ { - localVarQueryParams.Add("{{baseName}}", parameterToString(s.Index(i), "{{#collectionFormat}}{{collectionFormat}}{{/collectionFormat}}")) + localVarQueryParams.Add("{{baseName}}", parameterToString(s.Index(i), "{{collectionFormat}}")) } } else { - localVarQueryParams.Add("{{baseName}}", parameterToString(t, "{{#collectionFormat}}{{collectionFormat}}{{/collectionFormat}}")) + localVarQueryParams.Add("{{baseName}}", parameterToString(t, "{{collectionFormat}}")) } {{/isCollectionFormatMulti}} {{^isCollectionFormatMulti}} - localVarQueryParams.Add("{{baseName}}", parameterToString(localVarOptionals.{{vendorExtensions.x-export-param-name}}.Value(), "{{#collectionFormat}}{{collectionFormat}}{{/collectionFormat}}")) + localVarQueryParams.Add("{{baseName}}", parameterToString(localVarOptionals.{{vendorExtensions.x-export-param-name}}.Value(), "{{collectionFormat}}")) {{/isCollectionFormatMulti}} } {{/required}} @@ -232,11 +232,11 @@ func (a *{{{classname}}}Service) {{{nickname}}}(ctx _context.Context{{#hasParams {{#hasHeaderParams}} {{#headerParams}} {{#required}} - localVarHeaderParams["{{baseName}}"] = parameterToString({{paramName}}, "{{#collectionFormat}}{{collectionFormat}}{{/collectionFormat}}") + localVarHeaderParams["{{baseName}}"] = parameterToString({{paramName}}, "{{collectionFormat}}") {{/required}} {{^required}} if localVarOptionals != nil && localVarOptionals.{{vendorExtensions.x-export-param-name}}.IsSet() { - localVarHeaderParams["{{baseName}}"] = parameterToString(localVarOptionals.{{vendorExtensions.x-export-param-name}}.Value(), "{{#collectionFormat}}{{collectionFormat}}{{/collectionFormat}}") + localVarHeaderParams["{{baseName}}"] = parameterToString(localVarOptionals.{{vendorExtensions.x-export-param-name}}.Value(), "{{collectionFormat}}") } {{/required}} {{/headerParams}} @@ -267,7 +267,7 @@ func (a *{{{classname}}}Service) {{{nickname}}}(ctx _context.Context{{#hasParams {{/isFile}} {{^isFile}} {{#required}} - localVarFormParams.Add("{{baseName}}", parameterToString({{paramName}}, "{{#collectionFormat}}{{collectionFormat}}{{/collectionFormat}}")) + localVarFormParams.Add("{{baseName}}", parameterToString({{paramName}}, "{{collectionFormat}}")) {{/required}} {{^required}} {{#isModel}} @@ -281,7 +281,7 @@ func (a *{{{classname}}}Service) {{{nickname}}}(ctx _context.Context{{#hasParams {{/isModel}} {{^isModel}} if localVarOptionals != nil && localVarOptionals.{{vendorExtensions.x-export-param-name}}.IsSet() { - localVarFormParams.Add("{{baseName}}", parameterToString(localVarOptionals.{{vendorExtensions.x-export-param-name}}.Value(), "{{#collectionFormat}}{{collectionFormat}}{{/collectionFormat}}")) + localVarFormParams.Add("{{baseName}}", parameterToString(localVarOptionals.{{vendorExtensions.x-export-param-name}}.Value(), "{{collectionFormat}}")) } {{/isModel}} {{/required}} diff --git a/modules/openapi-generator/src/main/resources/go-deprecated/api_doc.mustache b/modules/openapi-generator/src/main/resources/go-deprecated/api_doc.mustache index aaa9f553adbbcec16aede42d4b271bfc3be75caf..468ee78bbf54d75502d7a84e7a88050c0eb06de6 100644 --- a/modules/openapi-generator/src/main/resources/go-deprecated/api_doc.mustache +++ b/modules/openapi-generator/src/main/resources/go-deprecated/api_doc.mustache @@ -1,12 +1,12 @@ # {{invokerPackage}}\{{classname}}{{#description}} -{{description}}{{/description}} +{{.}}{{/description}} All URIs are relative to *{{basePath}}* Method | HTTP request | Description ------------- | ------------- | ------------- -{{#operations}}{{#operation}}[**{{operationId}}**]({{classname}}.md#{{operationId}}) | **{{httpMethod}}** {{path}} | {{#summary}}{{summary}}{{/summary}} +{{#operations}}{{#operation}}[**{{operationId}}**]({{classname}}.md#{{operationId}}) | **{{httpMethod}}** {{path}} | {{summary}} {{/operation}}{{/operations}} {{#operations}} @@ -14,11 +14,11 @@ Method | HTTP request | Description ## {{{operationId}}} -> {{#returnType}}{{{returnType}}} {{/returnType}}{{{operationId}}}(ctx, {{#allParams}}{{#required}}{{paramName}}{{^-last}}, {{/-last}}{{/required}}{{/allParams}}{{#hasOptionalParams}}optional{{/hasOptionalParams}}) +> {{#returnType}}{{{.}}} {{/returnType}}{{{operationId}}}(ctx, {{#allParams}}{{#required}}{{paramName}}{{^-last}}, {{/-last}}{{/required}}{{/allParams}}{{#hasOptionalParams}}optional{{/hasOptionalParams}}) {{{summary}}}{{#notes}} -{{{notes}}}{{/notes}} +{{{.}}}{{/notes}} ### Required Parameters @@ -26,7 +26,7 @@ Method | HTTP request | Description 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}} +**{{paramName}}** | {{#isFile}}**{{dataType}}**{{/isFile}}{{#isPrimitiveType}}**{{dataType}}**{{/isPrimitiveType}}{{^isPrimitiveType}}{{^isFile}}[**{{dataType}}**]({{baseType}}.md){{/isFile}}{{/isPrimitiveType}}| {{description}} | {{#defaultValue}}[default to {{.}}]{{/defaultValue}}{{/required}}{{/allParams}}{{#hasOptionalParams}} **optional** | ***{{{nickname}}}Opts** | optional parameters | nil if no parameters ### Optional Parameters @@ -36,7 +36,7 @@ Optional parameters are passed through a pointer to a {{{nickname}}}Opts struct Name | Type | Description | Notes ------------- | ------------- | ------------- | -------------{{/-last}}{{/allParams}}{{#allParams}} -{{^required}} **{{paramName}}** | {{#isFile}}**optional.Interface of {{dataType}}**{{/isFile}}{{#isPrimitiveType}}**optional.{{vendorExtensions.x-optional-data-type}}**{{/isPrimitiveType}}{{^isPrimitiveType}}{{^isFile}}[**optional.Interface of {{dataType}}**]({{baseType}}.md){{/isFile}}{{/isPrimitiveType}}| {{description}} | {{#defaultValue}}[default to {{defaultValue}}]{{/defaultValue}}{{/required}}{{/allParams}}{{/hasOptionalParams}} +{{^required}} **{{paramName}}** | {{#isFile}}**optional.Interface of {{dataType}}**{{/isFile}}{{#isPrimitiveType}}**optional.{{vendorExtensions.x-optional-data-type}}**{{/isPrimitiveType}}{{^isPrimitiveType}}{{^isFile}}[**optional.Interface of {{dataType}}**]({{baseType}}.md){{/isFile}}{{/isPrimitiveType}}| {{description}} | {{#defaultValue}}[default to {{.}}]{{/defaultValue}}{{/required}}{{/allParams}}{{/hasOptionalParams}} ### Return type diff --git a/modules/openapi-generator/src/main/resources/go-deprecated/configuration.mustache b/modules/openapi-generator/src/main/resources/go-deprecated/configuration.mustache index b21d2a13a230c69019c439c112dbee03480871bd..46322cf507aec506d994131f753f6d74992f173a 100644 --- a/modules/openapi-generator/src/main/resources/go-deprecated/configuration.mustache +++ b/modules/openapi-generator/src/main/resources/go-deprecated/configuration.mustache @@ -88,7 +88,7 @@ func NewConfiguration() *Configuration { cfg := &Configuration{ BasePath: "{{{basePath}}}", DefaultHeader: make(map[string]string), - UserAgent: "{{#httpUserAgent}}{{{.}}}{{/httpUserAgent}}{{^httpUserAgent}}OpenAPI-Generator/{{{packageVersion}}}/go{{/httpUserAgent}}", + UserAgent: "{{{httpUserAgent}}}{{^httpUserAgent}}OpenAPI-Generator/{{{packageVersion}}}/go{{/httpUserAgent}}", Debug: false, {{#servers}} {{#-first}} diff --git a/modules/openapi-generator/src/main/resources/go-deprecated/git_push.sh.mustache b/modules/openapi-generator/src/main/resources/go-deprecated/git_push.sh.mustache index 8b3f689c9121a65080ad038d37a2036b01e559a1..f0bed5bd84155f05bc3cdc67af008f524efb38a6 100755 --- a/modules/openapi-generator/src/main/resources/go-deprecated/git_push.sh.mustache +++ b/modules/openapi-generator/src/main/resources/go-deprecated/git_push.sh.mustache @@ -55,4 +55,3 @@ 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/go-deprecated/model.mustache b/modules/openapi-generator/src/main/resources/go-deprecated/model.mustache index f30047a9e216d42ce5d6ee3668af0f9d6929198c..cf2d15413d6c75f1db7dc0a76bcf839e052ba324 100644 --- a/modules/openapi-generator/src/main/resources/go-deprecated/model.mustache +++ b/modules/openapi-generator/src/main/resources/go-deprecated/model.mustache @@ -12,8 +12,8 @@ import ( {{/imports}} {{#model}} {{#isEnum}} -// {{{classname}}} {{#description}}{{{.}}}{{/description}}{{^description}}the model '{{{classname}}}'{{/description}} -type {{{classname}}} {{^format}}{{dataType}}{{/format}}{{#format}}{{{format}}}{{/format}} +// {{{classname}}} {{{description}}}{{^description}}the model '{{{classname}}}'{{/description}} +type {{{classname}}} {{^format}}{{dataType}}{{/format}}{{{format}}} // List of {{{name}}} const ( @@ -27,13 +27,13 @@ const ( ) {{/isEnum}} {{^isEnum}} -// {{classname}}{{#description}} {{{description}}}{{/description}}{{^description}} struct for {{{classname}}}{{/description}} +// {{classname}}{{#description}} {{{.}}}{{/description}}{{^description}} struct for {{{classname}}}{{/description}} type {{classname}} struct { {{#allVars}} {{^-first}} {{/-first}} {{#description}} - // {{{description}}} + // {{{.}}} {{/description}} {{name}} {{#isNullable}}*{{/isNullable}}{{{dataType}}} `json:"{{baseName}}{{^required}},omitempty{{/required}}"{{#withXml}} xml:"{{baseName}}{{#isXmlAttribute}},attr{{/isXmlAttribute}}"{{/withXml}}{{#vendorExtensions.x-go-custom-tag}} {{{.}}}{{/vendorExtensions.x-go-custom-tag}}` {{/allVars}} diff --git a/modules/openapi-generator/src/main/resources/go-deprecated/partial_header.mustache b/modules/openapi-generator/src/main/resources/go-deprecated/partial_header.mustache index e23b21520a9f2d16ef92f15a8bbff9a989397928..f0a0906d6d2336dd9e0df2109431251bff3aeb75 100644 --- a/modules/openapi-generator/src/main/resources/go-deprecated/partial_header.mustache +++ b/modules/openapi-generator/src/main/resources/go-deprecated/partial_header.mustache @@ -1,17 +1,17 @@ /* {{#appName}} - * {{{appName}}} + * {{{.}}} * {{/appName}} {{#appDescription}} - * {{{appDescription}}} + * {{{.}}} * {{/appDescription}} {{#version}} - * API version: {{{version}}} + * API version: {{{.}}} {{/version}} {{#infoEmail}} - * Contact: {{{infoEmail}}} + * Contact: {{{.}}} {{/infoEmail}} {{^withGoCodegenComment}} * Generated by: OpenAPI Generator (https://openapi-generator.tech) diff --git a/modules/openapi-generator/src/main/resources/go-echo-server/README.mustache b/modules/openapi-generator/src/main/resources/go-echo-server/README.mustache index 9ff2b9aeb19f6bb549d91e45f3b29fa28a0f32a3..f45fd404673add575bf143f1f2ddc9df1577a44a 100644 --- a/modules/openapi-generator/src/main/resources/go-echo-server/README.mustache +++ b/modules/openapi-generator/src/main/resources/go-echo-server/README.mustache @@ -1,13 +1,13 @@ # Go Echo API Server for {{packageName}} {{#appDescriptionWithNewLines}} -{{{appDescriptionWithNewLines}}} +{{{.}}} {{/appDescriptionWithNewLines}} ## 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. +By using the [OpenAPI-Spec](https://github.com/OAI/OpenAPI-Specification) from a remote server, you can easily generate a server stub. - To see how to make this your own, look here: @@ -36,7 +36,7 @@ docker build --network=host -t {{{packageName}}} . Once the image is built, just run ``` -docker run --rm -it {{{packageName}}} +docker run --rm -it {{{packageName}}} ``` ### Known Issue diff --git a/modules/openapi-generator/src/main/resources/go-echo-server/main.mustache b/modules/openapi-generator/src/main/resources/go-echo-server/main.mustache index e8654aaa3f272f3702bb606e69ff12fa8b6d3054..97736d7f083e03f2c7874012d5c51c57a40d8447 100644 --- a/modules/openapi-generator/src/main/resources/go-echo-server/main.mustache +++ b/modules/openapi-generator/src/main/resources/go-echo-server/main.mustache @@ -15,7 +15,7 @@ func main() { // Middleware e.Use(middleware.Logger()) e.Use(middleware.Recover()) - + {{#apiInfo}}{{#apis}}{{#operations}}{{#operation}} // {{nickname}} - {{{summary}}}{{#isDeprecated}} (deprecated){{/isDeprecated}} e.{{httpMethod.toUpperCase}}("{{{basePathWithoutHost}}}{{{path}}}", c.{{operationId}}) diff --git a/modules/openapi-generator/src/main/resources/go-echo-server/model.mustache b/modules/openapi-generator/src/main/resources/go-echo-server/model.mustache index 433d848254b2dfb680c5d403fb898519a92590b6..ec58995c7836250397f95148966535b47823d4cf 100644 --- a/modules/openapi-generator/src/main/resources/go-echo-server/model.mustache +++ b/modules/openapi-generator/src/main/resources/go-echo-server/model.mustache @@ -4,7 +4,7 @@ package models {{/-first}} "{{import}}"{{#-last}} ) {{/-last}}{{/imports}}{{#model}}{{#isEnum}}{{#description}}// {{{classname}}} : {{{description}}}{{/description}} -type {{{classname}}} {{^format}}{{dataType}}{{/format}}{{#format}}{{{format}}}{{/format}} +type {{{classname}}} {{^format}}{{dataType}}{{/format}}{{{format}}} // List of {{{classname}}} const ( @@ -17,7 +17,7 @@ const ( // {{classname}} - {{{description}}}{{/description}} type {{classname}} struct { {{#vars}}{{#description}} - // {{{description}}}{{/description}} + // {{{.}}}{{/description}} {{#deprecated}} // Deprecated {{/deprecated}} diff --git a/modules/openapi-generator/src/main/resources/go-gin-server/README.mustache b/modules/openapi-generator/src/main/resources/go-gin-server/README.mustache index 3ad44c6fa7a78de527dfa6281b9d2c008914fbf0..972ecfa6f09a07a737e8e559b42b99e762731f8b 100644 --- a/modules/openapi-generator/src/main/resources/go-gin-server/README.mustache +++ b/modules/openapi-generator/src/main/resources/go-gin-server/README.mustache @@ -1,13 +1,13 @@ # Go API Server for {{packageName}} {{#appDescriptionWithNewLines}} -{{{appDescriptionWithNewLines}}} +{{{.}}} {{/appDescriptionWithNewLines}} ## 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. +By using the [OpenAPI-Spec](https://github.com/OAI/OpenAPI-Specification) from a remote server, you can easily generate a server stub. - To see how to make this your own, look here: @@ -35,7 +35,7 @@ docker build --network=host -t {{{packageName}}} . Once the image is built, just run ``` -docker run --rm -it {{{packageName}}} +docker run --rm -it {{{packageName}}} ``` ### Known Issue @@ -43,4 +43,3 @@ docker run --rm -it {{{packageName}}} Endpoints sharing a common path may result in issues. For example, `/v2/pet/findByTags` and `/v2/pet/:petId` will result in an issue with the Gin framework. For more information about this known limitation, please refer to [gin-gonic/gin#388](https://github.com/gin-gonic/gin/issues/388) for more information. A workaround is to manually update the path and handler. Please refer to [gin-gonic/gin/issues/205#issuecomment-296155497](https://github.com/gin-gonic/gin/issues/205#issuecomment-296155497) for more information. - diff --git a/modules/openapi-generator/src/main/resources/go-gin-server/model.mustache b/modules/openapi-generator/src/main/resources/go-gin-server/model.mustache index 14993caf01a14b289c1ab64fcc1116f14034eb55..2ffa77c2c9e676c0d5c169b4655cae5e5a00e297 100644 --- a/modules/openapi-generator/src/main/resources/go-gin-server/model.mustache +++ b/modules/openapi-generator/src/main/resources/go-gin-server/model.mustache @@ -5,7 +5,7 @@ package {{packageName}} {{/-first}} "{{import}}"{{#-last}} ) {{/-last}}{{/imports}}{{#model}}{{#isEnum}}{{#description}}// {{{classname}}} : {{{description}}}{{/description}} -type {{{classname}}} {{^format}}{{dataType}}{{/format}}{{#format}}{{{format}}}{{/format}} +type {{{classname}}} {{^format}}{{dataType}}{{/format}}{{{format}}} // List of {{{classname}}} const ( @@ -18,7 +18,7 @@ const ( // {{classname}} - {{{description}}}{{/description}} type {{classname}} struct { {{#vars}}{{#description}} - // {{{description}}}{{/description}} + // {{{.}}}{{/description}} {{#deprecated}} // Deprecated {{/deprecated}} diff --git a/modules/openapi-generator/src/main/resources/go-gin-server/partial_header.mustache b/modules/openapi-generator/src/main/resources/go-gin-server/partial_header.mustache index 23edcdfb69159db17b2b4966f06bfd06c93453fa..07920e304137b2a8eaa02094839532b5af8a6829 100644 --- a/modules/openapi-generator/src/main/resources/go-gin-server/partial_header.mustache +++ b/modules/openapi-generator/src/main/resources/go-gin-server/partial_header.mustache @@ -1,17 +1,17 @@ /* {{#appName}} - * {{{appName}}} + * {{{.}}} * {{/appName}} {{#appDescription}} - * {{{appDescription}}} + * {{{.}}} * {{/appDescription}} {{#version}} - * API version: {{{version}}} + * API version: {{{.}}} {{/version}} {{#infoEmail}} - * Contact: {{{infoEmail}}} + * Contact: {{{.}}} {{/infoEmail}} * Generated by: OpenAPI Generator (https://openapi-generator.tech) */ diff --git a/modules/openapi-generator/src/main/resources/go-server/README.mustache b/modules/openapi-generator/src/main/resources/go-server/README.mustache index 5a59be673826651eb91c6c1a654f85b6a567f93b..cdf8713c2e6e376e8194e324173a650982a61130 100644 --- a/modules/openapi-generator/src/main/resources/go-server/README.mustache +++ b/modules/openapi-generator/src/main/resources/go-server/README.mustache @@ -1,13 +1,13 @@ # Go API Server for {{packageName}} {{#appDescriptionWithNewLines}} -{{{appDescriptionWithNewLines}}} +{{{.}}} {{/appDescriptionWithNewLines}} ## 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. +By using the [OpenAPI-Spec](https://github.com/OAI/OpenAPI-Specification) from a remote server, you can easily generate a server stub. - To see how to make this your own, look here: @@ -35,7 +35,5 @@ docker build --network=host -t {{{packageName}}} . Once image is built use ``` -docker run --rm -it {{{packageName}}} +docker run --rm -it {{{packageName}}} ``` - - diff --git a/modules/openapi-generator/src/main/resources/go-server/api.mustache b/modules/openapi-generator/src/main/resources/go-server/api.mustache index f08e1b270386039fc9d287e8b9f0baa497f3f6b0..b0ae118950dcf659ee31d3603486f5993d5d8c01 100644 --- a/modules/openapi-generator/src/main/resources/go-server/api.mustache +++ b/modules/openapi-generator/src/main/resources/go-server/api.mustache @@ -10,7 +10,7 @@ import ( {{#apiInfo}}{{#apis}} // {{classname}}Router defines the required methods for binding the api requests to a responses for the {{classname}} -// The {{classname}}Router implementation should parse necessary information from the http request, +// The {{classname}}Router implementation should parse necessary information from the http request, // pass the data to a {{classname}}Servicer to perform the required actions, then write the service results to the http response. type {{classname}}Router interface { {{#operations}}{{#operation}} {{#isDeprecated}} @@ -21,8 +21,8 @@ type {{classname}}Router interface { {{#operations}}{{#operation}} // {{classname}}Servicer defines the api actions for the {{classname}} service -// This interface intended to stay up to date with the openapi yaml used to generate it, -// while the service implementation can ignored with the .openapi-generator-ignore file +// This interface intended to stay up to date with the openapi yaml used to generate it, +// while the service implementation can ignored with the .openapi-generator-ignore file // and updated with the logic required for the API. type {{classname}}Servicer interface { {{#operations}}{{#operation}} {{#isDeprecated}} diff --git a/modules/openapi-generator/src/main/resources/go-server/model.mustache b/modules/openapi-generator/src/main/resources/go-server/model.mustache index c13d81795add59795ce65855e22e7025c4f6d317..8a4dd7a97904f0a7eb1dc70441e67a96e8ee78d6 100644 --- a/modules/openapi-generator/src/main/resources/go-server/model.mustache +++ b/modules/openapi-generator/src/main/resources/go-server/model.mustache @@ -5,7 +5,7 @@ package {{packageName}} {{/-first}} "{{import}}"{{#-last}} ) {{/-last}}{{/imports}}{{#model}}{{#isEnum}}{{#description}}// {{{classname}}} : {{{description}}}{{/description}} -type {{{classname}}} {{^format}}{{dataType}}{{/format}}{{#format}}{{{format}}}{{/format}} +type {{{classname}}} {{^format}}{{dataType}}{{/format}}{{{format}}} // List of {{{classname}}} const ( @@ -28,7 +28,7 @@ type {{classname}} struct { {{/isArray}} {{/parent}} {{#vars}}{{#description}} - // {{{description}}}{{/description}} + // {{{.}}}{{/description}} {{#deprecated}} // Deprecated {{/deprecated}} diff --git a/modules/openapi-generator/src/main/resources/go-server/partial_header.mustache b/modules/openapi-generator/src/main/resources/go-server/partial_header.mustache index 23edcdfb69159db17b2b4966f06bfd06c93453fa..07920e304137b2a8eaa02094839532b5af8a6829 100644 --- a/modules/openapi-generator/src/main/resources/go-server/partial_header.mustache +++ b/modules/openapi-generator/src/main/resources/go-server/partial_header.mustache @@ -1,17 +1,17 @@ /* {{#appName}} - * {{{appName}}} + * {{{.}}} * {{/appName}} {{#appDescription}} - * {{{appDescription}}} + * {{{.}}} * {{/appDescription}} {{#version}} - * API version: {{{version}}} + * API version: {{{.}}} {{/version}} {{#infoEmail}} - * Contact: {{{infoEmail}}} + * Contact: {{{.}}} {{/infoEmail}} * Generated by: OpenAPI Generator (https://openapi-generator.tech) */ diff --git a/modules/openapi-generator/src/main/resources/go-server/service.mustache b/modules/openapi-generator/src/main/resources/go-server/service.mustache index 2df7298b17bafbf1f47e51669c4bef2c81e9d9e0..6339027c099e0bf1a19b1bc664e98c8b50c6a2ac 100644 --- a/modules/openapi-generator/src/main/resources/go-server/service.mustache +++ b/modules/openapi-generator/src/main/resources/go-server/service.mustache @@ -9,7 +9,7 @@ import ( ) // {{classname}}Service is a service that implents the logic for the {{classname}}Servicer -// This service should implement the business logic for every endpoint for the {{classname}} API. +// This service should implement the business logic for every endpoint for the {{classname}} API. // Include any external packages or services that will be required by this service. type {{classname}}Service struct { } @@ -41,4 +41,3 @@ func (s *{{classname}}Service) {{nickname}}(ctx context.Context{{#allParams}}, { {{/responses}} return Response(http.StatusNotImplemented, nil), errors.New("{{nickname}} method not implemented") }{{/operation}}{{/operations}} - diff --git a/modules/openapi-generator/src/main/resources/go/README.mustache b/modules/openapi-generator/src/main/resources/go/README.mustache index de164be1cf81905454c71dd860ade2cd8686129e..3eb9c387eb7382c2b8de32f71ac490bec618f2f0 100644 --- a/modules/openapi-generator/src/main/resources/go/README.mustache +++ b/modules/openapi-generator/src/main/resources/go/README.mustache @@ -1,7 +1,7 @@ # Go API client for {{packageName}} {{#appDescriptionWithNewLines}} -{{{appDescriptionWithNewLines}}} +{{{.}}} {{/appDescriptionWithNewLines}} ## Overview diff --git a/modules/openapi-generator/src/main/resources/go/client.mustache b/modules/openapi-generator/src/main/resources/go/client.mustache index 8cc5dfd6009d7259ea11e3779c0d4e2dd12afd3c..06a0ab7b9dc00b51b06e5b16e84ce5c7d2589966 100644 --- a/modules/openapi-generator/src/main/resources/go/client.mustache +++ b/modules/openapi-generator/src/main/resources/go/client.mustache @@ -363,7 +363,7 @@ func (c *APIClient) prepareRequest( reader = strings.NewReader(body.String()) } - // Define default values for region and service to maintain backward compatibility + // Define default values for region and service to maintain backward compatibility region := auth.Region if region == "" { region = "eu-west-2" diff --git a/modules/openapi-generator/src/main/resources/go/git_push.sh.mustache b/modules/openapi-generator/src/main/resources/go/git_push.sh.mustache index 8b3f689c9121a65080ad038d37a2036b01e559a1..f0bed5bd84155f05bc3cdc67af008f524efb38a6 100755 --- a/modules/openapi-generator/src/main/resources/go/git_push.sh.mustache +++ b/modules/openapi-generator/src/main/resources/go/git_push.sh.mustache @@ -55,4 +55,3 @@ 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/go/model_simple.mustache b/modules/openapi-generator/src/main/resources/go/model_simple.mustache index a2e30fc4b8fcfa08c40e2510d25329ebaaa3e73f..bda8563ed17c19d0a37d7847bed932c08e3a5ffc 100644 --- a/modules/openapi-generator/src/main/resources/go/model_simple.mustache +++ b/modules/openapi-generator/src/main/resources/go/model_simple.mustache @@ -14,7 +14,7 @@ type {{classname}} struct { {{^-first}} {{/-first}} {{#description}} - // {{{description}}} + // {{{.}}} {{/description}} {{#deprecated}} // Deprecated @@ -305,7 +305,7 @@ func (o *{{{classname}}}) UnmarshalJSON(bytes []byte) (err error) { {{^-first}} {{/-first}} {{#description}} - // {{{description}}} + // {{{.}}} {{/description}} {{#deprecated}} // Deprecated diff --git a/modules/openapi-generator/src/main/resources/graphql-nodejs-express-server/README.mustache b/modules/openapi-generator/src/main/resources/graphql-nodejs-express-server/README.mustache index 2e556cc0666a8ec053ba603f4290ceb4831a3246..522ed33b27972e26e519558b6dc00919081df61c 100644 --- a/modules/openapi-generator/src/main/resources/graphql-nodejs-express-server/README.mustache +++ b/modules/openapi-generator/src/main/resources/graphql-nodejs-express-server/README.mustache @@ -1,7 +1,7 @@ # GraphQL express API server {{#appDescriptionWithNewLines}} -{{{appDescriptionWithNewLines}}} +{{{.}}} {{/appDescriptionWithNewLines}} ## Requirements diff --git a/modules/openapi-generator/src/main/resources/graphql-nodejs-express-server/api.mustache b/modules/openapi-generator/src/main/resources/graphql-nodejs-express-server/api.mustache index 9d59eab63ae590b40e0410f7fc3f3c06752c594a..736f40e11a1083a290ee61d7c14f4887be8322e0 100644 --- a/modules/openapi-generator/src/main/resources/graphql-nodejs-express-server/api.mustache +++ b/modules/openapi-generator/src/main/resources/graphql-nodejs-express-server/api.mustache @@ -9,7 +9,7 @@ input {{operationId}}Input { {{#allParams}} - {{#description}}# {{description}}{{/description}} + {{#description}}# {{.}}{{/description}} {{paramName}}: {{#isContainer}}[{{/isContainer}}{{dataType}}{{#isArray}}Input{{/isArray}}{{#isModel}}Input{{/isModel}}{{#isContainer}}]{{/isContainer}}{{^-last}}, {{/-last}} {{/allParams}} }{{/hasParams}}{{/vendorExtensions.x-is-mutation}}{{/operation}} @@ -18,16 +18,16 @@ type Mutation { {{#operation}} {{#vendorExtensions.x-is-mutation}} {{#summary}} - # {{summary}} + # {{.}} {{/summary}} {{#notes}} - # {{notes}} + # {{.}} {{/notes}} {{#allParams}} # @param {{dataType}} {{paramName}} {{description}} {{/allParams}} - # @return [{{#returnType}}{{returnType}}{{/returnType}}{{^returnType}}Boolean{{/returnType}}] - {{operationId}}{{#hasParams}}(input: {{operationId}}Input!){{/hasParams}}: {{#returnType}}{{.}}{{/returnType}}{{^returnType}}Boolean{{/returnType}} + # @return [{{returnType}}{{^returnType}}Boolean{{/returnType}}] + {{operationId}}{{#hasParams}}(input: {{operationId}}Input!){{/hasParams}}: {{returnType}}{{^returnType}}Boolean{{/returnType}} {{/vendorExtensions.x-is-mutation}} {{/operation}} } @@ -38,16 +38,16 @@ type Query { {{#operation}} {{^vendorExtensions.x-is-mutation}} {{#summary}} - # {{summary}} + # {{.}} {{/summary}} {{#notes}} - # {{notes}} + # {{.}} {{/notes}} {{#allParams}} # @param {{dataType}} {{paramName}} {{description}} {{/allParams}} - # @return [{{#returnType}}{{returnType}}{{/returnType}}{{^returnType}}Boolean{{/returnType}}] - {{operationId}}{{#hasParams}}({{#allParams}}{{paramName}}: {{dataType}}{{^-last}}, {{/-last}}{{/allParams}}){{/hasParams}}: {{#returnType}}{{.}}{{/returnType}}{{^returnType}}Boolean{{/returnType}} + # @return [{{returnType}}{{^returnType}}Boolean{{/returnType}}] + {{operationId}}{{#hasParams}}({{#allParams}}{{paramName}}: {{dataType}}{{^-last}}, {{/-last}}{{/allParams}}){{/hasParams}}: {{returnType}}{{^returnType}}Boolean{{/returnType}} {{/vendorExtensions.x-is-mutation}} {{/operation}} } diff --git a/modules/openapi-generator/src/main/resources/graphql-nodejs-express-server/api_doc.mustache b/modules/openapi-generator/src/main/resources/graphql-nodejs-express-server/api_doc.mustache index c41fd6e4f3745d1d43b35336b3f49bc56aba7171..28aa346a94f693640ff817d32e4674b392a884f6 100644 --- a/modules/openapi-generator/src/main/resources/graphql-nodejs-express-server/api_doc.mustache +++ b/modules/openapi-generator/src/main/resources/graphql-nodejs-express-server/api_doc.mustache @@ -1,21 +1,21 @@ # {{classname}}{{#description}} - {{description}}{{/description}} + {{.}}{{/description}} All URIs are relative to *{{basePath}}* Method | HTTP request | Description ------------- | ------------- | ------------- -{{#operations}}{{#operation}}[**{{operationId}}**]({{classname}}.md#{{operationId}}) | **{{httpMethod}}** {{path}} | {{#summary}}{{summary}}{{/summary}} +{{#operations}}{{#operation}}[**{{operationId}}**]({{classname}}.md#{{operationId}}) | **{{httpMethod}}** {{path}} | {{summary}} {{/operation}}{{/operations}} {{#operations}} {{#operation}} <a name="{{operationId}}"></a> # **{{operationId}}** -> {{#returnType}}{{returnType}} {{/returnType}}{{operationId}}({{#allParams}}{{{paramName}}}{{^-last}}, {{/-last}}{{/allParams}}) +> {{#returnType}}{{.}} {{/returnType}}{{operationId}}({{#allParams}}{{{paramName}}}{{^-last}}, {{/-last}}{{/allParams}}) {{summary}}{{#notes}} -{{notes}}{{/notes}} +{{.}}{{/notes}} {{/operation}} {{/operations}} \ No newline at end of file diff --git a/modules/openapi-generator/src/main/resources/graphql-nodejs-express-server/model.mustache b/modules/openapi-generator/src/main/resources/graphql-nodejs-express-server/model.mustache index 3bbbb5199df5f6ee66a9db485d2d52f8e38a5e3b..25a62c0302fc72e7f9e30be413c05d8d90613956 100644 --- a/modules/openapi-generator/src/main/resources/graphql-nodejs-express-server/model.mustache +++ b/modules/openapi-generator/src/main/resources/graphql-nodejs-express-server/model.mustache @@ -2,12 +2,12 @@ {{#model}} {{>partial_header_graphql}} {{#description}} -# {{{description}}} +# {{{.}}} {{/description}} type {{classname}} { {{#vars}} {{#description}} - # {{{description}}} + # {{{.}}} {{/description}} {{baseName}}: {{#isEnum}}{{classname}}{{datatypeWithEnum}}{{/isEnum}}{{^isEnum}}{{datatypeWithEnum}}{{/isEnum}} {{/vars}} @@ -16,7 +16,7 @@ type {{classname}} { input {{classname}}Input { {{#vars}} {{#description}} - # {{{description}}} + # {{{.}}} {{/description}} {{baseName}}: {{#isEnum}}{{classname}}{{datatypeWithEnum}}{{/isEnum}}{{^isEnum}}{{#isContainer}}[{{datatypeWithEnum}}{{#complexType}}Input{{/complexType}}]{{/isContainer}}{{^isContainer}}{{datatypeWithEnum}}{{#isModel}}Input{{/isModel}}{{/isContainer}}{{/isEnum}} {{/vars}} @@ -25,7 +25,7 @@ input {{classname}}Input { {{#isEnum}} {{#description}} -# {{{description}}} +# {{{.}}} {{/description}} enum {{classname}}{{enumName}} { {{#allowableValues}} diff --git a/modules/openapi-generator/src/main/resources/graphql-nodejs-express-server/package.json.mustache b/modules/openapi-generator/src/main/resources/graphql-nodejs-express-server/package.json.mustache index 71324a2093b677dd932f59fb1d08372f4a5b38e5..871be2f6ee3f5ff2b7b82fcde13bf8ff823cb4b3 100644 --- a/modules/openapi-generator/src/main/resources/graphql-nodejs-express-server/package.json.mustache +++ b/modules/openapi-generator/src/main/resources/graphql-nodejs-express-server/package.json.mustache @@ -1,7 +1,7 @@ { "name": "graphql-server", "version": "1.0.0", - "description": "{{#appDescription}} {{{appDescription}}} {{/appDescription}}", + "description": "{{#appDescription}} {{{.}}} {{/appDescription}}", "main": "index.js", "scripts": { "start": "node start.js", diff --git a/modules/openapi-generator/src/main/resources/graphql-nodejs-express-server/partial_header.mustache b/modules/openapi-generator/src/main/resources/graphql-nodejs-express-server/partial_header.mustache index 1e1214c8a693a79485863a45a5d07e20a60b979e..66e3e0011d362f5c75735f8b29c30dc1d3ce5f59 100644 --- a/modules/openapi-generator/src/main/resources/graphql-nodejs-express-server/partial_header.mustache +++ b/modules/openapi-generator/src/main/resources/graphql-nodejs-express-server/partial_header.mustache @@ -1,11 +1,11 @@ /** * {{#appName}} - * {{{appName}}} + * {{{.}}} * {{/appName}} * {{#appDescription}} - * {{{appDescription}}} + * {{{.}}} * {{/appDescription}} - * {{#version}}Version: {{{version}}}{{/version}} - * {{#infoEmail}}Contact: {{{infoEmail}}}{{/infoEmail}} + * {{#version}}Version: {{{.}}}{{/version}} + * {{#infoEmail}}Contact: {{{.}}}{{/infoEmail}} * Generated by OpenAPI Generator: https://openapi-generator.tech */ diff --git a/modules/openapi-generator/src/main/resources/graphql-nodejs-express-server/partial_header_graphql.mustache b/modules/openapi-generator/src/main/resources/graphql-nodejs-express-server/partial_header_graphql.mustache index 8e97c5d4f0be66437e2fbd5466e7ec2fba0281e4..c647d74ab5c2d1c46e0e61e9bce495e7c92da3f4 100644 --- a/modules/openapi-generator/src/main/resources/graphql-nodejs-express-server/partial_header_graphql.mustache +++ b/modules/openapi-generator/src/main/resources/graphql-nodejs-express-server/partial_header_graphql.mustache @@ -1,9 +1,9 @@ # {{#appName}} -# {{{appName}}} +# {{{.}}} # {{/appName}} # {{#appDescription}} -# {{{appDescription}}} +# {{{.}}} # {{/appDescription}} -# {{#version}}Version: {{{version}}}{{/version}} -# {{#infoEmail}}Contact: {{{infoEmail}}}{{/infoEmail}} +# {{#version}}Version: {{{.}}}{{/version}} +# {{#infoEmail}}Contact: {{{.}}}{{/infoEmail}} # Generated by OpenAPI Generator: https://openapi-generator.tech diff --git a/modules/openapi-generator/src/main/resources/graphql-schema/README.mustache b/modules/openapi-generator/src/main/resources/graphql-schema/README.mustache index 75f88357c43d5690d49d44aab77e9ce39fc37151..bca3b8ce1ffd96d43a7f16cbdd60af8f7c39dd37 100644 --- a/modules/openapi-generator/src/main/resources/graphql-schema/README.mustache +++ b/modules/openapi-generator/src/main/resources/graphql-schema/README.mustache @@ -1,7 +1,7 @@ # Lua API client for {{packageName}} {{#appDescriptionWithNewLines}} -{{{appDescriptionWithNewLines}}} +{{{.}}} {{/appDescriptionWithNewLines}} ## Overview @@ -29,7 +29,7 @@ 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}} +{{#apiInfo}}{{#apis}}{{#operations}}{{#operation}}*{{classname}}* | [**{{operationId}}**]({{apiDocPath}}{{classname}}.md#{{operationIdLowerCase}}) | **{{httpMethod}}** {{path}} | {{summary}} {{/operation}}{{/operations}}{{/apis}}{{/apiInfo}} ## Documentation For Models diff --git a/modules/openapi-generator/src/main/resources/graphql-schema/api.mustache b/modules/openapi-generator/src/main/resources/graphql-schema/api.mustache index 6f9532b82e8f6606db3adf0d4a9fde7de615eb09..2b8543f655d7e3099855bb2232e35a4b719fb27c 100644 --- a/modules/openapi-generator/src/main/resources/graphql-schema/api.mustache +++ b/modules/openapi-generator/src/main/resources/graphql-schema/api.mustache @@ -8,16 +8,16 @@ type mutation { {{#operation}} {{#vendorExtensions.x-is-mutation}} {{#summary}} - # {{summary}} + # {{.}} {{/summary}} {{#notes}} - # {{notes}} + # {{.}} {{/notes}} {{#allParams}} # @param {{dataType}} {{paramName}} {{description}} {{/allParams}} - # @return [{{#returnType}}{{returnType}}{{/returnType}}{{^returnType}}null{{/returnType}}] - {{operationId}}({{#allParams}}{{paramName}}: {{dataType}}{{^-last}}, {{/-last}}{{/allParams}}): {{#returnType}}{{.}}{{/returnType}}{{^returnType}}null{{/returnType}} + # @return [{{returnType}}{{^returnType}}null{{/returnType}}] + {{operationId}}({{#allParams}}{{paramName}}: {{dataType}}{{^-last}}, {{/-last}}{{/allParams}}): {{returnType}}{{^returnType}}null{{/returnType}} {{/vendorExtensions.x-is-mutation}} {{/operation}} @@ -29,16 +29,16 @@ type query { {{#operation}} {{^vendorExtensions.x-is-mutation}} {{#summary}} - # {{summary}} + # {{.}} {{/summary}} {{#notes}} - # {{notes}} + # {{.}} {{/notes}} {{#allParams}} # @param {{dataType}} {{paramName}} {{description}} {{/allParams}} - # @return [{{#returnType}}{{returnType}}{{/returnType}}{{^returnType}}null{{/returnType}}] - {{operationId}}({{#allParams}}{{paramName}}: {{dataType}}{{^-last}}, {{/-last}}{{/allParams}}): {{#returnType}}{{.}}{{/returnType}}{{^returnType}}null{{/returnType}} + # @return [{{returnType}}{{^returnType}}null{{/returnType}}] + {{operationId}}({{#allParams}}{{paramName}}: {{dataType}}{{^-last}}, {{/-last}}{{/allParams}}): {{returnType}}{{^returnType}}null{{/returnType}} {{/vendorExtensions.x-is-mutation}} {{/operation}} diff --git a/modules/openapi-generator/src/main/resources/graphql-schema/git_push.sh.mustache b/modules/openapi-generator/src/main/resources/graphql-schema/git_push.sh.mustache index 8b3f689c9121a65080ad038d37a2036b01e559a1..f0bed5bd84155f05bc3cdc67af008f524efb38a6 100755 --- a/modules/openapi-generator/src/main/resources/graphql-schema/git_push.sh.mustache +++ b/modules/openapi-generator/src/main/resources/graphql-schema/git_push.sh.mustache @@ -55,4 +55,3 @@ 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/graphql-schema/model.mustache b/modules/openapi-generator/src/main/resources/graphql-schema/model.mustache index 9c06501f4325620c6d7fbdb55f846f8eb98d8d90..bc2f808d8fcd8f241e20a79f8c57cc4e82a6c7ff 100644 --- a/modules/openapi-generator/src/main/resources/graphql-schema/model.mustache +++ b/modules/openapi-generator/src/main/resources/graphql-schema/model.mustache @@ -2,13 +2,13 @@ {{#model}} {{>partial_header}} {{#description}} -# {{description}} +# {{.}} {{/description}} type {{classname}} { {{#vars}} {{#description}} - # {{description}} + # {{.}} {{/description}} {{baseName}}: {{datatypeWithEnum}} @@ -18,7 +18,7 @@ type {{classname}} { {{#isEnum}} {{#description}} -# {{description}} +# {{.}} {{/description}} enum {{enumName}} { {{#allowableValues}} diff --git a/modules/openapi-generator/src/main/resources/graphql-schema/partial_header.mustache b/modules/openapi-generator/src/main/resources/graphql-schema/partial_header.mustache index 541eedc144423ca007e3b05420849db57729481e..0ea833544f1ca8372d59b24507032b228a027500 100644 --- a/modules/openapi-generator/src/main/resources/graphql-schema/partial_header.mustache +++ b/modules/openapi-generator/src/main/resources/graphql-schema/partial_header.mustache @@ -1,14 +1,14 @@ {{#appName}} -# {{{appName}}} +# {{{.}}} {{/appName}} {{#appDescription}} -# {{{appDescription}}} +# {{{.}}} {{/appDescription}} {{#version}} -# The version of the OpenAPI document: {{{version}}} +# The version of the OpenAPI document: {{{.}}} {{/version}} {{#infoEmail}} -# Contact: {{{infoEmail}}} +# Contact: {{{.}}} {{/infoEmail}} # Generated by OpenAPI Generator: https://openapi-generator.tech # diff --git a/modules/openapi-generator/src/main/resources/haskell-http-client/API.mustache b/modules/openapi-generator/src/main/resources/haskell-http-client/API.mustache index 38a7699b17b29fd2335e878c1f50530dd31dc16c..eaedbb92a4e88876d9694cfce1b5022ec94d0360 100644 --- a/modules/openapi-generator/src/main/resources/haskell-http-client/API.mustache +++ b/modules/openapi-generator/src/main/resources/haskell-http-client/API.mustache @@ -60,7 +60,7 @@ import qualified Prelude as P -- {{/hasAuthMethods}}{{#vendorExtensions.x-has-unknown-return}} -- Note: Has 'Produces' instances, but no response schema -- {{/vendorExtensions.x-has-unknown-return}} -{{operationId}} +{{operationId}} :: {{#vendorExtensions.x-has-body-or-form-param}}(Consumes {{{vendorExtensions.x-operation-type}}} {{>_contentType}}{{#allParams}}{{#isBodyParam}}{{#required}}, MimeRender {{>_contentType}} {{#vendorExtensions.x-param-name-type}}{{{.}}}{{/vendorExtensions.x-param-name-type}}{{^vendorExtensions.x-param-name-type}}{{{dataType}}}{{/vendorExtensions.x-param-name-type}}{{/required}}{{/isBodyParam}}{{/allParams}}) => {{^vendorExtensions.x-inline-content-type}}ContentType contentType -- ^ request content-type ('MimeType') -> {{/vendorExtensions.x-inline-content-type}}{{/vendorExtensions.x-has-body-or-form-param}}{{^vendorExtensions.x-inline-accept}}Accept accept -- ^ request accept ('MimeType') @@ -92,7 +92,7 @@ instance HasOptionalParam {{{vendorExtensions.x-operation-type}}} {{#vendorExten instance Consumes {{{vendorExtensions.x-operation-type}}} {{{x-mediaDataType}}}{{/x-mediaIsWildcard}}{{#x-mediaIsWildcard}} instance MimeType mtype => Consumes {{{vendorExtensions.x-operation-type}}} mtype{{/x-mediaIsWildcard}} {{/consumes}}{{/hasConsumes}}{{^hasConsumes}}{{#vendorExtensions.x-has-body-or-form-param}} - + -- | @*/*@ instance MimeType mtype => Consumes {{{vendorExtensions.x-operation-type}}} mtype {{/vendorExtensions.x-has-body-or-form-param}}{{/hasConsumes}}{{#hasProduces}} diff --git a/modules/openapi-generator/src/main/resources/haskell-http-client/Client.mustache b/modules/openapi-generator/src/main/resources/haskell-http-client/Client.mustache index cd2c451a3a77a50765c7dad1aacb1372cf2ea1eb..e3969468f17ba078c2e554d6a273cda3345cd382 100644 --- a/modules/openapi-generator/src/main/resources/haskell-http-client/Client.mustache +++ b/modules/openapi-generator/src/main/resources/haskell-http-client/Client.mustache @@ -60,7 +60,7 @@ dispatchLbs manager config request = do -- | pair of decoded http body and http response data MimeResult res = MimeResult { mimeResult :: Either MimeError res -- ^ decoded http body - , mimeResultResponse :: NH.Response BCL.ByteString -- ^ http response + , mimeResultResponse :: NH.Response BCL.ByteString -- ^ http response } deriving (Show, Functor, Foldable, Traversable) @@ -68,7 +68,7 @@ data MimeResult res = data MimeError = MimeError { mimeError :: String -- ^ unrender/parser error - , mimeErrorResponse :: NH.Response BCL.ByteString -- ^ http response + , mimeErrorResponse :: NH.Response BCL.ByteString -- ^ http response } deriving (Eq, Show) -- | send a request returning the 'MimeResult' @@ -162,7 +162,7 @@ _toInitRequest => {{configType}} -- ^ config -> {{requestType}} req contentType res accept -- ^ request -> IO (InitRequest req contentType res accept) -- ^ initialized request -_toInitRequest config req0 = +_toInitRequest config req0 = runConfigLogWithExceptions "Client" config $ do parsedReq <- P.liftIO $ NH.parseRequest $ BCL.unpack $ BCL.append (configHost config) (BCL.concat (rUrlPath req0)) req1 <- P.liftIO $ _applyAuthMethods req0 config @@ -193,7 +193,7 @@ modifyInitRequest (InitRequest req) f = InitRequest (f req) modifyInitRequestM :: Monad m => InitRequest req contentType res accept -> (NH.Request -> m NH.Request) -> m (InitRequest req contentType res accept) modifyInitRequestM (InitRequest req) f = fmap InitRequest (f req) --- ** Logging +-- ** Logging -- | Run a block using the configured logger instance runConfigLog diff --git a/modules/openapi-generator/src/main/resources/haskell-http-client/Core.mustache b/modules/openapi-generator/src/main/resources/haskell-http-client/Core.mustache index 2a20a43be0aca0b850418bd0be65537aeb9616b0..dfcf3ce6e222572dd78b2f2bb4e34614625936e3 100644 --- a/modules/openapi-generator/src/main/resources/haskell-http-client/Core.mustache +++ b/modules/openapi-generator/src/main/resources/haskell-http-client/Core.mustache @@ -61,7 +61,7 @@ import Prelude (($), (.), (<$>), (<*>), Maybe(..), Bool(..), Char, String, fmap, -- * {{configType}} --- | +-- | data {{configType}} = {{configType}} { configHost :: BCL.ByteString -- ^ host supplied in the Request , configUserAgent :: Text -- ^ user-agent supplied in the Request @@ -87,19 +87,19 @@ instance P.Show {{configType}} where -- -- configUserAgent: -- --- @"{{#httpUserAgent}}{{{.}}}{{/httpUserAgent}}{{^httpUserAgent}}{{{cabalName}}}/{{{cabalVersion}}}{{/httpUserAgent}}"@ +-- @"{{{httpUserAgent}}}{{^httpUserAgent}}{{{cabalName}}}/{{{cabalVersion}}}{{/httpUserAgent}}"@ -- newConfig :: IO {{configType}} newConfig = do logCxt <- initLogContext return $ {{configType}} { configHost = "{{{basePath}}}" - , configUserAgent = "{{#httpUserAgent}}{{{.}}}{{/httpUserAgent}}{{^httpUserAgent}}{{{cabalName}}}/{{{cabalVersion}}}{{/httpUserAgent}}" + , configUserAgent = "{{{httpUserAgent}}}{{^httpUserAgent}}{{{cabalName}}}/{{{cabalVersion}}}{{/httpUserAgent}}" , configLogExecWithContext = runDefaultLogExecWithContext , configLogContext = logCxt , configAuthMethods = [] , configValidateAuthMethods = True - } + } -- | updates config use AuthMethod on matching requests addAuthMethod :: AuthMethod auth => {{configType}} -> auth -> {{configType}} @@ -121,7 +121,7 @@ withStderrLogging p = do -- | updates the config to disable logging withNoLogging :: {{configType}} -> {{configType}} withNoLogging p = p { configLogExecWithContext = runNullLogExec} - + -- * {{requestType}} -- | Represents a request. @@ -220,7 +220,7 @@ data ParamBody -- ** {{requestType}} Utils -_mkRequest :: NH.Method -- ^ Method +_mkRequest :: NH.Method -- ^ Method -> [BCL.ByteString] -- ^ Endpoint -> {{requestType}} req contentType res accept -- ^ req: Request Type, res: Response Type _mkRequest m u = {{requestType}} m u _mkParams [] @@ -254,13 +254,13 @@ removeHeader req header = _setContentTypeHeader :: forall req contentType res accept. MimeType contentType => {{requestType}} req contentType res accept -> {{requestType}} req contentType res accept _setContentTypeHeader req = - case mimeType (P.Proxy :: P.Proxy contentType) of + case mimeType (P.Proxy :: P.Proxy contentType) of Just m -> req `setHeader` [("content-type", BC.pack $ P.show m)] Nothing -> req `removeHeader` ["content-type"] _setAcceptHeader :: forall req contentType res accept. MimeType accept => {{requestType}} req contentType res accept -> {{requestType}} req contentType res accept _setAcceptHeader req = - case mimeType (P.Proxy :: P.Proxy accept) of + case mimeType (P.Proxy :: P.Proxy accept) of Just m -> req `setHeader` [("accept", BC.pack $ P.show m)] Nothing -> req `removeHeader` ["accept"] @@ -284,25 +284,25 @@ addQuery :: addQuery req query = req & L.over (rParamsL . paramsQueryL) (query P.++) addForm :: {{requestType}} req contentType res accept -> WH.Form -> {{requestType}} req contentType res accept -addForm req newform = +addForm req newform = let form = case paramsBody (rParams req) of ParamBodyFormUrlEncoded _form -> _form _ -> mempty in req & L.set (rParamsL . paramsBodyL) (ParamBodyFormUrlEncoded (newform <> form)) _addMultiFormPart :: {{requestType}} req contentType res accept -> NH.Part -> {{requestType}} req contentType res accept -_addMultiFormPart req newpart = +_addMultiFormPart req newpart = let parts = case paramsBody (rParams req) of ParamBodyMultipartFormData _parts -> _parts _ -> [] in req & L.set (rParamsL . paramsBodyL) (ParamBodyMultipartFormData (newpart : parts)) _setBodyBS :: {{requestType}} req contentType res accept -> B.ByteString -> {{requestType}} req contentType res accept -_setBodyBS req body = +_setBodyBS req body = req & L.set (rParamsL . paramsBodyL) (ParamBodyB body) _setBodyLBS :: {{requestType}} req contentType res accept -> BL.ByteString -> {{requestType}} req contentType res accept -_setBodyLBS req body = +_setBodyLBS req body = req & L.set (rParamsL . paramsBodyL) (ParamBodyBL body) _hasAuthType :: AuthMethod authMethod => {{requestType}} req contentType res accept -> P.Proxy authMethod -> {{requestType}} req contentType res accept @@ -371,7 +371,7 @@ _toCollA' c encode one xs = case c of {-# INLINE go #-} {-# INLINE expandList #-} {-# INLINE combine #-} - + -- * AuthMethods -- | Provides a method to apply auth methods to requests @@ -402,7 +402,7 @@ _applyAuthMethods req config@({{configType}} {configAuthMethods = as}) = foldlM go req as where go r (AnyAuthMethod a) = applyAuthMethod config a r - + -- * Utils -- | Removes Null fields. (OpenAPI-Specification 2.0 does not allow Null in JSON) @@ -445,16 +445,16 @@ instance P.Show DateTime where instance MimeRender MimeMultipartFormData DateTime where mimeRender _ = mimeRenderDefaultMultipartFormData --- | @{{#dateTimeParseFormat}}TI.parseTimeM True TI.defaultTimeLocale "{{{dateTimeParseFormat}}}"{{/dateTimeParseFormat}}{{^dateTimeParseFormat}}{{#dateTimeFormat}}TI.parseTimeM True TI.defaultTimeLocale "{{{dateTimeFormat}}}"{{/dateTimeFormat}}{{^dateTimeFormat}}_parseISO8601{{/dateTimeFormat}}{{/dateTimeParseFormat}}@ +-- | @{{#dateTimeParseFormat}}TI.parseTimeM True TI.defaultTimeLocale "{{{.}}}"{{/dateTimeParseFormat}}{{^dateTimeParseFormat}}{{#dateTimeFormat}}TI.parseTimeM True TI.defaultTimeLocale "{{{.}}}"{{/dateTimeFormat}}{{^dateTimeFormat}}_parseISO8601{{/dateTimeFormat}}{{/dateTimeParseFormat}}@ _readDateTime :: (MonadFail m{{^dateTimeFormat}}, Alternative m{{/dateTimeFormat}}) => String -> m DateTime _readDateTime s = - DateTime <$> {{#dateTimeParseFormat}}TI.parseTimeM True TI.defaultTimeLocale "{{{dateTimeParseFormat}}}"{{/dateTimeParseFormat}}{{^dateTimeParseFormat}}{{#dateTimeFormat}}TI.parseTimeM True TI.defaultTimeLocale "{{{dateTimeFormat}}}"{{/dateTimeFormat}}{{^dateTimeFormat}}_parseISO8601{{/dateTimeFormat}}{{/dateTimeParseFormat}} s + DateTime <$> {{#dateTimeParseFormat}}TI.parseTimeM True TI.defaultTimeLocale "{{{.}}}"{{/dateTimeParseFormat}}{{^dateTimeParseFormat}}{{#dateTimeFormat}}TI.parseTimeM True TI.defaultTimeLocale "{{{.}}}"{{/dateTimeFormat}}{{^dateTimeFormat}}_parseISO8601{{/dateTimeFormat}}{{/dateTimeParseFormat}} s {-# INLINE _readDateTime #-} --- | @{{^dateTimeFormat}}TI.formatISO8601Millis{{/dateTimeFormat}}{{#dateTimeFormat}}TI.formatTime TI.defaultTimeLocale "{{{dateTimeFormat}}}"{{/dateTimeFormat}}@ +-- | @{{^dateTimeFormat}}TI.formatISO8601Millis{{/dateTimeFormat}}{{#dateTimeFormat}}TI.formatTime TI.defaultTimeLocale "{{{.}}}"{{/dateTimeFormat}}@ _showDateTime :: ({{^dateTimeFormat}}t ~ TI.UTCTime, {{/dateTimeFormat}}TI.FormatTime t) => t -> String _showDateTime = - {{#dateTimeFormat}}TI.formatTime TI.defaultTimeLocale "{{{dateTimeFormat}}}"{{/dateTimeFormat}}{{^dateTimeFormat}}TI.formatISO8601Millis{{/dateTimeFormat}} + {{#dateTimeFormat}}TI.formatTime TI.defaultTimeLocale "{{{.}}}"{{/dateTimeFormat}}{{^dateTimeFormat}}TI.formatISO8601Millis{{/dateTimeFormat}} {-# INLINE _showDateTime #-} -- | parse an ISO8601 date-time string @@ -495,7 +495,7 @@ _showDate = -- * Byte/Binary Formatting - + -- | base64 encoded characters newtype ByteArray = ByteArray { unByteArray :: BL.ByteString } deriving (P.Eq,P.Data,P.Ord,P.Typeable,NF.NFData) diff --git a/modules/openapi-generator/src/main/resources/haskell-http-client/LoggingKatip.mustache b/modules/openapi-generator/src/main/resources/haskell-http-client/LoggingKatip.mustache index 693820cd2916c91e4458d9add086bf8803f90ef6..479818737aea44b659907c518e70dbb9884d8213 100644 --- a/modules/openapi-generator/src/main/resources/haskell-http-client/LoggingKatip.mustache +++ b/modules/openapi-generator/src/main/resources/haskell-http-client/LoggingKatip.mustache @@ -106,4 +106,3 @@ levelError = LG.ErrorS levelDebug :: LogLevel levelDebug = LG.DebugS - diff --git a/modules/openapi-generator/src/main/resources/haskell-http-client/Model.mustache b/modules/openapi-generator/src/main/resources/haskell-http-client/Model.mustache index b6ffd40e3ad0ea421a61b7a3d6ce0edded563524..7655a54c09f5954831f101b7c39d3fa4c03e4a7a 100644 --- a/modules/openapi-generator/src/main/resources/haskell-http-client/Model.mustache +++ b/modules/openapi-generator/src/main/resources/haskell-http-client/Model.mustache @@ -72,11 +72,11 @@ newtype {{{x-param-name-type}}} = {{{x-param-name-type}}} { un{{{x-param-name-ty -- {{{.}}}{{/description}}{{#isAlias}} newtype {{classname}} = {{classname}} { un{{classname}} :: {{{vendorExtensions.x-data-type}}} - } deriving (P.Eq, P.Show, P.Typeable, A.ToJSON, A.FromJSON{{#modelDeriving}}, {{modelDeriving}}{{/modelDeriving}}){{/isAlias}}{{^isAlias}} + } deriving (P.Eq, P.Show, P.Typeable, A.ToJSON, A.FromJSON{{#modelDeriving}}, {{.}}{{/modelDeriving}}){{/isAlias}}{{^isAlias}} data {{classname}} = {{classname}} - { {{#vars}}{{name}} :: {{#x-strictFields}}!({{/x-strictFields}}{{^required}}Maybe {{/required}}{{{vendorExtensions.x-data-type}}}{{#x-strictFields}}){{/x-strictFields}} -- ^ {{#required}}/Required/ {{/required}}{{#isReadOnly}}/ReadOnly/ {{/isReadOnly}}"{{baseName}}"{{#description}} - {{description}}{{/description}}{{^-last}} + { {{#vars}}{{name}} :: {{#x-strictFields}}!({{/x-strictFields}}{{^required}}Maybe {{/required}}{{{vendorExtensions.x-data-type}}}{{#x-strictFields}}){{/x-strictFields}} -- ^ {{#required}}/Required/ {{/required}}{{#isReadOnly}}/ReadOnly/ {{/isReadOnly}}"{{baseName}}"{{#description}} - {{.}}{{/description}}{{^-last}} , {{/-last}}{{/vars}} - } deriving (P.Show, P.Eq, P.Typeable{{#modelDeriving}}, {{modelDeriving}}{{/modelDeriving}}){{/isAlias}} + } deriving (P.Show, P.Eq, P.Typeable{{#modelDeriving}}, {{.}}{{/modelDeriving}}){{/isAlias}} {{^isAlias}}-- | FromJSON {{classname}} instance A.FromJSON {{classname}} where @@ -189,7 +189,7 @@ instance AuthMethod {{name}} where applyAuthMethod _ a@({{name}} secret) req = P.pure $ if (P.typeOf a `P.elem` rAuthTypes req) - then req `setHeader` toHeader ("Authorization", "Bearer " <> secret) + then req `setHeader` toHeader ("Authorization", "Bearer " <> secret) & L.over rAuthTypesL (P.filter (/= P.typeOf a)) else req diff --git a/modules/openapi-generator/src/main/resources/haskell-http-client/README.mustache b/modules/openapi-generator/src/main/resources/haskell-http-client/README.mustache index deec0c0cacbc5b166cee872b6526d94effb43bd5..acd5efa0426bfdea812e20980fc81f1f170158e5 100644 --- a/modules/openapi-generator/src/main/resources/haskell-http-client/README.mustache +++ b/modules/openapi-generator/src/main/resources/haskell-http-client/README.mustache @@ -15,7 +15,7 @@ stack haddock ``` which will generate docs for this lib in the `docs` folder. -To generate the docs in the normal location (to enable hyperlinks to external libs), remove +To generate the docs in the normal location (to enable hyperlinks to external libs), remove ``` build: haddock-arguments: @@ -82,7 +82,7 @@ These options allow some customization of the code generation process. An example setting _dateTimeFormat_ and _strictFields_: ``` -java -jar openapi-generator-cli.jar generate -i petstore.yaml -g haskell-http-client -o output/haskell-http-client --additional-properties=dateTimeFormat="%Y-%m-%dT%H:%M:%S%Q%z" --additional-properties=strictFields=false +java -jar openapi-generator-cli.jar generate -i petstore.yaml -g haskell-http-client -o output/haskell-http-client --additional-properties=dateTimeFormat="%Y-%m-%dT%H:%M:%S%Q%z" --additional-properties=strictFields=false ``` View the full list of Codegen "config option" parameters with the command: @@ -136,10 +136,10 @@ in GHCi or via the Haddocks. * optional non-body parameters are included by using `applyOptionalParam` * optional body parameters are set by using `setBodyParam` -Example code generated for pretend _addFoo_ operation: +Example code generated for pretend _addFoo_ operation: ```haskell -data AddFoo +data AddFoo instance Consumes AddFoo MimeJSON instance Produces AddFoo MimeJSON instance Produces AddFoo MimeXML @@ -182,14 +182,14 @@ the config, it will be applied to the request. ```haskell mgr <- newManager defaultManagerSettings -config0 <- withStdoutLogging =<< newConfig +config0 <- withStdoutLogging =<< newConfig let config = config0 `addAuthMethod` AuthOAuthFoo "secret-key" -let addFooRequest = - addFoo - (ContentType MimeJSON) - (Accept MimeXML) +let addFooRequest = + addFoo + (ContentType MimeJSON) + (Accept MimeXML) (ParamBar paramBar) (ParamQux paramQux) modelBaz diff --git a/modules/openapi-generator/src/main/resources/haskell-http-client/git_push.sh.mustache b/modules/openapi-generator/src/main/resources/haskell-http-client/git_push.sh.mustache index 8b3f689c9121a65080ad038d37a2036b01e559a1..f0bed5bd84155f05bc3cdc67af008f524efb38a6 100644 --- a/modules/openapi-generator/src/main/resources/haskell-http-client/git_push.sh.mustache +++ b/modules/openapi-generator/src/main/resources/haskell-http-client/git_push.sh.mustache @@ -55,4 +55,3 @@ 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/haskell-http-client/tests/Instances.mustache b/modules/openapi-generator/src/main/resources/haskell-http-client/tests/Instances.mustache index dfa64cbb9296038091977da8e1cc75cca1ad99b1..ca4bcf42671234e7369dd6a9b4599463f9f69dd1 100644 --- a/modules/openapi-generator/src/main/resources/haskell-http-client/tests/Instances.mustache +++ b/modules/openapi-generator/src/main/resources/haskell-http-client/tests/Instances.mustache @@ -72,7 +72,7 @@ instance Arbitrary A.Value where sizedObject n = liftM (A.object . map mapF) $ replicateM n $ (,) <$> (arbitrary :: Gen String) <*> simpleAndArrays - + -- | Checks if a given list has no duplicates in _O(n log n)_. hasNoDups :: (Ord a) @@ -87,7 +87,7 @@ hasNoDups = go Set.empty instance ApproxEq TI.Day where (=~) = (==) - + arbitraryReduced :: Arbitrary a => Int -> Gen a arbitraryReduced n = resize (n `div` 2) arbitrary @@ -104,7 +104,7 @@ arbitraryReducedMaybeValue n = do else return generated -- * Models - + {{#models}} {{#model}} {{^isEnum}} diff --git a/modules/openapi-generator/src/main/resources/htmlDocs/bodyParam.mustache b/modules/openapi-generator/src/main/resources/htmlDocs/bodyParam.mustache index 006149abf79b8a52062cbc42996adc14fc75bff5..1c3e14a8090577df5b8303a6d203970a5f591028 100644 --- a/modules/openapi-generator/src/main/resources/htmlDocs/bodyParam.mustache +++ b/modules/openapi-generator/src/main/resources/htmlDocs/bodyParam.mustache @@ -1,3 +1,3 @@ {{#isBodyParam}}<div class="param">{{baseName}} {{#baseType}}<a href="#{{baseType}}">{{baseType}}</a>{{/baseType}} {{^required}}(optional){{/required}}{{#required}}(required){{/required}}</div> - <div class="param-desc"><span class="param-type">Body Parameter</span> — {{unescapedDescription}} {{#defaultValue}}default: {{{defaultValue}}}{{/defaultValue}}</div>{{/isBodyParam}} + <div class="param-desc"><span class="param-type">Body Parameter</span> — {{unescapedDescription}} {{#defaultValue}}default: {{{.}}}{{/defaultValue}}</div>{{/isBodyParam}} diff --git a/modules/openapi-generator/src/main/resources/htmlDocs/formParam.mustache b/modules/openapi-generator/src/main/resources/htmlDocs/formParam.mustache index 19e3fddab8ab03652db6ee24afc6ac31a8228ba1..bea19ea953bafb29a755f3f1cfc8ba62170d631a 100644 --- a/modules/openapi-generator/src/main/resources/htmlDocs/formParam.mustache +++ b/modules/openapi-generator/src/main/resources/htmlDocs/formParam.mustache @@ -1,3 +1,3 @@ {{#isFormParam}}<div class="param">{{baseName}} {{^required}}(optional){{/required}}{{#required}}(required){{/required}}</div> - <div class="param-desc"><span class="param-type">Form Parameter</span> — {{unescapedDescription}} {{#defaultValue}}default: {{{defaultValue}}} {{/defaultValue}}{{#dataFormat}}format: {{{dataFormat}}}{{/dataFormat}}</div>{{/isFormParam}} \ No newline at end of file + <div class="param-desc"><span class="param-type">Form Parameter</span> — {{unescapedDescription}} {{#defaultValue}}default: {{{.}}} {{/defaultValue}}{{#dataFormat}}format: {{{.}}}{{/dataFormat}}</div>{{/isFormParam}} \ No newline at end of file diff --git a/modules/openapi-generator/src/main/resources/htmlDocs/headerParam.mustache b/modules/openapi-generator/src/main/resources/htmlDocs/headerParam.mustache index 7f5d4efc140816f870ecc2473830471ebae4dd33..6c6614b0945e9de017ff36527d1ee0d9f8e5932d 100644 --- a/modules/openapi-generator/src/main/resources/htmlDocs/headerParam.mustache +++ b/modules/openapi-generator/src/main/resources/htmlDocs/headerParam.mustache @@ -1,3 +1,3 @@ <div class="param">{{baseName}} {{^required}}(optional){{/required}}{{#required}}(required){{/required}}</div> - <div class="param-desc"><span class="param-type">Header Parameter</span> — {{unescapedDescription}} {{#defaultValue}}default: {{{defaultValue}}} {{/defaultValue}}{{#dataFormat}}format: {{{dataFormat}}}{{/dataFormat}}</div> + <div class="param-desc"><span class="param-type">Header Parameter</span> — {{unescapedDescription}} {{#defaultValue}}default: {{{.}}} {{/defaultValue}}{{#dataFormat}}format: {{{.}}}{{/dataFormat}}</div> diff --git a/modules/openapi-generator/src/main/resources/htmlDocs/index.mustache b/modules/openapi-generator/src/main/resources/htmlDocs/index.mustache index eb13cf63fc292a706a3b08ad7f0d527c241e740a..a5ad68cc9c8fb231d235d71d9c1b126f3a2b73a8 100644 --- a/modules/openapi-generator/src/main/resources/htmlDocs/index.mustache +++ b/modules/openapi-generator/src/main/resources/htmlDocs/index.mustache @@ -11,8 +11,8 @@ <div class="app-desc">{{{appDescription}}}</div> {{#infoUrl}}<div class="app-desc">More information: <a href="{{{infoUrl}}}">{{{infoUrl}}}</a></div>{{/infoUrl}} {{#infoEmail}}<div class="app-desc">Contact Info: <a href="{{{infoEmail}}}">{{{infoEmail}}}</a></div>{{/infoEmail}} - {{#version}}<div class="app-desc">Version: {{{version}}}</div>{{/version}} - {{#basePathWithoutHost}}<div class="app-desc">BasePath:{{basePathWithoutHost}}</div>{{/basePathWithoutHost}} + {{#version}}<div class="app-desc">Version: {{{.}}}</div>{{/version}} + {{#basePathWithoutHost}}<div class="app-desc">BasePath:{{.}}</div>{{/basePathWithoutHost}} <div class="license-info">{{{licenseInfo}}}</div> <div class="license-url">{{{licenseUrl}}}</div> <h2>Access</h2> @@ -155,7 +155,7 @@ <ol> {{#models}} {{#model}} - <li><a href="#{{name}}"><code>{{name}}</code>{{#title}} - {{title}}{{/title}}</a></li> + <li><a href="#{{name}}"><code>{{name}}</code>{{#title}} - {{.}}{{/title}}</a></li> {{/model}} {{/models}} </ol> @@ -163,10 +163,10 @@ {{#models}} {{#model}} <div class="model"> - <h3><a name="{{name}}"><code>{{name}}</code>{{#title}} - {{title}}{{/title}}</a> <a class="up" href="#__Models">Up</a></h3> - {{#unescapedDescription}}<div class='model-description'>{{unescapedDescription}}</div>{{/unescapedDescription}} + <h3><a name="{{name}}"><code>{{name}}</code>{{#title}} - {{.}}{{/title}}</a> <a class="up" href="#__Models">Up</a></h3> + {{#unescapedDescription}}<div class='model-description'>{{.}}</div>{{/unescapedDescription}} <div class="field-items"> - {{#vars}}<div class="param">{{name}} {{^required}}(optional){{/required}}</div><div class="param-desc"><span class="param-type">{{^isPrimitiveType}}<a href="#{{complexType}}">{{dataType}}</a>{{/isPrimitiveType}}</span> {{unescapedDescription}} {{#dataFormat}}format: {{{dataFormat}}}{{/dataFormat}}</div> + {{#vars}}<div class="param">{{name}} {{^required}}(optional){{/required}}</div><div class="param-desc"><span class="param-type">{{^isPrimitiveType}}<a href="#{{complexType}}">{{dataType}}</a>{{/isPrimitiveType}}</span> {{unescapedDescription}} {{#dataFormat}}format: {{{.}}}{{/dataFormat}}</div> {{#isEnum}} <div class="param-enum-header">Enum:</div> {{#_enum}}<div class="param-enum">{{this}}</div>{{/_enum}} diff --git a/modules/openapi-generator/src/main/resources/htmlDocs/pathParam.mustache b/modules/openapi-generator/src/main/resources/htmlDocs/pathParam.mustache index df8d99204005b94dcb1a3e38fa75ffd8b41cef9b..4c21c3f480a2c6b098425388225365999b9480ce 100644 --- a/modules/openapi-generator/src/main/resources/htmlDocs/pathParam.mustache +++ b/modules/openapi-generator/src/main/resources/htmlDocs/pathParam.mustache @@ -1,3 +1,3 @@ {{#isPathParam}}<div class="param">{{baseName}} {{^required}}(optional){{/required}}{{#required}}(required){{/required}}</div> - <div class="param-desc"><span class="param-type">Path Parameter</span> — {{unescapedDescription}} {{#defaultValue}}default: {{{defaultValue}}} {{/defaultValue}}{{#dataFormat}}format: {{{dataFormat}}}{{/dataFormat}}</div>{{/isPathParam}} \ No newline at end of file + <div class="param-desc"><span class="param-type">Path Parameter</span> — {{unescapedDescription}} {{#defaultValue}}default: {{{.}}} {{/defaultValue}}{{#dataFormat}}format: {{{.}}}{{/dataFormat}}</div>{{/isPathParam}} \ No newline at end of file diff --git a/modules/openapi-generator/src/main/resources/htmlDocs/queryParam.mustache b/modules/openapi-generator/src/main/resources/htmlDocs/queryParam.mustache index 79f7ab2b8c6a3cf158a2aeadad6a8974f21889aa..ee15a268a2484041f6b6780c5314a04709e1a3a5 100644 --- a/modules/openapi-generator/src/main/resources/htmlDocs/queryParam.mustache +++ b/modules/openapi-generator/src/main/resources/htmlDocs/queryParam.mustache @@ -1,3 +1,3 @@ {{#isQueryParam}}<div class="param">{{baseName}} {{^required}}(optional){{/required}}{{#required}}(required){{/required}}</div> - <div class="param-desc"><span class="param-type">Query Parameter</span> — {{unescapedDescription}} {{#defaultValue}}default: {{{defaultValue}}} {{/defaultValue}}{{#dataFormat}}format: {{{dataFormat}}}{{/dataFormat}}</div>{{/isQueryParam}} \ No newline at end of file + <div class="param-desc"><span class="param-type">Query Parameter</span> — {{unescapedDescription}} {{#defaultValue}}default: {{{.}}} {{/defaultValue}}{{#dataFormat}}format: {{{.}}}{{/dataFormat}}</div>{{/isQueryParam}} \ No newline at end of file diff --git a/modules/openapi-generator/src/main/resources/htmlDocs2/index.mustache b/modules/openapi-generator/src/main/resources/htmlDocs2/index.mustache index 5ff3aa02980a98445ca43ed8810b77bd253311ea..10af1ef7d195d49e607aadab65dfa247b721243e 100644 --- a/modules/openapi-generator/src/main/resources/htmlDocs2/index.mustache +++ b/modules/openapi-generator/src/main/resources/htmlDocs2/index.mustache @@ -200,7 +200,7 @@ <div id="api-_"> <h2 id="welcome-to-apidoc">API and SDK Documentation</h2> {{#version}} - <div class="app-desc">Version: {{{version}}}</div> + <div class="app-desc">Version: {{{.}}}</div> {{/version}} <hr> <div id="app-description" class="app-desc"> @@ -492,10 +492,10 @@ </tr> {{#headers}} <tr> - <td>{{#name}}{{name}}{{/name}}</td> + <td>{{name}}</td> <td>{{#datatype}}{{dataType}}{{/datatype}}</td> - <td>{{#dataFormat}}{{dataFormat}}{{/dataFormat}}</td> - <td>{{#description}}{{description}}{{/description}}</td> + <td>{{dataFormat}}</td> + <td>{{description}}</td> </tr> {{/headers}} </table> @@ -523,10 +523,10 @@ {{/infoEmail}} </p> {{#licenseInfo}} - <div class="license-info">{{{licenseInfo}}}</div> + <div class="license-info">{{{.}}}</div> {{/licenseInfo}} {{#licenseUrl}} - <div class="license-url">{{{licenseUrl}}}</div> + <div class="license-url">{{{.}}}</div> {{/licenseUrl}} </div> </div> diff --git a/modules/openapi-generator/src/main/resources/htmlDocs2/js_jsonformatter.mustache b/modules/openapi-generator/src/main/resources/htmlDocs2/js_jsonformatter.mustache index 3936dc85149331e9ad00e764923a441c5ed03af4..e3bcee884710e3317097c306afb65bafb32a7fb8 100644 --- a/modules/openapi-generator/src/main/resources/htmlDocs2/js_jsonformatter.mustache +++ b/modules/openapi-generator/src/main/resources/htmlDocs2/js_jsonformatter.mustache @@ -497,7 +497,7 @@ return /******/ (function(modules) { // webpackBootstrap /***/ function(module, exports, __webpack_require__) { // style-loader: Adds some css to the DOM by adding a <style> tag - + // load the styles var content = __webpack_require__(3); if(typeof content === 'string') content = [[module.id, content, '']]; @@ -524,11 +524,11 @@ return /******/ (function(modules) { // webpackBootstrap exports = module.exports = __webpack_require__(4)(); // imports - - + + // module exports.push([module.id, ".json-formatter-row {\n font-family: monospace;\n}\n.json-formatter-row,\n.json-formatter-row a,\n.json-formatter-row a:hover {\n color: black;\n text-decoration: none;\n}\n.json-formatter-row .json-formatter-row {\n margin-left: 1rem;\n}\n.json-formatter-row .json-formatter-children.json-formatter-empty {\n opacity: 0.5;\n margin-left: 1rem;\n}\n.json-formatter-row .json-formatter-children.json-formatter-empty:after {\n display: none;\n}\n.json-formatter-row .json-formatter-children.json-formatter-empty.json-formatter-object:after {\n content: \"No properties\";\n}\n.json-formatter-row .json-formatter-children.json-formatter-empty.json-formatter-array:after {\n content: \"[]\";\n}\n.json-formatter-row .json-formatter-string {\n color: green;\n white-space: pre;\n word-wrap: break-word;\n}\n.json-formatter-row .json-formatter-number {\n color: blue;\n}\n.json-formatter-row .json-formatter-boolean {\n color: red;\n}\n.json-formatter-row .json-formatter-null {\n color: #855A00;\n}\n.json-formatter-row .json-formatter-undefined {\n color: #ca0b69;\n}\n.json-formatter-row .json-formatter-function {\n color: #FF20ED;\n}\n.json-formatter-row .json-formatter-date {\n background-color: rgba(0, 0, 0, 0.05);\n}\n.json-formatter-row .json-formatter-url {\n text-decoration: underline;\n color: blue;\n cursor: pointer;\n}\n.json-formatter-row .json-formatter-bracket {\n color: blue;\n}\n.json-formatter-row .json-formatter-key {\n color: #00008B;\n cursor: pointer;\n padding-right: 0.2rem;\n}\n.json-formatter-row .json-formatter-constructor-name {\n cursor: pointer;\n}\n.json-formatter-row .json-formatter-toggler {\n line-height: 1.2rem;\n font-size: 0.7rem;\n vertical-align: middle;\n opacity: 0.6;\n cursor: pointer;\n padding-right: 0.2rem;\n}\n.json-formatter-row .json-formatter-toggler:after {\n display: inline-block;\n transition: transform 100ms ease-in;\n content: \"\\25BA\";\n}\n.json-formatter-row > a > .json-formatter-preview-text {\n opacity: 0;\n transition: opacity 0.15s ease-in;\n font-style: italic;\n}\n.json-formatter-row:hover > a > .json-formatter-preview-text {\n opacity: 0.6;\n}\n.json-formatter-row.json-formatter-open > .json-formatter-toggler-link .json-formatter-toggler:after {\n transform: rotate(90deg);\n}\n.json-formatter-row.json-formatter-open > .json-formatter-children:after {\n display: inline-block;\n}\n.json-formatter-row.json-formatter-open > a > .json-formatter-preview-text {\n display: none;\n}\n.json-formatter-row.json-formatter-open.json-formatter-empty:after {\n display: block;\n}\n.json-formatter-dark.json-formatter-row {\n font-family: monospace;\n}\n.json-formatter-dark.json-formatter-row,\n.json-formatter-dark.json-formatter-row a,\n.json-formatter-dark.json-formatter-row a:hover {\n color: white;\n text-decoration: none;\n}\n.json-formatter-dark.json-formatter-row .json-formatter-row {\n margin-left: 1rem;\n}\n.json-formatter-dark.json-formatter-row .json-formatter-children.json-formatter-empty {\n opacity: 0.5;\n margin-left: 1rem;\n}\n.json-formatter-dark.json-formatter-row .json-formatter-children.json-formatter-empty:after {\n display: none;\n}\n.json-formatter-dark.json-formatter-row .json-formatter-children.json-formatter-empty.json-formatter-object:after {\n content: \"No properties\";\n}\n.json-formatter-dark.json-formatter-row .json-formatter-children.json-formatter-empty.json-formatter-array:after {\n content: \"[]\";\n}\n.json-formatter-dark.json-formatter-row .json-formatter-string {\n color: #31F031;\n white-space: pre;\n word-wrap: break-word;\n}\n.json-formatter-dark.json-formatter-row .json-formatter-number {\n color: #66C2FF;\n}\n.json-formatter-dark.json-formatter-row .json-formatter-boolean {\n color: #EC4242;\n}\n.json-formatter-dark.json-formatter-row .json-formatter-null {\n color: #EEC97D;\n}\n.json-formatter-dark.json-formatter-row .json-formatter-undefined {\n color: #ef8fbe;\n}\n.json-formatter-dark.json-formatter-row .json-formatter-function {\n color: #FD48CB;\n}\n.json-formatter-dark.json-formatter-row .json-formatter-date {\n background-color: rgba(255, 255, 255, 0.05);\n}\n.json-formatter-dark.json-formatter-row .json-formatter-url {\n text-decoration: underline;\n color: #027BFF;\n cursor: pointer;\n}\n.json-formatter-dark.json-formatter-row .json-formatter-bracket {\n color: #9494FF;\n}\n.json-formatter-dark.json-formatter-row .json-formatter-key {\n color: #23A0DB;\n cursor: pointer;\n padding-right: 0.2rem;\n}\n.json-formatter-dark.json-formatter-row .json-formatter-constructor-name {\n cursor: pointer;\n}\n.json-formatter-dark.json-formatter-row .json-formatter-toggler {\n line-height: 1.2rem;\n font-size: 0.7rem;\n vertical-align: middle;\n opacity: 0.6;\n cursor: pointer;\n padding-right: 0.2rem;\n}\n.json-formatter-dark.json-formatter-row .json-formatter-toggler:after {\n display: inline-block;\n transition: transform 100ms ease-in;\n content: \"\\25BA\";\n}\n.json-formatter-dark.json-formatter-row > a > .json-formatter-preview-text {\n opacity: 0;\n transition: opacity 0.15s ease-in;\n font-style: italic;\n}\n.json-formatter-dark.json-formatter-row:hover > a > .json-formatter-preview-text {\n opacity: 0.6;\n}\n.json-formatter-dark.json-formatter-row.json-formatter-open > .json-formatter-toggler-link .json-formatter-toggler:after {\n transform: rotate(90deg);\n}\n.json-formatter-dark.json-formatter-row.json-formatter-open > .json-formatter-children:after {\n display: inline-block;\n}\n.json-formatter-dark.json-formatter-row.json-formatter-open > a > .json-formatter-preview-text {\n display: none;\n}\n.json-formatter-dark.json-formatter-row.json-formatter-open.json-formatter-empty:after {\n display: block;\n}\n", "", {"version":3,"sources":["/./src/style.less","/./src/style.less"],"names":[],"mappings":"AA0GA;EA3FE,uBAAA;CCbD;ADcC;;;EACE,aAAA;EACA,sBAAA;CCVH;ADkGD;EApFI,kBAAA;CCXH;ADeG;EACE,aAAA;EACA,kBAAA;CCbL;ADeK;EAAU,cAAA;CCZf;ADaK;EAAgC,yBAAA;CCVrC;ADWK;EAA+B,cAAA;CCRpC;ADkFD;EArEI,aAAA;EACA,iBAAA;EACA,sBAAA;CCVH;AD6ED;EAjE2B,YAAA;CCT1B;AD0ED;EAhE4B,WAAA;CCP3B;ADuED;EA/DyB,eAAA;CCLxB;ADoED;EA9D8B,eAAA;CCH7B;ADiED;EA7D6B,eAAA;CCD5B;AD8DD;EA5DyB,sCAAA;CCCxB;AD2DD;EA1DI,2BAAA;EACA,YAAA;EACA,gBAAA;CCEH;ADsDD;EArD4B,YAAA;CCE3B;ADmDD;EAnDI,eAAA;EACA,gBAAA;EACA,sBAAA;CCGH;AD8CD;EA9CI,gBAAA;CCGH;AD2CD;EA1CI,oBAAA;EACA,kBAAA;EACA,uBAAA;EACA,aAAA;EACA,gBAAA;EACA,sBAAA;CCEH;ADAG;EACE,sBAAA;EACA,oCAAA;EACA,iBAAA;CCEL;AD8BD;EA1BI,WAAA;EACA,kCAAA;EACA,mBAAA;CCDH;ADGC;EACE,aAAA;CCDH;ADKC;EAEI,yBAAA;CCJL;ADEC;EAKI,sBAAA;CCJL;ADDC;EAQI,cAAA;CCJL;ADMG;EACE,eAAA;CCJL;ADeD;EAhGE,uBAAA;CCoFD;ADnFC;;;EACE,aAAA;EACA,sBAAA;CCuFH;ADMD;EAzFI,kBAAA;CCsFH;ADlFG;EACE,aAAA;EACA,kBAAA;CCoFL;ADlFK;EAAU,cAAA;CCqFf;ADpFK;EAAgC,yBAAA;CCuFrC;ADtFK;EAA+B,cAAA;CCyFpC;ADVD;EA1EI,eAAA;EACA,iBAAA;EACA,sBAAA;CCuFH;ADfD;EAtE2B,eAAA;CCwF1B;ADlBD;EArE4B,eAAA;CC0F3B;ADrBD;EApEyB,eAAA;CC4FxB;ADxBD;EAnE8B,eAAA;CC8F7B;AD3BD;EAlE6B,eAAA;CCgG5B;AD9BD;EAjEyB,4CAAA;CCkGxB;ADjCD;EA/DI,2BAAA;EACA,eAAA;EACA,gBAAA;CCmGH;ADtCD;EA1D4B,eAAA;CCmG3B;ADzCD;EAxDI,eAAA;EACA,gBAAA;EACA,sBAAA;CCoGH;AD9CD;EAnDI,gBAAA;CCoGH;ADjDD;EA/CI,oBAAA;EACA,kBAAA;EACA,uBAAA;EACA,aAAA;EACA,gBAAA;EACA,sBAAA;CCmGH;ADjGG;EACE,sBAAA;EACA,oCAAA;EACA,iBAAA;CCmGL;AD9DD;EA/BI,WAAA;EACA,kCAAA;EACA,mBAAA;CCgGH;AD9FC;EACE,aAAA;CCgGH;AD5FC;EAEI,yBAAA;CC6FL;AD/FC;EAKI,sBAAA;CC6FL;ADlGC;EAQI,cAAA;CC6FL;AD3FG;EACE,eAAA;CC6FL","file":"style.less","sourcesContent":[".theme(\n @default-color: black,\n @string-color: green,\n @number-color: blue,\n @boolean-color: red,\n @null-color: #855A00,\n @undefined-color: rgb(202, 11, 105),\n @function-color: #FF20ED,\n @rotate-time: 100ms,\n @toggler-opacity: 0.6,\n @toggler-color: #45376F,\n @bracket-color: blue,\n @key-color: #00008B,\n @url-color: blue ){\n\n font-family: monospace;\n &, a, a:hover {\n color: @default-color;\n text-decoration: none;\n }\n\n .json-formatter-row {\n margin-left: 1rem;\n }\n\n .json-formatter-children {\n &.json-formatter-empty {\n opacity: 0.5;\n margin-left: 1rem;\n\n &:after { display: none; }\n &.json-formatter-object:after { content: \"No properties\"; }\n &.json-formatter-array:after { content: \"[]\"; }\n }\n }\n\n .json-formatter-string {\n color: @string-color;\n white-space: pre;\n word-wrap: break-word;\n }\n .json-formatter-number { color: @number-color; }\n .json-formatter-boolean { color: @boolean-color; }\n .json-formatter-null { color: @null-color; }\n .json-formatter-undefined { color: @undefined-color; }\n .json-formatter-function { color: @function-color; }\n .json-formatter-date { background-color: fade(@default-color, 5%); }\n .json-formatter-url {\n text-decoration: underline;\n color: @url-color;\n cursor: pointer;\n }\n\n .json-formatter-bracket { color: @bracket-color; }\n .json-formatter-key {\n color: @key-color;\n cursor: pointer;\n padding-right: 0.2rem;\n }\n .json-formatter-constructor-name {\n cursor: pointer;\n }\n\n .json-formatter-toggler {\n line-height: 1.2rem;\n font-size: 0.7rem;\n vertical-align: middle;\n opacity: @toggler-opacity;\n cursor: pointer;\n padding-right: 0.2rem;\n\n &:after {\n display: inline-block;\n transition: transform @rotate-time ease-in;\n content: \"â–º\";\n }\n }\n\n // Inline preview on hover (optional)\n > a > .json-formatter-preview-text {\n opacity: 0;\n transition: opacity .15s ease-in;\n font-style: italic;\n }\n &:hover > a > .json-formatter-preview-text {\n opacity: 0.6;\n }\n\n // Open state\n &.json-formatter-open {\n > .json-formatter-toggler-link .json-formatter-toggler:after{\n transform: rotate(90deg);\n }\n > .json-formatter-children:after {\n display: inline-block;\n }\n > a > .json-formatter-preview-text {\n display: none;\n }\n &.json-formatter-empty:after {\n display: block;\n }\n }\n}\n\n// Default theme\n.json-formatter-row {\n .theme();\n}\n\n// Dark theme\n.json-formatter-dark.json-formatter-row {\n .theme(\n @default-color: white,\n @string-color: #31F031,\n @number-color: #66C2FF,\n @boolean-color: #EC4242,\n @null-color: #EEC97D,\n @undefined-color: rgb(239, 143, 190),\n @function-color: #FD48CB,\n @rotate-time: 100ms,\n @toggler-opacity: 0.6,\n @toggler-color: #45376F,\n @bracket-color: #9494FF,\n @key-color: #23A0DB,\n @url-color: #027BFF);\n}\n",".json-formatter-row {\n font-family: monospace;\n}\n.json-formatter-row,\n.json-formatter-row a,\n.json-formatter-row a:hover {\n color: black;\n text-decoration: none;\n}\n.json-formatter-row .json-formatter-row {\n margin-left: 1rem;\n}\n.json-formatter-row .json-formatter-children.json-formatter-empty {\n opacity: 0.5;\n margin-left: 1rem;\n}\n.json-formatter-row .json-formatter-children.json-formatter-empty:after {\n display: none;\n}\n.json-formatter-row .json-formatter-children.json-formatter-empty.json-formatter-object:after {\n content: \"No properties\";\n}\n.json-formatter-row .json-formatter-children.json-formatter-empty.json-formatter-array:after {\n content: \"[]\";\n}\n.json-formatter-row .json-formatter-string {\n color: green;\n white-space: pre;\n word-wrap: break-word;\n}\n.json-formatter-row .json-formatter-number {\n color: blue;\n}\n.json-formatter-row .json-formatter-boolean {\n color: red;\n}\n.json-formatter-row .json-formatter-null {\n color: #855A00;\n}\n.json-formatter-row .json-formatter-undefined {\n color: #ca0b69;\n}\n.json-formatter-row .json-formatter-function {\n color: #FF20ED;\n}\n.json-formatter-row .json-formatter-date {\n background-color: rgba(0, 0, 0, 0.05);\n}\n.json-formatter-row .json-formatter-url {\n text-decoration: underline;\n color: blue;\n cursor: pointer;\n}\n.json-formatter-row .json-formatter-bracket {\n color: blue;\n}\n.json-formatter-row .json-formatter-key {\n color: #00008B;\n cursor: pointer;\n padding-right: 0.2rem;\n}\n.json-formatter-row .json-formatter-constructor-name {\n cursor: pointer;\n}\n.json-formatter-row .json-formatter-toggler {\n line-height: 1.2rem;\n font-size: 0.7rem;\n vertical-align: middle;\n opacity: 0.6;\n cursor: pointer;\n padding-right: 0.2rem;\n}\n.json-formatter-row .json-formatter-toggler:after {\n display: inline-block;\n transition: transform 100ms ease-in;\n content: \"â–º\";\n}\n.json-formatter-row > a > .json-formatter-preview-text {\n opacity: 0;\n transition: opacity 0.15s ease-in;\n font-style: italic;\n}\n.json-formatter-row:hover > a > .json-formatter-preview-text {\n opacity: 0.6;\n}\n.json-formatter-row.json-formatter-open > .json-formatter-toggler-link .json-formatter-toggler:after {\n transform: rotate(90deg);\n}\n.json-formatter-row.json-formatter-open > .json-formatter-children:after {\n display: inline-block;\n}\n.json-formatter-row.json-formatter-open > a > .json-formatter-preview-text {\n display: none;\n}\n.json-formatter-row.json-formatter-open.json-formatter-empty:after {\n display: block;\n}\n.json-formatter-dark.json-formatter-row {\n font-family: monospace;\n}\n.json-formatter-dark.json-formatter-row,\n.json-formatter-dark.json-formatter-row a,\n.json-formatter-dark.json-formatter-row a:hover {\n color: white;\n text-decoration: none;\n}\n.json-formatter-dark.json-formatter-row .json-formatter-row {\n margin-left: 1rem;\n}\n.json-formatter-dark.json-formatter-row .json-formatter-children.json-formatter-empty {\n opacity: 0.5;\n margin-left: 1rem;\n}\n.json-formatter-dark.json-formatter-row .json-formatter-children.json-formatter-empty:after {\n display: none;\n}\n.json-formatter-dark.json-formatter-row .json-formatter-children.json-formatter-empty.json-formatter-object:after {\n content: \"No properties\";\n}\n.json-formatter-dark.json-formatter-row .json-formatter-children.json-formatter-empty.json-formatter-array:after {\n content: \"[]\";\n}\n.json-formatter-dark.json-formatter-row .json-formatter-string {\n color: #31F031;\n white-space: pre;\n word-wrap: break-word;\n}\n.json-formatter-dark.json-formatter-row .json-formatter-number {\n color: #66C2FF;\n}\n.json-formatter-dark.json-formatter-row .json-formatter-boolean {\n color: #EC4242;\n}\n.json-formatter-dark.json-formatter-row .json-formatter-null {\n color: #EEC97D;\n}\n.json-formatter-dark.json-formatter-row .json-formatter-undefined {\n color: #ef8fbe;\n}\n.json-formatter-dark.json-formatter-row .json-formatter-function {\n color: #FD48CB;\n}\n.json-formatter-dark.json-formatter-row .json-formatter-date {\n background-color: rgba(255, 255, 255, 0.05);\n}\n.json-formatter-dark.json-formatter-row .json-formatter-url {\n text-decoration: underline;\n color: #027BFF;\n cursor: pointer;\n}\n.json-formatter-dark.json-formatter-row .json-formatter-bracket {\n color: #9494FF;\n}\n.json-formatter-dark.json-formatter-row .json-formatter-key {\n color: #23A0DB;\n cursor: pointer;\n padding-right: 0.2rem;\n}\n.json-formatter-dark.json-formatter-row .json-formatter-constructor-name {\n cursor: pointer;\n}\n.json-formatter-dark.json-formatter-row .json-formatter-toggler {\n line-height: 1.2rem;\n font-size: 0.7rem;\n vertical-align: middle;\n opacity: 0.6;\n cursor: pointer;\n padding-right: 0.2rem;\n}\n.json-formatter-dark.json-formatter-row .json-formatter-toggler:after {\n display: inline-block;\n transition: transform 100ms ease-in;\n content: \"â–º\";\n}\n.json-formatter-dark.json-formatter-row > a > .json-formatter-preview-text {\n opacity: 0;\n transition: opacity 0.15s ease-in;\n font-style: italic;\n}\n.json-formatter-dark.json-formatter-row:hover > a > .json-formatter-preview-text {\n opacity: 0.6;\n}\n.json-formatter-dark.json-formatter-row.json-formatter-open > .json-formatter-toggler-link .json-formatter-toggler:after {\n transform: rotate(90deg);\n}\n.json-formatter-dark.json-formatter-row.json-formatter-open > .json-formatter-children:after {\n display: inline-block;\n}\n.json-formatter-dark.json-formatter-row.json-formatter-open > a > .json-formatter-preview-text {\n display: none;\n}\n.json-formatter-dark.json-formatter-row.json-formatter-open.json-formatter-empty:after {\n display: block;\n}\n"],"sourceRoot":"webpack://"}]); - + // exports @@ -543,7 +543,7 @@ return /******/ (function(modules) { // webpackBootstrap // css base code, injected by the css-loader module.exports = function() { var list = []; - + // return the list of modules as css string list.toString = function toString() { var result = []; @@ -557,7 +557,7 @@ return /******/ (function(modules) { // webpackBootstrap } return result.join(""); }; - + // import a list of modules into the list list.i = function(modules, mediaQuery) { if(typeof modules === "string") @@ -613,23 +613,23 @@ return /******/ (function(modules) { // webpackBootstrap singletonElement = null, singletonCounter = 0, styleElementsInsertedAtTop = []; - + module.exports = function(list, options) { if(false) { if(typeof document !== "object") throw new Error("The style-loader cannot be used in a non-browser environment"); } - + options = options || {}; // Force single-tag solution on IE6-9, which has a hard limit on the # of <style> // tags it will allow on a page if (typeof options.singleton === "undefined") options.singleton = isOldIE(); - + // By default, add <style> tags to the bottom of <head>. if (typeof options.insertAt === "undefined") options.insertAt = "bottom"; - + var styles = listToStyles(list); addStylesToDom(styles, options); - + return function update(newList) { var mayRemove = []; for(var i = 0; i < styles.length; i++) { @@ -652,7 +652,7 @@ return /******/ (function(modules) { // webpackBootstrap } }; } - + function addStylesToDom(styles, options) { for(var i = 0; i < styles.length; i++) { var item = styles[i]; @@ -674,7 +674,7 @@ return /******/ (function(modules) { // webpackBootstrap } } } - + function listToStyles(list) { var styles = []; var newStyles = {}; @@ -692,7 +692,7 @@ return /******/ (function(modules) { // webpackBootstrap } return styles; } - + function insertStyleElement(options, styleElement) { var head = getHeadElement(); var lastStyleElementInsertedAtTop = styleElementsInsertedAtTop[styleElementsInsertedAtTop.length - 1]; @@ -711,7 +711,7 @@ return /******/ (function(modules) { // webpackBootstrap throw new Error("Invalid value for parameter 'insertAt'. Must be 'top' or 'bottom'."); } } - + function removeStyleElement(styleElement) { styleElement.parentNode.removeChild(styleElement); var idx = styleElementsInsertedAtTop.indexOf(styleElement); @@ -719,24 +719,24 @@ return /******/ (function(modules) { // webpackBootstrap styleElementsInsertedAtTop.splice(idx, 1); } } - + function createStyleElement(options) { var styleElement = document.createElement("style"); styleElement.type = "text/css"; insertStyleElement(options, styleElement); return styleElement; } - + function createLinkElement(options) { var linkElement = document.createElement("link"); linkElement.rel = "stylesheet"; insertStyleElement(options, linkElement); return linkElement; } - + function addStyle(obj, options) { var styleElement, update, remove; - + if (options.singleton) { var styleIndex = singletonCounter++; styleElement = singletonElement || (singletonElement = createStyleElement(options)); @@ -762,9 +762,9 @@ return /******/ (function(modules) { // webpackBootstrap removeStyleElement(styleElement); }; } - + update(obj); - + return function updateStyle(newObj) { if(newObj) { if(newObj.css === obj.css && newObj.media === obj.media && newObj.sourceMap === obj.sourceMap) @@ -775,19 +775,19 @@ return /******/ (function(modules) { // webpackBootstrap } }; } - + var replaceText = (function () { var textStore = []; - + return function (index, replacement) { textStore[index] = replacement; return textStore.filter(Boolean).join('\n'); }; })(); - + function applyToSingletonTag(styleElement, index, remove, obj) { var css = remove ? "" : obj.css; - + if (styleElement.styleSheet) { styleElement.styleSheet.cssText = replaceText(index, css); } else { @@ -801,15 +801,15 @@ return /******/ (function(modules) { // webpackBootstrap } } } - + function applyToTag(styleElement, obj) { var css = obj.css; var media = obj.media; - + if(media) { styleElement.setAttribute("media", media) } - + if(styleElement.styleSheet) { styleElement.styleSheet.cssText = css; } else { @@ -819,22 +819,22 @@ return /******/ (function(modules) { // webpackBootstrap styleElement.appendChild(document.createTextNode(css)); } } - + function updateLink(linkElement, obj) { var css = obj.css; var sourceMap = obj.sourceMap; - + if(sourceMap) { // https://developer.mozilla.org/en/docs/Web/API/WindowBase64/Base64_encoding_and_decoding css += "\n/*# sourceMappingURL=data:application/json;base64," + btoa(unescape(encodeURIComponent(JSON.stringify(sourceMap)))) + " */"; } - + var blob = new Blob([css], { type: "text/css" }); - + var oldSrc = linkElement.href; - + linkElement.href = URL.createObjectURL(blob); - + if(oldSrc) URL.revokeObjectURL(oldSrc); } diff --git a/modules/openapi-generator/src/main/resources/htmlDocs2/param.mustache b/modules/openapi-generator/src/main/resources/htmlDocs2/param.mustache index 8602a5d01f9b175697fadb396216d6ce4b0b3879..33589adb4119a475f465caf49ebb0285eb88a8ab 100644 --- a/modules/openapi-generator/src/main/resources/htmlDocs2/param.mustache +++ b/modules/openapi-generator/src/main/resources/htmlDocs2/param.mustache @@ -1,4 +1,4 @@ -<tr><td style="width:150px;">{{baseName}}{{^required}}{{/required}}{{#required}}*{{/required}}</td> +<tr><td style="width:150px;">{{baseName}}{{#required}}*{{/required}}</td> <td> @@ -10,13 +10,13 @@ </span> {{#dataFormat}} <span class="format"> - ({{dataFormat}}) + ({{.}}) </span> {{/dataFormat}} {{#description}} <div class="inner description marked"> -{{description}} +{{.}} </div> {{/description}} </div> diff --git a/modules/openapi-generator/src/main/resources/htmlDocs2/paramB.mustache b/modules/openapi-generator/src/main/resources/htmlDocs2/paramB.mustache index e584bcb129c2c71033b31616893048220bdff4c2..cd0dda30ea35b133a3df3c886173636e55519000 100644 --- a/modules/openapi-generator/src/main/resources/htmlDocs2/paramB.mustache +++ b/modules/openapi-generator/src/main/resources/htmlDocs2/paramB.mustache @@ -1,4 +1,4 @@ -<tr><td style="width:150px;">{{paramName}} {{^required}}{{/required}}{{#required}}<span style="color:red;">*</span>{{/required}}</td> +<tr><td style="width:150px;">{{paramName}} {{#required}}<span style="color:red;">*</span>{{/required}}</td> <td> <p class="marked">{{description}}</p> <script> diff --git a/modules/openapi-generator/src/main/resources/htmlDocs2/sample_android.mustache b/modules/openapi-generator/src/main/resources/htmlDocs2/sample_android.mustache index b0175faf5ec7d6bbee41ac1cd4d94c7c6084133b..62ee30b5cf9aa043ed60f51ae03a5eaf914dd077 100644 --- a/modules/openapi-generator/src/main/resources/htmlDocs2/sample_android.mustache +++ b/modules/openapi-generator/src/main/resources/htmlDocs2/sample_android.mustache @@ -6,9 +6,9 @@ public class {{{classname}}}Example { {{#allParams}} {{{dataType}}} {{{paramName}}} = {{{example}}}; // {{{dataType}}} | {{{unescapedDescription}}} {{/allParams}} - + try { - {{#returnType}}{{{returnType}}} result = {{/returnType}}apiInstance.{{{operationId}}}({{#allParams}}{{{paramName}}}{{^-last}}, {{/-last}}{{/allParams}});{{#returnType}} + {{#returnType}}{{{.}}} result = {{/returnType}}apiInstance.{{{operationId}}}({{#allParams}}{{{paramName}}}{{^-last}}, {{/-last}}{{/allParams}});{{#returnType}} System.out.println(result);{{/returnType}} } catch (ApiException e) { System.err.println("Exception when calling {{{classname}}}#{{{operationId}}}"); diff --git a/modules/openapi-generator/src/main/resources/htmlDocs2/sample_csharp.mustache b/modules/openapi-generator/src/main/resources/htmlDocs2/sample_csharp.mustache index cd85151896c4be6dc9a8632a8e63618337c5e2eb..12d0e7bd6e189cb4e9ddf97c04965bba06ae261a 100644 --- a/modules/openapi-generator/src/main/resources/htmlDocs2/sample_csharp.mustache +++ b/modules/openapi-generator/src/main/resources/htmlDocs2/sample_csharp.mustache @@ -22,7 +22,7 @@ namespace Example Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN";{{/isOAuth}} {{/authMethods}} {{/hasAuthMethods}} - + // Create an instance of the API class var apiInstance = new {{classname}}(); {{#allParams}} diff --git a/modules/openapi-generator/src/main/resources/htmlDocs2/sample_java.mustache b/modules/openapi-generator/src/main/resources/htmlDocs2/sample_java.mustache index 04ea11225e19cd334e38be2ddf72e3663641110a..7ea9bee1512c6c3af013057ff05d9eea90e3b9bc 100644 --- a/modules/openapi-generator/src/main/resources/htmlDocs2/sample_java.mustache +++ b/modules/openapi-generator/src/main/resources/htmlDocs2/sample_java.mustache @@ -29,15 +29,15 @@ public class {{{classname}}}Example { {{{name}}}.setAccessToken("YOUR ACCESS TOKEN");{{/isOAuth}} {{/authMethods}} {{/hasAuthMethods}} - + // Create an instance of the API class {{{classname}}} apiInstance = new {{{classname}}}(); {{#allParams}} {{{dataType}}} {{{paramName}}} = {{{example}}}; // {{{dataType}}} | {{{unescapedDescription}}} {{/allParams}} - + try { - {{#returnType}}{{{returnType}}} result = {{/returnType}}apiInstance.{{{operationId}}}({{#allParams}}{{{paramName}}}{{^-last}}, {{/-last}}{{/allParams}});{{#returnType}} + {{#returnType}}{{{.}}} result = {{/returnType}}apiInstance.{{{operationId}}}({{#allParams}}{{{paramName}}}{{^-last}}, {{/-last}}{{/allParams}});{{#returnType}} System.out.println(result);{{/returnType}} } catch (ApiException e) { System.err.println("Exception when calling {{{classname}}}#{{{operationId}}}"); diff --git a/modules/openapi-generator/src/main/resources/htmlDocs2/sample_perl.mustache b/modules/openapi-generator/src/main/resources/htmlDocs2/sample_perl.mustache index 7039e792c413a89ee9711d347dc444ccc3b22e10..63d2a05aefc5c61a4ed952379086c88b5a2ff0d9 100644 --- a/modules/openapi-generator/src/main/resources/htmlDocs2/sample_perl.mustache +++ b/modules/openapi-generator/src/main/resources/htmlDocs2/sample_perl.mustache @@ -23,7 +23,7 @@ my $api_instance = {{perlModuleName}}::{{classname}}->new(); {{#allParams}}my ${{paramName}} = {{#isArray}}[{{/isArray}}{{#isBodyParam}}{{{perlModuleName}}}::Object::{{dataType}}->new(){{/isBodyParam}}{{^isBodyParam}}{{{example}}}{{/isBodyParam}}{{#isArray}}]{{/isArray}}; # {{{dataType}}} | {{{unescapedDescription}}} {{/allParams}} -eval { +eval { {{#returnType}}my $result = {{/returnType}}$api_instance->{{{operationId}}}({{#allParams}}{{paramName}} => ${{paramName}}{{^-last}}, {{/-last}}{{/allParams}});{{#returnType}} print Dumper($result);{{/returnType}} }; diff --git a/modules/openapi-generator/src/main/resources/htmlDocs2/sample_python.mustache b/modules/openapi-generator/src/main/resources/htmlDocs2/sample_python.mustache index dfc32e6c0d6484484a56d97769ecc520f12d2840..066941da35d1da1c3c4564e45f8a92a7a21a02f3 100644 --- a/modules/openapi-generator/src/main/resources/htmlDocs2/sample_python.mustache +++ b/modules/openapi-generator/src/main/resources/htmlDocs2/sample_python.mustache @@ -25,7 +25,7 @@ api_instance = {{{pythonPackageName}}}.{{{classname}}}() {{#allParams}}{{paramName}} = {{{example}}} # {{{dataType}}} | {{{unescapedDescription}}}{{^required}} (optional){{/required}}{{#defaultValue}} (default to {{{.}}}){{/defaultValue}} {{/allParams}} -try: +try: {{#summary}} # {{{.}}} {{/summary}} {{#returnType}}api_response = {{/returnType}}api_instance.{{{operationIdSnakeCase}}}({{#allParams}}{{#required}}{{paramName}}{{/required}}{{^required}}{{paramName}}={{paramName}}{{/required}}{{^-last}}, {{/-last}}{{/allParams}}){{#returnType}} pprint(api_response){{/returnType}} diff --git a/modules/openapi-generator/src/main/resources/java-msf4j-server/README.mustache b/modules/openapi-generator/src/main/resources/java-msf4j-server/README.mustache index fcaf33f76ddc2e6e6ca0697d39f1c405d4465a8e..dc243c506ac76d4f8b35a7b08e20f827b76e6634 100644 --- a/modules/openapi-generator/src/main/resources/java-msf4j-server/README.mustache +++ b/modules/openapi-generator/src/main/resources/java-msf4j-server/README.mustache @@ -11,12 +11,12 @@ Before you build/run service replace .deploy(new PetApi()) with your actual serv .start(); ``` -To Use-it : in the generated folder try +To Use-it : in the generated folder try ``` -mvn package +mvn package ``` -for build jar, then start your server: +for build jar, then start your server: ``` java -jar target/{{artifactId}}-{{artifactVersion}}.jar ``` diff --git a/modules/openapi-generator/src/main/resources/java-msf4j-server/allowableValues.mustache b/modules/openapi-generator/src/main/resources/java-msf4j-server/allowableValues.mustache index a48256d027a1601d3cb9c427e67119dcff701431..75bce9385dea140e1cae22202bcacd2b11e07b76 100644 --- a/modules/openapi-generator/src/main/resources/java-msf4j-server/allowableValues.mustache +++ b/modules/openapi-generator/src/main/resources/java-msf4j-server/allowableValues.mustache @@ -1 +1 @@ -{{#allowableValues}}allowableValues="{{#values}}{{{.}}}{{^-last}}, {{/-last}}{{/values}}{{^values}}range=[{{#min}}{{.}}{{/min}}{{^min}}-infinity{{/min}}, {{#max}}{{.}}{{/max}}{{^max}}infinity{{/max}}]{{/values}}"{{/allowableValues}} \ No newline at end of file +{{#allowableValues}}allowableValues="{{#values}}{{{.}}}{{^-last}}, {{/-last}}{{/values}}{{^values}}range=[{{min}}{{^min}}-infinity{{/min}}, {{max}}{{^max}}infinity{{/max}}]{{/values}}"{{/allowableValues}} \ No newline at end of file diff --git a/modules/openapi-generator/src/main/resources/java-msf4j-server/api.mustache b/modules/openapi-generator/src/main/resources/java-msf4j-server/api.mustache index aac57731ca7e2cbc39c7b07126b66aeca9e26da5..360f89a5a97cd4a100f588b5778bce75975762dc 100644 --- a/modules/openapi-generator/src/main/resources/java-msf4j-server/api.mustache +++ b/modules/openapi-generator/src/main/resources/java-msf4j-server/api.mustache @@ -37,7 +37,7 @@ public class {{classname}} { {{#subresourceOperation}}@Path("{{{path}}}"){{/subresourceOperation}} {{#hasConsumes}}@Consumes({ {{#consumes}}"{{{mediaType}}}"{{^-last}}, {{/-last}}{{/consumes}} }){{/hasConsumes}} {{#hasProduces}}@Produces({ {{#produces}}"{{{mediaType}}}"{{^-last}}, {{/-last}}{{/produces}} }){{/hasProduces}} - @io.swagger.annotations.ApiOperation(value = "{{{summary}}}", notes = "{{{notes}}}", response = {{{returnBaseType}}}.class{{#returnContainer}}, responseContainer = "{{{returnContainer}}}"{{/returnContainer}}{{#hasAuthMethods}}, authorizations = { + @io.swagger.annotations.ApiOperation(value = "{{{summary}}}", notes = "{{{notes}}}", response = {{{returnBaseType}}}.class{{#returnContainer}}, responseContainer = "{{{.}}}"{{/returnContainer}}{{#hasAuthMethods}}, authorizations = { {{#authMethods}}@io.swagger.annotations.Authorization(value = "{{name}}"{{#isOAuth}}, scopes = { {{#scopes}}@io.swagger.annotations.AuthorizationScope(scope = "{{scope}}", description = "{{description}}"){{^-last}}, {{/-last}}{{/scopes}} @@ -45,7 +45,7 @@ public class {{classname}} { {{/-last}}{{/authMethods}} }{{/hasAuthMethods}}, tags={ {{#vendorExtensions.x-tags}}"{{tag}}",{{/vendorExtensions.x-tags}} }) @io.swagger.annotations.ApiResponses(value = { {{#responses}} - @io.swagger.annotations.ApiResponse(code = {{{code}}}, message = "{{{message}}}", response = {{{returnBaseType}}}.class{{#returnContainer}}, responseContainer = "{{{returnContainer}}}"{{/returnContainer}}){{^-last}}, + @io.swagger.annotations.ApiResponse(code = {{{code}}}, message = "{{{message}}}", response = {{{returnBaseType}}}.class{{#returnContainer}}, responseContainer = "{{{.}}}"{{/returnContainer}}){{^-last}}, {{/-last}}{{/responses}} }) public Response {{nickname}}({{#allParams}}{{>queryParams}}{{>pathParams}}{{>headerParams}}{{>bodyParams}}{{>formParams}}{{^-last}},{{/-last}}{{/allParams}}) throws NotFoundException { diff --git a/modules/openapi-generator/src/main/resources/java-msf4j-server/bodyParams.mustache b/modules/openapi-generator/src/main/resources/java-msf4j-server/bodyParams.mustache index 2b28441d3d054b8e1d9ab7c8ec56a2ca89d762ce..dd3506d206d3f413ee3d8b1387f31073dc59a3c9 100644 --- a/modules/openapi-generator/src/main/resources/java-msf4j-server/bodyParams.mustache +++ b/modules/openapi-generator/src/main/resources/java-msf4j-server/bodyParams.mustache @@ -1 +1 @@ -{{#isBodyParam}}@ApiParam(value = "{{{description}}}" {{#required}},required=true{{/required}}{{#allowableValues}}, {{> allowableValues }}{{/allowableValues}}{{#defaultValue}}, defaultValue="{{{defaultValue}}}"{{/defaultValue}}) {{{dataType}}} {{paramName}}{{/isBodyParam}} \ No newline at end of file +{{#isBodyParam}}@ApiParam(value = "{{{description}}}" {{#required}},required=true{{/required}}{{#allowableValues}}, {{> allowableValues }}{{/allowableValues}}{{#defaultValue}}, defaultValue="{{{.}}}"{{/defaultValue}}) {{{dataType}}} {{paramName}}{{/isBodyParam}} \ No newline at end of file diff --git a/modules/openapi-generator/src/main/resources/java-msf4j-server/enumClass.mustache b/modules/openapi-generator/src/main/resources/java-msf4j-server/enumClass.mustache index 49f3cb7922bc999b58f315223d1ec4ce407d03f7..27e8d1254fed1e955c79b9e6b3c24b2b6b848995 100644 --- a/modules/openapi-generator/src/main/resources/java-msf4j-server/enumClass.mustache +++ b/modules/openapi-generator/src/main/resources/java-msf4j-server/enumClass.mustache @@ -1,7 +1,7 @@ /** - * {{^description}}Gets or Sets {{{name}}}{{/description}}{{#description}}{{{description}}}{{/description}} + * {{^description}}Gets or Sets {{{name}}}{{/description}}{{{description}}} */ - {{>additionalEnumTypeAnnotations}}public enum {{#datatypeWithEnum}}{{{.}}}{{/datatypeWithEnum}}{{^datatypeWithEnum}}{{classname}}{{/datatypeWithEnum}} { + {{>additionalEnumTypeAnnotations}}public enum {{{datatypeWithEnum}}}{{^datatypeWithEnum}}{{classname}}{{/datatypeWithEnum}} { {{#gson}} {{#allowableValues}} {{#enumVars}} @@ -22,7 +22,7 @@ private {{{dataType}}} value; - {{#datatypeWithEnum}}{{{.}}}{{/datatypeWithEnum}}{{^datatypeWithEnum}}{{classname}}{{/datatypeWithEnum}}({{{dataType}}} value) { + {{{datatypeWithEnum}}}{{^datatypeWithEnum}}{{classname}}{{/datatypeWithEnum}}({{{dataType}}} value) { this.value = value; } @@ -33,8 +33,8 @@ } @JsonCreator - public static {{#datatypeWithEnum}}{{{.}}}{{/datatypeWithEnum}}{{^datatypeWithEnum}}{{{classname}}}{{/datatypeWithEnum}} fromValue(String text) { - for ({{#datatypeWithEnum}}{{{.}}}{{/datatypeWithEnum}}{{^datatypeWithEnum}}{{{classname}}}{{/datatypeWithEnum}} b : {{#datatypeWithEnum}}{{{.}}}{{/datatypeWithEnum}}{{^datatypeWithEnum}}{{{classname}}}{{/datatypeWithEnum}}.values()) { + public static {{{datatypeWithEnum}}}{{^datatypeWithEnum}}{{{classname}}}{{/datatypeWithEnum}} fromValue(String text) { + for ({{{datatypeWithEnum}}}{{^datatypeWithEnum}}{{{classname}}}{{/datatypeWithEnum}} b : {{{datatypeWithEnum}}}{{^datatypeWithEnum}}{{{classname}}}{{/datatypeWithEnum}}.values()) { if (String.valueOf(b.value).equals(text)) { return b; } diff --git a/modules/openapi-generator/src/main/resources/java-msf4j-server/enumOuterClass.mustache b/modules/openapi-generator/src/main/resources/java-msf4j-server/enumOuterClass.mustache index 123ccb2ca6a2a46eafb766f8e7e2c227d9250418..2832cfa539363389bc6da1ce134255dd88438d95 100644 --- a/modules/openapi-generator/src/main/resources/java-msf4j-server/enumOuterClass.mustache +++ b/modules/openapi-generator/src/main/resources/java-msf4j-server/enumOuterClass.mustache @@ -3,9 +3,9 @@ import com.fasterxml.jackson.annotation.JsonCreator; {{/jackson}} /** - * {{^description}}Gets or Sets {{{name}}}{{/description}}{{#description}}{{{description}}}{{/description}} + * {{^description}}Gets or Sets {{{name}}}{{/description}}{{{description}}} */ -{{>additionalEnumTypeAnnotations}}public enum {{#datatypeWithEnum}}{{{.}}}{{/datatypeWithEnum}}{{^datatypeWithEnum}}{{{classname}}}{{/datatypeWithEnum}} { +{{>additionalEnumTypeAnnotations}}public enum {{{datatypeWithEnum}}}{{^datatypeWithEnum}}{{{classname}}}{{/datatypeWithEnum}} { {{#gson}} {{#allowableValues}}{{#enumVars}} @SerializedName({{#isInteger}}"{{/isInteger}}{{#isDouble}}"{{/isDouble}}{{#isLong}}"{{/isLong}}{{#isFloat}}"{{/isFloat}}{{{value}}}{{#isInteger}}"{{/isInteger}}{{#isDouble}}"{{/isDouble}}{{#isLong}}"{{/isLong}}{{#isFloat}}"{{/isFloat}}) @@ -20,7 +20,7 @@ import com.fasterxml.jackson.annotation.JsonCreator; private {{{dataType}}} value; - {{#datatypeWithEnum}}{{{.}}}{{/datatypeWithEnum}}{{^datatypeWithEnum}}{{{classname}}}{{/datatypeWithEnum}}({{{dataType}}} value) { + {{{datatypeWithEnum}}}{{^datatypeWithEnum}}{{{classname}}}{{/datatypeWithEnum}}({{{dataType}}} value) { this.value = value; } @@ -31,8 +31,8 @@ import com.fasterxml.jackson.annotation.JsonCreator; } @JsonCreator - public static {{#datatypeWithEnum}}{{{.}}}{{/datatypeWithEnum}}{{^datatypeWithEnum}}{{{classname}}}{{/datatypeWithEnum}} fromValue(String text) { - for ({{#datatypeWithEnum}}{{{.}}}{{/datatypeWithEnum}}{{^datatypeWithEnum}}{{{classname}}}{{/datatypeWithEnum}} b : {{#datatypeWithEnum}}{{{.}}}{{/datatypeWithEnum}}{{^datatypeWithEnum}}{{{classname}}}{{/datatypeWithEnum}}.values()) { + public static {{{datatypeWithEnum}}}{{^datatypeWithEnum}}{{{classname}}}{{/datatypeWithEnum}} fromValue(String text) { + for ({{{datatypeWithEnum}}}{{^datatypeWithEnum}}{{{classname}}}{{/datatypeWithEnum}} b : {{{datatypeWithEnum}}}{{^datatypeWithEnum}}{{{classname}}}{{/datatypeWithEnum}}.values()) { if (String.valueOf(b.value).equals(text)) { return b; } diff --git a/modules/openapi-generator/src/main/resources/java-msf4j-server/formParams.mustache b/modules/openapi-generator/src/main/resources/java-msf4j-server/formParams.mustache index f7d110045892911c51c73d21eaae8bcaad954ba8..0cfd2a3a7834c55d04c85eb70fd8ccce2dc340b7 100644 --- a/modules/openapi-generator/src/main/resources/java-msf4j-server/formParams.mustache +++ b/modules/openapi-generator/src/main/resources/java-msf4j-server/formParams.mustache @@ -1,3 +1,3 @@ -{{#isFormParam}}{{^isFile}}@ApiParam(value = "{{{description}}}"{{#required}}, required=true{{/required}}{{#allowableValues}}, {{> allowableValues }}{{/allowableValues}}{{#defaultValue}}, defaultValue="{{{defaultValue}}}"{{/defaultValue}}){{#vendorExtensions.x-multipart}}@FormDataParam("{{baseName}}") {{{dataType}}} {{paramName}}{{/vendorExtensions.x-multipart}}{{^vendorExtensions.x-multipart}} {{#defaultValue}} @DefaultValue("{{{defaultValue}}}"){{/defaultValue}} @FormParam("{{baseName}}") {{{dataType}}} {{paramName}}{{/vendorExtensions.x-multipart}}{{/isFile}}{{#isFile}} +{{#isFormParam}}{{^isFile}}@ApiParam(value = "{{{description}}}"{{#required}}, required=true{{/required}}{{#allowableValues}}, {{> allowableValues }}{{/allowableValues}}{{#defaultValue}}, defaultValue="{{{.}}}"{{/defaultValue}}){{#vendorExtensions.x-multipart}}@FormDataParam("{{baseName}}") {{{dataType}}} {{paramName}}{{/vendorExtensions.x-multipart}}{{^vendorExtensions.x-multipart}} {{#defaultValue}} @DefaultValue("{{{.}}}"){{/defaultValue}} @FormParam("{{baseName}}") {{{dataType}}} {{paramName}}{{/vendorExtensions.x-multipart}}{{/isFile}}{{#isFile}} @FormDataParam("{{baseName}}") InputStream {{paramName}}InputStream, @FormDataParam("{{baseName}}") FileInfo {{paramName}}Detail{{/isFile}}{{/isFormParam}} diff --git a/modules/openapi-generator/src/main/resources/java-msf4j-server/headerParams.mustache b/modules/openapi-generator/src/main/resources/java-msf4j-server/headerParams.mustache index 1360d796826b6dbfffdfba7bd3618885d5f112e9..59bc493825173d3934daf641937fe84c1058f12d 100644 --- a/modules/openapi-generator/src/main/resources/java-msf4j-server/headerParams.mustache +++ b/modules/openapi-generator/src/main/resources/java-msf4j-server/headerParams.mustache @@ -1 +1 @@ -{{#isHeaderParam}}@ApiParam(value = "{{{description}}}" {{#required}},required=true{{/required}}{{#allowableValues}}, {{> allowableValues }}{{/allowableValues}}{{#defaultValue}}, defaultValue="{{{defaultValue}}}"{{/defaultValue}})@HeaderParam("{{baseName}}") {{{dataType}}} {{paramName}}{{/isHeaderParam}} \ No newline at end of file +{{#isHeaderParam}}@ApiParam(value = "{{{description}}}" {{#required}},required=true{{/required}}{{#allowableValues}}, {{> allowableValues }}{{/allowableValues}}{{#defaultValue}}, defaultValue="{{{.}}}"{{/defaultValue}})@HeaderParam("{{baseName}}") {{{dataType}}} {{paramName}}{{/isHeaderParam}} \ No newline at end of file diff --git a/modules/openapi-generator/src/main/resources/java-msf4j-server/pathParams.mustache b/modules/openapi-generator/src/main/resources/java-msf4j-server/pathParams.mustache index 8d80210b4b4115e36643057eeb2bb71caa2dc212..4c81942177d4dd2043b2cd9980a38db8728528d4 100644 --- a/modules/openapi-generator/src/main/resources/java-msf4j-server/pathParams.mustache +++ b/modules/openapi-generator/src/main/resources/java-msf4j-server/pathParams.mustache @@ -1 +1 @@ -{{#isPathParam}}@ApiParam(value = "{{{description}}}"{{#required}},required=true{{/required}}{{#allowableValues}}, {{> allowableValues }}{{/allowableValues}}{{#defaultValue}}, defaultValue="{{{defaultValue}}}"{{/defaultValue}}) @PathParam("{{baseName}}") {{{dataType}}} {{paramName}}{{/isPathParam}} \ No newline at end of file +{{#isPathParam}}@ApiParam(value = "{{{description}}}"{{#required}},required=true{{/required}}{{#allowableValues}}, {{> allowableValues }}{{/allowableValues}}{{#defaultValue}}, defaultValue="{{{.}}}"{{/defaultValue}}) @PathParam("{{baseName}}") {{{dataType}}} {{paramName}}{{/isPathParam}} \ No newline at end of file diff --git a/modules/openapi-generator/src/main/resources/java-msf4j-server/pojo.mustache b/modules/openapi-generator/src/main/resources/java-msf4j-server/pojo.mustache index 885f012921f1f1e176b3b50bf6a834e618d6b828..6099150c836731d855fa3d665ea10ed2798fac98 100644 --- a/modules/openapi-generator/src/main/resources/java-msf4j-server/pojo.mustache +++ b/modules/openapi-generator/src/main/resources/java-msf4j-server/pojo.mustache @@ -1,9 +1,9 @@ /** - * {{#description}}{{.}}{{/description}}{{^description}}{{classname}}{{/description}} + * {{description}}{{^description}}{{classname}}{{/description}} */{{#description}} -@ApiModel(description = "{{{description}}}"){{/description}} +@ApiModel(description = "{{{.}}}"){{/description}} {{>additionalModelTypeAnnotations}}{{>generatedAnnotation}} -public class {{classname}} {{#parent}}extends {{{parent}}}{{/parent}} {{#serializableModel}}implements Serializable{{/serializableModel}} { +public class {{classname}} {{#parent}}extends {{{.}}}{{/parent}} {{#serializableModel}}implements Serializable{{/serializableModel}} { {{#vars}} {{#isEnum}} {{^isContainer}} @@ -11,7 +11,7 @@ public class {{classname}} {{#parent}}extends {{{parent}}}{{/parent}} {{#seriali {{/isContainer}} {{#isContainer}} {{#mostInnerItems}} -{{>enumClass}} +{{>enumClass}} {{/mostInnerItems}} {{/isContainer}} {{/isEnum}} @@ -63,23 +63,23 @@ public class {{classname}} {{#parent}}extends {{{parent}}}{{/parent}} {{#seriali {{/isReadOnly}} /** {{#description}} - * {{{description}}} + * {{{.}}} {{/description}} {{^description}} * Get {{name}} {{/description}} {{#minimum}} - * minimum: {{minimum}} + * minimum: {{.}} {{/minimum}} {{#maximum}} - * maximum: {{maximum}} + * maximum: {{.}} {{/maximum}} * @return {{name}} **/ {{#vendorExtensions.x-extra-annotation}} {{{vendorExtensions.x-extra-annotation}}} {{/vendorExtensions.x-extra-annotation}} - @ApiModelProperty({{#example}}example = "{{{example}}}", {{/example}}{{#required}}required = {{required}}, {{/required}}value = "{{{description}}}") + @ApiModelProperty({{#example}}example = "{{{.}}}", {{/example}}{{#required}}required = {{required}}, {{/required}}value = "{{{description}}}") public {{{datatypeWithEnum}}} {{getter}}() { return {{name}}; } diff --git a/modules/openapi-generator/src/main/resources/java-msf4j-server/pom.mustache b/modules/openapi-generator/src/main/resources/java-msf4j-server/pom.mustache index fb0bb3ca7ebb017c8448027265641b94828ca1d6..60c5a11683e22eb16e3d8fca7e8b2af73a791791 100644 --- a/modules/openapi-generator/src/main/resources/java-msf4j-server/pom.mustache +++ b/modules/openapi-generator/src/main/resources/java-msf4j-server/pom.mustache @@ -3,7 +3,7 @@ <groupId>org.wso2.msf4j</groupId> <artifactId>msf4j-service</artifactId> <version>2.6.4</version> - </parent> + </parent> <modelVersion>4.0.0</modelVersion> <groupId>{{groupId}}</groupId> <artifactId>{{artifactId}}</artifactId> diff --git a/modules/openapi-generator/src/main/resources/java-msf4j-server/queryParams.mustache b/modules/openapi-generator/src/main/resources/java-msf4j-server/queryParams.mustache index 51531c4d34510799ebcb55a4779a791fdbe472a6..e5349e1f68381eabb517abf611f7e44dab949fec 100644 --- a/modules/openapi-generator/src/main/resources/java-msf4j-server/queryParams.mustache +++ b/modules/openapi-generator/src/main/resources/java-msf4j-server/queryParams.mustache @@ -1 +1 @@ -{{#isQueryParam}}@ApiParam(value = "{{{description}}}"{{#required}},required=true{{/required}}{{#allowableValues}}, {{> allowableValues }}{{/allowableValues}}{{^isContainer}}{{#defaultValue}}, defaultValue="{{{defaultValue}}}"{{/defaultValue}}{{/isContainer}}){{^isContainer}}{{#defaultValue}} @DefaultValue("{{{defaultValue}}}"){{/defaultValue}}{{/isContainer}} @QueryParam("{{baseName}}") {{{dataType}}} {{paramName}}{{/isQueryParam}} \ No newline at end of file +{{#isQueryParam}}@ApiParam(value = "{{{description}}}"{{#required}},required=true{{/required}}{{#allowableValues}}, {{> allowableValues }}{{/allowableValues}}{{^isContainer}}{{#defaultValue}}, defaultValue="{{{.}}}"{{/defaultValue}}{{/isContainer}}){{^isContainer}}{{#defaultValue}} @DefaultValue("{{{.}}}"){{/defaultValue}}{{/isContainer}} @QueryParam("{{baseName}}") {{{dataType}}} {{paramName}}{{/isQueryParam}} \ No newline at end of file diff --git a/modules/openapi-generator/src/main/resources/java-pkmst/SpringBootApplication.mustache b/modules/openapi-generator/src/main/resources/java-pkmst/SpringBootApplication.mustache index 30ef294c8b26794b75da21414b20205895e229ce..eb3200d8c0425c638986c6748f2257bb11f99291 100644 --- a/modules/openapi-generator/src/main/resources/java-pkmst/SpringBootApplication.mustache +++ b/modules/openapi-generator/src/main/resources/java-pkmst/SpringBootApplication.mustache @@ -16,7 +16,7 @@ import springfox.documentation.swagger2.annotations.EnableSwagger2; * @author pkmst * */ - + @SpringBootApplication @EnableSwagger2 {{#eurekaUri}} @@ -33,4 +33,3 @@ public class {{serviceName}}Application { SpringApplication.run({{serviceName}}Application.class, args); } } - diff --git a/modules/openapi-generator/src/main/resources/java-pkmst/api.mustache b/modules/openapi-generator/src/main/resources/java-pkmst/api.mustache index f2abfbf4119e220bae4ed29f9f2d1d8bdd0d93e8..853bd61f06dbf72b2293bea73678054a6ab856b7 100644 --- a/modules/openapi-generator/src/main/resources/java-pkmst/api.mustache +++ b/modules/openapi-generator/src/main/resources/java-pkmst/api.mustache @@ -42,14 +42,14 @@ import javax.validation.Valid; public interface {{classname}} { {{#operation}} - @ApiOperation(value = "{{{summary}}}", notes = "{{{notes}}}", response = {{{returnType}}}.class{{#returnContainer}}, responseContainer = "{{{returnContainer}}}"{{/returnContainer}}{{#hasAuthMethods}}, authorizations = { + @ApiOperation(value = "{{{summary}}}", notes = "{{{notes}}}", response = {{{returnType}}}.class{{#returnContainer}}, responseContainer = "{{{.}}}"{{/returnContainer}}{{#hasAuthMethods}}, authorizations = { {{#authMethods}}{{#isOAuth}}@Authorization(value = "{{name}}", scopes = { {{#scopes}}@AuthorizationScope(scope = "{{scope}}", description = "{{description}}"){{^-last}}, {{/-last}}{{/scopes}} }){{^-last}},{{/-last}}{{/isOAuth}} {{^isOAuth}}@Authorization(value = "{{name}}"){{^-last}},{{/-last}} {{/isOAuth}}{{/authMethods}} }{{/hasAuthMethods}}, tags={ {{#vendorExtensions.x-tags}}"{{tag}}",{{/vendorExtensions.x-tags}} }) @ApiResponses(value = { {{#responses}} - @ApiResponse(code = {{{code}}}, message = "{{{message}}}"{{#baseType}}, response = {{{baseType}}}.class{{/baseType}}{{#containerType}}, responseContainer = "{{{containerType}}}"{{/containerType}}){{^-last}},{{/-last}}{{/responses}} }) + @ApiResponse(code = {{{code}}}, message = "{{{message}}}"{{#baseType}}, response = {{{.}}}.class{{/baseType}}{{#containerType}}, responseContainer = "{{{.}}}"{{/containerType}}){{^-last}},{{/-last}}{{/responses}} }) {{#implicitHeaders}} @ApiImplicitParams({ {{#headerParams}}{{>implicitHeader}}{{/headerParams}} diff --git a/modules/openapi-generator/src/main/resources/java-pkmst/bodyParams.mustache b/modules/openapi-generator/src/main/resources/java-pkmst/bodyParams.mustache index 066600c49fc872676d4c881c5495b8645ab685bb..ef90e62736212ef1571fe6c0abfeccf582b92d22 100644 --- a/modules/openapi-generator/src/main/resources/java-pkmst/bodyParams.mustache +++ b/modules/openapi-generator/src/main/resources/java-pkmst/bodyParams.mustache @@ -1 +1 @@ -{{#isBodyParam}}@ApiParam(value = "{{{description}}}" {{#required}},required=true{{/required}} {{^isContainer}}{{#allowableValues}}, allowableValues="{{{allowableValues}}}"{{/allowableValues}}{{#defaultValue}}, defaultValue="{{{defaultValue}}}"{{/defaultValue}}{{/isContainer}}) {{#useBeanValidation}}@Valid{{/useBeanValidation}} @RequestBody {{{dataType}}} {{paramName}}{{/isBodyParam}} \ No newline at end of file +{{#isBodyParam}}@ApiParam(value = "{{{description}}}" {{#required}},required=true{{/required}} {{^isContainer}}{{#allowableValues}}, allowableValues="{{{.}}}"{{/allowableValues}}{{#defaultValue}}, defaultValue="{{{.}}}"{{/defaultValue}}{{/isContainer}}) {{#useBeanValidation}}@Valid{{/useBeanValidation}} @RequestBody {{{dataType}}} {{paramName}}{{/isBodyParam}} \ No newline at end of file diff --git a/modules/openapi-generator/src/main/resources/java-pkmst/config/appconfig.mustache b/modules/openapi-generator/src/main/resources/java-pkmst/config/appconfig.mustache index d5c60cde0d8693d2dcdca7a8fb3e10f0aff71738..2766e347e4bfdd3727bae8ac6b8f066b09d87565 100644 --- a/modules/openapi-generator/src/main/resources/java-pkmst/config/appconfig.mustache +++ b/modules/openapi-generator/src/main/resources/java-pkmst/config/appconfig.mustache @@ -54,7 +54,7 @@ public class AppConfig extends WebMvcConfigurerAdapter { return new BodyInterceptor(); } - + @Override public void addInterceptors(InterceptorRegistry registry) { @@ -73,8 +73,8 @@ public class AppConfig extends WebMvcConfigurerAdapter { if (bodyEnable) { registry.addInterceptor(bodyInterceptor()); } - - + + } @@ -86,7 +86,7 @@ public class AppConfig extends WebMvcConfigurerAdapter { * .allowedHeaders("header1", "header2", "header3") * .exposedHeaders("header1", "header2") * .allowCredentials(false).maxAge(3600); - * + * * @return a new WebMvcConfigurer instance */ @Bean diff --git a/modules/openapi-generator/src/main/resources/java-pkmst/config/pkmstproperties.mustache b/modules/openapi-generator/src/main/resources/java-pkmst/config/pkmstproperties.mustache index 86554ed8cc8aa19533d3a40275328a17e1a05598..4a8152007fa930fb93b24ca91bb691ab52ca62b0 100644 --- a/modules/openapi-generator/src/main/resources/java-pkmst/config/pkmstproperties.mustache +++ b/modules/openapi-generator/src/main/resources/java-pkmst/config/pkmstproperties.mustache @@ -11,8 +11,8 @@ import org.springframework.context.annotation.Configuration; public class PkmstProperties { private final Swagger swagger = new Swagger(); - - + + public Swagger getSwagger() { return swagger; } diff --git a/modules/openapi-generator/src/main/resources/java-pkmst/enumClass.mustache b/modules/openapi-generator/src/main/resources/java-pkmst/enumClass.mustache index 49f3cb7922bc999b58f315223d1ec4ce407d03f7..27e8d1254fed1e955c79b9e6b3c24b2b6b848995 100644 --- a/modules/openapi-generator/src/main/resources/java-pkmst/enumClass.mustache +++ b/modules/openapi-generator/src/main/resources/java-pkmst/enumClass.mustache @@ -1,7 +1,7 @@ /** - * {{^description}}Gets or Sets {{{name}}}{{/description}}{{#description}}{{{description}}}{{/description}} + * {{^description}}Gets or Sets {{{name}}}{{/description}}{{{description}}} */ - {{>additionalEnumTypeAnnotations}}public enum {{#datatypeWithEnum}}{{{.}}}{{/datatypeWithEnum}}{{^datatypeWithEnum}}{{classname}}{{/datatypeWithEnum}} { + {{>additionalEnumTypeAnnotations}}public enum {{{datatypeWithEnum}}}{{^datatypeWithEnum}}{{classname}}{{/datatypeWithEnum}} { {{#gson}} {{#allowableValues}} {{#enumVars}} @@ -22,7 +22,7 @@ private {{{dataType}}} value; - {{#datatypeWithEnum}}{{{.}}}{{/datatypeWithEnum}}{{^datatypeWithEnum}}{{classname}}{{/datatypeWithEnum}}({{{dataType}}} value) { + {{{datatypeWithEnum}}}{{^datatypeWithEnum}}{{classname}}{{/datatypeWithEnum}}({{{dataType}}} value) { this.value = value; } @@ -33,8 +33,8 @@ } @JsonCreator - public static {{#datatypeWithEnum}}{{{.}}}{{/datatypeWithEnum}}{{^datatypeWithEnum}}{{{classname}}}{{/datatypeWithEnum}} fromValue(String text) { - for ({{#datatypeWithEnum}}{{{.}}}{{/datatypeWithEnum}}{{^datatypeWithEnum}}{{{classname}}}{{/datatypeWithEnum}} b : {{#datatypeWithEnum}}{{{.}}}{{/datatypeWithEnum}}{{^datatypeWithEnum}}{{{classname}}}{{/datatypeWithEnum}}.values()) { + public static {{{datatypeWithEnum}}}{{^datatypeWithEnum}}{{{classname}}}{{/datatypeWithEnum}} fromValue(String text) { + for ({{{datatypeWithEnum}}}{{^datatypeWithEnum}}{{{classname}}}{{/datatypeWithEnum}} b : {{{datatypeWithEnum}}}{{^datatypeWithEnum}}{{{classname}}}{{/datatypeWithEnum}}.values()) { if (String.valueOf(b.value).equals(text)) { return b; } diff --git a/modules/openapi-generator/src/main/resources/java-pkmst/enumOuterClass.mustache b/modules/openapi-generator/src/main/resources/java-pkmst/enumOuterClass.mustache index 123ccb2ca6a2a46eafb766f8e7e2c227d9250418..2832cfa539363389bc6da1ce134255dd88438d95 100644 --- a/modules/openapi-generator/src/main/resources/java-pkmst/enumOuterClass.mustache +++ b/modules/openapi-generator/src/main/resources/java-pkmst/enumOuterClass.mustache @@ -3,9 +3,9 @@ import com.fasterxml.jackson.annotation.JsonCreator; {{/jackson}} /** - * {{^description}}Gets or Sets {{{name}}}{{/description}}{{#description}}{{{description}}}{{/description}} + * {{^description}}Gets or Sets {{{name}}}{{/description}}{{{description}}} */ -{{>additionalEnumTypeAnnotations}}public enum {{#datatypeWithEnum}}{{{.}}}{{/datatypeWithEnum}}{{^datatypeWithEnum}}{{{classname}}}{{/datatypeWithEnum}} { +{{>additionalEnumTypeAnnotations}}public enum {{{datatypeWithEnum}}}{{^datatypeWithEnum}}{{{classname}}}{{/datatypeWithEnum}} { {{#gson}} {{#allowableValues}}{{#enumVars}} @SerializedName({{#isInteger}}"{{/isInteger}}{{#isDouble}}"{{/isDouble}}{{#isLong}}"{{/isLong}}{{#isFloat}}"{{/isFloat}}{{{value}}}{{#isInteger}}"{{/isInteger}}{{#isDouble}}"{{/isDouble}}{{#isLong}}"{{/isLong}}{{#isFloat}}"{{/isFloat}}) @@ -20,7 +20,7 @@ import com.fasterxml.jackson.annotation.JsonCreator; private {{{dataType}}} value; - {{#datatypeWithEnum}}{{{.}}}{{/datatypeWithEnum}}{{^datatypeWithEnum}}{{{classname}}}{{/datatypeWithEnum}}({{{dataType}}} value) { + {{{datatypeWithEnum}}}{{^datatypeWithEnum}}{{{classname}}}{{/datatypeWithEnum}}({{{dataType}}} value) { this.value = value; } @@ -31,8 +31,8 @@ import com.fasterxml.jackson.annotation.JsonCreator; } @JsonCreator - public static {{#datatypeWithEnum}}{{{.}}}{{/datatypeWithEnum}}{{^datatypeWithEnum}}{{{classname}}}{{/datatypeWithEnum}} fromValue(String text) { - for ({{#datatypeWithEnum}}{{{.}}}{{/datatypeWithEnum}}{{^datatypeWithEnum}}{{{classname}}}{{/datatypeWithEnum}} b : {{#datatypeWithEnum}}{{{.}}}{{/datatypeWithEnum}}{{^datatypeWithEnum}}{{{classname}}}{{/datatypeWithEnum}}.values()) { + public static {{{datatypeWithEnum}}}{{^datatypeWithEnum}}{{{classname}}}{{/datatypeWithEnum}} fromValue(String text) { + for ({{{datatypeWithEnum}}}{{^datatypeWithEnum}}{{{classname}}}{{/datatypeWithEnum}} b : {{{datatypeWithEnum}}}{{^datatypeWithEnum}}{{{classname}}}{{/datatypeWithEnum}}.values()) { if (String.valueOf(b.value).equals(text)) { return b; } diff --git a/modules/openapi-generator/src/main/resources/java-pkmst/formParams.mustache b/modules/openapi-generator/src/main/resources/java-pkmst/formParams.mustache index 62ac260ef49ad5d339ae48278734493f3614b94b..543be28d641d298a1d0b26deb0ae43faa52785ee 100644 --- a/modules/openapi-generator/src/main/resources/java-pkmst/formParams.mustache +++ b/modules/openapi-generator/src/main/resources/java-pkmst/formParams.mustache @@ -1 +1 @@ -{{#isFormParam}}{{^isFile}}@ApiParam(value = "{{{description}}}"{{#required}}, required=true{{/required}}{{#allowableValues}}, allowableValues="{{#values}}{{{.}}}{{^-last}}, {{/-last}}{{#-last}}{{/-last}}{{/values}}"{{/allowableValues}}{{#defaultValue}}, defaultValue="{{{defaultValue}}}"{{/defaultValue}}) @RequestPart(value="{{baseName}}"{{#required}}, required=true{{/required}}{{^required}}, required=false{{/required}}) {{{dataType}}} {{paramName}}{{/isFile}}{{#isFile}}@ApiParam(value = "file detail") {{#useBeanValidation}}@Valid{{/useBeanValidation}} @RequestPart("file") MultipartFile {{baseName}}{{/isFile}}{{/isFormParam}} \ No newline at end of file +{{#isFormParam}}{{^isFile}}@ApiParam(value = "{{{description}}}"{{#required}}, required=true{{/required}}{{#allowableValues}}, allowableValues="{{#values}}{{{.}}}{{^-last}}, {{/-last}}{{#-last}}{{/-last}}{{/values}}"{{/allowableValues}}{{#defaultValue}}, defaultValue="{{{.}}}"{{/defaultValue}}) @RequestPart(value="{{baseName}}"{{#required}}, required=true{{/required}}{{^required}}, required=false{{/required}}) {{{dataType}}} {{paramName}}{{/isFile}}{{#isFile}}@ApiParam(value = "file detail") {{#useBeanValidation}}@Valid{{/useBeanValidation}} @RequestPart("file") MultipartFile {{baseName}}{{/isFile}}{{/isFormParam}} \ No newline at end of file diff --git a/modules/openapi-generator/src/main/resources/java-pkmst/gatling/testapi.mustache b/modules/openapi-generator/src/main/resources/java-pkmst/gatling/testapi.mustache index ef5163aa92976c90a458501c4500d85f0e64b543..a43be9c2269da93d0cca9bbb8452847f1d68e41b 100644 --- a/modules/openapi-generator/src/main/resources/java-pkmst/gatling/testapi.mustache +++ b/modules/openapi-generator/src/main/resources/java-pkmst/gatling/testapi.mustache @@ -11,12 +11,12 @@ import org.springframework.context.ConfigurableApplicationContext class get{{path}} extends Simulation { - + val app: ConfigurableApplicationContext = SpringApplication.run(classOf[{{basePackage}}.{{serviceName}}Application]) Runtime.getRuntime.addShutdownHook(new Thread() { override def run(): Unit = app.stop() }) - + val conf = ConfigFactory.load() val baseUrl = conf.getString("url") val noOfUsers: Int = conf.getInt("noOfUsers") diff --git a/modules/openapi-generator/src/main/resources/java-pkmst/headerParams.mustache b/modules/openapi-generator/src/main/resources/java-pkmst/headerParams.mustache index 89645c9436ac9eeaa8b381f7dd3d3fd482bbf3cb..36ba6c5b6729a54539a07a2505673a1f0003481d 100644 --- a/modules/openapi-generator/src/main/resources/java-pkmst/headerParams.mustache +++ b/modules/openapi-generator/src/main/resources/java-pkmst/headerParams.mustache @@ -1 +1 @@ -{{#isHeaderParam}}@ApiParam(value = "{{{description}}}" {{#required}},required=true{{/required}}{{#allowableValues}}, allowableValues="{{#values}}{{{.}}}{{^-last}}, {{/-last}}{{#-last}}{{/-last}}{{/values}}"{{/allowableValues}}{{#defaultValue}}, defaultValue="{{{defaultValue}}}"{{/defaultValue}}) @RequestHeader(value="{{baseName}}", required={{#required}}true{{/required}}{{^required}}false{{/required}}) {{>optionalDataType}} {{paramName}}{{/isHeaderParam}} \ No newline at end of file +{{#isHeaderParam}}@ApiParam(value = "{{{description}}}" {{#required}},required=true{{/required}}{{#allowableValues}}, allowableValues="{{#values}}{{{.}}}{{^-last}}, {{/-last}}{{#-last}}{{/-last}}{{/values}}"{{/allowableValues}}{{#defaultValue}}, defaultValue="{{{.}}}"{{/defaultValue}}) @RequestHeader(value="{{baseName}}", required={{#required}}true{{/required}}{{^required}}false{{/required}}) {{>optionalDataType}} {{paramName}}{{/isHeaderParam}} \ No newline at end of file diff --git a/modules/openapi-generator/src/main/resources/java-pkmst/licenseInfo.mustache b/modules/openapi-generator/src/main/resources/java-pkmst/licenseInfo.mustache index abc2f4578eb3a74da1c599037f36320cce106881..c66209f27947736c332b626a6f2fbf0789f4b98d 100644 --- a/modules/openapi-generator/src/main/resources/java-pkmst/licenseInfo.mustache +++ b/modules/openapi-generator/src/main/resources/java-pkmst/licenseInfo.mustache @@ -2,8 +2,8 @@ * {{{appName}}} * {{{appDescription}}} * - * {{#version}}The version of the OpenAPI document: {{{version}}}{{/version}} - * {{#infoEmail}}Contact: {{{infoEmail}}}{{/infoEmail}} + * {{#version}}The version of the OpenAPI document: {{{.}}}{{/version}} + * {{#infoEmail}}Contact: {{{.}}}{{/infoEmail}} * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech diff --git a/modules/openapi-generator/src/main/resources/java-pkmst/logging/httpLoggingFilter.mustache b/modules/openapi-generator/src/main/resources/java-pkmst/logging/httpLoggingFilter.mustache index 28cd309952d687878173446514002063d85add53..b59de5c2d3b776954ce0ce49263ea58a7669da82 100644 --- a/modules/openapi-generator/src/main/resources/java-pkmst/logging/httpLoggingFilter.mustache +++ b/modules/openapi-generator/src/main/resources/java-pkmst/logging/httpLoggingFilter.mustache @@ -84,7 +84,7 @@ public class HttpLoggingFilter implements Filter { String urlPath = httpServletRequest.getRequestURL().toString(); if (! ( Arrays.stream(nonLoggingPaths).parallel().anyMatch(urlPath::contains) )){ log.info(logMessage.toString()); - } + } } catch (Throwable a) { log.error(a.getMessage()); a.printStackTrace(); diff --git a/modules/openapi-generator/src/main/resources/java-pkmst/logstash.mustache b/modules/openapi-generator/src/main/resources/java-pkmst/logstash.mustache index 491be1e7f7cbb7db4ef74655055527a30ad47ed0..7bda8e38abc3b2ae22d475053efe77a0d1e8feeb 100644 --- a/modules/openapi-generator/src/main/resources/java-pkmst/logstash.mustache +++ b/modules/openapi-generator/src/main/resources/java-pkmst/logstash.mustache @@ -2,7 +2,7 @@ input { file { path => "" start_position => "beginning" - + } } @@ -10,14 +10,14 @@ input { filter { # pattern matching logback pattern grok { - + } - - + + } - - - + + + } output { diff --git a/modules/openapi-generator/src/main/resources/java-pkmst/manifest.mustache b/modules/openapi-generator/src/main/resources/java-pkmst/manifest.mustache index 2d27f25bace57bd319818a4f6e801a8fc96c8862..78100f1b6a3d2a3435b8126c9fcdb96c50c9fb10 100644 --- a/modules/openapi-generator/src/main/resources/java-pkmst/manifest.mustache +++ b/modules/openapi-generator/src/main/resources/java-pkmst/manifest.mustache @@ -6,7 +6,6 @@ applications: buildpack: https://github.com/cloudfoundry/java-buildpack.git path: services: - - - - + - + - env: - \ No newline at end of file diff --git a/modules/openapi-generator/src/main/resources/java-pkmst/pathParams.mustache b/modules/openapi-generator/src/main/resources/java-pkmst/pathParams.mustache index 62342d01bfa9cab182142a0e8889035b7e3122ef..e3de39688e8d041228ee41e2220dd7672ee3fe80 100644 --- a/modules/openapi-generator/src/main/resources/java-pkmst/pathParams.mustache +++ b/modules/openapi-generator/src/main/resources/java-pkmst/pathParams.mustache @@ -1 +1 @@ -{{#isPathParam}}{{#useBeanValidation}}{{>beanValidationPathParams}}{{/useBeanValidation}}@ApiParam(value = "{{{description}}}"{{#required}},required=true{{/required}}{{#allowableValues}}, allowableValues="{{{allowableValues}}}"{{/allowableValues}} {{#defaultValue}}, defaultValue="{{{defaultValue}}}"{{/defaultValue}}) @PathVariable("{{baseName}}") {{>optionalDataType}} {{paramName}}{{/isPathParam}} \ No newline at end of file +{{#isPathParam}}{{#useBeanValidation}}{{>beanValidationPathParams}}{{/useBeanValidation}}@ApiParam(value = "{{{description}}}"{{#required}},required=true{{/required}}{{#allowableValues}}, allowableValues="{{{.}}}"{{/allowableValues}} {{#defaultValue}}, defaultValue="{{{.}}}"{{/defaultValue}}) @PathVariable("{{baseName}}") {{>optionalDataType}} {{paramName}}{{/isPathParam}} \ No newline at end of file diff --git a/modules/openapi-generator/src/main/resources/java-pkmst/pojo.mustache b/modules/openapi-generator/src/main/resources/java-pkmst/pojo.mustache index 5683fce60a752ce339d9d1b37fc1815900bc81c0..abb9a7799aab0f0f78e88d3f494e5d282aa936f0 100644 --- a/modules/openapi-generator/src/main/resources/java-pkmst/pojo.mustache +++ b/modules/openapi-generator/src/main/resources/java-pkmst/pojo.mustache @@ -1,10 +1,10 @@ /** - * {{#description}}{{.}}{{/description}}{{^description}}{{classname}}{{/description}} + * {{description}}{{^description}}{{classname}}{{/description}} */{{#description}} -@ApiModel(description = "{{{description}}}"){{/description}} +@ApiModel(description = "{{{.}}}"){{/description}} {{#useBeanValidation}}@Validated{{/useBeanValidation}} {{>generatedAnnotation}}{{#discriminator}}{{>typeInfoAnnotation}}{{/discriminator}}{{>xmlAnnotation}}{{>additionalModelTypeAnnotations}} -public class {{classname}} {{#parent}}extends {{{parent}}}{{/parent}} {{#serializableModel}}implements Serializable{{/serializableModel}} { +public class {{classname}} {{#parent}}extends {{{.}}}{{/parent}} {{#serializableModel}}implements Serializable{{/serializableModel}} { {{#serializableModel}} private static final long serialVersionUID = 1L; @@ -16,13 +16,13 @@ public class {{classname}} {{#parent}}extends {{{parent}}}{{/parent}} {{#seriali {{/isContainer}} {{#isContainer}} {{#mostInnerItems}} -{{>enumClass}} +{{>enumClass}} {{/mostInnerItems}} {{/isContainer}} {{/isEnum}} {{#jackson}} @JsonProperty("{{baseName}}"){{#withXml}} - @JacksonXmlProperty({{#isXmlAttribute}}isAttribute = true, {{/isXmlAttribute}}{{#xmlNamespace}}namespace="{{xmlNamespace}}", {{/xmlNamespace}}localName = "{{#xmlName}}{{xmlName}}{{/xmlName}}{{^xmlName}}{{baseName}}{{/xmlName}}"){{/withXml}} + @JacksonXmlProperty({{#isXmlAttribute}}isAttribute = true, {{/isXmlAttribute}}{{#xmlNamespace}}namespace="{{.}}", {{/xmlNamespace}}localName = "{{xmlName}}{{^xmlName}}{{baseName}}{{/xmlName}}"){{/withXml}} {{/jackson}} {{#gson}} @SerializedName("{{baseName}}") @@ -68,23 +68,23 @@ public class {{classname}} {{#parent}}extends {{{parent}}}{{/parent}} {{#seriali /** {{#description}} - * {{{description}}} + * {{{.}}} {{/description}} {{^description}} * Get {{name}} {{/description}} {{#minimum}} - * minimum: {{minimum}} + * minimum: {{.}} {{/minimum}} {{#maximum}} - * maximum: {{maximum}} + * maximum: {{.}} {{/maximum}} * @return {{name}} **/ {{#vendorExtensions.x-extra-annotation}} {{{vendorExtensions.x-extra-annotation}}} {{/vendorExtensions.x-extra-annotation}} - @ApiModelProperty({{#example}}example = "{{{example}}}", {{/example}}{{#required}}required = {{required}}, {{/required}}{{#isReadOnly}}readOnly = {{{isReadOnly}}}, {{/isReadOnly}}value = "{{{description}}}") + @ApiModelProperty({{#example}}example = "{{{.}}}", {{/example}}{{#required}}required = {{required}}, {{/required}}{{#isReadOnly}}readOnly = {{{isReadOnly}}}, {{/isReadOnly}}value = "{{{description}}}") {{#useBeanValidation}}{{>beanValidation}}{{/useBeanValidation}} public {{{datatypeWithEnum}}} {{getter}}() { return {{name}}; } diff --git a/modules/openapi-generator/src/main/resources/java-pkmst/queryParams.mustache b/modules/openapi-generator/src/main/resources/java-pkmst/queryParams.mustache index bf20ec8ad16c041fa16b26fcc7f5ee9011abe2ee..a06efa7ab272e5d6b4593d2486ef2f789ec289c8 100644 --- a/modules/openapi-generator/src/main/resources/java-pkmst/queryParams.mustache +++ b/modules/openapi-generator/src/main/resources/java-pkmst/queryParams.mustache @@ -1 +1 @@ -{{#isQueryParam}}{{#useBeanValidation}}{{>beanValidationQueryParams}}{{/useBeanValidation}}@ApiParam(value = "{{{description}}}"{{#required}}, required = true{{/required}}{{#allowableValues}}, allowableValues = "{{#values}}{{{.}}}{{^-last}}, {{/-last}}{{#-last}}{{/-last}}{{/values}}"{{/allowableValues}}{{^isContainer}}{{#defaultValue}}, defaultValue = "{{{defaultValue}}}"{{/defaultValue}}{{/isContainer}}) {{#useBeanValidation}}@Valid{{/useBeanValidation}} @RequestParam(value = "{{baseName}}"{{#required}}, required = true{{/required}}{{^required}}, required = false{{/required}}{{^isContainer}}{{#defaultValue}}, defaultValue="{{{defaultValue}}}"{{/defaultValue}}{{/isContainer}}) {{>optionalDataType}} {{paramName}}{{/isQueryParam}} \ No newline at end of file +{{#isQueryParam}}{{#useBeanValidation}}{{>beanValidationQueryParams}}{{/useBeanValidation}}@ApiParam(value = "{{{description}}}"{{#required}}, required = true{{/required}}{{#allowableValues}}, allowableValues = "{{#values}}{{{.}}}{{^-last}}, {{/-last}}{{#-last}}{{/-last}}{{/values}}"{{/allowableValues}}{{^isContainer}}{{#defaultValue}}, defaultValue = "{{{.}}}"{{/defaultValue}}{{/isContainer}}) {{#useBeanValidation}}@Valid{{/useBeanValidation}} @RequestParam(value = "{{baseName}}"{{#required}}, required = true{{/required}}{{^required}}, required = false{{/required}}{{^isContainer}}{{#defaultValue}}, defaultValue="{{{.}}}"{{/defaultValue}}{{/isContainer}}) {{>optionalDataType}} {{paramName}}{{/isQueryParam}} \ No newline at end of file diff --git a/modules/openapi-generator/src/main/resources/java-pkmst/readme.mustache b/modules/openapi-generator/src/main/resources/java-pkmst/readme.mustache index 9867e11590b6f0e3b93faa56989112dc35d91c7b..f15bc660fd2e223ffe59340ca0eb3976494280f0 100644 --- a/modules/openapi-generator/src/main/resources/java-pkmst/readme.mustache +++ b/modules/openapi-generator/src/main/resources/java-pkmst/readme.mustache @@ -1,4 +1,4 @@ -Dear Reader : Thanks for selecting PKMST swagger code generation toolkit for starting your microservice journey. +Dear Reader : Thanks for selecting PKMST swagger code generation toolkit for starting your microservice journey. We believe the hard work we put into this framework will help you kick start your journey sooner and you will find it easy to scale your service to enterprise grade. Another great thing is you don't need to enable all capabilities as you start, but can enable as your microservice capabilities needs to be extended to meet strict enterprise standards. @@ -20,14 +20,14 @@ i)Allow you to configure Oauth2 security based authorization for your microservi Additional Features j)generate sample cucumber file and dependency to drive your Behaviour driven development. k)generate gatling based performance test, which can be excuted via build pipeline like jenkins etc. - - + + Working: Using OpenAPI specification you can convert any definition to spring boot microservice. It has the integration with the below services: eureka registry, zipkin , spring boot admin, circuit breaker. -By default only the circuit breaker annotation is enabled. But one has to write the fallback method. The needed dependency for it is also been enabled. To generate the integration and +By default only the circuit breaker annotation is enabled. But one has to write the fallback method. The needed dependency for it is also been enabled. To generate the integration and related configuration for eureka, zipkin, spring boot admin one has two options: 1) When generating from UI one has to provide vendor extensions inside the OpenAPI specification as below: @@ -42,7 +42,7 @@ info: zipkinUri: "http://localhost:9411" springBootAdminUri: "http://localhost:8000" pkmstInterceptor: "true" - + PLease note the vendor extensions are inside the info tag of the OpenAPI specification. All the tags are case sensitive. Once given all the related configuration and the dependency will be enabled. @@ -64,14 +64,14 @@ inside the openapi generator maven plugin under the configuration section <springBootAdminUri>http://localhost:4588</springBootAdminUri> <pkmstInterceptor>true</pkmstInterceptor> </configOptions> - </configuration> - + </configuration> + The project has three profiles local, dev, dev-config which can be configured accordingly. Once you have provided the uris you can see the necessary configurations generated inside the local and the dev yml files. dev-config is for the config server if you want to use.(also enable the dependency for the config server inside the pom) - + [Note: one has to run the zipkin, eureka, spring boot admin servers to be able to connect from the app. This project assumes that you have all the servers up and running.] - + Also provided are the middleware handlers: 1) traceInterceptor:is an id passed in from client and will be unique with an application context. The id will be passed into the backend and return to the consumer for transaction tracing. @@ -86,7 +86,7 @@ inside the openapi generator maven plugin under the configuration section To be able to generate the handlers and the necessary configurations one has to provide the pkmstInterceptor key inside the vendor extensions or through the maven plugin. -Once provided all the handlers are registered in the interceptor registry and can be enabled or disabled through the configuration provided inside +Once provided all the handlers are registered in the interceptor registry and can be enabled or disabled through the configuration provided inside the application yml as below: interceptor: enable: @@ -94,9 +94,9 @@ interceptor: body: true rateLimit: true traceability: true - correlation: true - -For testing we have placeholders for junit test class, integration test class, cucumber sample + correlation: true + +For testing we have placeholders for junit test class, integration test class, cucumber sample feature file(implement according to your needs), gatling load test. Logstash: Logstash is a tool to collect, process, and forward events and log messages.Sample Logstash configuration file provided that developer can configure to collect wide variety of data.Logstash can dynamically unify data from disparate sources and normalize the data into destinations of their choice. diff --git a/modules/openapi-generator/src/main/resources/java-pkmst/resources/application-dev-config.mustache b/modules/openapi-generator/src/main/resources/java-pkmst/resources/application-dev-config.mustache index 79292387bb54c36dec005746779d5cfc2ecb794e..9aadf097b0d8c05588290d80182df8e8bfb06ec5 100644 --- a/modules/openapi-generator/src/main/resources/java-pkmst/resources/application-dev-config.mustache +++ b/modules/openapi-generator/src/main/resources/java-pkmst/resources/application-dev-config.mustache @@ -1,4 +1,4 @@ -#Enable cloud config. Also enable the dependency in pom +#Enable cloud config. Also enable the dependency in pom #cloud: #config: #uri: {{configUri}} diff --git a/modules/openapi-generator/src/main/resources/java-pkmst/resources/application-dev.mustache b/modules/openapi-generator/src/main/resources/java-pkmst/resources/application-dev.mustache index a8ad3b2a0a71ed6cfa0b91f5a7deb1b45b77da37..0c39aa792522857113d3c5058512b456a4e70613 100644 --- a/modules/openapi-generator/src/main/resources/java-pkmst/resources/application-dev.mustache +++ b/modules/openapi-generator/src/main/resources/java-pkmst/resources/application-dev.mustache @@ -55,7 +55,7 @@ spring: port: {{#zipkinUri}} zipkin: - base-url: {{zipkinUri}} + base-url: {{.}} {{/zipkinUri}} {{#springBootAdminUri}} diff --git a/modules/openapi-generator/src/main/resources/java-pkmst/resources/application-local.mustache b/modules/openapi-generator/src/main/resources/java-pkmst/resources/application-local.mustache index b8025d85db22745fbf9f86548de2180686ed5e06..fc05837af2039f77f306016a1b6e11d0d1b0396f 100644 --- a/modules/openapi-generator/src/main/resources/java-pkmst/resources/application-local.mustache +++ b/modules/openapi-generator/src/main/resources/java-pkmst/resources/application-local.mustache @@ -55,7 +55,7 @@ spring: port: {{#zipkinUri}} zipkin: - base-url: {{zipkinUri}} + base-url: {{.}} {{/zipkinUri}} {{#springBootAdminUri}} @@ -76,7 +76,7 @@ logging: springframework: cloud: sleuth: DEBUG -{{#pkmstInterceptor}} +{{#pkmstInterceptor}} interceptor: enable: audit: true @@ -84,4 +84,4 @@ interceptor: rateLimit: true traceability: true correlation: true -{{/pkmstInterceptor}} \ No newline at end of file +{{/pkmstInterceptor}} \ No newline at end of file diff --git a/modules/openapi-generator/src/main/resources/java-pkmst/resources/application.mustache b/modules/openapi-generator/src/main/resources/java-pkmst/resources/application.mustache index e686a5a0c33dee0eff598e0eba5b248b9cab891a..3b7f2d43a3f11c7588432a0d0c8e7349b71edad5 100644 --- a/modules/openapi-generator/src/main/resources/java-pkmst/resources/application.mustache +++ b/modules/openapi-generator/src/main/resources/java-pkmst/resources/application.mustache @@ -1,5 +1,5 @@ springfox.documentation.swagger.v2.path=/api-docs -server.contextPath={{^contextPath}}/{{/contextPath}}{{#contextPath}}{{contextPath}}{{/contextPath}} +server.contextPath={{contextPath}}{{^contextPath}}/{{/contextPath}} server.port={{serverPort}} spring.jackson.date-format={{basePackage}}.RFC3339DateFormat spring.jackson.serialization.WRITE_DATES_AS_TIMESTAMPS=false \ No newline at end of file diff --git a/modules/openapi-generator/src/main/resources/java-pkmst/security/authorizationServerConfiguration.mustache b/modules/openapi-generator/src/main/resources/java-pkmst/security/authorizationServerConfiguration.mustache index 8db45c3b578eb3264d247295e26f8b3439da3600..dcc67930476ffae7c1020d151d24926af045177f 100644 --- a/modules/openapi-generator/src/main/resources/java-pkmst/security/authorizationServerConfiguration.mustache +++ b/modules/openapi-generator/src/main/resources/java-pkmst/security/authorizationServerConfiguration.mustache @@ -14,9 +14,9 @@ import org.springframework.security.oauth2.provider.token.TokenStore; /** * Convenient strategy for configuring an OAUth2 Authorization Server. Beans of this type are applied to the Spring * context automatically if you {@link EnableAuthorizationServer @EnableAuthorizationServer}. - * + * * @author pkmst - * + * */ @Configuration @EnableAuthorizationServer diff --git a/modules/openapi-generator/src/main/resources/java-pkmst/security/resourceServerConfiguration.mustache b/modules/openapi-generator/src/main/resources/java-pkmst/security/resourceServerConfiguration.mustache index 4377494ec2d3d2f1173dab941ca3cce16278e35f..31be12020f88d31346461b635b5059eefc92382c 100644 --- a/modules/openapi-generator/src/main/resources/java-pkmst/security/resourceServerConfiguration.mustache +++ b/modules/openapi-generator/src/main/resources/java-pkmst/security/resourceServerConfiguration.mustache @@ -11,9 +11,9 @@ import org.springframework.http.HttpMethod; * Configurer class for <code>@EnableResourceServer</code> classes. This class adjust the access * rules and paths that are protected by OAuth2 security. If more than one configures the same property, then the last * one wins. The configurers are sorted by Order before being applied. - * + * * @author pkmst - * + * */ @Configuration @EnableResourceServer diff --git a/modules/openapi-generator/src/main/resources/java-pkmst/testresources/bootstrap.mustache b/modules/openapi-generator/src/main/resources/java-pkmst/testresources/bootstrap.mustache index abde2ab27c539d621fc153eeadd5707dc6156f55..2a5436d97d5e0ad96f164130e690fb42475a8772 100644 --- a/modules/openapi-generator/src/main/resources/java-pkmst/testresources/bootstrap.mustache +++ b/modules/openapi-generator/src/main/resources/java-pkmst/testresources/bootstrap.mustache @@ -2,4 +2,4 @@ spring: application: name: {{artifactId}} profiles: - active: test \ No newline at end of file + active: test \ No newline at end of file diff --git a/modules/openapi-generator/src/main/resources/java-pkmst/xmlAnnotation.mustache b/modules/openapi-generator/src/main/resources/java-pkmst/xmlAnnotation.mustache index fd81a4cf5d8488d44427db713b4799fa97be5aa0..70e2626635f43eb46043858f6630dfb46e8956c8 100644 --- a/modules/openapi-generator/src/main/resources/java-pkmst/xmlAnnotation.mustache +++ b/modules/openapi-generator/src/main/resources/java-pkmst/xmlAnnotation.mustache @@ -1,6 +1,6 @@ {{#withXml}} {{#jackson}} -@JacksonXmlRootElement({{#xmlNamespace}}namespace="{{xmlNamespace}}", {{/xmlNamespace}}localName = "{{#xmlName}}{{xmlName}}{{/xmlName}}{{^xmlName}}{{classname}}{{/xmlName}}") +@JacksonXmlRootElement({{#xmlNamespace}}namespace="{{.}}", {{/xmlNamespace}}localName = "{{xmlName}}{{^xmlName}}{{classname}}{{/xmlName}}") {{/jackson}} -@XmlRootElement({{#xmlNamespace}}namespace="{{xmlNamespace}}", {{/xmlNamespace}}name = "{{#xmlName}}{{xmlName}}{{/xmlName}}{{^xmlName}}{{classname}}{{/xmlName}}") +@XmlRootElement({{#xmlNamespace}}namespace="{{.}}", {{/xmlNamespace}}name = "{{xmlName}}{{^xmlName}}{{classname}}{{/xmlName}}") @XmlAccessorType(XmlAccessType.FIELD){{/withXml}} \ No newline at end of file diff --git a/modules/openapi-generator/src/main/resources/java-undertow-server/enumOuterClass.mustache b/modules/openapi-generator/src/main/resources/java-undertow-server/enumOuterClass.mustache index fef5b45d127ae276cffb398436fe3bcb5af46646..9a5aa524aa41a51a16e72bd29d2a3eb8e15ab67f 100644 --- a/modules/openapi-generator/src/main/resources/java-undertow-server/enumOuterClass.mustache +++ b/modules/openapi-generator/src/main/resources/java-undertow-server/enumOuterClass.mustache @@ -3,9 +3,9 @@ {{/jackson}} /** - * {{^description}}Gets or Sets {{{name}}}{{/description}}{{#description}}{{{description}}}{{/description}} + * {{^description}}Gets or Sets {{{name}}}{{/description}}{{{description}}} */ -{{>additionalEnumTypeAnnotations}}public enum {{#datatypeWithEnum}}{{{.}}}{{/datatypeWithEnum}}{{^datatypeWithEnum}}{{{classname}}}{{/datatypeWithEnum}} { +{{>additionalEnumTypeAnnotations}}public enum {{{datatypeWithEnum}}}{{^datatypeWithEnum}}{{{classname}}}{{/datatypeWithEnum}} { {{#gson}} {{#allowableValues}}{{#enumVars}} @SerializedName({{#isInteger}}"{{/isInteger}}{{#isDouble}}"{{/isDouble}}{{#isLong}}"{{/isLong}}{{#isFloat}}"{{/isFloat}}{{{value}}}{{#isInteger}}"{{/isInteger}}{{#isDouble}}"{{/isDouble}}{{#isLong}}"{{/isLong}}{{#isFloat}}"{{/isFloat}}) @@ -20,7 +20,7 @@ private {{{dataType}}} value; -{{#datatypeWithEnum}}{{{.}}}{{/datatypeWithEnum}}{{^datatypeWithEnum}}{{{classname}}}{{/datatypeWithEnum}}({{{dataType}}} value) { +{{{datatypeWithEnum}}}{{^datatypeWithEnum}}{{{classname}}}{{/datatypeWithEnum}}({{{dataType}}} value) { this.value = value; } @@ -31,8 +31,8 @@ return String.valueOf(value); } @JsonCreator -public static {{#datatypeWithEnum}}{{{.}}}{{/datatypeWithEnum}}{{^datatypeWithEnum}}{{{classname}}}{{/datatypeWithEnum}} fromValue(String text) { -for ({{#datatypeWithEnum}}{{{.}}}{{/datatypeWithEnum}}{{^datatypeWithEnum}}{{{classname}}}{{/datatypeWithEnum}} b : {{#datatypeWithEnum}}{{{.}}}{{/datatypeWithEnum}}{{^datatypeWithEnum}}{{{classname}}}{{/datatypeWithEnum}}.values()) { +public static {{{datatypeWithEnum}}}{{^datatypeWithEnum}}{{{classname}}}{{/datatypeWithEnum}} fromValue(String text) { +for ({{{datatypeWithEnum}}}{{^datatypeWithEnum}}{{{classname}}}{{/datatypeWithEnum}} b : {{{datatypeWithEnum}}}{{^datatypeWithEnum}}{{{classname}}}{{/datatypeWithEnum}}.values()) { if (String.valueOf(b.value).equals(text)) { return b; } diff --git a/modules/openapi-generator/src/main/resources/java-undertow-server/interface.mustache b/modules/openapi-generator/src/main/resources/java-undertow-server/interface.mustache index 7dfd94228a83c54aa509effd6daf1f551470f5b3..a0b43fbc9fd876f04c8eaeaec5a7620a8c6ff1ed 100644 --- a/modules/openapi-generator/src/main/resources/java-undertow-server/interface.mustache +++ b/modules/openapi-generator/src/main/resources/java-undertow-server/interface.mustache @@ -14,10 +14,10 @@ public interface PathHandlerInterface { {{#operation}} /** -{{#summary}} * <p>{{{summary}}}</p> +{{#summary}} * <p>{{{.}}}</p> * {{/summary}} -{{#notes}} * <p>{{{notes}}}</p> +{{#notes}} * <p>{{{.}}}</p> * {{/notes}} * <p><b>Endpoint</b>: {@link Methods#{{{httpMethod}}} {{{httpMethod}}}} "{{{basePathWithoutHost}}}{{{path}}}" (<i>privileged: {{{hasAuthMethods}}}</i>)</p> @@ -29,12 +29,12 @@ public interface PathHandlerInterface { {{^isBodyParam}} * <li> * <p>"<b>{{{baseName}}}</b>" -{{#description}} * <p>{{{description}}}</p> +{{#description}} * <p>{{{.}}}</p> {{/description}} * <p> * - Parameter type: <b>{{>isContainerDoc}}{{#isModel}}{@link {{{dataType}}}}{{/isModel}}{{^isModel}}{{#isFile}}{{#isBinary}}Binary{{/isBinary}}File{{/isFile}}{{^isFile}}{@link {{dataType}}}{{/isFile}}{{/isModel}}</b><br/> * - Appears in: <b>{{#isFormParam}}{@link io.undertow.server.handlers.form.FormDataParser Form}{{/isFormParam}}{{#isQueryParam}}{@link HttpServerExchange#getQueryParameters Query}{{/isQueryParam}}{{#isPathParam}}{@link HttpServerExchange#getPathParameters Path}{{/isPathParam}}{{#isHeaderParam}}{@link Headers Header}{{/isHeaderParam}}{{#isCookieParam}}{@link HttpServerExchange#getRequestCookie Cookie}{{/isCookieParam}}{{#isBodyParam}}{@link HttpServerExchange#getRequestChannel Body}{{/isBodyParam}}</b><br/> -{{#defaultValue}} * - Default value: <b>{{{defaultValue}}}</b><br/> +{{#defaultValue}} * - Default value: <b>{{{.}}}</b><br/> {{/defaultValue}} * - Required: <b>{{{required}}}</b> * </p> @@ -61,7 +61,7 @@ public interface PathHandlerInterface { * <p><b>Responses</b>:</p> * <ul> {{#responses}} - * <li><b>{{#isDefault}}Default{{/isDefault}}{{^isDefault}}{{{code}}} ({{#is1xx}}informative{{/is1xx}}{{#is2xx}}success{{/is2xx}}{{#is3xx}}redirection{{/is3xx}}{{#is4xx}}client error{{/is4xx}}{{#is5xx}}server error{{/is5xx}}){{/isDefault}}</b>{{#message}}: {{{message}}}{{/message}}</li> + * <li><b>{{#isDefault}}Default{{/isDefault}}{{^isDefault}}{{{code}}} ({{#is1xx}}informative{{/is1xx}}{{#is2xx}}success{{/is2xx}}{{#is3xx}}redirection{{/is3xx}}{{#is4xx}}client error{{/is4xx}}{{#is5xx}}server error{{/is5xx}}){{/isDefault}}</b>{{#message}}: {{{.}}}{{/message}}</li> {{/responses}} * </ul> */ diff --git a/modules/openapi-generator/src/main/resources/java-undertow-server/licenseInfo.mustache b/modules/openapi-generator/src/main/resources/java-undertow-server/licenseInfo.mustache index 09f65c73d8348724a06784b6871c0b5dcd5394d0..0fc59d56b2be31516e409cbbe9ee2701cbef23ca 100644 --- a/modules/openapi-generator/src/main/resources/java-undertow-server/licenseInfo.mustache +++ b/modules/openapi-generator/src/main/resources/java-undertow-server/licenseInfo.mustache @@ -3,8 +3,8 @@ * * {{{appDescription}}} * - * {{#version}}OpenAPI document version: {{{version}}}{{/version}} - * {{#infoEmail}}Maintained by: {{{infoEmail}}}{{/infoEmail}} + * {{#version}}OpenAPI document version: {{{.}}}{{/version}} + * {{#infoEmail}}Maintained by: {{{.}}}{{/infoEmail}} * * AUTO-GENERATED FILE, DO NOT MODIFY! */ \ No newline at end of file diff --git a/modules/openapi-generator/src/main/resources/java-undertow-server/model.mustache b/modules/openapi-generator/src/main/resources/java-undertow-server/model.mustache index addae4dd4d44a7b821d6cb6b6fba1cae5bab6bc2..60482618e863f8e740b8029e58045ad6e3e9869c 100644 --- a/modules/openapi-generator/src/main/resources/java-undertow-server/model.mustache +++ b/modules/openapi-generator/src/main/resources/java-undertow-server/model.mustache @@ -9,7 +9,7 @@ import java.util.Objects; {{#models}} {{#model}}{{#description}} /** - * {{{description}}} + * {{{.}}} */{{/description}} {{#isEnum}}{{>enumOuterClass}}{{/isEnum}} {{^isEnum}}{{>pojo}}{{/isEnum}} diff --git a/modules/openapi-generator/src/main/resources/java-undertow-server/pojo.mustache b/modules/openapi-generator/src/main/resources/java-undertow-server/pojo.mustache index f40d5b3de4af2da2f9be42a00e64e87c23472166..a77e2b6d07da3843242437a9136304d5f6b22e3d 100644 --- a/modules/openapi-generator/src/main/resources/java-undertow-server/pojo.mustache +++ b/modules/openapi-generator/src/main/resources/java-undertow-server/pojo.mustache @@ -1,6 +1,6 @@ -{{#description}}@ApiModel(description = "{{{description}}}"){{/description}} +{{#description}}@ApiModel(description = "{{{.}}}"){{/description}} {{>additionalModelTypeAnnotations}}{{>generatedAnnotation}} -public class {{classname}} {{#parent}}extends {{{parent}}}{{/parent}} {{#serializableModel}}implements Serializable{{/serializableModel}} { +public class {{classname}} {{#parent}}extends {{{.}}}{{/parent}} {{#serializableModel}}implements Serializable{{/serializableModel}} { {{#vars}}{{#isEnum}}{{^isContainer}} {{>enumClass}}{{/isContainer}}{{#isContainer}}{{#mostInnerItems}} @@ -10,9 +10,9 @@ public class {{classname}} {{#parent}}extends {{{parent}}}{{/parent}} {{#seriali {{#vars}} /**{{#description}} - * {{{description}}}{{/description}}{{#minimum}} - * minimum: {{{minimum}}}{{/minimum}}{{#maximum}} - * maximum: {{{maximum}}}{{/maximum}} + * {{{.}}}{{/description}}{{#minimum}} + * minimum: {{{.}}}{{/minimum}}{{#maximum}} + * maximum: {{{.}}}{{/maximum}} */ public {{{classname}}} {{{name}}}({{{datatypeWithEnum}}} {{{name}}}) { this.{{{name}}} = {{{name}}}; @@ -20,7 +20,7 @@ public class {{classname}} {{#parent}}extends {{{parent}}}{{/parent}} {{#seriali } {{#vendorExtensions.x-extra-annotation}}{{{vendorExtensions.x-extra-annotation}}}{{/vendorExtensions.x-extra-annotation}} - @ApiModelProperty({{#example}}example = "{{{example}}}", {{/example}}{{#required}}required = {{{required}}}, {{/required}}value = "{{{description}}}") + @ApiModelProperty({{#example}}example = "{{{.}}}", {{/example}}{{#required}}required = {{{required}}}, {{/required}}value = "{{{description}}}") @JsonProperty("{{baseName}}") public {{{datatypeWithEnum}}} {{getter}}() { return {{name}}; diff --git a/modules/openapi-generator/src/main/resources/k6/licenseInfo.mustache b/modules/openapi-generator/src/main/resources/k6/licenseInfo.mustache index 54fabf3c124158b309f6c7f1eb2de1325426f94c..93e9238038357dbd3d269be09da7581ea37383ff 100644 --- a/modules/openapi-generator/src/main/resources/k6/licenseInfo.mustache +++ b/modules/openapi-generator/src/main/resources/k6/licenseInfo.mustache @@ -3,10 +3,10 @@ * {{& appDescription}} * {{#version}} - * OpenAPI spec version: {{version}} + * OpenAPI spec version: {{.}} {{/version}} {{#infoEmail}} - * Contact: {{infoEmail}} + * Contact: {{.}} {{/infoEmail}} * * NOTE: This class is auto generated by OpenAPI Generator. diff --git a/modules/openapi-generator/src/main/resources/kotlin-client/README.mustache b/modules/openapi-generator/src/main/resources/kotlin-client/README.mustache index 546790a7fb6d279d7af2bbef9cbad6d837247084..45bf156f8a0caec77ea205d883b927a81459a853 100644 --- a/modules/openapi-generator/src/main/resources/kotlin-client/README.mustache +++ b/modules/openapi-generator/src/main/resources/kotlin-client/README.mustache @@ -43,7 +43,7 @@ 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}} +{{#apiInfo}}{{#apis}}{{#operations}}{{#operation}}*{{classname}}* | [**{{operationId}}**]({{apiDocPath}}{{classname}}.md#{{operationIdLowerCase}}) | **{{httpMethod}}** {{path}} | {{{summary}}} {{/operation}}{{/operations}}{{/apis}}{{/apiInfo}} {{/generateApiDocs}} diff --git a/modules/openapi-generator/src/main/resources/kotlin-client/api_doc.mustache b/modules/openapi-generator/src/main/resources/kotlin-client/api_doc.mustache index b50c4c45c3727e441b3cb2a3ce023e67522e2be7..951de3c0595333d73471c4b8cd7ffac277ca8ee8 100644 --- a/modules/openapi-generator/src/main/resources/kotlin-client/api_doc.mustache +++ b/modules/openapi-generator/src/main/resources/kotlin-client/api_doc.mustache @@ -1,22 +1,22 @@ # {{classname}}{{#description}} -{{description}}{{/description}} +{{.}}{{/description}} All URIs are relative to *{{basePath}}* Method | HTTP request | Description ------------- | ------------- | ------------- -{{#operations}}{{#operation}}[**{{operationId}}**]({{classname}}.md#{{operationId}}) | **{{httpMethod}}** {{path}} | {{#summary}}{{summary}}{{/summary}} +{{#operations}}{{#operation}}[**{{operationId}}**]({{classname}}.md#{{operationId}}) | **{{httpMethod}}** {{path}} | {{summary}} {{/operation}}{{/operations}} {{#operations}} {{#operation}} <a name="{{operationId}}"></a> # **{{operationId}}** -> {{#returnType}}{{returnType}} {{/returnType}}{{operationId}}({{#allParams}}{{{paramName}}}{{^-last}}, {{/-last}}{{/allParams}}) +> {{#returnType}}{{.}} {{/returnType}}{{operationId}}({{#allParams}}{{{paramName}}}{{^-last}}, {{/-last}}{{/allParams}}) {{summary}}{{#notes}} -{{notes}}{{/notes}} +{{.}}{{/notes}} ### Example ```kotlin @@ -45,7 +45,7 @@ try { {{^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}}{{#generateModelDocs}}[**{{dataType}}**]({{baseType}}.md){{/generateModelDocs}}{{^generateModelDocs}}**{{dataType}}**{{/generateModelDocs}}{{/isFile}}{{/isPrimitiveType}}| {{description}} |{{^required}} [optional]{{/required}}{{#defaultValue}} [default to {{defaultValue}}]{{/defaultValue}}{{#allowableValues}} [enum: {{#values}}{{{.}}}{{^-last}}, {{/-last}}{{/values}}]{{/allowableValues}} +{{#allParams}} **{{paramName}}** | {{#isPrimitiveType}}**{{dataType}}**{{/isPrimitiveType}}{{^isPrimitiveType}}{{#isFile}}**{{dataType}}**{{/isFile}}{{^isFile}}{{#generateModelDocs}}[**{{dataType}}**]({{baseType}}.md){{/generateModelDocs}}{{^generateModelDocs}}**{{dataType}}**{{/generateModelDocs}}{{/isFile}}{{/isPrimitiveType}}| {{description}} |{{^required}} [optional]{{/required}}{{#defaultValue}} [default to {{.}}]{{/defaultValue}}{{#allowableValues}} [enum: {{#values}}{{{.}}}{{^-last}}, {{/-last}}{{/values}}]{{/allowableValues}} {{/allParams}} ### Return type diff --git a/modules/openapi-generator/src/main/resources/kotlin-client/data_class.mustache b/modules/openapi-generator/src/main/resources/kotlin-client/data_class.mustache index 3cc72993e6101da780446abf9c12a9cdd5b01d4c..c5289a46fadc37489e57fa5134dbd5f40888f5cd 100644 --- a/modules/openapi-generator/src/main/resources/kotlin-client/data_class.mustache +++ b/modules/openapi-generator/src/main/resources/kotlin-client/data_class.mustache @@ -46,7 +46,7 @@ import java.io.Serializable {{#parcelizeModels}} @Parcelize {{/parcelizeModels}} -{{#multiplatform}}{{#discriminator}}{{/discriminator}}{{^discriminator}}@Serializable{{/discriminator}}{{/multiplatform}}{{#kotlinx_serialization}}{{#serializableModel}}@KSerializable{{/serializableModel}}{{^serializableModel}}@Serializable{{/serializableModel}}{{/kotlinx_serialization}}{{#moshi}}{{#moshiCodeGen}}@JsonClass(generateAdapter = true){{/moshiCodeGen}}{{/moshi}}{{#jackson}}{{#discriminator}}{{>typeInfoAnnotation}}{{/discriminator}}{{/jackson}} +{{#multiplatform}}{{^discriminator}}@Serializable{{/discriminator}}{{/multiplatform}}{{#kotlinx_serialization}}{{#serializableModel}}@KSerializable{{/serializableModel}}{{^serializableModel}}@Serializable{{/serializableModel}}{{/kotlinx_serialization}}{{#moshi}}{{#moshiCodeGen}}@JsonClass(generateAdapter = true){{/moshiCodeGen}}{{/moshi}}{{#jackson}}{{#discriminator}}{{>typeInfoAnnotation}}{{/discriminator}}{{/jackson}} {{#isDeprecated}} @Deprecated(message = "This schema is deprecated.") {{/isDeprecated}} diff --git a/modules/openapi-generator/src/main/resources/kotlin-client/data_class_opt_var.mustache b/modules/openapi-generator/src/main/resources/kotlin-client/data_class_opt_var.mustache index 2ce65fd1d16c5ec1e360e1ba1eeee4a8b4948d2f..2929c361b1a7c49afef97d2f93c36c0897a8a40f 100644 --- a/modules/openapi-generator/src/main/resources/kotlin-client/data_class_opt_var.mustache +++ b/modules/openapi-generator/src/main/resources/kotlin-client/data_class_opt_var.mustache @@ -1,5 +1,5 @@ {{#description}} - /* {{{description}}} */ + /* {{{.}}} */ {{/description}} {{^multiplatform}} {{#moshi}} @@ -18,4 +18,4 @@ {{#deprecated}} @Deprecated(message = "This property is deprecated.") {{/deprecated}} - {{#multiplatform}}@SerialName(value = "{{{vendorExtensions.x-base-name-literal}}}") {{/multiplatform}}{{#isInherited}}override {{/isInherited}}{{>modelMutable}} {{{name}}}: {{#isArray}}{{#isList}}{{#uniqueItems}}kotlin.collections.Set{{/uniqueItems}}{{^uniqueItems}}kotlin.collections.List{{/uniqueItems}}{{/isList}}{{^isList}}kotlin.Array{{/isList}}<{{^items.isEnum}}{{^items.isPrimitiveType}}{{^items.isModel}}{{#kotlinx_serialization}}@Contextual {{/kotlinx_serialization}}{{/items.isModel}}{{/items.isPrimitiveType}}{{{items.dataType}}}{{/items.isEnum}}{{#items.isEnum}}{{classname}}.{{{nameInCamelCase}}}{{/items.isEnum}}>{{/isArray}}{{^isEnum}}{{^isArray}}{{{dataType}}}{{/isArray}}{{/isEnum}}{{#isEnum}}{{^isArray}}{{classname}}.{{{nameInCamelCase}}}{{/isArray}}{{/isEnum}}? = {{#defaultvalue}}{{defaultvalue}}{{/defaultvalue}}{{^defaultvalue}}null{{/defaultvalue}} \ No newline at end of file + {{#multiplatform}}@SerialName(value = "{{{vendorExtensions.x-base-name-literal}}}") {{/multiplatform}}{{#isInherited}}override {{/isInherited}}{{>modelMutable}} {{{name}}}: {{#isArray}}{{#isList}}{{#uniqueItems}}kotlin.collections.Set{{/uniqueItems}}{{^uniqueItems}}kotlin.collections.List{{/uniqueItems}}{{/isList}}{{^isList}}kotlin.Array{{/isList}}<{{^items.isEnum}}{{^items.isPrimitiveType}}{{^items.isModel}}{{#kotlinx_serialization}}@Contextual {{/kotlinx_serialization}}{{/items.isModel}}{{/items.isPrimitiveType}}{{{items.dataType}}}{{/items.isEnum}}{{#items.isEnum}}{{classname}}.{{{nameInCamelCase}}}{{/items.isEnum}}>{{/isArray}}{{^isEnum}}{{^isArray}}{{{dataType}}}{{/isArray}}{{/isEnum}}{{#isEnum}}{{^isArray}}{{classname}}.{{{nameInCamelCase}}}{{/isArray}}{{/isEnum}}? = {{defaultvalue}}{{^defaultvalue}}null{{/defaultvalue}} \ No newline at end of file diff --git a/modules/openapi-generator/src/main/resources/kotlin-client/data_class_req_var.mustache b/modules/openapi-generator/src/main/resources/kotlin-client/data_class_req_var.mustache index a8d7695e2db50f646e3621892a225cd9c26ff3a9..db80e9047f2fcf3ed89b2ee5ca5fba6cba9aedae 100644 --- a/modules/openapi-generator/src/main/resources/kotlin-client/data_class_req_var.mustache +++ b/modules/openapi-generator/src/main/resources/kotlin-client/data_class_req_var.mustache @@ -1,5 +1,5 @@ {{#description}} - /* {{{description}}} */ + /* {{{.}}} */ {{/description}} {{^multiplatform}} {{#moshi}} @@ -18,4 +18,4 @@ {{#deprecated}} @Deprecated(message = "This property is deprecated.") {{/deprecated}} - {{#multiplatform}}@SerialName(value = "{{{vendorExtensions.x-base-name-literal}}}") @Required {{/multiplatform}}{{#isInherited}}override {{/isInherited}}{{>modelMutable}} {{{name}}}: {{#isArray}}{{#isList}}{{#isUniqueItems}}kotlin.collections.Set{{/isUniqueItems}}{{^isUniqueItems}}kotlin.collections.List{{/isUniqueItems}}{{/isList}}{{^isList}}kotlin.Array{{/isList}}<{{^items.isEnum}}{{^items.isPrimitiveType}}{{^items.isModel}}{{#kotlinx_serialization}}@Contextual {{/kotlinx_serialization}}{{/items.isModel}}{{/items.isPrimitiveType}}{{{items.dataType}}}{{/items.isEnum}}{{#items.isEnum}}{{classname}}.{{{nameInCamelCase}}}{{/items.isEnum}}>{{/isArray}}{{^isEnum}}{{^isArray}}{{{dataType}}}{{/isArray}}{{/isEnum}}{{#isEnum}}{{^isArray}}{{classname}}.{{{nameInCamelCase}}}{{/isArray}}{{/isEnum}}{{#isNullable}}?{{/isNullable}}{{#defaultValue}} = {{{defaultValue}}}{{/defaultValue}} \ No newline at end of file + {{#multiplatform}}@SerialName(value = "{{{vendorExtensions.x-base-name-literal}}}") @Required {{/multiplatform}}{{#isInherited}}override {{/isInherited}}{{>modelMutable}} {{{name}}}: {{#isArray}}{{#isList}}{{#isUniqueItems}}kotlin.collections.Set{{/isUniqueItems}}{{^isUniqueItems}}kotlin.collections.List{{/isUniqueItems}}{{/isList}}{{^isList}}kotlin.Array{{/isList}}<{{^items.isEnum}}{{^items.isPrimitiveType}}{{^items.isModel}}{{#kotlinx_serialization}}@Contextual {{/kotlinx_serialization}}{{/items.isModel}}{{/items.isPrimitiveType}}{{{items.dataType}}}{{/items.isEnum}}{{#items.isEnum}}{{classname}}.{{{nameInCamelCase}}}{{/items.isEnum}}>{{/isArray}}{{^isEnum}}{{^isArray}}{{{dataType}}}{{/isArray}}{{/isEnum}}{{#isEnum}}{{^isArray}}{{classname}}.{{{nameInCamelCase}}}{{/isArray}}{{/isEnum}}{{#isNullable}}?{{/isNullable}}{{#defaultValue}} = {{{.}}}{{/defaultValue}} \ No newline at end of file diff --git a/modules/openapi-generator/src/main/resources/kotlin-client/interface_opt_var.mustache b/modules/openapi-generator/src/main/resources/kotlin-client/interface_opt_var.mustache index 6d23fb240a0ca0e327c6a0b30ae74d439815dbb5..fdf34db6da5404537d9187bab4f2175890a463bc 100644 --- a/modules/openapi-generator/src/main/resources/kotlin-client/interface_opt_var.mustache +++ b/modules/openapi-generator/src/main/resources/kotlin-client/interface_opt_var.mustache @@ -1,5 +1,5 @@ {{#description}} - /* {{{description}}} */ + /* {{{.}}} */ {{/description}} {{^multiplatform}} {{#moshi}} diff --git a/modules/openapi-generator/src/main/resources/kotlin-client/interface_req_var.mustache b/modules/openapi-generator/src/main/resources/kotlin-client/interface_req_var.mustache index 6b93d6189fa1c5eaca08f3308392245e92c9f9d1..9e9a41a21d2d4b6dda30e3b28ae247167157bef1 100644 --- a/modules/openapi-generator/src/main/resources/kotlin-client/interface_req_var.mustache +++ b/modules/openapi-generator/src/main/resources/kotlin-client/interface_req_var.mustache @@ -1,5 +1,5 @@ {{#description}} - /* {{{description}}} */ + /* {{{.}}} */ {{/description}} {{^multiplatform}} {{#moshi}} diff --git a/modules/openapi-generator/src/main/resources/kotlin-client/jvm-common/infrastructure/Serializer.kt.mustache b/modules/openapi-generator/src/main/resources/kotlin-client/jvm-common/infrastructure/Serializer.kt.mustache index b1e03a46798cda1638e7849d953514e596ef1835..ca5d3288a203d6483300aa626d953bc981928522 100644 --- a/modules/openapi-generator/src/main/resources/kotlin-client/jvm-common/infrastructure/Serializer.kt.mustache +++ b/modules/openapi-generator/src/main/resources/kotlin-client/jvm-common/infrastructure/Serializer.kt.mustache @@ -79,7 +79,7 @@ import java.util.concurrent.atomic.AtomicLong .registerTypeAdapter(LocalDateTime::class.java, LocalDateTimeAdapter()) .registerTypeAdapter(LocalDate::class.java, LocalDateAdapter()) .registerTypeAdapter(ByteArray::class.java, ByteArrayAdapter()) - + @JvmStatic val gson: Gson by lazy { gsonBuilder.create() diff --git a/modules/openapi-generator/src/main/resources/kotlin-client/libraries/jvm-okhttp/api.mustache b/modules/openapi-generator/src/main/resources/kotlin-client/libraries/jvm-okhttp/api.mustache index fe59147907a849fddbcc4748cdf2741030505433..be0dfa8d9c2559643be605bf4965475fd68eb44a 100644 --- a/modules/openapi-generator/src/main/resources/kotlin-client/libraries/jvm-okhttp/api.mustache +++ b/modules/openapi-generator/src/main/resources/kotlin-client/libraries/jvm-okhttp/api.mustache @@ -52,7 +52,7 @@ import {{packageName}}.infrastructure.toMultiValue {{/isDeprecated}} val localVariableConfig = {{operationId}}RequestConfig({{#allParams}}{{{paramName}}} = {{{paramName}}}{{^-last}}, {{/-last}}{{/allParams}}) - val localVarResponse = request<{{#hasBodyParam}}{{#bodyParams}}{{{dataType}}}{{/bodyParams}}{{/hasBodyParam}}{{^hasBodyParam}}{{^hasFormParams}}Unit{{/hasFormParams}}{{#hasFormParams}}Map<String, Any?>{{/hasFormParams}}{{/hasBodyParam}}, {{#returnType}}{{{returnType}}}{{/returnType}}{{^returnType}}Unit{{/returnType}}>( + val localVarResponse = request<{{#hasBodyParam}}{{#bodyParams}}{{{dataType}}}{{/bodyParams}}{{/hasBodyParam}}{{^hasBodyParam}}{{^hasFormParams}}Unit{{/hasFormParams}}{{#hasFormParams}}Map<String, Any?>{{/hasFormParams}}{{/hasBodyParam}}, {{{returnType}}}{{^returnType}}Unit{{/returnType}}>( localVariableConfig ) diff --git a/modules/openapi-generator/src/main/resources/kotlin-client/libraries/jvm-retrofit2/api.mustache b/modules/openapi-generator/src/main/resources/kotlin-client/libraries/jvm-retrofit2/api.mustache index bca56e88bae660e64764431c805010c44673a6c7..842b10b000b77488e04dab37fbb0e71d1bffb191 100644 --- a/modules/openapi-generator/src/main/resources/kotlin-client/libraries/jvm-retrofit2/api.mustache +++ b/modules/openapi-generator/src/main/resources/kotlin-client/libraries/jvm-retrofit2/api.mustache @@ -60,11 +60,11 @@ interface {{classname}} { * {{notes}} * Responses:{{#responses}} * - {{code}}: {{{message}}}{{/responses}} - * + * {{#allParams}} * @param {{paramName}} {{description}} {{^required}}(optional{{#defaultValue}}, default to {{{.}}}{{/defaultValue}}){{/required}} {{/allParams}} - * @return {{^useCoroutines}}[Call]<{{/useCoroutines}}{{#isResponseFile}}[ResponseBody]{{/isResponseFile}}{{^isResponseFile}}{{#returnType}}[{{{returnType}}}]{{/returnType}}{{^returnType}}[Unit]{{/returnType}}{{/isResponseFile}}{{^useCoroutines}}>{{/useCoroutines}} + * @return {{^useCoroutines}}[Call]<{{/useCoroutines}}{{#isResponseFile}}[ResponseBody]{{/isResponseFile}}{{^isResponseFile}}{{#returnType}}[{{{.}}}]{{/returnType}}{{^returnType}}[Unit]{{/returnType}}{{/isResponseFile}}{{^useCoroutines}}>{{/useCoroutines}} */ {{#isDeprecated}} @Deprecated("This api was deprecated") @@ -84,7 +84,7 @@ interface {{classname}} { {{/prioritizedContentTypes}} {{/formParams}} @{{httpMethod}}("{{{path}}}") - {{^doNotUseRxAndCoroutines}}{{#useCoroutines}}suspend {{/useCoroutines}}{{/doNotUseRxAndCoroutines}}fun {{operationId}}({{^allParams}}){{/allParams}}{{#allParams}}{{>queryParams}}{{>pathParams}}{{>headerParams}}{{>bodyParams}}{{>formParams}}{{^-last}}, {{/-last}}{{#-last}}){{/-last}}{{/allParams}}: {{^doNotUseRxAndCoroutines}}{{#useRxJava}}Observable<{{#isResponseFile}}ResponseBody{{/isResponseFile}}{{^isResponseFile}}{{#returnType}}{{{returnType}}}{{/returnType}}{{^returnType}}Unit{{/returnType}}{{/isResponseFile}}>{{/useRxJava}}{{#useRxJava2}}{{#returnType}}Single<{{#isResponseFile}}ResponseBody{{/isResponseFile}}{{^isResponseFile}}{{{returnType}}}{{/isResponseFile}}>{{/returnType}}{{^returnType}}Completable{{/returnType}}{{/useRxJava2}}{{#useRxJava3}}{{#returnType}}Single<{{#isResponseFile}}ResponseBody{{/isResponseFile}}{{^isResponseFile}}{{{returnType}}}{{/isResponseFile}}>{{/returnType}}{{^returnType}}Completable{{/returnType}}{{/useRxJava3}}{{#useCoroutines}}Response<{{#isResponseFile}}ResponseBody{{/isResponseFile}}{{^isResponseFile}}{{#returnType}}{{{returnType}}}{{/returnType}}{{^returnType}}Unit{{/returnType}}{{/isResponseFile}}>{{/useCoroutines}}{{/doNotUseRxAndCoroutines}}{{#doNotUseRxAndCoroutines}}Call<{{#isResponseFile}}ResponseBody{{/isResponseFile}}{{^isResponseFile}}{{#returnType}}{{{returnType}}}{{/returnType}}{{^returnType}}Unit{{/returnType}}{{/isResponseFile}}>{{/doNotUseRxAndCoroutines}} + {{^doNotUseRxAndCoroutines}}{{#useCoroutines}}suspend {{/useCoroutines}}{{/doNotUseRxAndCoroutines}}fun {{operationId}}({{^allParams}}){{/allParams}}{{#allParams}}{{>queryParams}}{{>pathParams}}{{>headerParams}}{{>bodyParams}}{{>formParams}}{{^-last}}, {{/-last}}{{#-last}}){{/-last}}{{/allParams}}: {{^doNotUseRxAndCoroutines}}{{#useRxJava}}Observable<{{#isResponseFile}}ResponseBody{{/isResponseFile}}{{^isResponseFile}}{{{returnType}}}{{^returnType}}Unit{{/returnType}}{{/isResponseFile}}>{{/useRxJava}}{{#useRxJava2}}{{#returnType}}Single<{{#isResponseFile}}ResponseBody{{/isResponseFile}}{{^isResponseFile}}{{{returnType}}}{{/isResponseFile}}>{{/returnType}}{{^returnType}}Completable{{/returnType}}{{/useRxJava2}}{{#useRxJava3}}{{#returnType}}Single<{{#isResponseFile}}ResponseBody{{/isResponseFile}}{{^isResponseFile}}{{{returnType}}}{{/isResponseFile}}>{{/returnType}}{{^returnType}}Completable{{/returnType}}{{/useRxJava3}}{{#useCoroutines}}Response<{{#isResponseFile}}ResponseBody{{/isResponseFile}}{{^isResponseFile}}{{{returnType}}}{{^returnType}}Unit{{/returnType}}{{/isResponseFile}}>{{/useCoroutines}}{{/doNotUseRxAndCoroutines}}{{#doNotUseRxAndCoroutines}}Call<{{#isResponseFile}}ResponseBody{{/isResponseFile}}{{^isResponseFile}}{{{returnType}}}{{^returnType}}Unit{{/returnType}}{{/isResponseFile}}>{{/doNotUseRxAndCoroutines}} {{/operation}} } diff --git a/modules/openapi-generator/src/main/resources/kotlin-client/libraries/jvm-retrofit2/api_doc.mustache b/modules/openapi-generator/src/main/resources/kotlin-client/libraries/jvm-retrofit2/api_doc.mustache index f7bf73ae31d0fe5a53bd8ed4b37ab2e2c46a54c9..3c83a2edec64772c052e28efd4fccee9c24bedbe 100644 --- a/modules/openapi-generator/src/main/resources/kotlin-client/libraries/jvm-retrofit2/api_doc.mustache +++ b/modules/openapi-generator/src/main/resources/kotlin-client/libraries/jvm-retrofit2/api_doc.mustache @@ -1,11 +1,11 @@ # {{classname}}{{#description}} -{{description}}{{/description}} +{{.}}{{/description}} All URIs are relative to *{{basePath}}* Method | HTTP request | Description ------------- | ------------- | ------------- -{{#operations}}{{#operation}}[**{{operationId}}**]({{classname}}.md#{{operationId}}) | **{{httpMethod}}** {{path}} | {{#summary}}{{summary}}{{/summary}} +{{#operations}}{{#operation}}[**{{operationId}}**]({{classname}}.md#{{operationId}}) | **{{httpMethod}}** {{path}} | {{summary}} {{/operation}}{{/operations}} {{#operations}} @@ -13,7 +13,7 @@ Method | HTTP request | Description {{summary}}{{#notes}} -{{notes}}{{/notes}} +{{.}}{{/notes}} ### Example ```kotlin @@ -51,7 +51,7 @@ launch(Dispatchers.IO) { {{^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}}{{#generateModelDocs}}[**{{dataType}}**]({{baseType}}.md){{/generateModelDocs}}{{^generateModelDocs}}**{{dataType}}**{{/generateModelDocs}}{{/isFile}}{{/isPrimitiveType}}| {{description}} |{{^required}} [optional]{{/required}}{{#defaultValue}} [default to {{defaultValue}}]{{/defaultValue}}{{#allowableValues}} [enum: {{#values}}{{{.}}}{{^-last}}, {{/-last}}{{/values}}]{{/allowableValues}} +{{#allParams}} **{{paramName}}** | {{#isPrimitiveType}}**{{dataType}}**{{/isPrimitiveType}}{{^isPrimitiveType}}{{#isFile}}**{{dataType}}**{{/isFile}}{{^isFile}}{{#generateModelDocs}}[**{{dataType}}**]({{baseType}}.md){{/generateModelDocs}}{{^generateModelDocs}}**{{dataType}}**{{/generateModelDocs}}{{/isFile}}{{/isPrimitiveType}}| {{description}} |{{^required}} [optional]{{/required}}{{#defaultValue}} [default to {{.}}]{{/defaultValue}}{{#allowableValues}} [enum: {{#values}}{{{.}}}{{^-last}}, {{/-last}}{{/values}}]{{/allowableValues}} {{/allParams}} ### Return type diff --git a/modules/openapi-generator/src/main/resources/kotlin-client/libraries/jvm-retrofit2/auth/ApiKeyAuth.kt.mustache b/modules/openapi-generator/src/main/resources/kotlin-client/libraries/jvm-retrofit2/auth/ApiKeyAuth.kt.mustache index 12d01a017c683fc38268af835cd6d00a4bec4548..967980ae7fb54e5212dd67d6c79e35aa12c6d329 100644 --- a/modules/openapi-generator/src/main/resources/kotlin-client/libraries/jvm-retrofit2/auth/ApiKeyAuth.kt.mustache +++ b/modules/openapi-generator/src/main/resources/kotlin-client/libraries/jvm-retrofit2/auth/ApiKeyAuth.kt.mustache @@ -12,7 +12,7 @@ class ApiKeyAuth( private val paramName: String = "", private var apiKey: String = "" ) : Interceptor { - + @Throws(IOException::class) override fun intercept(chain: Interceptor.Chain): Response { var request = chain.request() diff --git a/modules/openapi-generator/src/main/resources/kotlin-client/libraries/jvm-retrofit2/auth/OAuth.kt.mustache b/modules/openapi-generator/src/main/resources/kotlin-client/libraries/jvm-retrofit2/auth/OAuth.kt.mustache index 1764fc2d87f35b3ef86ed6c582f70c15be47aa53..bf7264e85e1c37313932ecbacfff0c6a861330e8 100644 --- a/modules/openapi-generator/src/main/resources/kotlin-client/libraries/jvm-retrofit2/auth/OAuth.kt.mustache +++ b/modules/openapi-generator/src/main/resources/kotlin-client/libraries/jvm-retrofit2/auth/OAuth.kt.mustache @@ -30,7 +30,7 @@ class OAuth( private var oauthClient: OAuthClient = OAuthClient(OAuthOkHttpClient(client)) - @Volatile + @Volatile private var accessToken: String? = null var authenticationRequestBuilder: AuthenticationRequestBuilder? = null private var accessTokenListener: AccessTokenListener? = null @@ -38,14 +38,14 @@ class OAuth( constructor( requestBuilder: TokenRequestBuilder ) : this( - OkHttpClient(), + OkHttpClient(), requestBuilder ) constructor( - flow: OAuthFlow, - authorizationUrl: String, - tokenUrl: String, + flow: OAuthFlow, + authorizationUrl: String, + tokenUrl: String, scopes: String ) : this( OAuthClientRequest.tokenLocation(tokenUrl).setScope(scopes) @@ -62,7 +62,7 @@ class OAuth( tokenRequestBuilder.setGrantType(GrantType.PASSWORD) OAuthFlow.application -> tokenRequestBuilder.setGrantType(GrantType.CLIENT_CREDENTIALS) - } + } } @Throws(IOException::class) @@ -128,9 +128,9 @@ class OAuth( * Returns true if the access token has been updated */ @Throws(IOException::class) - @Synchronized + @Synchronized fun updateAccessToken(requestAccessToken: String?): Boolean { - if (accessToken == null || accessToken.equals(requestAccessToken)) { + if (accessToken == null || accessToken.equals(requestAccessToken)) { return try { val accessTokenResponse = oauthClient.accessToken(this.tokenRequestBuilder.buildBodyMessage()) if (accessTokenResponse != null && accessTokenResponse.accessToken != null) { diff --git a/modules/openapi-generator/src/main/resources/kotlin-client/libraries/jvm-retrofit2/auth/OAuthOkHttpClient.kt.mustache b/modules/openapi-generator/src/main/resources/kotlin-client/libraries/jvm-retrofit2/auth/OAuthOkHttpClient.kt.mustache index 5c30002e94bb725b91aa523cf35b455466d57d92..0731e92a890ca1d7dd83f419e07ea65caa8419c0 100644 --- a/modules/openapi-generator/src/main/resources/kotlin-client/libraries/jvm-retrofit2/auth/OAuthOkHttpClient.kt.mustache +++ b/modules/openapi-generator/src/main/resources/kotlin-client/libraries/jvm-retrofit2/auth/OAuthOkHttpClient.kt.mustache @@ -22,9 +22,9 @@ class OAuthOkHttpClient( @Throws(OAuthSystemException::class, OAuthProblemException::class) override fun <T : OAuthClientResponse?> execute( - request: OAuthClientRequest, + request: OAuthClientRequest, headers: Map<String, String>?, - requestMethod: String, + requestMethod: String, responseClass: Class<T>?): T { var mediaType = "application/json".toMediaTypeOrNull() @@ -44,7 +44,7 @@ class OAuthOkHttpClient( try { val response = client.newCall(requestBuilder.build()).execute() return OAuthClientResponseFactory.createCustomResponse( - response.body?.string(), + response.body?.string(), response.body?.contentType()?.toString(), response.code, response.headers.toMultimap(), diff --git a/modules/openapi-generator/src/main/resources/kotlin-client/libraries/jvm-retrofit2/formParams.mustache b/modules/openapi-generator/src/main/resources/kotlin-client/libraries/jvm-retrofit2/formParams.mustache index 041cad115295e2ccd82da7df23ac5267771dea46..dbcefddcc646dd0f626bc98947ed5b0833761255 100644 --- a/modules/openapi-generator/src/main/resources/kotlin-client/libraries/jvm-retrofit2/formParams.mustache +++ b/modules/openapi-generator/src/main/resources/kotlin-client/libraries/jvm-retrofit2/formParams.mustache @@ -1 +1 @@ -{{#isFormParam}}{{^isFile}}{{#isMultipart}}@Part{{/isMultipart}}{{^isMultipart}}@Field{{/isMultipart}}("{{baseName}}") {{{paramName}}}: {{{dataType}}}{{#required}}{{#defaultValue}} = {{{defaultValue}}}{{/defaultValue}}{{/required}}{{^required}}?{{#defaultValue}} = {{{defaultValue}}}{{/defaultValue}}{{^defaultValue}} = null{{/defaultValue}}{{/required}}{{/isFile}}{{#isFile}}{{#isMultipart}}@Part{{/isMultipart}}{{^isMultipart}}@Field("{{baseName}}"){{/isMultipart}} {{{paramName}}}: MultipartBody.Part{{^required}}? = null{{/required}}{{/isFile}}{{/isFormParam}} \ No newline at end of file +{{#isFormParam}}{{^isFile}}{{#isMultipart}}@Part{{/isMultipart}}{{^isMultipart}}@Field{{/isMultipart}}("{{baseName}}") {{{paramName}}}: {{{dataType}}}{{#required}}{{#defaultValue}} = {{{.}}}{{/defaultValue}}{{/required}}{{^required}}?{{#defaultValue}} = {{{.}}}{{/defaultValue}}{{^defaultValue}} = null{{/defaultValue}}{{/required}}{{/isFile}}{{#isFile}}{{#isMultipart}}@Part{{/isMultipart}}{{^isMultipart}}@Field("{{baseName}}"){{/isMultipart}} {{{paramName}}}: MultipartBody.Part{{^required}}? = null{{/required}}{{/isFile}}{{/isFormParam}} \ No newline at end of file diff --git a/modules/openapi-generator/src/main/resources/kotlin-client/libraries/jvm-retrofit2/headerParams.mustache b/modules/openapi-generator/src/main/resources/kotlin-client/libraries/jvm-retrofit2/headerParams.mustache index f546244307bd683fa891536adf0fe2ea7396ed4f..2b517a23e8abd538b3a920808a9af33b93b55234 100644 --- a/modules/openapi-generator/src/main/resources/kotlin-client/libraries/jvm-retrofit2/headerParams.mustache +++ b/modules/openapi-generator/src/main/resources/kotlin-client/libraries/jvm-retrofit2/headerParams.mustache @@ -1 +1 @@ -{{#isHeaderParam}}@Header("{{baseName}}") {{{paramName}}}: {{{dataType}}}{{#required}}{{#defaultValue}} = {{{defaultValue}}}{{/defaultValue}}{{/required}}{{^required}}?{{#defaultValue}} = {{{defaultValue}}}{{/defaultValue}}{{^defaultValue}} = null{{/defaultValue}}{{/required}}{{/isHeaderParam}} \ No newline at end of file +{{#isHeaderParam}}@Header("{{baseName}}") {{{paramName}}}: {{{dataType}}}{{#required}}{{#defaultValue}} = {{{.}}}{{/defaultValue}}{{/required}}{{^required}}?{{#defaultValue}} = {{{.}}}{{/defaultValue}}{{^defaultValue}} = null{{/defaultValue}}{{/required}}{{/isHeaderParam}} \ No newline at end of file diff --git a/modules/openapi-generator/src/main/resources/kotlin-client/libraries/multiplatform/api.mustache b/modules/openapi-generator/src/main/resources/kotlin-client/libraries/multiplatform/api.mustache index 232dda06db3c160c45ae3399ada19b0d573beffb..bbae188effd52857e3f578eee5894559fbe88984 100644 --- a/modules/openapi-generator/src/main/resources/kotlin-client/libraries/multiplatform/api.mustache +++ b/modules/openapi-generator/src/main/resources/kotlin-client/libraries/multiplatform/api.mustache @@ -26,12 +26,12 @@ import kotlinx.serialization.encoding.* * {{summary}} * {{notes}} {{#allParams}} * @param {{{paramName}}} {{description}} {{^required}}(optional{{#defaultValue}}, default to {{{.}}}{{/defaultValue}}){{/required}} - {{/allParams}} * @return {{#returnType}}{{{returnType}}}{{/returnType}}{{^returnType}}void{{/returnType}} + {{/allParams}} * @return {{{returnType}}}{{^returnType}}void{{/returnType}} */ {{#returnType}} @Suppress("UNCHECKED_CAST") {{/returnType}} - suspend fun {{operationId}}({{#allParams}}{{{paramName}}}: {{{dataType}}}{{^required}}?{{/required}}{{^-last}}, {{/-last}}{{/allParams}}): HttpResponse<{{#returnType}}{{{returnType}}}{{/returnType}}{{^returnType}}Unit{{/returnType}}> { + suspend fun {{operationId}}({{#allParams}}{{{paramName}}}: {{{dataType}}}{{^required}}?{{/required}}{{^-last}}, {{/-last}}{{/allParams}}): HttpResponse<{{{returnType}}}{{^returnType}}Unit{{/returnType}}> { val localVariableAuthNames = listOf<String>({{#authMethods}}"{{name}}"{{^-last}}, {{/-last}}{{/authMethods}}) diff --git a/modules/openapi-generator/src/main/resources/kotlin-client/libraries/multiplatform/infrastructure/Bytes.kt.mustache b/modules/openapi-generator/src/main/resources/kotlin-client/libraries/multiplatform/infrastructure/Bytes.kt.mustache index e882220ade6dd32352d7cf960892402d4dc5bf13..3ade97210cb07cbfa1ac75a0a54d06c9893dc5eb 100644 --- a/modules/openapi-generator/src/main/resources/kotlin-client/libraries/multiplatform/infrastructure/Bytes.kt.mustache +++ b/modules/openapi-generator/src/main/resources/kotlin-client/libraries/multiplatform/infrastructure/Bytes.kt.mustache @@ -98,5 +98,3 @@ private fun ByteReadPacket.decodeBase64Bytes(): Input = buildPacket { } } } - - diff --git a/modules/openapi-generator/src/main/resources/kotlin-client/licenseInfo.mustache b/modules/openapi-generator/src/main/resources/kotlin-client/licenseInfo.mustache index d77219ff5ee37cb15e31d7af0139d6a394308b2a..d344667db127362f497c78cb7305251fd4c25ff9 100644 --- a/modules/openapi-generator/src/main/resources/kotlin-client/licenseInfo.mustache +++ b/modules/openapi-generator/src/main/resources/kotlin-client/licenseInfo.mustache @@ -3,8 +3,8 @@ * * {{{appDescription}}} * - * {{#version}}The version of the OpenAPI document: {{{version}}}{{/version}} - * {{#infoEmail}}Contact: {{{infoEmail}}}{{/infoEmail}} + * {{#version}}The version of the OpenAPI document: {{{.}}}{{/version}} + * {{#infoEmail}}Contact: {{{.}}}{{/infoEmail}} * * Please note: * This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/modules/openapi-generator/src/main/resources/kotlin-server-deprecated/README.mustache b/modules/openapi-generator/src/main/resources/kotlin-server-deprecated/README.mustache index 24c4728fdd3aa4f0861f3417ad4616eba4db4cfb..aeea405e036294878ea13a140026b44bd6197a22 100644 --- a/modules/openapi-generator/src/main/resources/kotlin-server-deprecated/README.mustache +++ b/modules/openapi-generator/src/main/resources/kotlin-server-deprecated/README.mustache @@ -35,7 +35,7 @@ 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}} +{{#apiInfo}}{{#apis}}{{#operations}}{{#operation}}*{{classname}}* | [**{{operationId}}**]({{apiDocPath}}{{classname}}.md#{{operationIdLowerCase}}) | **{{httpMethod}}** {{path}} | {{{summary}}} {{/operation}}{{/operations}}{{/apis}}{{/apiInfo}} {{/generateApiDocs}} diff --git a/modules/openapi-generator/src/main/resources/kotlin-server-deprecated/api_doc.mustache b/modules/openapi-generator/src/main/resources/kotlin-server-deprecated/api_doc.mustache index 08d90eef4a2b2b4bd08b72633d21710b315e3372..6553762ac7cfc9ee35737ca4ebd03341b3b5cb38 100644 --- a/modules/openapi-generator/src/main/resources/kotlin-server-deprecated/api_doc.mustache +++ b/modules/openapi-generator/src/main/resources/kotlin-server-deprecated/api_doc.mustache @@ -1,22 +1,22 @@ # {{classname}}{{#description}} -{{description}}{{/description}} +{{.}}{{/description}} All URIs are relative to *{{basePath}}* Method | HTTP request | Description ------------- | ------------- | ------------- -{{#operations}}{{#operation}}[**{{operationId}}**]({{classname}}.md#{{operationId}}) | **{{httpMethod}}** {{path}} | {{#summary}}{{summary}}{{/summary}} +{{#operations}}{{#operation}}[**{{operationId}}**]({{classname}}.md#{{operationId}}) | **{{httpMethod}}** {{path}} | {{summary}} {{/operation}}{{/operations}} {{#operations}} {{#operation}} <a name="{{operationId}}"></a> # **{{operationId}}** -> {{#returnType}}{{returnType}} {{/returnType}}{{operationId}}({{#allParams}}{{{paramName}}}{{^-last}}, {{/-last}}{{/allParams}}) +> {{#returnType}}{{.}} {{/returnType}}{{operationId}}({{#allParams}}{{{paramName}}}{{^-last}}, {{/-last}}{{/allParams}}) {{summary}}{{#notes}} -{{notes}}{{/notes}} +{{.}}{{/notes}} ### Example ```kotlin @@ -30,7 +30,7 @@ val apiInstance = {{{classname}}}() val {{{paramName}}} : {{{dataType}}} = {{{example}}} // {{{dataType}}} | {{{description}}} {{/allParams}} try { - {{#returnType}}val result : {{{returnType}}} = {{/returnType}}apiInstance.{{{operationId}}}({{#allParams}}{{{paramName}}}{{^-last}}, {{/-last}}{{/allParams}}){{#returnType}} + {{#returnType}}val result : {{{.}}} = {{/returnType}}apiInstance.{{{operationId}}}({{#allParams}}{{{paramName}}}{{^-last}}, {{/-last}}{{/allParams}}){{#returnType}} println(result){{/returnType}} } catch (e: ClientException) { println("4xx response calling {{{classname}}}#{{{operationId}}}") @@ -45,7 +45,7 @@ try { {{^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}}{{#generateModelDocs}}[**{{dataType}}**]({{baseType}}.md){{/generateModelDocs}}{{^generateModelDocs}}**{{dataType}}**{{/generateModelDocs}}{{/isFile}}{{/isPrimitiveType}}| {{description}} |{{^required}} [optional]{{/required}}{{#defaultValue}} [default to {{defaultValue}}]{{/defaultValue}}{{#allowableValues}} [enum: {{#values}}{{{.}}}{{^-last}}, {{/-last}}{{/values}}]{{/allowableValues}} +{{#allParams}} **{{paramName}}** | {{#isPrimitiveType}}**{{dataType}}**{{/isPrimitiveType}}{{^isPrimitiveType}}{{#isFile}}**{{dataType}}**{{/isFile}}{{^isFile}}{{#generateModelDocs}}[**{{dataType}}**]({{baseType}}.md){{/generateModelDocs}}{{^generateModelDocs}}**{{dataType}}**{{/generateModelDocs}}{{/isFile}}{{/isPrimitiveType}}| {{description}} |{{^required}} [optional]{{/required}}{{#defaultValue}} [default to {{.}}]{{/defaultValue}}{{#allowableValues}} [enum: {{#values}}{{{.}}}{{^-last}}, {{/-last}}{{/values}}]{{/allowableValues}} {{/allParams}} ### Return type diff --git a/modules/openapi-generator/src/main/resources/kotlin-server-deprecated/data_class_opt_var.mustache b/modules/openapi-generator/src/main/resources/kotlin-server-deprecated/data_class_opt_var.mustache index b1060118732055cf5b2a231c4de40130ac14595b..89e3b61240ab95197ebf5a1fd4d040c2ee44745e 100644 --- a/modules/openapi-generator/src/main/resources/kotlin-server-deprecated/data_class_opt_var.mustache +++ b/modules/openapi-generator/src/main/resources/kotlin-server-deprecated/data_class_opt_var.mustache @@ -1,4 +1,4 @@ {{#description}} - /* {{{description}}} */ + /* {{{.}}} */ {{/description}} - {{>modelMutable}} {{{name}}}: {{#isEnum}}{{classname}}.{{nameInCamelCase}}{{/isEnum}}{{^isEnum}}{{{dataType}}}{{/isEnum}}? = {{#defaultvalue}}{{defaultvalue}}{{/defaultvalue}}{{^defaultvalue}}null{{/defaultvalue}} \ No newline at end of file + {{>modelMutable}} {{{name}}}: {{#isEnum}}{{classname}}.{{nameInCamelCase}}{{/isEnum}}{{^isEnum}}{{{dataType}}}{{/isEnum}}? = {{defaultvalue}}{{^defaultvalue}}null{{/defaultvalue}} \ No newline at end of file diff --git a/modules/openapi-generator/src/main/resources/kotlin-server-deprecated/data_class_req_var.mustache b/modules/openapi-generator/src/main/resources/kotlin-server-deprecated/data_class_req_var.mustache index c79bfec01bd0eb7439ddf9f884d4f9f12b93fd81..0da9cbfe3c852589728366e6a4f82d59b8b94501 100644 --- a/modules/openapi-generator/src/main/resources/kotlin-server-deprecated/data_class_req_var.mustache +++ b/modules/openapi-generator/src/main/resources/kotlin-server-deprecated/data_class_req_var.mustache @@ -1,4 +1,4 @@ {{#description}} - /* {{{description}}} */ + /* {{{.}}} */ {{/description}} {{>modelMutable}} {{{name}}}: {{#isEnum}}{{classname}}.{{nameInCamelCase}}{{/isEnum}}{{^isEnum}}{{{dataType}}}{{/isEnum}} \ No newline at end of file diff --git a/modules/openapi-generator/src/main/resources/kotlin-server-deprecated/libraries/ktor/Paths.kt.mustache b/modules/openapi-generator/src/main/resources/kotlin-server-deprecated/libraries/ktor/Paths.kt.mustache index 610f48203aa07349f340f7c57f973310cd880182..f952bdb4d89db93c20b55c9ea0a4f9663ff35e23 100644 --- a/modules/openapi-generator/src/main/resources/kotlin-server-deprecated/libraries/ktor/Paths.kt.mustache +++ b/modules/openapi-generator/src/main/resources/kotlin-server-deprecated/libraries/ktor/Paths.kt.mustache @@ -14,7 +14,7 @@ object Paths { {{^bodyAllowed}} /** * {{summary}} - * {{#unescapedNotes}}{{.}}{{/unescapedNotes}} + * {{unescapedNotes}} {{#allParams}}* @param {{paramName}} {{description}} {{^required}}(optional{{#defaultValue}}, default to {{{.}}}{{/defaultValue}}){{/required}} {{/allParams}}*/ @KtorExperimentalLocationsAPI diff --git a/modules/openapi-generator/src/main/resources/kotlin-server-deprecated/libraries/ktor/README.mustache b/modules/openapi-generator/src/main/resources/kotlin-server-deprecated/libraries/ktor/README.mustache index 4c34e8f6bf2d49eab04fea1d59ef19e1a2fa8e65..4898feaad7b9721952aa6c077c9fb23db1ee9c4c 100644 --- a/modules/openapi-generator/src/main/resources/kotlin-server-deprecated/libraries/ktor/README.mustache +++ b/modules/openapi-generator/src/main/resources/kotlin-server-deprecated/libraries/ktor/README.mustache @@ -52,7 +52,7 @@ 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}} +{{#apiInfo}}{{#apis}}{{#operations}}{{#operation}}*{{classname}}* | [**{{operationId}}**]({{apiDocPath}}{{classname}}.md#{{operationIdLowerCase}}) | **{{httpMethod}}** {{path}} | {{{summary}}} {{/operation}}{{/operations}}{{/apis}}{{/apiInfo}} {{/generateApiDocs}} diff --git a/modules/openapi-generator/src/main/resources/kotlin-server-deprecated/libraries/ktor/licenseInfo.mustache b/modules/openapi-generator/src/main/resources/kotlin-server-deprecated/libraries/ktor/licenseInfo.mustache index 3a547de74bb7a2be286e81242b14c95c0f560690..8d5259173a1b4a1af3099f3c019bce041f91f7a9 100644 --- a/modules/openapi-generator/src/main/resources/kotlin-server-deprecated/libraries/ktor/licenseInfo.mustache +++ b/modules/openapi-generator/src/main/resources/kotlin-server-deprecated/libraries/ktor/licenseInfo.mustache @@ -2,8 +2,8 @@ * {{{appName}}} * {{{appDescription}}} * -* {{#version}}The version of the OpenAPI document: {{{version}}}{{/version}} -* {{#infoEmail}}Contact: {{{infoEmail}}}{{/infoEmail}} +* {{#version}}The version of the OpenAPI document: {{{.}}}{{/version}} +* {{#infoEmail}}Contact: {{{.}}}{{/infoEmail}} * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech diff --git a/modules/openapi-generator/src/main/resources/kotlin-server-deprecated/licenseInfo.mustache b/modules/openapi-generator/src/main/resources/kotlin-server-deprecated/licenseInfo.mustache index 3a547de74bb7a2be286e81242b14c95c0f560690..8d5259173a1b4a1af3099f3c019bce041f91f7a9 100644 --- a/modules/openapi-generator/src/main/resources/kotlin-server-deprecated/licenseInfo.mustache +++ b/modules/openapi-generator/src/main/resources/kotlin-server-deprecated/licenseInfo.mustache @@ -2,8 +2,8 @@ * {{{appName}}} * {{{appDescription}}} * -* {{#version}}The version of the OpenAPI document: {{{version}}}{{/version}} -* {{#infoEmail}}Contact: {{{infoEmail}}}{{/infoEmail}} +* {{#version}}The version of the OpenAPI document: {{{.}}}{{/version}} +* {{#infoEmail}}Contact: {{{.}}}{{/infoEmail}} * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech diff --git a/modules/openapi-generator/src/main/resources/kotlin-server/README.mustache b/modules/openapi-generator/src/main/resources/kotlin-server/README.mustache index 910f1a9c9e21bef40eed6c672bc5304ac160b959..60d9a5dc78dc24734235eaf71b7c6d1291588759 100644 --- a/modules/openapi-generator/src/main/resources/kotlin-server/README.mustache +++ b/modules/openapi-generator/src/main/resources/kotlin-server/README.mustache @@ -35,7 +35,7 @@ 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}} +{{#apiInfo}}{{#apis}}{{#operations}}{{#operation}}*{{classname}}* | [**{{operationId}}**]({{apiDocPath}}{{classname}}.md#{{operationIdLowerCase}}) | **{{httpMethod}}** {{path}} | {{{summary}}} {{/operation}}{{/operations}}{{/apis}}{{/apiInfo}} {{/generateApiDocs}} diff --git a/modules/openapi-generator/src/main/resources/kotlin-server/api_doc.mustache b/modules/openapi-generator/src/main/resources/kotlin-server/api_doc.mustache index 08d90eef4a2b2b4bd08b72633d21710b315e3372..6553762ac7cfc9ee35737ca4ebd03341b3b5cb38 100644 --- a/modules/openapi-generator/src/main/resources/kotlin-server/api_doc.mustache +++ b/modules/openapi-generator/src/main/resources/kotlin-server/api_doc.mustache @@ -1,22 +1,22 @@ # {{classname}}{{#description}} -{{description}}{{/description}} +{{.}}{{/description}} All URIs are relative to *{{basePath}}* Method | HTTP request | Description ------------- | ------------- | ------------- -{{#operations}}{{#operation}}[**{{operationId}}**]({{classname}}.md#{{operationId}}) | **{{httpMethod}}** {{path}} | {{#summary}}{{summary}}{{/summary}} +{{#operations}}{{#operation}}[**{{operationId}}**]({{classname}}.md#{{operationId}}) | **{{httpMethod}}** {{path}} | {{summary}} {{/operation}}{{/operations}} {{#operations}} {{#operation}} <a name="{{operationId}}"></a> # **{{operationId}}** -> {{#returnType}}{{returnType}} {{/returnType}}{{operationId}}({{#allParams}}{{{paramName}}}{{^-last}}, {{/-last}}{{/allParams}}) +> {{#returnType}}{{.}} {{/returnType}}{{operationId}}({{#allParams}}{{{paramName}}}{{^-last}}, {{/-last}}{{/allParams}}) {{summary}}{{#notes}} -{{notes}}{{/notes}} +{{.}}{{/notes}} ### Example ```kotlin @@ -30,7 +30,7 @@ val apiInstance = {{{classname}}}() val {{{paramName}}} : {{{dataType}}} = {{{example}}} // {{{dataType}}} | {{{description}}} {{/allParams}} try { - {{#returnType}}val result : {{{returnType}}} = {{/returnType}}apiInstance.{{{operationId}}}({{#allParams}}{{{paramName}}}{{^-last}}, {{/-last}}{{/allParams}}){{#returnType}} + {{#returnType}}val result : {{{.}}} = {{/returnType}}apiInstance.{{{operationId}}}({{#allParams}}{{{paramName}}}{{^-last}}, {{/-last}}{{/allParams}}){{#returnType}} println(result){{/returnType}} } catch (e: ClientException) { println("4xx response calling {{{classname}}}#{{{operationId}}}") @@ -45,7 +45,7 @@ try { {{^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}}{{#generateModelDocs}}[**{{dataType}}**]({{baseType}}.md){{/generateModelDocs}}{{^generateModelDocs}}**{{dataType}}**{{/generateModelDocs}}{{/isFile}}{{/isPrimitiveType}}| {{description}} |{{^required}} [optional]{{/required}}{{#defaultValue}} [default to {{defaultValue}}]{{/defaultValue}}{{#allowableValues}} [enum: {{#values}}{{{.}}}{{^-last}}, {{/-last}}{{/values}}]{{/allowableValues}} +{{#allParams}} **{{paramName}}** | {{#isPrimitiveType}}**{{dataType}}**{{/isPrimitiveType}}{{^isPrimitiveType}}{{#isFile}}**{{dataType}}**{{/isFile}}{{^isFile}}{{#generateModelDocs}}[**{{dataType}}**]({{baseType}}.md){{/generateModelDocs}}{{^generateModelDocs}}**{{dataType}}**{{/generateModelDocs}}{{/isFile}}{{/isPrimitiveType}}| {{description}} |{{^required}} [optional]{{/required}}{{#defaultValue}} [default to {{.}}]{{/defaultValue}}{{#allowableValues}} [enum: {{#values}}{{{.}}}{{^-last}}, {{/-last}}{{/values}}]{{/allowableValues}} {{/allParams}} ### Return type diff --git a/modules/openapi-generator/src/main/resources/kotlin-server/data_class_opt_var.mustache b/modules/openapi-generator/src/main/resources/kotlin-server/data_class_opt_var.mustache index b1060118732055cf5b2a231c4de40130ac14595b..89e3b61240ab95197ebf5a1fd4d040c2ee44745e 100644 --- a/modules/openapi-generator/src/main/resources/kotlin-server/data_class_opt_var.mustache +++ b/modules/openapi-generator/src/main/resources/kotlin-server/data_class_opt_var.mustache @@ -1,4 +1,4 @@ {{#description}} - /* {{{description}}} */ + /* {{{.}}} */ {{/description}} - {{>modelMutable}} {{{name}}}: {{#isEnum}}{{classname}}.{{nameInCamelCase}}{{/isEnum}}{{^isEnum}}{{{dataType}}}{{/isEnum}}? = {{#defaultvalue}}{{defaultvalue}}{{/defaultvalue}}{{^defaultvalue}}null{{/defaultvalue}} \ No newline at end of file + {{>modelMutable}} {{{name}}}: {{#isEnum}}{{classname}}.{{nameInCamelCase}}{{/isEnum}}{{^isEnum}}{{{dataType}}}{{/isEnum}}? = {{defaultvalue}}{{^defaultvalue}}null{{/defaultvalue}} \ No newline at end of file diff --git a/modules/openapi-generator/src/main/resources/kotlin-server/data_class_req_var.mustache b/modules/openapi-generator/src/main/resources/kotlin-server/data_class_req_var.mustache index c79bfec01bd0eb7439ddf9f884d4f9f12b93fd81..0da9cbfe3c852589728366e6a4f82d59b8b94501 100644 --- a/modules/openapi-generator/src/main/resources/kotlin-server/data_class_req_var.mustache +++ b/modules/openapi-generator/src/main/resources/kotlin-server/data_class_req_var.mustache @@ -1,4 +1,4 @@ {{#description}} - /* {{{description}}} */ + /* {{{.}}} */ {{/description}} {{>modelMutable}} {{{name}}}: {{#isEnum}}{{classname}}.{{nameInCamelCase}}{{/isEnum}}{{^isEnum}}{{{dataType}}}{{/isEnum}} \ No newline at end of file diff --git a/modules/openapi-generator/src/main/resources/kotlin-server/libraries/ktor/Paths.kt.mustache b/modules/openapi-generator/src/main/resources/kotlin-server/libraries/ktor/Paths.kt.mustache index c041a86cdb92fe33779e961a148e6ae2aa24f639..78bad0f2989383875f1c7782443143cdf78980c8 100644 --- a/modules/openapi-generator/src/main/resources/kotlin-server/libraries/ktor/Paths.kt.mustache +++ b/modules/openapi-generator/src/main/resources/kotlin-server/libraries/ktor/Paths.kt.mustache @@ -13,8 +13,8 @@ object Paths { {{#operations}} {{#operation}} /**{{#summary}} - * {{summary}}{{/summary}} - * {{#unescapedNotes}}{{.}}{{/unescapedNotes}} + * {{.}}{{/summary}} + * {{unescapedNotes}} {{#allParams}}* @param {{paramName}} {{description}} {{^required}}(optional{{#defaultValue}}, default to {{{.}}}{{/defaultValue}}){{/required}} {{/allParams}}*/ {{#hasParams}} diff --git a/modules/openapi-generator/src/main/resources/kotlin-server/libraries/ktor/README.mustache b/modules/openapi-generator/src/main/resources/kotlin-server/libraries/ktor/README.mustache index 2763aa259aa8ad23b6aeff2d86eac26a9c17ffc8..9fcf9e41c1695318ec84618d4312dfe280c39102 100644 --- a/modules/openapi-generator/src/main/resources/kotlin-server/libraries/ktor/README.mustache +++ b/modules/openapi-generator/src/main/resources/kotlin-server/libraries/ktor/README.mustache @@ -52,7 +52,7 @@ 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}} +{{#apiInfo}}{{#apis}}{{#operations}}{{#operation}}*{{classname}}* | [**{{operationId}}**]({{apiDocPath}}{{classname}}.md#{{operationIdLowerCase}}) | **{{httpMethod}}** {{path}} | {{{summary}}} {{/operation}}{{/operations}}{{/apis}}{{/apiInfo}} {{/generateApiDocs}} diff --git a/modules/openapi-generator/src/main/resources/kotlin-server/libraries/ktor/licenseInfo.mustache b/modules/openapi-generator/src/main/resources/kotlin-server/libraries/ktor/licenseInfo.mustache index 3a547de74bb7a2be286e81242b14c95c0f560690..8d5259173a1b4a1af3099f3c019bce041f91f7a9 100644 --- a/modules/openapi-generator/src/main/resources/kotlin-server/libraries/ktor/licenseInfo.mustache +++ b/modules/openapi-generator/src/main/resources/kotlin-server/libraries/ktor/licenseInfo.mustache @@ -2,8 +2,8 @@ * {{{appName}}} * {{{appDescription}}} * -* {{#version}}The version of the OpenAPI document: {{{version}}}{{/version}} -* {{#infoEmail}}Contact: {{{infoEmail}}}{{/infoEmail}} +* {{#version}}The version of the OpenAPI document: {{{.}}}{{/version}} +* {{#infoEmail}}Contact: {{{.}}}{{/infoEmail}} * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech diff --git a/modules/openapi-generator/src/main/resources/kotlin-server/licenseInfo.mustache b/modules/openapi-generator/src/main/resources/kotlin-server/licenseInfo.mustache index d890606a94ffa1f2ef6fa7663aae9c902304d980..bf6c9725351a0886d5fdfa50d33034605f65bcd2 100644 --- a/modules/openapi-generator/src/main/resources/kotlin-server/licenseInfo.mustache +++ b/modules/openapi-generator/src/main/resources/kotlin-server/licenseInfo.mustache @@ -2,8 +2,8 @@ * {{{appName}}} * {{{appDescription}}} * - * {{#version}}The version of the OpenAPI document: {{{version}}}{{/version}} - * {{#infoEmail}}Contact: {{{infoEmail}}}{{/infoEmail}} + * {{#version}}The version of the OpenAPI document: {{{.}}}{{/version}} + * {{#infoEmail}}Contact: {{{.}}}{{/infoEmail}} * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech diff --git a/modules/openapi-generator/src/main/resources/kotlin-spring/api.mustache b/modules/openapi-generator/src/main/resources/kotlin-spring/api.mustache index 7eceb8f43aa89c59a1219d7b208ec08c0203347a..bd9ffd24b70d0d9f32a046ab8439788b4fee6651 100644 --- a/modules/openapi-generator/src/main/resources/kotlin-spring/api.mustache +++ b/modules/openapi-generator/src/main/resources/kotlin-spring/api.mustache @@ -58,11 +58,11 @@ class {{classname}}Controller({{#serviceInterface}}@Autowired(required = true) v value = "{{{summary}}}", nickname = "{{{operationId}}}", notes = "{{{notes}}}"{{#returnBaseType}}, - response = {{{returnBaseType}}}::class{{/returnBaseType}}{{#returnContainer}}, - responseContainer = "{{{returnContainer}}}"{{/returnContainer}}{{#hasAuthMethods}}, + response = {{{.}}}::class{{/returnBaseType}}{{#returnContainer}}, + responseContainer = "{{{.}}}"{{/returnContainer}}{{#hasAuthMethods}}, authorizations = [{{#authMethods}}Authorization(value = "{{name}}"{{#isOAuth}}, scopes = [{{#scopes}}AuthorizationScope(scope = "{{scope}}", description = "{{description}}"){{^-last}}, {{/-last}}{{/scopes}}]{{/isOAuth}}){{^-last}}, {{/-last}}{{/authMethods}}]{{/hasAuthMethods}}) @ApiResponses( - value = [{{#responses}}ApiResponse(code = {{{code}}}, message = "{{{message}}}"{{#baseType}}, response = {{{baseType}}}::class{{/baseType}}{{#containerType}}, responseContainer = "{{{containerType}}}"{{/containerType}}){{^-last}},{{/-last}}{{/responses}}]){{/swaggerAnnotations}} + value = [{{#responses}}ApiResponse(code = {{{code}}}, message = "{{{message}}}"{{#baseType}}, response = {{{.}}}::class{{/baseType}}{{#containerType}}, responseContainer = "{{{.}}}"{{/containerType}}){{^-last}},{{/-last}}{{/responses}}]){{/swaggerAnnotations}} @RequestMapping( method = [RequestMethod.{{httpMethod}}], value = ["{{#lambda.escapeDoubleQuote}}{{path}}{{/lambda.escapeDoubleQuote}}"]{{#singleContentTypes}}{{#hasProduces}}, diff --git a/modules/openapi-generator/src/main/resources/kotlin-spring/apiInterface.mustache b/modules/openapi-generator/src/main/resources/kotlin-spring/apiInterface.mustache index 3a2ea440bd1f67d4ddfc76dc916f201812c1be4c..ba447db2d4404123e178793e3804ca79c58fe7ac 100644 --- a/modules/openapi-generator/src/main/resources/kotlin-spring/apiInterface.mustache +++ b/modules/openapi-generator/src/main/resources/kotlin-spring/apiInterface.mustache @@ -66,11 +66,11 @@ interface {{classname}} { value = "{{{summary}}}", nickname = "{{{operationId}}}", notes = "{{{notes}}}"{{#returnBaseType}}, - response = {{{returnBaseType}}}::class{{/returnBaseType}}{{#returnContainer}}, - responseContainer = "{{{returnContainer}}}"{{/returnContainer}}{{#hasAuthMethods}}, + response = {{{.}}}::class{{/returnBaseType}}{{#returnContainer}}, + responseContainer = "{{{.}}}"{{/returnContainer}}{{#hasAuthMethods}}, authorizations = [{{#authMethods}}Authorization(value = "{{name}}"{{#isOAuth}}, scopes = [{{#scopes}}AuthorizationScope(scope = "{{scope}}", description = "{{description}}"){{^-last}}, {{/-last}}{{/scopes}}]{{/isOAuth}}){{^-last}}, {{/-last}}{{/authMethods}}]{{/hasAuthMethods}}) @ApiResponses( - value = [{{#responses}}ApiResponse(code = {{{code}}}, message = "{{{message}}}"{{#baseType}}, response = {{{baseType}}}::class{{/baseType}}{{#containerType}}, responseContainer = "{{{containerType}}}"{{/containerType}}){{^-last}},{{/-last}}{{/responses}}]){{/swaggerAnnotations}} + value = [{{#responses}}ApiResponse(code = {{{code}}}, message = "{{{message}}}"{{#baseType}}, response = {{{.}}}::class{{/baseType}}{{#containerType}}, responseContainer = "{{{.}}}"{{/containerType}}){{^-last}},{{/-last}}{{/responses}}]){{/swaggerAnnotations}} @RequestMapping( method = [RequestMethod.{{httpMethod}}], value = ["{{#lambda.escapeDoubleQuote}}{{path}}{{/lambda.escapeDoubleQuote}}"]{{#singleContentTypes}}{{#hasProduces}}, diff --git a/modules/openapi-generator/src/main/resources/kotlin-spring/beanValidationModel.mustache b/modules/openapi-generator/src/main/resources/kotlin-spring/beanValidationModel.mustache index cb284d39eb25dbad6d1162c2b1860642a469ae8c..3c8872a804b1e0b5f711d6e10db7e18248448bbe 100644 --- a/modules/openapi-generator/src/main/resources/kotlin-spring/beanValidationModel.mustache +++ b/modules/openapi-generator/src/main/resources/kotlin-spring/beanValidationModel.mustache @@ -1,5 +1,5 @@ {{#pattern}} - @get:Pattern(regexp="{{{pattern}}}"){{/pattern}}{{! + @get:Pattern(regexp="{{{.}}}"){{/pattern}}{{! minLength && maxLength set }}{{#minLength}}{{#maxLength}} @get:Size(min={{minLength}},max={{maxLength}}){{/maxLength}}{{/minLength}}{{! @@ -8,7 +8,7 @@ minLength set, maxLength not @get:Size(min={{minLength}}){{/maxLength}}{{/minLength}}{{! minLength not set, maxLength set }}{{^minLength}}{{#maxLength}} - @get:Size(max={{maxLength}}){{/maxLength}}{{/minLength}}{{! + @get:Size(max={{.}}){{/maxLength}}{{/minLength}}{{! @Size: minItems && maxItems set }}{{#minItems}}{{#maxItems}} @get:Size(min={{minItems}},max={{maxItems}}) {{/maxItems}}{{/minItems}}{{! @@ -17,17 +17,17 @@ minLength not set, maxLength set @get:Size(min={{minItems}}){{/maxItems}}{{/minItems}}{{! @Size: minItems not set && maxItems set }}{{^minItems}}{{#maxItems}} - @get:Size(max={{maxItems}}){{/maxItems}}{{/minItems}}{{! + @get:Size(max={{.}}){{/maxItems}}{{/minItems}}{{! check for integer or long / all others=decimal type with @Decimal* isInteger set }}{{#isInteger}}{{#minimum}} - @get:Min({{minimum}}){{/minimum}}{{#maximum}} - @get:Max({{maximum}}){{/maximum}}{{/isInteger}}{{! + @get:Min({{.}}){{/minimum}}{{#maximum}} + @get:Max({{.}}){{/maximum}}{{/isInteger}}{{! isLong set }}{{#isLong}}{{#minimum}} - @get:Min({{minimum}}L){{/minimum}}{{#maximum}} - @get:Max({{maximum}}L){{/maximum}}{{/isLong}}{{! + @get:Min({{.}}L){{/minimum}}{{#maximum}} + @get:Max({{.}}L){{/maximum}}{{/isLong}}{{! Not Integer, not Long => we have a decimal value! }}{{^isInteger}}{{^isLong}}{{#minimum}} - @get:DecimalMin("{{minimum}}"){{/minimum}}{{#maximum}} - @get:DecimalMax("{{maximum}}"){{/maximum}}{{/isLong}}{{/isInteger}} \ No newline at end of file + @get:DecimalMin("{{.}}"){{/minimum}}{{#maximum}} + @get:DecimalMax("{{.}}"){{/maximum}}{{/isLong}}{{/isInteger}} \ No newline at end of file diff --git a/modules/openapi-generator/src/main/resources/kotlin-spring/beanValidationPath.mustache b/modules/openapi-generator/src/main/resources/kotlin-spring/beanValidationPath.mustache index 4b7b561ce708205af04b5283fcf206c5da850ffc..212e32d3dbb2109fb59970730ef0a8821c4a5190 100644 --- a/modules/openapi-generator/src/main/resources/kotlin-spring/beanValidationPath.mustache +++ b/modules/openapi-generator/src/main/resources/kotlin-spring/beanValidationPath.mustache @@ -1,20 +1,20 @@ -{{#pattern}}@Pattern(regexp="{{{pattern}}}") {{/pattern}}{{! +{{#pattern}}@Pattern(regexp="{{{.}}}") {{/pattern}}{{! minLength && maxLength set }}{{#minLength}}{{#maxLength}}@Size(min={{minLength}},max={{maxLength}}) {{/maxLength}}{{/minLength}}{{! minLength set, maxLength not }}{{#minLength}}{{^maxLength}}@Size(min={{minLength}}) {{/maxLength}}{{/minLength}}{{! minLength not set, maxLength set -}}{{^minLength}}{{#maxLength}}@Size(max={{maxLength}}) {{/maxLength}}{{/minLength}}{{! +}}{{^minLength}}{{#maxLength}}@Size(max={{.}}) {{/maxLength}}{{/minLength}}{{! @Size: minItems && maxItems set }}{{#minItems}}{{#maxItems}}@Size(min={{minItems}},max={{maxItems}}) {{/maxItems}}{{/minItems}}{{! @Size: minItems set, maxItems not }}{{#minItems}}{{^maxItems}}@Size(min={{minItems}}) {{/maxItems}}{{/minItems}}{{! @Size: minItems not set && maxItems set -}}{{^minItems}}{{#maxItems}}@Size(max={{maxItems}}) {{/maxItems}}{{/minItems}}{{! +}}{{^minItems}}{{#maxItems}}@Size(max={{.}}) {{/maxItems}}{{/minItems}}{{! check for integer or long / all others=decimal type with @Decimal* isInteger set -}}{{#isInteger}}{{#minimum}}@Min({{minimum}}){{/minimum}}{{#maximum}} @Max({{maximum}}) {{/maximum}}{{/isInteger}}{{! +}}{{#isInteger}}{{#minimum}}@Min({{.}}){{/minimum}}{{#maximum}} @Max({{.}}) {{/maximum}}{{/isInteger}}{{! isLong set -}}{{#isLong}}{{#minimum}}@Min({{minimum}}L){{/minimum}}{{#maximum}} @Max({{maximum}}L) {{/maximum}}{{/isLong}}{{! +}}{{#isLong}}{{#minimum}}@Min({{.}}L){{/minimum}}{{#maximum}} @Max({{.}}L) {{/maximum}}{{/isLong}}{{! Not Integer, not Long => we have a decimal value! -}}{{^isInteger}}{{^isLong}}{{#minimum}}@DecimalMin("{{minimum}}"){{/minimum}}{{#maximum}} @DecimalMax("{{maximum}}") {{/maximum}}{{/isLong}}{{/isInteger}} \ No newline at end of file +}}{{^isInteger}}{{^isLong}}{{#minimum}}@DecimalMin("{{.}}"){{/minimum}}{{#maximum}} @DecimalMax("{{.}}") {{/maximum}}{{/isLong}}{{/isInteger}} \ No newline at end of file diff --git a/modules/openapi-generator/src/main/resources/kotlin-spring/bodyParams.mustache b/modules/openapi-generator/src/main/resources/kotlin-spring/bodyParams.mustache index 240c5464fa580c091cd92a3e7c1e852d85fbb5a7..116cdbdb7d26813f3d89c740f07607a502993022 100644 --- a/modules/openapi-generator/src/main/resources/kotlin-spring/bodyParams.mustache +++ b/modules/openapi-generator/src/main/resources/kotlin-spring/bodyParams.mustache @@ -1 +1 @@ -{{#isBodyParam}}{{#swaggerAnnotations}}@ApiParam(value = "{{{description}}}" {{#required}},required=true{{/required}} {{^isContainer}}{{#allowableValues}}, allowableValues="{{{allowableValues}}}"{{/allowableValues}}{{/isContainer}}{{#defaultValue}}, defaultValue="{{{defaultValue}}}"{{/defaultValue}}){{/swaggerAnnotations}} {{#useBeanValidation}}@Valid{{/useBeanValidation}} @RequestBody{{^required}}(required = false){{/required}} {{paramName}}: {{^reactive}}{{>optionalDataType}}{{/reactive}}{{#reactive}}{{^isArray}}{{>optionalDataType}}{{/isArray}}{{#isArray}}Flow<{{{baseType}}}>{{/isArray}}{{/reactive}}{{/isBodyParam}} \ No newline at end of file +{{#isBodyParam}}{{#swaggerAnnotations}}@ApiParam(value = "{{{description}}}" {{#required}},required=true{{/required}} {{^isContainer}}{{#allowableValues}}, allowableValues="{{{.}}}"{{/allowableValues}}{{/isContainer}}{{#defaultValue}}, defaultValue="{{{.}}}"{{/defaultValue}}){{/swaggerAnnotations}} {{#useBeanValidation}}@Valid{{/useBeanValidation}} @RequestBody{{^required}}(required = false){{/required}} {{paramName}}: {{^reactive}}{{>optionalDataType}}{{/reactive}}{{#reactive}}{{^isArray}}{{>optionalDataType}}{{/isArray}}{{#isArray}}Flow<{{{baseType}}}>{{/isArray}}{{/reactive}}{{/isBodyParam}} \ No newline at end of file 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 38281765a4d66bc0da5b6030e9ad4464ec201c09..c13105bcf5990178750af86daf747488818d164e 100644 --- a/modules/openapi-generator/src/main/resources/kotlin-spring/dataClass.mustache +++ b/modules/openapi-generator/src/main/resources/kotlin-spring/dataClass.mustache @@ -11,7 +11,7 @@ {{/-last}}{{/requiredVars}}{{#hasRequired}}{{#hasOptional}}, {{/hasOptional}}{{/hasRequired}}{{#optionalVars}}{{>dataClassOptVar}}{{^-last}}, {{/-last}}{{/optionalVars}} -) {{/discriminator}}{{#parent}}: {{{parent}}}(){{/parent}}{ +) {{/discriminator}}{{#parent}}: {{{.}}}(){{/parent}}{ {{#discriminator}} {{#requiredVars}} {{>interfaceReqVar}} 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 81badfd31326195d5a1a2733a4fe2c7e6c3443d6..ea6697600045fc56a6fb999bb02e552ec489299a 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}}{{>beanValidation}}{{>beanValidationModel}}{{/useBeanValidation}}{{#swaggerAnnotations}} - @ApiModelProperty({{#example}}example = "{{{example}}}", {{/example}}{{#isReadOnly}}readOnly = {{{isReadOnly}}}, {{/isReadOnly}}value = "{{{description}}}"){{/swaggerAnnotations}}{{#deprecated}} + @ApiModelProperty({{#example}}example = "{{{.}}}", {{/example}}{{#isReadOnly}}readOnly = {{{isReadOnly}}}, {{/isReadOnly}}value = "{{{description}}}"){{/swaggerAnnotations}}{{#deprecated}} @Deprecated(message = ""){{/deprecated}} - @field:JsonProperty("{{{baseName}}}"){{#isInherited}} override{{/isInherited}} {{>modelMutable}} {{{name}}}: {{#isEnum}}{{#isArray}}{{baseType}}<{{/isArray}}{{classname}}.{{nameInCamelCase}}{{#isArray}}>{{/isArray}}{{/isEnum}}{{^isEnum}}{{{dataType}}}{{/isEnum}}? = {{#defaultValue}}{{{defaultValue}}}{{/defaultValue}}{{^defaultValue}}null{{/defaultValue}} \ No newline at end of file + @field:JsonProperty("{{{baseName}}}"){{#isInherited}} override{{/isInherited}} {{>modelMutable}} {{{name}}}: {{#isEnum}}{{#isArray}}{{baseType}}<{{/isArray}}{{classname}}.{{nameInCamelCase}}{{#isArray}}>{{/isArray}}{{/isEnum}}{{^isEnum}}{{{dataType}}}{{/isEnum}}? = {{{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 9e2cddf2d25452da7a0ebd336a3323597e330755..33e838a43fb8482663010c77e511cc57ff84f706 100644 --- a/modules/openapi-generator/src/main/resources/kotlin-spring/dataClassReqVar.mustache +++ b/modules/openapi-generator/src/main/resources/kotlin-spring/dataClassReqVar.mustache @@ -1,3 +1,3 @@ {{#useBeanValidation}}{{>beanValidation}}{{>beanValidationModel}}{{/useBeanValidation}}{{#swaggerAnnotations}} - @ApiModelProperty({{#example}}example = "{{{example}}}", {{/example}}required = true, {{#isReadOnly}}readOnly = {{{isReadOnly}}}, {{/isReadOnly}}value = "{{{description}}}"){{/swaggerAnnotations}} - @field:JsonProperty("{{{baseName}}}", required = true){{#isInherited}} override{{/isInherited}} {{>modelMutable}} {{{name}}}: {{#isEnum}}{{#isArray}}{{baseType}}<{{/isArray}}{{classname}}.{{nameInCamelCase}}{{#isArray}}>{{/isArray}}{{/isEnum}}{{^isEnum}}{{{dataType}}}{{/isEnum}}{{#isReadOnly}}?{{/isReadOnly}}{{#defaultValue}} = {{{defaultValue}}}{{/defaultValue}}{{#isReadOnly}}{{^defaultValue}} = null{{/defaultValue}}{{/isReadOnly}} \ No newline at end of file + @ApiModelProperty({{#example}}example = "{{{.}}}", {{/example}}required = true, {{#isReadOnly}}readOnly = {{{isReadOnly}}}, {{/isReadOnly}}value = "{{{description}}}"){{/swaggerAnnotations}} + @field:JsonProperty("{{{baseName}}}", required = true){{#isInherited}} override{{/isInherited}} {{>modelMutable}} {{{name}}}: {{#isEnum}}{{#isArray}}{{baseType}}<{{/isArray}}{{classname}}.{{nameInCamelCase}}{{#isArray}}>{{/isArray}}{{/isEnum}}{{^isEnum}}{{{dataType}}}{{/isEnum}}{{#isReadOnly}}?{{/isReadOnly}}{{#defaultValue}} = {{{.}}}{{/defaultValue}}{{#isReadOnly}}{{^defaultValue}} = null{{/defaultValue}}{{/isReadOnly}} \ No newline at end of file diff --git a/modules/openapi-generator/src/main/resources/kotlin-spring/formParams.mustache b/modules/openapi-generator/src/main/resources/kotlin-spring/formParams.mustache index f66ddb631ee114d4aca0a01099a90d579a749144..97eeec42693e31570662da49283b0bb74beccc9e 100644 --- a/modules/openapi-generator/src/main/resources/kotlin-spring/formParams.mustache +++ b/modules/openapi-generator/src/main/resources/kotlin-spring/formParams.mustache @@ -1 +1 @@ -{{#isFormParam}}{{^isFile}}{{#swaggerAnnotations}}@ApiParam(value = "{{{description}}}"{{#required}}, required=true{{/required}}{{#allowableValues}}, allowableValues="{{#values}}{{{.}}}{{^-last}}, {{/-last}}{{#-last}}{{/-last}}{{/values}}"{{/allowableValues}}{{#defaultValue}}, defaultValue="{{{defaultValue}}}"{{/defaultValue}}){{/swaggerAnnotations}} @RequestParam(value="{{baseName}}"{{#required}}, required=true{{/required}}{{^required}}, required=false{{/required}}) {{paramName}}: {{>optionalDataType}} {{/isFile}}{{#isFile}}{{#swaggerAnnotations}}@ApiParam(value = "file detail"){{/swaggerAnnotations}} {{#useBeanValidation}}@Valid{{/useBeanValidation}} @RequestPart("file") {{baseName}}: {{>optionalDataType}}{{/isFile}}{{/isFormParam}} +{{#isFormParam}}{{^isFile}}{{#swaggerAnnotations}}@ApiParam(value = "{{{description}}}"{{#required}}, required=true{{/required}}{{#allowableValues}}, allowableValues="{{#values}}{{{.}}}{{^-last}}, {{/-last}}{{#-last}}{{/-last}}{{/values}}"{{/allowableValues}}{{#defaultValue}}, defaultValue="{{{.}}}"{{/defaultValue}}){{/swaggerAnnotations}} @RequestParam(value="{{baseName}}"{{#required}}, required=true{{/required}}{{^required}}, required=false{{/required}}) {{paramName}}: {{>optionalDataType}} {{/isFile}}{{#isFile}}{{#swaggerAnnotations}}@ApiParam(value = "file detail"){{/swaggerAnnotations}} {{#useBeanValidation}}@Valid{{/useBeanValidation}} @RequestPart("file") {{baseName}}: {{>optionalDataType}}{{/isFile}}{{/isFormParam}} diff --git a/modules/openapi-generator/src/main/resources/kotlin-spring/headerParams.mustache b/modules/openapi-generator/src/main/resources/kotlin-spring/headerParams.mustache index aa702dc4546d1ca83dfd68bd2e919008545bc48f..f26bae849c1b0ad1cd6e1cfee38bd21b931612a3 100644 --- a/modules/openapi-generator/src/main/resources/kotlin-spring/headerParams.mustache +++ b/modules/openapi-generator/src/main/resources/kotlin-spring/headerParams.mustache @@ -1 +1 @@ -{{#isHeaderParam}}{{#swaggerAnnotations}}@ApiParam(value = "{{{description}}}" {{#required}},required=true{{/required}}{{#allowableValues}}, allowableValues="{{#values}}{{{.}}}{{^-last}}, {{/-last}}{{#-last}}{{/-last}}{{/values}}"{{/allowableValues}}{{#defaultValue}}, defaultValue="{{{defaultValue}}}"{{/defaultValue}}){{/swaggerAnnotations}} @RequestHeader(value="{{baseName}}", required={{#required}}true{{/required}}{{^required}}false{{/required}}) {{paramName}}: {{>optionalDataType}}{{/isHeaderParam}} \ No newline at end of file +{{#isHeaderParam}}{{#swaggerAnnotations}}@ApiParam(value = "{{{description}}}" {{#required}},required=true{{/required}}{{#allowableValues}}, allowableValues="{{#values}}{{{.}}}{{^-last}}, {{/-last}}{{#-last}}{{/-last}}{{/values}}"{{/allowableValues}}{{#defaultValue}}, defaultValue="{{{.}}}"{{/defaultValue}}){{/swaggerAnnotations}} @RequestHeader(value="{{baseName}}", required={{#required}}true{{/required}}{{^required}}false{{/required}}) {{paramName}}: {{>optionalDataType}}{{/isHeaderParam}} \ No newline at end of file diff --git a/modules/openapi-generator/src/main/resources/kotlin-spring/interfaceOptVar.mustache b/modules/openapi-generator/src/main/resources/kotlin-spring/interfaceOptVar.mustache index 8b3a9b235995d2559c5c374c6ad9482ad41c84b8..0c560f12cffb07dfffbfdc0f79bcbafb8203e532 100644 --- a/modules/openapi-generator/src/main/resources/kotlin-spring/interfaceOptVar.mustache +++ b/modules/openapi-generator/src/main/resources/kotlin-spring/interfaceOptVar.mustache @@ -1,3 +1,3 @@ {{#swaggerAnnotations}} - @ApiModelProperty({{#example}}example = "{{{example}}}", {{/example}}{{#required}}required = {{required}}, {{/required}}{{#isReadOnly}}readOnly = {{{isReadOnly}}}, {{/isReadOnly}}value = "{{{description}}}"){{/swaggerAnnotations}} - {{>modelMutable}} {{{name}}}: {{#isEnum}}{{classname}}.{{nameInCamelCase}}{{/isEnum}}{{^isEnum}}{{{dataType}}}{{/isEnum}}? {{^discriminator}}= {{#defaultvalue}}{{defaultvalue}}{{/defaultvalue}}{{^defaultvalue}}null{{/defaultvalue}}{{/discriminator}} \ No newline at end of file + @ApiModelProperty({{#example}}example = "{{{.}}}", {{/example}}{{#required}}required = {{required}}, {{/required}}{{#isReadOnly}}readOnly = {{{isReadOnly}}}, {{/isReadOnly}}value = "{{{description}}}"){{/swaggerAnnotations}} + {{>modelMutable}} {{{name}}}: {{#isEnum}}{{classname}}.{{nameInCamelCase}}{{/isEnum}}{{^isEnum}}{{{dataType}}}{{/isEnum}}? {{^discriminator}}= {{defaultvalue}}{{^defaultvalue}}null{{/defaultvalue}}{{/discriminator}} \ No newline at end of file diff --git a/modules/openapi-generator/src/main/resources/kotlin-spring/interfaceReqVar.mustache b/modules/openapi-generator/src/main/resources/kotlin-spring/interfaceReqVar.mustache index 747a12292be505b63ae0ea3b832297d7be19ed4f..32119c0dfd099dd3ddadc1165a436e528ceddba0 100644 --- a/modules/openapi-generator/src/main/resources/kotlin-spring/interfaceReqVar.mustache +++ b/modules/openapi-generator/src/main/resources/kotlin-spring/interfaceReqVar.mustache @@ -1,3 +1,3 @@ {{#swaggerAnnotations}} - @ApiModelProperty({{#example}}example = "{{{example}}}", {{/example}}{{#required}}required = {{required}}, {{/required}}{{#isReadOnly}}readOnly = {{{isReadOnly}}}, {{/isReadOnly}}value = "{{{description}}}"){{/swaggerAnnotations}} + @ApiModelProperty({{#example}}example = "{{{.}}}", {{/example}}{{#required}}required = {{required}}, {{/required}}{{#isReadOnly}}readOnly = {{{isReadOnly}}}, {{/isReadOnly}}value = "{{{description}}}"){{/swaggerAnnotations}} {{>modelMutable}} {{{name}}}: {{#isEnum}}{{classname}}.{{nameInCamelCase}}{{/isEnum}}{{^isEnum}}{{{dataType}}}{{/isEnum}} \ No newline at end of file diff --git a/modules/openapi-generator/src/main/resources/kotlin-spring/libraries/spring-boot/README.mustache b/modules/openapi-generator/src/main/resources/kotlin-spring/libraries/spring-boot/README.mustache index c25481e376bbefc7543238f25d58f9d91ea33dc3..c75176bec31a6b1af25002d6bc77b7113faa8281 100644 --- a/modules/openapi-generator/src/main/resources/kotlin-spring/libraries/spring-boot/README.mustache +++ b/modules/openapi-generator/src/main/resources/kotlin-spring/libraries/spring-boot/README.mustache @@ -1,4 +1,4 @@ -# {{#title}}{{title}}{{/title}}{{^title}}Generated Kotlin Spring Boot App{{/title}} +# {{title}}{{^title}}Generated Kotlin Spring Boot App{{/title}} This Kotlin based [Spring Boot](https://spring.io/projects/spring-boot) application has been generated using the [OpenAPI Generator](https://github.com/OpenAPITools/openapi-generator). diff --git a/modules/openapi-generator/src/main/resources/kotlin-spring/pathParams.mustache b/modules/openapi-generator/src/main/resources/kotlin-spring/pathParams.mustache index d83b2d0469eb49f375796741bf5b8c9abd461733..a944d72af26d1271a92372a9f4c53f46e1ebef0c 100644 --- a/modules/openapi-generator/src/main/resources/kotlin-spring/pathParams.mustache +++ b/modules/openapi-generator/src/main/resources/kotlin-spring/pathParams.mustache @@ -1 +1 @@ -{{#isPathParam}}{{#useBeanValidation}}{{>beanValidationPathParams}}{{/useBeanValidation}}{{#swaggerAnnotations}}@ApiParam(value = "{{{description}}}"{{#required}}, required=true{{/required}}{{#allowableValues}}, allowableValues = "{{#enumVars}}{{#lambda.escapeDoubleQuote}}{{{value}}}{{/lambda.escapeDoubleQuote}}{{^-last}}, {{/-last}}{{#-last}}{{/-last}}{{/enumVars}}"{{/allowableValues}}{{#defaultValue}}, defaultValue="{{{defaultValue}}}"{{/defaultValue}}){{/swaggerAnnotations}} @PathVariable("{{baseName}}") {{paramName}}: {{>optionalDataType}}{{/isPathParam}} \ No newline at end of file +{{#isPathParam}}{{#useBeanValidation}}{{>beanValidationPathParams}}{{/useBeanValidation}}{{#swaggerAnnotations}}@ApiParam(value = "{{{description}}}"{{#required}}, required=true{{/required}}{{#allowableValues}}, allowableValues = "{{#enumVars}}{{#lambda.escapeDoubleQuote}}{{{value}}}{{/lambda.escapeDoubleQuote}}{{^-last}}, {{/-last}}{{#-last}}{{/-last}}{{/enumVars}}"{{/allowableValues}}{{#defaultValue}}, defaultValue="{{{.}}}"{{/defaultValue}}){{/swaggerAnnotations}} @PathVariable("{{baseName}}") {{paramName}}: {{>optionalDataType}}{{/isPathParam}} \ No newline at end of file diff --git a/modules/openapi-generator/src/main/resources/kotlin-spring/queryParams.mustache b/modules/openapi-generator/src/main/resources/kotlin-spring/queryParams.mustache index 7fb691c0ddc849f3d03c0f8aa4eb7c99dfd11167..452afdda0a4cc9ba950ce959a13c415f8466a730 100644 --- a/modules/openapi-generator/src/main/resources/kotlin-spring/queryParams.mustache +++ b/modules/openapi-generator/src/main/resources/kotlin-spring/queryParams.mustache @@ -1 +1 @@ -{{#isQueryParam}}{{#useBeanValidation}}{{>beanValidationQueryParams}}{{/useBeanValidation}}{{#swaggerAnnotations}}@ApiParam(value = "{{{description}}}"{{#required}}, required = true{{/required}}{{#allowableValues}}, allowableValues = "{{#values}}{{{.}}}{{^-last}}, {{/-last}}{{#-last}}{{/-last}}{{/values}}"{{/allowableValues}}{{^isContainer}}{{#defaultValue}}, defaultValue = "{{{defaultValue}}}"{{/defaultValue}}{{/isContainer}}) {{#useBeanValidation}}@Valid{{/useBeanValidation}}{{/swaggerAnnotations}}{{^isModel}} @RequestParam(value = "{{baseName}}"{{#required}}, required = true{{/required}}{{^required}}, required = false{{/required}}{{^isContainer}}{{#defaultValue}}, defaultValue="{{{defaultValue}}}"{{/defaultValue}}{{/isContainer}}){{/isModel}}{{#isDate}} @org.springframework.format.annotation.DateTimeFormat(iso = org.springframework.format.annotation.DateTimeFormat.ISO.DATE){{/isDate}}{{#isDateTime}} @org.springframework.format.annotation.DateTimeFormat(iso = org.springframework.format.annotation.DateTimeFormat.ISO.DATE_TIME){{/isDateTime}} {{paramName}}: {{>optionalDataType}}{{/isQueryParam}} \ No newline at end of file +{{#isQueryParam}}{{#useBeanValidation}}{{>beanValidationQueryParams}}{{/useBeanValidation}}{{#swaggerAnnotations}}@ApiParam(value = "{{{description}}}"{{#required}}, required = true{{/required}}{{#allowableValues}}, allowableValues = "{{#values}}{{{.}}}{{^-last}}, {{/-last}}{{#-last}}{{/-last}}{{/values}}"{{/allowableValues}}{{^isContainer}}{{#defaultValue}}, defaultValue = "{{{.}}}"{{/defaultValue}}{{/isContainer}}) {{#useBeanValidation}}@Valid{{/useBeanValidation}}{{/swaggerAnnotations}}{{^isModel}} @RequestParam(value = "{{baseName}}"{{#required}}, required = true{{/required}}{{^required}}, required = false{{/required}}{{^isContainer}}{{#defaultValue}}, defaultValue="{{{.}}}"{{/defaultValue}}{{/isContainer}}){{/isModel}}{{#isDate}} @org.springframework.format.annotation.DateTimeFormat(iso = org.springframework.format.annotation.DateTimeFormat.ISO.DATE){{/isDate}}{{#isDateTime}} @org.springframework.format.annotation.DateTimeFormat(iso = org.springframework.format.annotation.DateTimeFormat.ISO.DATE_TIME){{/isDateTime}} {{paramName}}: {{>optionalDataType}}{{/isQueryParam}} \ No newline at end of file diff --git a/modules/openapi-generator/src/main/resources/kotlin-vertx-server/README.mustache b/modules/openapi-generator/src/main/resources/kotlin-vertx-server/README.mustache index f4db05742d00a09b2f593563da1811f20feea6f2..8eda53012f8163177aa1d101a9e0f6144dbcea78 100644 --- a/modules/openapi-generator/src/main/resources/kotlin-vertx-server/README.mustache +++ b/modules/openapi-generator/src/main/resources/kotlin-vertx-server/README.mustache @@ -27,7 +27,7 @@ This runs all tests and packages the library. Class | Method | HTTP request | Description ------------ | ------------- | ------------- | ------------- - {{#apiInfo}}{{#apis}}{{#operations}}{{#operation}}*{{classname}}* | [**{{operationId}}**]({{apiDocPath}}{{classname}}.md#{{operationIdLowerCase}}) | **{{httpMethod}}** {{path}} | {{#summary}}{{{summary}}}{{/summary}} + {{#apiInfo}}{{#apis}}{{#operations}}{{#operation}}*{{classname}}* | [**{{operationId}}**]({{apiDocPath}}{{classname}}.md#{{operationIdLowerCase}}) | **{{httpMethod}}** {{path}} | {{{summary}}} {{/operation}}{{/operations}}{{/apis}}{{/apiInfo}} {{/generateApiDocs}} diff --git a/modules/openapi-generator/src/main/resources/kotlin-vertx-server/api.mustache b/modules/openapi-generator/src/main/resources/kotlin-vertx-server/api.mustache index 2792719607431920f8e32d6b6d714c40993cdc08..249227c18f3f8278ecbe39c7faaa68c8b5801006 100644 --- a/modules/openapi-generator/src/main/resources/kotlin-vertx-server/api.mustache +++ b/modules/openapi-generator/src/main/resources/kotlin-vertx-server/api.mustache @@ -22,7 +22,7 @@ interface {{classname}} { {{#operation}} /* {{operationId}} * {{summary}} */ - suspend fun {{operationId}}({{#allParams}}{{paramName}}:{{^isFile}}{{{dataType}}}{{/isFile}}{{#isFile}}kotlin.collections.List<java.io.File>{{/isFile}}{{^isRequired}}?{{/isRequired}},{{/allParams}}context:OperationRequest):Response<{{#returnType}}{{{returnType}}}{{/returnType}}{{^returnType}}Void{{/returnType}}> + suspend fun {{operationId}}({{#allParams}}{{paramName}}:{{^isFile}}{{{dataType}}}{{/isFile}}{{#isFile}}kotlin.collections.List<java.io.File>{{/isFile}}{{^isRequired}}?{{/isRequired}},{{/allParams}}context:OperationRequest):Response<{{{returnType}}}{{^returnType}}Void{{/returnType}}> {{/operation}} {{/operations}} companion object { diff --git a/modules/openapi-generator/src/main/resources/kotlin-vertx-server/apiProxy.mustache b/modules/openapi-generator/src/main/resources/kotlin-vertx-server/apiProxy.mustache index 039c912ca28fad61e99e756d83dd0b57c4afb48e..e689c36f3fd8f48993538de5b20c28099c92a24e 100644 --- a/modules/openapi-generator/src/main/resources/kotlin-vertx-server/apiProxy.mustache +++ b/modules/openapi-generator/src/main/resources/kotlin-vertx-server/apiProxy.mustache @@ -79,7 +79,7 @@ class {{classname}}VertxProxyHandler(private val vertx: Vertx, private val servi , object : TypeToken<kotlin.collections.List<{{{baseType}}}>>(){}.type) {{/required}} {{^required}} - val {{paramName}}:{{{dataType}}}? = if({{paramName}}Param == null) {{#defaultValue}}{{defaultValue}}{{/defaultValue}}{{^defaultValue}}null{{/defaultValue}} + val {{paramName}}:{{{dataType}}}? = if({{paramName}}Param == null) {{defaultValue}}{{^defaultValue}}null{{/defaultValue}} else Gson().fromJson({{paramName}}Param.encode(), , object : TypeToken<kotlin.collections.List<{{{baseType}}}>>(){}.type) {{/required}} diff --git a/modules/openapi-generator/src/main/resources/kotlin-vertx-server/api_doc.mustache b/modules/openapi-generator/src/main/resources/kotlin-vertx-server/api_doc.mustache index 4c2a68ade86219ce486a5650a80d44ad69755497..e3882ae5692e665e55655c8d233f057cb340554c 100644 --- a/modules/openapi-generator/src/main/resources/kotlin-vertx-server/api_doc.mustache +++ b/modules/openapi-generator/src/main/resources/kotlin-vertx-server/api_doc.mustache @@ -1,28 +1,28 @@ # {{classname}}{{#description}} -{{description}}{{/description}} +{{.}}{{/description}} All URIs are relative to *{{basePath}}* Method | HTTP request | Description ------------- | ------------- | ------------- -{{#operations}}{{#operation}}[**{{operationId}}**]({{classname}}.md#{{operationId}}) | **{{httpMethod}}** {{path}} | {{#summary}}{{summary}}{{/summary}} +{{#operations}}{{#operation}}[**{{operationId}}**]({{classname}}.md#{{operationId}}) | **{{httpMethod}}** {{path}} | {{summary}} {{/operation}}{{/operations}} {{#operations}} {{#operation}} <a name="{{operationId}}"></a> # **{{operationId}}** -> {{#returnType}}{{returnType}} {{/returnType}}{{operationId}}({{#allParams}}{{{paramName}}}{{^-last}}, {{/-last}}{{/allParams}}) +> {{#returnType}}{{.}} {{/returnType}}{{operationId}}({{#allParams}}{{{paramName}}}{{^-last}}, {{/-last}}{{/allParams}}) {{summary}}{{#notes}} -{{notes}}{{/notes}} +{{.}}{{/notes}} ### 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}}{{#generateModelDocs}}[**{{dataType}}**]({{baseType}}.md){{/generateModelDocs}}{{^generateModelDocs}}**{{dataType}}**{{/generateModelDocs}}{{/isFile}}{{/isPrimitiveType}}| {{description}} |{{^required}} [optional]{{/required}}{{#defaultValue}} [default to {{defaultValue}}]{{/defaultValue}}{{#allowableValues}} [enum: {{#values}}{{{.}}}{{^-last}}, {{/-last}}{{/values}}]{{/allowableValues}} +{{#allParams}} **{{paramName}}** | {{#isPrimitiveType}}**{{dataType}}**{{/isPrimitiveType}}{{^isPrimitiveType}}{{#isFile}}**{{dataType}}**{{/isFile}}{{^isFile}}{{#generateModelDocs}}[**{{dataType}}**]({{baseType}}.md){{/generateModelDocs}}{{^generateModelDocs}}**{{dataType}}**{{/generateModelDocs}}{{/isFile}}{{/isPrimitiveType}}| {{description}} |{{^required}} [optional]{{/required}}{{#defaultValue}} [default to {{.}}]{{/defaultValue}}{{#allowableValues}} [enum: {{#values}}{{{.}}}{{^-last}}, {{/-last}}{{/values}}]{{/allowableValues}} {{/allParams}} ### Return type diff --git a/modules/openapi-generator/src/main/resources/kotlin-vertx-server/data_class_opt_var.mustache b/modules/openapi-generator/src/main/resources/kotlin-vertx-server/data_class_opt_var.mustache index b1060118732055cf5b2a231c4de40130ac14595b..89e3b61240ab95197ebf5a1fd4d040c2ee44745e 100644 --- a/modules/openapi-generator/src/main/resources/kotlin-vertx-server/data_class_opt_var.mustache +++ b/modules/openapi-generator/src/main/resources/kotlin-vertx-server/data_class_opt_var.mustache @@ -1,4 +1,4 @@ {{#description}} - /* {{{description}}} */ + /* {{{.}}} */ {{/description}} - {{>modelMutable}} {{{name}}}: {{#isEnum}}{{classname}}.{{nameInCamelCase}}{{/isEnum}}{{^isEnum}}{{{dataType}}}{{/isEnum}}? = {{#defaultvalue}}{{defaultvalue}}{{/defaultvalue}}{{^defaultvalue}}null{{/defaultvalue}} \ No newline at end of file + {{>modelMutable}} {{{name}}}: {{#isEnum}}{{classname}}.{{nameInCamelCase}}{{/isEnum}}{{^isEnum}}{{{dataType}}}{{/isEnum}}? = {{defaultvalue}}{{^defaultvalue}}null{{/defaultvalue}} \ No newline at end of file diff --git a/modules/openapi-generator/src/main/resources/kotlin-vertx-server/data_class_req_var.mustache b/modules/openapi-generator/src/main/resources/kotlin-vertx-server/data_class_req_var.mustache index 6a5b5280bb74f903431a738c3e6720fb7c5fb1e2..96fc123d9f1dfd405f1bc969834a55d2d6778bac 100644 --- a/modules/openapi-generator/src/main/resources/kotlin-vertx-server/data_class_req_var.mustache +++ b/modules/openapi-generator/src/main/resources/kotlin-vertx-server/data_class_req_var.mustache @@ -1,4 +1,4 @@ {{#description}} - /* {{{description}}} */ + /* {{{.}}} */ {{/description}} @SerializedName("{{{name}}}") private {{>modelMutable}} _{{{name}}}: {{#isEnum}}{{classname}}.{{nameInCamelCase}}{{/isEnum}}{{^isEnum}}{{{dataType}}}{{/isEnum}}? \ No newline at end of file diff --git a/modules/openapi-generator/src/main/resources/kotlin-vertx-server/licenseInfo.mustache b/modules/openapi-generator/src/main/resources/kotlin-vertx-server/licenseInfo.mustache index 3a547de74bb7a2be286e81242b14c95c0f560690..8d5259173a1b4a1af3099f3c019bce041f91f7a9 100644 --- a/modules/openapi-generator/src/main/resources/kotlin-vertx-server/licenseInfo.mustache +++ b/modules/openapi-generator/src/main/resources/kotlin-vertx-server/licenseInfo.mustache @@ -2,8 +2,8 @@ * {{{appName}}} * {{{appDescription}}} * -* {{#version}}The version of the OpenAPI document: {{{version}}}{{/version}} -* {{#infoEmail}}Contact: {{{infoEmail}}}{{/infoEmail}} +* {{#version}}The version of the OpenAPI document: {{{.}}}{{/version}} +* {{#infoEmail}}Contact: {{{.}}}{{/infoEmail}} * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech 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 c728b5c6b2a6fe31598145ecdf79c6cff2d3563d..f225974d1932240afb5aba7dd0e836df34b8b4bc 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 @@ -1,14 +1,14 @@ <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd"> <modelVersion>4.0.0</modelVersion> - + <groupId>{{groupId}}</groupId> <artifactId>{{artifactId}}</artifactId> <version>{{artifactVersion}}</version> <packaging>jar</packaging> - + <name>{{appName}}</name> - + <properties> <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding> <java.version>1.8</java.version> diff --git a/modules/openapi-generator/src/main/resources/ktorm-schema/data_class_bind_field_opt.mustache b/modules/openapi-generator/src/main/resources/ktorm-schema/data_class_bind_field_opt.mustache index 9cb5892ecb7d016bfdfa06beadfffd641ded4c91..4fae4293de59990ddc9b2d351ffca969cf1a8867 100644 --- a/modules/openapi-generator/src/main/resources/ktorm-schema/data_class_bind_field_opt.mustache +++ b/modules/openapi-generator/src/main/resources/ktorm-schema/data_class_bind_field_opt.mustache @@ -1 +1 @@ -{{#vendorExtensions}}{{#x-ktorm-schema}}{{#columnDefinition}} {{{name}}} = row[{{{name}}}] {{#defaultvalue}}?: {{{defaultvalue}}}{{/defaultvalue}} /* {{{colKotlinType}}}? */{{/columnDefinition}}{{/x-ktorm-schema}}{{/vendorExtensions}}{{#description}} /* {{{description}}} */{{/description}} \ No newline at end of file +{{#vendorExtensions}}{{#x-ktorm-schema}}{{#columnDefinition}} {{{name}}} = row[{{{name}}}] {{#defaultvalue}}?: {{{.}}}{{/defaultvalue}} /* {{{colKotlinType}}}? */{{/columnDefinition}}{{/x-ktorm-schema}}{{/vendorExtensions}}{{#description}} /* {{{.}}} */{{/description}} \ No newline at end of file diff --git a/modules/openapi-generator/src/main/resources/ktorm-schema/data_class_bind_field_req.mustache b/modules/openapi-generator/src/main/resources/ktorm-schema/data_class_bind_field_req.mustache index b3af9c69906f9ac86af03b2b0da3e332e746472f..8179517f98e4e2be9bf5fd18099f69b779d5d07a 100644 --- a/modules/openapi-generator/src/main/resources/ktorm-schema/data_class_bind_field_req.mustache +++ b/modules/openapi-generator/src/main/resources/ktorm-schema/data_class_bind_field_req.mustache @@ -1 +1 @@ -{{#vendorExtensions}}{{#x-ktorm-schema}}{{#columnDefinition}} {{{name}}} = row[{{{name}}}]{{#isEnum}} ?: {{{classname}}}.{{{nameInCamelCase}}}.valueOf({{#isString}}""{{/isString}}{{#isNumeric}}0{{/isNumeric}}){{/isEnum}}{{^isEnum}}{{#isString}} ?: ""{{/isString}}{{#isNumeric}} ?: 0{{/isNumeric}}{{#isBoolean}} ?: false{{/isBoolean}}{{/isEnum}} /* {{{colKotlinType}}} */{{/columnDefinition}}{{/x-ktorm-schema}}{{/vendorExtensions}}{{#description}} /* {{{description}}} */{{/description}} \ No newline at end of file +{{#vendorExtensions}}{{#x-ktorm-schema}}{{#columnDefinition}} {{{name}}} = row[{{{name}}}]{{#isEnum}} ?: {{{classname}}}.{{{nameInCamelCase}}}.valueOf({{#isString}}""{{/isString}}{{#isNumeric}}0{{/isNumeric}}){{/isEnum}}{{^isEnum}}{{#isString}} ?: ""{{/isString}}{{#isNumeric}} ?: 0{{/isNumeric}}{{#isBoolean}} ?: false{{/isBoolean}}{{/isEnum}} /* {{{colKotlinType}}} */{{/columnDefinition}}{{/x-ktorm-schema}}{{/vendorExtensions}}{{#description}} /* {{{.}}} */{{/description}} \ No newline at end of file diff --git a/modules/openapi-generator/src/main/resources/ktorm-schema/data_class_bind_list_opt.mustache b/modules/openapi-generator/src/main/resources/ktorm-schema/data_class_bind_list_opt.mustache index 7820b16e3bfb50c75dd312788dded4910503d608..d2f65c89d4bcff4e484f59177d90fdd7e7edd55c 100644 --- a/modules/openapi-generator/src/main/resources/ktorm-schema/data_class_bind_list_opt.mustache +++ b/modules/openapi-generator/src/main/resources/ktorm-schema/data_class_bind_list_opt.mustache @@ -1 +1 @@ -{{#vendorExtensions}}{{#x-ktorm-schema}}{{#columnDefinition}} {{{name}}} = emptyList() /* {{{colKotlinType}}}? */{{/columnDefinition}}{{/x-ktorm-schema}}{{/vendorExtensions}}{{#description}} /* {{{description}}} */{{/description}} \ No newline at end of file +{{#vendorExtensions}}{{#x-ktorm-schema}}{{#columnDefinition}} {{{name}}} = emptyList() /* {{{colKotlinType}}}? */{{/columnDefinition}}{{/x-ktorm-schema}}{{/vendorExtensions}}{{#description}} /* {{{.}}} */{{/description}} \ No newline at end of file diff --git a/modules/openapi-generator/src/main/resources/ktorm-schema/data_class_bind_list_req.mustache b/modules/openapi-generator/src/main/resources/ktorm-schema/data_class_bind_list_req.mustache index bc668b27fd4566cc94e6495a252df8d4bed18e6a..870bc37cdbebbc2a3c70f591505a6a1d5fec0d0a 100644 --- a/modules/openapi-generator/src/main/resources/ktorm-schema/data_class_bind_list_req.mustache +++ b/modules/openapi-generator/src/main/resources/ktorm-schema/data_class_bind_list_req.mustache @@ -1 +1 @@ -{{#vendorExtensions}}{{#x-ktorm-schema}}{{#columnDefinition}} {{{name}}} = emptyList() /* {{{colKotlinType}}} */{{/columnDefinition}}{{/x-ktorm-schema}}{{/vendorExtensions}}{{#description}} /* {{{description}}} */{{/description}} \ No newline at end of file +{{#vendorExtensions}}{{#x-ktorm-schema}}{{#columnDefinition}} {{{name}}} = emptyList() /* {{{colKotlinType}}} */{{/columnDefinition}}{{/x-ktorm-schema}}{{/vendorExtensions}}{{#description}} /* {{{.}}} */{{/description}} \ No newline at end of file diff --git a/modules/openapi-generator/src/main/resources/ktorm-schema/data_class_bind_ref_opt.mustache b/modules/openapi-generator/src/main/resources/ktorm-schema/data_class_bind_ref_opt.mustache index d422a1a812ce7eca5900f92c6c1255313b31747c..6ccaeef34feb9b8896e17461771e112f603dbe36 100644 --- a/modules/openapi-generator/src/main/resources/ktorm-schema/data_class_bind_ref_opt.mustache +++ b/modules/openapi-generator/src/main/resources/ktorm-schema/data_class_bind_ref_opt.mustache @@ -1 +1 @@ -{{#vendorExtensions}}{{#x-ktorm-schema}}{{#columnDefinition}} {{{name}}} = {{{colKotlinType}}}s.createEntity(row, withReferences) /* {{{colKotlinType}}}? */{{/columnDefinition}}{{/x-ktorm-schema}}{{/vendorExtensions}}{{#description}} /* {{{description}}} */{{/description}} \ No newline at end of file +{{#vendorExtensions}}{{#x-ktorm-schema}}{{#columnDefinition}} {{{name}}} = {{{colKotlinType}}}s.createEntity(row, withReferences) /* {{{colKotlinType}}}? */{{/columnDefinition}}{{/x-ktorm-schema}}{{/vendorExtensions}}{{#description}} /* {{{.}}} */{{/description}} \ No newline at end of file diff --git a/modules/openapi-generator/src/main/resources/ktorm-schema/data_class_bind_ref_req.mustache b/modules/openapi-generator/src/main/resources/ktorm-schema/data_class_bind_ref_req.mustache index 0974295d86f9fa963136fe60c7e4cd894a107385..1a246022ce913f1b622bd4c529ff171c1db9f554 100644 --- a/modules/openapi-generator/src/main/resources/ktorm-schema/data_class_bind_ref_req.mustache +++ b/modules/openapi-generator/src/main/resources/ktorm-schema/data_class_bind_ref_req.mustache @@ -1 +1 @@ -{{#vendorExtensions}}{{#x-ktorm-schema}}{{#columnDefinition}} {{{name}}} = {{{colKotlinType}}}s.createEntity(row, withReferences) /* {{{colKotlinType}}} */{{/columnDefinition}}{{/x-ktorm-schema}}{{/vendorExtensions}}{{#description}} /* {{{description}}} */{{/description}} \ No newline at end of file +{{#vendorExtensions}}{{#x-ktorm-schema}}{{#columnDefinition}} {{{name}}} = {{{colKotlinType}}}s.createEntity(row, withReferences) /* {{{colKotlinType}}} */{{/columnDefinition}}{{/x-ktorm-schema}}{{/vendorExtensions}}{{#description}} /* {{{.}}} */{{/description}} \ No newline at end of file diff --git a/modules/openapi-generator/src/main/resources/ktorm-schema/data_class_doc.mustache b/modules/openapi-generator/src/main/resources/ktorm-schema/data_class_doc.mustache index 0046d259079ec71668a3ed380aa7b6619dab52f0..cc544e86dc6c913fad01bc4739872d95cfcb6f39 100644 --- a/modules/openapi-generator/src/main/resources/ktorm-schema/data_class_doc.mustache +++ b/modules/openapi-generator/src/main/resources/ktorm-schema/data_class_doc.mustache @@ -1,4 +1,4 @@ -# Table {{#vendorExtensions}}{{#x-ktorm-schema}}{{#tableDefinition}}`{{tblName}}`{{/tableDefinition}}{{/x-ktorm-schema}}{{/vendorExtensions}} +# Table {{#vendorExtensions}}{{#x-ktorm-schema}}{{#tableDefinition}}`{{tblName}}`{{/tableDefinition}}{{/x-ktorm-schema}}{{/vendorExtensions}} (mapped from: {{classname}}) ## Properties diff --git a/modules/openapi-generator/src/main/resources/ktorm-schema/data_class_enum_opt.mustache b/modules/openapi-generator/src/main/resources/ktorm-schema/data_class_enum_opt.mustache index 03d7f8d40db3d31cb25be07f2491ea443ad5e0b7..dfef01c71bb259604d81cec49c0155a8fe0c7899 100644 --- a/modules/openapi-generator/src/main/resources/ktorm-schema/data_class_enum_opt.mustache +++ b/modules/openapi-generator/src/main/resources/ktorm-schema/data_class_enum_opt.mustache @@ -1,2 +1,2 @@ {{#deprecated}} @Deprecated(message = "This property is deprecated.") -{{/deprecated}}{{#vendorExtensions}}{{#x-ktorm-schema}}{{#columnDefinition}} val {{{name}}} = {{{colType}}}("{{{colName}}}").transform({ {{{classname}}}.{{{nameInCamelCase}}}.valueOf(it ?: {{#allowableValues}}{{#enumVars}}{{#-first}}{{{value}}}{{/-first}}{{/enumVars}}{{/allowableValues}}) }, { it.value }) /* null */{{/columnDefinition}}{{/x-ktorm-schema}}{{/vendorExtensions}}{{#description}} /* {{{description}}} */{{/description}} +{{/deprecated}}{{#vendorExtensions}}{{#x-ktorm-schema}}{{#columnDefinition}} val {{{name}}} = {{{colType}}}("{{{colName}}}").transform({ {{{classname}}}.{{{nameInCamelCase}}}.valueOf(it ?: {{#allowableValues}}{{#enumVars}}{{#-first}}{{{value}}}{{/-first}}{{/enumVars}}{{/allowableValues}}) }, { it.value }) /* null */{{/columnDefinition}}{{/x-ktorm-schema}}{{/vendorExtensions}}{{#description}} /* {{{.}}} */{{/description}} diff --git a/modules/openapi-generator/src/main/resources/ktorm-schema/data_class_enum_req.mustache b/modules/openapi-generator/src/main/resources/ktorm-schema/data_class_enum_req.mustache index 33a3004fbc74e1f8a36e7952e8091f4eaaa29b47..0748525fa8ed1159497ab8ad8d8e42cad2f8ab56 100644 --- a/modules/openapi-generator/src/main/resources/ktorm-schema/data_class_enum_req.mustache +++ b/modules/openapi-generator/src/main/resources/ktorm-schema/data_class_enum_req.mustache @@ -1,2 +1,2 @@ {{#deprecated}} @Deprecated(message = "This property is deprecated.") -{{/deprecated}}{{#vendorExtensions}}{{#x-ktorm-schema}}{{#columnDefinition}} val {{{name}}} = {{{colType}}}("{{{colName}}}").transform({ {{{classname}}}.{{{nameInCamelCase}}}.valueOf(it) }, { it.value }){{/columnDefinition}}{{/x-ktorm-schema}}{{/vendorExtensions}}{{#description}} /* {{{description}}} */{{/description}} \ No newline at end of file +{{/deprecated}}{{#vendorExtensions}}{{#x-ktorm-schema}}{{#columnDefinition}} val {{{name}}} = {{{colType}}}("{{{colName}}}").transform({ {{{classname}}}.{{{nameInCamelCase}}}.valueOf(it) }, { it.value }){{/columnDefinition}}{{/x-ktorm-schema}}{{/vendorExtensions}}{{#description}} /* {{{.}}} */{{/description}} \ No newline at end of file diff --git a/modules/openapi-generator/src/main/resources/ktorm-schema/data_class_field_opt.mustache b/modules/openapi-generator/src/main/resources/ktorm-schema/data_class_field_opt.mustache index 134330d4539812375e98c6d4fc66e58479089db9..cbd8e6915773043c358bf988c61480b3c8027157 100644 --- a/modules/openapi-generator/src/main/resources/ktorm-schema/data_class_field_opt.mustache +++ b/modules/openapi-generator/src/main/resources/ktorm-schema/data_class_field_opt.mustache @@ -1,2 +1,2 @@ {{#deprecated}} @Deprecated(message = "This property is deprecated.") -{{/deprecated}}{{#vendorExtensions}}{{#x-ktorm-schema}}{{#columnDefinition}} val {{{name}}} = {{{colType}}}("{{{colName}}}") /* null */{{/columnDefinition}}{{/x-ktorm-schema}}{{/vendorExtensions}}{{#description}} /* {{{description}}} */{{/description}} \ No newline at end of file +{{/deprecated}}{{#vendorExtensions}}{{#x-ktorm-schema}}{{#columnDefinition}} val {{{name}}} = {{{colType}}}("{{{colName}}}") /* null */{{/columnDefinition}}{{/x-ktorm-schema}}{{/vendorExtensions}}{{#description}} /* {{{.}}} */{{/description}} \ No newline at end of file diff --git a/modules/openapi-generator/src/main/resources/ktorm-schema/data_class_field_req.mustache b/modules/openapi-generator/src/main/resources/ktorm-schema/data_class_field_req.mustache index 09a42c1a1e575b343d4ec8a5fa487340a410770b..f6e769cc698873c761222948b5ba0cf758dc122b 100644 --- a/modules/openapi-generator/src/main/resources/ktorm-schema/data_class_field_req.mustache +++ b/modules/openapi-generator/src/main/resources/ktorm-schema/data_class_field_req.mustache @@ -1,2 +1,2 @@ {{#deprecated}} @Deprecated(message = "This property is deprecated.") -{{/deprecated}}{{#vendorExtensions}}{{#x-ktorm-schema}}{{#columnDefinition}} val {{{name}}} = {{{colType}}}("{{{colName}}}"){{/columnDefinition}}{{/x-ktorm-schema}}{{/vendorExtensions}}{{#description}} /* {{{description}}} */{{/description}} \ No newline at end of file +{{/deprecated}}{{#vendorExtensions}}{{#x-ktorm-schema}}{{#columnDefinition}} val {{{name}}} = {{{colType}}}("{{{colName}}}"){{/columnDefinition}}{{/x-ktorm-schema}}{{/vendorExtensions}}{{#description}} /* {{{.}}} */{{/description}} \ No newline at end of file diff --git a/modules/openapi-generator/src/main/resources/ktorm-schema/ktorm_schema.mustache b/modules/openapi-generator/src/main/resources/ktorm-schema/ktorm_schema.mustache index 56c627d2d60c17faec663b775f5128110bf5877e..83f603f26014c45a5227df8bce192e2a976e4bec 100644 --- a/modules/openapi-generator/src/main/resources/ktorm-schema/ktorm_schema.mustache +++ b/modules/openapi-generator/src/main/resources/ktorm-schema/ktorm_schema.mustache @@ -9,14 +9,14 @@ CREATE DATABASE IF NOT EXISTS `{{{defaultDatabaseName}}}` DEFAULT CHARACTER SET -- -------------------------------------------------------------------------- -- Table structure{{#vendorExtensions}}{{#x-ktorm-schema}}{{#tableDefinition}} for table `{{tblName}}`{{/tableDefinition}}{{/x-ktorm-schema}}{{/vendorExtensions}} generated from model '{{classVarName}}' {{#description}} --- {{description}} +-- {{.}} {{/description}} -- {{#vendorExtensions}} {{#x-ktorm-schema}} {{#tableDefinition}} -CREATE TABLE IF NOT EXISTS {{#defaultDatabaseName}}`{{{defaultDatabaseName}}}`.{{/defaultDatabaseName}}`{{tblName}}` ( +CREATE TABLE IF NOT EXISTS {{#defaultDatabaseName}}`{{{.}}}`.{{/defaultDatabaseName}}`{{tblName}}` ( {{/tableDefinition}} {{/x-ktorm-schema}} {{/vendorExtensions}} @@ -25,7 +25,7 @@ CREATE TABLE IF NOT EXISTS {{#defaultDatabaseName}}`{{{defaultDatabaseName}}}`.{ {{#x-ktorm-schema}} {{#columnDefinition}} {{^isArray}} - `{{colName}}` {{colType}}{{#colTypeArgs}}{{#-first}}({{/-first}}{{#isString}}'{{/isString}}{{argVal}}{{#isString}}'{{/isString}}{{^-last}}, {{/-last}}{{#-last}}){{/-last}}{{/colTypeArgs}}{{#colUnsigned}} UNSIGNED{{/colUnsigned}}{{#colNotNull}} NOT NULL{{/colNotNull}}{{#colPrimaryKey}} PRIMARY KEY{{#isNumeric}} AUTOINCREMENT{{/isNumeric}}{{/colPrimaryKey}}{{#colDefault}} DEFAULT {{#isString}}'{{defaultValue}}'{{/isString}}{{^isString}}{{defaultValue}}{{/isString}}{{/colDefault}}{{#colComment}} /*{{colComment}}*/{{/colComment}}{{^-last}},{{/-last}} + `{{colName}}` {{colType}}{{#colTypeArgs}}{{#-first}}({{/-first}}{{#isString}}'{{/isString}}{{argVal}}{{#isString}}'{{/isString}}{{^-last}}, {{/-last}}{{#-last}}){{/-last}}{{/colTypeArgs}}{{#colUnsigned}} UNSIGNED{{/colUnsigned}}{{#colNotNull}} NOT NULL{{/colNotNull}}{{#colPrimaryKey}} PRIMARY KEY{{#isNumeric}} AUTOINCREMENT{{/isNumeric}}{{/colPrimaryKey}}{{#colDefault}} DEFAULT {{#isString}}'{{defaultValue}}'{{/isString}}{{^isString}}{{defaultValue}}{{/isString}}{{/colDefault}}{{#colComment}} /*{{.}}*/{{/colComment}}{{^-last}},{{/-last}} {{/isArray}} {{/columnDefinition}} {{/x-ktorm-schema}} @@ -34,7 +34,7 @@ CREATE TABLE IF NOT EXISTS {{#defaultDatabaseName}}`{{{defaultDatabaseName}}}`.{ {{#vendorExtensions}} {{#x-ktorm-schema}} {{#tableDefinition}} -); {{#tblComment}} /*{{tblComment}}*/{{/tblComment}} +); {{#tblComment}} /*{{.}}*/{{/tblComment}} {{/tableDefinition}} {{/x-ktorm-schema}} @@ -47,10 +47,10 @@ CREATE TABLE IF NOT EXISTS {{#defaultDatabaseName}}`{{{defaultDatabaseName}}}`.{ -- -------------------------------------------------------------------------- -- Table structure for table `{{relTblName}}` generated from model '{{relName}}' {{#colComment}} --- {{colComment}} +-- {{.}} {{/colComment}} -CREATE TABLE IF NOT EXISTS {{#defaultDatabaseName}}`{{{defaultDatabaseName}}}`.{{/defaultDatabaseName}}`{{relTblName}}` ( +CREATE TABLE IF NOT EXISTS {{#defaultDatabaseName}}`{{{.}}}`.{{/defaultDatabaseName}}`{{relTblName}}` ( `{{{pkColName}}}` {{{pkColType}}} NOT NULL `{{{fkColName}}}` {{{fkColType}}} NOT NULL ); diff --git a/modules/openapi-generator/src/main/resources/ktorm-schema/licenseInfo.mustache b/modules/openapi-generator/src/main/resources/ktorm-schema/licenseInfo.mustache index 3a547de74bb7a2be286e81242b14c95c0f560690..8d5259173a1b4a1af3099f3c019bce041f91f7a9 100644 --- a/modules/openapi-generator/src/main/resources/ktorm-schema/licenseInfo.mustache +++ b/modules/openapi-generator/src/main/resources/ktorm-schema/licenseInfo.mustache @@ -2,8 +2,8 @@ * {{{appName}}} * {{{appDescription}}} * -* {{#version}}The version of the OpenAPI document: {{{version}}}{{/version}} -* {{#infoEmail}}Contact: {{{infoEmail}}}{{/infoEmail}} +* {{#version}}The version of the OpenAPI document: {{{.}}}{{/version}} +* {{#infoEmail}}Contact: {{{.}}}{{/infoEmail}} * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech diff --git a/modules/openapi-generator/src/main/resources/lua/README.mustache b/modules/openapi-generator/src/main/resources/lua/README.mustache index 75f88357c43d5690d49d44aab77e9ce39fc37151..bca3b8ce1ffd96d43a7f16cbdd60af8f7c39dd37 100644 --- a/modules/openapi-generator/src/main/resources/lua/README.mustache +++ b/modules/openapi-generator/src/main/resources/lua/README.mustache @@ -1,7 +1,7 @@ # Lua API client for {{packageName}} {{#appDescriptionWithNewLines}} -{{{appDescriptionWithNewLines}}} +{{{.}}} {{/appDescriptionWithNewLines}} ## Overview @@ -29,7 +29,7 @@ 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}} +{{#apiInfo}}{{#apis}}{{#operations}}{{#operation}}*{{classname}}* | [**{{operationId}}**]({{apiDocPath}}{{classname}}.md#{{operationIdLowerCase}}) | **{{httpMethod}}** {{path}} | {{summary}} {{/operation}}{{/operations}}{{/apis}}{{/apiInfo}} ## Documentation For Models diff --git a/modules/openapi-generator/src/main/resources/lua/api_doc.mustache b/modules/openapi-generator/src/main/resources/lua/api_doc.mustache index 30eaadec0c050d0924f4d04b000ab63eaf736114..fccfb6001a5eb58ca62b76479709d97492cc81d8 100644 --- a/modules/openapi-generator/src/main/resources/lua/api_doc.mustache +++ b/modules/openapi-generator/src/main/resources/lua/api_doc.mustache @@ -1,27 +1,27 @@ # {{invokerPackage}}\{{classname}}{{#description}} -{{description}}{{/description}} +{{.}}{{/description}} All URIs are relative to *{{basePath}}* Method | HTTP request | Description ------------- | ------------- | ------------- -{{#operations}}{{#operation}}[**{{operationId}}**]({{classname}}.md#{{operationId}}) | **{{httpMethod}}** {{path}} | {{#summary}}{{summary}}{{/summary}} +{{#operations}}{{#operation}}[**{{operationId}}**]({{classname}}.md#{{operationId}}) | **{{httpMethod}}** {{path}} | {{summary}} {{/operation}}{{/operations}} {{#operations}} {{#operation}} # **{{{operationId}}}** -> {{#returnType}}{{{returnType}}} {{/returnType}}{{{operationId}}}({{#authMethods}}ctx, {{/authMethods}}{{#allParams}}{{#required}}{{paramName}}{{^-last}}, {{/-last}}{{/required}}{{/allParams}}{{#hasOptionalParams}}optional{{/hasOptionalParams}}) +> {{#returnType}}{{{.}}} {{/returnType}}{{{operationId}}}({{#authMethods}}ctx, {{/authMethods}}{{#allParams}}{{#required}}{{paramName}}{{^-last}}, {{/-last}}{{/required}}{{/allParams}}{{#hasOptionalParams}}optional{{/hasOptionalParams}}) {{{summary}}}{{#notes}} -{{{notes}}}{{/notes}} +{{{.}}}{{/notes}} ### Required Parameters {{^allParams}}This endpoint does not need any parameter.{{/allParams}}{{#allParams}}{{#-last}} Name | Type | Description | Notes ------------- | ------------- | ------------- | -------------{{#authMethods}} **ctx** | **context.Context** | context containing the authentication | nil if no authentication{{/authMethods}}{{/-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}} + **{{paramName}}** | {{#isFile}}**{{dataType}}**{{/isFile}}{{#isPrimitiveType}}**{{dataType}}**{{/isPrimitiveType}}{{^isPrimitiveType}}{{^isFile}}[**{{dataType}}**]({{baseType}}.md){{/isFile}}{{/isPrimitiveType}}| {{description}} | {{#defaultValue}}[default to {{.}}]{{/defaultValue}}{{/required}}{{/allParams}}{{#hasOptionalParams}} **optional** | **map[string]interface{}** | optional parameters | nil if no parameters ### Optional Parameters @@ -29,7 +29,7 @@ Optional parameters are passed through a map[string]interface{}. {{#allParams}}{{#-last}} Name | Type | Description | Notes ------------- | ------------- | ------------- | -------------{{/-last}}{{/allParams}}{{#allParams}} - **{{paramName}}** | {{#isFile}}**{{dataType}}**{{/isFile}}{{#isPrimitiveType}}**{{dataType}}**{{/isPrimitiveType}}{{^isPrimitiveType}}{{^isFile}}[**{{dataType}}**]({{baseType}}.md){{/isFile}}{{/isPrimitiveType}}| {{description}} | {{#defaultValue}}[default to {{defaultValue}}]{{/defaultValue}}{{/allParams}}{{/hasOptionalParams}} + **{{paramName}}** | {{#isFile}}**{{dataType}}**{{/isFile}}{{#isPrimitiveType}}**{{dataType}}**{{/isPrimitiveType}}{{^isPrimitiveType}}{{^isFile}}[**{{dataType}}**]({{baseType}}.md){{/isFile}}{{/isPrimitiveType}}| {{description}} | {{#defaultValue}}[default to {{.}}]{{/defaultValue}}{{/allParams}}{{/hasOptionalParams}} ### Return type diff --git a/modules/openapi-generator/src/main/resources/lua/git_push.sh.mustache b/modules/openapi-generator/src/main/resources/lua/git_push.sh.mustache index 8b3f689c9121a65080ad038d37a2036b01e559a1..f0bed5bd84155f05bc3cdc67af008f524efb38a6 100755 --- a/modules/openapi-generator/src/main/resources/lua/git_push.sh.mustache +++ b/modules/openapi-generator/src/main/resources/lua/git_push.sh.mustache @@ -55,4 +55,3 @@ 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/lua/luarocks.mustache b/modules/openapi-generator/src/main/resources/lua/luarocks.mustache index 8a6325e738a5afe56ffc60f0e1537877e41566a7..2bfe81e78af22ffe59de268ea50e470992bdf3a0 100644 --- a/modules/openapi-generator/src/main/resources/lua/luarocks.mustache +++ b/modules/openapi-generator/src/main/resources/lua/luarocks.mustache @@ -1,7 +1,7 @@ package = "{{{packageName}}}" version = "{{{packageVersion}}}" source = { - url = "https://github.com/{{#gitUserId}}{{.}}{{/gitUserId}}{{^gitUserId}}YOUR_GIT_USERNAME{{/gitUserId}}/{{#gitRepoId}}{{.}}{{/gitRepoId}}{{^gitRepoId}}YOUR_GIT_REPO{{/gitRepoId}}.git" + url = "https://github.com/{{gitUserId}}{{^gitUserId}}YOUR_GIT_USERNAME{{/gitUserId}}/{{gitRepoId}}{{^gitRepoId}}YOUR_GIT_REPO{{/gitRepoId}}.git" } description = { diff --git a/modules/openapi-generator/src/main/resources/lua/partial_header.mustache b/modules/openapi-generator/src/main/resources/lua/partial_header.mustache index d500afe4f6be61c4ba08f2a31d784baf40c5a333..e599d2d3b14eb4429f0e35446744dbc489002a76 100644 --- a/modules/openapi-generator/src/main/resources/lua/partial_header.mustache +++ b/modules/openapi-generator/src/main/resources/lua/partial_header.mustache @@ -1,13 +1,13 @@ --[[ {{#appName}} - {{{appName}}} - + {{{.}}} + {{/appName}} {{#appDescription}} - {{{appDescription}}} - + {{{.}}} + {{/appDescription}} - {{#version}}The version of the OpenAPI document: {{{version}}}{{/version}} - {{#infoEmail}}Contact: {{{infoEmail}}}{{/infoEmail}} + {{#version}}The version of the OpenAPI document: {{{.}}}{{/version}} + {{#infoEmail}}Contact: {{{.}}}{{/infoEmail}} Generated by: https://openapi-generator.tech ]] diff --git a/modules/openapi-generator/src/main/resources/markdown-documentation/README.mustache b/modules/openapi-generator/src/main/resources/markdown-documentation/README.mustache index bd831612b601b5914327cb07542b56ac55326569..1014c9c5768795d638bcc3de5e6e829a249b7653 100644 --- a/modules/openapi-generator/src/main/resources/markdown-documentation/README.mustache +++ b/modules/openapi-generator/src/main/resources/markdown-documentation/README.mustache @@ -8,7 +8,7 @@ All URIs are relative to *{{{basePath}}}* Class | Method | HTTP request | Description ------------ | ------------- | ------------- | ------------- -{{#apiInfo}}{{#apis}}{{#operations}}{{#operation}}*{{classname}}* | [**{{operationId}}**](Apis/{{apiDocPath}}{{classname}}.md#{{operationIdLowerCase}}) | **{{httpMethod}}** {{path}} | {{#summary}}{{{summary}}}{{/summary}}{{^summary}}{{{notes}}}{{/summary}} +{{#apiInfo}}{{#apis}}{{#operations}}{{#operation}}*{{classname}}* | [**{{operationId}}**](Apis/{{apiDocPath}}{{classname}}.md#{{operationIdLowerCase}}) | **{{httpMethod}}** {{path}} | {{{summary}}}{{^summary}}{{{notes}}}{{/summary}} {{/operation}}{{/operations}}{{/apis}}{{/apiInfo}} {{/generateApiDocs}} diff --git a/modules/openapi-generator/src/main/resources/markdown-documentation/api.mustache b/modules/openapi-generator/src/main/resources/markdown-documentation/api.mustache index 2a53e5fb0538f121d2bd32e49c9114babb5d8e1d..6b8a59ea85786df2e5a160dd075b3c10f4dec53d 100644 --- a/modules/openapi-generator/src/main/resources/markdown-documentation/api.mustache +++ b/modules/openapi-generator/src/main/resources/markdown-documentation/api.mustache @@ -1,28 +1,28 @@ # {{classname}}{{#description}} - {{description}}{{/description}} + {{.}}{{/description}} All URIs are relative to *{{basePath}}* Method | HTTP request | Description ------------- | ------------- | ------------- -{{#operations}}{{#operation}}[**{{operationId}}**]({{classname}}.md#{{operationId}}) | **{{httpMethod}}** {{path}} | {{#summary}}{{summary}}{{/summary}} +{{#operations}}{{#operation}}[**{{operationId}}**]({{classname}}.md#{{operationId}}) | **{{httpMethod}}** {{path}} | {{summary}} {{/operation}}{{/operations}} {{#operations}} {{#operation}} <a name="{{operationId}}"></a> # **{{operationId}}** -> {{#returnType}}{{returnType}} {{/returnType}}{{operationId}}({{#allParams}}{{{paramName}}}{{^-last}}, {{/-last}}{{/allParams}}) +> {{#returnType}}{{.}} {{/returnType}}{{operationId}}({{#allParams}}{{{paramName}}}{{^-last}}, {{/-last}}{{/allParams}}) {{summary}}{{#notes}} - {{notes}}{{/notes}} + {{.}}{{/notes}} ### 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}}{{#generateModelDocs}}[**{{dataType}}**](../{{modelPackage}}/{{baseType}}.md){{/generateModelDocs}}{{^generateModelDocs}}**{{dataType}}**{{/generateModelDocs}}{{/isFile}}{{/isPrimitiveType}}| {{description}} |{{^required}} [optional]{{/required}}{{#defaultValue}} [default to {{defaultValue}}]{{/defaultValue}}{{#allowableValues}} [enum: {{#values}}{{{.}}}{{^-last}}, {{/-last}}{{/values}}]{{/allowableValues}} +{{#allParams}} **{{paramName}}** | {{#isPrimitiveType}}**{{dataType}}**{{/isPrimitiveType}}{{^isPrimitiveType}}{{#isFile}}**{{dataType}}**{{/isFile}}{{^isFile}}{{#generateModelDocs}}[**{{dataType}}**](../{{modelPackage}}/{{baseType}}.md){{/generateModelDocs}}{{^generateModelDocs}}**{{dataType}}**{{/generateModelDocs}}{{/isFile}}{{/isPrimitiveType}}| {{description}} |{{^required}} [optional]{{/required}}{{#defaultValue}} [default to {{.}}]{{/defaultValue}}{{#allowableValues}} [enum: {{#values}}{{{.}}}{{^-last}}, {{/-last}}{{/values}}]{{/allowableValues}} {{/allParams}} ### Return type diff --git a/modules/openapi-generator/src/main/resources/mysql-schema/mysql_schema.mustache b/modules/openapi-generator/src/main/resources/mysql-schema/mysql_schema.mustache index 42810e0c6cc21ad26ee57499a4ebffd8cf892c4f..6050b034680cc64b50235875119ac122c89fbfca 100644 --- a/modules/openapi-generator/src/main/resources/mysql-schema/mysql_schema.mustache +++ b/modules/openapi-generator/src/main/resources/mysql-schema/mysql_schema.mustache @@ -14,14 +14,14 @@ CREATE DATABASE IF NOT EXISTS `{{{defaultDatabaseName}}}` DEFAULT CHARACTER SET {{#models}}{{#model}}{{#hasVars}}{{^isArray}}-- -- Table structure{{#vendorExtensions}}{{#x-mysql-schema}}{{#tableDefinition}} for table `{{tblName}}`{{/tableDefinition}}{{/x-mysql-schema}}{{/vendorExtensions}} generated from model '{{classVarName}}' {{#description}} --- {{description}} +-- {{.}} {{/description}} -- {{#vendorExtensions}} {{#x-mysql-schema}} {{#tableDefinition}} -CREATE TABLE IF NOT EXISTS {{#defaultDatabaseName}}`{{{defaultDatabaseName}}}`.{{/defaultDatabaseName}}`{{tblName}}` ( +CREATE TABLE IF NOT EXISTS {{#defaultDatabaseName}}`{{{.}}}`.{{/defaultDatabaseName}}`{{tblName}}` ( {{/tableDefinition}} {{/x-mysql-schema}} {{/vendorExtensions}} @@ -29,7 +29,7 @@ CREATE TABLE IF NOT EXISTS {{#defaultDatabaseName}}`{{{defaultDatabaseName}}}`.{ {{#vendorExtensions}} {{#x-mysql-schema}} {{#columnDefinition}} - `{{colName}}` {{colDataType}}{{#colDataTypeArguments}}{{#-first}}({{/-first}}{{#isString}}'{{/isString}}{{argumentValue}}{{#isString}}'{{/isString}}{{^-last}}, {{/-last}}{{#-last}}){{/-last}}{{/colDataTypeArguments}}{{#colUnsigned}} UNSIGNED{{/colUnsigned}}{{#colNotNull}} NOT NULL{{/colNotNull}}{{#colDefault}} DEFAULT {{#isString}}'{{defaultValue}}'{{/isString}}{{^isString}}{{defaultValue}}{{/isString}}{{/colDefault}}{{#colComment}} COMMENT '{{colComment}}'{{/colComment}}{{^-last}},{{/-last}} + `{{colName}}` {{colDataType}}{{#colDataTypeArguments}}{{#-first}}({{/-first}}{{#isString}}'{{/isString}}{{argumentValue}}{{#isString}}'{{/isString}}{{^-last}}, {{/-last}}{{#-last}}){{/-last}}{{/colDataTypeArguments}}{{#colUnsigned}} UNSIGNED{{/colUnsigned}}{{#colNotNull}} NOT NULL{{/colNotNull}}{{#colDefault}} DEFAULT {{#isString}}'{{defaultValue}}'{{/isString}}{{^isString}}{{defaultValue}}{{/isString}}{{/colDefault}}{{#colComment}} COMMENT '{{.}}'{{/colComment}}{{^-last}},{{/-last}} {{/columnDefinition}} {{/x-mysql-schema}} {{/vendorExtensions}} @@ -37,7 +37,7 @@ CREATE TABLE IF NOT EXISTS {{#defaultDatabaseName}}`{{{defaultDatabaseName}}}`.{ {{#vendorExtensions}} {{#x-mysql-schema}} {{#tableDefinition}} -) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci{{#tblComment}} COMMENT='{{tblComment}}'{{/tblComment}}; +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci{{#tblComment}} COMMENT='{{.}}'{{/tblComment}}; {{/tableDefinition}} {{/x-mysql-schema}} {{/vendorExtensions}} diff --git a/modules/openapi-generator/src/main/resources/mysql-schema/sql_query.mustache b/modules/openapi-generator/src/main/resources/mysql-schema/sql_query.mustache index ebcf061c0e0d094b65512b7eeb394d6bd72a9e46..367074437b65ff7d0c7f8f3dd4ff239808943a75 100644 --- a/modules/openapi-generator/src/main/resources/mysql-schema/sql_query.mustache +++ b/modules/openapi-generator/src/main/resources/mysql-schema/sql_query.mustache @@ -1,6 +1,6 @@ -- -- {{appName}}.{{#defaultDatabaseName}} --- Database: `{{{defaultDatabaseName}}}`{{/defaultDatabaseName}} +-- Database: `{{{.}}}`{{/defaultDatabaseName}} -- Prepared SQL queries for {{#models}}{{#model}}'{{{name}}}'{{/model}}{{/models}} definition. -- @@ -8,20 +8,20 @@ -- -- SELECT template for table {{#vendorExtensions}}{{#x-mysql-schema}}{{#tableDefinition}}`{{tblName}}`{{/tableDefinition}}{{/x-mysql-schema}}{{/vendorExtensions}} -- -SELECT {{#vars}}{{#vendorExtensions}}{{#x-mysql-schema}}{{#columnDefinition}}`{{colName}}`{{^-last}}, {{/-last}}{{/columnDefinition}}{{/x-mysql-schema}}{{/vendorExtensions}}{{/vars}} FROM {{#vendorExtensions}}{{#x-mysql-schema}}{{#tableDefinition}}{{#defaultDatabaseName}}`{{{defaultDatabaseName}}}`.{{/defaultDatabaseName}}`{{tblName}}`{{/tableDefinition}}{{/x-mysql-schema}}{{/vendorExtensions}} WHERE 1; +SELECT {{#vars}}{{#vendorExtensions}}{{#x-mysql-schema}}{{#columnDefinition}}`{{colName}}`{{^-last}}, {{/-last}}{{/columnDefinition}}{{/x-mysql-schema}}{{/vendorExtensions}}{{/vars}} FROM {{#vendorExtensions}}{{#x-mysql-schema}}{{#tableDefinition}}{{#defaultDatabaseName}}`{{{.}}}`.{{/defaultDatabaseName}}`{{tblName}}`{{/tableDefinition}}{{/x-mysql-schema}}{{/vendorExtensions}} WHERE 1; -- -- INSERT template for table {{#vendorExtensions}}{{#x-mysql-schema}}{{#tableDefinition}}`{{tblName}}`{{/tableDefinition}}{{/x-mysql-schema}}{{/vendorExtensions}} -- -INSERT INTO {{#vendorExtensions}}{{#x-mysql-schema}}{{#tableDefinition}}{{#defaultDatabaseName}}`{{{defaultDatabaseName}}}`.{{/defaultDatabaseName}}`{{tblName}}`{{/tableDefinition}}{{/x-mysql-schema}}{{/vendorExtensions}}({{#vars}}{{#vendorExtensions}}{{#x-mysql-schema}}{{#columnDefinition}}`{{colName}}`{{^-last}}, {{/-last}}{{/columnDefinition}}{{/x-mysql-schema}}{{/vendorExtensions}}{{/vars}}) VALUES ({{#vars}}{{#vendorExtensions}}{{#x-mysql-schema}}{{#columnDefinition}}{{#namedParametersEnabled}}:{{colName}}{{/namedParametersEnabled}}{{^namedParametersEnabled}}?{{/namedParametersEnabled}}{{^-last}}, {{/-last}}{{/columnDefinition}}{{/x-mysql-schema}}{{/vendorExtensions}}{{/vars}}); +INSERT INTO {{#vendorExtensions}}{{#x-mysql-schema}}{{#tableDefinition}}{{#defaultDatabaseName}}`{{{.}}}`.{{/defaultDatabaseName}}`{{tblName}}`{{/tableDefinition}}{{/x-mysql-schema}}{{/vendorExtensions}}({{#vars}}{{#vendorExtensions}}{{#x-mysql-schema}}{{#columnDefinition}}`{{colName}}`{{^-last}}, {{/-last}}{{/columnDefinition}}{{/x-mysql-schema}}{{/vendorExtensions}}{{/vars}}) VALUES ({{#vars}}{{#vendorExtensions}}{{#x-mysql-schema}}{{#columnDefinition}}{{#namedParametersEnabled}}:{{colName}}{{/namedParametersEnabled}}{{^namedParametersEnabled}}?{{/namedParametersEnabled}}{{^-last}}, {{/-last}}{{/columnDefinition}}{{/x-mysql-schema}}{{/vendorExtensions}}{{/vars}}); -- -- UPDATE template for table {{#vendorExtensions}}{{#x-mysql-schema}}{{#tableDefinition}}`{{tblName}}`{{/tableDefinition}}{{/x-mysql-schema}}{{/vendorExtensions}} -- -UPDATE {{#vendorExtensions}}{{#x-mysql-schema}}{{#tableDefinition}}{{#defaultDatabaseName}}`{{{defaultDatabaseName}}}`.{{/defaultDatabaseName}}`{{tblName}}`{{/tableDefinition}}{{/x-mysql-schema}}{{/vendorExtensions}} SET {{#vars}}{{#vendorExtensions}}{{#x-mysql-schema}}{{#columnDefinition}}`{{colName}}` = {{#namedParametersEnabled}}:{{colName}}{{/namedParametersEnabled}}{{^namedParametersEnabled}}?{{/namedParametersEnabled}}{{^-last}}, {{/-last}}{{/columnDefinition}}{{/x-mysql-schema}}{{/vendorExtensions}}{{/vars}} WHERE 1; +UPDATE {{#vendorExtensions}}{{#x-mysql-schema}}{{#tableDefinition}}{{#defaultDatabaseName}}`{{{.}}}`.{{/defaultDatabaseName}}`{{tblName}}`{{/tableDefinition}}{{/x-mysql-schema}}{{/vendorExtensions}} SET {{#vars}}{{#vendorExtensions}}{{#x-mysql-schema}}{{#columnDefinition}}`{{colName}}` = {{#namedParametersEnabled}}:{{colName}}{{/namedParametersEnabled}}{{^namedParametersEnabled}}?{{/namedParametersEnabled}}{{^-last}}, {{/-last}}{{/columnDefinition}}{{/x-mysql-schema}}{{/vendorExtensions}}{{/vars}} WHERE 1; -- -- DELETE template for table {{#vendorExtensions}}{{#x-mysql-schema}}{{#tableDefinition}}`{{tblName}}`{{/tableDefinition}}{{/x-mysql-schema}}{{/vendorExtensions}} -- -DELETE FROM {{#vendorExtensions}}{{#x-mysql-schema}}{{#tableDefinition}}{{#defaultDatabaseName}}`{{{defaultDatabaseName}}}`.{{/defaultDatabaseName}}`{{tblName}}`{{/tableDefinition}}{{/x-mysql-schema}}{{/vendorExtensions}} WHERE 0; +DELETE FROM {{#vendorExtensions}}{{#x-mysql-schema}}{{#tableDefinition}}{{#defaultDatabaseName}}`{{{.}}}`.{{/defaultDatabaseName}}`{{tblName}}`{{/tableDefinition}}{{/x-mysql-schema}}{{/vendorExtensions}} WHERE 0; {{/model}}{{/models}} diff --git a/modules/openapi-generator/src/main/resources/nim-client/README.mustache b/modules/openapi-generator/src/main/resources/nim-client/README.mustache index 7f664c25e25e4bd60ab6b9025c77b9ab809f41aa..1cbfe0a4a2465e3c4bd14e1a7b48e489d8f899c0 100644 --- a/modules/openapi-generator/src/main/resources/nim-client/README.mustache +++ b/modules/openapi-generator/src/main/resources/nim-client/README.mustache @@ -1,7 +1,7 @@ # Nim API client for {{{appName}}} (Package: {{{packageName}}}) {{#appDescriptionWithNewLines}} -{{{appDescriptionWithNewLines}}} +{{{.}}} {{/appDescriptionWithNewLines}} ## Overview @@ -32,7 +32,7 @@ All URIs are relative to *{{{basePath}}}* Module | Proc | HTTP request | Description ------------ | ------------- | ------------- | ------------- -{{#apiInfo}}{{#apis}}{{#operations}}{{#operation}}{{{classFilename}}} | {{{operationId}}} | **{{#lambda.uppercase}}{{{httpMethod}}}{{/lambda.uppercase}}** {{{path}}} | {{#summary}}{{{summary}}}{{/summary}} +{{#apiInfo}}{{#apis}}{{#operations}}{{#operation}}{{{classFilename}}} | {{{operationId}}} | **{{#lambda.uppercase}}{{{httpMethod}}}{{/lambda.uppercase}}** {{{path}}} | {{{summary}}} {{/operation}}{{/operations}}{{/apis}}{{/apiInfo}} To generate documentation with Nim DocGen, use: @@ -40,4 +40,3 @@ To generate documentation with Nim DocGen, use: ``` nim doc --project --index:on {{{packageName}}}.nim ``` - diff --git a/modules/openapi-generator/src/main/resources/nim-client/api.mustache b/modules/openapi-generator/src/main/resources/nim-client/api.mustache index 9e464f8661decb1f2629498cad23107093e0cf6b..d80ec8281bc3ac3a4ba938fe184236c5e0d87a45 100644 --- a/modules/openapi-generator/src/main/resources/nim-client/api.mustache +++ b/modules/openapi-generator/src/main/resources/nim-client/api.mustache @@ -12,7 +12,7 @@ import uri {{#imports}}import ../models/{{import}} {{/imports}} -{{#description}}# {{{description}}}{{/description}} +{{#description}}# {{{.}}}{{/description}} const basepath = "{{{basePath}}}" template constructResult[T](response: Response): untyped = @@ -31,12 +31,12 @@ template constructResult[T](response: Response): untyped = (none(T.typedesc), response) {{#operations}}{{#operation}} -proc {{{operationId}}}*(httpClient: HttpClient{{#allParams}}, {{{paramName}}}: {{#isString}}string{{/isString}}{{#isUuid}}string{{/isUuid}}{{^isString}}{{^isUuid}}{{^isPrimitiveType}}{{^isContainer}}{{/isContainer}}{{/isPrimitiveType}}{{#datatypeWithEnum}}{{{.}}}{{/datatypeWithEnum}}{{^datatypeWithEnum}}{{{dataType}}}{{/datatypeWithEnum}}{{/isUuid}}{{/isString}}{{/allParams}}): {{^returnType}}Response{{/returnType}}{{#returnType}}(Option[{{{returnType}}}], Response){{/returnType}}{{#isDeprecated}} {.deprecated.}{{/isDeprecated}} = +proc {{{operationId}}}*(httpClient: HttpClient{{#allParams}}, {{{paramName}}}: {{#isString}}string{{/isString}}{{#isUuid}}string{{/isUuid}}{{^isString}}{{^isUuid}}{{{datatypeWithEnum}}}{{^datatypeWithEnum}}{{{dataType}}}{{/datatypeWithEnum}}{{/isUuid}}{{/isString}}{{/allParams}}): {{^returnType}}Response{{/returnType}}{{#returnType}}(Option[{{{.}}}], Response){{/returnType}}{{#isDeprecated}} {.deprecated.}{{/isDeprecated}} = ## {{{summary}}}{{#hasBodyParam}} httpClient.headers["Content-Type"] = "application/json"{{/hasBodyParam}}{{#hasFormParams}}{{^isMultipart}} httpClient.headers["Content-Type"] = "application/x-www-form-urlencoded"{{/isMultipart}}{{#isMultipart}} httpClient.headers["Content-Type"] = "multipart/form-data"{{/isMultipart}}{{/hasFormParams}}{{#hasHeaderParams}}{{#headerParams}} - httpClient.headers["{{{baseName}}}"] = {{{paramName}}}{{#isArray}}.join(","){{/isArray}}{{/headerParams}}{{#description}} ## {{{description}}}{{/description}}{{/hasHeaderParams}}{{#hasQueryParams}} + httpClient.headers["{{{baseName}}}"] = {{{paramName}}}{{#isArray}}.join(","){{/isArray}}{{/headerParams}}{{#description}} ## {{{.}}}{{/description}}{{/hasHeaderParams}}{{#hasQueryParams}} let query_for_api_call = encodeQuery([{{#queryParams}} ("{{{baseName}}}", ${{{paramName}}}{{#isArray}}.join(","){{/isArray}}), # {{{description}}}{{/queryParams}} ]){{/hasQueryParams}}{{#hasFormParams}}{{^isMultipart}} diff --git a/modules/openapi-generator/src/main/resources/nim-client/header.mustache b/modules/openapi-generator/src/main/resources/nim-client/header.mustache index 6418a7495c4cc9a8492ce3e6e267f8f3727ef7ae..405137e14a1faf45bc43f5f94825d097c584af0c 100644 --- a/modules/openapi-generator/src/main/resources/nim-client/header.mustache +++ b/modules/openapi-generator/src/main/resources/nim-client/header.mustache @@ -1,8 +1,8 @@ #{{#appName}} -# {{{appName}}}{{/appName}} +# {{{.}}}{{/appName}} # {{#appDescription}} -# {{{appDescription}}}{{/appDescription}} -# {{#version}}The version of the OpenAPI document: {{{version}}}{{/version}} -# {{#infoEmail}}Contact: {{{infoEmail}}}{{/infoEmail}} +# {{{.}}}{{/appDescription}} +# {{#version}}The version of the OpenAPI document: {{{.}}}{{/version}} +# {{#infoEmail}}Contact: {{{.}}}{{/infoEmail}} # Generated by: https://openapi-generator.tech # diff --git a/modules/openapi-generator/src/main/resources/nim-client/model.mustache b/modules/openapi-generator/src/main/resources/nim-client/model.mustache index 9595469d3fd1a2074ca06c33eaff058ef6743d51..3fd6f13594dd834fbbf3ff795327d880a4cee9e6 100644 --- a/modules/openapi-generator/src/main/resources/nim-client/model.mustache +++ b/modules/openapi-generator/src/main/resources/nim-client/model.mustache @@ -9,7 +9,7 @@ type {{{enumName}}}* {.pure.} = enum{{#allowableValues}}{{#enumVars}} {{/isEnum}}{{/vars}} type {{{classname}}}* = object ## {{{description}}}{{#vars}} - {{{name}}}*: {{#isEnum}}{{{enumName}}}{{/isEnum}}{{^isEnum}}{{{dataType}}}{{/isEnum}}{{#description}} ## {{{description}}}{{/description}}{{/vars}} + {{{name}}}*: {{#isEnum}}{{{enumName}}}{{/isEnum}}{{^isEnum}}{{{dataType}}}{{/isEnum}}{{#description}} ## {{{.}}}{{/description}}{{/vars}} {{#vars}}{{#isEnum}} func `%`*(v: {{{enumName}}}): JsonNode = let str = case v:{{#allowableValues}}{{#enumVars}} diff --git a/modules/openapi-generator/src/main/resources/nodejs-express-server/config.mustache b/modules/openapi-generator/src/main/resources/nodejs-express-server/config.mustache index 802e103d6f19c88966e229faafb845235a69939d..26e794f4ec02eae60b20c8a94dd527a9e2d6d94c 100644 --- a/modules/openapi-generator/src/main/resources/nodejs-express-server/config.mustache +++ b/modules/openapi-generator/src/main/resources/nodejs-express-server/config.mustache @@ -2,9 +2,9 @@ const path = require('path'); const config = { ROOT_DIR: __dirname, - URL_PORT: {{#serverPort}}{{serverPort}}{{/serverPort}}{{^serverPort}}3000{{/serverPort}}, - URL_PATH: '{{#serverHost}}{{serverHost}}{{/serverHost}}{{^serverHost}}http://localhost{{/serverHost}}', - BASE_VERSION: '{{#contextPath}}{{contextPath}}{{/contextPath}}{{^contextPath}}v2{{/contextPath}}', + URL_PORT: {{serverPort}}{{^serverPort}}3000{{/serverPort}}, + URL_PATH: '{{serverHost}}{{^serverHost}}http://localhost{{/serverHost}}', + BASE_VERSION: '{{contextPath}}{{^contextPath}}v2{{/contextPath}}', CONTROLLER_DIRECTORY: path.join(__dirname, 'controllers'), PROJECT_DIR: __dirname, }; diff --git a/modules/openapi-generator/src/main/resources/nodejs-express-server/service.mustache b/modules/openapi-generator/src/main/resources/nodejs-express-server/service.mustache index 1c6b0cb745a3c39334b3659cbe357973259667f2..3074552c5633afed31bc39f11f504bf502f4bf6c 100644 --- a/modules/openapi-generator/src/main/resources/nodejs-express-server/service.mustache +++ b/modules/openapi-generator/src/main/resources/nodejs-express-server/service.mustache @@ -5,10 +5,10 @@ const Service = require('./Service'); {{#operation}} /** {{#summary}} -* {{{summary}}} +* {{{.}}} {{/summary}} {{#notes}} -* {{{notes}}} +* {{{.}}} {{/notes}} * {{#allParams}} @@ -18,7 +18,7 @@ const Service = require('./Service'); * no response value expected for this operation {{/returnType}} {{#returnType}} -* returns {{{returnType}}} +* returns {{{.}}} {{/returnType}} * */ const {{{operationId}}} = ({{#allParams}}{{#-first}}{ {{/-first}}{{paramName}}{{^-last}}, {{/-last}}{{#-last}} }{{/-last}}{{/allParams}}) => new Promise( diff --git a/modules/openapi-generator/src/main/resources/objc/DefaultConfiguration-body.mustache b/modules/openapi-generator/src/main/resources/objc/DefaultConfiguration-body.mustache index d157d635b5eda6a4658bc8a5eaf81343453c9aee..8606d30ed4e8c4a0b170f5906c5cfe68fad0b43b 100644 --- a/modules/openapi-generator/src/main/resources/objc/DefaultConfiguration-body.mustache +++ b/modules/openapi-generator/src/main/resources/objc/DefaultConfiguration-body.mustache @@ -36,7 +36,7 @@ _mutableApiKey = [NSMutableDictionary dictionary]; _mutableApiKeyPrefix = [NSMutableDictionary dictionary]; _mutableDefaultHeaders = [NSMutableDictionary dictionary]; - {{#httpUserAgent}}_mutableDefaultHeaders[@"User-Agent"] = @"{{httpUserAgent}}";{{/httpUserAgent}} + {{#httpUserAgent}}_mutableDefaultHeaders[@"User-Agent"] = @"{{.}}";{{/httpUserAgent}} _logger = [{{classPrefix}}Logger sharedLogger]; } return self; diff --git a/modules/openapi-generator/src/main/resources/objc/NSManagedObject-header.mustache b/modules/openapi-generator/src/main/resources/objc/NSManagedObject-header.mustache index cfc40a39fa2202e68ef0a4745a3326bf9200811d..c15b84665e01cebfff75487615cfc200a1c7d56e 100644 --- a/modules/openapi-generator/src/main/resources/objc/NSManagedObject-header.mustache +++ b/modules/openapi-generator/src/main/resources/objc/NSManagedObject-header.mustache @@ -17,7 +17,7 @@ NS_ASSUME_NONNULL_BEGIN @property (nullable, nonatomic, retain) NSOrderedSet<{{{arrayModelType}}}ManagedObject*>* entries; {{/isArray}}{{^isArray}} -@interface {{classname}}ManagedObject : {{#parent}}{{{parent}}}ManagedObject{{/parent}}{{^parent}}NSManagedObject{{/parent}} +@interface {{classname}}ManagedObject : {{#parent}}{{{.}}}ManagedObject{{/parent}}{{^parent}}NSManagedObject{{/parent}} {{#vars}} {{#description}}/* {{{description}}} {{^required}}[optional]{{/required}} diff --git a/modules/openapi-generator/src/main/resources/objc/Object-body.mustache b/modules/openapi-generator/src/main/resources/objc/Object-body.mustache index 2bb6d54260937314f0d31b7a21a9422b9dbf7d49..212f8287a48eeb8e666404de85f73335d6fdd8fe 100644 --- a/modules/openapi-generator/src/main/resources/objc/Object-body.mustache +++ b/modules/openapi-generator/src/main/resources/objc/Object-body.mustache @@ -14,7 +14,7 @@ classNames = [NSMutableSet new]; lock = [NSObject new]; }); - + BOOL initSync; @synchronized(lock) { diff --git a/modules/openapi-generator/src/main/resources/objc/QueryParamCollection-body.mustache b/modules/openapi-generator/src/main/resources/objc/QueryParamCollection-body.mustache index b1c901dbffa1ab6cb9ac7258fafd4c4edc36b380..09d90abdd6366388d25a52fa7933b4fe2d268bed 100644 --- a/modules/openapi-generator/src/main/resources/objc/QueryParamCollection-body.mustache +++ b/modules/openapi-generator/src/main/resources/objc/QueryParamCollection-body.mustache @@ -13,7 +13,7 @@ _values = values; _format = format; } - + return self; } diff --git a/modules/openapi-generator/src/main/resources/objc/README.mustache b/modules/openapi-generator/src/main/resources/objc/README.mustache index e816121c6eea50b900ad0a0ba1a081704153c7c1..824bfe1f228091a300ccbacd61ef77be89651a73 100644 --- a/modules/openapi-generator/src/main/resources/objc/README.mustache +++ b/modules/openapi-generator/src/main/resources/objc/README.mustache @@ -1,7 +1,7 @@ # {{podName}} {{#appDescriptionWithNewLines}} -{{{appDescriptionWithNewLines}}} +{{{.}}} {{/appDescriptionWithNewLines}} This ObjC package is automatically generated by the [OpenAPI Generator](https://openapi-generator.tech) project: @@ -108,7 +108,7 @@ 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}} +{{#apiInfo}}{{#apis}}{{#operations}}{{#operation}}*{{classname}}* | [**{{operationId}}**]({{apiDocPath}}{{classname}}.md#{{operationIdLowerCase}}) | **{{httpMethod}}** {{path}} | {{summary}} {{/operation}}{{/operations}}{{/apis}}{{/apiInfo}} ## Documentation For Models @@ -142,4 +142,3 @@ Class | Method | HTTP request | Description {{#apiInfo}}{{#apis}}{{#-last}}{{infoEmail}} {{/-last}}{{/apis}}{{/apiInfo}} - diff --git a/modules/openapi-generator/src/main/resources/objc/api-body.mustache b/modules/openapi-generator/src/main/resources/objc/api-body.mustache index f6de6c27035eeb002172cb30e2ba53e9302c1d3e..29cadf71af9ed19924f4811364c7c340b309fd32 100644 --- a/modules/openapi-generator/src/main/resources/objc/api-body.mustache +++ b/modules/openapi-generator/src/main/resources/objc/api-body.mustache @@ -57,7 +57,7 @@ NSInteger k{{classname}}MissingParamErrorCode = 234513; /// {{{notes}}} /// {{#allParams}} @param {{paramName}} {{{description}}} {{^required}}(optional{{#defaultValue}}, default to {{{.}}}{{/defaultValue}}){{/required}} /// -/// {{/allParams}} @returns {{#returnType}}{{{returnType}}}{{/returnType}}{{^returnType}}void{{/returnType}} +/// {{/allParams}} @returns {{{returnType}}}{{^returnType}}void{{/returnType}} /// -(NSURLSessionTask*) {{#vendorExtensions.x-objc-operationId}}{{vendorExtensions.x-objc-operationId}}{{/vendorExtensions.x-objc-operationId}}{{^vendorExtensions.x-objc-operationId}}{{nickname}}{{#hasParams}}With{{vendorExtensions.x-first-param-alt-name}}{{/hasParams}}{{^hasParams}}WithCompletionHandler: {{/hasParams}}{{/vendorExtensions.x-objc-operationId}}{{#allParams}}{{^-first}} {{paramName}}{{/-first}}: ({{{dataType}}}) {{paramName}}{{/allParams}} diff --git a/modules/openapi-generator/src/main/resources/objc/api-header.mustache b/modules/openapi-generator/src/main/resources/objc/api-header.mustache index 629d257e8850fac0fcec0863f92abc080c9cee41..e111cd1f752dc9a68e57d90d8b38efe9a9e9ed81 100644 --- a/modules/openapi-generator/src/main/resources/objc/api-header.mustache +++ b/modules/openapi-generator/src/main/resources/objc/api-header.mustache @@ -16,13 +16,13 @@ extern NSInteger k{{classname}}MissingParamErrorCode; {{#operations}} {{#operation}} /// {{{summary}}} -/// {{#notes}}{{{notes}}}{{/notes}} +/// {{{notes}}} /// /// {{#allParams}}@param {{paramName}} {{description}}{{^required}} (optional){{/required}}{{#defaultValue}} (default to {{{.}}}){{/defaultValue}} /// {{/allParams}}{{#responses}} /// code:{{{code}}} message:"{{{message}}}"{{^-last}},{{/-last}}{{/responses}} /// -/// @return {{#returnType}}{{{returnType}}}{{/returnType}}{{^returnType}}void{{/returnType}} +/// @return {{{returnType}}}{{^returnType}}void{{/returnType}} -(NSURLSessionTask*) {{#vendorExtensions.x-objc-operationId}}{{vendorExtensions.x-objc-operationId}}{{/vendorExtensions.x-objc-operationId}}{{^vendorExtensions.x-objc-operationId}}{{nickname}}{{#hasParams}}With{{vendorExtensions.x-first-param-alt-name}}{{/hasParams}}{{^hasParams}}WithCompletionHandler: {{/hasParams}}{{/vendorExtensions.x-objc-operationId}}{{#allParams}}{{^-first}} {{paramName}}{{/-first}}: ({{{dataType}}}) {{paramName}}{{/allParams}} {{#hasParams}}completionHandler: {{/hasParams}}(void (^)({{#returnBaseType}}{{{returnType}}} output, {{/returnBaseType}}NSError* error)) handler; diff --git a/modules/openapi-generator/src/main/resources/objc/api_doc.mustache b/modules/openapi-generator/src/main/resources/objc/api_doc.mustache index 2892f80e10572cf02d80ddf49496c6b5f83535f2..861edca9c7f415f334fb89e6c1f127db02dc132f 100644 --- a/modules/openapi-generator/src/main/resources/objc/api_doc.mustache +++ b/modules/openapi-generator/src/main/resources/objc/api_doc.mustache @@ -1,11 +1,11 @@ # {{classname}}{{#description}} -{{description}}{{/description}} +{{.}}{{/description}} All URIs are relative to *{{basePath}}* Method | HTTP request | Description ------------- | ------------- | ------------- -{{#operations}}{{#operation}}[**{{operationId}}**]({{classname}}.md#{{operationIdLowerCase}}) | **{{httpMethod}}** {{path}} | {{#summary}}{{summary}}{{/summary}} +{{#operations}}{{#operation}}[**{{operationId}}**]({{classname}}.md#{{operationIdLowerCase}}) | **{{httpMethod}}** {{path}} | {{summary}} {{/operation}}{{/operations}} {{#operations}} @@ -19,9 +19,9 @@ Method | HTTP request | Description {{{summary}}}{{#notes}} -{{{notes}}}{{/notes}} +{{{.}}}{{/notes}} -### Example +### Example ```objc {{#hasAuthMethods}} {{classPrefix}}DefaultConfiguration *apiConfig = [{{classPrefix}}DefaultConfiguration sharedConfig]; @@ -63,7 +63,7 @@ Method | HTTP request | Description {{^allParams}}This endpoint does not need any parameter.{{/allParams}}{{#allParams}}{{#-last}} Name | Type | Description | Notes ------------- | ------------- | ------------- | -------------{{/-last}}{{/allParams}} -{{#allParams}} **{{paramName}}** | {{#isFile}}**{{dataType}}**{{/isFile}}{{#isPrimitiveType}}**{{dataType}}**{{/isPrimitiveType}}{{^isPrimitiveType}}{{^isFile}}[**{{dataType}}**]({{baseType}}.md){{/isFile}}{{/isPrimitiveType}}| {{description}} | {{^required}}[optional] {{/required}}{{#defaultValue}}[default to {{defaultValue}}]{{/defaultValue}} +{{#allParams}} **{{paramName}}** | {{#isFile}}**{{dataType}}**{{/isFile}}{{#isPrimitiveType}}**{{dataType}}**{{/isPrimitiveType}}{{^isPrimitiveType}}{{^isFile}}[**{{dataType}}**]({{baseType}}.md){{/isFile}}{{/isPrimitiveType}}| {{description}} | {{^required}}[optional] {{/required}}{{#defaultValue}}[default to {{.}}]{{/defaultValue}} {{/allParams}} ### Return type diff --git a/modules/openapi-generator/src/main/resources/objc/git_push.sh.mustache b/modules/openapi-generator/src/main/resources/objc/git_push.sh.mustache index 8b3f689c9121a65080ad038d37a2036b01e559a1..f0bed5bd84155f05bc3cdc67af008f524efb38a6 100644 --- a/modules/openapi-generator/src/main/resources/objc/git_push.sh.mustache +++ b/modules/openapi-generator/src/main/resources/objc/git_push.sh.mustache @@ -55,4 +55,3 @@ 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/objc/gitignore.mustache b/modules/openapi-generator/src/main/resources/objc/gitignore.mustache index 79d9331b6d490961ccd07b1e73282d549c7df10b..01103f6f5ef6961daba1092fc853c92c3e4069c6 100644 --- a/modules/openapi-generator/src/main/resources/objc/gitignore.mustache +++ b/modules/openapi-generator/src/main/resources/objc/gitignore.mustache @@ -44,7 +44,7 @@ Carthage/Build # fastlane # -# It is recommended to not store the screenshots in the git repo. Instead, use fastlane to re-generate the +# 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 diff --git a/modules/openapi-generator/src/main/resources/objc/licenceInfo.mustache b/modules/openapi-generator/src/main/resources/objc/licenceInfo.mustache index 8dccb09625d3b221ada5c09278574644bdae39c1..fc6063ae4cab22a37d9d07e819768f02dfac11d9 100644 --- a/modules/openapi-generator/src/main/resources/objc/licenceInfo.mustache +++ b/modules/openapi-generator/src/main/resources/objc/licenceInfo.mustache @@ -2,8 +2,8 @@ * {{{appName}}} * {{{appDescription}}} * -* {{#version}}The version of the OpenAPI document: {{{version}}}{{/version}} -* {{#infoEmail}}Contact: {{{infoEmail}}}{{/infoEmail}} +* {{#version}}The version of the OpenAPI document: {{{.}}}{{/version}} +* {{#infoEmail}}Contact: {{{.}}}{{/infoEmail}} * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech diff --git a/modules/openapi-generator/src/main/resources/objc/model-header.mustache b/modules/openapi-generator/src/main/resources/objc/model-header.mustache index 07f671c99ffc579498c35e645978187d385c5ef4..639527db216c92be245be0e81ddd9221052f3f75 100644 --- a/modules/openapi-generator/src/main/resources/objc/model-header.mustache +++ b/modules/openapi-generator/src/main/resources/objc/model-header.mustache @@ -17,7 +17,7 @@ @protocol {{classname}} @end -@interface {{classname}} : {{#parent}}{{{parent}}}{{/parent}}{{^parent}}{{classPrefix}}Object{{/parent}} +@interface {{classname}} : {{{parent}}}{{^parent}}{{classPrefix}}Object{{/parent}} {{#vars}} {{#description}}/* {{{description}}} {{^required}}[optional]{{/required}} diff --git a/modules/openapi-generator/src/main/resources/objc/podspec.mustache b/modules/openapi-generator/src/main/resources/objc/podspec.mustache index 7ed5702c6c0cb1f00f4dfba99376a694d7def7cf..ba71eb150f6396a8b9cca604b2dcb38086c44a1c 100644 --- a/modules/openapi-generator/src/main/resources/objc/podspec.mustache +++ b/modules/openapi-generator/src/main/resources/objc/podspec.mustache @@ -22,7 +22,7 @@ Pod::Spec.new do |s| {{^useCoreData}}s.framework = 'SystemConfiguration'{{/useCoreData}}{{#useCoreData}}s.frameworks = 'SystemConfiguration', 'CoreData'{{/useCoreData}} s.homepage = "{{gitRepoURL}}" - s.license = "{{#license}}{{license}}{{/license}}{{^license}}Apache License, Version 2.0{{/license}}" + s.license = "{{license}}{{^license}}Apache License, Version 2.0{{/license}}" s.source = { :git => "{{gitRepoURL}}.git", :tag => "#{s.version}" } s.author = { "{{authorName}}" => "{{authorEmail}}" } @@ -34,4 +34,3 @@ Pod::Spec.new do |s| s.dependency 'JSONModel', '~> 1.2' s.dependency 'ISO8601', '~> 0.6' end - diff --git a/modules/openapi-generator/src/main/resources/ocaml/api-intf.mustache b/modules/openapi-generator/src/main/resources/ocaml/api-intf.mustache index 673f4407755aed1bc1a4e711f50acb4a599460ad..fb6715f6d8beff64837fe134ea024bd534341d6f 100644 --- a/modules/openapi-generator/src/main/resources/ocaml/api-intf.mustache +++ b/modules/openapi-generator/src/main/resources/ocaml/api-intf.mustache @@ -10,6 +10,6 @@ {{#operations}} {{#operation}} -val {{{operationId}}} : {{^hasParams}}unit{{/hasParams}}{{#allParams}}{{#required}}{{{paramName}}}{{/required}}{{^required}}{{^isBodyParam}}?{{/isBodyParam}}{{{paramName}}}{{/required}}:{{#isEnum}}Enums.{{{datatypeWithEnum}}}{{/isEnum}}{{^isEnum}}{{{dataType}}}{{/isEnum}}{{^-last}} -> {{/-last}}{{#-last}}{{^required}} -> unit{{/required}}{{/-last}}{{/allParams}} -> {{#returnType}}{{{returnType}}}{{/returnType}}{{^returnType}}unit{{/returnType}} Lwt.t +val {{{operationId}}} : {{^hasParams}}unit{{/hasParams}}{{#allParams}}{{#required}}{{{paramName}}}{{/required}}{{^required}}{{^isBodyParam}}?{{/isBodyParam}}{{{paramName}}}{{/required}}:{{#isEnum}}Enums.{{{datatypeWithEnum}}}{{/isEnum}}{{^isEnum}}{{{dataType}}}{{/isEnum}}{{^-last}} -> {{/-last}}{{#-last}}{{^required}} -> unit{{/required}}{{/-last}}{{/allParams}} -> {{{returnType}}}{{^returnType}}unit{{/returnType}} Lwt.t {{/operation}} {{/operations}} diff --git a/modules/openapi-generator/src/main/resources/ocaml/model.mustache b/modules/openapi-generator/src/main/resources/ocaml/model.mustache index 8a77aa35b8981313ef030bdbaca88d46fff5da7b..d80e92c3055bee1b11c33590d9d1b7e68f2613fd 100644 --- a/modules/openapi-generator/src/main/resources/ocaml/model.mustache +++ b/modules/openapi-generator/src/main/resources/ocaml/model.mustache @@ -13,10 +13,10 @@ type t = { {{#vars}} {{#description}} - (* {{{description}}} *) + (* {{{.}}} *) {{/description}} {{#isEnum}} - {{{name}}}: {{^isMap}}Enums.{{/isMap}}{{{datatypeWithEnum}}}{{^isContainer}}{{#required}}{{#defaultValue}}[@default {{{defaultValue}}}]{{/defaultValue}}{{/required}}{{/isContainer}}{{^isContainer}}{{#required}}{{#isNullable}} option [@default {{#defaultValue}}Some({{{defaultValue}}}){{/defaultValue}}{{^defaultValue}}None{{/defaultValue}}]{{/isNullable}}{{/required}}{{/isContainer}}{{^isContainer}}{{^required}} option [@default {{#defaultValue}}Some({{{defaultValue}}}){{/defaultValue}}{{^defaultValue}}None{{/defaultValue}}]{{/required}}{{/isContainer}}; + {{{name}}}: {{^isMap}}Enums.{{/isMap}}{{{datatypeWithEnum}}}{{^isContainer}}{{#required}}{{#defaultValue}}[@default {{{.}}}]{{/defaultValue}}{{/required}}{{/isContainer}}{{^isContainer}}{{#required}}{{#isNullable}} option [@default {{#defaultValue}}Some({{{.}}}){{/defaultValue}}{{^defaultValue}}None{{/defaultValue}}]{{/isNullable}}{{/required}}{{/isContainer}}{{^isContainer}}{{^required}} option [@default {{#defaultValue}}Some({{{.}}}){{/defaultValue}}{{^defaultValue}}None{{/defaultValue}}]{{/required}}{{/isContainer}}; {{/isEnum}} {{^isEnum}} {{{name}}}: {{{datatypeWithEnum}}}{{^isContainer}}{{#required}}{{#isNullable}} option{{/isNullable}}{{/required}}{{/isContainer}}{{^isContainer}}{{^required}} option [@default None]{{/required}}{{/isContainer}}; @@ -25,7 +25,7 @@ type t = { } [@@deriving yojson { strict = false }, show ];; {{#description}} -(** {{{description}}} *) +(** {{{.}}} *) {{/description}} let create {{#requiredVars}}({{{name}}} : {{#isEnum}}Enums.{{{datatypeWithEnum}}}{{/isEnum}}{{^isEnum}}{{{dataType}}}{{/isEnum}}{{#isNullable}} option{{/isNullable}}){{^-last}} {{/-last}}{{/requiredVars}}{{^hasRequired}}(){{/hasRequired}} : t = { {{#vars}} diff --git a/modules/openapi-generator/src/main/resources/ocaml/readme.mustache b/modules/openapi-generator/src/main/resources/ocaml/readme.mustache index 906db4d647aa2f1a93f7b8d77b42e344ae6bc446..b3c61100270fdefec7b7a56cb3f3f5a51cbbef72 100644 --- a/modules/openapi-generator/src/main/resources/ocaml/readme.mustache +++ b/modules/openapi-generator/src/main/resources/ocaml/readme.mustache @@ -1,6 +1,6 @@ # {{{projectName}}} {{#appDescriptionWithNewLines}} -{{{appDescriptionWithNewLines}}} +{{{.}}} {{/appDescriptionWithNewLines}} This OCaml package is automatically generated by the [OpenAPI Generator](https://openapi-generator.tech) project: @@ -32,4 +32,3 @@ dune build ## Getting Started TODO - diff --git a/modules/openapi-generator/src/main/resources/ocaml/support.mustache b/modules/openapi-generator/src/main/resources/ocaml/support.mustache index bc6d7a86f9821a27a7fc1b7e1966b80d5ed84c84..14d5ba0d5793733247ba80d1b04f6c90d1ecca2c 100644 --- a/modules/openapi-generator/src/main/resources/ocaml/support.mustache +++ b/modules/openapi-generator/src/main/resources/ocaml/support.mustache @@ -39,8 +39,8 @@ let handle_response resp on_success_handler = | #Cohttp.Code.success_status -> on_success_handler () | s -> failwith ("Server responded with status " ^ Cohttp.Code.(reason_phrase_of_code (code_of_status s))) -let handle_unit_response resp = handle_response resp (fun () -> Lwt.return ()) - +let handle_unit_response resp = handle_response resp (fun () -> Lwt.return ()) + let read_json_body resp body = handle_response resp (fun () -> (Lwt.(Cohttp_lwt.Body.to_string body >|= Yojson.Safe.from_string))) diff --git a/modules/openapi-generator/src/main/resources/openapi-static/operation.mustache b/modules/openapi-generator/src/main/resources/openapi-static/operation.mustache index bd7b7444c8fc57f5ae19742e30a98783fe17cd58..67c6a07f3965e9bb5de14b8eadc61f0947a698fc 100644 --- a/modules/openapi-generator/src/main/resources/openapi-static/operation.mustache +++ b/modules/openapi-generator/src/main/resources/openapi-static/operation.mustache @@ -7,7 +7,7 @@ <h2><a name="{{nickname}}"></a>{{nickname}}</h2> <hr> <p>{{description}}</p> - {{#notes}}<p>{{notes}}</p>{{/notes}} + {{#notes}}<p>{{.}}</p>{{/notes}} <h3 class="section">URL</h3> <code>{{basePath}}{{path}}</code> <h3 class="section">HTTP Method</h3> @@ -24,7 +24,7 @@ {{#isHeaderParam}}<span class="param-in">Header: </span>{{/isHeaderParam}} {{#isBodyParam}}<span class="param-in">Body: </span>{{/isBodyParam}} <span class="param-name">{{baseName}}</span> - <span class="param-type">{{dataType}}{{#baseType}}({{baseType}}){{/baseType}}</span> + <span class="param-type">{{dataType}}{{#baseType}}({{.}}){{/baseType}}</span> {{#optional}}<span class="param-optional-flag">(optional)</span>{{/optional}} <p class="param-description">{{description}}</p> </li> diff --git a/modules/openapi-generator/src/main/resources/perl/ApiClient.mustache b/modules/openapi-generator/src/main/resources/perl/ApiClient.mustache index a9144e2d6bd1b4d1ef53309d41e4a6bdb8af819c..7f87d12ffcbd59d1e2d0d818dd79be7a2914353e 100644 --- a/modules/openapi-generator/src/main/resources/perl/ApiClient.mustache +++ b/modules/openapi-generator/src/main/resources/perl/ApiClient.mustache @@ -56,7 +56,7 @@ sub set_user_agent { # Set timeout # # @param integer $seconds Number of seconds before timing out [set to 0 for no timeout] -# +# sub set_timeout { my ($self, $seconds) = @_; if (!looks_like_number($seconds)) { @@ -77,11 +77,11 @@ sub call_api { my ($resource_path, $method, $query_params, $post_params, $header_params, $body_data, $auth_settings) = @_; # update parameters based on authentication settings - $self->update_params_for_auth($header_params, $query_params, $auth_settings); + $self->update_params_for_auth($header_params, $query_params, $auth_settings); my $_url = $self->{config}{base_url} . $resource_path; - # build query + # build query if (%$query_params) { $_url = ($_url . '?' . eval { URI::Query->new($query_params)->stringify }); } @@ -94,15 +94,15 @@ sub call_api { my $_request; if ($method eq 'POST') { # multipart - $header_params->{'Content-Type'} = lc $header_params->{'Content-Type'} eq 'multipart/form' ? + $header_params->{'Content-Type'} = lc $header_params->{'Content-Type'} eq 'multipart/form' ? 'form-data' : $header_params->{'Content-Type'}; - + $_request = POST($_url, %$header_params, Content => $_body_data); } elsif ($method eq 'PUT') { # multipart - $header_params->{'Content-Type'} = lc $header_params->{'Content-Type'} eq 'multipart/form' ? + $header_params->{'Content-Type'} = lc $header_params->{'Content-Type'} eq 'multipart/form' ? 'form-data' : $header_params->{'Content-Type'}; $_request = PUT($_url, %$header_params, Content => $_body_data); @@ -114,7 +114,7 @@ sub call_api { } elsif ($method eq 'HEAD') { my $headers = HTTP::Headers->new(%$header_params); - $_request = HEAD($_url,%$header_params); + $_request = HEAD($_url,%$header_params); } elsif ($method eq 'DELETE') { #TODO support form data my $headers = HTTP::Headers->new(%$header_params); @@ -124,7 +124,7 @@ sub call_api { } else { } - + $self->{ua}->timeout($self->{http_timeout} || $self->{config}{http_timeout}); $self->{ua}->agent($self->{http_user_agent} || $self->{config}{http_user_agent}); @@ -135,7 +135,7 @@ sub call_api { unless ($_response->is_success) { croak(sprintf "API Exception(%s): %s\n%s", $_response->code, $_response->message, $_response->content); } - + return $_response->content; } @@ -202,7 +202,7 @@ sub to_string { } # Deserialize a JSON string into an object -# +# # @param string $class class name is passed as a string # @param string $data data of the body # @return object an instance of $class @@ -304,17 +304,17 @@ sub get_api_key_with_prefix my $prefix = $self->{config}{api_key_prefix}{$key_name}; return $prefix ? "$prefix $api_key" : $api_key; -} +} # update header and query param based on authentication setting -# +# # @param array $headerParams header parameters (by ref) # @param array $queryParams query parameters (by ref) # @param array $authSettings array of authentication scheme (e.g ['api_key']) sub update_params_for_auth { my ($self, $header_params, $query_params, $auth_settings) = @_; - return $self->_global_auth_setup($header_params, $query_params) + return $self->_global_auth_setup($header_params, $query_params) unless $auth_settings && @$auth_settings; # one endpoint can have more than 1 auth settings @@ -365,12 +365,12 @@ sub update_params_for_auth { } } -# The endpoint API class has not found any settings for auth. This may be deliberate, -# in which case update_params_for_auth() will be a no-op. But it may also be that the -# OpenAPI Spec does not describe the intended authorization. So we check in the config for any -# auth tokens and if we find any, we use them for all endpoints; +# The endpoint API class has not found any settings for auth. This may be deliberate, +# in which case update_params_for_auth() will be a no-op. But it may also be that the +# OpenAPI Spec does not describe the intended authorization. So we check in the config for any +# auth tokens and if we find any, we use them for all endpoints; sub _global_auth_setup { - my ($self, $header_params, $query_params) = @_; + my ($self, $header_params, $query_params) = @_; my $tokens = $self->{config}->get_tokens; return unless keys %$tokens; diff --git a/modules/openapi-generator/src/main/resources/perl/ApiFactory.mustache b/modules/openapi-generator/src/main/resources/perl/ApiFactory.mustache index f88f1d4017ae016fde41821c4a65899be5306ec0..fe4d5b26d9196aaea698916c1aabff67a97c5738 100644 --- a/modules/openapi-generator/src/main/resources/perl/ApiFactory.mustache +++ b/modules/openapi-generator/src/main/resources/perl/ApiFactory.mustache @@ -24,42 +24,42 @@ use {{moduleName}}::ApiClient; =head1 Synopsis package My::Petstore::App; - + use {{moduleName}}::ApiFactory; - + my $api_factory = {{moduleName}}::ApiFactory->new( ... ); # any args for ApiClient constructor # later... - my $pet_api = $api_factory->get_api('Pet'); - + my $pet_api = $api_factory->get_api('Pet'); + # $pet_api isa {{moduleName}}::PetApi - + my $pet = $pet_api->get_pet_by_id(pet_id => $pet_id); # object attributes have proper accessors: printf "Pet's name is %s", $pet->name; # change the value stored on the object: - $pet->name('Dave'); + $pet->name('Dave'); =cut # Load all the API classes and construct a lookup table at startup time -my %_apis = map { $_ =~ /^{{moduleName}}::(.*)$/; $1 => $_ } - grep {$_ =~ /Api$/} +my %_apis = map { $_ =~ /^{{moduleName}}::(.*)$/; $1 => $_ } + grep {$_ =~ /Api$/} usesub '{{moduleName}}'; =head1 new($api_client) - + create a new {{moduleName}}::ApiFactory instance with the given {{moduleName}}::ApiClient instance. =head1 new(%parameters) Any parameters are optional, and are passed to and stored on the api_client object. - + See L<{{moduleName}}::ApiClient> and L<{{moduleName}}::Configuration> for valid parameters -=cut +=cut sub new { my ($class) = shift; @@ -75,31 +75,31 @@ sub new { =head1 get_api($which) - Returns an API object of the requested type. - - $which is a nickname for the class: - + Returns an API object of the requested type. + + $which is a nickname for the class: + FooBarClient::BazApi has nickname 'Baz' - + =cut sub get_api { my ($self, $which) = @_; croak "API not specified" unless $which; my $api_class = $_apis{"${which}Api"} || croak "No known API for '$which'"; - return $api_class->new($self->api_client); + return $api_class->new($self->api_client); } =head1 api_client() Returns the api_client object, should you ever need it. - + =cut sub api_client { $_[0]->{api_client} } =head1 apis_available() -=cut +=cut sub apis_available { return map { $_ =~ s/Api$//; $_ } sort keys %_apis } diff --git a/modules/openapi-generator/src/main/resources/perl/AutoDoc.mustache b/modules/openapi-generator/src/main/resources/perl/AutoDoc.mustache index 26f274b424ae280f9ebf29f14ada083ae6ecc8e7..0007376cce60ecec28c2d942faad80a800ee39a8 100644 --- a/modules/openapi-generator/src/main/resources/perl/AutoDoc.mustache +++ b/modules/openapi-generator/src/main/resources/perl/AutoDoc.mustache @@ -59,7 +59,7 @@ sub _printisa { } # ----- format specs ----- - format INHERIT = + format INHERIT = @* - $myclass @@ -69,16 +69,16 @@ $myclass $dsub All subclasses: @* $sub - + Target API: @* @* $app_name, $app_version Generated on: @* $generated_date - Generator class: @* + Generator class: @* $generator_class - + . - format ROLES = + format ROLES = Composes: ^<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< ~ $rolepkg requires: ^<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< ~ @@ -97,10 +97,10 @@ $myclass =head2 @* version: @* $app_name, $app_version - + Automatically generated by the Perl Generator in the OpenAPI Generator project: -=over 4 +=over 4 =item Build date: @* $generated_date @@ -108,14 +108,14 @@ Automatically generated by the Perl Generator in the OpenAPI Generator project: =item Build package: @* $generator_class -=item Codegen version: +=item Codegen version: =back =head1 INHERITANCE -=head2 Base class(es) +=head2 Base class(es) @* $isa @@ -124,24 +124,24 @@ $isa @* $dsub - + =head2 All subclasses @* $sub - + =head1 COMPOSITION -@* composes the following roles: -$myclass +@* composes the following roles: +$myclass . format ROLES_POD = =head2 C<@*> $rolepkg - + Requires: @* @@ -176,7 +176,7 @@ HEAD die "Don't know how to print '$how'"; } - $self->_printmethod($_, $how) for uniq sort $self->meta->get_all_method_names; #$self->meta->get_method_list, + $self->_printmethod($_, $how) for uniq sort $self->meta->get_all_method_names; #$self->meta->get_method_list, if ($how eq 'pod') { $~ = 'METHOD_POD_CLOSE'; @@ -190,7 +190,7 @@ sub _printmethod { my ($self, $methodname, $how) = @_; return if $methodname =~ /^_/; return if $self->meta->has_attribute($methodname); - my %internal = map {$_ => 1} qw(BUILD BUILDARGS meta can new DEMOLISHALL DESTROY + my %internal = map {$_ => 1} qw(BUILD BUILDARGS meta can new DEMOLISHALL DESTROY DOES isa BUILDALL does VERSION dump ); return if $internal{$methodname}; @@ -208,7 +208,7 @@ sub _printmethod { my $aa = $method->associated_attribute; $on = $aa->{isa}; $via = $aa->{name}; - $original_pkg = $on; + $original_pkg = $on; $doc = $original_pkg->method_documentation->{$delegate_to}->{summary}; } else { @@ -240,7 +240,7 @@ METHODS Name delegates to on via =========================================================================================================================================================================== . - format METHOD = + format METHOD = @<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< @<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<... @<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<... @<<<<<<<<<<<<<<<<... $methodname, $delegate_to, $on, $via . @@ -259,14 +259,14 @@ $methodname . - format METHODHEAD_POD = + format METHODHEAD_POD = =head1 METHODS . - - format METHOD_POD = - + + format METHOD_POD = + =head2 C<@*()> $methodname @@ -275,7 +275,7 @@ $methodname . - format METHOD_POD_DELEGATED = + format METHOD_POD_DELEGATED = =head2 C<@*()> $methodname @@ -284,7 +284,7 @@ $methodname $original_pkg Delegates to: @*() $delegate_to - On: @* + On: @* $on Via: @*() $via @@ -295,7 +295,7 @@ $methodname . format METHOD_POD_CLOSE = - + . # ----- / format specs ----- } @@ -369,15 +369,15 @@ ATTRIBUTES ---------- Name is isa reqd lazy doc handles ============================================================================================================== -. - format ATTR = +. + format ATTR = @<<<<<<<<<<<<<<<<< @< @<<<<<<<<<<<<<<<<<<<<<<<< @<<< @<<< @<< ^<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< $attrname, $is, $tc, $reqd, $lazy, $has_doc, $handles ^<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< ~~ $handles . - format ATTR_NARROW = + format ATTR_NARROW = @* $attrname is: @* @@ -421,7 +421,7 @@ $attrname $handles . - format ATTR_POD_CLOSE = + format ATTR_POD_CLOSE = . diff --git a/modules/openapi-generator/src/main/resources/perl/BaseObject.mustache b/modules/openapi-generator/src/main/resources/perl/BaseObject.mustache index b9c0f102961b26673d45e4027eab68f52f6c77ae..91c0f10ac8cceb2bd2a592392eb7a4e1ffadcb20 100644 --- a/modules/openapi-generator/src/main/resources/perl/BaseObject.mustache +++ b/modules/openapi-generator/src/main/resources/perl/BaseObject.mustache @@ -6,17 +6,17 @@ # __PACKAGE__->mk_classdata('attribute_map' => {}); __PACKAGE__->mk_classdata('openapi_types' => {}); -__PACKAGE__->mk_classdata('method_documentation' => {}); +__PACKAGE__->mk_classdata('method_documentation' => {}); __PACKAGE__->mk_classdata('class_documentation' => {}); # new plain object -sub new { - my ($class, %args) = @_; +sub new { + my ($class, %args) = @_; my $self = bless {}, $class; $self->init(%args); - + return $self; } @@ -50,7 +50,7 @@ sub to_hash { } # used by JSON for serialization -sub TO_JSON { +sub TO_JSON { my $self = shift; my $_data = {}; foreach my $_key (keys %{$self->attribute_map}) { @@ -73,7 +73,7 @@ sub from_hash { # loop through attributes and use openapi_types to deserialize the data while ( my ($_key, $_type) = each %{$self->openapi_types} ) { - my $_json_attribute = $self->attribute_map->{$_key}; + my $_json_attribute = $self->attribute_map->{$_key}; if ($_type =~ /^array\[(.+)\]$/i) { # array my $_subclass = $1; my @_array = (); @@ -99,7 +99,7 @@ sub from_hash { # call parent ({{{.}}}) from_hash $self->{{moduleName}}::Object::{{{.}}}::from_hash($hash); {{/allParents}} - + return $self; } @@ -117,4 +117,3 @@ sub _deserialize { return $_instance->from_hash($data); } } - diff --git a/modules/openapi-generator/src/main/resources/perl/Configuration.mustache b/modules/openapi-generator/src/main/resources/perl/Configuration.mustache index f562969153059630ab25ed9cf12dc02f218c5a6a..346f5e305580805f019c50400c45195519247dd2 100644 --- a/modules/openapi-generator/src/main/resources/perl/Configuration.mustache +++ b/modules/openapi-generator/src/main/resources/perl/Configuration.mustache @@ -33,7 +33,7 @@ default: 180 String. custom UserAgent header -default: {{#httpUserAgent}}{{{.}}}{{/httpUserAgent}}{{^httpUserAgent}}OpenAPI-Generator/{{{moduleVersion}}}/perl{{/httpUserAgent}} +default: {{{httpUserAgent}}}{{^httpUserAgent}}OpenAPI-Generator/{{{moduleVersion}}}/perl{{/httpUserAgent}} =item api_key: (optional) @@ -82,7 +82,7 @@ sub new { # class/static variables $p{http_timeout} //= 180; - $p{http_user_agent} //= '{{#httpUserAgent}}{{{.}}}{{/httpUserAgent}}{{^httpUserAgent}}OpenAPI-Generator/{{{moduleVersion}}}/perl{{/httpUserAgent}}'; + $p{http_user_agent} //= '{{{httpUserAgent}}}{{^httpUserAgent}}OpenAPI-Generator/{{{moduleVersion}}}/perl{{/httpUserAgent}}'; # authentication setting $p{api_key} //= {}; @@ -105,7 +105,7 @@ sub new { sub get_tokens { my $self = shift; - + my $tokens = {}; $tokens->{username} = $self->{username} if $self->{username}; $tokens->{password} = $self->{password} if $self->{password}; @@ -131,13 +131,13 @@ sub clear_tokens { $self->{api_key} = {}; $self->{api_key_prefix} = {}; $self->{api_key_in} = {}; - + return \%tokens; } sub accept_tokens { my ($self, $tokens) = @_; - + foreach my $known_name (qw(username password access_token)) { next unless $tokens->{$known_name}; $self->{$known_name} = delete $tokens->{$known_name}; @@ -152,6 +152,6 @@ sub accept_tokens { croak "Tokens can only go in 'head' or 'query' (not in '$in')" unless $in =~ /^(?:head|query)$/; $self->{api_key_in}{$token_name} = $in; } -} +} 1; diff --git a/modules/openapi-generator/src/main/resources/perl/README.mustache b/modules/openapi-generator/src/main/resources/perl/README.mustache index 0bf80758c16db90b3779d49c9289aa869cd36aba..4c7d72bf2c2fb033e4262b314cba25a1ac8fa81b 100644 --- a/modules/openapi-generator/src/main/resources/perl/README.mustache +++ b/modules/openapi-generator/src/main/resources/perl/README.mustache @@ -2,7 +2,7 @@ {{moduleName}}::Role - a Moose role for the {{appName}} -{{#appDescriptionWithNewLines}}{{{appDescriptionWithNewLines}}}{{/appDescriptionWithNewLines}} +{{{appDescriptionWithNewLines}}} # VERSION @@ -304,7 +304,7 @@ All URIs are relative to *{{basePath}}* Class | Method | HTTP request | Description ------------ | ------------- | ------------- | ------------- -{{#apiInfo}}{{#apis}}{{#operations}}{{#operation}}*{{classname}}* | [**{{nickname}}**]({{apiDocPath}}{{classname}}.md#{{nickname}}) | **{{httpMethod}}** {{path}} | {{#summary}}{{summary}}{{/summary}} +{{#apiInfo}}{{#apis}}{{#operations}}{{#operation}}*{{classname}}* | [**{{nickname}}**]({{apiDocPath}}{{classname}}.md#{{nickname}}) | **{{httpMethod}}** {{path}} | {{summary}} {{/operation}}{{/operations}}{{/apis}}{{/apiInfo}} # DOCUMENTATION FOR MODELS diff --git a/modules/openapi-generator/src/main/resources/perl/api.mustache b/modules/openapi-generator/src/main/resources/perl/api.mustache index 316ea92da1b4016b4e433583c241ec4ecd3aac8e..f82274bab21d2516a61316f4e14d670e2162782a 100644 --- a/modules/openapi-generator/src/main/resources/perl/api.mustache +++ b/modules/openapi-generator/src/main/resources/perl/api.mustache @@ -9,7 +9,7 @@ package {{moduleName}}::{{classname}}; require 5.6.0; use strict; use warnings; -use utf8; +use utf8; use Exporter; use Carp qw( croak ); use Log::Any qw($log); @@ -41,7 +41,7 @@ sub new { # {{{operationId}}} # # {{{summary}}} -# +# {{#allParams}}# @param {{dataType}} ${{paramName}} {{description}} {{#required}}(required){{/required}}{{^required}}(optional{{#defaultValue}}, default to {{{.}}}{{/defaultValue}}){{/required}} {{/allParams}} { @@ -54,13 +54,13 @@ sub new { }, {{/allParams}} }; - __PACKAGE__->method_documentation->{ '{{operationId}}' } = { + __PACKAGE__->method_documentation->{ '{{operationId}}' } = { summary => '{{summary}}', params => $params, - returns => {{#returnType}}'{{{returnType}}}'{{/returnType}}{{^returnType}}undef{{/returnType}}, + returns => {{#returnType}}'{{{.}}}'{{/returnType}}{{^returnType}}undef{{/returnType}}, }; } -# @return {{#returnType}}{{{returnType}}}{{/returnType}}{{^returnType}}void{{/returnType}} +# @return {{{returnType}}}{{^returnType}}void{{/returnType}} # sub {{operationId}} { my ($self, %args) = @_; @@ -123,7 +123,7 @@ sub {{operationId}} { {{^isFile}}$form_params->{'{{baseName}}'} = $self->{api_client}->to_form_value($args{'{{paramName}}'}); {{/isFile}} } - + {{/formParams}} my $_body_data; {{#bodyParams}} diff --git a/modules/openapi-generator/src/main/resources/perl/api_doc.mustache b/modules/openapi-generator/src/main/resources/perl/api_doc.mustache index 994dbb2febd41217c108c793c30e6d99d477eee8..19b18950a230e3b750f591172a46c039041f068b 100644 --- a/modules/openapi-generator/src/main/resources/perl/api_doc.mustache +++ b/modules/openapi-generator/src/main/resources/perl/api_doc.mustache @@ -1,5 +1,5 @@ # {{moduleName}}::{{classname}}{{#description}} -{{description}}{{/description}} +{{.}}{{/description}} ## Load the API package ```perl @@ -10,19 +10,19 @@ All URIs are relative to *{{basePath}}* Method | HTTP request | Description ------------- | ------------- | ------------- -{{#operations}}{{#operation}}[**{{operationId}}**]({{classname}}.md#{{operationId}}) | **{{httpMethod}}** {{path}} | {{#summary}}{{summary}}{{/summary}} +{{#operations}}{{#operation}}[**{{operationId}}**]({{classname}}.md#{{operationId}}) | **{{httpMethod}}** {{path}} | {{summary}} {{/operation}}{{/operations}} {{#operations}} {{#operation}} # **{{{operationId}}}** -> {{#returnType}}{{{returnType}}} {{/returnType}}{{{operationId}}}({{#allParams}}{{paramName}} => ${{paramName}}{{^-last}}, {{/-last}}{{/allParams}}) +> {{#returnType}}{{{.}}} {{/returnType}}{{{operationId}}}({{#allParams}}{{paramName}} => ${{paramName}}{{^-last}}, {{/-last}}{{/allParams}}) {{{summary}}}{{#notes}} -{{{notes}}}{{/notes}} +{{{.}}}{{/notes}} -### Example +### Example ```perl use Data::Dumper; use {{moduleName}}::{{classname}}; @@ -50,7 +50,7 @@ my $api_instance = {{moduleName}}::{{classname}}->new( {{#allParams}}my ${{paramName}} = {{#isArray}}[{{/isArray}}{{#isBodyParam}}{{{moduleName}}}::Object::{{dataType}}->new(){{/isBodyParam}}{{^isBodyParam}}{{{example}}}{{/isBodyParam}}{{#isArray}}]{{/isArray}}; # {{{dataType}}} | {{{description}}} {{/allParams}} -eval { +eval { {{#returnType}}my $result = {{/returnType}}$api_instance->{{{operationId}}}({{#allParams}}{{paramName}} => ${{paramName}}{{^-last}}, {{/-last}}{{/allParams}});{{#returnType}} print Dumper($result);{{/returnType}} }; @@ -63,7 +63,7 @@ if ($@) { {{^allParams}}This endpoint does not need any parameter.{{/allParams}}{{#allParams}}{{#-last}} Name | Type | Description | Notes ------------- | ------------- | ------------- | -------------{{/-last}}{{/allParams}} -{{#allParams}} **{{paramName}}** | {{#isFile}}**{{dataType}}**{{/isFile}}{{#isPrimitiveType}}**{{dataType}}**{{/isPrimitiveType}}{{^isPrimitiveType}}{{^isFile}}[**{{dataType}}**]({{baseType}}.md){{/isFile}}{{/isPrimitiveType}}| {{description}} | {{^required}}[optional] {{/required}}{{#defaultValue}}[default to {{defaultValue}}]{{/defaultValue}} +{{#allParams}} **{{paramName}}** | {{#isFile}}**{{dataType}}**{{/isFile}}{{#isPrimitiveType}}**{{dataType}}**{{/isPrimitiveType}}{{^isPrimitiveType}}{{^isFile}}[**{{dataType}}**]({{baseType}}.md){{/isFile}}{{/isPrimitiveType}}| {{description}} | {{^required}}[optional] {{/required}}{{#defaultValue}}[default to {{.}}]{{/defaultValue}} {{/allParams}} ### Return type diff --git a/modules/openapi-generator/src/main/resources/perl/autodoc.script.mustache b/modules/openapi-generator/src/main/resources/perl/autodoc.script.mustache index 52b0a9830feb7aceab8a8076ddeaa900f57b3675..d27c74f26e0a1d7b8438e69e421be873092e452e 100644 --- a/modules/openapi-generator/src/main/resources/perl/autodoc.script.mustache +++ b/modules/openapi-generator/src/main/resources/perl/autodoc.script.mustache @@ -5,7 +5,7 @@ use lib File::Spec->catdir($FindBin::Bin, '..', 'lib'); use Moose::Util qw(apply_all_roles); use Getopt::Std; - + my %options=(); getopts("wnphmHc:", \%options); help if $options{h}; @@ -64,8 +64,8 @@ Usage: autodoc [OPTION] [-c My::App::Class] -w wide format (default) -n narrow format - -p POD format - -H HTML format + -p POD format + -H HTML format -m Markdown format -h print this help message -c your application class @@ -74,4 +74,3 @@ HELP exit(0); } - diff --git a/modules/openapi-generator/src/main/resources/perl/git_push.sh.mustache b/modules/openapi-generator/src/main/resources/perl/git_push.sh.mustache index 8b3f689c9121a65080ad038d37a2036b01e559a1..f0bed5bd84155f05bc3cdc67af008f524efb38a6 100755 --- a/modules/openapi-generator/src/main/resources/perl/git_push.sh.mustache +++ b/modules/openapi-generator/src/main/resources/perl/git_push.sh.mustache @@ -55,4 +55,3 @@ 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/perl/object_doc.mustache b/modules/openapi-generator/src/main/resources/perl/object_doc.mustache index fef90732de461867557f53a25083c7a124ba81c2..196d32974ba535015fd8e7515810f7d6393d767b 100644 --- a/modules/openapi-generator/src/main/resources/perl/object_doc.mustache +++ b/modules/openapi-generator/src/main/resources/perl/object_doc.mustache @@ -8,7 +8,7 @@ use {{moduleName}}::Object::{{classname}}; ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -{{#vars}}**{{name}}** | {{#isPrimitiveType}}**{{dataType}}**{{/isPrimitiveType}}{{^isPrimitiveType}}[**{{dataType}}**]({{complexType}}.md){{/isPrimitiveType}} | {{description}} | {{^required}}[optional] {{/required}}{{#isReadOnly}}[readonly] {{/isReadOnly}}{{#defaultValue}}[default to {{defaultValue}}]{{/defaultValue}} +{{#vars}}**{{name}}** | {{#isPrimitiveType}}**{{dataType}}**{{/isPrimitiveType}}{{^isPrimitiveType}}[**{{dataType}}**]({{complexType}}.md){{/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) diff --git a/modules/openapi-generator/src/main/resources/perl/partial_license.mustache b/modules/openapi-generator/src/main/resources/perl/partial_license.mustache index 442edb2e0eadcf4224575e65a73bcd852b68b3cd..d1713de6e168033c0acbcbfb9ba4f36534807400 100644 --- a/modules/openapi-generator/src/main/resources/perl/partial_license.mustache +++ b/modules/openapi-generator/src/main/resources/perl/partial_license.mustache @@ -1,15 +1,15 @@ =begin comment {{#appName}} -{{{appName}}} +{{{.}}} {{/appName}} {{#appDescription}} -{{{appDescription}}} +{{{.}}} {{/appDescription}} -{{#version}}The version of the OpenAPI document: {{version}}{{/version}} -{{#infoEmail}}Contact: {{{infoEmail}}}{{/infoEmail}} +{{#version}}The version of the OpenAPI document: {{.}}{{/version}} +{{#infoEmail}}Contact: {{{.}}}{{/infoEmail}} Generated by: https://openapi-generator.tech =end comment diff --git a/modules/openapi-generator/src/main/resources/php-laravel/composer.mustache b/modules/openapi-generator/src/main/resources/php-laravel/composer.mustache index d87c83aa97cec66f600a19f11bb350f95a962f1c..1893d78f0627fa7fe83bfd7b9d1c2c482ff9ef34 100644 --- a/modules/openapi-generator/src/main/resources/php-laravel/composer.mustache +++ b/modules/openapi-generator/src/main/resources/php-laravel/composer.mustache @@ -3,7 +3,7 @@ "description": "{{description}}.", "keywords": ["framework", "laravel"], {{#artifactVersion}} - "version": "{{artifactVersion}}", + "version": "{{.}}", {{/artifactVersion}} "license": "MIT", "type": "project", diff --git a/modules/openapi-generator/src/main/resources/php-laravel/licenseInfo.mustache b/modules/openapi-generator/src/main/resources/php-laravel/licenseInfo.mustache index 089da38dc4b0edcba391c4635bd8106d7a0ecb14..9b681e0af27fdc81bc4eb931da1f59819ff673fb 100644 --- a/modules/openapi-generator/src/main/resources/php-laravel/licenseInfo.mustache +++ b/modules/openapi-generator/src/main/resources/php-laravel/licenseInfo.mustache @@ -3,8 +3,8 @@ * {{{appDescription}}} * PHP version 7.2.5 * - * {{#version}}The version of the OpenAPI document: {{{version}}}{{/version}} - * {{#infoEmail}}Contact: {{{infoEmail}}}{{/infoEmail}} + * {{#version}}The version of the OpenAPI document: {{{.}}}{{/version}} + * {{#infoEmail}}Contact: {{{.}}}{{/infoEmail}} * * NOTE: This class is auto generated by OpenAPI-Generator * https://openapi-generator.tech diff --git a/modules/openapi-generator/src/main/resources/php-laravel/model.mustache b/modules/openapi-generator/src/main/resources/php-laravel/model.mustache index d44d0d455918e1a5215b4bdd7efa06624f13c475..966dd38ff036aa499c98ed13b6bcb51e36831313 100644 --- a/modules/openapi-generator/src/main/resources/php-laravel/model.mustache +++ b/modules/openapi-generator/src/main/resources/php-laravel/model.mustache @@ -10,7 +10,7 @@ namespace {{modelPackage}}; class {{classname}} { {{#vars}} - /** @var {{{dataType}}} ${{name}} {{#description}}{{description}}{{/description}}*/ + /** @var {{{dataType}}} ${{name}} {{description}}*/ {{#deprecated}} /** @deprecated */ {{/deprecated}} diff --git a/modules/openapi-generator/src/main/resources/php-lumen/composer.mustache b/modules/openapi-generator/src/main/resources/php-lumen/composer.mustache index 27bef59bba665a5c7156f8a9addaa3522076b78e..2f6e96b0815c53de02acbacf144b492ffd7ee2ae 100644 --- a/modules/openapi-generator/src/main/resources/php-lumen/composer.mustache +++ b/modules/openapi-generator/src/main/resources/php-lumen/composer.mustache @@ -1,7 +1,7 @@ { "name": "{{gitUserId}}/{{gitRepoId}}", {{#artifactVersion}} - "version": "{{artifactVersion}}", + "version": "{{.}}", {{/artifactVersion}} "description": "{{description}}", "keywords": [ diff --git a/modules/openapi-generator/src/main/resources/php-lumen/licenseInfo.mustache b/modules/openapi-generator/src/main/resources/php-lumen/licenseInfo.mustache index b119e2a8b97a354e430f0654ffc98da214713eb7..60958e1c47a07c239cc5fc605d7eb0ad572db118 100644 --- a/modules/openapi-generator/src/main/resources/php-lumen/licenseInfo.mustache +++ b/modules/openapi-generator/src/main/resources/php-lumen/licenseInfo.mustache @@ -3,8 +3,8 @@ * {{{appDescription}}} * PHP version 7.2.5 * - * {{#version}}The version of the OpenAPI document: {{{version}}}{{/version}} - * {{#infoEmail}}Contact: {{{infoEmail}}}{{/infoEmail}} + * {{#version}}The version of the OpenAPI document: {{{.}}}{{/version}} + * {{#infoEmail}}Contact: {{{.}}}{{/infoEmail}} * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech diff --git a/modules/openapi-generator/src/main/resources/php-mezzio-ph-modern/api.mustache b/modules/openapi-generator/src/main/resources/php-mezzio-ph-modern/api.mustache index fdba51f5e00c1fc4fd4608ef1bd7bec49d8d910f..5b24303551f01be1e13e84213b84e718d3332209 100644 --- a/modules/openapi-generator/src/main/resources/php-mezzio-ph-modern/api.mustache +++ b/modules/openapi-generator/src/main/resources/php-mezzio-ph-modern/api.mustache @@ -22,10 +22,10 @@ class {{classname}} {{#operation}} /** {{#summary}} - * {{summary}} + * {{.}} {{/summary}} {{#description}} - * {{description}} + * {{.}} {{/description}} */ #[PHA\{{httpMethod}}] @@ -51,7 +51,7 @@ class {{classname}} // TODO check if producer is valid, if it has correct priority and if it can be moved to class annotation #[PHA\Producer("{{{mediaType}}}", PHProducer\Transfer::class)] {{/produces}} - public function {{operationId}}(ServerRequestInterface $request){{#returnType}}: {{returnType}}{{/returnType}} + public function {{operationId}}(ServerRequestInterface $request){{#returnType}}: {{.}}{{/returnType}} { //TODO implement method {{#vendorExtensions}} diff --git a/modules/openapi-generator/src/main/resources/php-mezzio-ph-modern/model_query_var.mustache b/modules/openapi-generator/src/main/resources/php-mezzio-ph-modern/model_query_var.mustache index f2e6525b9b9347a4f24c0d089fd0337189c0a95b..e94f8eeb09cfff7c7cb8ba81861e7a7484f7ebcf 100644 --- a/modules/openapi-generator/src/main/resources/php-mezzio-ph-modern/model_query_var.mustache +++ b/modules/openapi-generator/src/main/resources/php-mezzio-ph-modern/model_query_var.mustache @@ -1,7 +1,7 @@ {{#isArray }}{{#isPrimitiveType }} #[DTA\Strategy("QueryStringScalarArray", ["type" => {{>list_item_type}}, "format" => "{{internal.ze-ph.collectionFormat}}"])] - #[DTA\Validator("QueryStringScalarArray", ["type" => {{>list_item_type}}, "format" => "{{internal.ze-ph.collectionFormat}}"{{#minItems}}, "min_items" => {{minItems}}{{/minItems}}{{#maxItems}}, "max_items" => {{maxItems}}{{/maxItems}}])] + #[DTA\Validator("QueryStringScalarArray", ["type" => {{>list_item_type}}, "format" => "{{internal.ze-ph.collectionFormat}}"{{#minItems}}, "min_items" => {{.}}{{/minItems}}{{#maxItems}}, "max_items" => {{.}}{{/maxItems}}])] {{/isPrimitiveType }}{{^isPrimitiveType }} // TODO add validator(s) and strategy for list of {{>list_item_type}} and collection format {{internal.ze-ph.collectionFormat}} inside query string diff --git a/modules/openapi-generator/src/main/resources/php-mezzio-ph/api.mustache b/modules/openapi-generator/src/main/resources/php-mezzio-ph/api.mustache index 1b8f14b3c97869bd22cb5d990a4abe0742754c3f..987cbf1a08fb1f564fd448823a6b0ce969fee04f 100644 --- a/modules/openapi-generator/src/main/resources/php-mezzio-ph/api.mustache +++ b/modules/openapi-generator/src/main/resources/php-mezzio-ph/api.mustache @@ -22,10 +22,10 @@ class {{classname}} {{#operation}} /** {{#summary}} - * {{summary}} + * {{.}} {{/summary}} {{#description}} - * {{description}} + * {{.}} {{/description}} * @PHA\{{httpMethod}} {{#vendorExtensions}} @@ -55,13 +55,13 @@ class {{classname}} * @throws PHException\HttpCode 501 if the method is not implemented {{#returnType}} * - * @return {{returnType}} + * @return {{.}} {{/returnType}} {{#isDeprecated}} * @deprecated {{/isDeprecated}} */ - public function {{operationId}}(ServerRequestInterface $request){{#returnType}}: {{returnType}}{{/returnType}} + public function {{operationId}}(ServerRequestInterface $request){{#returnType}}: {{.}}{{/returnType}} { //TODO implement method {{#vendorExtensions}} diff --git a/modules/openapi-generator/src/main/resources/php-mezzio-ph/model_query_var.mustache b/modules/openapi-generator/src/main/resources/php-mezzio-ph/model_query_var.mustache index deaf0e370494596fbdcda8ea72dea36be7779847..dfd1245986ca96240bb87f34f202894c7cee4314 100644 --- a/modules/openapi-generator/src/main/resources/php-mezzio-ph/model_query_var.mustache +++ b/modules/openapi-generator/src/main/resources/php-mezzio-ph/model_query_var.mustache @@ -1,7 +1,7 @@ {{#isArray }}{{#isPrimitiveType }} * @DTA\Strategy(name="QueryStringScalarArray", options={"type":{{>list_item_type}}, "format":"{{internal.ze-ph.collectionFormat}}"}) - * @DTA\Validator(name="QueryStringScalarArray", options={"type":{{>list_item_type}}, "format":"{{internal.ze-ph.collectionFormat}}"{{#minItems}}, "min_items":{{minItems}}{{/minItems}}{{#maxItems}}, "max_items":{{maxItems}}{{/maxItems}}}) + * @DTA\Validator(name="QueryStringScalarArray", options={"type":{{>list_item_type}}, "format":"{{internal.ze-ph.collectionFormat}}"{{#minItems}}, "min_items":{{.}}{{/minItems}}{{#maxItems}}, "max_items":{{.}}{{/maxItems}}}) {{/isPrimitiveType }}{{^isPrimitiveType }} * TODO add validator(s) and strategy for list of {{>list_item_type}} and collection format {{internal.ze-ph.collectionFormat}} inside query string diff --git a/modules/openapi-generator/src/main/resources/php-slim-server/README.mustache b/modules/openapi-generator/src/main/resources/php-slim-server/README.mustache index bce72b1b1499f17e1d6a8c50fccfd2bed1ac7f30..6d2719b2f83db15222f994f439c42b461dc5286e 100644 --- a/modules/openapi-generator/src/main/resources/php-slim-server/README.mustache +++ b/modules/openapi-generator/src/main/resources/php-slim-server/README.mustache @@ -120,7 +120,7 @@ For instance, when abstract class located at `./lib/Api/AbstractPetApi.php` you Class | Method | HTTP request | Description ------------ | ------------- | ------------- | ------------- -{{#apiInfo}}{{#apis}}{{#operations}}{{#operation}}*{{classname}}* | **{{operationId}}** | **{{httpMethod}}** {{path}} | {{#summary}}{{{summary}}}{{/summary}} +{{#apiInfo}}{{#apis}}{{#operations}}{{#operation}}*{{classname}}* | **{{operationId}}** | **{{httpMethod}}** {{path}} | {{{summary}}} {{/operation}}{{/operations}}{{/apis}}{{/apiInfo}} {{/generateApiDocs}} @@ -160,7 +160,7 @@ No model defined in this package Scope list: {{#scopes}} -* `{{scope}}`{{#description}} - {{description}}{{/description}} +* `{{scope}}`{{#description}} - {{.}}{{/description}} {{/scopes}} {{/isOAuth}} diff --git a/modules/openapi-generator/src/main/resources/php-slim-server/SlimRouter.mustache b/modules/openapi-generator/src/main/resources/php-slim-server/SlimRouter.mustache index c8b27057bb92617491ad8179196e96ee87ac272d..dd73535a005f04f2b06f679f318bb5a2f7c646ce 100644 --- a/modules/openapi-generator/src/main/resources/php-slim-server/SlimRouter.mustache +++ b/modules/openapi-generator/src/main/resources/php-slim-server/SlimRouter.mustache @@ -10,17 +10,17 @@ */ /**{{#apiInfo}}{{#appName}} - * {{{appName}}} + * {{{.}}} * {{/appName}} {{#appDescription}} - * {{{appDescription}}} + * {{{.}}} {{/appDescription}} {{#version}} - * The version of the OpenAPI document: {{{version}}} + * The version of the OpenAPI document: {{{.}}} {{/version}} {{#infoEmail}} - * Contact: {{{infoEmail}}} + * Contact: {{{.}}} {{/infoEmail}} * Generated by: https://github.com/openapitools/openapi-generator.git */ @@ -111,7 +111,7 @@ class SlimRouter 'isOAuth' => true, 'scopes' => [ {{#scopes}} - '{{scope}}',{{#description}} // {{description}}{{/description}} + '{{scope}}',{{#description}} // {{.}}{{/description}} {{/scopes}} ], ], diff --git a/modules/openapi-generator/src/main/resources/php-slim-server/abstract_authenticator.mustache b/modules/openapi-generator/src/main/resources/php-slim-server/abstract_authenticator.mustache index 3330d8e33332774349a601cd01077fea01ec59eb..58d83f85bd51ed684d58085030d16317cc8ee925 100644 --- a/modules/openapi-generator/src/main/resources/php-slim-server/abstract_authenticator.mustache +++ b/modules/openapi-generator/src/main/resources/php-slim-server/abstract_authenticator.mustache @@ -10,17 +10,17 @@ */ /**{{#apiInfo}}{{#appName}} - * {{{appName}}} + * {{{.}}} * {{/appName}} {{#appDescription}} - * {{{appDescription}}} + * {{{.}}} {{/appDescription}} {{#version}} - * The version of the OpenAPI document: {{{version}}} + * The version of the OpenAPI document: {{{.}}} {{/version}} {{#infoEmail}} - * Contact: {{{infoEmail}}} + * Contact: {{{.}}} {{/infoEmail}} * Generated by: https://github.com/openapitools/openapi-generator.git */ diff --git a/modules/openapi-generator/src/main/resources/php-slim-server/api.mustache b/modules/openapi-generator/src/main/resources/php-slim-server/api.mustache index 5ba2d6bf58ffb48a12bddef6a45b526cde55eb9d..a8611e690db61d09b51044f3746bfb40ada49107 100644 --- a/modules/openapi-generator/src/main/resources/php-slim-server/api.mustache +++ b/modules/openapi-generator/src/main/resources/php-slim-server/api.mustache @@ -11,17 +11,17 @@ /** {{#appName}} - * {{{appName}}} + * {{{.}}} * {{/appName}} {{#appDescription}} - * {{{appDescription}}} + * {{{.}}} {{/appDescription}} {{#version}} - * The version of the OpenAPI document: {{{version}}} + * The version of the OpenAPI document: {{{.}}} {{/version}} {{#infoEmail}} - * Contact: {{{infoEmail}}} + * Contact: {{{.}}} {{/infoEmail}} * Generated by: https://github.com/openapitools/openapi-generator.git */ @@ -69,10 +69,10 @@ abstract class {{classname}} /** * {{httpMethod}} {{operationId}} {{#summary}} - * Summary: {{summary}} + * Summary: {{.}} {{/summary}} {{#notes}} - * Notes: {{notes}} + * Notes: {{.}} {{/notes}} {{#hasProduces}} * Output-Formats: [{{#produces}}{{{mediaType}}}{{^-last}}, {{/-last}}{{/produces}}] diff --git a/modules/openapi-generator/src/main/resources/php-slim-server/api_test.mustache b/modules/openapi-generator/src/main/resources/php-slim-server/api_test.mustache index e19c03de3be0ec53eb8718c6a2f165fe074a69ed..47c7b57c496106c5c667d2aed0cc18c0c1d9411e 100644 --- a/modules/openapi-generator/src/main/resources/php-slim-server/api_test.mustache +++ b/modules/openapi-generator/src/main/resources/php-slim-server/api_test.mustache @@ -11,17 +11,17 @@ /** {{#appName}} - * {{{appName}}} + * {{{.}}} * {{/appName}} {{#appDescription}} - * {{{appDescription}}} + * {{{.}}} {{/appDescription}} {{#version}} - * The version of the OpenAPI document: {{{version}}} + * The version of the OpenAPI document: {{{.}}} {{/version}} {{#infoEmail}} - * Contact: {{{infoEmail}}} + * Contact: {{{.}}} {{/infoEmail}} * Generated by: https://github.com/openapitools/openapi-generator.git */ diff --git a/modules/openapi-generator/src/main/resources/php-slim-server/model.mustache b/modules/openapi-generator/src/main/resources/php-slim-server/model.mustache index afb360cb15b29a233b357eab02fc405cf2750c0c..96b79f5a39ab58af4a55c8dfd67b5ca58be323c9 100644 --- a/modules/openapi-generator/src/main/resources/php-slim-server/model.mustache +++ b/modules/openapi-generator/src/main/resources/php-slim-server/model.mustache @@ -25,8 +25,8 @@ namespace {{modelPackage}}; class {{classname}} { {{#vars}} - - /** @var {{dataType}} ${{name}} {{#description}}{{description}}{{/description}}*/ + + /** @var {{dataType}} ${{name}} {{description}}*/ {{#deprecated}} /** @deprecated */ {{/deprecated}} diff --git a/modules/openapi-generator/src/main/resources/php-slim-server/model_test.mustache b/modules/openapi-generator/src/main/resources/php-slim-server/model_test.mustache index 52b27242d8019af27e2aa4653a610a20b741fee3..867e5c18ffde0588e08c46a19e5c3b3d1ed1484a 100644 --- a/modules/openapi-generator/src/main/resources/php-slim-server/model_test.mustache +++ b/modules/openapi-generator/src/main/resources/php-slim-server/model_test.mustache @@ -13,17 +13,17 @@ /** {{#appName}} - * {{{appName}}} + * {{{.}}} * {{/appName}} {{#appDescription}} - * {{{appDescription}}} + * {{{.}}} {{/appDescription}} {{#version}} - * The version of the OpenAPI document: {{{version}}} + * The version of the OpenAPI document: {{{.}}} {{/version}} {{#infoEmail}} - * Contact: {{{infoEmail}}} + * Contact: {{{.}}} {{/infoEmail}} * Generated by: https://github.com/openapitools/openapi-generator.git */ diff --git a/modules/openapi-generator/src/main/resources/php-slim4-server/README.mustache b/modules/openapi-generator/src/main/resources/php-slim4-server/README.mustache index e0c1ea57d7eb6dd11a5207a315852d439a5f4874..cf43fdd7bac01b644c2cd0ce8490589f8cde3c4e 100644 --- a/modules/openapi-generator/src/main/resources/php-slim4-server/README.mustache +++ b/modules/openapi-generator/src/main/resources/php-slim4-server/README.mustache @@ -145,7 +145,7 @@ For instance, when abstract class located at `./lib/Api/AbstractPetApi.php` you Class | Method | HTTP request | Description ------------ | ------------- | ------------- | ------------- -{{#apiInfo}}{{#apis}}{{#operations}}{{#operation}}*{{classname}}* | **{{operationId}}** | **{{httpMethod}}** {{path}} | {{#summary}}{{{summary}}}{{/summary}} +{{#apiInfo}}{{#apis}}{{#operations}}{{#operation}}*{{classname}}* | **{{operationId}}** | **{{httpMethod}}** {{path}} | {{{summary}}} {{/operation}}{{/operations}}{{/apis}}{{/apiInfo}} {{/generateApiDocs}} @@ -185,7 +185,7 @@ No model defined in this package Scope list: {{#scopes}} -* `{{scope}}`{{#description}} - {{description}}{{/description}} +* `{{scope}}`{{#description}} - {{.}}{{/description}} {{/scopes}} {{/isOAuth}} diff --git a/modules/openapi-generator/src/main/resources/php-slim4-server/SlimRouter.mustache b/modules/openapi-generator/src/main/resources/php-slim4-server/SlimRouter.mustache index 10b458d4fd0f403bd1237bc44165521624eb94d7..84ebd5b2d4d0fffe5b2d4320b173b98ca7dc3c12 100644 --- a/modules/openapi-generator/src/main/resources/php-slim4-server/SlimRouter.mustache +++ b/modules/openapi-generator/src/main/resources/php-slim4-server/SlimRouter.mustache @@ -111,7 +111,7 @@ class SlimRouter 'isOAuth' => true, 'scopes' => [ {{#scopes}} - '{{scope}}',{{#description}} // {{description}}{{/description}} + '{{scope}}',{{#description}} // {{.}}{{/description}} {{/scopes}} ], ], diff --git a/modules/openapi-generator/src/main/resources/php-slim4-server/api.mustache b/modules/openapi-generator/src/main/resources/php-slim4-server/api.mustache index 4a2f87f0eecd78acb4ffc1fa21d8ae5bcbbd3eb0..f76f11f29afa642027d948bd0b9cbf21c6cb39ab 100644 --- a/modules/openapi-generator/src/main/resources/php-slim4-server/api.mustache +++ b/modules/openapi-generator/src/main/resources/php-slim4-server/api.mustache @@ -45,10 +45,10 @@ abstract class {{classname}} /** * {{httpMethod}} {{operationId}} {{#summary}} - * Summary: {{summary}} + * Summary: {{.}} {{/summary}} {{#notes}} - * Notes: {{notes}} + * Notes: {{.}} {{/notes}} {{#hasProduces}} * Output-Formats: [{{#produces}}{{{mediaType}}}{{^-last}}, {{/-last}}{{/produces}}] diff --git a/modules/openapi-generator/src/main/resources/php-slim4-server/licenseInfo.mustache b/modules/openapi-generator/src/main/resources/php-slim4-server/licenseInfo.mustache index cf26381b5f5bed6dc46de40b209515b126093119..6921643f6273a3bbab582a90a0715c9d46edbbdf 100644 --- a/modules/openapi-generator/src/main/resources/php-slim4-server/licenseInfo.mustache +++ b/modules/openapi-generator/src/main/resources/php-slim4-server/licenseInfo.mustache @@ -1,6 +1,6 @@ /** {{#appName}} - * {{{appName}}} + * {{{.}}} {{/appName}} * PHP version 7.2 * @@ -11,13 +11,13 @@ /** {{#appDescription}} - * {{{appDescription}}} + * {{{.}}} {{/appDescription}} {{#version}} - * The version of the OpenAPI document: {{{version}}} + * The version of the OpenAPI document: {{{.}}} {{/version}} {{#infoEmail}} - * Contact: {{{infoEmail}}} + * Contact: {{{.}}} {{/infoEmail}} * Generated by: https://github.com/openapitools/openapi-generator.git */ \ No newline at end of file diff --git a/modules/openapi-generator/src/main/resources/php-symfony/Controller.mustache b/modules/openapi-generator/src/main/resources/php-symfony/Controller.mustache index bafc3668ff33c1beb85b32601381421923b07341..8e214256045792caaff6f3e98f2c47d4f39853ce 100644 --- a/modules/openapi-generator/src/main/resources/php-symfony/Controller.mustache +++ b/modules/openapi-generator/src/main/resources/php-symfony/Controller.mustache @@ -155,7 +155,7 @@ class Controller extends AbstractController { // Figure out what the client accepts $accept = preg_split("/[\s,]+/", $accept); - + if (in_array('*/*', $accept) || in_array('application/*', $accept)) { // Prefer JSON if the client has no preference if (in_array('application/json', $produced)) { diff --git a/modules/openapi-generator/src/main/resources/php-symfony/README.mustache b/modules/openapi-generator/src/main/resources/php-symfony/README.mustache index 10d1b952e4c8ea574960386c7f8bd2882d71d208..2b959b0e3e59a035ac7660978987be54025907d4 100644 --- a/modules/openapi-generator/src/main/resources/php-symfony/README.mustache +++ b/modules/openapi-generator/src/main/resources/php-symfony/README.mustache @@ -1,13 +1,13 @@ # {{bundleName}} {{#appDescriptionWithNewLines}} -{{{appDescriptionWithNewLines}}} +{{{.}}} {{/appDescriptionWithNewLines}} This [Symfony](https://symfony.com/) bundle is automatically generated by the [OpenAPI Generator](https://openapi-generator.tech) project: - API version: {{appVersion}} {{#artifactVersion}} -- Package version: {{artifactVersion}} +- Package version: {{.}} {{/artifactVersion}} {{^hideGenerationTimestamp}} - Build date: {{generatedDate}} @@ -144,7 +144,7 @@ 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}} +{{#apiInfo}}{{#apis}}{{#operations}}{{#operation}}*{{classname}}* | [**{{operationId}}**]({{apiDocPath}}/{{classname}}.md#{{operationIdLowerCase}}) | **{{httpMethod}}** {{path}} | {{summary}} {{/operation}}{{/operations}}{{/apis}}{{/apiInfo}} ## Documentation For Models @@ -178,4 +178,3 @@ Class | Method | HTTP request | Description {{#apiInfo}}{{#apis}}{{#-last}}{{infoEmail}} {{/-last}}{{/apis}}{{/apiInfo}} - diff --git a/modules/openapi-generator/src/main/resources/php-symfony/api.mustache b/modules/openapi-generator/src/main/resources/php-symfony/api.mustache index db4c29278d839f955035797540a02e1be0158344..d342bf1d79bd184388e0a5f3405809f48b10fded 100644 --- a/modules/openapi-generator/src/main/resources/php-symfony/api.mustache +++ b/modules/openapi-generator/src/main/resources/php-symfony/api.mustache @@ -49,7 +49,7 @@ interface {{classname}} * Operation {{{operationId}}} {{#summary}} * - * {{{summary}}} + * {{{.}}} {{/summary}} * {{#description}} @@ -67,7 +67,7 @@ interface {{classname}} * @deprecated {{/isDeprecated}} */ - public function {{operationId}}({{#allParams}}{{#vendorExtensions.x-parameter-type}}{{vendorExtensions.x-parameter-type}} {{/vendorExtensions.x-parameter-type}}${{paramName}}{{^required}} = {{#defaultValue}}{{{.}}}{{/defaultValue}}{{^defaultValue}}null{{/defaultValue}}{{/required}}, {{/allParams}}&$responseCode, array &$responseHeaders); + public function {{operationId}}({{#allParams}}{{#vendorExtensions.x-parameter-type}}{{vendorExtensions.x-parameter-type}} {{/vendorExtensions.x-parameter-type}}${{paramName}}{{^required}} = {{{defaultValue}}}{{^defaultValue}}null{{/defaultValue}}{{/required}}, {{/allParams}}&$responseCode, array &$responseHeaders); {{/operation}} } {{/operations}} diff --git a/modules/openapi-generator/src/main/resources/php-symfony/api_controller.mustache b/modules/openapi-generator/src/main/resources/php-symfony/api_controller.mustache index f966b27f757293caf4dce44a15f9090e2890db9b..c3b5379da864c000c0f333b6b09dc5eafbd6805a 100644 --- a/modules/openapi-generator/src/main/resources/php-symfony/api_controller.mustache +++ b/modules/openapi-generator/src/main/resources/php-symfony/api_controller.mustache @@ -45,7 +45,7 @@ class {{controllerName}} extends Controller * Operation {{{operationId}}} {{#summary}} * - * {{{summary}}} + * {{{.}}} {{/summary}} * {{#description}} @@ -152,7 +152,7 @@ class {{controllerName}} extends Controller ${{paramName}} = $this->deserialize(${{paramName}}, '{{#isContainer}}{{#items}}array<{{dataType}}>{{/items}}{{/isContainer}}{{^isContainer}}{{dataType}}{{/isContainer}}', $inputFormat); {{/isBodyParam}} {{^isBodyParam}} - ${{paramName}} = $this->deserialize(${{paramName}}, '{{#isContainer}}array<{{#collectionFormat}}{{collectionFormat}}{{/collectionFormat}}{{^collectionFormat}}csv{{/collectionFormat}},{{dataType}}>{{/isContainer}}{{^isContainer}}{{dataType}}{{/isContainer}}', 'string'); + ${{paramName}} = $this->deserialize(${{paramName}}, '{{#isContainer}}array<{{collectionFormat}}{{^collectionFormat}}csv{{/collectionFormat}},{{dataType}}>{{/isContainer}}{{^isContainer}}{{dataType}}{{/isContainer}}', 'string'); {{/isBodyParam}} {{/isFile}} {{/allParams}} @@ -171,7 +171,7 @@ class {{controllerName}} extends Controller // Set authentication method '{{name}}' $handler->set{{name}}($security{{name}}); {{/authMethods}} - + // Make the call to the business logic $responseCode = {{#returnType}}200{{/returnType}}{{^returnType}}204{{/returnType}}; $responseHeaders = []; diff --git a/modules/openapi-generator/src/main/resources/php-symfony/api_doc.mustache b/modules/openapi-generator/src/main/resources/php-symfony/api_doc.mustache index 2dd9607c31b3a346fb7222cb8952e5c865159ef5..9e82eb746ad826d239deb74c08a05177099845b1 100644 --- a/modules/openapi-generator/src/main/resources/php-symfony/api_doc.mustache +++ b/modules/openapi-generator/src/main/resources/php-symfony/api_doc.mustache @@ -1,11 +1,11 @@ # {{apiPackage}}\{{classname}}{{#description}} -{{description}}{{/description}} +{{.}}{{/description}} All URIs are relative to *{{basePath}}* Method | HTTP request | Description ------------- | ------------- | ------------- -{{#operations}}{{#operation}}[**{{operationId}}**]({{classname}}.md#{{operationId}}) | **{{httpMethod}}** {{path}} | {{#summary}}{{summary}}{{/summary}} +{{#operations}}{{#operation}}[**{{operationId}}**]({{classname}}.md#{{operationId}}) | **{{httpMethod}}** {{path}} | {{summary}} {{/operation}}{{/operations}} {{#operations}} @@ -23,11 +23,11 @@ services: {{#operation}} ## **{{{operationId}}}** -> {{#returnType}}{{{returnType}}} {{/returnType}}{{{operationId}}}({{#allParams}}${{paramName}}{{^-last}}, {{/-last}}{{/allParams}}) +> {{#returnType}}{{{.}}} {{/returnType}}{{{operationId}}}({{#allParams}}${{paramName}}{{^-last}}, {{/-last}}{{/allParams}}) {{{summary}}}{{#notes}} -{{{notes}}}{{/notes}} +{{{.}}}{{/notes}} ### Example Implementation ```php @@ -75,7 +75,7 @@ class {{baseName}}Api implements {{classname}} {{^allParams}}This endpoint does not need any parameter.{{/allParams}}{{#allParams}}{{#-last}} Name | Type | Description | Notes ------------- | ------------- | ------------- | -------------{{/-last}}{{/allParams}} -{{#allParams}} **{{paramName}}** | {{#isFile}}**{{dataType}}**{{/isFile}}{{#isPrimitiveType}}**{{dataType}}**{{/isPrimitiveType}}{{^isPrimitiveType}}{{^isFile}}[**{{dataType}}**](../Model/{{baseType}}.md){{/isFile}}{{/isPrimitiveType}}| {{description}} |{{^required}} [optional]{{/required}}{{#defaultValue}} [default to {{defaultValue}}]{{/defaultValue}} +{{#allParams}} **{{paramName}}** | {{#isFile}}**{{dataType}}**{{/isFile}}{{#isPrimitiveType}}**{{dataType}}**{{/isPrimitiveType}}{{^isPrimitiveType}}{{^isFile}}[**{{dataType}}**](../Model/{{baseType}}.md){{/isFile}}{{/isPrimitiveType}}| {{description}} |{{^required}} [optional]{{/required}}{{#defaultValue}} [default to {{.}}]{{/defaultValue}} {{/allParams}} ### Return type diff --git a/modules/openapi-generator/src/main/resources/php-symfony/api_input_validation.mustache b/modules/openapi-generator/src/main/resources/php-symfony/api_input_validation.mustache index fca8dcd101b8cddc668cc623a4f3dc5b97adb47d..299b64cd764a0b7b4de8c0b629391d124dd71a8e 100644 --- a/modules/openapi-generator/src/main/resources/php-symfony/api_input_validation.mustache +++ b/modules/openapi-generator/src/main/resources/php-symfony/api_input_validation.mustache @@ -49,12 +49,12 @@ {{#hasValidation}} {{#maxLength}} $asserts[] = new Assert\Length([ - 'max' => {{maxLength}} + 'max' => {{.}} ]); {{/maxLength}} {{#minLength}} $asserts[] = new Assert\Length([ - 'min' => {{minLength}} + 'min' => {{.}} ]); {{/minLength}} {{#minimum}} @@ -74,16 +74,16 @@ {{/exclusiveMaximum}} {{/maximum}} {{#pattern}} - $asserts[] = new Assert\Regex("/{{pattern}}/"); + $asserts[] = new Assert\Regex("/{{.}}/"); {{/pattern}} {{#maxItems}} $asserts[] = new Assert\Count([ - 'max' => {{maxItems}} + 'max' => {{.}} ]); {{/maxItems}} {{#minItems}} $asserts[] = new Assert\Count([ - 'min' => {{minItems}} + 'min' => {{.}} ]); {{/minItems}} {{/hasValidation}} diff --git a/modules/openapi-generator/src/main/resources/php-symfony/composer.mustache b/modules/openapi-generator/src/main/resources/php-symfony/composer.mustache index f9472f261f65841555e7cd85d9851b661e81583d..3de301b23421f70de94c20c91c535bdc16cc11cd 100644 --- a/modules/openapi-generator/src/main/resources/php-symfony/composer.mustache +++ b/modules/openapi-generator/src/main/resources/php-symfony/composer.mustache @@ -1,7 +1,7 @@ { "name": "{{gitUserId}}/{{gitRepoId}}", {{#artifactVersion}} - "version": "{{artifactVersion}}", + "version": "{{.}}", {{/artifactVersion}} "description": "{{description}}", "keywords": [ diff --git a/modules/openapi-generator/src/main/resources/php-symfony/git_push.sh.mustache b/modules/openapi-generator/src/main/resources/php-symfony/git_push.sh.mustache index 8b3f689c9121a65080ad038d37a2036b01e559a1..f0bed5bd84155f05bc3cdc67af008f524efb38a6 100755 --- a/modules/openapi-generator/src/main/resources/php-symfony/git_push.sh.mustache +++ b/modules/openapi-generator/src/main/resources/php-symfony/git_push.sh.mustache @@ -55,4 +55,3 @@ 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/php-symfony/model.mustache b/modules/openapi-generator/src/main/resources/php-symfony/model.mustache index 12959e5101c68d1c1061d2743932458d6ec8842e..9d9831384fceb6abd3b007b67bda7cc894d942eb 100644 --- a/modules/openapi-generator/src/main/resources/php-symfony/model.mustache +++ b/modules/openapi-generator/src/main/resources/php-symfony/model.mustache @@ -29,7 +29,7 @@ use JMS\Serializer\Annotation\SerializedName; * Class representing the {{classname}} model. * {{#description}} - * {{description}} + * {{.}} * {{/description}} * @package {{modelPackage}} diff --git a/modules/openapi-generator/src/main/resources/php-symfony/model_generic.mustache b/modules/openapi-generator/src/main/resources/php-symfony/model_generic.mustache index 54b34b9f903d83650533af1a637b878dfb3410dd..67948d61b2a24879da540b72eba526a3e517ef22 100644 --- a/modules/openapi-generator/src/main/resources/php-symfony/model_generic.mustache +++ b/modules/openapi-generator/src/main/resources/php-symfony/model_generic.mustache @@ -13,7 +13,7 @@ class {{classname}} {{#parentSchema}}extends {{{parent}}} {{/parentSchema}} {{/parentSchema}} {{#vars}} - $this->{{name}} = isset($data['{{name}}']) ? $data['{{name}}'] : {{#defaultValue}}{{{defaultValue}}}{{/defaultValue}}{{^defaultValue}}null{{/defaultValue}}; + $this->{{name}} = isset($data['{{name}}']) ? $data['{{name}}'] : {{{defaultValue}}}{{^defaultValue}}null{{/defaultValue}}; {{/vars}} } {{#vars}} @@ -31,7 +31,7 @@ class {{classname}} {{#parentSchema}}extends {{{parent}}} {{/parentSchema}} /** * Sets {{name}}. * - * @param {{{vendorExtensions.x-comment-type}}}{{^required}}|null{{/required}} ${{name}}{{#description}} {{{description}}}{{/description}} + * @param {{{vendorExtensions.x-comment-type}}}{{^required}}|null{{/required}} ${{name}}{{#description}} {{{.}}}{{/description}} * * @return $this */ diff --git a/modules/openapi-generator/src/main/resources/php-symfony/model_variables.mustache b/modules/openapi-generator/src/main/resources/php-symfony/model_variables.mustache index d79a5feb74abe4cff55862ecfb7e0bf799d0b183..553ce48874d9c62c294ab30ec333318d9d270d7b 100644 --- a/modules/openapi-generator/src/main/resources/php-symfony/model_variables.mustache +++ b/modules/openapi-generator/src/main/resources/php-symfony/model_variables.mustache @@ -1,6 +1,6 @@ /** {{#description}} - * {{description}} + * {{.}} * {{/description}} * @var {{{vendorExtensions.x-comment-type}}}{{^required}}|null{{/required}} @@ -59,12 +59,12 @@ {{#hasValidation}} {{#maxLength}} * @Assert\Length( - * max = {{maxLength}} + * max = {{.}} * ) {{/maxLength}} {{#minLength}} * @Assert\Length( - * min = {{minLength}} + * min = {{.}} * ) {{/minLength}} {{#minimum}} @@ -84,16 +84,16 @@ {{/exclusiveMaximum}} {{/maximum}} {{#pattern}} - * @Assert\Regex("/{{pattern}}/") + * @Assert\Regex("/{{.}}/") {{/pattern}} {{#maxItems}} * @Assert\Count( - * max = {{maxItems}} + * max = {{.}} * ) {{/maxItems}} {{#minItems}} * @Assert\Count( - * min = {{minItems}} + * min = {{.}} * ) {{/minItems}} {{/hasValidation}} diff --git a/modules/openapi-generator/src/main/resources/php-symfony/partial_header.mustache b/modules/openapi-generator/src/main/resources/php-symfony/partial_header.mustache index 5d5b3fb25161f70fa2d70c2f09acf31be0ebae47..01bb4a845c99e65e32b9d8374ce63b6d60d3d4ed 100644 --- a/modules/openapi-generator/src/main/resources/php-symfony/partial_header.mustache +++ b/modules/openapi-generator/src/main/resources/php-symfony/partial_header.mustache @@ -1,14 +1,14 @@ /** {{#appName}} - * {{{appName}}} + * {{{.}}} * {{/appName}} {{#appDescription}} - * {{{appDescription}}} + * {{{.}}} * {{/appDescription}} - * {{#version}}The version of the OpenAPI document: {{{version}}}{{/version}} - * {{#infoEmail}}Contact: {{{infoEmail}}}{{/infoEmail}} + * {{#version}}The version of the OpenAPI document: {{{.}}}{{/version}} + * {{#infoEmail}}Contact: {{{.}}}{{/infoEmail}} * Generated by: https://github.com/openapitools/openapi-generator.git * */ diff --git a/modules/openapi-generator/src/main/resources/php-symfony/serialization/JmsSerializer.mustache b/modules/openapi-generator/src/main/resources/php-symfony/serialization/JmsSerializer.mustache index e4e7c96499bc2cc8460cfe13e6d922423abe4a0d..a3dc976f08c1d7bf171dbe1ddc28f0e5d8b85423 100644 --- a/modules/openapi-generator/src/main/resources/php-symfony/serialization/JmsSerializer.mustache +++ b/modules/openapi-generator/src/main/resources/php-symfony/serialization/JmsSerializer.mustache @@ -28,7 +28,7 @@ class JmsSerializer implements SerializerInterface public function deserialize($data, $type, $format) { if ($format == 'string') { - return $this->deserializeString($data, $type); + return $this->deserializeString($data, $type); } // If we end up here, let JMS serializer handle the deserialization diff --git a/modules/openapi-generator/src/main/resources/php-symfony/testing/api_test.mustache b/modules/openapi-generator/src/main/resources/php-symfony/testing/api_test.mustache index 61f6c3f89f9b0c917e7ae530a09fe5f8cae3dde7..20e46952ee324ea9ac2848624a1073cab025c905 100644 --- a/modules/openapi-generator/src/main/resources/php-symfony/testing/api_test.mustache +++ b/modules/openapi-generator/src/main/resources/php-symfony/testing/api_test.mustache @@ -80,7 +80,7 @@ use Symfony\Bundle\FrameworkBundle\Test\WebTestCase; $pattern = '{<%paramName%>}'; <%={{ }}=%> {{#pattern}} - $data = $this->genTestData('{{pattern}}'); + $data = $this->genTestData('{{.}}'); {{/pattern}} {{^pattern}} {{#isLong}} @@ -110,7 +110,7 @@ use Symfony\Bundle\FrameworkBundle\Test\WebTestCase; $ast = $compiler->parse($regexp); $generator = new \Hoa\Regex\Visitor\Isotropic(new \Hoa\Math\Sampler\Random()); - return $generator->visit($ast); + return $generator->visit($ast); } } {{/operations}} diff --git a/modules/openapi-generator/src/main/resources/php-symfony/testing/model_test.mustache b/modules/openapi-generator/src/main/resources/php-symfony/testing/model_test.mustache index bdeac9ab80504afeba61183644761787562c90bf..dbec303be987dcd66e3398ed2c4b536c65ef01cb 100644 --- a/modules/openapi-generator/src/main/resources/php-symfony/testing/model_test.mustache +++ b/modules/openapi-generator/src/main/resources/php-symfony/testing/model_test.mustache @@ -27,7 +27,7 @@ use PHPUnit\Framework\TestCase; * {{classname}}Test Class Doc Comment * * @category Class */ -// * @description {{#description}}{{description}}{{/description}}{{^description}}{{classname}}{{/description}} +// * @description {{description}}{{^description}}{{classname}}{{/description}} /** * @package {{modelTestsPackage}} * @author openapi-generator contributors diff --git a/modules/openapi-generator/src/main/resources/php/Configuration.mustache b/modules/openapi-generator/src/main/resources/php/Configuration.mustache index d186b10861ccbedc4c3e4ea796c8f4055809aa09..8c3b92c2c9fbf284637b9380bfd605b9e4afa7c5 100644 --- a/modules/openapi-generator/src/main/resources/php/Configuration.mustache +++ b/modules/openapi-generator/src/main/resources/php/Configuration.mustache @@ -81,7 +81,7 @@ class Configuration * * @var string */ - protected $userAgent = '{{#httpUserAgent}}{{{.}}}{{/httpUserAgent}}{{^httpUserAgent}}OpenAPI-Generator/{{#artifactVersion}}{{{.}}}{{/artifactVersion}}{{^artifactVersion}}1.0.0{{/artifactVersion}}/PHP{{/httpUserAgent}}'; + protected $userAgent = '{{{httpUserAgent}}}{{^httpUserAgent}}OpenAPI-Generator/{{{artifactVersion}}}{{^artifactVersion}}1.0.0{{/artifactVersion}}/PHP{{/httpUserAgent}}'; /** * Debug switch (default set to false) @@ -391,7 +391,7 @@ class Configuration $report .= ' PHP Version: ' . PHP_VERSION . PHP_EOL; $report .= ' The version of the OpenAPI document: {{version}}' . PHP_EOL; {{#artifactVersion}} - $report .= ' SDK Package Version: {{artifactVersion}}' . PHP_EOL; + $report .= ' SDK Package Version: {{.}}' . PHP_EOL; {{/artifactVersion}} $report .= ' Temp Folder Path: ' . self::getDefaultConfiguration()->getTempFolderPath() . PHP_EOL; diff --git a/modules/openapi-generator/src/main/resources/php/HeaderSelector.mustache b/modules/openapi-generator/src/main/resources/php/HeaderSelector.mustache index 6dd03c8337d0d5bd36bcf8042799a9503c09354b..aece2d69c0d030b18b1be13a925e9c1cb9aadb9b 100644 --- a/modules/openapi-generator/src/main/resources/php/HeaderSelector.mustache +++ b/modules/openapi-generator/src/main/resources/php/HeaderSelector.mustache @@ -97,4 +97,3 @@ class HeaderSelector } } } - diff --git a/modules/openapi-generator/src/main/resources/php/README.mustache b/modules/openapi-generator/src/main/resources/php/README.mustache index 1bb83fb56be3e57c104805ade4daf631ae9e0496..dada97d670ca308465f300bbbcd5205e6dfccb66 100644 --- a/modules/openapi-generator/src/main/resources/php/README.mustache +++ b/modules/openapi-generator/src/main/resources/php/README.mustache @@ -1,7 +1,7 @@ # {{packageName}} {{#appDescriptionWithNewLines}} -{{{appDescriptionWithNewLines}}} +{{{.}}} {{/appDescriptionWithNewLines}} {{#infoUrl}} @@ -60,7 +60,7 @@ $apiInstance = new {{invokerPackage}}\Api\{{classname}}( new GuzzleHttp\Client(){{#hasAuthMethods}}, $config{{/hasAuthMethods}} ); -{{#allParams}}${{paramName}} = {{{example}}}; // {{{dataType}}}{{#description}} | {{{description}}}{{/description}} +{{#allParams}}${{paramName}} = {{{example}}}; // {{{dataType}}}{{#description}} | {{{.}}}{{/description}} {{/allParams}} try { @@ -78,7 +78,7 @@ 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}} +{{#apiInfo}}{{#apis}}{{#operations}}{{#operation}}*{{classname}}* | [**{{operationId}}**]({{apiDocPath}}/{{classname}}.md#{{operationIdLowerCase}}) | **{{httpMethod}}** {{path}} | {{summary}} {{/operation}}{{/operations}}{{/apis}}{{/apiInfo}} ## Models @@ -140,7 +140,7 @@ This PHP package is automatically generated by the [OpenAPI Generator](https://o - API version: `{{appVersion}}` {{#artifactVersion}} - - Package version: `{{artifactVersion}}` + - Package version: `{{.}}` {{/artifactVersion}} {{^hideGenerationTimestamp}} - Build date: `{{generatedDate}}` diff --git a/modules/openapi-generator/src/main/resources/php/api.mustache b/modules/openapi-generator/src/main/resources/php/api.mustache index 86fb93864adf9859648c02d9e573c46b65e02fb9..eda19cebd22a5b0764632b9c0ddca3071c7e6ccc 100644 --- a/modules/openapi-generator/src/main/resources/php/api.mustache +++ b/modules/openapi-generator/src/main/resources/php/api.mustache @@ -131,7 +131,7 @@ use {{invokerPackage}}\ObjectSerializer; {{/-last}} {{/servers}} {{#allParams}} - * @param {{{dataType}}} ${{paramName}}{{#description}} {{description}}{{/description}}{{^description}} {{paramName}}{{/description}} {{#required}}(required){{/required}}{{^required}}(optional{{#defaultValue}}, default to {{{.}}}{{/defaultValue}}){{/required}}{{#isDeprecated}} (deprecated){{/isDeprecated}} + * @param {{{dataType}}} ${{paramName}}{{#description}} {{.}}{{/description}}{{^description}} {{paramName}}{{/description}} {{#required}}(required){{/required}}{{^required}}(optional{{#defaultValue}}, default to {{{.}}}{{/defaultValue}}){{/required}}{{#isDeprecated}} (deprecated){{/isDeprecated}} {{/allParams}} * * @throws \{{invokerPackage}}\ApiException on non-2xx response @@ -141,7 +141,7 @@ use {{invokerPackage}}\ObjectSerializer; * @deprecated {{/isDeprecated}} */ - public function {{operationId}}({{^vendorExtensions.x-group-parameters}}{{#allParams}}${{paramName}}{{^required}} = {{#defaultValue}}{{{.}}}{{/defaultValue}}{{^defaultValue}}null{{/defaultValue}}{{/required}}{{^-last}}, {{/-last}}{{/allParams}}{{/vendorExtensions.x-group-parameters}}{{#vendorExtensions.x-group-parameters}}$associative_array{{/vendorExtensions.x-group-parameters}}) + public function {{operationId}}({{^vendorExtensions.x-group-parameters}}{{#allParams}}${{paramName}}{{^required}} = {{{defaultValue}}}{{^defaultValue}}null{{/defaultValue}}{{/required}}{{^-last}}, {{/-last}}{{/allParams}}{{/vendorExtensions.x-group-parameters}}{{#vendorExtensions.x-group-parameters}}$associative_array{{/vendorExtensions.x-group-parameters}}) { {{#returnType}}list($response) = {{/returnType}}$this->{{operationId}}WithHttpInfo({{^vendorExtensions.x-group-parameters}}{{#allParams}}${{paramName}}{{^-last}}, {{/-last}}{{/allParams}}{{/vendorExtensions.x-group-parameters}}{{#vendorExtensions.x-group-parameters}}$associative_array{{/vendorExtensions.x-group-parameters}});{{#returnType}} return $response;{{/returnType}} @@ -172,7 +172,7 @@ use {{invokerPackage}}\ObjectSerializer; {{/-last}} {{/servers}} {{#allParams}} - * @param {{{dataType}}} ${{paramName}}{{#description}} {{description}}{{/description}} {{#required}}(required){{/required}}{{^required}}(optional{{#defaultValue}}, default to {{{.}}}{{/defaultValue}}){{/required}}{{#isDeprecated}} (deprecated){{/isDeprecated}} + * @param {{{dataType}}} ${{paramName}}{{#description}} {{.}}{{/description}} {{#required}}(required){{/required}}{{^required}}(optional{{#defaultValue}}, default to {{{.}}}{{/defaultValue}}){{/required}}{{#isDeprecated}} (deprecated){{/isDeprecated}} {{/allParams}} * * @throws \{{invokerPackage}}\ApiException on non-2xx response @@ -182,7 +182,7 @@ use {{invokerPackage}}\ObjectSerializer; * @deprecated {{/isDeprecated}} */ - public function {{operationId}}WithHttpInfo({{^vendorExtensions.x-group-parameters}}{{#allParams}}${{paramName}}{{^required}} = {{#defaultValue}}{{{.}}}{{/defaultValue}}{{^defaultValue}}null{{/defaultValue}}{{/required}}{{^-last}}, {{/-last}}{{/allParams}}{{/vendorExtensions.x-group-parameters}}{{#vendorExtensions.x-group-parameters}}$associative_array{{/vendorExtensions.x-group-parameters}}) + public function {{operationId}}WithHttpInfo({{^vendorExtensions.x-group-parameters}}{{#allParams}}${{paramName}}{{^required}} = {{{defaultValue}}}{{^defaultValue}}null{{/defaultValue}}{{/required}}{{^-last}}, {{/-last}}{{/allParams}}{{/vendorExtensions.x-group-parameters}}{{#vendorExtensions.x-group-parameters}}$associative_array{{/vendorExtensions.x-group-parameters}}) { $request = $this->{{operationId}}Request({{^vendorExtensions.x-group-parameters}}{{#allParams}}${{paramName}}{{^-last}}, {{/-last}}{{/allParams}}{{/vendorExtensions.x-group-parameters}}{{#vendorExtensions.x-group-parameters}}$associative_array{{/vendorExtensions.x-group-parameters}}); @@ -300,7 +300,7 @@ use {{invokerPackage}}\ObjectSerializer; {{/-last}} {{/servers}} {{#allParams}} - * @param {{{dataType}}} ${{paramName}}{{#description}} {{description}}{{/description}} {{#required}}(required){{/required}}{{^required}}(optional{{#defaultValue}}, default to {{{.}}}{{/defaultValue}}){{/required}}{{#isDeprecated}} (deprecated){{/isDeprecated}} + * @param {{{dataType}}} ${{paramName}}{{#description}} {{.}}{{/description}} {{#required}}(required){{/required}}{{^required}}(optional{{#defaultValue}}, default to {{{.}}}{{/defaultValue}}){{/required}}{{#isDeprecated}} (deprecated){{/isDeprecated}} {{/allParams}} * * @throws \InvalidArgumentException @@ -309,7 +309,7 @@ use {{invokerPackage}}\ObjectSerializer; * @deprecated {{/isDeprecated}} */ - public function {{operationId}}Async({{^vendorExtensions.x-group-parameters}}{{#allParams}}${{paramName}}{{^required}} = {{#defaultValue}}{{{.}}}{{/defaultValue}}{{^defaultValue}}null{{/defaultValue}}{{/required}}{{^-last}}, {{/-last}}{{/allParams}}{{/vendorExtensions.x-group-parameters}}{{#vendorExtensions.x-group-parameters}}$associative_array{{/vendorExtensions.x-group-parameters}}) + public function {{operationId}}Async({{^vendorExtensions.x-group-parameters}}{{#allParams}}${{paramName}}{{^required}} = {{{defaultValue}}}{{^defaultValue}}null{{/defaultValue}}{{/required}}{{^-last}}, {{/-last}}{{/allParams}}{{/vendorExtensions.x-group-parameters}}{{#vendorExtensions.x-group-parameters}}$associative_array{{/vendorExtensions.x-group-parameters}}) { return $this->{{operationId}}AsyncWithHttpInfo({{^vendorExtensions.x-group-parameters}}{{#allParams}}${{paramName}}{{^-last}}, {{/-last}}{{/allParams}}{{/vendorExtensions.x-group-parameters}}{{#vendorExtensions.x-group-parameters}}$associative_array{{/vendorExtensions.x-group-parameters}}) ->then( @@ -344,7 +344,7 @@ use {{invokerPackage}}\ObjectSerializer; {{/-last}} {{/servers}} {{#allParams}} - * @param {{{dataType}}} ${{paramName}}{{#description}} {{description}}{{/description}} {{#required}}(required){{/required}}{{^required}}(optional{{#defaultValue}}, default to {{{.}}}{{/defaultValue}}){{/required}}{{#isDeprecated}} (deprecated){{/isDeprecated}} + * @param {{{dataType}}} ${{paramName}}{{#description}} {{.}}{{/description}} {{#required}}(required){{/required}}{{^required}}(optional{{#defaultValue}}, default to {{{.}}}{{/defaultValue}}){{/required}}{{#isDeprecated}} (deprecated){{/isDeprecated}} {{/allParams}} * * @throws \InvalidArgumentException @@ -353,7 +353,7 @@ use {{invokerPackage}}\ObjectSerializer; * @deprecated {{/isDeprecated}} */ - public function {{operationId}}AsyncWithHttpInfo({{^vendorExtensions.x-group-parameters}}{{#allParams}}${{paramName}}{{^required}} = {{#defaultValue}}{{{.}}}{{/defaultValue}}{{^defaultValue}}null{{/defaultValue}}{{/required}}{{^-last}}, {{/-last}}{{/allParams}}{{/vendorExtensions.x-group-parameters}}{{#vendorExtensions.x-group-parameters}}$associative_array{{/vendorExtensions.x-group-parameters}}) + public function {{operationId}}AsyncWithHttpInfo({{^vendorExtensions.x-group-parameters}}{{#allParams}}${{paramName}}{{^required}} = {{{defaultValue}}}{{^defaultValue}}null{{/defaultValue}}{{/required}}{{^-last}}, {{/-last}}{{/allParams}}{{/vendorExtensions.x-group-parameters}}{{#vendorExtensions.x-group-parameters}}$associative_array{{/vendorExtensions.x-group-parameters}}) { $returnType = '{{{returnType}}}'; $request = $this->{{operationId}}Request({{^vendorExtensions.x-group-parameters}}{{#allParams}}${{paramName}}{{^-last}}, {{/-last}}{{/allParams}}{{/vendorExtensions.x-group-parameters}}{{#vendorExtensions.x-group-parameters}}$associative_array{{/vendorExtensions.x-group-parameters}}); @@ -413,7 +413,7 @@ use {{invokerPackage}}\ObjectSerializer; {{/-last}} {{/servers}} {{#allParams}} - * @param {{{dataType}}} ${{paramName}}{{#description}} {{description}}{{/description}} {{#required}}(required){{/required}}{{^required}}(optional{{#defaultValue}}, default to {{{.}}}{{/defaultValue}}){{/required}}{{#isDeprecated}} (deprecated){{/isDeprecated}} + * @param {{{dataType}}} ${{paramName}}{{#description}} {{.}}{{/description}} {{#required}}(required){{/required}}{{^required}}(optional{{#defaultValue}}, default to {{{.}}}{{/defaultValue}}){{/required}}{{#isDeprecated}} (deprecated){{/isDeprecated}} {{/allParams}} * * @throws \InvalidArgumentException @@ -422,12 +422,12 @@ use {{invokerPackage}}\ObjectSerializer; * @deprecated {{/isDeprecated}} */ - public function {{operationId}}Request({{^vendorExtensions.x-group-parameters}}{{#allParams}}${{paramName}}{{^required}} = {{#defaultValue}}{{{.}}}{{/defaultValue}}{{^defaultValue}}null{{/defaultValue}}{{/required}}{{^-last}}, {{/-last}}{{/allParams}}{{/vendorExtensions.x-group-parameters}}{{#vendorExtensions.x-group-parameters}}$associative_array{{/vendorExtensions.x-group-parameters}}) + public function {{operationId}}Request({{^vendorExtensions.x-group-parameters}}{{#allParams}}${{paramName}}{{^required}} = {{{defaultValue}}}{{^defaultValue}}null{{/defaultValue}}{{/required}}{{^-last}}, {{/-last}}{{/allParams}}{{/vendorExtensions.x-group-parameters}}{{#vendorExtensions.x-group-parameters}}$associative_array{{/vendorExtensions.x-group-parameters}}) { {{#vendorExtensions.x-group-parameters}} // unbox the parameters from the associative array {{#allParams}} - ${{paramName}} = array_key_exists('{{paramName}}', $associative_array) ? $associative_array['{{paramName}}'] : {{#defaultValue}}{{{.}}}{{/defaultValue}}{{^defaultValue}}null{{/defaultValue}}; + ${{paramName}} = array_key_exists('{{paramName}}', $associative_array) ? $associative_array['{{paramName}}'] : {{{defaultValue}}}{{^defaultValue}}null{{/defaultValue}}; {{/allParams}} {{/vendorExtensions.x-group-parameters}} @@ -508,7 +508,7 @@ use {{invokerPackage}}\ObjectSerializer; {{/isExplode}} {{^isExplode}} if (is_array(${{paramName}})) { - ${{paramName}} = ObjectSerializer::serializeCollection(${{paramName}}, '{{#style}}{{style}}{{/style}}{{^style}}{{#collectionFormat}}{{collectionFormat}}{{/collectionFormat}}{{/style}}', true); + ${{paramName}} = ObjectSerializer::serializeCollection(${{paramName}}, '{{style}}{{^style}}{{collectionFormat}}{{/style}}', true); } if (${{paramName}} !== null) { $queryParams['{{baseName}}'] = ${{paramName}}; diff --git a/modules/openapi-generator/src/main/resources/php/api_doc.mustache b/modules/openapi-generator/src/main/resources/php/api_doc.mustache index 2fc255126f7c44e83e03ea26b942b49db281233d..7c8460fe48080d0eb9d47fba0c56bb1c0ddba5b9 100644 --- a/modules/openapi-generator/src/main/resources/php/api_doc.mustache +++ b/modules/openapi-generator/src/main/resources/php/api_doc.mustache @@ -1,23 +1,23 @@ # {{invokerPackage}}\{{classname}}{{#description}} -{{description}}{{/description}} +{{.}}{{/description}} All URIs are relative to {{basePath}}. Method | HTTP request | Description ------------- | ------------- | ------------- -{{#operations}}{{#operation}}[**{{operationId}}()**]({{classname}}.md#{{operationId}}) | **{{httpMethod}}** {{path}} | {{#summary}}{{summary}}{{/summary}} +{{#operations}}{{#operation}}[**{{operationId}}()**]({{classname}}.md#{{operationId}}) | **{{httpMethod}}** {{path}} | {{summary}} {{/operation}}{{/operations}}{{#operations}}{{#operation}} ## `{{{operationId}}}()` ```php -{{{operationId}}}({{#allParams}}${{paramName}}{{^-last}}, {{/-last}}{{/allParams}}){{#returnType}}: {{{returnType}}}{{/returnType}} +{{{operationId}}}({{#allParams}}${{paramName}}{{^-last}}, {{/-last}}{{/allParams}}){{#returnType}}: {{{.}}}{{/returnType}} ``` {{{summary}}}{{#notes}} -{{{notes}}}{{/notes}} +{{{.}}}{{/notes}} ### Example @@ -33,11 +33,11 @@ $apiInstance = new {{invokerPackage}}\Api\{{classname}}( $config{{/hasAuthMethods}} ); {{^vendorExtensions.x-group-parameters}} -{{#allParams}}${{paramName}} = {{{example}}}; // {{{dataType}}}{{#description}} | {{{description}}}{{/description}} +{{#allParams}}${{paramName}} = {{{example}}}; // {{{dataType}}}{{#description}} | {{{.}}}{{/description}} {{/allParams}} {{/vendorExtensions.x-group-parameters}} {{#vendorExtensions.x-group-parameters}} -{{#allParams}}$associate_array['{{paramName}}'] = {{{example}}}; // {{{dataType}}}{{#description}} | {{{description}}}{{/description}} +{{#allParams}}$associate_array['{{paramName}}'] = {{{example}}}; // {{{dataType}}}{{#description}} | {{{.}}}{{/description}} {{/allParams}} {{/vendorExtensions.x-group-parameters}} @@ -57,7 +57,7 @@ Note: the input parameter is an associative array with the keys listed as the pa {{/vendorExtensions.x-group-parameters}} {{^allParams}}This endpoint does not need any parameter.{{/allParams}}{{#allParams}}{{#-last}}Name | Type | Description | Notes ------------- | ------------- | ------------- | -------------{{/-last}}{{/allParams}} -{{#allParams}} **{{paramName}}** | {{#isFile}}**{{{dataType}}}**{{/isFile}}{{#isPrimitiveType}}**{{{dataType}}}**{{/isPrimitiveType}}{{^isPrimitiveType}}{{^isFile}}[**{{{dataType}}}**](../Model/{{baseType}}.md){{/isFile}}{{/isPrimitiveType}}| {{description}} |{{^required}} [optional]{{/required}}{{#defaultValue}} [default to {{defaultValue}}]{{/defaultValue}} +{{#allParams}} **{{paramName}}** | {{#isFile}}**{{{dataType}}}**{{/isFile}}{{#isPrimitiveType}}**{{{dataType}}}**{{/isPrimitiveType}}{{^isPrimitiveType}}{{^isFile}}[**{{{dataType}}}**](../Model/{{baseType}}.md){{/isFile}}{{/isPrimitiveType}}| {{description}} |{{^required}} [optional]{{/required}}{{#defaultValue}} [default to {{.}}]{{/defaultValue}} {{/allParams}} ### Return type diff --git a/modules/openapi-generator/src/main/resources/php/composer.mustache b/modules/openapi-generator/src/main/resources/php/composer.mustache index e948b9b1bf65fb4342223c4d7ad934f0984f00d6..e7d2f939ef292f49e7255ce1e84662086626bf29 100644 --- a/modules/openapi-generator/src/main/resources/php/composer.mustache +++ b/modules/openapi-generator/src/main/resources/php/composer.mustache @@ -1,9 +1,9 @@ { {{#composerPackageName}} - "name": "{{composerPackageName}}", + "name": "{{.}}", {{/composerPackageName}} {{#artifactVersion}} - "version": "{{artifactVersion}}", + "version": "{{.}}", {{/artifactVersion}} "description": "{{{appDescription}}}", "keywords": [ diff --git a/modules/openapi-generator/src/main/resources/php/git_push.sh.mustache b/modules/openapi-generator/src/main/resources/php/git_push.sh.mustache index 8b3f689c9121a65080ad038d37a2036b01e559a1..f0bed5bd84155f05bc3cdc67af008f524efb38a6 100755 --- a/modules/openapi-generator/src/main/resources/php/git_push.sh.mustache +++ b/modules/openapi-generator/src/main/resources/php/git_push.sh.mustache @@ -55,4 +55,3 @@ 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/php/model.mustache b/modules/openapi-generator/src/main/resources/php/model.mustache index e2c6458df080e6bd58af13461b3f87cd9c4b4c42..c100009e5fa7a53ca83e893691112f8d2ee93b6a 100644 --- a/modules/openapi-generator/src/main/resources/php/model.mustache +++ b/modules/openapi-generator/src/main/resources/php/model.mustache @@ -33,7 +33,7 @@ use \{{invokerPackage}}\ObjectSerializer; * * @category Class {{#description}} - * @description {{description}} + * @description {{.}} {{/description}} * @package {{invokerPackage}} * @author OpenAPI Generator team diff --git a/modules/openapi-generator/src/main/resources/php/model_generic.mustache b/modules/openapi-generator/src/main/resources/php/model_generic.mustache index 35ccbed82755f064f309cc95a3bf5834acfd4f22..a56a82181e651d9f1310262132e44394e771b040 100644 --- a/modules/openapi-generator/src/main/resources/php/model_generic.mustache +++ b/modules/openapi-generator/src/main/resources/php/model_generic.mustache @@ -27,7 +27,7 @@ class {{classname}} {{#parentSchema}}extends {{{parent}}}{{/parentSchema}}{{^par * @psalm-var array<string, string|null> */ protected static $openAPIFormats = [ - {{#vars}}'{{name}}' => {{#dataFormat}}'{{{dataFormat}}}'{{/dataFormat}}{{^dataFormat}}null{{/dataFormat}}{{^-last}}, + {{#vars}}'{{name}}' => {{#dataFormat}}'{{{.}}}'{{/dataFormat}}{{^dataFormat}}null{{/dataFormat}}{{^-last}}, {{/-last}}{{/vars}} ]; @@ -172,7 +172,7 @@ class {{classname}} {{#parentSchema}}extends {{{parent}}}{{/parentSchema}}{{^par {{/parentSchema}} {{#vars}} - $this->container['{{name}}'] = $data['{{name}}'] ?? {{#defaultValue}}{{{defaultValue}}}{{/defaultValue}}{{^defaultValue}}null{{/defaultValue}}; + $this->container['{{name}}'] = $data['{{name}}'] ?? {{{defaultValue}}}{{^defaultValue}}null{{/defaultValue}}; {{/vars}} {{#discriminator}} @@ -291,7 +291,7 @@ class {{classname}} {{#parentSchema}}extends {{{parent}}}{{/parentSchema}}{{^par /** * Sets {{name}} * - * @param {{{dataType}}}{{^required}}|null{{/required}} ${{name}}{{#description}} {{{description}}}{{/description}}{{^description}} {{{name}}}{{/description}} + * @param {{{dataType}}}{{^required}}|null{{/required}} ${{name}}{{#description}} {{{.}}}{{/description}}{{^description}} {{{name}}}{{/description}} * * @return self {{#deprecated}} diff --git a/modules/openapi-generator/src/main/resources/php/model_test.mustache b/modules/openapi-generator/src/main/resources/php/model_test.mustache index 0f54973065f93207dc8435cc50905c0f25ddce85..c2fffedde4a147d2e0975b77ded4fdebd78bed34 100644 --- a/modules/openapi-generator/src/main/resources/php/model_test.mustache +++ b/modules/openapi-generator/src/main/resources/php/model_test.mustache @@ -27,7 +27,7 @@ use PHPUnit\Framework\TestCase; * {{classname}}Test Class Doc Comment * * @category Class - * @description {{#description}}{{description}}{{/description}}{{^description}}{{classname}}{{/description}} + * @description {{description}}{{^description}}{{classname}}{{/description}} * @package {{invokerPackage}} * @author OpenAPI Generator team * @link https://openapi-generator.tech diff --git a/modules/openapi-generator/src/main/resources/php/partial_header.mustache b/modules/openapi-generator/src/main/resources/php/partial_header.mustache index 496169aae32b067e1b0bb49161004db5e8a3e70b..ef3530aaeea757891c99b6a09140117474541bf0 100644 --- a/modules/openapi-generator/src/main/resources/php/partial_header.mustache +++ b/modules/openapi-generator/src/main/resources/php/partial_header.mustache @@ -1,17 +1,17 @@ /** {{#appName}} - * {{{appName}}} + * {{{.}}} * {{/appName}} {{#appDescription}} - * {{{appDescription}}} + * {{{.}}} * {{/appDescription}} {{#version}} - * The version of the OpenAPI document: {{{version}}} + * The version of the OpenAPI document: {{{.}}} {{/version}} {{#infoEmail}} - * Contact: {{{infoEmail}}} + * Contact: {{{.}}} {{/infoEmail}} * Generated by: https://openapi-generator.tech * OpenAPI Generator version: {{{generatorVersion}}} diff --git a/modules/openapi-generator/src/main/resources/plantuml/schemas.mustache b/modules/openapi-generator/src/main/resources/plantuml/schemas.mustache index bdcb455f6ea8654228993efdb785a5b6147a4091..d7dc90653bafd57cb1b2d20184da6405418d4127 100644 --- a/modules/openapi-generator/src/main/resources/plantuml/schemas.mustache +++ b/modules/openapi-generator/src/main/resources/plantuml/schemas.mustache @@ -3,7 +3,7 @@ title {{appName}} Schemas Diagram {{#entities}} -entity {{{name}}} { +entity {{{name}}} { {{#fields}} {{#isRequired}}* {{/isRequired}}{{{name}}}: {{{dataType}}} {{/fields}} diff --git a/modules/openapi-generator/src/main/resources/powershell/README.mustache b/modules/openapi-generator/src/main/resources/powershell/README.mustache index 0d05a3f7b54ca9a0bcaa5ab949be20327131af6d..cf2074fd3aa2efcb1be2316b32d9b08696fae709 100644 --- a/modules/openapi-generator/src/main/resources/powershell/README.mustache +++ b/modules/openapi-generator/src/main/resources/powershell/README.mustache @@ -1,7 +1,7 @@ # {{packageName}} - the PowerShell module for the {{appName}} {{#appDescriptionWithNewLines}} -{{{appDescriptionWithNewLines}}} +{{{.}}} {{/appDescriptionWithNewLines}} This PowerShell module is automatically generated by the [OpenAPI Generator](https://openapi-generator.tech) project: @@ -65,7 +65,7 @@ All URIs are relative to *{{{basePath}}}* Class | Method | HTTP request | Description ------------ | ------------- | ------------- | ------------- -{{#apiInfo}}{{#apis}}{{#operations}}{{#operation}}*{{classname}}* | [**{{vendorExtensions.x-powershell-method-name}}**]({{apiDocPath}}{{classname}}.md#{{vendorExtensions.x-powershell-method-name-lowercase}}) | **{{httpMethod}}** {{path}} | {{#summary}}{{{summary}}}{{/summary}} +{{#apiInfo}}{{#apis}}{{#operations}}{{#operation}}*{{classname}}* | [**{{vendorExtensions.x-powershell-method-name}}**]({{apiDocPath}}{{classname}}.md#{{vendorExtensions.x-powershell-method-name-lowercase}}) | **{{httpMethod}}** {{path}} | {{{summary}}} {{/operation}}{{/operations}}{{/apis}}{{/apiInfo}} ## Documentation for Models diff --git a/modules/openapi-generator/src/main/resources/powershell/about_Org.OpenAPITools.help.txt.mustache b/modules/openapi-generator/src/main/resources/powershell/about_Org.OpenAPITools.help.txt.mustache index a6a43671ace8be261f9b9724733482d716776f6c..8fa2621d9588c870e03bfcea52a4b86cf6d2b0f2 100644 --- a/modules/openapi-generator/src/main/resources/powershell/about_Org.OpenAPITools.help.txt.mustache +++ b/modules/openapi-generator/src/main/resources/powershell/about_Org.OpenAPITools.help.txt.mustache @@ -6,7 +6,7 @@ SHORT DESCRIPTION LONG DESCRIPTION {{#appDescription}} - {{{appDescription}}} + {{{.}}} {{/appDescription}} This PowerShell module is automatically generated by the [OpenAPI Generator](https://openapi-generator.tech) project: diff --git a/modules/openapi-generator/src/main/resources/powershell/api.mustache b/modules/openapi-generator/src/main/resources/powershell/api.mustache index 14a18de62e0915629612377fc9eb5e76a03608b9..e94ffd28275c07587cbfe9f8997c2d5211a27a2e 100644 --- a/modules/openapi-generator/src/main/resources/powershell/api.mustache +++ b/modules/openapi-generator/src/main/resources/powershell/api.mustache @@ -4,15 +4,15 @@ <# .SYNOPSIS -{{#summary}}{{{.}}}{{/summary}}{{^summary}}No summary available.{{/summary}} +{{{summary}}}{{^summary}}No summary available.{{/summary}} .DESCRIPTION -{{#description}}{{{description}}}{{/description}}{{^description}}No description available.{{/description}} +{{{description}}}{{^description}}No description available.{{/description}} {{#allParams}} .PARAMETER {{{paramName}}} -{{#description}}{{{description}}}{{/description}}{{^description}}No description available.{{/description}} +{{{description}}}{{^description}}No description available.{{/description}} {{/allParams}} {{#vendorExtensions.x-powershell-select-accept}} @@ -27,7 +27,7 @@ A switch when turned on will return a hash table of Response, StatusCode and Hea .OUTPUTS -{{#returnType}}{{{.}}}{{/returnType}}{{^returnType}}None{{/returnType}} +{{{returnType}}}{{^returnType}}None{{/returnType}} #> function {{{vendorExtensions.x-powershell-method-name}}} { [CmdletBinding()] @@ -221,7 +221,7 @@ function {{{vendorExtensions.x-powershell-method-name}}} { -QueryParameters $LocalVarQueryParameters ` -FormParameters $LocalVarFormParameters ` -CookieParameters $LocalVarCookieParameters ` - -ReturnType "{{#returnType}}{{{.}}}{{/returnType}}" ` + -ReturnType "{{{returnType}}}" ` -IsBodyNullable {{#bodyParam}}{{#isNullable}}$true{{/isNullable}}{{^isNullable}}$false{{/isNullable}}{{/bodyParam}}{{^bodyParam}}$false{{/bodyParam}} {{#vendorExtensions.x-ps-return-type-one-of}} diff --git a/modules/openapi-generator/src/main/resources/powershell/api_doc.mustache b/modules/openapi-generator/src/main/resources/powershell/api_doc.mustache index 2f5ec53c9e2591dae66cd785ebfbc7c655dd9e59..6727741b28b8efb3e4de99a9dc11c5ff26abb33e 100644 --- a/modules/openapi-generator/src/main/resources/powershell/api_doc.mustache +++ b/modules/openapi-generator/src/main/resources/powershell/api_doc.mustache @@ -1,25 +1,25 @@ # {{packageName}}.{{apiPackage}}.{{classname}}{{#description}} -{{description}}{{/description}} +{{.}}{{/description}} All URIs are relative to *{{{basePath}}}* Method | HTTP request | Description ------------- | ------------- | ------------- -{{#operations}}{{#operation}}[**{{vendorExtensions.x-powershell-method-name}}**]({{classname}}.md#{{vendorExtensions.x-powershell-method-name-lowercase}}) | **{{httpMethod}}** {{path}} | {{#summary}}{{summary}}{{/summary}} +{{#operations}}{{#operation}}[**{{vendorExtensions.x-powershell-method-name}}**]({{classname}}.md#{{vendorExtensions.x-powershell-method-name-lowercase}}) | **{{httpMethod}}** {{path}} | {{summary}} {{/operation}}{{/operations}} {{#operations}} {{#operation}} <a name="{{{vendorExtensions.x-powershell-method-name-lowercase}}}"></a> # **{{{vendorExtensions.x-powershell-method-name}}}** -> {{#returnType}}{{{returnType}}}{{/returnType}}{{^returnType}}void{{/returnType}} {{{vendorExtensions.x-powershell-method-name}}}<br> +> {{{returnType}}}{{^returnType}}void{{/returnType}} {{{vendorExtensions.x-powershell-method-name}}}<br> {{#allParams}} > [-{{paramName}}] <{{{vendorExtensions.x-powershell-data-type}}}><br> {{/allParams}} {{{summary}}}{{#notes}} -{{{notes}}}{{/notes}} +{{{.}}}{{/notes}} ### Example ```powershell @@ -89,7 +89,7 @@ try { {{^allParams}}This endpoint does not need any parameter.{{/allParams}}{{#allParams}}{{#-last}} Name | Type | Description | Notes ------------- | ------------- | ------------- | -------------{{/-last}}{{/allParams}} -{{#allParams}} **{{paramName}}** | {{#isFile}}**{{dataType}}**{{/isFile}}{{#isPrimitiveType}}**{{dataType}}**{{/isPrimitiveType}}{{^isPrimitiveType}}{{^isFile}}[**{{dataType}}**]({{#isContainer}}{{baseType}}{{/isContainer}}{{^isContainer}}{{dataType}}{{/isContainer}}.md){{/isFile}}{{/isPrimitiveType}}| {{description}} | {{^required}}[optional] {{/required}}{{#defaultValue}}[default to {{defaultValue}}]{{/defaultValue}} +{{#allParams}} **{{paramName}}** | {{#isFile}}**{{dataType}}**{{/isFile}}{{#isPrimitiveType}}**{{dataType}}**{{/isPrimitiveType}}{{^isPrimitiveType}}{{^isFile}}[**{{dataType}}**]({{#isContainer}}{{baseType}}{{/isContainer}}{{^isContainer}}{{dataType}}{{/isContainer}}.md){{/isFile}}{{/isPrimitiveType}}| {{description}} | {{^required}}[optional] {{/required}}{{#defaultValue}}[default to {{.}}]{{/defaultValue}} {{/allParams}} ### Return type diff --git a/modules/openapi-generator/src/main/resources/powershell/http_signature_auth.mustache b/modules/openapi-generator/src/main/resources/powershell/http_signature_auth.mustache index e1ae5f7aeed2252e58e725e68670b02d820debed..a282997cf52f07eb7f82622b31f91e9809716ce3 100644 --- a/modules/openapi-generator/src/main/resources/powershell/http_signature_auth.mustache +++ b/modules/openapi-generator/src/main/resources/powershell/http_signature_auth.mustache @@ -397,7 +397,7 @@ function ConvertTo-ECDSAANS1Format{ ) $derLength = 68 #default lenght for ECDSA code signinged bit 0x44 - $rbytesLength = 32 #R length 0x20 + $rbytesLength = 32 #R length 0x20 $sbytesLength = 32 #S length 0x20 [byte[]]$rBytes = $signedBytes[0..31] [byte[]]$sBytes = $signedBytes[32..63] @@ -418,11 +418,11 @@ function ConvertTo-ECDSAANS1Format{ $derBytes += 48 # start of the sequence 0x30 $derBytes += $derLength # total length r lenth, type and r bytes - + $derBytes += 2 # tag for integer $derBytes += $rbytesLength # length of r $derBytes += $rBytes - + $derBytes += 2 #tag for integer $derBytes += $sbytesLength #length of s $derBytes += $sBytes diff --git a/modules/openapi-generator/src/main/resources/powershell/model_anyof.mustache b/modules/openapi-generator/src/main/resources/powershell/model_anyof.mustache index 62991addbe282115e9b5d199e3a841c8bb951480..0b9d69dd4900fd8f95ebb9e6fef1917b228fde9b 100644 --- a/modules/openapi-generator/src/main/resources/powershell/model_anyof.mustache +++ b/modules/openapi-generator/src/main/resources/powershell/model_anyof.mustache @@ -1,11 +1,11 @@ <# .SYNOPSIS -{{#summary}}{{{.}}}{{/summary}}{{^summary}}No summary available.{{/summary}} +{{{summary}}}{{^summary}}No summary available.{{/summary}} .DESCRIPTION -{{#description}}{{{description}}}{{/description}}{{^description}}No description available.{{/description}} +{{{description}}}{{^description}}No description available.{{/description}} .PARAMETER Json @@ -64,7 +64,7 @@ function ConvertFrom-{{{apiNamePrefix}}}JsonTo{{{classname}}} { Write-Debug "Failed to match '{{{modelName}}}' defined in anyOf ({{{apiNamePrefix}}}{{{classname}}}) using the discriminator lookup ({{{mappingName}}}). Proceeding with the typical anyOf type matching." } } - + {{/mappedModels}} {{/discriminator}} {{#anyOf}} @@ -98,4 +98,3 @@ function ConvertFrom-{{{apiNamePrefix}}}JsonTo{{{classname}}} { } } } - diff --git a/modules/openapi-generator/src/main/resources/powershell/model_oneof.mustache b/modules/openapi-generator/src/main/resources/powershell/model_oneof.mustache index 39a1044c1f3fafb138a9ff2deaa1409b442600b2..e2433a866fe9a497833d42141d679093ecb449e6 100644 --- a/modules/openapi-generator/src/main/resources/powershell/model_oneof.mustache +++ b/modules/openapi-generator/src/main/resources/powershell/model_oneof.mustache @@ -1,11 +1,11 @@ <# .SYNOPSIS -{{#summary}}{{{.}}}{{/summary}}{{^summary}}No summary available.{{/summary}} +{{{summary}}}{{^summary}}No summary available.{{/summary}} .DESCRIPTION -{{#description}}{{{description}}}{{/description}}{{^description}}No description available.{{/description}} +{{{description}}}{{^description}}No description available.{{/description}} .PARAMETER Json @@ -100,4 +100,3 @@ function ConvertFrom-{{{apiNamePrefix}}}JsonTo{{{classname}}} { } } } - diff --git a/modules/openapi-generator/src/main/resources/powershell/model_simple.mustache b/modules/openapi-generator/src/main/resources/powershell/model_simple.mustache index 1ac78f767bd0a98484376fa2cdd517f828164ee4..94f92c3dd03334389a6561a58cf886bd8c0448c8 100644 --- a/modules/openapi-generator/src/main/resources/powershell/model_simple.mustache +++ b/modules/openapi-generator/src/main/resources/powershell/model_simple.mustache @@ -1,21 +1,21 @@ <# .SYNOPSIS -{{#summary}}{{{.}}}{{/summary}}{{^summary}}No summary available.{{/summary}} +{{{summary}}}{{^summary}}No summary available.{{/summary}} .DESCRIPTION -{{#description}}{{{description}}}{{/description}}{{^description}}No description available.{{/description}} +{{{description}}}{{^description}}No description available.{{/description}} {{#allVars}} {{^discardReadOnly}} .PARAMETER {{{name}}} -{{#description}}{{{description}}}{{/description}}{{^description}}No description available.{{/description}} +{{{description}}}{{^description}}No description available.{{/description}} {{/discardReadOnly}} {{#discardReadOnly}} {{^isReadOnly}} .PARAMETER {{{name}}} -{{#description}}{{{description}}}{{/description}}{{^description}}No description available.{{/description}} +{{{description}}}{{^description}}No description available.{{/description}} {{/isReadOnly}} {{/discardReadOnly}} {{/allVars}} @@ -46,7 +46,7 @@ function Initialize-{{{apiNamePrefix}}}{{{classname}}} { {{/isReadOnly}} {{/allVars}} {{/discardReadOnly}} -{{^discardReadOnly}} +{{^discardReadOnly}} {{#allVars}} [Parameter(Position = {{vendorExtensions.x-index}}, ValueFromPipelineByPropertyName = $true)] {{#pattern}} @@ -117,7 +117,7 @@ function Initialize-{{{apiNamePrefix}}}{{{classname}}} { {{/minItems}} {{/hasValidation}} - {{/vars}} + {{/vars}} $PSO = [PSCustomObject]@{ {{=<< >>=}} @@ -179,7 +179,7 @@ function Initialize-{{{apiNamePrefix}}}{{{classname}}} { {{/hasValidation}} {{/isReadOnly}} {{/vars}} - + $PSO = [PSCustomObject]@{ {{=<< >>=}} <<#allVars>> diff --git a/modules/openapi-generator/src/main/resources/powershell/partial_header.mustache b/modules/openapi-generator/src/main/resources/powershell/partial_header.mustache index fbf00f6cfbd7dc435882e2a0e7341342be50f03f..c6cb36a6638ee2d478230901eef36847ceb4088a 100644 --- a/modules/openapi-generator/src/main/resources/powershell/partial_header.mustache +++ b/modules/openapi-generator/src/main/resources/powershell/partial_header.mustache @@ -1,15 +1,15 @@ # {{#appName}} -# {{{appName}}} +# {{{.}}} {{/appName}} {{#appDescription}} -# {{{appDescription}}} +# {{{.}}} {{/appDescription}} {{#version}} -# Version: {{{version}}} +# Version: {{{.}}} {{/version}} {{#infoEmail}} -# Contact: {{{infoEmail}}} +# Contact: {{{.}}} {{/infoEmail}} # Generated by OpenAPI Generator: https://openapi-generator.tech # diff --git a/modules/openapi-generator/src/main/resources/protobuf-schema/README.mustache b/modules/openapi-generator/src/main/resources/protobuf-schema/README.mustache index 7f8bbe320ebeb0e787a6dcdd4829248377873f6e..0724e27a954ef9113882c24940fc5eb17e4fa2ce 100644 --- a/modules/openapi-generator/src/main/resources/protobuf-schema/README.mustache +++ b/modules/openapi-generator/src/main/resources/protobuf-schema/README.mustache @@ -1,11 +1,11 @@ # gPRC for {{packageName}} {{#appDescriptionWithNewLines}} -{{{appDescriptionWithNewLines}}} +{{{.}}} {{/appDescriptionWithNewLines}} ## Overview -These files were generated by the [OpenAPI Generator](https://openapi-generator.tech) project. +These files were generated by the [OpenAPI Generator](https://openapi-generator.tech) project. - API version: {{appVersion}} - Package version: {{packageVersion}} diff --git a/modules/openapi-generator/src/main/resources/protobuf-schema/git_push.sh.mustache b/modules/openapi-generator/src/main/resources/protobuf-schema/git_push.sh.mustache index c344020eab5e066223d075d4c4d2eda225eaa01f..90e9e063940ba3b15a3031503bd75a3622a70f2e 100755 --- a/modules/openapi-generator/src/main/resources/protobuf-schema/git_push.sh.mustache +++ b/modules/openapi-generator/src/main/resources/protobuf-schema/git_push.sh.mustache @@ -49,4 +49,3 @@ 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" git push origin master 2>&1 | grep -v 'To https' - diff --git a/modules/openapi-generator/src/main/resources/protobuf-schema/partial_header.mustache b/modules/openapi-generator/src/main/resources/protobuf-schema/partial_header.mustache index 0ade1e5273e22b3fe0601c07ace0214f1586c291..79ae090e31a66c57a5b626f8518abf45618a1634 100644 --- a/modules/openapi-generator/src/main/resources/protobuf-schema/partial_header.mustache +++ b/modules/openapi-generator/src/main/resources/protobuf-schema/partial_header.mustache @@ -1,13 +1,13 @@ /* {{#appName}} - {{{appName}}} - + {{{.}}} + {{/appName}} {{#appDescription}} - {{{appDescription}}} - + {{{.}}} + {{/appDescription}} - {{#version}}The version of the OpenAPI document: {{{version}}}{{/version}} - {{#infoEmail}}Contact: {{{infoEmail}}}{{/infoEmail}} + {{#version}}The version of the OpenAPI document: {{{.}}}{{/version}} + {{#infoEmail}}Contact: {{{.}}}{{/infoEmail}} Generated by OpenAPI Generator: https://openapi-generator.tech */ diff --git a/modules/openapi-generator/src/main/resources/python-aiohttp/controller.mustache b/modules/openapi-generator/src/main/resources/python-aiohttp/controller.mustache index 9cc9552263eea56553af8d86783083cbe7829070..170f65ed4b192c1c119df6ed5ff0533a1cb7f407 100644 --- a/modules/openapi-generator/src/main/resources/python-aiohttp/controller.mustache +++ b/modules/openapi-generator/src/main/resources/python-aiohttp/controller.mustache @@ -9,9 +9,9 @@ from {{packageName}} import util async def {{operationId}}(request: web.Request, {{#allParams}}{{paramName}}{{^required}}=None{{/required}}{{^-last}}, {{/-last}}{{/allParams}}) -> web.Response: - """{{#summary}}{{.}}{{/summary}}{{^summary}}{{operationId}}{{/summary}} + """{{summary}}{{^summary}}{{operationId}}{{/summary}} - {{#notes}}{{.}}{{/notes}} + {{notes}} {{#allParams}} :param {{paramName}}: {{description}} diff --git a/modules/openapi-generator/src/main/resources/python-aiohttp/controller_test.mustache b/modules/openapi-generator/src/main/resources/python-aiohttp/controller_test.mustache index 7d1d4e054c9167eda9685932413d1795b0da4b92..a00675fdb51809f98fe3baaebaee4f3e035fe85a 100644 --- a/modules/openapi-generator/src/main/resources/python-aiohttp/controller_test.mustache +++ b/modules/openapi-generator/src/main/resources/python-aiohttp/controller_test.mustache @@ -56,7 +56,7 @@ async def test_{{operationId}}(client): {{/formParams}} response = await client.request( method='{{httpMethod}}', - path='{{#contextPath}}{{{.}}}{{/contextPath}}{{{path}}}'{{#pathParams}}{{#-first}}.format({{/-first}}{{paramName}}={{{example}}}{{^-last}}, {{/-last}}{{#-last}}){{/-last}}{{/pathParams}}, + path='{{{contextPath}}}{{{path}}}'{{#pathParams}}{{#-first}}.format({{/-first}}{{paramName}}={{{example}}}{{^-last}}, {{/-last}}{{#-last}}){{/-last}}{{/pathParams}}, headers=headers,{{#bodyParam}} json={{paramName}},{{/bodyParam}}{{#formParams}}{{#-first}} data=data,{{/-first}}{{/formParams}}{{#queryParams}}{{#-first}} 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 3b12ab254f73c7c249622ef952f891cd7f8f77eb..55423b17f5f5dfeb8aa720d285a985833b9e8fe2 100644 --- a/modules/openapi-generator/src/main/resources/python-aiohttp/model.mustache +++ b/modules/openapi-generator/src/main/resources/python-aiohttp/model.mustache @@ -31,7 +31,7 @@ class {{classname}}(Model): {{/-last}} {{/enumVars}}{{/allowableValues}} - def __init__(self{{#vars}}, {{name}}: {{dataType}}={{#defaultValue}}{{{defaultValue}}}{{/defaultValue}}{{^defaultValue}}None{{/defaultValue}}{{/vars}}): + def __init__(self{{#vars}}, {{name}}: {{dataType}}={{{defaultValue}}}{{^defaultValue}}None{{/defaultValue}}{{/vars}}): """{{classname}} - a model defined in OpenAPI {{#vars}} @@ -69,7 +69,7 @@ class {{classname}}(Model): """Gets the {{name}} of this {{classname}}. {{#description}} - {{{description}}} + {{{.}}} {{/description}} :return: The {{name}} of this {{classname}}. @@ -82,7 +82,7 @@ class {{classname}}(Model): """Sets the {{name}} of this {{classname}}. {{#description}} - {{{description}}} + {{{.}}} {{/description}} :param {{name}}: The {{name}} of this {{classname}}. diff --git a/modules/openapi-generator/src/main/resources/python-aiohttp/security_controller_.mustache b/modules/openapi-generator/src/main/resources/python-aiohttp/security_controller_.mustache index bf7bf2b36d69df8fa5ee0497cfc6b8d149004752..df74618a9ffc704929f37eeae07fcce6dfcbaad9 100644 --- a/modules/openapi-generator/src/main/resources/python-aiohttp/security_controller_.mustache +++ b/modules/openapi-generator/src/main/resources/python-aiohttp/security_controller_.mustache @@ -56,4 +56,3 @@ def info_from_{{name}}(token: str) -> dict: {{/isBasicBearer}} {{/authMethods}} - diff --git a/modules/openapi-generator/src/main/resources/python-blueplanet/app/{{packageName}}/controllers/controller.mustache b/modules/openapi-generator/src/main/resources/python-blueplanet/app/{{packageName}}/controllers/controller.mustache index cc3a854d7d736f35d58e41f45b5f98243986ace7..6f026a0602f22cccf94cd05b04ca0ca12c2ef072 100644 --- a/modules/openapi-generator/src/main/resources/python-blueplanet/app/{{packageName}}/controllers/controller.mustache +++ b/modules/openapi-generator/src/main/resources/python-blueplanet/app/{{packageName}}/controllers/controller.mustache @@ -9,9 +9,9 @@ from {{packageName}} import util def {{operationId}}({{#allParams}}{{paramName}}{{^required}}=None{{/required}}{{^-last}}, {{/-last}}{{/allParams}}): # noqa: E501 - """{{#summary}}{{.}}{{/summary}}{{^summary}}{{operationId}}{{/summary}} + """{{summary}}{{^summary}}{{operationId}}{{/summary}} - {{#notes}}{{.}}{{/notes}} # noqa: E501 + {{notes}} # noqa: E501 {{#allParams}} :param {{paramName}}: {{description}} @@ -55,7 +55,7 @@ def {{operationId}}({{#allParams}}{{paramName}}{{^required}}=None{{/required}}{{ {{/isMap}} {{/allParams}} - :rtype: {{#returnType}}{{.}}{{/returnType}}{{^returnType}}None{{/returnType}} + :rtype: {{returnType}}{{^returnType}}None{{/returnType}} """ {{#allParams}} {{^isContainer}} diff --git a/modules/openapi-generator/src/main/resources/python-blueplanet/app/{{packageName}}/models/model.mustache b/modules/openapi-generator/src/main/resources/python-blueplanet/app/{{packageName}}/models/model.mustache index 78157b3187163976bdfd6b2cf992a6f02f495978..587589e60011f7c799ed7a811071a7c88b7d00ed 100644 --- a/modules/openapi-generator/src/main/resources/python-blueplanet/app/{{packageName}}/models/model.mustache +++ b/modules/openapi-generator/src/main/resources/python-blueplanet/app/{{packageName}}/models/model.mustache @@ -27,7 +27,7 @@ class {{classname}}(Model): {{/-last}} {{/enumVars}}{{/allowableValues}} - def __init__(self{{#vars}}, {{name}}{{^supportPython2}}: {{datatype}}{{/supportPython2}}={{#defaultValue}}{{{defaultValue}}}{{/defaultValue}}{{^defaultValue}}None{{/defaultValue}}{{/vars}}): # noqa: E501 + def __init__(self{{#vars}}, {{name}}{{^supportPython2}}: {{datatype}}{{/supportPython2}}={{{defaultValue}}}{{^defaultValue}}None{{/defaultValue}}{{/vars}}): # noqa: E501 """{{classname}} - a model defined in Swagger {{#vars}} @@ -68,7 +68,7 @@ class {{classname}}(Model): """Gets the {{name}} of this {{classname}}. {{#description}} - {{{description}}} # noqa: E501 + {{{.}}} # noqa: E501 {{/description}} :return: The {{name}} of this {{classname}}. @@ -81,7 +81,7 @@ class {{classname}}(Model): """Sets the {{name}} of this {{classname}}. {{#description}} - {{{description}}} # noqa: E501 + {{{.}}} # noqa: E501 {{/description}} :param {{name}}: The {{name}} of this {{classname}}. diff --git a/modules/openapi-generator/src/main/resources/python-blueplanet/app/{{packageName}}/test/controller_test.mustache b/modules/openapi-generator/src/main/resources/python-blueplanet/app/{{packageName}}/test/controller_test.mustache index 7a2add26d0c8f66369e304987bb52fd4d9f84b24..5bf4d008fe779a0ae2c4880a59c6be541901f051 100644 --- a/modules/openapi-generator/src/main/resources/python-blueplanet/app/{{packageName}}/test/controller_test.mustache +++ b/modules/openapi-generator/src/main/resources/python-blueplanet/app/{{packageName}}/test/controller_test.mustache @@ -32,7 +32,7 @@ class {{#operations}}Test{{classname}}(BaseTestCase): {{#-first}}data = dict({{/-first}}{{^-first}} {{/-first}}{{paramName}}={{{example}}}{{^-last}},{{/-last}}{{#-last}}){{/-last}} {{/formParams}} response = self.client.open( - '{{#contextPath}}{{{.}}}{{/contextPath}}{{{path}}}'{{#pathParams}}{{#-first}}.format({{/-first}}{{paramName}}={{{example}}}{{^-last}}, {{/-last}}{{#-last}}){{/-last}}{{/pathParams}}, + '{{{contextPath}}}{{{path}}}'{{#pathParams}}{{#-first}}.format({{/-first}}{{paramName}}={{{example}}}{{^-last}}, {{/-last}}{{#-last}}){{/-last}}{{/pathParams}}, method='{{httpMethod}}'{{#bodyParam}}, data=json.dumps({{paramName}}){{^consumes}}, content_type='application/json'{{/consumes}}{{/bodyParam}}{{#headerParams}}{{#-first}}, diff --git a/modules/openapi-generator/src/main/resources/python-fastapi/api.mustache b/modules/openapi-generator/src/main/resources/python-fastapi/api.mustache index 04b95fb104a419ed662990e7e2d99194a0e01f0e..d71e7f0d4ad991171e2e1ef652af64f1f7ffbe73 100644 --- a/modules/openapi-generator/src/main/resources/python-fastapi/api.mustache +++ b/modules/openapi-generator/src/main/resources/python-fastapi/api.mustache @@ -36,10 +36,10 @@ router = APIRouter() }, tags=[{{#tags}}"{{name}}"{{^-last}},{{/-last}}{{/tags}}], {{#summary}} - summary="{{summary}}", + summary="{{.}}", {{/summary}} {{#description}} - description = "{{description}}", + description = "{{.}}", {{/description}} ) async def {{operationId}}( @@ -53,7 +53,7 @@ async def {{operationId}}( ), {{/authMethods}} {{/hasAuthMethods}} -) -> {{#returnType}}{{.}}{{/returnType}}{{^returnType}}None{{/returnType}}: +) -> {{returnType}}{{^returnType}}None{{/returnType}}: {{#notes}}"""{{.}}""" ...{{/notes}}{{^notes}}...{{/notes}} {{^-last}} diff --git a/modules/openapi-generator/src/main/resources/python-fastapi/endpoint_argument_definition.mustache b/modules/openapi-generator/src/main/resources/python-fastapi/endpoint_argument_definition.mustache index c4bace9973d0cc5fadba803941a9dcd6bd71d001..28f1c75e1f5e52e21cdda2d5403df9acfb9df8d0 100644 --- a/modules/openapi-generator/src/main/resources/python-fastapi/endpoint_argument_definition.mustache +++ b/modules/openapi-generator/src/main/resources/python-fastapi/endpoint_argument_definition.mustache @@ -1 +1 @@ -{{#isPathParam}}{{baseName}}{{/isPathParam}}{{^isPathParam}}{{paramName}}{{/isPathParam}}: {{>param_type}} = {{#isPathParam}}Path{{/isPathParam}}{{#isHeaderParam}}Header{{/isHeaderParam}}{{#isFormParam}}Form{{/isFormParam}}{{#isQueryParam}}Query{{/isQueryParam}}{{#isCookieParam}}Cookie{{/isCookieParam}}{{#isBodyParam}}Body{{/isBodyParam}}({{#defaultValue}}{{.}}{{/defaultValue}}{{^defaultValue}}None{{/defaultValue}}, description="{{description}}"{{#isLong}}{{#minimum}}, ge={{minimum}}{{/minimum}}{{#maximum}}, le={{maximum}}{{/maximum}}{{/isLong}}{{#isInteger}}{{#minimum}}, ge={{minimum}}{{/minimum}}{{#maximum}}, le={{maximum}}{{/maximum}}{{/isInteger}}{{#pattern}}, regex=r"{{pattern}}"{{/pattern}}{{#minLength}}, min_length={{minLength}}{{/minLength}}{{#maxLength}}, max_length={{maxLength}}{{/maxLength}}) \ No newline at end of file +{{#isPathParam}}{{baseName}}{{/isPathParam}}{{^isPathParam}}{{paramName}}{{/isPathParam}}: {{>param_type}} = {{#isPathParam}}Path{{/isPathParam}}{{#isHeaderParam}}Header{{/isHeaderParam}}{{#isFormParam}}Form{{/isFormParam}}{{#isQueryParam}}Query{{/isQueryParam}}{{#isCookieParam}}Cookie{{/isCookieParam}}{{#isBodyParam}}Body{{/isBodyParam}}({{defaultValue}}{{^defaultValue}}None{{/defaultValue}}, description="{{description}}"{{#isLong}}{{#minimum}}, ge={{.}}{{/minimum}}{{#maximum}}, le={{.}}{{/maximum}}{{/isLong}}{{#isInteger}}{{#minimum}}, ge={{.}}{{/minimum}}{{#maximum}}, le={{.}}{{/maximum}}{{/isInteger}}{{#pattern}}, regex=r"{{.}}"{{/pattern}}{{#minLength}}, min_length={{.}}{{/minLength}}{{#maxLength}}, max_length={{.}}{{/maxLength}}) \ No newline at end of file diff --git a/modules/openapi-generator/src/main/resources/python-fastapi/partial_header.mustache b/modules/openapi-generator/src/main/resources/python-fastapi/partial_header.mustache index 62e28acde9b9de6475c79089b92c25fd1d7b72e0..add2ee4158ba058458bc15e1923ba4fd34c15ee7 100644 --- a/modules/openapi-generator/src/main/resources/python-fastapi/partial_header.mustache +++ b/modules/openapi-generator/src/main/resources/python-fastapi/partial_header.mustache @@ -1,17 +1,17 @@ """ {{#appName}} - {{{appName}}} + {{{.}}} {{/appName}} {{#appDescription}} - {{{appDescription}}} + {{{.}}} {{/appDescription}} {{#version}} - The version of the OpenAPI document: {{{version}}} + The version of the OpenAPI document: {{{.}}} {{/version}} {{#infoEmail}} - Contact: {{{infoEmail}}} + Contact: {{{.}}} {{/infoEmail}} Generated by: https://openapi-generator.tech """ diff --git a/modules/openapi-generator/src/main/resources/python-flask/controller.mustache b/modules/openapi-generator/src/main/resources/python-flask/controller.mustache index 2f372c97710d5a03e47613ee5cba9d43dffc09ff..dfd90e094db66fa3d1d0a3c282eb11142bc894c7 100644 --- a/modules/openapi-generator/src/main/resources/python-flask/controller.mustache +++ b/modules/openapi-generator/src/main/resources/python-flask/controller.mustache @@ -9,9 +9,9 @@ from {{packageName}} import util def {{operationId}}({{#allParams}}{{paramName}}{{^required}}=None{{/required}}{{^-last}}, {{/-last}}{{/allParams}}): # noqa: E501 - """{{#summary}}{{.}}{{/summary}}{{^summary}}{{operationId}}{{/summary}} + """{{summary}}{{^summary}}{{operationId}}{{/summary}} - {{#notes}}{{.}}{{/notes}} # noqa: E501 + {{notes}} # noqa: E501 {{#allParams}} :param {{paramName}}: {{description}} @@ -55,7 +55,7 @@ def {{operationId}}({{#allParams}}{{paramName}}{{^required}}=None{{/required}}{{ {{/isMap}} {{/allParams}} - :rtype: {{#returnType}}{{.}}{{/returnType}}{{^returnType}}None{{/returnType}} + :rtype: {{returnType}}{{^returnType}}None{{/returnType}} """ {{#allParams}} {{^isContainer}} @@ -69,7 +69,7 @@ def {{operationId}}({{#allParams}}{{paramName}}{{^required}}=None{{/required}}{{ {{^isFile}} {{^isUuid}} if connexion.request.is_json: - {{paramName}} = {{#baseType}}{{baseType}}{{/baseType}}{{^baseType}}{{#dataType}} {{dataType}}{{/dataType}}{{/baseType}}.from_dict(connexion.request.get_json()) # noqa: E501 + {{paramName}} = {{baseType}}{{^baseType}}{{#dataType}} {{.}}{{/dataType}}{{/baseType}}.from_dict(connexion.request.get_json()) # noqa: E501 {{/isUuid}} {{/isFile}} {{/isPrimitiveType}} diff --git a/modules/openapi-generator/src/main/resources/python-flask/controller_test.mustache b/modules/openapi-generator/src/main/resources/python-flask/controller_test.mustache index ab901b2f11206eb9695d07303cae77f79a6e8cea..1d16331325f71c5e66fc02d1363b9fc586a782e6 100644 --- a/modules/openapi-generator/src/main/resources/python-flask/controller_test.mustache +++ b/modules/openapi-generator/src/main/resources/python-flask/controller_test.mustache @@ -39,7 +39,7 @@ class {{#operations}}Test{{classname}}(BaseTestCase): {{#-first}}data = dict({{/-first}}{{^-first}} {{/-first}}{{paramName}}={{{example}}}{{^-last}},{{/-last}}{{#-last}}){{/-last}} {{/formParams}} response = self.client.open( - '{{#contextPath}}{{{.}}}{{/contextPath}}{{{path}}}'{{#pathParams}}{{#-first}}.format({{/-first}}{{paramName}}={{{example}}}{{^-last}}, {{/-last}}{{#-last}}){{/-last}}{{/pathParams}}, + '{{{contextPath}}}{{{path}}}'{{#pathParams}}{{#-first}}.format({{/-first}}{{paramName}}={{{example}}}{{^-last}}, {{/-last}}{{#-last}}){{/-last}}{{/pathParams}}, method='{{httpMethod}}', headers=headers{{#bodyParam}}, data=json.dumps({{paramName}}){{^consumes}}, diff --git a/modules/openapi-generator/src/main/resources/python-flask/git_push.sh.mustache b/modules/openapi-generator/src/main/resources/python-flask/git_push.sh.mustache index 8b3f689c9121a65080ad038d37a2036b01e559a1..f0bed5bd84155f05bc3cdc67af008f524efb38a6 100755 --- a/modules/openapi-generator/src/main/resources/python-flask/git_push.sh.mustache +++ b/modules/openapi-generator/src/main/resources/python-flask/git_push.sh.mustache @@ -55,4 +55,3 @@ 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/python-flask/model.mustache b/modules/openapi-generator/src/main/resources/python-flask/model.mustache index 0c4309a867aaab7ae3ef46ad5fee5bbae9f90e4f..8bb3d65d73732e94ffdf373be9bf24b0dfacc4bb 100644 --- a/modules/openapi-generator/src/main/resources/python-flask/model.mustache +++ b/modules/openapi-generator/src/main/resources/python-flask/model.mustache @@ -37,7 +37,7 @@ class {{classname}}(Model): {{/enumVars}} {{/allowableValues}} - def __init__(self{{#vars}}, {{name}}={{#defaultValue}}{{{defaultValue}}}{{/defaultValue}}{{^defaultValue}}None{{/defaultValue}}{{/vars}}): # noqa: E501 + def __init__(self{{#vars}}, {{name}}={{{defaultValue}}}{{^defaultValue}}None{{/defaultValue}}{{/vars}}): # noqa: E501 """{{classname}} - a model defined in OpenAPI {{#vars}} @@ -78,7 +78,7 @@ class {{classname}}(Model): """Gets the {{name}} of this {{classname}}. {{#description}} - {{{description}}} # noqa: E501 + {{{.}}} # noqa: E501 {{/description}} :return: The {{name}} of this {{classname}}. @@ -91,7 +91,7 @@ class {{classname}}(Model): """Sets the {{name}} of this {{classname}}. {{#description}} - {{{description}}} # noqa: E501 + {{{.}}} # noqa: E501 {{/description}} :param {{name}}: The {{name}} of this {{classname}}. diff --git a/modules/openapi-generator/src/main/resources/python-flask/security_controller_.mustache b/modules/openapi-generator/src/main/resources/python-flask/security_controller_.mustache index f6293adda19e54ee20c44066ef4f34fc3f0a8dac..a5f3d6d5312e6e475c6a1f234659a930232b3341 100644 --- a/modules/openapi-generator/src/main/resources/python-flask/security_controller_.mustache +++ b/modules/openapi-generator/src/main/resources/python-flask/security_controller_.mustache @@ -87,4 +87,3 @@ def info_from_{{name}}(token): {{/isBasicBearer}} {{/authMethods}} - diff --git a/modules/openapi-generator/src/main/resources/python-legacy/README.mustache b/modules/openapi-generator/src/main/resources/python-legacy/README.mustache index 9d854a4f1b9b4079ffefc25371237cf9c8689732..71f0ef69bbdaed15d3b233039992ca55d51ee2e4 100644 --- a/modules/openapi-generator/src/main/resources/python-legacy/README.mustache +++ b/modules/openapi-generator/src/main/resources/python-legacy/README.mustache @@ -1,6 +1,6 @@ # {{{projectName}}} {{#appDescriptionWithNewLines}} -{{{appDescriptionWithNewLines}}} +{{{.}}} {{/appDescriptionWithNewLines}} This Python package is automatically generated by the [OpenAPI Generator](https://openapi-generator.tech) project: diff --git a/modules/openapi-generator/src/main/resources/python-legacy/README_onlypackage.mustache b/modules/openapi-generator/src/main/resources/python-legacy/README_onlypackage.mustache index 476007eca232607f24848350ee9662db38092039..3f1d5b1fc6450494726601947afb3aee4fb31d39 100644 --- a/modules/openapi-generator/src/main/resources/python-legacy/README_onlypackage.mustache +++ b/modules/openapi-generator/src/main/resources/python-legacy/README_onlypackage.mustache @@ -1,6 +1,6 @@ # {{{projectName}}} {{#appDescription}} -{{{appDescription}}} +{{{.}}} {{/appDescription}} The `{{packageName}}` package is automatically generated by the [OpenAPI Generator](https://openapi-generator.tech) project: diff --git a/modules/openapi-generator/src/main/resources/python-legacy/api.mustache b/modules/openapi-generator/src/main/resources/python-legacy/api.mustache index 38d137c3c4014eb426cb91f1ce32cf762f7d2ea3..cca4ae9bd3763d8146b130151aa156da7deb596e 100644 --- a/modules/openapi-generator/src/main/resources/python-legacy/api.mustache +++ b/modules/openapi-generator/src/main/resources/python-legacy/api.mustache @@ -31,10 +31,10 @@ class {{classname}}(object): {{#operation}} def {{operationId}}(self, {{#sortParamsByRequiredFlag}}{{#allParams}}{{#required}}{{paramName}}, {{/required}}{{/allParams}}{{/sortParamsByRequiredFlag}}**kwargs): # noqa: E501 - """{{#summary}}{{{.}}}{{/summary}}{{^summary}}{{operationId}}{{/summary}} # noqa: E501 + """{{{summary}}}{{^summary}}{{operationId}}{{/summary}} # noqa: E501 {{#notes}} - {{{notes}}} # noqa: E501 + {{{.}}} # noqa: E501 {{/notes}} This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True @@ -48,7 +48,7 @@ class {{classname}}(object): >>> result = thread.get() {{#allParams}} - :param {{paramName}}:{{#description}} {{{description}}}{{/description}}{{#required}} (required){{/required}}{{#optional}}(optional){{/optional}} + :param {{paramName}}:{{#description}} {{{.}}}{{/description}}{{#required}} (required){{/required}}{{#optional}}(optional){{/optional}} :type {{paramName}}: {{dataType}}{{#optional}}, optional{{/optional}} {{/allParams}} :param async_req: Whether to execute the request asynchronously. @@ -64,16 +64,16 @@ class {{classname}}(object): :return: Returns the result object. If the method is called asynchronously, returns the request thread. - :rtype: {{#returnType}}{{returnType}}{{/returnType}}{{^returnType}}None{{/returnType}} + :rtype: {{returnType}}{{^returnType}}None{{/returnType}} """ kwargs['_return_http_data_only'] = True return self.{{operationId}}_with_http_info({{#sortParamsByRequiredFlag}}{{#allParams}}{{#required}}{{paramName}}, {{/required}}{{/allParams}}{{/sortParamsByRequiredFlag}}**kwargs) # noqa: E501 def {{operationId}}_with_http_info(self, {{#sortParamsByRequiredFlag}}{{#allParams}}{{#required}}{{paramName}}, {{/required}}{{/allParams}}{{/sortParamsByRequiredFlag}}**kwargs): # noqa: E501 - """{{#summary}}{{{.}}}{{/summary}}{{^summary}}{{operationId}}{{/summary}} # noqa: E501 + """{{{summary}}}{{^summary}}{{operationId}}{{/summary}} # noqa: E501 {{#notes}} - {{{notes}}} # noqa: E501 + {{{.}}} # noqa: E501 {{/notes}} This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True @@ -87,7 +87,7 @@ class {{classname}}(object): >>> result = thread.get() {{#allParams}} - :param {{paramName}}:{{#description}} {{{description}}}{{/description}}{{#required}} (required){{/required}}{{#optional}}(optional){{/optional}} + :param {{paramName}}:{{#description}} {{{.}}}{{/description}}{{#required}} (required){{/required}}{{#optional}}(optional){{/optional}} :type {{paramName}}: {{dataType}}{{#optional}}, optional{{/optional}} {{/allParams}} :param async_req: Whether to execute the request asynchronously. @@ -110,7 +110,7 @@ class {{classname}}(object): :return: Returns the result object. If the method is called asynchronously, returns the request thread. - :rtype: {{#returnType}}tuple({{returnType}}, status_code(int), headers(HTTPHeaderDict)){{/returnType}}{{^returnType}}None{{/returnType}} + :rtype: {{#returnType}}tuple({{.}}, status_code(int), headers(HTTPHeaderDict)){{/returnType}}{{^returnType}}None{{/returnType}} """ {{#servers.0}} @@ -253,14 +253,14 @@ class {{classname}}(object): {{/hasConsumes}} # Authentication setting auth_settings = [{{#authMethods}}'{{name}}'{{^-last}}, {{/-last}}{{/authMethods}}] # noqa: E501 - + {{#returnType}} {{#responses}} {{#-first}} response_types_map = { {{/-first}} {{^isWildcard}} - {{code}}: {{#dataType}}"{{dataType}}"{{/dataType}}{{^dataType}}None{{/dataType}}, + {{code}}: {{#dataType}}"{{.}}"{{/dataType}}{{^dataType}}None{{/dataType}}, {{/isWildcard}} {{#-last}} } diff --git a/modules/openapi-generator/src/main/resources/python-legacy/api_client.mustache b/modules/openapi-generator/src/main/resources/python-legacy/api_client.mustache index 4f230dff623c0fde3a08e790c973f9f74445dde8..a11b17c39dd1b06b4b376696e8c3bad5d5a02c2e 100644 --- a/modules/openapi-generator/src/main/resources/python-legacy/api_client.mustache +++ b/modules/openapi-generator/src/main/resources/python-legacy/api_client.mustache @@ -73,7 +73,7 @@ class ApiClient(object): self.default_headers[header_name] = header_value self.cookie = cookie # Set default User-Agent. - self.user_agent = '{{#httpUserAgent}}{{{.}}}{{/httpUserAgent}}{{^httpUserAgent}}OpenAPI-Generator/{{{packageVersion}}}/python{{/httpUserAgent}}' + self.user_agent = '{{{httpUserAgent}}}{{^httpUserAgent}}OpenAPI-Generator/{{{packageVersion}}}/python{{/httpUserAgent}}' self.client_side_validation = configuration.client_side_validation {{#asyncio}} @@ -211,7 +211,7 @@ class ApiClient(object): {{#tornado}} raise tornado.gen.Return(return_data) {{/tornado}} - + response_type = response_types_map.get(response_data.status, None) if six.PY3 and response_type not in ["file", "bytes"]: @@ -223,7 +223,7 @@ class ApiClient(object): response_data.data = response_data.data.decode(encoding) # deserialize response data - + if response_type: return_data = self.deserialize(response_data, response_type) else: diff --git a/modules/openapi-generator/src/main/resources/python-legacy/api_doc.mustache b/modules/openapi-generator/src/main/resources/python-legacy/api_doc.mustache index dddec917196f4182078761bb00e38291f597fd3e..a9bc6e09bf131407d3f2abd3deb081e7d8f034ae 100644 --- a/modules/openapi-generator/src/main/resources/python-legacy/api_doc.mustache +++ b/modules/openapi-generator/src/main/resources/python-legacy/api_doc.mustache @@ -1,21 +1,21 @@ # {{packageName}}.{{classname}}{{#description}} -{{description}}{{/description}} +{{.}}{{/description}} All URIs are relative to *{{basePath}}* Method | HTTP request | Description ------------- | ------------- | ------------- -{{#operations}}{{#operation}}[**{{operationId}}**]({{classname}}.md#{{operationId}}) | **{{httpMethod}}** {{path}} | {{#summary}}{{summary}}{{/summary}} +{{#operations}}{{#operation}}[**{{operationId}}**]({{classname}}.md#{{operationId}}) | **{{httpMethod}}** {{path}} | {{summary}} {{/operation}}{{/operations}} {{#operations}} {{#operation}} # **{{{operationId}}}** -> {{#returnType}}{{{returnType}}} {{/returnType}}{{{operationId}}}({{#allParams}}{{#required}}{{{paramName}}}{{/required}}{{^required}}{{{paramName}}}={{{paramName}}}{{/required}}{{^-last}}, {{/-last}}{{/allParams}}) +> {{#returnType}}{{{.}}} {{/returnType}}{{{operationId}}}({{#allParams}}{{#required}}{{{paramName}}}{{/required}}{{^required}}{{{paramName}}}={{{paramName}}}{{/required}}{{^-last}}, {{/-last}}{{/allParams}}) {{{summary}}}{{#notes}} -{{{notes}}}{{/notes}} +{{{.}}}{{/notes}} ### Example @@ -45,7 +45,7 @@ Method | HTTP request | Description {{^allParams}}This endpoint does not need any parameter.{{/allParams}}{{#allParams}}{{#-last}} Name | Type | Description | Notes ------------- | ------------- | ------------- | -------------{{/-last}}{{/allParams}} -{{#allParams}} **{{paramName}}** | {{#isFile}}**{{dataType}}**{{/isFile}}{{^isFile}}{{#isPrimitiveType}}**{{dataType}}**{{/isPrimitiveType}}{{^isPrimitiveType}}[**{{dataType}}**]({{baseType}}.md){{/isPrimitiveType}}{{/isFile}}| {{description}} | {{^required}}[optional] {{/required}}{{#defaultValue}}[default to {{defaultValue}}]{{/defaultValue}} +{{#allParams}} **{{paramName}}** | {{#isFile}}**{{dataType}}**{{/isFile}}{{^isFile}}{{#isPrimitiveType}}**{{dataType}}**{{/isPrimitiveType}}{{^isPrimitiveType}}[**{{dataType}}**]({{baseType}}.md){{/isPrimitiveType}}{{/isFile}}| {{description}} | {{^required}}[optional] {{/required}}{{#defaultValue}}[default to {{.}}]{{/defaultValue}} {{/allParams}} ### Return type diff --git a/modules/openapi-generator/src/main/resources/python-legacy/api_test.mustache b/modules/openapi-generator/src/main/resources/python-legacy/api_test.mustache index 90fafc15f33735ef73b3f84a192f0dd2d471b8d7..6f8539bb0d612a41798cff544fb2fd99b2845841 100644 --- a/modules/openapi-generator/src/main/resources/python-legacy/api_test.mustache +++ b/modules/openapi-generator/src/main/resources/python-legacy/api_test.mustache @@ -25,7 +25,7 @@ class {{#operations}}Test{{classname}}(unittest.TestCase): """Test case for {{{operationId}}} {{#summary}} - {{{summary}}} # noqa: E501 + {{{.}}} # noqa: E501 {{/summary}} """ pass diff --git a/modules/openapi-generator/src/main/resources/python-legacy/common_README.mustache b/modules/openapi-generator/src/main/resources/python-legacy/common_README.mustache index 12fa1322a7aaad8dc811105dba8bdca9662429dc..cc7e939194e9325a53bb35547803ac9b67f9a61a 100644 --- a/modules/openapi-generator/src/main/resources/python-legacy/common_README.mustache +++ b/modules/openapi-generator/src/main/resources/python-legacy/common_README.mustache @@ -30,7 +30,7 @@ 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}} +{{#apiInfo}}{{#apis}}{{#operations}}{{#operation}}*{{classname}}* | [**{{operationId}}**]({{apiDocPath}}{{classname}}.md#{{operationIdLowerCase}}) | **{{httpMethod}}** {{path}} | {{summary}} {{/operation}}{{/operations}}{{/apis}}{{/apiInfo}} ## Documentation For Models diff --git a/modules/openapi-generator/src/main/resources/python-legacy/configuration.mustache b/modules/openapi-generator/src/main/resources/python-legacy/configuration.mustache index 56750531471e4d9293cdf23fbd928b71d62d359c..e53d48184df0ad63a55df0e1a6332724282c49fb 100644 --- a/modules/openapi-generator/src/main/resources/python-legacy/configuration.mustache +++ b/modules/openapi-generator/src/main/resources/python-legacy/configuration.mustache @@ -76,8 +76,8 @@ class Configuration(object): :param server_operation_variables: Mapping from operation ID to a mapping with string values to replace variables in templated server configuration. The validation of enums is performed for variables with defined enum values before. - :param ssl_ca_cert: str - the path to a file of concatenated CA certificates - in PEM format + :param ssl_ca_cert: str - the path to a file of concatenated CA certificates + in PEM format {{#hasAuthMethods}} :Example: diff --git a/modules/openapi-generator/src/main/resources/python-legacy/git_push.sh.mustache b/modules/openapi-generator/src/main/resources/python-legacy/git_push.sh.mustache index 8b3f689c9121a65080ad038d37a2036b01e559a1..f0bed5bd84155f05bc3cdc67af008f524efb38a6 100755 --- a/modules/openapi-generator/src/main/resources/python-legacy/git_push.sh.mustache +++ b/modules/openapi-generator/src/main/resources/python-legacy/git_push.sh.mustache @@ -55,4 +55,3 @@ 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/python-legacy/model.mustache b/modules/openapi-generator/src/main/resources/python-legacy/model.mustache index 236b8f8c3a2eb0c10da981b18f82d36cb7a31d95..e899b0db336a9bc64e0848a3dd6bba60f8a9af06 100644 --- a/modules/openapi-generator/src/main/resources/python-legacy/model.mustache +++ b/modules/openapi-generator/src/main/resources/python-legacy/model.mustache @@ -61,7 +61,7 @@ class {{classname}}(object): } {{/discriminator}} - def __init__(self{{#vars}}, {{name}}={{#defaultValue}}{{{defaultValue}}}{{/defaultValue}}{{^defaultValue}}None{{/defaultValue}}{{/vars}}, local_vars_configuration=None): # noqa: E501 + def __init__(self{{#vars}}, {{name}}={{{defaultValue}}}{{^defaultValue}}None{{/defaultValue}}{{/vars}}, local_vars_configuration=None): # noqa: E501 """{{classname}} - a model defined in OpenAPI""" # noqa: E501 if local_vars_configuration is None: local_vars_configuration = Configuration.get_default_copy() @@ -93,7 +93,7 @@ class {{classname}}(object): """Gets the {{name}} of this {{classname}}. # noqa: E501 {{#description}} - {{{description}}} # noqa: E501 + {{{.}}} # noqa: E501 {{/description}} :return: The {{name}} of this {{classname}}. # noqa: E501 @@ -106,7 +106,7 @@ class {{classname}}(object): """Sets the {{name}} of this {{classname}}. {{#description}} - {{{description}}} # noqa: E501 + {{{.}}} # noqa: E501 {{/description}} :param {{name}}: The {{name}} of this {{classname}}. # noqa: E501 diff --git a/modules/openapi-generator/src/main/resources/python-legacy/model_test.mustache b/modules/openapi-generator/src/main/resources/python-legacy/model_test.mustache index 6fb8ac7fb406ec2dd401ed932a8305b57fabe682..e6fbccf60392e4585935904b171b3246bdd942bb 100644 --- a/modules/openapi-generator/src/main/resources/python-legacy/model_test.mustache +++ b/modules/openapi-generator/src/main/resources/python-legacy/model_test.mustache @@ -32,14 +32,14 @@ class Test{{classname}}(unittest.TestCase): if include_optional : return {{classname}}( {{#vars}} - {{name}} = {{#example}}{{{.}}}{{/example}}{{^example}}None{{/example}}{{^-last}}, {{/-last}} + {{name}} = {{{example}}}{{^example}}None{{/example}}{{^-last}}, {{/-last}} {{/vars}} ) else : return {{classname}}( {{#vars}} {{#required}} - {{name}} = {{#example}}{{{.}}}{{/example}}{{^example}}None{{/example}}, + {{name}} = {{{example}}}{{^example}}None{{/example}}, {{/required}} {{/vars}} ) diff --git a/modules/openapi-generator/src/main/resources/python-legacy/partial_header.mustache b/modules/openapi-generator/src/main/resources/python-legacy/partial_header.mustache index c52fbceb138a695f9e67119ee81f1eed3a41e2c6..dc3c8f3d8c8a2b63d5cc0ced772e4e30bbdfa232 100644 --- a/modules/openapi-generator/src/main/resources/python-legacy/partial_header.mustache +++ b/modules/openapi-generator/src/main/resources/python-legacy/partial_header.mustache @@ -1,17 +1,17 @@ """ {{#appName}} - {{{appName}}} + {{{.}}} {{/appName}} {{#appDescription}} - {{{appDescription}}} # noqa: E501 + {{{.}}} # noqa: E501 {{/appDescription}} {{#version}} - The version of the OpenAPI document: {{{version}}} + The version of the OpenAPI document: {{{.}}} {{/version}} {{#infoEmail}} - Contact: {{{infoEmail}}} + Contact: {{{.}}} {{/infoEmail}} Generated by: https://openapi-generator.tech """ diff --git a/modules/openapi-generator/src/main/resources/python-legacy/setup.mustache b/modules/openapi-generator/src/main/resources/python-legacy/setup.mustache index 62ba9f73ecc6f63006caf790189656dc2b20ae8e..71f0e122b933f97df9e9b7a283c4f3a2e41d6272 100644 --- a/modules/openapi-generator/src/main/resources/python-legacy/setup.mustache +++ b/modules/openapi-generator/src/main/resources/python-legacy/setup.mustache @@ -28,14 +28,14 @@ setup( name=NAME, version=VERSION, description="{{appName}}", - author="{{#infoName}}{{infoName}}{{/infoName}}{{^infoName}}OpenAPI Generator community{{/infoName}}", - author_email="{{#infoEmail}}{{infoEmail}}{{/infoEmail}}{{^infoEmail}}team@openapitools.org{{/infoEmail}}", + author="{{infoName}}{{^infoName}}OpenAPI Generator community{{/infoName}}", + author_email="{{infoEmail}}{{^infoEmail}}team@openapitools.org{{/infoEmail}}", url="{{packageUrl}}", keywords=["OpenAPI", "OpenAPI-Generator", "{{{appName}}}"], install_requires=REQUIRES, packages=find_packages(exclude=["test", "tests"]), include_package_data=True, - {{#licenseInfo}}license="{{licenseInfo}}", + {{#licenseInfo}}license="{{.}}", {{/licenseInfo}}long_description="""\ {{appDescription}} # noqa: E501 """ diff --git a/modules/openapi-generator/src/main/resources/python/README.mustache b/modules/openapi-generator/src/main/resources/python/README.mustache index 65a06eaae0128afe09d763a3a425c220e056e63f..b066ed859613b09b447e39c163a1b4259a3a3b18 100644 --- a/modules/openapi-generator/src/main/resources/python/README.mustache +++ b/modules/openapi-generator/src/main/resources/python/README.mustache @@ -1,6 +1,6 @@ # {{{projectName}}} {{#appDescriptionWithNewLines}} -{{{appDescriptionWithNewLines}}} +{{{.}}} {{/appDescriptionWithNewLines}} This Python package is automatically generated by the [OpenAPI Generator](https://openapi-generator.tech) project: diff --git a/modules/openapi-generator/src/main/resources/python/README_common.mustache b/modules/openapi-generator/src/main/resources/python/README_common.mustache index 9999f508c833ae69065b48267e9698a6f4b507be..268d99beb5f49f4c520d1ae93c8c7eacffc46de6 100644 --- a/modules/openapi-generator/src/main/resources/python/README_common.mustache +++ b/modules/openapi-generator/src/main/resources/python/README_common.mustache @@ -42,7 +42,7 @@ 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}} +{{#apiInfo}}{{#apis}}{{#operations}}{{#operation}}*{{classname}}* | [**{{operationId}}**]({{apiDocPath}}{{classname}}.md#{{operationIdLowerCase}}) | **{{httpMethod}}** {{path}} | {{summary}} {{/operation}}{{/operations}}{{/apis}}{{/apiInfo}} ## Documentation For Models diff --git a/modules/openapi-generator/src/main/resources/python/README_onlypackage.mustache b/modules/openapi-generator/src/main/resources/python/README_onlypackage.mustache index 7202059fbaf41f6774be359a95674abad522521f..79457c4b59b943ccad277a6e7ee1052431804f14 100644 --- a/modules/openapi-generator/src/main/resources/python/README_onlypackage.mustache +++ b/modules/openapi-generator/src/main/resources/python/README_onlypackage.mustache @@ -1,6 +1,6 @@ # {{{projectName}}} {{#appDescription}} -{{{appDescription}}} +{{{.}}} {{/appDescription}} The `{{packageName}}` package is automatically generated by the [OpenAPI Generator](https://openapi-generator.tech) project: diff --git a/modules/openapi-generator/src/main/resources/python/api.mustache b/modules/openapi-generator/src/main/resources/python/api.mustache index 4be68cdf12be23a25ba26dab445793baae62fe5c..573224455a978ee01310f51387e03852aa862421 100644 --- a/modules/openapi-generator/src/main/resources/python/api.mustache +++ b/modules/openapi-generator/src/main/resources/python/api.mustache @@ -46,10 +46,10 @@ class {{classname}}(object): {{/requiredParams}} **kwargs ): - """{{#summary}}{{{.}}}{{/summary}}{{^summary}}{{operationId}}{{/summary}} # noqa: E501 + """{{{summary}}}{{^summary}}{{operationId}}{{/summary}} # noqa: E501 {{#notes}} - {{{notes}}} # noqa: E501 + {{{.}}} # noqa: E501 {{/notes}} This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True @@ -64,17 +64,17 @@ class {{classname}}(object): {{/requiredParams}} {{#requiredParams}} {{^defaultValue}} - {{paramName}} ({{dataType}}):{{#description}} {{{description}}}{{/description}} + {{paramName}} ({{dataType}}):{{#description}} {{{.}}}{{/description}} {{/defaultValue}} {{/requiredParams}} {{#requiredParams}} {{#defaultValue}} - {{paramName}} ({{dataType}}):{{#description}} {{{description}}}.{{/description}} defaults to {{{defaultValue}}}, must be one of [{{{defaultValue}}}] + {{paramName}} ({{dataType}}):{{#description}} {{{.}}}.{{/description}} defaults to {{{defaultValue}}}, must be one of [{{{defaultValue}}}] {{/defaultValue}} {{/requiredParams}} Keyword Args:{{#optionalParams}} - {{paramName}} ({{dataType}}):{{#description}} {{{description}}}.{{/description}} [optional]{{#defaultValue}} if omitted the server will use the default value of {{{defaultValue}}}{{/defaultValue}}{{/optionalParams}} + {{paramName}} ({{dataType}}):{{#description}} {{{.}}}.{{/description}} [optional]{{#defaultValue}} if omitted the server will use the default value of {{{.}}}{{/defaultValue}}{{/optionalParams}} _return_http_data_only (bool): response data without head status code and headers. Default is True. _preload_content (bool): if False, the urllib3.HTTPResponse object @@ -96,7 +96,7 @@ class {{classname}}(object): async_req (bool): execute request asynchronously Returns: - {{#returnType}}{{returnType}}{{/returnType}}{{^returnType}}None{{/returnType}} + {{returnType}}{{^returnType}}None{{/returnType}} If the method is called asynchronously, returns the request thread. """ @@ -127,7 +127,7 @@ class {{classname}}(object): self.{{operationId}} = _Endpoint( settings={ - 'response_type': {{#returnType}}({{{returnType}}},){{/returnType}}{{^returnType}}None{{/returnType}}, + 'response_type': {{#returnType}}({{{.}}},){{/returnType}}{{^returnType}}None{{/returnType}}, {{#authMethods}} {{#-first}} 'auth': [ @@ -226,10 +226,10 @@ class {{classname}}(object): {{#hasValidation}} ('{{paramName}}',): { {{#maxLength}} - 'max_length': {{maxLength}},{{/maxLength}}{{#minLength}} - 'min_length': {{minLength}},{{/minLength}}{{#maxItems}} - 'max_items': {{maxItems}},{{/maxItems}}{{#minItems}} - 'min_items': {{minItems}},{{/minItems}}{{#maximum}} + 'max_length': {{.}},{{/maxLength}}{{#minLength}} + 'min_length': {{.}},{{/minLength}}{{#maxItems}} + 'max_items': {{.}},{{/maxItems}}{{#minItems}} + 'min_items': {{.}},{{/minItems}}{{#maximum}} {{#exclusiveMaximum}}'exclusive_maximum'{{/exclusiveMaximum}}{{^exclusiveMaximum}}'inclusive_maximum'{{/exclusiveMaximum}}: {{maximum}},{{/maximum}}{{#minimum}} {{#exclusiveMinimum}}'exclusive_minimum'{{/exclusiveMinimum}}{{^exclusiveMinimum}}'inclusive_minimum'{{/exclusiveMinimum}}: {{minimum}},{{/minimum}}{{#pattern}} 'regex': { 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 31d9e48354ad2cf7e497a881af53cc644a279f11..8f07d0106d3cd48b4a5236bc6eb9b69048f4c804 100644 --- a/modules/openapi-generator/src/main/resources/python/api_client.mustache +++ b/modules/openapi-generator/src/main/resources/python/api_client.mustache @@ -71,7 +71,7 @@ class ApiClient(object): self.default_headers[header_name] = header_value self.cookie = cookie # Set default User-Agent. - self.user_agent = '{{#httpUserAgent}}{{{.}}}{{/httpUserAgent}}{{^httpUserAgent}}OpenAPI-Generator/{{{packageVersion}}}/python{{/httpUserAgent}}' + self.user_agent = '{{{httpUserAgent}}}{{^httpUserAgent}}OpenAPI-Generator/{{{packageVersion}}}/python{{/httpUserAgent}}' def __enter__(self): return self diff --git a/modules/openapi-generator/src/main/resources/python/api_doc.mustache b/modules/openapi-generator/src/main/resources/python/api_doc.mustache index 7c19d58ebd50f9c56d33ce86c85e2c81bf43fa6b..9a03d79b56e6546430ce7a8a4a08af09cda2cc74 100644 --- a/modules/openapi-generator/src/main/resources/python/api_doc.mustache +++ b/modules/openapi-generator/src/main/resources/python/api_doc.mustache @@ -1,21 +1,21 @@ # {{packageName}}.{{classname}}{{#description}} -{{description}}{{/description}} +{{.}}{{/description}} All URIs are relative to *{{basePath}}* Method | HTTP request | Description ------------- | ------------- | ------------- -{{#operations}}{{#operation}}[**{{operationId}}**]({{classname}}.md#{{operationId}}) | **{{httpMethod}}** {{path}} | {{#summary}}{{summary}}{{/summary}} +{{#operations}}{{#operation}}[**{{operationId}}**]({{classname}}.md#{{operationId}}) | **{{httpMethod}}** {{path}} | {{summary}} {{/operation}}{{/operations}} {{#operations}} {{#operation}} # **{{{operationId}}}** -> {{#returnType}}{{{returnType}}} {{/returnType}}{{{operationId}}}({{#requiredParams}}{{^defaultValue}}{{paramName}}{{^-last}}, {{/-last}}{{/defaultValue}}{{/requiredParams}}) +> {{#returnType}}{{{.}}} {{/returnType}}{{{operationId}}}({{#requiredParams}}{{^defaultValue}}{{paramName}}{{^-last}}, {{/-last}}{{/defaultValue}}{{/requiredParams}}) {{{summary}}}{{#notes}} -{{{notes}}}{{/notes}} +{{{.}}}{{/notes}} ### Example diff --git a/modules/openapi-generator/src/main/resources/python/api_doc_example.mustache b/modules/openapi-generator/src/main/resources/python/api_doc_example.mustache index bf989ae430067c193b571a647280f0c0bf43cca4..6a08d7c660b1f4b1d0616138c159a54274a65aca 100644 --- a/modules/openapi-generator/src/main/resources/python/api_doc_example.mustache +++ b/modules/openapi-generator/src/main/resources/python/api_doc_example.mustache @@ -22,7 +22,7 @@ with {{{packageName}}}.ApiClient() as api_client: {{/defaultValue}} {{/requiredParams}} {{#optionalParams}} - {{paramName}} = {{{example}}} # {{{dataType}}} | {{{description}}}{{^required}} (optional){{/required}}{{#defaultValue}} if omitted the server will use the default value of {{{defaultValue}}}{{/defaultValue}} + {{paramName}} = {{{example}}} # {{{dataType}}} | {{{description}}}{{^required}} (optional){{/required}}{{#defaultValue}} if omitted the server will use the default value of {{{.}}}{{/defaultValue}} {{/optionalParams}} {{#requiredParams}} {{#-last}} diff --git a/modules/openapi-generator/src/main/resources/python/api_test.mustache b/modules/openapi-generator/src/main/resources/python/api_test.mustache index bf2cd192857f6cd73bf2570001f96ca56d1f21d8..4b13fad2420aaf20296929f6632014254629085e 100644 --- a/modules/openapi-generator/src/main/resources/python/api_test.mustache +++ b/modules/openapi-generator/src/main/resources/python/api_test.mustache @@ -20,7 +20,7 @@ class {{#operations}}Test{{classname}}(unittest.TestCase): """Test case for {{{operationId}}} {{#summary}} - {{{summary}}} # noqa: E501 + {{{.}}} # noqa: E501 {{/summary}} """ pass diff --git a/modules/openapi-generator/src/main/resources/python/configuration.mustache b/modules/openapi-generator/src/main/resources/python/configuration.mustache index 9ab0a8408997c191cc5662b76b6a4a0cbcce4c86..ce5ba74667dcb58875ea3630c7fad8ade68782b2 100644 --- a/modules/openapi-generator/src/main/resources/python/configuration.mustache +++ b/modules/openapi-generator/src/main/resources/python/configuration.mustache @@ -71,7 +71,7 @@ class Configuration(object): :param server_operation_variables: Mapping from operation ID to a mapping with string values to replace variables in templated server configuration. The validation of enums is performed for variables with defined enum values before. - :param ssl_ca_cert: str - the path to a file of concatenated CA certificates + :param ssl_ca_cert: str - the path to a file of concatenated CA certificates in PEM format {{#hasAuthMethods}} diff --git a/modules/openapi-generator/src/main/resources/python/git_push.sh.mustache b/modules/openapi-generator/src/main/resources/python/git_push.sh.mustache index 8b3f689c9121a65080ad038d37a2036b01e559a1..f0bed5bd84155f05bc3cdc67af008f524efb38a6 100755 --- a/modules/openapi-generator/src/main/resources/python/git_push.sh.mustache +++ b/modules/openapi-generator/src/main/resources/python/git_push.sh.mustache @@ -55,4 +55,3 @@ 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/python/model_templates/method_from_openapi_data_composed.mustache b/modules/openapi-generator/src/main/resources/python/model_templates/method_from_openapi_data_composed.mustache index 81a4af3f822cadc4b1a8c1b831f60d8d7c54b1fd..ba03dbc63f3f3dc22d2a47c9931f196e60791ee9 100644 --- a/modules/openapi-generator/src/main/resources/python/model_templates/method_from_openapi_data_composed.mustache +++ b/modules/openapi-generator/src/main/resources/python/model_templates/method_from_openapi_data_composed.mustache @@ -6,15 +6,15 @@ Keyword Args: {{#requiredVars}} {{#defaultValue}} - {{name}} ({{{dataType}}}):{{#description}} {{{description}}}.{{/description}} defaults to {{{defaultValue}}}{{#allowableValues}}, must be one of [{{#enumVars}}{{{value}}}, {{/enumVars}}]{{/allowableValues}} # noqa: E501 + {{name}} ({{{dataType}}}):{{#description}} {{{.}}}.{{/description}} defaults to {{{defaultValue}}}{{#allowableValues}}, must be one of [{{#enumVars}}{{{value}}}, {{/enumVars}}]{{/allowableValues}} # noqa: E501 {{/defaultValue}} {{^defaultValue}} - {{name}} ({{{dataType}}}):{{#description}} {{{description}}}{{/description}} + {{name}} ({{{dataType}}}):{{#description}} {{{.}}}{{/description}} {{/defaultValue}} {{/requiredVars}} {{> model_templates/docstring_init_required_kwargs }} {{#optionalVars}} - {{name}} ({{{dataType}}}):{{#description}} {{{description}}}.{{/description}} [optional]{{#defaultValue}} if omitted the server will use the default value of {{{defaultValue}}}{{/defaultValue}} # noqa: E501 + {{name}} ({{{dataType}}}):{{#description}} {{{.}}}.{{/description}} [optional]{{#defaultValue}} if omitted the server will use the default value of {{{.}}}{{/defaultValue}} # noqa: E501 {{/optionalVars}} """ diff --git a/modules/openapi-generator/src/main/resources/python/model_templates/method_from_openapi_data_shared.mustache b/modules/openapi-generator/src/main/resources/python/model_templates/method_from_openapi_data_shared.mustache index 9dd84236b9ffa188feb9a938ca2972401048eac9..68c70c629dbd2ba3ad493d9802ab3b2c0fb7f271 100644 --- a/modules/openapi-generator/src/main/resources/python/model_templates/method_from_openapi_data_shared.mustache +++ b/modules/openapi-generator/src/main/resources/python/model_templates/method_from_openapi_data_shared.mustache @@ -8,7 +8,7 @@ Args: {{/-first}} {{^defaultValue}} - {{name}} ({{{dataType}}}):{{#description}} {{{description}}}{{/description}} + {{name}} ({{{dataType}}}):{{#description}} {{{.}}}{{/description}} {{/defaultValue}} {{#-last}} @@ -17,12 +17,12 @@ Keyword Args: {{#requiredVars}} {{#defaultValue}} - {{name}} ({{{dataType}}}):{{#description}} {{{description}}}.{{/description}} defaults to {{{defaultValue}}}{{#allowableValues}}, must be one of [{{#enumVars}}{{{value}}}, {{/enumVars}}]{{/allowableValues}} # noqa: E501 + {{name}} ({{{dataType}}}):{{#description}} {{{.}}}.{{/description}} defaults to {{{defaultValue}}}{{#allowableValues}}, must be one of [{{#enumVars}}{{{value}}}, {{/enumVars}}]{{/allowableValues}} # noqa: E501 {{/defaultValue}} {{/requiredVars}} {{> model_templates/docstring_init_required_kwargs }} {{#optionalVars}} - {{name}} ({{{dataType}}}):{{#description}} {{{description}}}.{{/description}} [optional]{{#defaultValue}} if omitted the server will use the default value of {{{defaultValue}}}{{/defaultValue}} # noqa: E501 + {{name}} ({{{dataType}}}):{{#description}} {{{.}}}.{{/description}} [optional]{{#defaultValue}} if omitted the server will use the default value of {{{.}}}{{/defaultValue}} # noqa: E501 {{/optionalVars}} """ diff --git a/modules/openapi-generator/src/main/resources/python/model_templates/method_from_openapi_data_simple.mustache b/modules/openapi-generator/src/main/resources/python/model_templates/method_from_openapi_data_simple.mustache index 0756046ede25434eb2efc7718304cbf2c5ac514e..11f237c074dfea9af1e109f59bf680b96fcb4306 100644 --- a/modules/openapi-generator/src/main/resources/python/model_templates/method_from_openapi_data_simple.mustache +++ b/modules/openapi-generator/src/main/resources/python/model_templates/method_from_openapi_data_simple.mustache @@ -6,10 +6,10 @@ Note that value can be passed either in args or in kwargs, but not in both. Args: - args[0] ({{{dataType}}}):{{#description}} {{{description}}}.{{/description}}{{#defaultValue}} if omitted defaults to {{{defaultValue}}}{{/defaultValue}}{{#allowableValues}}, must be one of [{{#enumVars}}{{{value}}}, {{/enumVars}}]{{/allowableValues}} # noqa: E501 + args[0] ({{{dataType}}}):{{#description}} {{{.}}}.{{/description}}{{#defaultValue}} if omitted defaults to {{{.}}}{{/defaultValue}}{{#allowableValues}}, must be one of [{{#enumVars}}{{{value}}}, {{/enumVars}}]{{/allowableValues}} # noqa: E501 Keyword Args: - value ({{{dataType}}}):{{#description}} {{{description}}}.{{/description}}{{#defaultValue}} if omitted defaults to {{{defaultValue}}}{{/defaultValue}}{{#allowableValues}}, must be one of [{{#enumVars}}{{{value}}}, {{/enumVars}}]{{/allowableValues}} # noqa: E501 + value ({{{dataType}}}):{{#description}} {{{.}}}.{{/description}}{{#defaultValue}} if omitted defaults to {{{.}}}{{/defaultValue}}{{#allowableValues}}, must be one of [{{#enumVars}}{{{value}}}, {{/enumVars}}]{{/allowableValues}} # noqa: E501 {{> model_templates/docstring_init_required_kwargs }} """ # required up here when default value is not given @@ -24,7 +24,7 @@ value = args.pop(0) {{#defaultValue}} else: - value = {{{defaultValue}}} + value = {{{.}}} {{/defaultValue}} {{^defaultValue}} else: diff --git a/modules/openapi-generator/src/main/resources/python/model_templates/method_init_composed.mustache b/modules/openapi-generator/src/main/resources/python/model_templates/method_init_composed.mustache index cc6f4b46bd712ed8825bb8fb329fafd77e58d072..ba7991e4d07ef993ad647c19fb1f2eecfce92af1 100644 --- a/modules/openapi-generator/src/main/resources/python/model_templates/method_init_composed.mustache +++ b/modules/openapi-generator/src/main/resources/python/model_templates/method_init_composed.mustache @@ -18,16 +18,16 @@ {{#requiredVars}} {{^isReadOnly}} {{#defaultValue}} - {{name}} ({{{dataType}}}):{{#description}} {{{description}}}.{{/description}} defaults to {{{defaultValue}}}{{#allowableValues}}, must be one of [{{#enumVars}}{{{value}}}, {{/enumVars}}]{{/allowableValues}} # noqa: E501 + {{name}} ({{{dataType}}}):{{#description}} {{{.}}}.{{/description}} defaults to {{{defaultValue}}}{{#allowableValues}}, must be one of [{{#enumVars}}{{{value}}}, {{/enumVars}}]{{/allowableValues}} # noqa: E501 {{/defaultValue}} {{^defaultValue}} - {{name}} ({{{dataType}}}):{{#description}} {{{description}}}{{/description}} + {{name}} ({{{dataType}}}):{{#description}} {{{.}}}{{/description}} {{/defaultValue}} {{/isReadOnly}} {{/requiredVars}} {{> model_templates/docstring_init_required_kwargs }} {{#optionalVars}} - {{name}} ({{{dataType}}}):{{#description}} {{{description}}}.{{/description}} [optional]{{#defaultValue}} if omitted the server will use the default value of {{{defaultValue}}}{{/defaultValue}} # noqa: E501 + {{name}} ({{{dataType}}}):{{#description}} {{{.}}}.{{/description}} [optional]{{#defaultValue}} if omitted the server will use the default value of {{{.}}}{{/defaultValue}} # noqa: E501 {{/optionalVars}} """ diff --git a/modules/openapi-generator/src/main/resources/python/model_templates/method_init_shared.mustache b/modules/openapi-generator/src/main/resources/python/model_templates/method_init_shared.mustache index 0eb4de6a13e97cf7ae6121ab4158f30c5ea039c3..6d94090981986eb95388fbbccf876fcdf880f5dd 100644 --- a/modules/openapi-generator/src/main/resources/python/model_templates/method_init_shared.mustache +++ b/modules/openapi-generator/src/main/resources/python/model_templates/method_init_shared.mustache @@ -8,7 +8,7 @@ Args: {{/-first}} {{^defaultValue}} - {{name}} ({{{dataType}}}):{{#description}} {{{description}}}{{/description}} + {{name}} ({{{dataType}}}):{{#description}} {{{.}}}{{/description}} {{/defaultValue}} {{#-last}} @@ -19,13 +19,13 @@ {{#requiredVars}} {{^isReadOnly}} {{#defaultValue}} - {{name}} ({{{dataType}}}):{{#description}} {{{description}}}.{{/description}} defaults to {{{defaultValue}}}{{#allowableValues}}, must be one of [{{#enumVars}}{{{value}}}, {{/enumVars}}]{{/allowableValues}} # noqa: E501 + {{name}} ({{{dataType}}}):{{#description}} {{{.}}}.{{/description}} defaults to {{{defaultValue}}}{{#allowableValues}}, must be one of [{{#enumVars}}{{{value}}}, {{/enumVars}}]{{/allowableValues}} # noqa: E501 {{/defaultValue}} {{/isReadOnly}} {{/requiredVars}} {{> model_templates/docstring_init_required_kwargs }} {{#optionalVars}} - {{name}} ({{{dataType}}}):{{#description}} {{{description}}}.{{/description}} [optional]{{#defaultValue}} if omitted the server will use the default value of {{{defaultValue}}}{{/defaultValue}} # noqa: E501 + {{name}} ({{{dataType}}}):{{#description}} {{{.}}}.{{/description}} [optional]{{#defaultValue}} if omitted the server will use the default value of {{{.}}}{{/defaultValue}} # noqa: E501 {{/optionalVars}} """ diff --git a/modules/openapi-generator/src/main/resources/python/model_templates/method_init_simple.mustache b/modules/openapi-generator/src/main/resources/python/model_templates/method_init_simple.mustache index c6950a7d364204c00adbe4b51d391ea9be58ca2d..ec111f6e7de269a5d57fd83055137c9882978cba 100644 --- a/modules/openapi-generator/src/main/resources/python/model_templates/method_init_simple.mustache +++ b/modules/openapi-generator/src/main/resources/python/model_templates/method_init_simple.mustache @@ -14,10 +14,10 @@ Note that value can be passed either in args or in kwargs, but not in both. Args: - args[0] ({{{dataType}}}):{{#description}} {{{description}}}.{{/description}}{{#defaultValue}} if omitted defaults to {{{defaultValue}}}{{/defaultValue}}{{#allowableValues}}, must be one of [{{#enumVars}}{{{value}}}, {{/enumVars}}]{{/allowableValues}} # noqa: E501 + args[0] ({{{dataType}}}):{{#description}} {{{.}}}.{{/description}}{{#defaultValue}} if omitted defaults to {{{.}}}{{/defaultValue}}{{#allowableValues}}, must be one of [{{#enumVars}}{{{value}}}, {{/enumVars}}]{{/allowableValues}} # noqa: E501 Keyword Args: - value ({{{dataType}}}):{{#description}} {{{description}}}.{{/description}}{{#defaultValue}} if omitted defaults to {{{defaultValue}}}{{/defaultValue}}{{#allowableValues}}, must be one of [{{#enumVars}}{{{value}}}, {{/enumVars}}]{{/allowableValues}} # noqa: E501 + value ({{{dataType}}}):{{#description}} {{{.}}}.{{/description}}{{#defaultValue}} if omitted defaults to {{{.}}}{{/defaultValue}}{{#allowableValues}}, must be one of [{{#enumVars}}{{{value}}}, {{/enumVars}}]{{/allowableValues}} # noqa: E501 {{> model_templates/docstring_init_required_kwargs }} """ # required up here when default value is not given @@ -30,7 +30,7 @@ value = args.pop(0) {{#defaultValue}} else: - value = {{{defaultValue}}} + value = {{{.}}} {{/defaultValue}} {{^defaultValue}} else: diff --git a/modules/openapi-generator/src/main/resources/python/model_templates/validations.mustache b/modules/openapi-generator/src/main/resources/python/model_templates/validations.mustache index 9e26146d838f3362d64d6a02703c915a2e4a5e6e..758dc41d9463b3e55a1fd86bc44e4bc6e121f32a 100644 --- a/modules/openapi-generator/src/main/resources/python/model_templates/validations.mustache +++ b/modules/openapi-generator/src/main/resources/python/model_templates/validations.mustache @@ -1,26 +1,26 @@ {{#maxLength}} - 'max_length': {{maxLength}}, + 'max_length': {{.}}, {{/maxLength}} {{#minLength}} - 'min_length': {{minLength}}, + 'min_length': {{.}}, {{/minLength}} {{#maxItems}} - 'max_items': {{maxItems}}, + 'max_items': {{.}}, {{/maxItems}} {{#minProperties}} - 'min_properties': {{minProperties}}, + 'min_properties': {{.}}, {{/minProperties}} {{#maxProperties}} - 'max_properties': {{maxProperties}}, + 'max_properties': {{.}}, {{/maxProperties}} {{#minItems}} - 'min_items': {{minItems}}, + 'min_items': {{.}}, {{/minItems}} {{#maximum}} - {{#exclusiveMaximum}}'exclusive_maximum'{{/exclusiveMaximum}}'inclusive_maximum'{{^exclusiveMaximum}}{{/exclusiveMaximum}}: {{maximum}}, + {{#exclusiveMaximum}}'exclusive_maximum'{{/exclusiveMaximum}}'inclusive_maximum': {{maximum}}, {{/maximum}} {{#minimum}} - {{#exclusiveMinimum}}'exclusive_minimum'{{/exclusiveMinimum}}'inclusive_minimum'{{^exclusiveMinimum}}{{/exclusiveMinimum}}: {{minimum}}, + {{#exclusiveMinimum}}'exclusive_minimum'{{/exclusiveMinimum}}'inclusive_minimum': {{minimum}}, {{/minimum}} {{#pattern}} 'regex': { @@ -29,6 +29,6 @@ }, {{/pattern}} {{#multipleOf}} - 'multiple_of': {{multipleOf}}, + 'multiple_of': {{.}}, {{/multipleOf}} }, \ No newline at end of file diff --git a/modules/openapi-generator/src/main/resources/python/partial_header.mustache b/modules/openapi-generator/src/main/resources/python/partial_header.mustache index c52fbceb138a695f9e67119ee81f1eed3a41e2c6..dc3c8f3d8c8a2b63d5cc0ced772e4e30bbdfa232 100644 --- a/modules/openapi-generator/src/main/resources/python/partial_header.mustache +++ b/modules/openapi-generator/src/main/resources/python/partial_header.mustache @@ -1,17 +1,17 @@ """ {{#appName}} - {{{appName}}} + {{{.}}} {{/appName}} {{#appDescription}} - {{{appDescription}}} # noqa: E501 + {{{.}}} # noqa: E501 {{/appDescription}} {{#version}} - The version of the OpenAPI document: {{{version}}} + The version of the OpenAPI document: {{{.}}} {{/version}} {{#infoEmail}} - Contact: {{{infoEmail}}} + Contact: {{{.}}} {{/infoEmail}} Generated by: https://openapi-generator.tech """ diff --git a/modules/openapi-generator/src/main/resources/python/setup.mustache b/modules/openapi-generator/src/main/resources/python/setup.mustache index d5154f3fa6f1f9eaf56cc9c9e9ebb04226d6b173..af494177549ef1153c3dd0f9bf3546ca47338f7d 100644 --- a/modules/openapi-generator/src/main/resources/python/setup.mustache +++ b/modules/openapi-generator/src/main/resources/python/setup.mustache @@ -33,15 +33,15 @@ setup( name=NAME, version=VERSION, description="{{appName}}", - author="{{#infoName}}{{infoName}}{{/infoName}}{{^infoName}}OpenAPI Generator community{{/infoName}}", - author_email="{{#infoEmail}}{{infoEmail}}{{/infoEmail}}{{^infoEmail}}team@openapitools.org{{/infoEmail}}", + author="{{infoName}}{{^infoName}}OpenAPI Generator community{{/infoName}}", + author_email="{{infoEmail}}{{^infoEmail}}team@openapitools.org{{/infoEmail}}", url="{{packageUrl}}", keywords=["OpenAPI", "OpenAPI-Generator", "{{{appName}}}"], python_requires=">=3.6", install_requires=REQUIRES, packages=find_packages(exclude=["test", "tests"]), include_package_data=True, - {{#licenseInfo}}license="{{licenseInfo}}", + {{#licenseInfo}}license="{{.}}", {{/licenseInfo}}long_description="""\ {{appDescription}} # noqa: E501 """ diff --git a/modules/openapi-generator/src/main/resources/r/NAMESPACE.mustache b/modules/openapi-generator/src/main/resources/r/NAMESPACE.mustache index fae0e54844844ea3d7736cbcf1cb9935c0c31514..709778e7a3ec6ba0be2bf3fe9d6193c67680f5ae 100644 --- a/modules/openapi-generator/src/main/resources/r/NAMESPACE.mustache +++ b/modules/openapi-generator/src/main/resources/r/NAMESPACE.mustache @@ -5,7 +5,7 @@ export(ApiClient) export(ApiResponse) {{#useRlangExceptionHandling}} -export(ApiException) +export(ApiException) {{/useRlangExceptionHandling}} # Models diff --git a/modules/openapi-generator/src/main/resources/r/README.mustache b/modules/openapi-generator/src/main/resources/r/README.mustache index 2bc6b344b064ab56f848a864e3ba35a5cb23fa14..8559e5e792c1bfb96ce11b920bc1dab99102699c 100644 --- a/modules/openapi-generator/src/main/resources/r/README.mustache +++ b/modules/openapi-generator/src/main/resources/r/README.mustache @@ -1,7 +1,7 @@ # R API client for {{packageName}} {{#appDescriptionWithNewLines}} -{{{appDescriptionWithNewLines}}} +{{{.}}} {{/appDescriptionWithNewLines}} ## Overview @@ -64,7 +64,7 @@ All URIs are relative to *{{basePath}}* Class | Method | HTTP request | Description ------------ | ------------- | ------------- | ------------- -{{#apiInfo}}{{#apis}}{{#operations}}{{#operation}}*{{classname}}* | [**{{operationId}}**]({{apiDocPath}}{{classname}}.md#{{operationId}}) | **{{httpMethod}}** {{path}} | {{#summary}}{{{summary}}}{{/summary}} +{{#apiInfo}}{{#apis}}{{#operations}}{{#operation}}*{{classname}}* | [**{{operationId}}**]({{apiDocPath}}{{classname}}.md#{{operationId}}) | **{{httpMethod}}** {{path}} | {{{summary}}} {{/operation}}{{/operations}}{{/apis}}{{/apiInfo}} ## Documentation for Models diff --git a/modules/openapi-generator/src/main/resources/r/api.mustache b/modules/openapi-generator/src/main/resources/r/api.mustache index 2e76b2419c599a8dba94cd8486964847fb389701..3c3af6eb787e3a803385dfdfc3324b5d4c9eff72 100644 --- a/modules/openapi-generator/src/main/resources/r/api.mustache +++ b/modules/openapi-generator/src/main/resources/r/api.mustache @@ -16,7 +16,7 @@ #' \itemize{ {{#allParams}} {{#isEnum}} -#' \item \emph{ @param } {{paramName}} Enum < {{#allowableValues}}{{values}}{{/allowableValues}} > +#' \item \emph{ @param } {{paramName}} Enum < {{#allowableValues}}{{values}}{{/allowableValues}} > {{/isEnum}} {{^isEnum}} {{#isContainer}} @@ -62,7 +62,7 @@ {{#responses}} #' \item status code : {{code}} | {{message}} #' -#'{{#dataType}} \item return type : {{dataType}} {{/dataType}} +#'{{#dataType}} \item return type : {{.}} {{/dataType}} #' \item response headers : #' #' \tabular{ll}{ @@ -97,7 +97,7 @@ {{#isBasic}} #' #Configure HTTP basic authorization: {{{name}}} #' # provide your username in the user-serial format -#' api.instance$apiClient$username <- '<user-serial>'; +#' api.instance$apiClient$username <- '<user-serial>'; #' # provide your api key generated using the developer portal #' api.instance$apiClient$password <- '<api_key>'; {{/isBasic}} @@ -116,9 +116,9 @@ {{#useRlangExceptionHandling}} #'result <- tryCatch( #' api.instance${{{operationId}}}({{#requiredParams}}var.{{{paramName}}}{{^-last}}, {{/-last}}{{/requiredParams}}{{#optionalParams}}{{#-first}}{{#requiredParams.0}}, {{/requiredParams.0}}{{/-first}}{{{paramName}}}=var.{{{paramName}}}{{^-last}}, {{/-last}}{{/optionalParams}}), -#' ApiException = function(ex) ex +#' ApiException = function(ex) ex #' ) -#' # In case of error, print the error object +#' # In case of error, print the error object #' if(!is.null(result$ApiException)) { #' cat(result$ApiException$toString()) #' } else { @@ -159,7 +159,7 @@ } }, {{#operation}} - {{{operationId}}} = function({{#requiredParams}}{{paramName}}, {{/requiredParams}}{{#optionalParams}}{{paramName}}={{^defaultValue}}NULL{{/defaultValue}}{{#defaultValue}}{{{.}}}{{/defaultValue}}, {{/optionalParams}}...){ + {{{operationId}}} = function({{#requiredParams}}{{paramName}}, {{/requiredParams}}{{#optionalParams}}{{paramName}}={{^defaultValue}}NULL{{/defaultValue}}{{{defaultValue}}}, {{/optionalParams}}...){ apiResponse <- self${{{operationId}}}WithHttpInfo({{#allParams}}{{paramName}}, {{/allParams}}...) resp <- apiResponse$response if (httr::status_code(resp) >= 200 && httr::status_code(resp) <= 299) { @@ -173,7 +173,7 @@ } }, - {{{operationId}}}WithHttpInfo = function({{#requiredParams}}{{paramName}}, {{/requiredParams}}{{#optionalParams}}{{paramName}}={{^defaultValue}}NULL{{/defaultValue}}{{#defaultValue}}{{{.}}}{{/defaultValue}}, {{/optionalParams}}...){ + {{{operationId}}}WithHttpInfo = function({{#requiredParams}}{{paramName}}, {{/requiredParams}}{{#optionalParams}}{{paramName}}={{^defaultValue}}NULL{{/defaultValue}}{{{defaultValue}}}, {{/optionalParams}}...){ args <- list(...) queryParams <- list() headerParams <- c() diff --git a/modules/openapi-generator/src/main/resources/r/api_client.mustache b/modules/openapi-generator/src/main/resources/r/api_client.mustache index 0c037fd557597dc0cd5303cb438140947c8ab301..2d67faeef2f423247e272cfa94cbfe5fff1114c5 100644 --- a/modules/openapi-generator/src/main/resources/r/api_client.mustache +++ b/modules/openapi-generator/src/main/resources/r/api_client.mustache @@ -37,7 +37,7 @@ ApiClient <- R6::R6Class( # base path of all requests basePath = "{{{basePath}}}", # user agent in the HTTP request - userAgent = "{{#httpUserAgent}}{{{.}}}{{/httpUserAgent}}{{^httpUserAgent}}OpenAPI-Generator/{{{packageVersion}}}/r{{/httpUserAgent}}", + userAgent = "{{{httpUserAgent}}}{{^httpUserAgent}}OpenAPI-Generator/{{{packageVersion}}}/r{{/httpUserAgent}}", # default headers in the HTTP request defaultHeaders = NULL, # username (HTTP basic authentication) @@ -107,7 +107,7 @@ ApiClient <- R6::R6Class( if (is.null(self$maxRetryAttempts)) { self$maxRetryAttempts = 3 } - + if (!is.null(self$retryStatusCodes)) { for (i in 1 : self$maxRetryAttempts) { @@ -118,7 +118,7 @@ ApiClient <- R6::R6Class( } else { break; } - } + } } resp @@ -171,7 +171,7 @@ ApiClient <- R6::R6Class( returnObj <- NULL primitiveTypes <- c("character", "numeric", "integer", "logical", "complex") - # To handle the "map" type + # To handle the "map" type if (startsWith(returnType, "map(")) { innerReturnType <- regmatches(returnType, regexec(pattern = "map\\((.*)\\)", returnType))[[1]][2] returnObj <- lapply(names(obj), function(name) { @@ -209,7 +209,7 @@ ApiClient <- R6::R6Class( returnObj$fromJSON( jsonlite::toJSON(obj, digits = NA, auto_unbox = TRUE) ) - } + } # To handle primitive type else { diff --git a/modules/openapi-generator/src/main/resources/r/api_doc.mustache b/modules/openapi-generator/src/main/resources/r/api_doc.mustache index 5ae11961c9d7d3588545b2eb584ce3c3db1e007d..a00d06208e69c74b91c81cca3d8a6b201a8edf97 100644 --- a/modules/openapi-generator/src/main/resources/r/api_doc.mustache +++ b/modules/openapi-generator/src/main/resources/r/api_doc.mustache @@ -1,21 +1,21 @@ # {{classname}}{{#description}} -{{description}}{{/description}} +{{.}}{{/description}} All URIs are relative to *{{basePath}}* Method | HTTP request | Description ------------- | ------------- | ------------- -{{#operations}}{{#operation}}[**{{operationId}}**]({{classname}}.md#{{operationId}}) | **{{httpMethod}}** {{path}} | {{#summary}}{{summary}}{{/summary}} +{{#operations}}{{#operation}}[**{{operationId}}**]({{classname}}.md#{{operationId}}) | **{{httpMethod}}** {{path}} | {{summary}} {{/operation}}{{/operations}} {{#operations}} {{#operation}} # **{{operationId}}** -> {{#returnType}}{{returnType}} {{/returnType}}{{operationId}}({{#requiredParams}}{{{paramName}}}{{^-last}}, {{/-last}}{{/requiredParams}}{{#optionalParams}}{{#-first}}{{#requiredParams.0}}, {{/requiredParams.0}}{{/-first}}{{{paramName}}}{{#defaultValue}}={{{.}}}{{/defaultValue}}{{^defaultValue}}=var.{{{paramName}}}{{/defaultValue}}{{^-last}}, {{/-last}}{{/optionalParams}}) +> {{#returnType}}{{.}} {{/returnType}}{{operationId}}({{#requiredParams}}{{{paramName}}}{{^-last}}, {{/-last}}{{/requiredParams}}{{#optionalParams}}{{#-first}}{{#requiredParams.0}}, {{/requiredParams.0}}{{/-first}}{{{paramName}}}{{#defaultValue}}={{{.}}}{{/defaultValue}}{{^defaultValue}}=var.{{{paramName}}}{{/defaultValue}}{{^-last}}, {{/-last}}{{/optionalParams}}) {{{summary}}}{{#notes}} -{{{notes}}}{{/notes}} +{{{.}}}{{/notes}} ### Example ```R @@ -50,9 +50,9 @@ api.instance$apiClient$accessToken <- 'TODO_YOUR_ACCESS_TOKEN'; {{#useRlangExceptionHandling}} result <- tryCatch( api.instance${{{operationId}}}({{#requiredParams}}var.{{{paramName}}}{{^-last}}, {{/-last}}{{/requiredParams}}{{#optionalParams}}{{#-first}}{{#requiredParams.0}}, {{/requiredParams.0}}{{/-first}}{{{paramName}}}=var.{{{paramName}}}{{^-last}}, {{/-last}}{{/optionalParams}}), - ApiException = function(ex) ex + ApiException = function(ex) ex ) -# In case of error, print the error object +# In case of error, print the error object if(!is.null(result$ApiException)) { cat(result$ApiException$toString()) } else { @@ -79,7 +79,7 @@ dput(result) {{^allParams}}This endpoint does not need any parameter.{{/allParams}}{{#allParams}}{{#-last}} Name | Type | Description | Notes ------------- | ------------- | ------------- | -------------{{/-last}}{{/allParams}} -{{#allParams}} **{{paramName}}** | {{#isEnum}}Enum {{#allowableValues}}{{values}}{{/allowableValues}} {{/isEnum}}{{^isEnum}}{{#isContainer}}{{#isArray}}{{#items}}{{#isPrimitiveType}}list( **{{dataType}}** ){{/isPrimitiveType}}{{^isPrimitiveType}}{{#isFile}}**{{dataType}}**{{/isFile}}{{^isFile}}list( [**{{dataType}}**]({{baseType}}.md) ){{/isFile}}{{/isPrimitiveType}}{{/items}}{{/isArray}}{{#isMap}}{{#isPrimitiveType}}named list( **{{dataType}}** ){{/isPrimitiveType}}{{^isPrimitiveType}}{{#isFile}}**{{dataType}}**{{/isFile}}{{^isFile}}named list( [**{{dataType}}**]({{baseType}}.md) ){{/isFile}}{{/isPrimitiveType}}{{/isMap}}{{/isContainer}}{{^isContainer}}{{#isPrimitiveType}}**{{dataType}}**{{/isPrimitiveType}}{{^isPrimitiveType}}{{#isFile}}**{{dataType}}**{{/isFile}}{{^isFile}}[**{{dataType}}**]({{baseType}}.md){{/isFile}}{{/isPrimitiveType}}{{/isContainer}}{{/isEnum}}| {{description}} | {{^required}}[optional] {{/required}}{{#defaultValue}}[default to {{defaultValue}}]{{/defaultValue}} +{{#allParams}} **{{paramName}}** | {{#isEnum}}Enum {{#allowableValues}}{{values}}{{/allowableValues}} {{/isEnum}}{{^isEnum}}{{#isContainer}}{{#isArray}}{{#items}}{{#isPrimitiveType}}list( **{{dataType}}** ){{/isPrimitiveType}}{{^isPrimitiveType}}{{#isFile}}**{{dataType}}**{{/isFile}}{{^isFile}}list( [**{{dataType}}**]({{baseType}}.md) ){{/isFile}}{{/isPrimitiveType}}{{/items}}{{/isArray}}{{#isMap}}{{#isPrimitiveType}}named list( **{{dataType}}** ){{/isPrimitiveType}}{{^isPrimitiveType}}{{#isFile}}**{{dataType}}**{{/isFile}}{{^isFile}}named list( [**{{dataType}}**]({{baseType}}.md) ){{/isFile}}{{/isPrimitiveType}}{{/isMap}}{{/isContainer}}{{^isContainer}}{{#isPrimitiveType}}**{{dataType}}**{{/isPrimitiveType}}{{^isPrimitiveType}}{{#isFile}}**{{dataType}}**{{/isFile}}{{^isFile}}[**{{dataType}}**]({{baseType}}.md){{/isFile}}{{/isPrimitiveType}}{{/isContainer}}{{/isEnum}}| {{description}} | {{^required}}[optional] {{/required}}{{#defaultValue}}[default to {{.}}]{{/defaultValue}} {{/allParams}} ### Return type diff --git a/modules/openapi-generator/src/main/resources/r/api_test.mustache b/modules/openapi-generator/src/main/resources/r/api_test.mustache index 1b7e184d85fb42c377f4179bc4d5af8370433753..c78273ede3828b688552ec4d093c756ca9bc6cee 100644 --- a/modules/openapi-generator/src/main/resources/r/api_test.mustache +++ b/modules/openapi-generator/src/main/resources/r/api_test.mustache @@ -11,15 +11,15 @@ test_that("{{{operationId}}}", { # tests for {{operationId}} # base path: {{{basePath}}} {{#summary}} - # {{summary}} + # {{.}} {{/summary}} {{#notes}} - # {{notes}} + # {{.}} {{/notes}} {{#allParams}} # @param {{{paramName}}} {{{dataType}}} {{{description}}}{{^required}} (optional){{/required}} {{/allParams}} - # @return [{{#returnType}}{{{returnType}}}{{/returnType}}{{^returnType}}Void{{/returnType}}] + # @return [{{{returnType}}}{{^returnType}}Void{{/returnType}}] # uncomment below to test the operation #expect_equal(result, "EXPECTED_RESULT") diff --git a/modules/openapi-generator/src/main/resources/r/description.mustache b/modules/openapi-generator/src/main/resources/r/description.mustache index d4e01ac751bb7f63d6333764c40facc3d63172ed..d3ca9069c5fd8216e496ba13900af772ad3bbd32 100644 --- a/modules/openapi-generator/src/main/resources/r/description.mustache +++ b/modules/openapi-generator/src/main/resources/r/description.mustache @@ -1,13 +1,13 @@ Package: {{{packageName}}} Title: R Package Client for {{{appName}}} Version: {{packageVersion}} -Authors@R: person("{{#infoName}}{{infoName}}{{/infoName}}{{^infoName}}OpenAPI Generator community{{/infoName}}", email = "{{#infoEmail}}{{infoEmail}}{{/infoEmail}}{{^infoEmail}}team@openapitools.org{{/infoEmail}}", role = c("aut", "cre")) +Authors@R: person("{{infoName}}{{^infoName}}OpenAPI Generator community{{/infoName}}", email = "{{infoEmail}}{{^infoEmail}}team@openapitools.org{{/infoEmail}}", role = c("aut", "cre")) Description: {{{appDescription}}}{{^appDescription}}R Package Client for {{{appName}}}{{/appDescription}} URL: https://{{{gitHost}}}/{{{gitUserId}}}/{{{gitRepoId}}} BugReports: https://{{{gitHost}}}/{{{gitUserId}}}/{{{gitRepoId}}}/issues Depends: R (>= 3.3) Encoding: UTF-8 -License: {{#licenseInfo}}{{licenseInfo}}{{/licenseInfo}}{{^licenseInfo}}Unlicense{{/licenseInfo}} +License: {{licenseInfo}}{{^licenseInfo}}Unlicense{{/licenseInfo}} LazyData: true Suggests: testthat Imports: jsonlite, httr, R6, base64enc{{#useRlangExceptionHandling}}, rlang{{/useRlangExceptionHandling}} diff --git a/modules/openapi-generator/src/main/resources/r/git_push.sh.mustache b/modules/openapi-generator/src/main/resources/r/git_push.sh.mustache index 8b3f689c9121a65080ad038d37a2036b01e559a1..f0bed5bd84155f05bc3cdc67af008f524efb38a6 100755 --- a/modules/openapi-generator/src/main/resources/r/git_push.sh.mustache +++ b/modules/openapi-generator/src/main/resources/r/git_push.sh.mustache @@ -55,4 +55,3 @@ 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/r/model.mustache b/modules/openapi-generator/src/main/resources/r/model.mustache index 28b7ce9145b19a4191f65bd352bf5be7254b9525..caa50d80fd582de81fc7bfd2a7970a29213e88b3 100644 --- a/modules/openapi-generator/src/main/resources/r/model.mustache +++ b/modules/openapi-generator/src/main/resources/r/model.mustache @@ -26,7 +26,7 @@ `{{{baseName}}}` = NULL, {{/vars}} initialize = function( - {{#requiredVars}}`{{baseName}}`, {{/requiredVars}}{{#optionalVars}}`{{baseName}}`={{#defaultValue}}{{{.}}}{{/defaultValue}}{{^defaultValue}}NULL{{/defaultValue}}, {{/optionalVars}}... + {{#requiredVars}}`{{baseName}}`, {{/requiredVars}}{{#optionalVars}}`{{baseName}}`={{{defaultValue}}}{{^defaultValue}}NULL{{/defaultValue}}, {{/optionalVars}}... ) { local.optional.var <- list(...) {{#requiredVars}} diff --git a/modules/openapi-generator/src/main/resources/r/model_doc.mustache b/modules/openapi-generator/src/main/resources/r/model_doc.mustache index d8194ab1f5d39ba552df49c1df59120cec2203d2..c6ba5702e7112b9c0ef785b642751cfced30527a 100644 --- a/modules/openapi-generator/src/main/resources/r/model_doc.mustache +++ b/modules/openapi-generator/src/main/resources/r/model_doc.mustache @@ -6,7 +6,7 @@ ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -{{#vars}}**{{name}}** | {{#isPrimitiveType}}**{{dataType}}**{{/isPrimitiveType}}{{^isPrimitiveType}}[**{{dataType}}**]({{complexType}}.md){{/isPrimitiveType}} | {{description}} | {{^required}}[optional] {{/required}}{{#isReadOnly}}[readonly] {{/isReadOnly}}{{#defaultValue}}[default to {{defaultValue}}]{{/defaultValue}} +{{#vars}}**{{name}}** | {{#isPrimitiveType}}**{{dataType}}**{{/isPrimitiveType}}{{^isPrimitiveType}}[**{{dataType}}**]({{complexType}}.md){{/isPrimitiveType}} | {{description}} | {{^required}}[optional] {{/required}}{{#isReadOnly}}[readonly] {{/isReadOnly}}{{#defaultValue}}[default to {{.}}]{{/defaultValue}} {{/vars}} {{/model}}{{/models}} diff --git a/modules/openapi-generator/src/main/resources/r/model_test.mustache b/modules/openapi-generator/src/main/resources/r/model_test.mustache index c8df23122cf9e26524c4ca6a123d2eb2666c9c88..a6e8115fe2b8a743341d26729fe895564e1d1f6d 100644 --- a/modules/openapi-generator/src/main/resources/r/model_test.mustache +++ b/modules/openapi-generator/src/main/resources/r/model_test.mustache @@ -14,10 +14,10 @@ model.instance <- {{{classname}}}$new() test_that("{{{name}}}", { # tests for the property `{{{name}}}` ({{dataType}}) {{#description}} - # {{description}} + # {{.}} {{/description}} - # uncomment below to test the property + # uncomment below to test the property #expect_equal(model.instance$`{{{name}}}`, "EXPECTED_RESULT") }) diff --git a/modules/openapi-generator/src/main/resources/r/partial_header.mustache b/modules/openapi-generator/src/main/resources/r/partial_header.mustache index 5646f452c5f586bbcf86161f6f253980c4db669b..9634cbe52f21b09c2b04d189c14c6600634d9f09 100644 --- a/modules/openapi-generator/src/main/resources/r/partial_header.mustache +++ b/modules/openapi-generator/src/main/resources/r/partial_header.mustache @@ -1,11 +1,11 @@ {{#appName}} -# {{{appName}}} +# {{{.}}} # {{/appName}} {{#appDescription}} -# {{{appDescription}}} +# {{{.}}} # {{/appDescription}} -# {{#version}}The version of the OpenAPI document: {{{version}}}{{/version}} -# {{#infoEmail}}Contact: {{{infoEmail}}}{{/infoEmail}} +# {{#version}}The version of the OpenAPI document: {{{.}}}{{/version}} +# {{#infoEmail}}Contact: {{{.}}}{{/infoEmail}} # Generated by: https://openapi-generator.tech diff --git a/modules/openapi-generator/src/main/resources/ruby-client/README.mustache b/modules/openapi-generator/src/main/resources/ruby-client/README.mustache index e35995e6339b01de1493d1c7030801e23bdddbe8..68f2310f9a63b150a1e0265432630c551aa09b83 100644 --- a/modules/openapi-generator/src/main/resources/ruby-client/README.mustache +++ b/modules/openapi-generator/src/main/resources/ruby-client/README.mustache @@ -3,7 +3,7 @@ {{moduleName}} - the Ruby gem for the {{appName}} {{#appDescriptionWithNewLines}} -{{{appDescriptionWithNewLines}}} +{{{.}}} {{/appDescriptionWithNewLines}} This SDK is automatically generated by the [OpenAPI Generator](https://openapi-generator.tech) project: @@ -44,9 +44,9 @@ Finally add this to the Gemfile: ### Install from Git -If the Ruby gem is hosted at a git repository: https://{{gitHost}}/{{#gitUserId}}{{.}}{{/gitUserId}}{{^gitUserId}}YOUR_GIT_USERNAME{{/gitUserId}}/{{#gitRepoId}}{{.}}{{/gitRepoId}}{{^gitRepoId}}YOUR_GIT_REPO{{/gitRepoId}}, then add the following in the Gemfile: +If the Ruby gem is hosted at a git repository: https://{{gitHost}}/{{gitUserId}}{{^gitUserId}}YOUR_GIT_USERNAME{{/gitUserId}}/{{gitRepoId}}{{^gitRepoId}}YOUR_GIT_REPO{{/gitRepoId}}, then add the following in the Gemfile: - gem '{{{gemName}}}', :git => 'https://{{gitHost}}/{{#gitUserId}}{{.}}{{/gitUserId}}{{^gitUserId}}YOUR_GIT_USERNAME{{/gitUserId}}/{{#gitRepoId}}{{.}}{{/gitRepoId}}{{^gitRepoId}}YOUR_GIT_REPO{{/gitRepoId}}.git' + gem '{{{gemName}}}', :git => 'https://{{gitHost}}/{{gitUserId}}{{^gitUserId}}YOUR_GIT_USERNAME{{/gitUserId}}/{{gitRepoId}}{{^gitRepoId}}YOUR_GIT_REPO{{/gitRepoId}}.git' ### Include the Ruby code directly @@ -110,7 +110,7 @@ All URIs are relative to *{{basePath}}* Class | Method | HTTP request | Description ------------ | ------------- | ------------- | ------------- -{{#apiInfo}}{{#apis}}{{#operations}}{{#operation}}*{{moduleName}}::{{classname}}* | [**{{operationId}}**]({{apiDocPath}}{{classname}}.md#{{operationId}}) | **{{httpMethod}}** {{path}} | {{#summary}}{{{summary}}}{{/summary}} +{{#apiInfo}}{{#apis}}{{#operations}}{{#operation}}*{{moduleName}}::{{classname}}* | [**{{operationId}}**]({{apiDocPath}}{{classname}}.md#{{operationId}}) | **{{httpMethod}}** {{path}} | {{{summary}}} {{/operation}}{{/operations}}{{/apis}}{{/apiInfo}} ## Documentation for Models diff --git a/modules/openapi-generator/src/main/resources/ruby-client/api.mustache b/modules/openapi-generator/src/main/resources/ruby-client/api.mustache index b99c918b9205db04c75c976a8ccfaa0fbe07fffe..6075333062c379ebc5f722346c4e9f625dff8a20 100644 --- a/modules/openapi-generator/src/main/resources/ruby-client/api.mustache +++ b/modules/openapi-generator/src/main/resources/ruby-client/api.mustache @@ -14,30 +14,30 @@ module {{moduleName}} end {{#operation}} {{#summary}} - # {{{summary}}} + # {{{.}}} {{/summary}} {{#notes}} - # {{{notes}}} + # {{{.}}} {{/notes}} {{#allParams}}{{#required}} # @param {{paramName}} [{{{dataType}}}] {{description}} {{/required}}{{/allParams}} # @param [Hash] opts the optional parameters {{#allParams}}{{^required}} # @option opts [{{{dataType}}}] :{{paramName}} {{description}}{{#defaultValue}} (default to {{{.}}}){{/defaultValue}} -{{/required}}{{/allParams}} # @return [{{#returnType}}{{{returnType}}}{{/returnType}}{{^returnType}}nil{{/returnType}}] +{{/required}}{{/allParams}} # @return [{{{returnType}}}{{^returnType}}nil{{/returnType}}] def {{operationId}}({{#allParams}}{{#required}}{{paramName}}, {{/required}}{{/allParams}}opts = {}) {{#returnType}}data, _status_code, _headers = {{/returnType}}{{operationId}}_with_http_info({{#allParams}}{{#required}}{{paramName}}, {{/required}}{{/allParams}}opts) {{#returnType}}data{{/returnType}}{{^returnType}}nil{{/returnType}} end {{#summary}} - # {{summary}} + # {{.}} {{/summary}} {{#notes}} - # {{notes}} + # {{.}} {{/notes}} {{#allParams}}{{#required}} # @param {{paramName}} [{{{dataType}}}] {{description}} {{/required}}{{/allParams}} # @param [Hash] opts the optional parameters {{#allParams}}{{^required}} # @option opts [{{{dataType}}}] :{{paramName}} {{description}} -{{/required}}{{/allParams}} # @return [Array<({{#returnType}}{{{returnType}}}{{/returnType}}{{^returnType}}nil{{/returnType}}, Integer, Hash)>] {{#returnType}}{{{returnType}}} data{{/returnType}}{{^returnType}}nil{{/returnType}}, response status code and response headers +{{/required}}{{/allParams}} # @return [Array<({{{returnType}}}{{^returnType}}nil{{/returnType}}, Integer, Hash)>] {{#returnType}}{{{.}}} data{{/returnType}}{{^returnType}}nil{{/returnType}}, response status code and response headers def {{operationId}}_with_http_info({{#allParams}}{{#required}}{{paramName}}, {{/required}}{{/allParams}}opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: {{classname}}.{{operationId}} ...' @@ -176,7 +176,7 @@ module {{moduleName}} post_body = opts[:debug_body]{{#bodyParam}} || @api_client.object_to_http_body({{#required}}{{{paramName}}}{{/required}}{{^required}}opts[:'{{{paramName}}}']{{/required}}){{/bodyParam}} # return_type - return_type = opts[:debug_return_type]{{#returnType}} || '{{{returnType}}}'{{/returnType}} + return_type = opts[:debug_return_type]{{#returnType}} || '{{{.}}}'{{/returnType}} # auth_names auth_names = opts[:debug_auth_names] || [{{#authMethods}}'{{name}}'{{^-last}}, {{/-last}}{{/authMethods}}] diff --git a/modules/openapi-generator/src/main/resources/ruby-client/api_client.mustache b/modules/openapi-generator/src/main/resources/ruby-client/api_client.mustache index 2741a73794ed8dced0a98a06efafcc77cef2ae9a..a02c99575148b06ade0fbae609b0862decb150b1 100644 --- a/modules/openapi-generator/src/main/resources/ruby-client/api_client.mustache +++ b/modules/openapi-generator/src/main/resources/ruby-client/api_client.mustache @@ -28,7 +28,7 @@ module {{moduleName}} # @option config [Configuration] Configuration for initializing the object, default to Configuration.default def initialize(config = Configuration.default) @config = config - @user_agent = "{{#httpUserAgent}}{{{.}}}{{/httpUserAgent}}{{^httpUserAgent}}OpenAPI-Generator/#{VERSION}/ruby{{/httpUserAgent}}" + @user_agent = "{{{httpUserAgent}}}{{^httpUserAgent}}OpenAPI-Generator/#{VERSION}/ruby{{/httpUserAgent}}" @default_headers = { 'Content-Type' => 'application/json', 'User-Agent' => @user_agent diff --git a/modules/openapi-generator/src/main/resources/ruby-client/api_doc.mustache b/modules/openapi-generator/src/main/resources/ruby-client/api_doc.mustache index 81fc865534d1b202f7a8d79bdb3457e72c49bbad..57e3a2a26a22ca990114ed0708125f47c5f2c865 100644 --- a/modules/openapi-generator/src/main/resources/ruby-client/api_doc.mustache +++ b/modules/openapi-generator/src/main/resources/ruby-client/api_doc.mustache @@ -1,6 +1,6 @@ # {{moduleName}}::{{classname}}{{#description}} -{{description}}{{/description}} +{{.}}{{/description}} All URIs are relative to *{{basePath}}* @@ -8,7 +8,7 @@ All URIs are relative to *{{basePath}}* | ------ | ------------ | ----------- | {{#operations}} {{#operation}} -| [**{{operationId}}**]({{classname}}.md#{{operationId}}) | **{{httpMethod}}** {{path}} | {{#summary}}{{summary}}{{/summary}} | +| [**{{operationId}}**]({{classname}}.md#{{operationId}}) | **{{httpMethod}}** {{path}} | {{summary}} | {{/operation}} {{/operations}} @@ -21,7 +21,7 @@ All URIs are relative to *{{basePath}}* {{{summary}}}{{#notes}} -{{{notes}}}{{/notes}} +{{{.}}}{{/notes}} ### Examples @@ -98,7 +98,7 @@ This endpoint does not need any parameter. | Name | Type | Description | Notes | | ---- | ---- | ----------- | ----- | {{/-first}} -| **{{paramName}}** | {{#isPrimitiveType}}**{{dataType}}**{{/isPrimitiveType}}{{^isPrimitiveType}}{{#isFile}}**{{dataType}}**{{/isFile}}{{^isFile}}[**{{dataType}}**]({{baseType}}.md){{/isFile}}{{/isPrimitiveType}} | {{description}} | {{^required}}[optional]{{/required}}{{#defaultValue}}[default to {{defaultValue}}]{{/defaultValue}} | +| **{{paramName}}** | {{#isPrimitiveType}}**{{dataType}}**{{/isPrimitiveType}}{{^isPrimitiveType}}{{#isFile}}**{{dataType}}**{{/isFile}}{{^isFile}}[**{{dataType}}**]({{baseType}}.md){{/isFile}}{{/isPrimitiveType}} | {{description}} | {{^required}}[optional]{{/required}}{{#defaultValue}}[default to {{.}}]{{/defaultValue}} | {{/allParams}} ### Return type diff --git a/modules/openapi-generator/src/main/resources/ruby-client/api_info.mustache b/modules/openapi-generator/src/main/resources/ruby-client/api_info.mustache index 1b3f9cb5ac4579884ed94c34f2fc34e9ce6df733..272f72624d5847fd111232120322e822964fa1a8 100644 --- a/modules/openapi-generator/src/main/resources/ruby-client/api_info.mustache +++ b/modules/openapi-generator/src/main/resources/ruby-client/api_info.mustache @@ -1,12 +1,12 @@ {{#appName}} -#{{{appName}}} +#{{{.}}} {{/appName}} {{#appDescription}} -#{{{appDescription}}} +#{{{.}}} {{/appDescription}} -{{#version}}The version of the OpenAPI document: {{version}}{{/version}} -{{#infoEmail}}Contact: {{{infoEmail}}}{{/infoEmail}} +{{#version}}The version of the OpenAPI document: {{.}}{{/version}} +{{#infoEmail}}Contact: {{{.}}}{{/infoEmail}} Generated by: https://openapi-generator.tech OpenAPI Generator version: {{{generatorVersion}}} diff --git a/modules/openapi-generator/src/main/resources/ruby-client/api_test.mustache b/modules/openapi-generator/src/main/resources/ruby-client/api_test.mustache index 84d72edbc9fa153e26578927de6c0cbccf603158..2ab6515a9b92ee835737f8bef3b9bc4120e05de0 100644 --- a/modules/openapi-generator/src/main/resources/ruby-client/api_test.mustache +++ b/modules/openapi-generator/src/main/resources/ruby-client/api_test.mustache @@ -27,15 +27,15 @@ require 'json' {{#operation}} # unit tests for {{operationId}} {{#summary}} - # {{summary}} + # {{.}} {{/summary}} {{#notes}} - # {{notes}} + # {{.}} {{/notes}} {{#allParams}}{{#required}} # @param {{paramName}} {{description}} {{/required}}{{/allParams}} # @param [Hash] opts the optional parameters {{#allParams}}{{^required}} # @option opts [{{{dataType}}}] :{{paramName}} {{description}} -{{/required}}{{/allParams}} # @return [{{#returnType}}{{{returnType}}}{{/returnType}}{{^returnType}}nil{{/returnType}}] +{{/required}}{{/allParams}} # @return [{{{returnType}}}{{^returnType}}nil{{/returnType}}] describe '{{operationId}} test' do it 'should work' do # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers diff --git a/modules/openapi-generator/src/main/resources/ruby-client/git_push.sh.mustache b/modules/openapi-generator/src/main/resources/ruby-client/git_push.sh.mustache index 8b3f689c9121a65080ad038d37a2036b01e559a1..f0bed5bd84155f05bc3cdc67af008f524efb38a6 100755 --- a/modules/openapi-generator/src/main/resources/ruby-client/git_push.sh.mustache +++ b/modules/openapi-generator/src/main/resources/ruby-client/git_push.sh.mustache @@ -55,4 +55,3 @@ 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/ruby-client/partial_model_generic.mustache b/modules/openapi-generator/src/main/resources/ruby-client/partial_model_generic.mustache index 647963b4745784f87e3cadeab19c5d08a4a3be9f..8d0223f92f30cf5808c19112eb16b1162450770a 100644 --- a/modules/openapi-generator/src/main/resources/ruby-client/partial_model_generic.mustache +++ b/modules/openapi-generator/src/main/resources/ruby-client/partial_model_generic.mustache @@ -1,10 +1,10 @@ {{#description}} - # {{{description}}} + # {{{.}}} {{/description}} class {{classname}}{{#parent}} < {{{.}}}{{/parent}} {{#vars}} {{#description}} - # {{{description}}} + # {{{.}}} {{/description}} attr_accessor :{{{name}}} diff --git a/modules/openapi-generator/src/main/resources/ruby-client/partial_model_generic_doc.mustache b/modules/openapi-generator/src/main/resources/ruby-client/partial_model_generic_doc.mustache index f188dd23e6ecb921d8ec69771ce0c7452f09bf40..95bdb7107c223ae13165490f93e8b9d640eb48f3 100644 --- a/modules/openapi-generator/src/main/resources/ruby-client/partial_model_generic_doc.mustache +++ b/modules/openapi-generator/src/main/resources/ruby-client/partial_model_generic_doc.mustache @@ -5,7 +5,7 @@ | Name | Type | Description | Notes | | ---- | ---- | ----------- | ----- | {{#vars}} -| **{{name}}** | {{#isPrimitiveType}}**{{dataType}}**{{/isPrimitiveType}}{{^isPrimitiveType}}[**{{dataType}}**]({{complexType}}.md){{/isPrimitiveType}} | {{description}} | {{^required}}[optional]{{/required}}{{#isReadOnly}}[readonly]{{/isReadOnly}}{{#defaultValue}}[default to {{defaultValue}}]{{/defaultValue}} | +| **{{name}}** | {{#isPrimitiveType}}**{{dataType}}**{{/isPrimitiveType}}{{^isPrimitiveType}}[**{{dataType}}**]({{complexType}}.md){{/isPrimitiveType}} | {{description}} | {{^required}}[optional]{{/required}}{{#isReadOnly}}[readonly]{{/isReadOnly}}{{#defaultValue}}[default to {{.}}]{{/defaultValue}} | {{/vars}} ## Example diff --git a/modules/openapi-generator/src/main/resources/ruby-client/partial_oneof_module.mustache b/modules/openapi-generator/src/main/resources/ruby-client/partial_oneof_module.mustache index 14dc1635bb74c7e624b87f202cf6858cd4eb7260..d79b003e0b0722a7bd4a005415ab5cab4443330f 100644 --- a/modules/openapi-generator/src/main/resources/ruby-client/partial_oneof_module.mustache +++ b/modules/openapi-generator/src/main/resources/ruby-client/partial_oneof_module.mustache @@ -1,5 +1,5 @@ {{#description}} - # {{{description}}} + # {{{.}}} {{/description}} module {{classname}} class << self diff --git a/modules/openapi-generator/src/main/resources/ruby-on-rails-server/info.mustache b/modules/openapi-generator/src/main/resources/ruby-on-rails-server/info.mustache index 0b6eca89906c10198dbdbe379cc1c1b9c3e5e040..4b8ef86bb46d187d6cca0f9eefc3404ad572c1c4 100644 --- a/modules/openapi-generator/src/main/resources/ruby-on-rails-server/info.mustache +++ b/modules/openapi-generator/src/main/resources/ruby-on-rails-server/info.mustache @@ -1,15 +1,15 @@ {{#appName}} -{{{appName}}} +{{{.}}} {{/appName}} {{#appDescription}} -{{{appDescription}}} +{{{.}}} {{/appDescription}} {{#version}} -The version of the OpenAPI document: {{version}} +The version of the OpenAPI document: {{.}} {{/version}} {{#infoEmail}} -Contact: {{{infoEmail}}} +Contact: {{{.}}} {{/infoEmail}} Generated by: https://github.com/openapitools/openapi-generator.git diff --git a/modules/openapi-generator/src/main/resources/ruby-sinatra-server/api.mustache b/modules/openapi-generator/src/main/resources/ruby-sinatra-server/api.mustache index 3eeaf93e93daeb89ddb47fb65e47b6ab2ecaba82..92db211f6190da7c10fdb8b18236fead1414fda2 100644 --- a/modules/openapi-generator/src/main/resources/ruby-sinatra-server/api.mustache +++ b/modules/openapi-generator/src/main/resources/ruby-sinatra-server/api.mustache @@ -6,9 +6,9 @@ require 'json' MyApp.add_route('{{httpMethod}}', '{{{basePathWithoutHost}}}{{{path}}}', { "resourcePath" => "/{{{baseName}}}", "summary" => "{{{summary}}}", - "nickname" => "{{nickname}}", - "responseClass" => "{{#returnType}}{{{returnType}}}{{/returnType}}{{^returnType}}void{{/returnType}}", - "endpoint" => "{{{path}}}", + "nickname" => "{{nickname}}", + "responseClass" => "{{{returnType}}}{{^returnType}}void{{/returnType}}", + "endpoint" => "{{{path}}}", "notes" => "{{{notes}}}", "parameters" => [ {{#queryParams}} @@ -17,13 +17,13 @@ MyApp.add_route('{{httpMethod}}', '{{{basePathWithoutHost}}}{{{path}}}', { "description" => "{{description}}", "dataType" => "{{{dataType}}}", {{#collectionFormat}} - "collectionFormat" => "{{collectionFormat}}", + "collectionFormat" => "{{.}}", {{/collectionFormat}} {{^isContainer}} "allowableValues" => "{{{allowableValues.values}}}", {{/isContainer}} {{#defaultValue}} - "defaultValue" => "{{{defaultValue}}}", + "defaultValue" => "{{{.}}}", {{/defaultValue}} "paramType" => "query", }, diff --git a/modules/openapi-generator/src/main/resources/ruby-sinatra-server/my_app.mustache b/modules/openapi-generator/src/main/resources/ruby-sinatra-server/my_app.mustache index c339c33454a5668726fab293a3636392df665b35..144eeb9e40acd24aa491b9a0b56ad215d360090a 100644 --- a/modules/openapi-generator/src/main/resources/ruby-sinatra-server/my_app.mustache +++ b/modules/openapi-generator/src/main/resources/ruby-sinatra-server/my_app.mustache @@ -3,7 +3,7 @@ require './lib/openapiing' # only need to extend if you want special configuration! class MyApp < OpenAPIing self.configure do |config| - config.api_version = '{{version}}' + config.api_version = '{{version}}' end end 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 a822a90019394044f477092087173e36a457c354..a771f5c4090f72bb40cdeb4d07e09a37fb79f131 100644 --- a/modules/openapi-generator/src/main/resources/rust-server/Cargo.mustache +++ b/modules/openapi-generator/src/main/resources/rust-server/Cargo.mustache @@ -1,23 +1,23 @@ [package] name = "{{{packageName}}}" version = "{{{packageVersion}}}" -authors = [{{#infoEmail}}"{{{infoEmail}}}"{{/infoEmail}}] +authors = [{{#infoEmail}}"{{{.}}}"{{/infoEmail}}] {{#appDescription}} -description = "{{{appDescription}}}" +description = "{{{.}}}" {{/appDescription}} license = "Unlicense" edition = "2018" {{#publishRustRegistry}} -publish = ["{{publishRustRegistry}}"] +publish = ["{{.}}"] {{/publishRustRegistry}} {{#repositoryUrl}} -repository = "{{repositoryUrl}}" +repository = "{{.}}" {{/repositoryUrl}} {{#documentationUrl}} -documentation = "{{documentationUrl}}" +documentation = "{{.}}" {{/documentationUrl}} {{#homePageUrl}} -homepage = "{{homePageUrl}} +homepage = "{{.}} {{/homePageUrl}} [features] diff --git a/modules/openapi-generator/src/main/resources/rust-server/README.mustache b/modules/openapi-generator/src/main/resources/rust-server/README.mustache index 3a5a0299e9d789045966200a5053ac61bd7f9ddf..d59f151feecaebe76b2456b331005fbc02b1bafb 100644 --- a/modules/openapi-generator/src/main/resources/rust-server/README.mustache +++ b/modules/openapi-generator/src/main/resources/rust-server/README.mustache @@ -1,7 +1,7 @@ # Rust API for {{{packageName}}} {{#appDescriptionWithNewLines}} -{{{appDescriptionWithNewLines}}} +{{{.}}} {{/appDescriptionWithNewLines}} ## Overview @@ -109,7 +109,7 @@ All URIs are relative to *{{{basePath}}}* Method | HTTP request | Description ------------- | ------------- | ------------- -{{#apiInfo}}{{#apis}}{{#operations}}{{#operation}}[**{{{operationIdOriginal}}}**]({{{apiDocPath}}}{{classname}}_api.md#{{{operationIdOriginal}}}) | **{{{httpMethod}}}** {{{path}}} | {{#summary}}{{{summary}}}{{/summary}} +{{#apiInfo}}{{#apis}}{{#operations}}{{#operation}}[**{{{operationIdOriginal}}}**]({{{apiDocPath}}}{{classname}}_api.md#{{{operationIdOriginal}}}) | **{{{httpMethod}}}** {{{path}}} | {{{summary}}} {{/operation}}{{/operations}}{{/apis}}{{/apiInfo}} ## Documentation For Models @@ -122,7 +122,7 @@ Method | HTTP request | Description {{/authMethods}}{{#authMethods}}{{#last}} Authentication schemes defined for the API:{{/last}}{{/authMethods}} {{#authMethods}} ## {{{name}}} -{{#isApiKey}}- **Type**: API key +{{#isApiKey}}- **Type**: API key Example ``` diff --git a/modules/openapi-generator/src/main/resources/rust-server/api_doc.mustache b/modules/openapi-generator/src/main/resources/rust-server/api_doc.mustache index 5fad4113cd0febb3e28c1a297d85d32dbd431516..df9d992b7c4d620f05e7c4f141999021899d477e 100644 --- a/modules/openapi-generator/src/main/resources/rust-server/api_doc.mustache +++ b/modules/openapi-generator/src/main/resources/rust-server/api_doc.mustache @@ -1,27 +1,27 @@ # {{{invokerPackage}}}{{{classname}}}_api{{#description}} -{{{description}}}{{/description}} +{{{.}}}{{/description}} All URIs are relative to *{{{basePath}}}* Method | HTTP request | Description ------------- | ------------- | ------------- -{{#operations}}{{#operation}}**{{{operationIdOriginal}}}**]({{classname}}_api.md#{{{operationIdOriginal}}}) | **{{{httpMethod}}}** {{{path}}} | {{#summary}}{{{summary}}}{{/summary}} +{{#operations}}{{#operation}}**{{{operationIdOriginal}}}**]({{classname}}_api.md#{{{operationIdOriginal}}}) | **{{{httpMethod}}}** {{{path}}} | {{{summary}}} {{/operation}}{{/operations}} {{#operations}} {{#operation}} # **{{{operationIdOriginal}}}** -> {{#returnType}}{{{returnType}}} {{/returnType}}{{{operationIdOriginal}}}({{#authMethods}}ctx, {{/authMethods}}{{#allParams}}{{#required}}{{{paramName}}}{{^-last}}, {{/-last}}{{/required}}{{/allParams}}{{#hasOptionalParams}}optional{{/hasOptionalParams}}) +> {{#returnType}}{{{.}}} {{/returnType}}{{{operationIdOriginal}}}({{#authMethods}}ctx, {{/authMethods}}{{#allParams}}{{#required}}{{{paramName}}}{{^-last}}, {{/-last}}{{/required}}{{/allParams}}{{#hasOptionalParams}}optional{{/hasOptionalParams}}) {{{summary}}}{{#notes}} -{{{notes}}}{{/notes}} +{{{.}}}{{/notes}} ### Required Parameters {{^allParams}}This endpoint does not need any parameter.{{/allParams}}{{#allParams}}{{#-last}} Name | Type | Description | Notes ------------- | ------------- | ------------- | -------------{{#authMethods}} **ctx** | **context.Context** | context containing the authentication | nil if no authentication{{/authMethods}}{{/-last}}{{/allParams}}{{#allParams}}{{#required}} - **{{{paramName}}}** | {{#isPrimitiveType}}**{{{dataType}}}**{{/isPrimitiveType}}{{^isPrimitiveType}}[**{{{baseType}}}**]({{{baseType}}}.md){{/isPrimitiveType}}| {{{description}}} | {{#defaultValue}}[default to {{{defaultValue}}}]{{/defaultValue}}{{/required}}{{/allParams}}{{#hasOptionalParams}} + **{{{paramName}}}** | {{#isPrimitiveType}}**{{{dataType}}}**{{/isPrimitiveType}}{{^isPrimitiveType}}[**{{{baseType}}}**]({{{baseType}}}.md){{/isPrimitiveType}}| {{{description}}} | {{#defaultValue}}[default to {{{.}}}]{{/defaultValue}}{{/required}}{{/allParams}}{{#hasOptionalParams}} **optional** | **map[string]interface{}** | optional parameters | nil if no parameters ### Optional Parameters @@ -29,7 +29,7 @@ Optional parameters are passed through a map[string]interface{}. {{#allParams}}{{#-last}} Name | Type | Description | Notes ------------- | ------------- | ------------- | -------------{{/-last}}{{/allParams}}{{#allParams}} - **{{{paramName}}}** | {{#isPrimitiveType}}**{{{dataType}}}**{{/isPrimitiveType}}{{^isPrimitiveType}}[**{{{baseType}}}**]({{{baseType}}}.md){{/isPrimitiveType}}| {{{description}}} | {{#defaultValue}}[default to {{{defaultValue}}}]{{/defaultValue}}{{/allParams}}{{/hasOptionalParams}} + **{{{paramName}}}** | {{#isPrimitiveType}}**{{{dataType}}}**{{/isPrimitiveType}}{{^isPrimitiveType}}[**{{{baseType}}}**]({{{baseType}}}.md){{/isPrimitiveType}}| {{{description}}} | {{#defaultValue}}[default to {{{.}}}]{{/defaultValue}}{{/allParams}}{{/hasOptionalParams}} ### Return type diff --git a/modules/openapi-generator/src/main/resources/rust-server/example-server-operation.mustache b/modules/openapi-generator/src/main/resources/rust-server/example-server-operation.mustache index aad563c02f36edf0c84aa79202a349e578856897..fbdc6f844796d40c95444d5c17c717c3435ba960 100644 --- a/modules/openapi-generator/src/main/resources/rust-server/example-server-operation.mustache +++ b/modules/openapi-generator/src/main/resources/rust-server/example-server-operation.mustache @@ -1,5 +1,5 @@ {{#summary}} - /// {{{summary}}} + /// {{{.}}} {{/summary}} async fn {{#vendorExtensions}}{{{x-operation-id}}}{{/vendorExtensions}}( &self, diff --git a/modules/openapi-generator/src/main/resources/rust-server/lib.mustache b/modules/openapi-generator/src/main/resources/rust-server/lib.mustache index a2caeaa84af32b662886a6bc8088cc9abb76448f..57147489c6cd80b1aee6f6abef61ca298832c7e7 100644 --- a/modules/openapi-generator/src/main/resources/rust-server/lib.mustache +++ b/modules/openapi-generator/src/main/resources/rust-server/lib.mustache @@ -11,7 +11,7 @@ type ServiceError = Box<dyn Error + Send + Sync + 'static>; pub const BASE_PATH: &'static str = "{{{basePathWithoutHost}}}"; {{#appVersion}} -pub const API_VERSION: &'static str = "{{{appVersion}}}"; +pub const API_VERSION: &'static str = "{{{.}}}"; {{/appVersion}} {{#apiInfo}} @@ -35,7 +35,7 @@ pub trait Api<C: Send + Sync> { {{#operations}} {{#operation}} {{#summary}} - /// {{{summary}}} + /// {{{.}}} {{/summary}} async fn {{#vendorExtensions}}{{{x-operation-id}}}{{/vendorExtensions}}( &self, @@ -63,7 +63,7 @@ pub trait ApiNoContext<C: Send + Sync> { {{#operations}} {{#operation}} {{#summary}} - /// {{{summary}}} + /// {{{.}}} {{/summary}} async fn {{#vendorExtensions}}{{{x-operation-id}}}{{/vendorExtensions}}( &self, @@ -106,7 +106,7 @@ impl<T: Api<C> + Send + Sync, C: Clone + Send + Sync> ApiNoContext<C> for Contex {{#operations}} {{#operation}} {{#summary}} - /// {{{summary}}} + /// {{{.}}} {{/summary}} async fn {{#vendorExtensions}}{{{x-operation-id}}}{{/vendorExtensions}}( &self, @@ -158,7 +158,7 @@ pub trait CallbackApi<C: Send + Sync> { {{#urls}} {{#requests}} {{#summary}} - /// {{{summary}}} + /// {{{.}}} {{/summary}} async fn {{#vendorExtensions}}{{{x-operation-id}}}{{/vendorExtensions}}( &self, @@ -196,7 +196,7 @@ pub trait CallbackApiNoContext<C: Send + Sync> { {{#urls}} {{#requests}} {{#summary}} - /// {{{summary}}} + /// {{{.}}} {{/summary}} async fn {{#vendorExtensions}}{{{x-operation-id}}}{{/vendorExtensions}}( &self, @@ -249,7 +249,7 @@ impl<T: CallbackApi<C> + Send + Sync, C: Clone + Send + Sync> CallbackApiNoConte {{#urls}} {{#requests}} {{#summary}} - /// {{{summary}}} + /// {{{.}}} {{/summary}} async fn {{#vendorExtensions}}{{{x-operation-id}}}{{/vendorExtensions}}( &self, diff --git a/modules/openapi-generator/src/main/resources/rust-server/models.mustache b/modules/openapi-generator/src/main/resources/rust-server/models.mustache index 746e5dbd6cd5a6cb428d63bb741e9d101262d9fd..b31967003805bc4b1cca9662bc70cc65b662f17c 100644 --- a/modules/openapi-generator/src/main/resources/rust-server/models.mustache +++ b/modules/openapi-generator/src/main/resources/rust-server/models.mustache @@ -8,7 +8,7 @@ use crate::header; {{#model}} {{#description}} -/// {{{description}}} +/// {{{.}}} {{/description}} {{#isEnum}} /// Enumeration of values. @@ -18,7 +18,7 @@ use crate::header; #[repr(C)] #[derive(Debug, Clone, Copy, PartialEq, Eq, PartialOrd, Ord, serde::Serialize, serde::Deserialize)] #[cfg_attr(feature = "conversion", derive(frunk_enum_derive::LabelledGenericEnum))]{{#xmlName}} -#[serde(rename = "{{{xmlName}}}")]{{/xmlName}} +#[serde(rename = "{{{.}}}")]{{/xmlName}} pub enum {{{classname}}} { {{#allowableValues}} {{#enumVars}} @@ -65,7 +65,7 @@ impl std::str::FromStr for {{{classname}}} { {{/isMap}} #[cfg_attr(feature = "conversion", derive(frunk::LabelledGeneric))] {{#xmlName}} -#[serde(rename = "{{{xmlName}}}")] +#[serde(rename = "{{{.}}}")] {{/xmlName}} pub struct {{{classname}}}({{{dataType}}}); @@ -246,10 +246,10 @@ impl std::str::FromStr for {{{classname}}} { #[derive(Debug, Clone, PartialEq, serde::Serialize, serde::Deserialize)] #[cfg_attr(feature = "conversion", derive(frunk::LabelledGeneric))] {{#xmlName}} -#[serde(rename = "{{{xmlName}}}")] +#[serde(rename = "{{{.}}}")] {{/xmlName}} pub struct {{{classname}}} { -{{#vars}}{{#description}} /// {{{description}}} +{{#vars}}{{#description}} /// {{{.}}} {{/description}}{{#isEnum}} // Note: inline enums are not fully supported by openapi-generator {{/isEnum}} #[serde(rename = "{{{baseName}}}")] @@ -276,7 +276,7 @@ pub struct {{{classname}}} { impl {{{classname}}} { pub fn new({{#vars}}{{^defaultValue}}{{{name}}}: {{#isNullable}}swagger::Nullable<{{/isNullable}}{{{dataType}}}{{#isNullable}}>{{/isNullable}}, {{/defaultValue}}{{/vars}}) -> {{{classname}}} { {{{classname}}} { -{{#vars}} {{{name}}}: {{#defaultValue}}{{{defaultValue}}}{{/defaultValue}}{{^defaultValue}}{{{name}}}{{/defaultValue}}, +{{#vars}} {{{name}}}: {{{defaultValue}}}{{^defaultValue}}{{{name}}}{{/defaultValue}}, {{/vars}} } } diff --git a/modules/openapi-generator/src/main/resources/rust-server/response.mustache b/modules/openapi-generator/src/main/resources/rust-server/response.mustache index 754667acd7193f809da358e57e8ddd3a80235aaa..ac74c0b4e2a3cb408c175bfe591c1ebc7b456b81 100644 --- a/modules/openapi-generator/src/main/resources/rust-server/response.mustache +++ b/modules/openapi-generator/src/main/resources/rust-server/response.mustache @@ -5,7 +5,7 @@ pub enum {{{operationId}}}Response { {{#responses}} {{#message}} - /// {{{message}}}{{/message}} + /// {{{.}}}{{/message}} {{#vendorExtensions}} {{{x-response-id}}} {{/vendorExtensions}} diff --git a/modules/openapi-generator/src/main/resources/rust/README.mustache b/modules/openapi-generator/src/main/resources/rust/README.mustache index 9b6b5d2df652dfc92f8358b81ca5b3bbf17acd93..654bd56492071a1a3ada45cae02fddefd7ff4567 100644 --- a/modules/openapi-generator/src/main/resources/rust/README.mustache +++ b/modules/openapi-generator/src/main/resources/rust/README.mustache @@ -1,7 +1,7 @@ # Rust API client for {{{packageName}}} {{#appDescriptionWithNewLines}} -{{{appDescriptionWithNewLines}}} +{{{.}}} {{/appDescriptionWithNewLines}} ## Overview @@ -32,7 +32,7 @@ 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}} +{{#apiInfo}}{{#apis}}{{#operations}}{{#operation}}*{{{classname}}}* | [**{{{operationId}}}**]({{{apiDocPath}}}{{classname}}.md#{{{operationIdLowerCase}}}) | **{{{httpMethod}}}** {{{path}}} | {{{summary}}} {{/operation}}{{/operations}}{{/apis}}{{/apiInfo}} ## Documentation For Models diff --git a/modules/openapi-generator/src/main/resources/rust/api_doc.mustache b/modules/openapi-generator/src/main/resources/rust/api_doc.mustache index bcf2b94a9226df1217085d61e4a20a94573f55c6..f8ea52038b0136c8479b5d1a8404979cb7e05049 100644 --- a/modules/openapi-generator/src/main/resources/rust/api_doc.mustache +++ b/modules/openapi-generator/src/main/resources/rust/api_doc.mustache @@ -1,12 +1,12 @@ # {{{invokerPackage}}}\{{{classname}}}{{#description}} -{{{description}}}{{/description}} +{{{.}}}{{/description}} All URIs are relative to *{{{basePath}}}* Method | HTTP request | Description ------------- | ------------- | ------------- -{{#operations}}{{#operation}}[**{{{operationId}}}**]({{{classname}}}.md#{{{operationId}}}) | **{{{httpMethod}}}** {{{path}}} | {{#summary}}{{{summary}}}{{/summary}} +{{#operations}}{{#operation}}[**{{{operationId}}}**]({{{classname}}}.md#{{{operationId}}}) | **{{{httpMethod}}}** {{{path}}} | {{{summary}}} {{/operation}}{{/operations}} {{#operations}} @@ -14,10 +14,10 @@ Method | HTTP request | Description ## {{{operationId}}} -> {{#returnType}}{{{returnType}}} {{/returnType}}{{{operationId}}}({{#allParams}}{{{paramName}}}{{^-last}}, {{/-last}}{{/allParams}}) +> {{#returnType}}{{{.}}} {{/returnType}}{{{operationId}}}({{#allParams}}{{{paramName}}}{{^-last}}, {{/-last}}{{/allParams}}) {{{summary}}}{{#notes}} -{{{notes}}}{{/notes}} +{{{.}}}{{/notes}} ### Parameters @@ -25,7 +25,7 @@ Method | HTTP request | Description Name | Type | Description | Required | Notes ------------- | ------------- | ------------- | ------------- | -------------{{/-last}}{{/allParams}} {{#allParams}} -**{{{paramName}}}** | {{^required}}Option<{{/required}}{{#required}}{{#isNullable}}Option<{{/isNullable}}{{/required}}{{#isPrimitiveType}}**{{{dataType}}}**{{/isPrimitiveType}}{{^isPrimitiveType}}[**{{{dataType}}}**]({{{baseType}}}.md){{/isPrimitiveType}}{{^required}}>{{/required}}{{#required}}{{#isNullable}}>{{/isNullable}}{{/required}} | {{{description}}} | {{#required}}[required]{{/required}} |{{#defaultValue}}[default to {{{defaultValue}}}]{{/defaultValue}} +**{{{paramName}}}** | {{^required}}Option<{{/required}}{{#required}}{{#isNullable}}Option<{{/isNullable}}{{/required}}{{#isPrimitiveType}}**{{{dataType}}}**{{/isPrimitiveType}}{{^isPrimitiveType}}[**{{{dataType}}}**]({{{baseType}}}.md){{/isPrimitiveType}}{{^required}}>{{/required}}{{#required}}{{#isNullable}}>{{/isNullable}}{{/required}} | {{{description}}} | {{#required}}[required]{{/required}} |{{#defaultValue}}[default to {{{.}}}]{{/defaultValue}} {{/allParams}} ### Return type diff --git a/modules/openapi-generator/src/main/resources/rust/git_push.sh.mustache b/modules/openapi-generator/src/main/resources/rust/git_push.sh.mustache index 8b3f689c9121a65080ad038d37a2036b01e559a1..f0bed5bd84155f05bc3cdc67af008f524efb38a6 100755 --- a/modules/openapi-generator/src/main/resources/rust/git_push.sh.mustache +++ b/modules/openapi-generator/src/main/resources/rust/git_push.sh.mustache @@ -55,4 +55,3 @@ 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/rust/hyper/api.mustache b/modules/openapi-generator/src/main/resources/rust/hyper/api.mustache index 56a2c68ce5fc284d17fae3d53dad3fe9a901036e..ded6202a35aab7c8b95033dc2515d0a4a1fb6a26 100644 --- a/modules/openapi-generator/src/main/resources/rust/hyper/api.mustache +++ b/modules/openapi-generator/src/main/resources/rust/hyper/api.mustache @@ -26,7 +26,7 @@ impl<C: hyper::client::Connect> {{{classname}}}Client<C> { pub trait {{{classname}}} { {{#operations}} {{#operation}} - fn {{{operationId}}}(&self, {{#allParams}}{{{paramName}}}: {{^required}}Option<{{/required}}{{#required}}{{#isNullable}}Option<{{/isNullable}}{{/required}}{{#isString}}&str{{/isString}}{{#isUuid}}&str{{/isUuid}}{{^isString}}{{^isUuid}}{{^isPrimitiveType}}{{^isContainer}}crate::models::{{/isContainer}}{{/isPrimitiveType}}{{{dataType}}}{{/isUuid}}{{/isString}}{{^required}}>{{/required}}{{#required}}{{#isNullable}}>{{/isNullable}}{{/required}}{{^-last}}, {{/-last}}{{/allParams}}) -> Box<dyn Future<Item = {{^returnType}}(){{/returnType}}{{#returnType}}{{{returnType}}}{{/returnType}}, Error = Error<serde_json::Value>>>; + fn {{{operationId}}}(&self, {{#allParams}}{{{paramName}}}: {{^required}}Option<{{/required}}{{#required}}{{#isNullable}}Option<{{/isNullable}}{{/required}}{{#isString}}&str{{/isString}}{{#isUuid}}&str{{/isUuid}}{{^isString}}{{^isUuid}}{{^isPrimitiveType}}{{^isContainer}}crate::models::{{/isContainer}}{{/isPrimitiveType}}{{{dataType}}}{{/isUuid}}{{/isString}}{{^required}}>{{/required}}{{#required}}{{#isNullable}}>{{/isNullable}}{{/required}}{{^-last}}, {{/-last}}{{/allParams}}) -> Box<dyn Future<Item = {{^returnType}}(){{/returnType}}{{{returnType}}}, Error = Error<serde_json::Value>>>; {{/operation}} {{/operations}} } @@ -34,7 +34,7 @@ pub trait {{{classname}}} { impl<C: hyper::client::Connect>{{{classname}}} for {{{classname}}}Client<C> { {{#operations}} {{#operation}} - fn {{{operationId}}}(&self, {{#allParams}}{{{paramName}}}: {{^required}}Option<{{/required}}{{#required}}{{#isNullable}}Option<{{/isNullable}}{{/required}}{{#isString}}&str{{/isString}}{{#isUuid}}&str{{/isUuid}}{{^isString}}{{^isUuid}}{{^isPrimitiveType}}{{^isContainer}}crate::models::{{/isContainer}}{{/isPrimitiveType}}{{{dataType}}}{{/isUuid}}{{/isString}}{{^required}}>{{/required}}{{#required}}{{#isNullable}}>{{/isNullable}}{{/required}}{{^-last}}, {{/-last}}{{/allParams}}) -> Box<dyn Future<Item = {{^returnType}}(){{/returnType}}{{#returnType}}{{{.}}}{{/returnType}}, Error = Error<serde_json::Value>>> { + fn {{{operationId}}}(&self, {{#allParams}}{{{paramName}}}: {{^required}}Option<{{/required}}{{#required}}{{#isNullable}}Option<{{/isNullable}}{{/required}}{{#isString}}&str{{/isString}}{{#isUuid}}&str{{/isUuid}}{{^isString}}{{^isUuid}}{{^isPrimitiveType}}{{^isContainer}}crate::models::{{/isContainer}}{{/isPrimitiveType}}{{{dataType}}}{{/isUuid}}{{/isString}}{{^required}}>{{/required}}{{#required}}{{#isNullable}}>{{/isNullable}}{{/required}}{{^-last}}, {{/-last}}{{/allParams}}) -> Box<dyn Future<Item = {{^returnType}}(){{/returnType}}{{{returnType}}}, Error = Error<serde_json::Value>>> { let mut req = __internal_request::Request::new(hyper::Method::{{{httpMethod}}}, "{{{path}}}".to_string()) {{#hasAuthMethods}} {{#authMethods}} diff --git a/modules/openapi-generator/src/main/resources/rust/hyper/api_mod.mustache b/modules/openapi-generator/src/main/resources/rust/hyper/api_mod.mustache index d2b43120854010c4934ce598591391a913a9e698..4f220c93d56f1d57219ed8e9aebe617b963f286e 100644 --- a/modules/openapi-generator/src/main/resources/rust/hyper/api_mod.mustache +++ b/modules/openapi-generator/src/main/resources/rust/hyper/api_mod.mustache @@ -16,7 +16,7 @@ pub struct ApiError<T> { pub content: Option<T>, } -impl<'de, T> From<(hyper::StatusCode, &'de [u8])> for Error<T> +impl<'de, T> From<(hyper::StatusCode, &'de [u8])> for Error<T> where T: serde::Deserialize<'de> { fn from(e: (hyper::StatusCode, &'de [u8])) -> Self { if e.1.len() == 0 { diff --git a/modules/openapi-generator/src/main/resources/rust/model.mustache b/modules/openapi-generator/src/main/resources/rust/model.mustache index 974bc54bd100765d8592ae4e8026a2298b866337..ebd0a455dfd898036ee73c70f5c51a1727befee4 100644 --- a/modules/openapi-generator/src/main/resources/rust/model.mustache +++ b/modules/openapi-generator/src/main/resources/rust/model.mustache @@ -41,7 +41,7 @@ pub enum {{{classname}}} { {{{modelName}}} { {{#vars}} {{#description}} - /// {{{description}}} + /// {{{.}}} {{/description}} #[serde(rename = "{{{baseName}}}"{{^required}}, skip_serializing_if = "Option::is_none"{{/required}})] {{{name}}}: {{#required}}{{#isNullable}}Option<{{/isNullable}}{{/required}}{{^required}}Option<{{/required}}{{#isEnum}}{{{enumName}}}{{/isEnum}}{{^isEnum}}{{#isModel}}Box<{{{dataType}}}>{{/isModel}}{{^isModel}}{{{dataType}}}{{/isModel}}{{/isEnum}}{{#required}}{{#isNullable}}>{{/isNullable}}{{/required}}{{^required}}>{{/required}}, @@ -60,7 +60,7 @@ pub enum {{{classname}}} { pub struct {{{classname}}} { {{#vars}} {{#description}} - /// {{{description}}} + /// {{{.}}} {{/description}} #[serde(rename = "{{{baseName}}}"{{^required}}, skip_serializing_if = "Option::is_none"{{/required}})] pub {{{name}}}: {{#required}}{{#isNullable}}Option<{{/isNullable}}{{/required}}{{^required}}Option<{{/required}}{{#isEnum}}{{#isArray}}{{#uniqueItems}}std::collections::HashSet<{{/uniqueItems}}{{^uniqueItems}}Vec<{{/uniqueItems}}{{/isArray}}{{{enumName}}}{{#isArray}}>{{/isArray}}{{/isEnum}}{{^isEnum}}{{#isModel}}Box<{{{dataType}}}>{{/isModel}}{{^isModel}}{{{dataType}}}{{/isModel}}{{/isEnum}}{{#required}}{{#isNullable}}>{{/isNullable}}{{/required}}{{^required}}>{{/required}}, @@ -69,7 +69,7 @@ pub struct {{{classname}}} { impl {{{classname}}} { {{#description}} - /// {{{description}}} + /// {{{.}}} {{/description}} pub fn new({{#requiredVars}}{{{name}}}: {{#isNullable}}Option<{{/isNullable}}{{#isEnum}}{{{enumName}}}{{/isEnum}}{{^isEnum}}{{{dataType}}}{{/isEnum}}{{#isNullable}}>{{/isNullable}}{{^-last}}, {{/-last}}{{/requiredVars}}) -> {{{classname}}} { {{{classname}}} { diff --git a/modules/openapi-generator/src/main/resources/rust/model_doc.mustache b/modules/openapi-generator/src/main/resources/rust/model_doc.mustache index 7c1230e4268f18acae45df0c12de071334165e70..0c48c83b828e7d16fdc14260f1fa7deeff70bed1 100644 --- a/modules/openapi-generator/src/main/resources/rust/model_doc.mustache +++ b/modules/openapi-generator/src/main/resources/rust/model_doc.mustache @@ -4,7 +4,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -{{#vars}}**{{{name}}}** | {{^required}}Option<{{/required}}{{#required}}{{#isNullable}}Option<{{/isNullable}}{{/required}}{{#isPrimitiveType}}**{{{dataType}}}**{{/isPrimitiveType}}{{^isPrimitiveType}}[**{{{dataType}}}**]({{{complexType}}}.md){{/isPrimitiveType}}{{^required}}>{{/required}}{{#required}}{{#isNullable}}>{{/isNullable}}{{/required}} | {{{description}}} | {{^required}}[optional]{{/required}}{{#isReadOnly}}[readonly]{{/isReadOnly}}{{#defaultValue}}[default to {{{defaultValue}}}]{{/defaultValue}} +{{#vars}}**{{{name}}}** | {{^required}}Option<{{/required}}{{#required}}{{#isNullable}}Option<{{/isNullable}}{{/required}}{{#isPrimitiveType}}**{{{dataType}}}**{{/isPrimitiveType}}{{^isPrimitiveType}}[**{{{dataType}}}**]({{{complexType}}}.md){{/isPrimitiveType}}{{^required}}>{{/required}}{{#required}}{{#isNullable}}>{{/isNullable}}{{/required}} | {{{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) diff --git a/modules/openapi-generator/src/main/resources/rust/partial_header.mustache b/modules/openapi-generator/src/main/resources/rust/partial_header.mustache index 9eb233d1197c657adddffb63eab190532c1c4e53..408d841df26d1f9e71d44a023a8711444d5fe9aa 100644 --- a/modules/openapi-generator/src/main/resources/rust/partial_header.mustache +++ b/modules/openapi-generator/src/main/resources/rust/partial_header.mustache @@ -1,13 +1,13 @@ /* {{#appName}} - * {{{appName}}} + * {{{.}}} * {{/appName}} {{#appDescription}} - * {{{appDescription}}} + * {{{.}}} * {{/appDescription}} - * {{#version}}The version of the OpenAPI document: {{{version}}}{{/version}} - * {{#infoEmail}}Contact: {{{infoEmail}}}{{/infoEmail}} + * {{#version}}The version of the OpenAPI document: {{{.}}}{{/version}} + * {{#infoEmail}}Contact: {{{.}}}{{/infoEmail}} * Generated by: https://openapi-generator.tech */ diff --git a/modules/openapi-generator/src/main/resources/rust/reqwest/api.mustache b/modules/openapi-generator/src/main/resources/rust/reqwest/api.mustache index 3bf87eff9358a12f39bd858e8701f957c3429ca3..8945ebaf689dba8f268f5a6485c6afbf90704224 100644 --- a/modules/openapi-generator/src/main/resources/rust/reqwest/api.mustache +++ b/modules/openapi-generator/src/main/resources/rust/reqwest/api.mustache @@ -80,7 +80,7 @@ pub enum {{{operationIdCamelCase}}}Error { /// {{{.}}} {{/notes}} {{#vendorExtensions.x-group-parameters}} -pub {{#supportAsync}}async {{/supportAsync}}fn {{{operationId}}}(configuration: &configuration::Configuration{{#allParams}}{{#-first}}, params: {{{operationIdCamelCase}}}Params{{/-first}}{{/allParams}}) -> Result<{{#supportMultipleResponses}}ResponseContent<{{{operationIdCamelCase}}}Success>{{/supportMultipleResponses}}{{^supportMultipleResponses}}{{^returnType}}(){{/returnType}}{{#returnType}}{{{returnType}}}{{/returnType}}{{/supportMultipleResponses}}, Error<{{{operationIdCamelCase}}}Error>> { +pub {{#supportAsync}}async {{/supportAsync}}fn {{{operationId}}}(configuration: &configuration::Configuration{{#allParams}}{{#-first}}, params: {{{operationIdCamelCase}}}Params{{/-first}}{{/allParams}}) -> Result<{{#supportMultipleResponses}}ResponseContent<{{{operationIdCamelCase}}}Success>{{/supportMultipleResponses}}{{^supportMultipleResponses}}{{^returnType}}(){{/returnType}}{{{returnType}}}{{/supportMultipleResponses}}, Error<{{{operationIdCamelCase}}}Error>> { // unbox the parameters {{#allParams}} let {{paramName}} = params.{{paramName}}; @@ -88,7 +88,7 @@ pub {{#supportAsync}}async {{/supportAsync}}fn {{{operationId}}}(configuration: {{/vendorExtensions.x-group-parameters}} {{^vendorExtensions.x-group-parameters}} -pub {{#supportAsync}}async {{/supportAsync}}fn {{{operationId}}}(configuration: &configuration::Configuration, {{#allParams}}{{{paramName}}}: {{^required}}Option<{{/required}}{{#required}}{{#isNullable}}Option<{{/isNullable}}{{/required}}{{#isString}}{{#isArray}}Vec<{{/isArray}}&str{{#isArray}}>{{/isArray}}{{/isString}}{{#isUuid}}{{#isArray}}Vec<{{/isArray}}&str{{#isArray}}>{{/isArray}}{{/isUuid}}{{^isString}}{{^isUuid}}{{^isPrimitiveType}}{{^isContainer}}{{#isBodyParam}}crate::models::{{/isBodyParam}}{{/isContainer}}{{/isPrimitiveType}}{{{dataType}}}{{/isUuid}}{{/isString}}{{^required}}>{{/required}}{{#required}}{{#isNullable}}>{{/isNullable}}{{/required}}{{^-last}}, {{/-last}}{{/allParams}}) -> Result<{{#supportMultipleResponses}}ResponseContent<{{{operationIdCamelCase}}}Success>{{/supportMultipleResponses}}{{^supportMultipleResponses}}{{^returnType}}(){{/returnType}}{{#returnType}}{{{returnType}}}{{/returnType}}{{/supportMultipleResponses}}, Error<{{{operationIdCamelCase}}}Error>> { +pub {{#supportAsync}}async {{/supportAsync}}fn {{{operationId}}}(configuration: &configuration::Configuration, {{#allParams}}{{{paramName}}}: {{^required}}Option<{{/required}}{{#required}}{{#isNullable}}Option<{{/isNullable}}{{/required}}{{#isString}}{{#isArray}}Vec<{{/isArray}}&str{{#isArray}}>{{/isArray}}{{/isString}}{{#isUuid}}{{#isArray}}Vec<{{/isArray}}&str{{#isArray}}>{{/isArray}}{{/isUuid}}{{^isString}}{{^isUuid}}{{^isPrimitiveType}}{{^isContainer}}{{#isBodyParam}}crate::models::{{/isBodyParam}}{{/isContainer}}{{/isPrimitiveType}}{{{dataType}}}{{/isUuid}}{{/isString}}{{^required}}>{{/required}}{{#required}}{{#isNullable}}>{{/isNullable}}{{/required}}{{^-last}}, {{/-last}}{{/allParams}}) -> Result<{{#supportMultipleResponses}}ResponseContent<{{{operationIdCamelCase}}}Success>{{/supportMultipleResponses}}{{^supportMultipleResponses}}{{^returnType}}(){{/returnType}}{{{returnType}}}{{/supportMultipleResponses}}, Error<{{{operationIdCamelCase}}}Error>> { {{/vendorExtensions.x-group-parameters}} let local_var_client = &configuration.client; diff --git a/modules/openapi-generator/src/main/resources/scala-akka-client/README.mustache b/modules/openapi-generator/src/main/resources/scala-akka-client/README.mustache index e602fbda717b8b3d710b1c3123a1544237714682..485b707dfd3027f76b9897340f1f6c25e9d61ad1 100644 --- a/modules/openapi-generator/src/main/resources/scala-akka-client/README.mustache +++ b/modules/openapi-generator/src/main/resources/scala-akka-client/README.mustache @@ -6,7 +6,7 @@ - Build date: {{generatedDate}} {{/hideGenerationTimestamp}} -{{#appDescriptionWithNewLines}}{{{appDescriptionWithNewLines}}}{{/appDescriptionWithNewLines}} +{{{appDescriptionWithNewLines}}} {{#infoUrl}} For more information, please visit [{{{infoUrl}}}]({{{infoUrl}}}) @@ -71,7 +71,7 @@ All URIs are relative to *{{basePath}}* Class | Method | HTTP request | Description ------------ | ------------- | ------------- | ------------- -{{#apiInfo}}{{#apis}}{{#operations}}{{#operation}}*{{classname}}* | **{{operationId}}** | **{{httpMethod}}** {{path}} | {{#summary}}{{summary}}{{/summary}} +{{#apiInfo}}{{#apis}}{{#operations}}{{#operation}}*{{classname}}* | **{{operationId}}** | **{{httpMethod}}** {{path}} | {{summary}} {{/operation}}{{/operations}}{{/apis}}{{/apiInfo}} ## Documentation for Models diff --git a/modules/openapi-generator/src/main/resources/scala-akka-client/api.mustache b/modules/openapi-generator/src/main/resources/scala-akka-client/api.mustache index 5a663814826494138b30090f284bb3170d03b5a0..6da068e37a58d3c258fd17ce31114e536a3c78c7 100644 --- a/modules/openapi-generator/src/main/resources/scala-akka-client/api.mustache +++ b/modules/openapi-generator/src/main/resources/scala-akka-client/api.mustache @@ -15,7 +15,7 @@ object {{classname}} { } class {{classname}}(baseUrl: String) { - + {{#operation}} {{#javadocRenderer}} {{>javadoc}} diff --git a/modules/openapi-generator/src/main/resources/scala-akka-client/javadoc.mustache b/modules/openapi-generator/src/main/resources/scala-akka-client/javadoc.mustache index e42fa1dcdcd7f83a66b295e3f588569edcdefc02..6acaca14ac3a2dc9fb2841218b8cc3bee640b625 100644 --- a/modules/openapi-generator/src/main/resources/scala-akka-client/javadoc.mustache +++ b/modules/openapi-generator/src/main/resources/scala-akka-client/javadoc.mustache @@ -1,10 +1,10 @@ {{#notes}} -{{{notes}}} +{{{.}}} {{/notes}} Expected answers: {{#responses}} - code {{code}} : {{{dataType}}} {{#message}}({{{message}}}){{/message}} + code {{code}} : {{{dataType}}} {{#message}}({{{.}}}){{/message}} {{#headers}} {{#-first}} Headers : diff --git a/modules/openapi-generator/src/main/resources/scala-akka-client/licenseInfo.mustache b/modules/openapi-generator/src/main/resources/scala-akka-client/licenseInfo.mustache index 835764cfc729d721063604e603a10808335e97c8..16ba21d203d0eeb4aaad31474c615056cc169d3f 100644 --- a/modules/openapi-generator/src/main/resources/scala-akka-client/licenseInfo.mustache +++ b/modules/openapi-generator/src/main/resources/scala-akka-client/licenseInfo.mustache @@ -2,8 +2,8 @@ * {{{appName}}} * {{{appDescription}}} * - * {{#version}}The version of the OpenAPI document: {{{version}}}{{/version}} - * {{#infoEmail}}Contact: {{{infoEmail}}}{{/infoEmail}} + * {{#version}}The version of the OpenAPI document: {{{.}}}{{/version}} + * {{#infoEmail}}Contact: {{{.}}}{{/infoEmail}} * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech diff --git a/modules/openapi-generator/src/main/resources/scala-akka-client/model.mustache b/modules/openapi-generator/src/main/resources/scala-akka-client/model.mustache index ccca2eadfa6b418764be136f9b12532284f72979..832606e1d866658f04b20e2775c4e4ec521a0bde 100644 --- a/modules/openapi-generator/src/main/resources/scala-akka-client/model.mustache +++ b/modules/openapi-generator/src/main/resources/scala-akka-client/model.mustache @@ -11,7 +11,7 @@ import {{invokerPackage}}.ApiModel case class {{classname}} ( {{#vars}} {{#description}} - /* {{{description}}} */ + /* {{{.}}} */ {{/description}} {{{name}}}: {{^required}}Option[{{/required}}{{^isEnum}}{{dataType}}{{/isEnum}}{{#isEnum}}{{classname}}Enums.{{datatypeWithEnum}}{{/isEnum}}{{^required}}] = None{{/required}}{{^-last}},{{/-last}} {{/vars}} @@ -39,4 +39,3 @@ object {{classname}}Enums { {{/hasEnums}} {{/model}} {{/models}} - diff --git a/modules/openapi-generator/src/main/resources/scala-akka-client/operationReturnType.mustache b/modules/openapi-generator/src/main/resources/scala-akka-client/operationReturnType.mustache index a8917911853a2107a0bcb49c6d8e135c6f910170..170935cad6398d7fdeb8539cce94e07303e9f8c9 100644 --- a/modules/openapi-generator/src/main/resources/scala-akka-client/operationReturnType.mustache +++ b/modules/openapi-generator/src/main/resources/scala-akka-client/operationReturnType.mustache @@ -1 +1 @@ -{{#returnType}}{{{returnType}}}{{/returnType}}{{^returnType}}Unit{{/returnType}} \ No newline at end of file +{{{returnType}}}{{^returnType}}Unit{{/returnType}} \ No newline at end of file diff --git a/modules/openapi-generator/src/main/resources/scala-akka-http-server/model.mustache b/modules/openapi-generator/src/main/resources/scala-akka-http-server/model.mustache index af271b39f9ba4d63f198832cb1f10a1aa8f6840e..fe51cb9a557ee66a37d422818d7eafe86774d382 100644 --- a/modules/openapi-generator/src/main/resources/scala-akka-http-server/model.mustache +++ b/modules/openapi-generator/src/main/resources/scala-akka-http-server/model.mustache @@ -7,14 +7,14 @@ import {{import}} {{#models}} {{#model}} /** -{{#title}} * = {{{title}}} = +{{#title}} * = {{{.}}} = * {{/title}} -{{#description}} * {{{description}}} +{{#description}} * {{{.}}} * {{/description}} {{#vars}} - * @param {{{name}}} {{#description}}{{{description}}}{{/description}}{{#example}} for example: ''{{{example}}}''{{/example}} + * @param {{{name}}} {{{description}}}{{#example}} for example: ''{{{.}}}''{{/example}} {{/vars}} */ final case class {{classname}} ( diff --git a/modules/openapi-generator/src/main/resources/scala-finch/DataAccessor.mustache b/modules/openapi-generator/src/main/resources/scala-finch/DataAccessor.mustache index dbcca480aa877203a8e16250d0fb1b43cb62e532..ab651e6dad9ddc6c580a96fad9470be2f5205fde 100644 --- a/modules/openapi-generator/src/main/resources/scala-finch/DataAccessor.mustache +++ b/modules/openapi-generator/src/main/resources/scala-finch/DataAccessor.mustache @@ -20,9 +20,9 @@ trait DataAccessor { {{#operation}} /** * {{{description}}} - * @return A {{#returnType}}{{returnType}}{{/returnType}}{{^returnType}}Unit{{/returnType}} + * @return A {{returnType}}{{^returnType}}Unit{{/returnType}} */ - def {{baseName}}_{{operationId}}({{{vendorExtensions.x-codegen-typed-params}}}): Either[CommonError,{{#returnType}}{{returnType}}{{/returnType}}{{^returnType}}Unit{{/returnType}}] = Left(TODO) + def {{baseName}}_{{operationId}}({{{vendorExtensions.x-codegen-typed-params}}}): Either[CommonError,{{returnType}}{{^returnType}}Unit{{/returnType}}] = Left(TODO) {{/operation}} {{/operations}} diff --git a/modules/openapi-generator/src/main/resources/scala-finch/api.mustache b/modules/openapi-generator/src/main/resources/scala-finch/api.mustache index 636e3f966e36dbb36a45d1791374b1f4981f6b4d..b21c342c7f6db4909b85d5968c0589754ace563a 100644 --- a/modules/openapi-generator/src/main/resources/scala-finch/api.mustache +++ b/modules/openapi-generator/src/main/resources/scala-finch/api.mustache @@ -56,9 +56,9 @@ object {{classname}} { {{#operation}} /** * {{{description}}} - * @return An endpoint representing a {{#returnType}}{{returnType}}{{/returnType}}{{^returnType}}Unit{{/returnType}} + * @return An endpoint representing a {{returnType}}{{^returnType}}Unit{{/returnType}} */ - private def {{operationId}}(da: DataAccessor): Endpoint[{{#returnType}}{{returnType}}{{/returnType}}{{^returnType}}Unit{{/returnType}}] = + private def {{operationId}}(da: DataAccessor): Endpoint[{{returnType}}{{^returnType}}Unit{{/returnType}}] = {{httpMethod}}({{{vendorExtensions.x-codegen-paths}}}) { {{#vendorExtensions.x-codegen-typed-params}}({{{vendorExtensions.x-codegen-typed-params}}}) =>{{/vendorExtensions.x-codegen-typed-params}} da.{{baseName}}_{{operationId}}({{{vendorExtensions.x-codegen-params}}}) match { case Left(error) => checkError(error) diff --git a/modules/openapi-generator/src/main/resources/scala-finch/bodyParam.mustache b/modules/openapi-generator/src/main/resources/scala-finch/bodyParam.mustache index 07a90aa23cbca11757d669ddcd9623e02dfe3186..173fb1bdcedc5e8fbfc7d172d9e271b0be5e7046 100644 --- a/modules/openapi-generator/src/main/resources/scala-finch/bodyParam.mustache +++ b/modules/openapi-generator/src/main/resources/scala-finch/bodyParam.mustache @@ -1 +1 @@ -{{#isBodyParam}}bodyParam[{{dataType}}]("{{paramName}}").description(""){{^required}}.optional{{/required}}{{#defaultValue}}.defaultValue({{{defaultValue}}}){{/defaultValue}}{{/isBodyParam}} \ No newline at end of file +{{#isBodyParam}}bodyParam[{{dataType}}]("{{paramName}}").description(""){{^required}}.optional{{/required}}{{#defaultValue}}.defaultValue({{{.}}}){{/defaultValue}}{{/isBodyParam}} \ No newline at end of file diff --git a/modules/openapi-generator/src/main/resources/scala-finch/errors.mustache b/modules/openapi-generator/src/main/resources/scala-finch/errors.mustache index e4d8dbce8fd947f9f931b54f32aec4cb623542ba..bff4ad90acc6357e265c5e571a94cbfc455d724a 100644 --- a/modules/openapi-generator/src/main/resources/scala-finch/errors.mustache +++ b/modules/openapi-generator/src/main/resources/scala-finch/errors.mustache @@ -24,4 +24,3 @@ case class MissingIdentifier(message: String) extends CommonError(message) * @param message An error message */ case class RecordNotFound(message: String) extends CommonError(message) - diff --git a/modules/openapi-generator/src/main/resources/scala-finch/formParam.mustache b/modules/openapi-generator/src/main/resources/scala-finch/formParam.mustache index 1afcf12ccc6aa4dcf1faa61d4597e9f2eea73f79..f7394333bbca33f95a591ab3f09618ef6d618d5b 100644 --- a/modules/openapi-generator/src/main/resources/scala-finch/formParam.mustache +++ b/modules/openapi-generator/src/main/resources/scala-finch/formParam.mustache @@ -1 +1 @@ -{{#isFormParam}}formParam[{{dataType}}]("{{paramName}}").description(""){{^required}}.optional{{/required}}{{#defaultValue}}.defaultValue({{{defaultValue}}}){{/defaultValue}}{{/isFormParam}} \ No newline at end of file +{{#isFormParam}}formParam[{{dataType}}]("{{paramName}}").description(""){{^required}}.optional{{/required}}{{#defaultValue}}.defaultValue({{{.}}}){{/defaultValue}}{{/isFormParam}} \ No newline at end of file diff --git a/modules/openapi-generator/src/main/resources/scala-finch/headerParam.mustache b/modules/openapi-generator/src/main/resources/scala-finch/headerParam.mustache index 798bb0fe6d5d7c9bfe333010829591364854a06e..43e76d45d85100737817d4b964752c5a0ad0b5cf 100644 --- a/modules/openapi-generator/src/main/resources/scala-finch/headerParam.mustache +++ b/modules/openapi-generator/src/main/resources/scala-finch/headerParam.mustache @@ -1 +1 @@ -{{#isHeaderParam}}headerParam[{{dataType}}]("{{paramName}}").description(""){{^required}}.optional{{/required}}{{#defaultValue}}.defaultValue({{{defaultValue}}}){{/defaultValue}}{{/isHeaderParam}} \ No newline at end of file +{{#isHeaderParam}}headerParam[{{dataType}}]("{{paramName}}").description(""){{^required}}.optional{{/required}}{{#defaultValue}}.defaultValue({{{.}}}){{/defaultValue}}{{/isHeaderParam}} \ No newline at end of file diff --git a/modules/openapi-generator/src/main/resources/scala-finch/pathParam.mustache b/modules/openapi-generator/src/main/resources/scala-finch/pathParam.mustache index ae72aa8ec74fe8120e9106b4dfd5bc0d6d711695..58c58af06c48d3df57b46f9f3386dd04331d55ce 100644 --- a/modules/openapi-generator/src/main/resources/scala-finch/pathParam.mustache +++ b/modules/openapi-generator/src/main/resources/scala-finch/pathParam.mustache @@ -1 +1 @@ -{{#isPathParam}}pathParam[{{dataType}}]("{{paramName}}").description(""){{#defaultValue}}.defaultValue({{{defaultValue}}}){{/defaultValue}}{{/isPathParam}} \ No newline at end of file +{{#isPathParam}}pathParam[{{dataType}}]("{{paramName}}").description(""){{#defaultValue}}.defaultValue({{{.}}}){{/defaultValue}}{{/isPathParam}} \ No newline at end of file diff --git a/modules/openapi-generator/src/main/resources/scala-finch/queryParam.mustache b/modules/openapi-generator/src/main/resources/scala-finch/queryParam.mustache index 79af702d0f04b898a5871695a513d56615f073d4..c0dba61900b3f1239c9ca230ca49d9b80a1961cc 100644 --- a/modules/openapi-generator/src/main/resources/scala-finch/queryParam.mustache +++ b/modules/openapi-generator/src/main/resources/scala-finch/queryParam.mustache @@ -1 +1 @@ -{{#isQueryParam}}queryParam[{{dataType}}]("{{paramName}}").description(""){{^required}}.optional{{/required}}{{#defaultValue}}.defaultValue({{{defaultValue}}}){{/defaultValue}}{{/isQueryParam}} \ No newline at end of file +{{#isQueryParam}}queryParam[{{dataType}}]("{{paramName}}").description(""){{^required}}.optional{{/required}}{{#defaultValue}}.defaultValue({{{.}}}){{/defaultValue}}{{/isQueryParam}} \ No newline at end of file diff --git a/modules/openapi-generator/src/main/resources/scala-gatling/api.mustache b/modules/openapi-generator/src/main/resources/scala-gatling/api.mustache index 09ca1261324e043d8832044cf12800d2dca31f85..a95bf534502291d219b7ddf0a9187cee9b37e88c 100644 --- a/modules/openapi-generator/src/main/resources/scala-gatling/api.mustache +++ b/modules/openapi-generator/src/main/resources/scala-gatling/api.mustache @@ -89,7 +89,7 @@ class {{classname}}Simulation extends Simulation { {{#operations}} {{#operation}} - {{#description}}/* {{{description}}} */{{/description}} + {{#description}}/* {{{.}}} */{{/description}} val scn{{operationId}} = scenario("{{operationId}}Simulation") {{#vendorExtensions.x-gatling-query-feeder}} .feed({{vendorExtensions.x-gatling-query-feeder}}) diff --git a/modules/openapi-generator/src/main/resources/scala-gatling/model.mustache b/modules/openapi-generator/src/main/resources/scala-gatling/model.mustache index 22648b7549dfe83564202c6a268e51a9ce45fafb..6f183e2fb8993fd001c595b5bfa497e6577ba53f 100644 --- a/modules/openapi-generator/src/main/resources/scala-gatling/model.mustache +++ b/modules/openapi-generator/src/main/resources/scala-gatling/model.mustache @@ -9,13 +9,13 @@ package {{package}} case class {{classname}} ( {{#vars}} {{#description}} - /* {{{description}}} */ + /* {{{.}}} */ {{/description}} _{{{name}}}: {{^required}}Option[{{/required}}{{dataType}}{{^required}}]{{/required}}{{^-last}},{{/-last}} {{/vars}} ) object {{classname}} { - def toStringBody({{#vars}}var_{{name}}: {{^required}}{{/required}}Object{{^required}}{{/required}}{{^-last}}, {{/-last}}{{/vars}}) = + def toStringBody({{#vars}}var_{{name}}: Object{{^-last}}, {{/-last}}{{/vars}}) = s""" | { | {{#vars}}"{{{name}}}":$var_{{{name}}}{{^-last}},{{/-last}}{{/vars}} diff --git a/modules/openapi-generator/src/main/resources/scala-httpclient/README.mustache b/modules/openapi-generator/src/main/resources/scala-httpclient/README.mustache index 869408504d6b4ebc0f8d8e149e3548179ebce323..a78cd7e3894c479f660802da8ab7caa0cf755ff3 100644 --- a/modules/openapi-generator/src/main/resources/scala-httpclient/README.mustache +++ b/modules/openapi-generator/src/main/resources/scala-httpclient/README.mustache @@ -3,7 +3,7 @@ {{appName}} {{#appDescriptionWithNewLines}} -{{{appDescriptionWithNewLines}}} +{{{.}}} {{/appDescriptionWithNewLines}} # VERSION @@ -73,7 +73,7 @@ All URIs are relative to *{{basePath}}* Class | Method | HTTP request | Description ------------ | ------------- | ------------- | ------------- -{{#apiInfo}}{{#apis}}{{#operations}}{{#operation}}*{{classname}}* | [**{{operationId}}**]({{apiDocPath}}{{classname}}.md#{{operationId}}) | **{{httpMethod}}** {{path}} | {{#summary}}{{summary}}{{/summary}} +{{#apiInfo}}{{#apis}}{{#operations}}{{#operation}}*{{classname}}* | [**{{operationId}}**]({{apiDocPath}}{{classname}}.md#{{operationId}}) | **{{httpMethod}}** {{path}} | {{summary}} {{/operation}}{{/operations}}{{/apis}}{{/apiInfo}} ## Documentation for Models diff --git a/modules/openapi-generator/src/main/resources/scala-httpclient/api.mustache b/modules/openapi-generator/src/main/resources/scala-httpclient/api.mustache index a9651b263d9761cf474392a8e0aba72747df2399..d2a1c33604398df9bc0ee5c308e5f7eff67d9a42 100644 --- a/modules/openapi-generator/src/main/resources/scala-httpclient/api.mustache +++ b/modules/openapi-generator/src/main/resources/scala-httpclient/api.mustache @@ -71,9 +71,9 @@ class {{classname}}( * {{notes}} * {{#allParams}} * @param {{paramName}} {{description}} {{^required}}(optional{{#defaultValue}}, default to {{{.}}}{{/defaultValue}}){{/required}} -{{/allParams}} * @return {{#returnType}}{{{returnType}}}{{/returnType}}{{^returnType}}void{{/returnType}} +{{/allParams}} * @return {{{returnType}}}{{^returnType}}void{{/returnType}} */ - def {{operationId}}({{#allParams}}{{paramName}}: {{#required}}{{dataType}}{{/required}}{{^required}}Option[{{dataType}}] = None{{/required}}{{^-last}}, {{/-last}}{{/allParams}}){{#returnType}}: Option[{{returnType}}]{{/returnType}} = { + def {{operationId}}({{#allParams}}{{paramName}}: {{#required}}{{dataType}}{{/required}}{{^required}}Option[{{dataType}}] = None{{/required}}{{^-last}}, {{/-last}}{{/allParams}}){{#returnType}}: Option[{{.}}]{{/returnType}} = { val await = Try(Await.result({{operationId}}Async({{#allParams}}{{paramName}}{{^-last}}, {{/-last}}{{/allParams}}), Duration.Inf)) await match { case Success(i) => Some(await.get) @@ -86,9 +86,9 @@ class {{classname}}( * {{notes}} * {{#allParams}} * @param {{paramName}} {{description}} {{^required}}(optional{{#defaultValue}}, default to {{{.}}}{{/defaultValue}}){{/required}} -{{/allParams}} * @return Future({{#returnType}}{{{returnType}}}{{/returnType}}{{^returnType}}void{{/returnType}}) +{{/allParams}} * @return Future({{{returnType}}}{{^returnType}}void{{/returnType}}) */ - def {{operationId}}Async({{#allParams}}{{paramName}}: {{#required}}{{dataType}}{{/required}}{{^required}}Option[{{dataType}}] = None{{/required}}{{^-last}}, {{/-last}}{{/allParams}}){{#returnType}}: Future[{{returnType}}]{{/returnType}} = { + def {{operationId}}Async({{#allParams}}{{paramName}}: {{#required}}{{dataType}}{{/required}}{{^required}}Option[{{dataType}}] = None{{/required}}{{^-last}}, {{/-last}}{{/allParams}}){{#returnType}}: Future[{{.}}]{{/returnType}} = { helper.{{operationId}}({{#allParams}}{{paramName}}{{^-last}}, {{/-last}}{{/allParams}}) } @@ -100,7 +100,7 @@ class {{classname}}AsyncHelper(client: TransportClient, config: SwaggerConfig) e {{#operation}} def {{operationId}}({{#allParams}}{{^required}}{{paramName}}: Option[{{dataType}}] = None{{^-last}},{{/-last}} {{/required}}{{#required}}{{paramName}}: {{dataType}}{{^-last}}, - {{/-last}}{{/required}}{{/allParams}})(implicit reader: ClientResponseReader[{{#returnType}}{{returnType}}{{/returnType}}{{^returnType}}Unit{{/returnType}}]{{#bodyParams}}, writer: RequestWriter[{{^required}}Option[{{dataType}}]{{/required}}{{#required}}{{dataType}}{{/required}}]{{/bodyParams}}){{#returnType}}: Future[{{returnType}}]{{/returnType}}{{^returnType}}: Future[Unit]{{/returnType}} = { + {{/-last}}{{/required}}{{/allParams}})(implicit reader: ClientResponseReader[{{returnType}}{{^returnType}}Unit{{/returnType}}]{{#bodyParams}}, writer: RequestWriter[{{^required}}Option[{{dataType}}]{{/required}}{{#required}}{{dataType}}{{/required}}]{{/bodyParams}}){{#returnType}}: Future[{{.}}]{{/returnType}}{{^returnType}}: Future[Unit]{{/returnType}} = { // create path and map variables val path = (addFmt("{{path}}"){{#pathParams}} replaceAll("\\{" + "{{baseName}}" + "\\}", {{paramName}}.toString){{/pathParams}}) 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 f65046daa62abdfae5e9f7924b6a3b4dd27134a2..c4e0d84b6cb2cc03f29e5c7b400537730b7804a4 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 @@ -23,7 +23,7 @@ if(hasProperty('target') && target == 'android') { apply plugin: 'com.android.library' apply plugin: 'com.github.dcendents.android-maven' - + android { compileSdkVersion 23 buildToolsVersion '23.0.2' @@ -35,7 +35,7 @@ if(hasProperty('target') && target == 'android') { sourceCompatibility JavaVersion.VERSION_1_7 targetCompatibility JavaVersion.VERSION_1_7 } - + // Rename the aar correctly libraryVariants.all { variant -> variant.outputs.each { output -> @@ -51,7 +51,7 @@ if(hasProperty('target') && target == 'android') { provided 'javax.annotation:jsr250-api:1.0' } } - + afterEvaluate { android.libraryVariants.all { variant -> def task = project.tasks.create "jar${variant.name.capitalize()}", Jar @@ -63,12 +63,12 @@ if(hasProperty('target') && target == 'android') { artifacts.add('archives', task); } } - + task sourcesJar(type: Jar) { from android.sourceSets.main.java.srcDirs classifier = 'sources' } - + artifacts { archives sourcesJar } @@ -78,16 +78,16 @@ if(hasProperty('target') && target == 'android') { apply plugin: 'scala' apply plugin: 'java' apply plugin: 'maven' - + sourceCompatibility = JavaVersion.VERSION_1_7 targetCompatibility = JavaVersion.VERSION_1_7 - + install { repositories.mavenInstaller { pom.artifactId = '{{artifactId}}' } } - + task execute(type:JavaExec) { main = System.getProperty('mainClass') classpath = sourceSets.main.runtimeClasspath 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 71a7404a0bcb6fa4b7225163ca2c8312fce21f14..50b77bcebffe5523f77b2adc35b686da57a6c54b 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 @@ -29,4 +29,3 @@ scalacOptions := Seq( ) publishArtifact in (Compile, packageDoc) := false - diff --git a/modules/openapi-generator/src/main/resources/scala-httpclient/git_push.sh.mustache b/modules/openapi-generator/src/main/resources/scala-httpclient/git_push.sh.mustache index 8b3f689c9121a65080ad038d37a2036b01e559a1..f0bed5bd84155f05bc3cdc67af008f524efb38a6 100755 --- a/modules/openapi-generator/src/main/resources/scala-httpclient/git_push.sh.mustache +++ b/modules/openapi-generator/src/main/resources/scala-httpclient/git_push.sh.mustache @@ -55,4 +55,3 @@ 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/scala-httpclient/licenseInfo.mustache b/modules/openapi-generator/src/main/resources/scala-httpclient/licenseInfo.mustache index 9866f297a4d7e43b6e321965c75edff6e152b50a..be193d0c4fe807d927a4e2a2329b5c615954608c 100644 --- a/modules/openapi-generator/src/main/resources/scala-httpclient/licenseInfo.mustache +++ b/modules/openapi-generator/src/main/resources/scala-httpclient/licenseInfo.mustache @@ -2,8 +2,8 @@ * {{{appName}}} * {{{appDescription}}} * - * {{#version}}The version of the OpenAPI document: {{{version}}}{{/version}} - * {{#infoEmail}}Contact: {{{infoEmail}}}{{/infoEmail}} + * {{#version}}The version of the OpenAPI document: {{{.}}}{{/version}} + * {{#infoEmail}}Contact: {{{.}}}{{/infoEmail}} * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech diff --git a/modules/openapi-generator/src/main/resources/scala-httpclient/model.mustache b/modules/openapi-generator/src/main/resources/scala-httpclient/model.mustache index 69ffd3df0ee76646352e5f85519f2dc3b29e4862..811e8aeaa0675c4aa212514eaf04913f07d04388 100644 --- a/modules/openapi-generator/src/main/resources/scala-httpclient/model.mustache +++ b/modules/openapi-generator/src/main/resources/scala-httpclient/model.mustache @@ -10,7 +10,7 @@ import {{import}} case class {{classname}} ( {{#vars}} {{#description}} - // {{{description}}} + // {{{.}}} {{/description}} {{{name}}}: {{^required}}Option[{{/required}}{{dataType}}{{^required}}] = None{{/required}}{{^-last}},{{/-last}} {{/vars}} diff --git a/modules/openapi-generator/src/main/resources/scala-lagom-server/api.mustache b/modules/openapi-generator/src/main/resources/scala-lagom-server/api.mustache index a216322b750fd7fd1dd19e6dd3076d004cd27af7..7e0e0aa4f824beb43a2004fa85415b2c10301027 100644 --- a/modules/openapi-generator/src/main/resources/scala-lagom-server/api.mustache +++ b/modules/openapi-generator/src/main/resources/scala-lagom-server/api.mustache @@ -39,9 +39,9 @@ trait {{classname}} extends Service { * {{notes}} * {{#allParams}} {{^isBodyParam}} * @param {{paramName}} {{description}} {{^required}}(optional{{#defaultValue}}, default to {{{.}}}{{/defaultValue}}){{/required}}{{/isBodyParam}}{{/allParams}} - * @return {{#returnType}}{{{returnType}}}{{/returnType}}{{^returnType}}void{{/returnType}}{{#bodyParams}} Body Parameter {{description}} {{/bodyParams}} + * @return {{{returnType}}}{{^returnType}}void{{/returnType}}{{#bodyParams}} Body Parameter {{description}} {{/bodyParams}} */ - def {{operationId}}({{#queryParams}}{{^isContainer}}{{^isEnum}}{{paramName}}:{{#required}}{{dataType}}{{#defaultValue}} /* = {{{defaultValue}}}*/{{/defaultValue}}{{/required}} {{^required}} Option[{{dataType}}]{{#defaultValue}} /* = {{{defaultValue}}}*/{{/defaultValue}}{{^defaultValue}} = None{{/defaultValue}}{{/required}}{{^-last}},{{/-last}}{{/isEnum}}{{/isContainer}}{{#isEnum}}{{{paramName}}}: Option[{{classname}}{{enumName}}.{{classname}}{{enumName}}]{{/isEnum}}{{/queryParams}}{{#pathParams}}{{^isEnum}}{{paramName}}: {{#required}}{{dataType}}{{#defaultValue}} /* = {{{defaultValue}}}*/{{/defaultValue}}{{/required}}{{^required}}Option[{{dataType}}]{{#defaultValue}} /* = {{{defaultValue}}}*/{{/defaultValue}}{{^defaultValue}} = None{{/defaultValue}}{{/required}}{{^-last}}, {{/-last}}{{/isEnum}}{{#isEnum}}{{{paramName}}}: Option[{{classname}}{{enumName}}.{{classname}}{{enumName}}]{{/isEnum}}{{/pathParams}}): ServiceCall[{{#bodyParams}}{{dataType}}{{/bodyParams}}{{^hasBodyParam}}NotUsed{{/hasBodyParam}} ,{{#returnType}}{{returnType}}{{/returnType}}{{^returnType}}Done{{/returnType}}] + def {{operationId}}({{#queryParams}}{{^isContainer}}{{^isEnum}}{{paramName}}:{{#required}}{{dataType}}{{#defaultValue}} /* = {{{.}}}*/{{/defaultValue}}{{/required}} {{^required}} Option[{{dataType}}]{{#defaultValue}} /* = {{{.}}}*/{{/defaultValue}}{{^defaultValue}} = None{{/defaultValue}}{{/required}}{{^-last}},{{/-last}}{{/isEnum}}{{/isContainer}}{{#isEnum}}{{{paramName}}}: Option[{{classname}}{{enumName}}.{{classname}}{{enumName}}]{{/isEnum}}{{/queryParams}}{{#pathParams}}{{^isEnum}}{{paramName}}: {{#required}}{{dataType}}{{#defaultValue}} /* = {{{.}}}*/{{/defaultValue}}{{/required}}{{^required}}Option[{{dataType}}]{{#defaultValue}} /* = {{{.}}}*/{{/defaultValue}}{{^defaultValue}} = None{{/defaultValue}}{{/required}}{{^-last}}, {{/-last}}{{/isEnum}}{{#isEnum}}{{{paramName}}}: Option[{{classname}}{{enumName}}.{{classname}}{{enumName}}]{{/isEnum}}{{/pathParams}}): ServiceCall[{{#bodyParams}}{{dataType}}{{/bodyParams}}{{^hasBodyParam}}NotUsed{{/hasBodyParam}} ,{{returnType}}{{^returnType}}Done{{/returnType}}] {{/operation}}{{/operations}} {{#operations}} @@ -59,4 +59,3 @@ trait {{classname}} extends Service { {{/operation}} } {{/operations}} - diff --git a/modules/openapi-generator/src/main/resources/scala-lagom-server/build.sbt.mustache b/modules/openapi-generator/src/main/resources/scala-lagom-server/build.sbt.mustache index f6cede96bb3435bc86499294e10f1bb0b7b67c3a..ae8fb48f3c91c3218ce10fbf9a9b33fdd780495b 100644 --- a/modules/openapi-generator/src/main/resources/scala-lagom-server/build.sbt.mustache +++ b/modules/openapi-generator/src/main/resources/scala-lagom-server/build.sbt.mustache @@ -12,5 +12,3 @@ libraryDependencies ++= Seq( lagomScaladslApi, playJsonDerivedCodecs ) - - diff --git a/modules/openapi-generator/src/main/resources/scala-lagom-server/licenseInfo.mustache b/modules/openapi-generator/src/main/resources/scala-lagom-server/licenseInfo.mustache index 9866f297a4d7e43b6e321965c75edff6e152b50a..be193d0c4fe807d927a4e2a2329b5c615954608c 100644 --- a/modules/openapi-generator/src/main/resources/scala-lagom-server/licenseInfo.mustache +++ b/modules/openapi-generator/src/main/resources/scala-lagom-server/licenseInfo.mustache @@ -2,8 +2,8 @@ * {{{appName}}} * {{{appDescription}}} * - * {{#version}}The version of the OpenAPI document: {{{version}}}{{/version}} - * {{#infoEmail}}Contact: {{{infoEmail}}}{{/infoEmail}} + * {{#version}}The version of the OpenAPI document: {{{.}}}{{/version}} + * {{#infoEmail}}Contact: {{{.}}}{{/infoEmail}} * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech diff --git a/modules/openapi-generator/src/main/resources/scala-lagom-server/model.mustache b/modules/openapi-generator/src/main/resources/scala-lagom-server/model.mustache index 1d4a3e2e30e8f168cbb487684f4c770bd5170b2e..36afd6735ebb7d22cf59492c083edfb37d6059b7 100644 --- a/modules/openapi-generator/src/main/resources/scala-lagom-server/model.mustache +++ b/modules/openapi-generator/src/main/resources/scala-lagom-server/model.mustache @@ -14,7 +14,7 @@ case class {{classname}} ( {{/isEnum}} {{^isEnum}} {{#description}} - /* {{{description}}} */ + /* {{{.}}} */ {{/description}} {{{name}}}: {{^required}}Option[{{/required}}{{dataType}}{{^required}}]{{/required}}{{^-last}},{{/-last}} {{/isEnum}} diff --git a/modules/openapi-generator/src/main/resources/scala-play-server/app/apiTrait.scala.mustache b/modules/openapi-generator/src/main/resources/scala-play-server/app/apiTrait.scala.mustache index 5b369aaa960c2d4766376634be75da02e681b267..de5b9e1e2a2d27b6eeb6979607aaa6c938036641 100644 --- a/modules/openapi-generator/src/main/resources/scala-play-server/app/apiTrait.scala.mustache +++ b/modules/openapi-generator/src/main/resources/scala-play-server/app/apiTrait.scala.mustache @@ -14,10 +14,10 @@ trait {{classname}} { {{#operation}} /** {{#summary}} - * {{summary}} + * {{.}} {{/summary}} {{#notes}} - * {{notes}} + * {{.}} {{/notes}} {{#allParams}} {{#description}} diff --git a/modules/openapi-generator/src/main/resources/scala-play-server/returnTypeOrUnit.mustache b/modules/openapi-generator/src/main/resources/scala-play-server/returnTypeOrUnit.mustache index d7a19289a4e42b49817a83899c57d2e56204ed8e..945ae1c33cdfa520cd1fe19ec76cd6c5519b6242 100644 --- a/modules/openapi-generator/src/main/resources/scala-play-server/returnTypeOrUnit.mustache +++ b/modules/openapi-generator/src/main/resources/scala-play-server/returnTypeOrUnit.mustache @@ -1 +1 @@ -{{#supportAsync}}Future[{{/supportAsync}}{{^returnType}}Unit{{/returnType}}{{#returnType}}{{returnType}}{{/returnType}}{{#supportAsync}}]{{/supportAsync}} \ No newline at end of file +{{#supportAsync}}Future[{{/supportAsync}}{{returnType}}{{^returnType}}Unit{{/returnType}}{{#supportAsync}}]{{/supportAsync}} \ No newline at end of file diff --git a/modules/openapi-generator/src/main/resources/scala-sttp/README.mustache b/modules/openapi-generator/src/main/resources/scala-sttp/README.mustache index e602fbda717b8b3d710b1c3123a1544237714682..485b707dfd3027f76b9897340f1f6c25e9d61ad1 100644 --- a/modules/openapi-generator/src/main/resources/scala-sttp/README.mustache +++ b/modules/openapi-generator/src/main/resources/scala-sttp/README.mustache @@ -6,7 +6,7 @@ - Build date: {{generatedDate}} {{/hideGenerationTimestamp}} -{{#appDescriptionWithNewLines}}{{{appDescriptionWithNewLines}}}{{/appDescriptionWithNewLines}} +{{{appDescriptionWithNewLines}}} {{#infoUrl}} For more information, please visit [{{{infoUrl}}}]({{{infoUrl}}}) @@ -71,7 +71,7 @@ All URIs are relative to *{{basePath}}* Class | Method | HTTP request | Description ------------ | ------------- | ------------- | ------------- -{{#apiInfo}}{{#apis}}{{#operations}}{{#operation}}*{{classname}}* | **{{operationId}}** | **{{httpMethod}}** {{path}} | {{#summary}}{{summary}}{{/summary}} +{{#apiInfo}}{{#apis}}{{#operations}}{{#operation}}*{{classname}}* | **{{operationId}}** | **{{httpMethod}}** {{path}} | {{summary}} {{/operation}}{{/operations}}{{/apis}}{{/apiInfo}} ## Documentation for Models diff --git a/modules/openapi-generator/src/main/resources/scala-sttp/javadoc.mustache b/modules/openapi-generator/src/main/resources/scala-sttp/javadoc.mustache index e42fa1dcdcd7f83a66b295e3f588569edcdefc02..6acaca14ac3a2dc9fb2841218b8cc3bee640b625 100644 --- a/modules/openapi-generator/src/main/resources/scala-sttp/javadoc.mustache +++ b/modules/openapi-generator/src/main/resources/scala-sttp/javadoc.mustache @@ -1,10 +1,10 @@ {{#notes}} -{{{notes}}} +{{{.}}} {{/notes}} Expected answers: {{#responses}} - code {{code}} : {{{dataType}}} {{#message}}({{{message}}}){{/message}} + code {{code}} : {{{dataType}}} {{#message}}({{{.}}}){{/message}} {{#headers}} {{#-first}} Headers : diff --git a/modules/openapi-generator/src/main/resources/scala-sttp/licenseInfo.mustache b/modules/openapi-generator/src/main/resources/scala-sttp/licenseInfo.mustache index 835764cfc729d721063604e603a10808335e97c8..16ba21d203d0eeb4aaad31474c615056cc169d3f 100644 --- a/modules/openapi-generator/src/main/resources/scala-sttp/licenseInfo.mustache +++ b/modules/openapi-generator/src/main/resources/scala-sttp/licenseInfo.mustache @@ -2,8 +2,8 @@ * {{{appName}}} * {{{appDescription}}} * - * {{#version}}The version of the OpenAPI document: {{{version}}}{{/version}} - * {{#infoEmail}}Contact: {{{infoEmail}}}{{/infoEmail}} + * {{#version}}The version of the OpenAPI document: {{{.}}}{{/version}} + * {{#infoEmail}}Contact: {{{.}}}{{/infoEmail}} * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech diff --git a/modules/openapi-generator/src/main/resources/scala-sttp/model.mustache b/modules/openapi-generator/src/main/resources/scala-sttp/model.mustache index c9beca1e968faf74a67b387c1797ba147c2518ef..78e6f238203f2a229fcdc2a02b2b62a91346b0e1 100644 --- a/modules/openapi-generator/src/main/resources/scala-sttp/model.mustache +++ b/modules/openapi-generator/src/main/resources/scala-sttp/model.mustache @@ -10,7 +10,7 @@ import {{import}} {{#description}} {{#javadocRenderer}} {{#title}} -{{{title}}} +{{{.}}} {{/title}} {{{description}}} {{/javadocRenderer}} @@ -19,7 +19,7 @@ import {{import}} case class {{classname}}( {{#vars}} {{#description}} - /* {{{description}}} */ + /* {{{.}}} */ {{/description}} {{{name}}}: {{^required}}Option[{{/required}}{{^isEnum}}{{dataType}}{{/isEnum}}{{#isEnum}}{{classname}}Enums.{{datatypeWithEnum}}{{/isEnum}}{{^required}}] = None{{/required}}{{^-last}},{{/-last}} {{/vars}} @@ -58,4 +58,3 @@ object {{classname}}Enums { {{/hasEnums}} {{/model}} {{/models}} - diff --git a/modules/openapi-generator/src/main/resources/scala-sttp/operationReturnType.mustache b/modules/openapi-generator/src/main/resources/scala-sttp/operationReturnType.mustache index a8917911853a2107a0bcb49c6d8e135c6f910170..170935cad6398d7fdeb8539cce94e07303e9f8c9 100644 --- a/modules/openapi-generator/src/main/resources/scala-sttp/operationReturnType.mustache +++ b/modules/openapi-generator/src/main/resources/scala-sttp/operationReturnType.mustache @@ -1 +1 @@ -{{#returnType}}{{{returnType}}}{{/returnType}}{{^returnType}}Unit{{/returnType}} \ No newline at end of file +{{{returnType}}}{{^returnType}}Unit{{/returnType}} \ No newline at end of file diff --git a/modules/openapi-generator/src/main/resources/scalatra/api.mustache b/modules/openapi-generator/src/main/resources/scalatra/api.mustache index 99cee2491341352a00e93e0015b2336883d48a8b..9a89e30c1a229f5abddc0e852f3871c7f185c544 100644 --- a/modules/openapi-generator/src/main/resources/scalatra/api.mustache +++ b/modules/openapi-generator/src/main/resources/scalatra/api.mustache @@ -32,7 +32,7 @@ class {{classname}}(implicit val swagger: Swagger) extends ScalatraServlet {{#operation}} {{newline}} - val {{operationId}}Operation = (apiOperation[{{#returnType}}{{{returnType}}}{{/returnType}}{{^returnType}}Unit{{/returnType}}]("{{operationId}}") + val {{operationId}}Operation = (apiOperation[{{{returnType}}}{{^returnType}}Unit{{/returnType}}]("{{operationId}}") summary "{{{summary}}}" parameters({{#allParams}}{{>queryParam}}{{>pathParam}}{{>bodyParam}}{{>formParam}}{{>headerParam}}{{^-last}}, {{/-last}}{{/allParams}}) ) diff --git a/modules/openapi-generator/src/main/resources/scalatra/bodyParam.mustache b/modules/openapi-generator/src/main/resources/scalatra/bodyParam.mustache index 07a90aa23cbca11757d669ddcd9623e02dfe3186..173fb1bdcedc5e8fbfc7d172d9e271b0be5e7046 100644 --- a/modules/openapi-generator/src/main/resources/scalatra/bodyParam.mustache +++ b/modules/openapi-generator/src/main/resources/scalatra/bodyParam.mustache @@ -1 +1 @@ -{{#isBodyParam}}bodyParam[{{dataType}}]("{{paramName}}").description(""){{^required}}.optional{{/required}}{{#defaultValue}}.defaultValue({{{defaultValue}}}){{/defaultValue}}{{/isBodyParam}} \ No newline at end of file +{{#isBodyParam}}bodyParam[{{dataType}}]("{{paramName}}").description(""){{^required}}.optional{{/required}}{{#defaultValue}}.defaultValue({{{.}}}){{/defaultValue}}{{/isBodyParam}} \ No newline at end of file diff --git a/modules/openapi-generator/src/main/resources/scalatra/formParam.mustache b/modules/openapi-generator/src/main/resources/scalatra/formParam.mustache index 1afcf12ccc6aa4dcf1faa61d4597e9f2eea73f79..f7394333bbca33f95a591ab3f09618ef6d618d5b 100644 --- a/modules/openapi-generator/src/main/resources/scalatra/formParam.mustache +++ b/modules/openapi-generator/src/main/resources/scalatra/formParam.mustache @@ -1 +1 @@ -{{#isFormParam}}formParam[{{dataType}}]("{{paramName}}").description(""){{^required}}.optional{{/required}}{{#defaultValue}}.defaultValue({{{defaultValue}}}){{/defaultValue}}{{/isFormParam}} \ No newline at end of file +{{#isFormParam}}formParam[{{dataType}}]("{{paramName}}").description(""){{^required}}.optional{{/required}}{{#defaultValue}}.defaultValue({{{.}}}){{/defaultValue}}{{/isFormParam}} \ No newline at end of file diff --git a/modules/openapi-generator/src/main/resources/scalatra/headerParam.mustache b/modules/openapi-generator/src/main/resources/scalatra/headerParam.mustache index 798bb0fe6d5d7c9bfe333010829591364854a06e..43e76d45d85100737817d4b964752c5a0ad0b5cf 100644 --- a/modules/openapi-generator/src/main/resources/scalatra/headerParam.mustache +++ b/modules/openapi-generator/src/main/resources/scalatra/headerParam.mustache @@ -1 +1 @@ -{{#isHeaderParam}}headerParam[{{dataType}}]("{{paramName}}").description(""){{^required}}.optional{{/required}}{{#defaultValue}}.defaultValue({{{defaultValue}}}){{/defaultValue}}{{/isHeaderParam}} \ No newline at end of file +{{#isHeaderParam}}headerParam[{{dataType}}]("{{paramName}}").description(""){{^required}}.optional{{/required}}{{#defaultValue}}.defaultValue({{{.}}}){{/defaultValue}}{{/isHeaderParam}} \ No newline at end of file diff --git a/modules/openapi-generator/src/main/resources/scalatra/licenseInfo.mustache b/modules/openapi-generator/src/main/resources/scalatra/licenseInfo.mustache index 254d4750debbd9235fed79e1a72317de6e989aae..fdd7819af11bb074da6edcd06755464092c25e80 100644 --- a/modules/openapi-generator/src/main/resources/scalatra/licenseInfo.mustache +++ b/modules/openapi-generator/src/main/resources/scalatra/licenseInfo.mustache @@ -2,8 +2,8 @@ * {{{appName}}} * {{{appDescription}}} * - * {{#version}}The version of the OpenAPI document: {{{version}}}{{/version}} - * {{#infoEmail}}Contact: {{{infoEmail}}}{{/infoEmail}} + * {{#version}}The version of the OpenAPI document: {{{.}}}{{/version}} + * {{#infoEmail}}Contact: {{{.}}}{{/infoEmail}} * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech diff --git a/modules/openapi-generator/src/main/resources/scalatra/model.mustache b/modules/openapi-generator/src/main/resources/scalatra/model.mustache index 18d36b2cc3427ea70adf617f977ce46666d0ebc7..ddaef833ec778e3d359246d96e117412e1b66fda 100644 --- a/modules/openapi-generator/src/main/resources/scalatra/model.mustache +++ b/modules/openapi-generator/src/main/resources/scalatra/model.mustache @@ -8,7 +8,7 @@ package {{package}} case class {{classname}}( {{#vars}} {{#description}} - /* {{{description}}} */ + /* {{{.}}} */ {{/description}} {{name}}: {{^required}}Option[{{/required}}{{dataType}}{{^required}}]{{/required}}{{^-last}},{{/-last}} diff --git a/modules/openapi-generator/src/main/resources/scalatra/pathParam.mustache b/modules/openapi-generator/src/main/resources/scalatra/pathParam.mustache index ae72aa8ec74fe8120e9106b4dfd5bc0d6d711695..58c58af06c48d3df57b46f9f3386dd04331d55ce 100644 --- a/modules/openapi-generator/src/main/resources/scalatra/pathParam.mustache +++ b/modules/openapi-generator/src/main/resources/scalatra/pathParam.mustache @@ -1 +1 @@ -{{#isPathParam}}pathParam[{{dataType}}]("{{paramName}}").description(""){{#defaultValue}}.defaultValue({{{defaultValue}}}){{/defaultValue}}{{/isPathParam}} \ No newline at end of file +{{#isPathParam}}pathParam[{{dataType}}]("{{paramName}}").description(""){{#defaultValue}}.defaultValue({{{.}}}){{/defaultValue}}{{/isPathParam}} \ No newline at end of file diff --git a/modules/openapi-generator/src/main/resources/scalatra/queryParam.mustache b/modules/openapi-generator/src/main/resources/scalatra/queryParam.mustache index 79af702d0f04b898a5871695a513d56615f073d4..c0dba61900b3f1239c9ca230ca49d9b80a1961cc 100644 --- a/modules/openapi-generator/src/main/resources/scalatra/queryParam.mustache +++ b/modules/openapi-generator/src/main/resources/scalatra/queryParam.mustache @@ -1 +1 @@ -{{#isQueryParam}}queryParam[{{dataType}}]("{{paramName}}").description(""){{^required}}.optional{{/required}}{{#defaultValue}}.defaultValue({{{defaultValue}}}){{/defaultValue}}{{/isQueryParam}} \ No newline at end of file +{{#isQueryParam}}queryParam[{{dataType}}]("{{paramName}}").description(""){{^required}}.optional{{/required}}{{#defaultValue}}.defaultValue({{{.}}}){{/defaultValue}}{{/isQueryParam}} \ No newline at end of file diff --git a/modules/openapi-generator/src/main/resources/scalaz/api.mustache b/modules/openapi-generator/src/main/resources/scalaz/api.mustache index f5970073f3f052603bc12342dab7b718998623a3..a6c01c9093419734b4738fa6a43b2144e9f0c914 100644 --- a/modules/openapi-generator/src/main/resources/scalaz/api.mustache +++ b/modules/openapi-generator/src/main/resources/scalaz/api.mustache @@ -32,11 +32,11 @@ object {{classname}} { def escape(value: String): String = URLEncoder.encode(value, "utf-8").replaceAll("\\+", "%20") {{#operation}} - def {{nickname}}(host: String{{#allParams}}{{#-first}}, {{/-first}}{{paramName}}: {{dataType}}{{#defaultValue}} = {{{defaultValue}}}{{/defaultValue}}{{^-last}}, {{/-last}}{{/allParams}}){{#queryParams}}{{#-first}}(implicit {{/-first}}{{paramName}}Query: QueryParam[{{dataType}}]{{^-last}}, {{/-last}}{{#-last}}){{/-last}}{{/queryParams}}: {{>operationReturnType}}{{#returnType}} implicit val returnTypeDecoder: EntityDecoder[{{returnType}}] = jsonOf[{{returnType}}] + def {{nickname}}(host: String{{#allParams}}{{#-first}}, {{/-first}}{{paramName}}: {{dataType}}{{#defaultValue}} = {{{.}}}{{/defaultValue}}{{^-last}}, {{/-last}}{{/allParams}}){{#queryParams}}{{#-first}}(implicit {{/-first}}{{paramName}}Query: QueryParam[{{dataType}}]{{^-last}}, {{/-last}}{{#-last}}){{/-last}}{{/queryParams}}: {{>operationReturnType}}{{#returnType}} implicit val returnTypeDecoder: EntityDecoder[{{returnType}}] = jsonOf[{{returnType}}] {{/returnType}} val path = "{{path}}"{{#pathParams}}.replaceAll("\\{" + "{{baseName}}" + "\\}",escape({{paramName}}.toString)){{/pathParams}} - + val httpMethod = Method.{{httpMethod}} val contentType = `Content-Type`(MediaType.`application/json`) val headers = Headers( @@ -51,7 +51,7 @@ object {{classname}} { {{>clientFunction}} } yield resp } - + {{/operation}} } @@ -61,11 +61,11 @@ class HttpService{{classname}}(service: HttpService) { def escape(value: String): String = URLEncoder.encode(value, "utf-8").replaceAll("\\+", "%20") {{#operation}} - def {{nickname}}({{#allParams}}{{paramName}}: {{dataType}}{{#defaultValue}} = {{{defaultValue}}}{{/defaultValue}}{{^-last}}, {{/-last}}{{/allParams}}){{#queryParams}}{{#-first}}(implicit {{/-first}}{{paramName}}Query: QueryParam[{{dataType}}]{{^-last}}, {{/-last}}{{#-last}}){{/-last}}{{/queryParams}}: {{>operationReturnType}}{{#returnType}} implicit val returnTypeDecoder: EntityDecoder[{{returnType}}] = jsonOf[{{returnType}}] + def {{nickname}}({{#allParams}}{{paramName}}: {{dataType}}{{#defaultValue}} = {{{.}}}{{/defaultValue}}{{^-last}}, {{/-last}}{{/allParams}}){{#queryParams}}{{#-first}}(implicit {{/-first}}{{paramName}}Query: QueryParam[{{dataType}}]{{^-last}}, {{/-last}}{{#-last}}){{/-last}}{{/queryParams}}: {{>operationReturnType}}{{#returnType}} implicit val returnTypeDecoder: EntityDecoder[{{returnType}}] = jsonOf[{{returnType}}] {{/returnType}} val path = "{{path}}"{{#pathParams}}.replaceAll("\\{" + "{{baseName}}" + "\\}",escape({{paramName}}.toString)){{/pathParams}} - + val httpMethod = Method.{{httpMethod}} val contentType = `Content-Type`(MediaType.`application/json`) val headers = Headers( @@ -80,7 +80,7 @@ class HttpService{{classname}}(service: HttpService) { {{>clientFunction}} } yield resp } - + {{/operation}} } {{/operations}} diff --git a/modules/openapi-generator/src/main/resources/scalaz/clientFunction.mustache b/modules/openapi-generator/src/main/resources/scalaz/clientFunction.mustache index bd7c75b38d97d01b26340df820dd5421faea85a6..facb1b854994e99a21ee190aafa8db7243f55bf4 100644 --- a/modules/openapi-generator/src/main/resources/scalaz/clientFunction.mustache +++ b/modules/openapi-generator/src/main/resources/scalaz/clientFunction.mustache @@ -1 +1 @@ -{{#returnType}}resp <- client.expect[{{returnType}}](req){{/returnType}}{{^returnType}}resp <- client.fetch[Unit](req)(_ => Task.now(())){{/returnType}} +{{#returnType}}resp <- client.expect[{{.}}](req){{/returnType}}{{^returnType}}resp <- client.fetch[Unit](req)(_ => Task.now(())){{/returnType}} diff --git a/modules/openapi-generator/src/main/resources/scalaz/model.mustache b/modules/openapi-generator/src/main/resources/scalaz/model.mustache index 12594fb2e9df5267048301f02f3c2a4a0e6f753f..4855ac56dc03c90128340b47fd88ef538852ce7a 100644 --- a/modules/openapi-generator/src/main/resources/scalaz/model.mustache +++ b/modules/openapi-generator/src/main/resources/scalaz/model.mustache @@ -16,7 +16,7 @@ import org.joda.time.DateTime import {{classname}}._ case class {{classname}} ( - {{#vars}}{{#description}}/* {{{description}}} */ + {{#vars}}{{#description}}/* {{{.}}} */ {{/description}}{{name}}: {{^required}}Option[{{/required}}{{^isEnum}}{{dataType}}{{/isEnum}}{{#isEnum}}{{datatypeWithEnum}}{{/isEnum}}{{^required}}]{{/required}}{{^-last}},{{/-last}}{{#-last}}){{/-last}} {{/vars}} diff --git a/modules/openapi-generator/src/main/resources/scalaz/operationReturnType.mustache b/modules/openapi-generator/src/main/resources/scalaz/operationReturnType.mustache index f224ea59ad0711f17fdbc49bc4638abbfe3dba55..23b70d81775514ede94ee8e1c1ada5473858ce7c 100644 --- a/modules/openapi-generator/src/main/resources/scalaz/operationReturnType.mustache +++ b/modules/openapi-generator/src/main/resources/scalaz/operationReturnType.mustache @@ -1 +1 @@ -Task[{{#returnType}}{{returnType}}{{/returnType}}{{^returnType}}Unit{{/returnType}}] = { +Task[{{returnType}}{{^returnType}}Unit{{/returnType}}] = { diff --git a/modules/openapi-generator/src/main/resources/swift4/APIHelper.mustache b/modules/openapi-generator/src/main/resources/swift4/APIHelper.mustache index 368722c9fe9b47679cd99dc1e01fa53a1fc86f35..8cf57841b7d2014e0f7fc0084bb4a60a825c6f8e 100644 --- a/modules/openapi-generator/src/main/resources/swift4/APIHelper.mustache +++ b/modules/openapi-generator/src/main/resources/swift4/APIHelper.mustache @@ -68,4 +68,3 @@ import Foundation return destination } } - diff --git a/modules/openapi-generator/src/main/resources/swift4/Configuration.mustache b/modules/openapi-generator/src/main/resources/swift4/Configuration.mustache index 92a05e46c67cef605836dfa9eb3c2910fa26fa8b..84e92d2feedf4b6a6eab81df554498e15b8afbbd 100644 --- a/modules/openapi-generator/src/main/resources/swift4/Configuration.mustache +++ b/modules/openapi-generator/src/main/resources/swift4/Configuration.mustache @@ -7,9 +7,9 @@ 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. + + // 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. {{#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/swift4/JSONEncodingHelper.mustache b/modules/openapi-generator/src/main/resources/swift4/JSONEncodingHelper.mustache index 4e7492a71e1d8e14c3d949809d0aa8aaebd5448b..9ba6d2ae1f52c6f073edfe4a2d8d6cf28781068b 100644 --- a/modules/openapi-generator/src/main/resources/swift4/JSONEncodingHelper.mustache +++ b/modules/openapi-generator/src/main/resources/swift4/JSONEncodingHelper.mustache @@ -39,5 +39,5 @@ import Alamofire return params } - + } diff --git a/modules/openapi-generator/src/main/resources/swift4/Podspec.mustache b/modules/openapi-generator/src/main/resources/swift4/Podspec.mustache index e7377c7a22f3a8eeb35ca0530e9b4ed773c113b2..2a9dd2703d32aef38ca442dce6c0693448930ef0 100644 --- a/modules/openapi-generator/src/main/resources/swift4/Podspec.mustache +++ b/modules/openapi-generator/src/main/resources/swift4/Podspec.mustache @@ -1,31 +1,31 @@ Pod::Spec.new do |s| s.name = '{{projectName}}'{{#projectDescription}} - s.summary = '{{projectDescription}}'{{/projectDescription}} + s.summary = '{{.}}'{{/projectDescription}} s.ios.deployment_target = '9.0' s.osx.deployment_target = '10.11' s.tvos.deployment_target = '9.0' - s.version = '{{#podVersion}}{{podVersion}}{{/podVersion}}{{^podVersion}}{{#apiInfo}}{{version}}{{/apiInfo}}{{^apiInfo}}}0.0.1{{/apiInfo}}{{/podVersion}}' + s.version = '{{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}}' + s.authors = '{{.}}' {{/podAuthors}} {{#podSocialMediaURL}} - s.social_media_url = '{{podSocialMediaURL}}' + s.social_media_url = '{{.}}' {{/podSocialMediaURL}} {{#podDocsetURL}} - s.docset_url = '{{podDocsetURL}}' + s.docset_url = '{{.}}' {{/podDocsetURL}} 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}}' + s.description = '{{.}}' {{/podDescription}} {{#podScreenshots}} s.screenshots = {{& podScreenshots}} {{/podScreenshots}} {{#podDocumentationURL}} - s.documentation_url = '{{podDocumentationURL}}' + s.documentation_url = '{{.}}' {{/podDocumentationURL}} s.source_files = '{{projectName}}/Classes/**/*.swift' {{#usePromiseKit}} diff --git a/modules/openapi-generator/src/main/resources/swift4/README.mustache b/modules/openapi-generator/src/main/resources/swift4/README.mustache index d0b6495cb25d0a63be34e8fb910045ef0b886921..95f4a63ff294efbd4ebf8608d739c3d69a2cc073 100644 --- a/modules/openapi-generator/src/main/resources/swift4/README.mustache +++ b/modules/openapi-generator/src/main/resources/swift4/README.mustache @@ -1,7 +1,7 @@ # Swift4 API client for {{{projectName}}} {{#appDescriptionWithNewLines}} -{{{appDescriptionWithNewLines}}} +{{{.}}} {{/appDescriptionWithNewLines}} ## Overview @@ -33,7 +33,7 @@ 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}} +{{#apiInfo}}{{#apis}}{{#operations}}{{#operation}}*{{classname}}* | [**{{operationId}}**]({{apiDocPath}}{{classname}}.md#{{operationIdLowerCase}}) | **{{httpMethod}}** {{path}} | {{summary}} {{/operation}}{{/operations}}{{/apis}}{{/apiInfo}} ## Documentation For Models diff --git a/modules/openapi-generator/src/main/resources/swift4/XcodeGen.mustache b/modules/openapi-generator/src/main/resources/swift4/XcodeGen.mustache index 9e447e49a644ae16e239a148f86a7db8c95f1098..596193cf856b5a2fdd03438eb6cf9f498328a449 100644 --- a/modules/openapi-generator/src/main/resources/swift4/XcodeGen.mustache +++ b/modules/openapi-generator/src/main/resources/swift4/XcodeGen.mustache @@ -7,7 +7,7 @@ targets: sources: [{{projectName}}] info: path: ./Info.plist - version: {{#podVersion}}{{podVersion}}{{/podVersion}}{{^podVersion}}{{#apiInfo}}{{version}}{{/apiInfo}}{{^apiInfo}}}0.0.1{{/apiInfo}}{{/podVersion}} + version: {{podVersion}}{{^podVersion}}{{#apiInfo}}{{version}}{{/apiInfo}}{{^apiInfo}}}0.0.1{{/apiInfo}}{{/podVersion}} settings: APPLICATION_EXTENSION_API_ONLY: true scheme: {} diff --git a/modules/openapi-generator/src/main/resources/swift4/api.mustache b/modules/openapi-generator/src/main/resources/swift4/api.mustache index 018a092494f658bd5ba46506a47343a4ddcc26b8..99c79f9bd579932a1743f9c3e52bf6d070823237 100644 --- a/modules/openapi-generator/src/main/resources/swift4/api.mustache +++ b/modules/openapi-generator/src/main/resources/swift4/api.mustache @@ -14,7 +14,7 @@ extension {{projectName}}API { {{/swiftUseApiNamespace}} {{#description}} -/** {{description}} */{{/description}} +/** {{.}} */{{/description}} {{#objcCompatible}}@objc {{/objcCompatible}}{{#nonPublicApi}}internal{{/nonPublicApi}}{{^nonPublicApi}}open{{/nonPublicApi}} class {{classname}}{{#objcCompatible}} : NSObject{{/objcCompatible}} { {{#operation}} {{#allParams}} @@ -36,12 +36,12 @@ extension {{projectName}}API { {{^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 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}}{{^-last}}, {{/-last}}{{/allParams}}{{#hasParams}}, {{/hasParams}}completion: @escaping ((_ data: {{#returnType}}{{{returnType}}}{{/returnType}}{{^returnType}}Void{{/returnType}}?,_ error: Error?) -> Void)) { + {{#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}}{{^-last}}, {{/-last}}{{/allParams}}{{#hasParams}}, {{/hasParams}}completion: @escaping ((_ data: {{{returnType}}}{{^returnType}}Void{{/returnType}}?,_ error: Error?) -> Void)) { {{operationId}}WithRequestBuilder({{#allParams}}{{paramName}}: {{paramName}}{{^-last}}, {{/-last}}{{/allParams}}).execute { (response, error) -> Void in {{#returnType}} completion(response?.body, error) @@ -60,13 +60,13 @@ extension {{projectName}}API { {{#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}} - - returns: Promise<{{#returnType}}{{{returnType}}}{{/returnType}}{{^returnType}}Void{{/returnType}}> + - returns: Promise<{{{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}}{{^-last}}, {{/-last}}{{/allParams}}) -> Promise<{{#returnType}}{{{returnType}}}{{/returnType}}{{^returnType}}Void{{/returnType}}> { - let deferred = Promise<{{#returnType}}{{{returnType}}}{{/returnType}}{{^returnType}}Void{{/returnType}}>.pending() + {{#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}}{{^-last}}, {{/-last}}{{/allParams}}) -> Promise<{{{returnType}}}{{^returnType}}Void{{/returnType}}> { + let deferred = Promise<{{{returnType}}}{{^returnType}}Void{{/returnType}}>.pending() {{operationId}}WithRequestBuilder({{#allParams}}{{paramName}}: {{paramName}}{{^-last}}, {{/-last}}{{/allParams}}).execute { (response, error) -> Void in if let error = error { deferred.resolver.reject(error) @@ -88,12 +88,12 @@ extension {{projectName}}API { {{#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}} - - returns: Observable<{{#returnType}}{{{returnType}}}{{/returnType}}{{^returnType}}Void{{/returnType}}> + - returns: Observable<{{{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}}{{^-last}}, {{/-last}}{{/allParams}}) -> 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}}{{^-last}}, {{/-last}}{{/allParams}}) -> Observable<{{{returnType}}}{{^returnType}}Void{{/returnType}}> { return Observable.create { observer -> Disposable in {{operationId}}WithRequestBuilder({{#allParams}}{{paramName}}: {{paramName}}{{^-last}}, {{/-last}}{{/allParams}}).execute { (response, error) -> Void in if let error = error { @@ -118,12 +118,12 @@ extension {{projectName}}API { {{#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 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}}{{^-last}}, {{/-last}}{{/allParams}}{{#hasParams}}, {{/hasParams}}completion: @escaping ((_ result: Result<{{#returnType}}{{{returnType}}}{{/returnType}}{{^returnType}}Void{{/returnType}}, Error>) -> Void)) { + open class func {{operationId}}({{#allParams}}{{paramName}}: {{#isEnum}}{{#isContainer}}{{{dataType}}}{{/isContainer}}{{^isContainer}}{{{datatypeWithEnum}}}_{{operationId}}{{/isContainer}}{{/isEnum}}{{^isEnum}}{{{dataType}}}{{/isEnum}}{{^required}}? = nil{{/required}}{{^-last}}, {{/-last}}{{/allParams}}{{#hasParams}}, {{/hasParams}}completion: @escaping ((_ result: Result<{{{returnType}}}{{^returnType}}Void{{/returnType}}, Error>) -> Void)) { {{operationId}}WithRequestBuilder({{#allParams}}{{paramName}}: {{paramName}}{{^-last}}, {{/-last}}{{/allParams}}).execute { (response, error) -> Void in if let error = error { completion(.failure(error)) @@ -145,12 +145,12 @@ extension {{projectName}}API { /** {{#summary}} - {{{summary}}} + {{{.}}} {{/summary}} - {{httpMethod}} {{{path}}}{{#notes}} - - {{{notes}}}{{/notes}}{{#subresourceOperation}} - - subresourceOperation: {{subresourceOperation}}{{/subresourceOperation}}{{#defaultResponse}} - - defaultResponse: {{defaultResponse}}{{/defaultResponse}} + - {{{.}}}{{/notes}}{{#subresourceOperation}} + - subresourceOperation: {{.}}{{/subresourceOperation}}{{#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}} @@ -160,14 +160,14 @@ extension {{projectName}}API { - responseHeaders: [{{#responseHeaders}}{{{baseName}}}({{{dataType}}}){{^-last}}, {{/-last}}{{/responseHeaders}}] {{/hasResponseHeaders}} {{#externalDocs}} - - 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}} + - returns: RequestBuilder<{{{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}}{{^-last}}, {{/-last}}{{/allParams}}) -> RequestBuilder<{{#returnType}}{{{returnType}}}{{/returnType}}{{^returnType}}Void{{/returnType}}> { + {{#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}}{{^-last}}, {{/-last}}{{/allParams}}) -> RequestBuilder<{{{returnType}}}{{^returnType}}Void{{/returnType}}> { {{^pathParams}}let{{/pathParams}}{{#pathParams}}{{#-first}}var{{/-first}}{{/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) ?? "" @@ -203,7 +203,7 @@ extension {{projectName}}API { ] let headerParameters = APIHelper.rejectNilHeaders(nillableHeaders){{/-last}}{{/headerParams}} - let requestBuilder: RequestBuilder<{{#returnType}}{{{returnType}}}{{/returnType}}{{^returnType}}Void{{/returnType}}>.Type = {{projectName}}API.requestBuilderFactory.{{#returnType}}getBuilder(){{/returnType}}{{^returnType}}getNonDecodableBuilder(){{/returnType}} + let requestBuilder: RequestBuilder<{{{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}}{{#-first}}, headers: headerParameters{{/-first}}{{/headerParams}}) } diff --git a/modules/openapi-generator/src/main/resources/swift4/api_doc.mustache b/modules/openapi-generator/src/main/resources/swift4/api_doc.mustache index f57a93153c664ca1e11db388b5ddf75f8b82e5b0..c634111c699c465f09485ac33911ef0e93de5ae8 100644 --- a/modules/openapi-generator/src/main/resources/swift4/api_doc.mustache +++ b/modules/openapi-generator/src/main/resources/swift4/api_doc.mustache @@ -1,11 +1,11 @@ # {{classname}}{{#description}} -{{description}}{{/description}} +{{.}}{{/description}} All URIs are relative to *{{{basePath}}}* Method | HTTP request | Description ------------- | ------------- | ------------- -{{#operations}}{{#operation}}[**{{operationId}}**]({{classname}}.md#{{operationIdLowerCase}}) | **{{httpMethod}}** {{path}} | {{#summary}}{{summary}}{{/summary}} +{{#operations}}{{#operation}}[**{{operationId}}**]({{classname}}.md#{{operationIdLowerCase}}) | **{{httpMethod}}** {{path}} | {{summary}} {{/operation}}{{/operations}} {{#operations}} @@ -14,22 +14,22 @@ Method | HTTP request | Description ```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}}{{^-last}}, {{/-last}}{{/allParams}}{{#hasParams}}, {{/hasParams}}completion: @escaping (_ data: {{#returnType}}{{{returnType}}}{{/returnType}}{{^returnType}}Void{{/returnType}}?, _ error: Error?) -> Void) + {{#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}}{{^-last}}, {{/-last}}{{/allParams}}{{#hasParams}}, {{/hasParams}}completion: @escaping (_ data: {{{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}}{{^-last}}, {{/-last}}{{/allParams}}) -> 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}}{{^-last}}, {{/-last}}{{/allParams}}) -> Promise<{{{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}}{{^-last}}, {{/-last}}{{/allParams}}) -> 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}}{{^-last}}, {{/-last}}{{/allParams}}) -> Observable<{{{returnType}}}{{^returnType}}Void{{/returnType}}> {{/useRxSwift}} ``` {{{summary}}}{{#notes}} -{{{notes}}}{{/notes}} +{{{.}}}{{/notes}} -### Example +### 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}}} @@ -75,7 +75,7 @@ import {{{projectName}}} {{^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}} **{{paramName}}** | {{#isPrimitiveType}}**{{dataType}}**{{/isPrimitiveType}}{{^isPrimitiveType}}[**{{dataType}}**]({{baseType}}.md){{/isPrimitiveType}} | {{description}} | {{^required}}[optional] {{/required}}{{#defaultValue}}[default to {{.}}]{{/defaultValue}} {{/allParams}} ### Return type diff --git a/modules/openapi-generator/src/main/resources/swift4/git_push.sh.mustache b/modules/openapi-generator/src/main/resources/swift4/git_push.sh.mustache index 8b3f689c9121a65080ad038d37a2036b01e559a1..f0bed5bd84155f05bc3cdc67af008f524efb38a6 100755 --- a/modules/openapi-generator/src/main/resources/swift4/git_push.sh.mustache +++ b/modules/openapi-generator/src/main/resources/swift4/git_push.sh.mustache @@ -55,4 +55,3 @@ 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/swift4/gitignore.mustache b/modules/openapi-generator/src/main/resources/swift4/gitignore.mustache index 5e5d5cebcf47a81afaa78b275a5d3d32fc31ad47..fc4e330f8fab81d7c5e8f814db03bd8d154d2b09 100644 --- a/modules/openapi-generator/src/main/resources/swift4/gitignore.mustache +++ b/modules/openapi-generator/src/main/resources/swift4/gitignore.mustache @@ -54,7 +54,7 @@ Carthage/Build # fastlane # -# It is recommended to not store the screenshots in the git repo. Instead, use fastlane to re-generate the +# 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 diff --git a/modules/openapi-generator/src/main/resources/swift4/model.mustache b/modules/openapi-generator/src/main/resources/swift4/model.mustache index 2f08e82be16eb47aa615fdcfdb3791bb21f0bc31..a47acfb01ef8197ef02b3ae57dc3f142289d7852 100644 --- a/modules/openapi-generator/src/main/resources/swift4/model.mustache +++ b/modules/openapi-generator/src/main/resources/swift4/model.mustache @@ -8,7 +8,7 @@ import Foundation {{#description}} -/** {{description}} */{{/description}} +/** {{.}} */{{/description}} {{#isArray}} {{> modelArray}} {{/isArray}} diff --git a/modules/openapi-generator/src/main/resources/swift4/modelObject.mustache b/modules/openapi-generator/src/main/resources/swift4/modelObject.mustache index 3b17529a417e2350f2d2748641e51df9e2a92188..41c0245ca7ff74893f328ceab1d64298e8d7e424 100644 --- a/modules/openapi-generator/src/main/resources/swift4/modelObject.mustache +++ b/modules/openapi-generator/src/main/resources/swift4/modelObject.mustache @@ -8,12 +8,12 @@ {{/allVars}} {{#allVars}} {{#isEnum}} - {{#description}}/** {{description}} */ - {{/description}}{{#nonPublicApi}}internal{{/nonPublicApi}}{{^nonPublicApi}}public{{/nonPublicApi}} var {{name}}: {{{datatypeWithEnum}}}{{#unwrapRequired}}?{{/unwrapRequired}}{{^unwrapRequired}}{{^required}}?{{/required}}{{/unwrapRequired}}{{#defaultValue}} = {{{defaultValue}}}{{/defaultValue}} + {{#description}}/** {{.}} */ + {{/description}}{{#nonPublicApi}}internal{{/nonPublicApi}}{{^nonPublicApi}}public{{/nonPublicApi}} var {{name}}: {{{datatypeWithEnum}}}{{#unwrapRequired}}?{{/unwrapRequired}}{{^unwrapRequired}}{{^required}}?{{/required}}{{/unwrapRequired}}{{#defaultValue}} = {{{.}}}{{/defaultValue}} {{/isEnum}} {{^isEnum}} - {{#description}}/** {{description}} */ - {{/description}}{{#nonPublicApi}}internal{{/nonPublicApi}}{{^nonPublicApi}}public{{/nonPublicApi}} var {{name}}: {{{datatype}}}{{#unwrapRequired}}?{{/unwrapRequired}}{{^unwrapRequired}}{{^required}}?{{/required}}{{/unwrapRequired}}{{#defaultValue}} = {{{defaultValue}}}{{/defaultValue}}{{#objcCompatible}}{{#vendorExtensions.x-swift-optional-scalar}} + {{#description}}/** {{.}} */ + {{/description}}{{#nonPublicApi}}internal{{/nonPublicApi}}{{^nonPublicApi}}public{{/nonPublicApi}} var {{name}}: {{{datatype}}}{{#unwrapRequired}}?{{/unwrapRequired}}{{^unwrapRequired}}{{^required}}?{{/required}}{{/unwrapRequired}}{{#defaultValue}} = {{{.}}}{{/defaultValue}}{{#objcCompatible}}{{#vendorExtensions.x-swift-optional-scalar}} {{#nonPublicApi}}internal{{/nonPublicApi}}{{^nonPublicApi}}public{{/nonPublicApi}} var {{name}}Num: NSNumber? { get { return {{name}} as NSNumber? diff --git a/modules/openapi-generator/src/main/resources/swift5/Extensions.mustache b/modules/openapi-generator/src/main/resources/swift5/Extensions.mustache index e81a205164fd78d66c2f50b6657f5a5538944383..d7316c9b8c3b837b42df1c4003abaff621e6e9ed 100644 --- a/modules/openapi-generator/src/main/resources/swift5/Extensions.mustache +++ b/modules/openapi-generator/src/main/resources/swift5/Extensions.mustache @@ -237,4 +237,3 @@ extension Set: Content where Element: Content { } extension AnyCodable: Content {} {{/useVapor}} - diff --git a/modules/openapi-generator/src/main/resources/swift5/Package.swift.mustache b/modules/openapi-generator/src/main/resources/swift5/Package.swift.mustache index cd573b4a96fa602aedac9d3861ba93d94b552758..45f90f22d4ad1bc3b02d47a0b020e25ac23796f3 100644 --- a/modules/openapi-generator/src/main/resources/swift5/Package.swift.mustache +++ b/modules/openapi-generator/src/main/resources/swift5/Package.swift.mustache @@ -44,7 +44,7 @@ let package = Package( .target( name: "{{projectName}}", dependencies: ["AnyCodable", {{#useVapor}}"Vapor", {{/useVapor}}{{#useAlamofire}}"Alamofire", {{/useAlamofire}}{{#usePromiseKit}}"PromiseKit", {{/usePromiseKit}}{{#useRxSwift}}"RxSwift"{{/useRxSwift}}], - path: "{{#swiftPackagePath}}{{swiftPackagePath}}{{/swiftPackagePath}}{{^swiftPackagePath}}{{#useSPMFileStructure}}Sources/{{projectName}}{{/useSPMFileStructure}}{{^useSPMFileStructure}}{{projectName}}/Classes{{/useSPMFileStructure}}{{/swiftPackagePath}}" + path: "{{swiftPackagePath}}{{^swiftPackagePath}}{{#useSPMFileStructure}}Sources/{{projectName}}{{/useSPMFileStructure}}{{^useSPMFileStructure}}{{projectName}}/Classes{{/useSPMFileStructure}}{{/swiftPackagePath}}" ), ] ) diff --git a/modules/openapi-generator/src/main/resources/swift5/Podspec.mustache b/modules/openapi-generator/src/main/resources/swift5/Podspec.mustache index 3cf9daa69a86a2f9044a10e366e1ee44d9538dfc..3dc3ee88d8cc9758276e367298bcb0e973e51198 100644 --- a/modules/openapi-generator/src/main/resources/swift5/Podspec.mustache +++ b/modules/openapi-generator/src/main/resources/swift5/Podspec.mustache @@ -1,31 +1,31 @@ Pod::Spec.new do |s| s.name = '{{projectName}}'{{#projectDescription}} - s.summary = '{{projectDescription}}'{{/projectDescription}} + s.summary = '{{.}}'{{/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.version = '{{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}}' + s.authors = '{{.}}' {{/podAuthors}} {{#podSocialMediaURL}} - s.social_media_url = '{{podSocialMediaURL}}' + s.social_media_url = '{{.}}' {{/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}}' + s.description = '{{.}}' {{/podDescription}} {{#podScreenshots}} s.screenshots = {{& podScreenshots}} {{/podScreenshots}} {{#podDocumentationURL}} - s.documentation_url = '{{podDocumentationURL}}' + s.documentation_url = '{{.}}' {{/podDocumentationURL}} - s.source_files = '{{#swiftPackagePath}}{{swiftPackagePath}}{{/swiftPackagePath}}{{^swiftPackagePath}}{{#useSPMFileStructure}}Sources/{{projectName}}{{/useSPMFileStructure}}{{^useSPMFileStructure}}{{projectName}}/Classes{{/useSPMFileStructure}}{{/swiftPackagePath}}/**/*.swift' + s.source_files = '{{swiftPackagePath}}{{^swiftPackagePath}}{{#useSPMFileStructure}}Sources/{{projectName}}{{/useSPMFileStructure}}{{^useSPMFileStructure}}{{projectName}}/Classes{{/useSPMFileStructure}}{{/swiftPackagePath}}/**/*.swift' {{#usePromiseKit}} s.dependency 'PromiseKit/CorePromise', '~> 6.15.3' {{/usePromiseKit}} diff --git a/modules/openapi-generator/src/main/resources/swift5/README.mustache b/modules/openapi-generator/src/main/resources/swift5/README.mustache index 2fc73bcdbc16acdba97f43e100cdeab112e46c65..ad83e06abc804172086da56a32e756ab559a0559 100644 --- a/modules/openapi-generator/src/main/resources/swift5/README.mustache +++ b/modules/openapi-generator/src/main/resources/swift5/README.mustache @@ -1,7 +1,7 @@ # Swift5 API client for {{{projectName}}} {{#appDescriptionWithNewLines}} -{{{appDescriptionWithNewLines}}} +{{{.}}} {{/appDescriptionWithNewLines}} ## Overview @@ -40,7 +40,7 @@ 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}} +{{#apiInfo}}{{#apis}}{{#operations}}{{#operation}}*{{classname}}* | [**{{operationId}}**]({{apiDocPath}}{{classname}}.md#{{operationIdLowerCase}}) | **{{httpMethod}}** {{path}} | {{summary}} {{/operation}}{{/operations}}{{/apis}}{{/apiInfo}} ## Documentation For Models diff --git a/modules/openapi-generator/src/main/resources/swift5/XcodeGen.mustache b/modules/openapi-generator/src/main/resources/swift5/XcodeGen.mustache index aed8dcb76b2d45d4bd8b868ebf5996a7624cfdad..49e47f7231265f6aeb30b199554e3f86fcc24aed 100644 --- a/modules/openapi-generator/src/main/resources/swift5/XcodeGen.mustache +++ b/modules/openapi-generator/src/main/resources/swift5/XcodeGen.mustache @@ -4,10 +4,10 @@ targets: type: framework platform: iOS deploymentTarget: "9.0" - sources: [{{#swiftPackagePath}}{{swiftPackagePath}}{{/swiftPackagePath}}{{^swiftPackagePath}}{{#useSPMFileStructure}}Sources{{/useSPMFileStructure}}{{^useSPMFileStructure}}{{projectName}}{{/useSPMFileStructure}}{{/swiftPackagePath}}] + sources: [{{swiftPackagePath}}{{^swiftPackagePath}}{{#useSPMFileStructure}}Sources{{/useSPMFileStructure}}{{^useSPMFileStructure}}{{projectName}}{{/useSPMFileStructure}}{{/swiftPackagePath}}] info: path: ./Info.plist - version: {{#podVersion}}{{podVersion}}{{/podVersion}}{{^podVersion}}{{#apiInfo}}{{version}}{{/apiInfo}}{{^apiInfo}}}0.0.1{{/apiInfo}}{{/podVersion}} + version: {{podVersion}}{{^podVersion}}{{#apiInfo}}{{version}}{{/apiInfo}}{{^apiInfo}}}0.0.1{{/apiInfo}}{{/podVersion}} settings: APPLICATION_EXTENSION_API_ONLY: true scheme: {} diff --git a/modules/openapi-generator/src/main/resources/swift5/api.mustache b/modules/openapi-generator/src/main/resources/swift5/api.mustache index 80a98e94b93a303120fe0d69620bae93d136fa96..27d60d7fb5b0715958a6e9d5a61ef53e38c19fe7 100644 --- a/modules/openapi-generator/src/main/resources/swift5/api.mustache +++ b/modules/openapi-generator/src/main/resources/swift5/api.mustache @@ -20,7 +20,7 @@ extension {{projectName}} { {{/swiftUseApiNamespace}} {{#description}} -/** {{{description}}} */{{/description}} +/** {{{.}}} */{{/description}} {{#objcCompatible}}@objc {{/objcCompatible}}{{#nonPublicApi}}internal{{/nonPublicApi}}{{^nonPublicApi}}open{{/nonPublicApi}} class {{classname}}{{#objcCompatible}} : NSObject{{/objcCompatible}} { {{#operation}} @@ -46,7 +46,7 @@ extension {{projectName}} { {{^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. @@ -55,7 +55,7 @@ extension {{projectName}} { {{#isDeprecated}} @available(*, deprecated, message: "This operation is deprecated.") {{/isDeprecated}} - {{#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}}{{^-last}}, {{/-last}}{{/allParams}}{{#hasParams}}, {{/hasParams}}apiResponseQueue: DispatchQueue = {{projectName}}.apiResponseQueue, completion: @escaping ((_ data: {{#returnType}}{{{returnType}}}{{/returnType}}{{^returnType}}Void{{/returnType}}?, _ error: Error?) -> Void)) { + {{#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}}{{^-last}}, {{/-last}}{{/allParams}}{{#hasParams}}, {{/hasParams}}apiResponseQueue: DispatchQueue = {{projectName}}.apiResponseQueue, completion: @escaping ((_ data: {{{returnType}}}{{^returnType}}Void{{/returnType}}?, _ error: Error?) -> Void)) { {{operationId}}WithRequestBuilder({{#allParams}}{{paramName}}: {{paramName}}{{^-last}}, {{/-last}}{{/allParams}}).execute(apiResponseQueue) { result -> Void in switch result { {{#returnType}} @@ -79,17 +79,17 @@ extension {{projectName}} { {{#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}}> + - returns: Promise<{{{returnType}}}{{^returnType}}Void{{/returnType}}> */ {{#isDeprecated}} @available(*, deprecated, message: "This operation is deprecated.") {{/isDeprecated}} - {{#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}}{{^-last}}, {{/-last}}{{/allParams}}{{#hasParams}}, {{/hasParams}}apiResponseQueue: DispatchQueue = {{projectName}}.apiResponseQueue) -> Promise<{{#returnType}}{{{returnType}}}{{/returnType}}{{^returnType}}Void{{/returnType}}> { - let deferred = Promise<{{#returnType}}{{{returnType}}}{{/returnType}}{{^returnType}}Void{{/returnType}}>.pending() + {{#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}}{{^-last}}, {{/-last}}{{/allParams}}{{#hasParams}}, {{/hasParams}}apiResponseQueue: DispatchQueue = {{projectName}}.apiResponseQueue) -> Promise<{{{returnType}}}{{^returnType}}Void{{/returnType}}> { + let deferred = Promise<{{{returnType}}}{{^returnType}}Void{{/returnType}}>.pending() {{operationId}}WithRequestBuilder({{#allParams}}{{paramName}}: {{paramName}}{{^-last}}, {{/-last}}{{/allParams}}).execute(apiResponseQueue) { result -> Void in switch result { {{#returnType}} @@ -110,16 +110,16 @@ extension {{projectName}} { {{#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}}> + - returns: Observable<{{{returnType}}}{{^returnType}}Void{{/returnType}}> */ {{#isDeprecated}} @available(*, deprecated, message: "This operation is deprecated.") {{/isDeprecated}} - {{#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}}{{^-last}}, {{/-last}}{{/allParams}}{{#hasParams}}, {{/hasParams}}apiResponseQueue: DispatchQueue = {{projectName}}.apiResponseQueue) -> 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}}{{^-last}}, {{/-last}}{{/allParams}}{{#hasParams}}, {{/hasParams}}apiResponseQueue: DispatchQueue = {{projectName}}.apiResponseQueue) -> Observable<{{{returnType}}}{{^returnType}}Void{{/returnType}}> { return Observable.create { observer -> Disposable in {{operationId}}WithRequestBuilder({{#allParams}}{{paramName}}: {{paramName}}{{^-last}}, {{/-last}}{{/allParams}}).execute(apiResponseQueue) { result -> Void in switch result { @@ -143,19 +143,19 @@ extension {{projectName}} { {{#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> + - returns: AnyPublisher<{{{returnType}}}{{^returnType}}Void{{/returnType}}, Error> */ #if canImport(Combine) {{#isDeprecated}} @available(*, deprecated, message: "This operation is deprecated.") {{/isDeprecated}} @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}}{{^-last}}, {{/-last}}{{/allParams}}{{#hasParams}}, {{/hasParams}}apiResponseQueue: DispatchQueue = {{projectName}}.apiResponseQueue) -> AnyPublisher<{{#returnType}}{{{returnType}}}{{/returnType}}{{^returnType}}Void{{/returnType}}, Error> { - return Future<{{#returnType}}{{{returnType}}}{{/returnType}}{{^returnType}}Void{{/returnType}}, Error>.init { promise in + {{#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}}{{^-last}}, {{/-last}}{{/allParams}}{{#hasParams}}, {{/hasParams}}apiResponseQueue: DispatchQueue = {{projectName}}.apiResponseQueue) -> AnyPublisher<{{{returnType}}}{{^returnType}}Void{{/returnType}}, Error> { + return Future<{{{returnType}}}{{^returnType}}Void{{/returnType}}, Error>.init { promise in {{operationId}}WithRequestBuilder({{#allParams}}{{paramName}}: {{paramName}}{{^-last}}, {{/-last}}{{/allParams}}).execute(apiResponseQueue) { result -> Void in switch result { {{#returnType}} @@ -177,7 +177,7 @@ extension {{projectName}} { {{#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. @@ -186,7 +186,7 @@ extension {{projectName}} { {{#isDeprecated}} @available(*, deprecated, message: "This operation is deprecated.") {{/isDeprecated}} - open class func {{operationId}}({{#allParams}}{{paramName}}: {{#isEnum}}{{#isContainer}}{{{dataType}}}{{/isContainer}}{{^isContainer}}{{{datatypeWithEnum}}}_{{operationId}}{{/isContainer}}{{/isEnum}}{{^isEnum}}{{{dataType}}}{{/isEnum}}{{^required}}? = nil{{/required}}{{^-last}}, {{/-last}}{{/allParams}}{{#hasParams}}, {{/hasParams}}apiResponseQueue: DispatchQueue = {{projectName}}.apiResponseQueue, completion: @escaping ((_ result: Swift.Result<{{#returnType}}{{{returnType}}}{{/returnType}}{{^returnType}}Void{{/returnType}}, Error>) -> Void)) { + open class func {{operationId}}({{#allParams}}{{paramName}}: {{#isEnum}}{{#isContainer}}{{{dataType}}}{{/isContainer}}{{^isContainer}}{{{datatypeWithEnum}}}_{{operationId}}{{/isContainer}}{{/isEnum}}{{^isEnum}}{{{dataType}}}{{/isEnum}}{{^required}}? = nil{{/required}}{{^-last}}, {{/-last}}{{/allParams}}{{#hasParams}}, {{/hasParams}}apiResponseQueue: DispatchQueue = {{projectName}}.apiResponseQueue, completion: @escaping ((_ result: Swift.Result<{{{returnType}}}{{^returnType}}Void{{/returnType}}, Error>) -> Void)) { {{operationId}}WithRequestBuilder({{#allParams}}{{paramName}}: {{paramName}}{{^-last}}, {{/-last}}{{/allParams}}).execute(apiResponseQueue) { result -> Void in switch result { {{#returnType}} @@ -206,12 +206,12 @@ extension {{projectName}} { {{#useVapor}} /** {{#summary}} - {{{summary}}} + {{{.}}} {{/summary}} {{httpMethod}} {{{path}}}{{#notes}} - {{{notes}}}{{/notes}}{{#subresourceOperation}} - subresourceOperation: {{subresourceOperation}}{{/subresourceOperation}}{{#defaultResponse}} - defaultResponse: {{defaultResponse}}{{/defaultResponse}} + {{{.}}}{{/notes}}{{#subresourceOperation}} + subresourceOperation: {{.}}{{/subresourceOperation}}{{#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}} @@ -221,7 +221,7 @@ extension {{projectName}} { - responseHeaders: [{{#responseHeaders}}{{{baseName}}}({{{dataType}}}){{^-last}}, {{/-last}}{{/responseHeaders}}] {{/hasResponseHeaders}} {{#externalDocs}} - - 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}} @@ -254,7 +254,7 @@ extension {{projectName}} { enum CodingKeys: String, CodingKey { {{#queryParams}} - case {{paramName}}{{#baseName}} = "{{baseName}}"{{/baseName}} + case {{paramName}}{{#baseName}} = "{{.}}"{{/baseName}} {{/queryParams}} } } @@ -277,7 +277,7 @@ extension {{projectName}} { {{#nonPublicApi}}internal{{/nonPublicApi}}{{^nonPublicApi}}public{{/nonPublicApi}} enum {{#lambda.titlecase}}{{operationId}}{{/lambda.titlecase}} { {{#responses}} - case http{{code}}({{#dataType}}value: {{{dataType}}}, {{/dataType}}raw: ClientResponse) + case http{{code}}({{#dataType}}value: {{{.}}}, {{/dataType}}raw: ClientResponse) {{/responses}} {{^hasDefaultResponse}} case http0(raw: ClientResponse) @@ -286,12 +286,12 @@ extension {{projectName}} { /** {{#summary}} - {{{summary}}} + {{{.}}} {{/summary}} {{httpMethod}} {{{path}}}{{#notes}} - {{{notes}}}{{/notes}}{{#subresourceOperation}} - subresourceOperation: {{subresourceOperation}}{{/subresourceOperation}}{{#defaultResponse}} - defaultResponse: {{defaultResponse}}{{/defaultResponse}} + {{{.}}}{{/notes}}{{#subresourceOperation}} + subresourceOperation: {{.}}{{/subresourceOperation}}{{#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}} @@ -301,7 +301,7 @@ extension {{projectName}} { - responseHeaders: [{{#responseHeaders}}{{{baseName}}}({{{dataType}}}){{^-last}}, {{/-last}}{{/responseHeaders}}] {{/hasResponseHeaders}} {{#externalDocs}} - - 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}} @@ -331,12 +331,12 @@ extension {{projectName}} { /** {{#summary}} - {{{summary}}} + {{{.}}} {{/summary}} - {{httpMethod}} {{{path}}}{{#notes}} - - {{{notes}}}{{/notes}}{{#subresourceOperation}} - - subresourceOperation: {{subresourceOperation}}{{/subresourceOperation}}{{#defaultResponse}} - - defaultResponse: {{defaultResponse}}{{/defaultResponse}} + - {{{.}}}{{/notes}}{{#subresourceOperation}} + - subresourceOperation: {{.}}{{/subresourceOperation}}{{#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}} @@ -346,17 +346,17 @@ extension {{projectName}} { - responseHeaders: [{{#responseHeaders}}{{{baseName}}}({{{dataType}}}){{^-last}}, {{/-last}}{{/responseHeaders}}] {{/hasResponseHeaders}} {{#externalDocs}} - - 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}} + - returns: RequestBuilder<{{{returnType}}}{{^returnType}}Void{{/returnType}}> {{description}} */ {{#isDeprecated}} @available(*, deprecated, message: "This operation is deprecated.") {{/isDeprecated}} - {{#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}}{{^-last}}, {{/-last}}{{/allParams}}) -> RequestBuilder<{{#returnType}}{{{returnType}}}{{/returnType}}{{^returnType}}Void{{/returnType}}> { + {{#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}}{{^-last}}, {{/-last}}{{/allParams}}) -> RequestBuilder<{{{returnType}}}{{^returnType}}Void{{/returnType}}> { {{^pathParams}}let{{/pathParams}}{{#pathParams}}{{#-first}}var{{/-first}}{{/pathParams}} localVariablePath = "{{{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) ?? "" @@ -396,7 +396,7 @@ extension {{projectName}} { let localVariableHeaderParameters = APIHelper.rejectNilHeaders(localVariableNillableHeaders) - let localVariableRequestBuilder: RequestBuilder<{{#returnType}}{{{returnType}}}{{/returnType}}{{^returnType}}Void{{/returnType}}>.Type = {{projectName}}.requestBuilderFactory.{{#returnType}}getBuilder(){{/returnType}}{{^returnType}}getNonDecodableBuilder(){{/returnType}} + let localVariableRequestBuilder: RequestBuilder<{{{returnType}}}{{^returnType}}Void{{/returnType}}>.Type = {{projectName}}.requestBuilderFactory.{{#returnType}}getBuilder(){{/returnType}}{{^returnType}}getNonDecodableBuilder(){{/returnType}} return localVariableRequestBuilder.init(method: "{{httpMethod}}", URLString: (localVariableUrlComponents?.string ?? localVariableURLString), parameters: localVariableParameters, headers: localVariableHeaderParameters) } diff --git a/modules/openapi-generator/src/main/resources/swift5/api_doc.mustache b/modules/openapi-generator/src/main/resources/swift5/api_doc.mustache index 93b51e32535dae3d7b5fb70c2112edc9e908d413..3327e1615bf5f3007d4d501c1ad7a9ae098016b1 100644 --- a/modules/openapi-generator/src/main/resources/swift5/api_doc.mustache +++ b/modules/openapi-generator/src/main/resources/swift5/api_doc.mustache @@ -1,11 +1,11 @@ # {{classname}}{{#description}} -{{description}}{{/description}} +{{.}}{{/description}} All URIs are relative to *{{{basePath}}}* Method | HTTP request | Description ------------- | ------------- | ------------- -{{#operations}}{{#operation}}[**{{operationId}}**]({{classname}}.md#{{operationIdLowerCase}}) | **{{httpMethod}}** {{path}} | {{#summary}}{{summary}}{{/summary}} +{{#operations}}{{#operation}}[**{{operationId}}**]({{classname}}.md#{{operationIdLowerCase}}) | **{{httpMethod}}** {{path}} | {{summary}} {{/operation}}{{/operations}} {{#operations}} @@ -15,15 +15,15 @@ Method | HTTP request | Description {{^usePromiseKit}} {{^useRxSwift}} {{^useVapor}} - {{#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}}{{^-last}}, {{/-last}}{{/allParams}}{{#hasParams}}, {{/hasParams}}completion: @escaping (_ data: {{#returnType}}{{{returnType}}}{{/returnType}}{{^returnType}}Void{{/returnType}}?, _ error: Error?) -> Void) + {{#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}}{{^-last}}, {{/-last}}{{/allParams}}{{#hasParams}}, {{/hasParams}}completion: @escaping (_ data: {{{returnType}}}{{^returnType}}Void{{/returnType}}?, _ error: Error?) -> Void) {{/useVapor}} {{/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}}{{^-last}}, {{/-last}}{{/allParams}}) -> 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}}{{^-last}}, {{/-last}}{{/allParams}}) -> Promise<{{{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}}{{^-last}}, {{/-last}}{{/allParams}}) -> 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}}{{^-last}}, {{/-last}}{{/allParams}}) -> Observable<{{{returnType}}}{{^returnType}}Void{{/returnType}}> {{/useRxSwift}} {{#useVapor}} {{#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}}{{^-last}}, {{/-last}}{{/allParams}}{{#hasParams}}, {{/hasParams}}headers: HTTPHeaders = {{projectName}}.customHeaders, beforeSend: (inout ClientRequest) throws -> () = { _ in }) -> EventLoopFuture<{{#lambda.titlecase}}{{operationId}}{{/lambda.titlecase}}> @@ -32,9 +32,9 @@ Method | HTTP request | Description {{{summary}}}{{#notes}} -{{{notes}}}{{/notes}} +{{{.}}}{{/notes}} -### Example +### 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}}} @@ -103,7 +103,7 @@ import {{{projectName}}} {{^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}} **{{paramName}}** | {{#isPrimitiveType}}**{{dataType}}**{{/isPrimitiveType}}{{^isPrimitiveType}}[**{{dataType}}**]({{baseType}}.md){{/isPrimitiveType}} | {{description}} | {{^required}}[optional] {{/required}}{{#defaultValue}}[default to {{.}}]{{/defaultValue}} {{/allParams}} ### Return type @@ -114,10 +114,10 @@ Name | Type | Description | Notes ```swift {{#nonPublicApi}}internal{{/nonPublicApi}}{{^nonPublicApi}}public{{/nonPublicApi}} enum {{#lambda.titlecase}}{{operationId}}{{/lambda.titlecase}} { {{#responses}} - case http{{code}}(value: {{#dataType}}{{dataType}}?{{/dataType}}{{^dataType}}Void?{{/dataType}}, raw: ClientResponse) + case http{{code}}(value: {{#dataType}}{{.}}?{{/dataType}}{{^dataType}}Void?{{/dataType}}, raw: ClientResponse) {{/responses}} {{^hasDefaultResponse}} - case http0(value: {{#returnType}}{{returnType}}?{{/returnType}}{{^returnType}}Void?{{/returnType}}, raw: ClientResponse) + case http0(value: {{#returnType}}{{.}}?{{/returnType}}{{^returnType}}Void?{{/returnType}}, raw: ClientResponse) {{/hasDefaultResponse}} } ``` 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 index 8b3f689c9121a65080ad038d37a2036b01e559a1..f0bed5bd84155f05bc3cdc67af008f524efb38a6 100755 --- a/modules/openapi-generator/src/main/resources/swift5/git_push.sh.mustache +++ b/modules/openapi-generator/src/main/resources/swift5/git_push.sh.mustache @@ -55,4 +55,3 @@ 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/model.mustache b/modules/openapi-generator/src/main/resources/swift5/model.mustache index 47df79b7c7d2bdd8845d275e7daab952688798b8..80f382f39a3acffaf1269f7545a888223965511f 100644 --- a/modules/openapi-generator/src/main/resources/swift5/model.mustache +++ b/modules/openapi-generator/src/main/resources/swift5/model.mustache @@ -19,7 +19,7 @@ extension {{projectName}} { {{/swiftUseApiNamespace}} {{#description}} -/** {{description}} */{{/description}}{{#isDeprecated}} +/** {{.}} */{{/description}}{{#isDeprecated}} @available(*, deprecated, message: "This schema is deprecated."){{/isDeprecated}}{{#vendorExtensions.x-is-one-of-interface}} {{> modelOneOf}}{{/vendorExtensions.x-is-one-of-interface}}{{^vendorExtensions.x-is-one-of-interface}}{{#isArray}} {{> modelArray}}{{/isArray}}{{^isArray}}{{#isEnum}} diff --git a/modules/openapi-generator/src/main/resources/swift5/modelObject.mustache b/modules/openapi-generator/src/main/resources/swift5/modelObject.mustache index 450d95f1f7658c436bb40d01ac2ccff96382bcf9..fb00843bdec9689d8bc28dd958dc3902f8a4a61b 100644 --- a/modules/openapi-generator/src/main/resources/swift5/modelObject.mustache +++ b/modules/openapi-generator/src/main/resources/swift5/modelObject.mustache @@ -9,14 +9,14 @@ {{/allVars}} {{#allVars}} {{#isEnum}} - {{#description}}/** {{{description}}} */ + {{#description}}/** {{{.}}} */ {{/description}}{{#deprecated}}@available(*, deprecated, message: "This property is deprecated.") - {{/deprecated}}{{#nonPublicApi}}internal{{/nonPublicApi}}{{^nonPublicApi}}public{{/nonPublicApi}} {{#readonlyProperties}}private(set) {{/readonlyProperties}}var {{{name}}}: {{{datatypeWithEnum}}}{{#required}}{{#isNullable}}?{{/isNullable}}{{/required}}{{^required}}?{{/required}}{{#defaultValue}} = {{{defaultValue}}}{{/defaultValue}} + {{/deprecated}}{{#nonPublicApi}}internal{{/nonPublicApi}}{{^nonPublicApi}}public{{/nonPublicApi}} {{#readonlyProperties}}private(set) {{/readonlyProperties}}var {{{name}}}: {{{datatypeWithEnum}}}{{#required}}{{#isNullable}}?{{/isNullable}}{{/required}}{{^required}}?{{/required}}{{#defaultValue}} = {{{.}}}{{/defaultValue}} {{/isEnum}} {{^isEnum}} - {{#description}}/** {{{description}}} */ + {{#description}}/** {{{.}}} */ {{/description}}{{#deprecated}}@available(*, deprecated, message: "This property is deprecated.") - {{/deprecated}}{{#nonPublicApi}}internal{{/nonPublicApi}}{{^nonPublicApi}}public{{/nonPublicApi}} {{#readonlyProperties}}private(set) {{/readonlyProperties}}var {{{name}}}: {{{datatype}}}{{#required}}{{#isNullable}}?{{/isNullable}}{{/required}}{{^required}}?{{/required}}{{#defaultValue}} = {{{defaultValue}}}{{/defaultValue}} + {{/deprecated}}{{#nonPublicApi}}internal{{/nonPublicApi}}{{^nonPublicApi}}public{{/nonPublicApi}} {{#readonlyProperties}}private(set) {{/readonlyProperties}}var {{{name}}}: {{{datatype}}}{{#required}}{{#isNullable}}?{{/isNullable}}{{/required}}{{^required}}?{{/required}}{{#defaultValue}} = {{{.}}}{{/defaultValue}} {{#objcCompatible}} {{#vendorExtensions.x-swift-optional-scalar}} {{#nonPublicApi}}internal{{/nonPublicApi}}{{^nonPublicApi}}public{{/nonPublicApi}} var {{{name}}}Num: NSNumber? { @@ -30,7 +30,7 @@ {{/allVars}} {{#hasVars}} - {{#nonPublicApi}}internal{{/nonPublicApi}}{{^nonPublicApi}}public{{/nonPublicApi}} init({{#allVars}}{{{name}}}: {{{datatypeWithEnum}}}{{#required}}{{#isNullable}}?{{/isNullable}}{{/required}}{{^required}}?{{/required}}{{#defaultValue}} = {{{defaultValue}}}{{/defaultValue}}{{^defaultValue}}{{^required}} = nil{{/required}}{{/defaultValue}}{{^-last}}, {{/-last}}{{/allVars}}) { + {{#nonPublicApi}}internal{{/nonPublicApi}}{{^nonPublicApi}}public{{/nonPublicApi}} init({{#allVars}}{{{name}}}: {{{datatypeWithEnum}}}{{#required}}{{#isNullable}}?{{/isNullable}}{{/required}}{{^required}}?{{/required}}{{#defaultValue}} = {{{.}}}{{/defaultValue}}{{^defaultValue}}{{^required}} = nil{{/required}}{{/defaultValue}}{{^-last}}, {{/-last}}{{/allVars}}) { {{#allVars}} self.{{{name}}} = {{{name}}} {{/allVars}} diff --git a/modules/openapi-generator/src/main/resources/typescript-angular/README.mustache b/modules/openapi-generator/src/main/resources/typescript-angular/README.mustache index 4c7649fa8aa4c3e4dc154ef31b287aafc3e86bd7..2a44a92c89a265bab446001a0fc7428d2598274f 100644 --- a/modules/openapi-generator/src/main/resources/typescript-angular/README.mustache +++ b/modules/openapi-generator/src/main/resources/typescript-angular/README.mustache @@ -152,7 +152,7 @@ export class AppModule { ### Set service base path -If different than the generated base path, during app bootstrap, you can provide the base path to your service. +If different than the generated base path, during app bootstrap, you can provide the base path to your service. ``` import { BASE_PATH } from '{{npmName}}'; @@ -200,4 +200,4 @@ import { environment } from '../environments/environment'; bootstrap: [ AppComponent ] }) export class AppModule { } -``` +``` diff --git a/modules/openapi-generator/src/main/resources/typescript-angular/api.service.mustache b/modules/openapi-generator/src/main/resources/typescript-angular/api.service.mustache index 4fe3186f1adf2f771c2e50d041cd3029f20cf5dc..c010ad130406bb3cfdd51acbf1fad9a9328b2c56 100644 --- a/modules/openapi-generator/src/main/resources/typescript-angular/api.service.mustache +++ b/modules/openapi-generator/src/main/resources/typescript-angular/api.service.mustache @@ -28,7 +28,7 @@ import { {{#allParams.0}} export interface {{#prefixParameterInterfaces}}{{classname}}{{/prefixParameterInterfaces}}{{operationIdCamelCase}}RequestParams { {{#allParams}} - {{#description}}/** {{description}} */ + {{#description}}/** {{.}} */ {{/description}}{{paramName}}{{^required}}?{{/required}}: {{{dataType}}}{{#isNullable}} | null{{/isNullable}}; {{/allParams}} } @@ -141,10 +141,10 @@ export class {{classname}} { {{#operation}} /** {{#summary}} - * {{summary}} + * {{.}} {{/summary}} {{#notes}} - * {{notes}} + * {{.}} {{/notes}} {{^useSingleRequestParameter}} {{#allParams}} diff --git a/modules/openapi-generator/src/main/resources/typescript-angular/apiInterface.mustache b/modules/openapi-generator/src/main/resources/typescript-angular/apiInterface.mustache index ca0def9d404b141e4f52e4a9813ec2cfb121bf78..3a2124949da06237f973b393da6c164a4029b64a 100644 --- a/modules/openapi-generator/src/main/resources/typescript-angular/apiInterface.mustache +++ b/modules/openapi-generator/src/main/resources/typescript-angular/apiInterface.mustache @@ -44,7 +44,7 @@ export interface {{classname}}Interface { {{/allParams.0}}{{/useSingleRequestParameter}}{{#isDeprecated}} * @deprecated {{/isDeprecated}}*/ - {{nickname}}({{^useSingleRequestParameter}}{{#allParams}}{{paramName}}{{^required}}?{{/required}}: {{{dataType}}}, {{/allParams}}{{/useSingleRequestParameter}}{{#useSingleRequestParameter}}{{#allParams.0}}requestParameters: {{#prefixParameterInterfaces}}{{classname}}{{/prefixParameterInterfaces}}{{operationIdCamelCase}}RequestParams, {{/allParams.0}}{{/useSingleRequestParameter}}extraHttpRequestParams?: any): Observable<{{#returnType}}{{{returnType}}}{{/returnType}}{{^returnType}}{}{{/returnType}}>; + {{nickname}}({{^useSingleRequestParameter}}{{#allParams}}{{paramName}}{{^required}}?{{/required}}: {{{dataType}}}, {{/allParams}}{{/useSingleRequestParameter}}{{#useSingleRequestParameter}}{{#allParams.0}}requestParameters: {{#prefixParameterInterfaces}}{{classname}}{{/prefixParameterInterfaces}}{{operationIdCamelCase}}RequestParams, {{/allParams.0}}{{/useSingleRequestParameter}}extraHttpRequestParams?: any): Observable<{{{returnType}}}{{^returnType}}{}{{/returnType}}>; {{/operation}} } diff --git a/modules/openapi-generator/src/main/resources/typescript-angular/git_push.sh.mustache b/modules/openapi-generator/src/main/resources/typescript-angular/git_push.sh.mustache index 8b3f689c9121a65080ad038d37a2036b01e559a1..f0bed5bd84155f05bc3cdc67af008f524efb38a6 100755 --- a/modules/openapi-generator/src/main/resources/typescript-angular/git_push.sh.mustache +++ b/modules/openapi-generator/src/main/resources/typescript-angular/git_push.sh.mustache @@ -55,4 +55,3 @@ 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/typescript-angular/licenseInfo.mustache b/modules/openapi-generator/src/main/resources/typescript-angular/licenseInfo.mustache index 835764cfc729d721063604e603a10808335e97c8..16ba21d203d0eeb4aaad31474c615056cc169d3f 100644 --- a/modules/openapi-generator/src/main/resources/typescript-angular/licenseInfo.mustache +++ b/modules/openapi-generator/src/main/resources/typescript-angular/licenseInfo.mustache @@ -2,8 +2,8 @@ * {{{appName}}} * {{{appDescription}}} * - * {{#version}}The version of the OpenAPI document: {{{version}}}{{/version}} - * {{#infoEmail}}Contact: {{{infoEmail}}}{{/infoEmail}} + * {{#version}}The version of the OpenAPI document: {{{.}}}{{/version}} + * {{#infoEmail}}Contact: {{{.}}}{{/infoEmail}} * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech diff --git a/modules/openapi-generator/src/main/resources/typescript-angular/model.mustache b/modules/openapi-generator/src/main/resources/typescript-angular/model.mustache index 461d2e6a89f9630ac66d366f8f9d70453700fbd1..fb2f624d5180f5ae5796bea4f3c9264bc94e2ff7 100644 --- a/modules/openapi-generator/src/main/resources/typescript-angular/model.mustache +++ b/modules/openapi-generator/src/main/resources/typescript-angular/model.mustache @@ -8,7 +8,7 @@ import { {{classname}} } from '{{filename}}'; {{#description}} /** - * {{{description}}} + * {{{.}}} */ {{/description}} {{#isEnum}}{{>modelEnum}}{{/isEnum}}{{^isEnum}}{{#isAlias}}{{>modelAlias}}{{/isAlias}}{{^isAlias}}{{#taggedUnions}}{{>modelTaggedUnion}}{{/taggedUnions}}{{^taggedUnions}}{{#oneOf}}{{#-first}}{{>modelOneOf}}{{/-first}}{{/oneOf}}{{^oneOf}}{{>modelGeneric}}{{/oneOf}}{{/taggedUnions}}{{/isAlias}}{{/isEnum}} diff --git a/modules/openapi-generator/src/main/resources/typescript-angular/modelGeneric.mustache b/modules/openapi-generator/src/main/resources/typescript-angular/modelGeneric.mustache index 93d0fb629db375762801e071ec74fac37ce83655..43207b65e3058df79e848050d48f0c56ed7b4107 100644 --- a/modules/openapi-generator/src/main/resources/typescript-angular/modelGeneric.mustache +++ b/modules/openapi-generator/src/main/resources/typescript-angular/modelGeneric.mustache @@ -2,7 +2,7 @@ export interface {{classname}}{{#allParents}}{{#-first}} extends {{/-first}}{{{. {{#vars}} {{#description}} /** - * {{{description}}} + * {{{.}}} */ {{/description}} {{#isReadOnly}}readonly {{/isReadOnly}}{{{name}}}{{^required}}?{{/required}}: {{#isEnum}}{{{datatypeWithEnum}}}{{/isEnum}}{{^isEnum}}{{{dataType}}}{{/isEnum}}{{#isNullable}} | null{{/isNullable}}; diff --git a/modules/openapi-generator/src/main/resources/typescript-angular/modelOneOf.mustache b/modules/openapi-generator/src/main/resources/typescript-angular/modelOneOf.mustache index 0763eaacf1e9e7615ab78d27153470446ca0e0f9..f6f30e029a76d8511fa4dbee9ef060fe12eef549 100644 --- a/modules/openapi-generator/src/main/resources/typescript-angular/modelOneOf.mustache +++ b/modules/openapi-generator/src/main/resources/typescript-angular/modelOneOf.mustache @@ -8,7 +8,7 @@ import { {{/hasImports}} /** * @type {{classname}}{{#description}} - * {{{description}}}{{/description}} + * {{{.}}}{{/description}} * @export */ export type {{classname}} = {{#oneOf}}{{{.}}}{{^-last}} | {{/-last}}{{/oneOf}}; diff --git a/modules/openapi-generator/src/main/resources/typescript-angular/modelTaggedUnion.mustache b/modules/openapi-generator/src/main/resources/typescript-angular/modelTaggedUnion.mustache index 0189ea8b0ecdfd791a12cb71c19faec8b66f5135..24a9c0f0b60fdfa6a6e717343405ca0f987b616f 100644 --- a/modules/openapi-generator/src/main/resources/typescript-angular/modelTaggedUnion.mustache +++ b/modules/openapi-generator/src/main/resources/typescript-angular/modelTaggedUnion.mustache @@ -7,10 +7,10 @@ export interface {{classname}} { {{>modelGenericAdditionalProperties}} {{#allVars}} {{#description}} /** - * {{{description}}} + * {{{.}}} */ {{/description}} - {{name}}{{^required}}?{{/required}}: {{#discriminatorValue}}'{{discriminatorValue}}'{{/discriminatorValue}}{{^discriminatorValue}}{{#isEnum}}{{{datatypeWithEnum}}}{{/isEnum}}{{^isEnum}}{{{dataType}}}{{/isEnum}}{{/discriminatorValue}}{{#isNullable}} | null{{/isNullable}}; + {{name}}{{^required}}?{{/required}}: {{#discriminatorValue}}'{{.}}'{{/discriminatorValue}}{{^discriminatorValue}}{{#isEnum}}{{{datatypeWithEnum}}}{{/isEnum}}{{^isEnum}}{{{dataType}}}{{/isEnum}}{{/discriminatorValue}}{{#isNullable}} | null{{/isNullable}}; {{/allVars}} } {{>modelGenericEnums}} diff --git a/modules/openapi-generator/src/main/resources/typescript-angularjs/api.mustache b/modules/openapi-generator/src/main/resources/typescript-angularjs/api.mustache index c82000979a528f9baa2fcad36c6cbdda3a6c2d7e..0669640bddb9fa06417ea4718e88dc1bc268b541 100644 --- a/modules/openapi-generator/src/main/resources/typescript-angularjs/api.mustache +++ b/modules/openapi-generator/src/main/resources/typescript-angularjs/api.mustache @@ -33,7 +33,7 @@ export class {{classname}} { * @param {{paramName}} {{description}} {{/allParams}} */ - public {{nickname}} ({{#allParams}}{{paramName}}{{^required}}?{{/required}}: {{{dataType}}}, {{/allParams}}extraHttpRequestParams?: any ) : ng.IHttpPromise<{{#returnType}}{{{returnType}}}{{/returnType}}{{^returnType}}{}{{/returnType}}> { + public {{nickname}} ({{#allParams}}{{paramName}}{{^required}}?{{/required}}: {{{dataType}}}, {{/allParams}}extraHttpRequestParams?: any ) : ng.IHttpPromise<{{{returnType}}}{{^returnType}}{}{{/returnType}}> { const localVarPath = this.basePath + '{{{path}}}'{{#pathParams}} .replace('{' + '{{baseName}}' + '}', encodeURIComponent(String({{paramName}}))){{/pathParams}}; diff --git a/modules/openapi-generator/src/main/resources/typescript-angularjs/git_push.sh.mustache b/modules/openapi-generator/src/main/resources/typescript-angularjs/git_push.sh.mustache index 8b3f689c9121a65080ad038d37a2036b01e559a1..f0bed5bd84155f05bc3cdc67af008f524efb38a6 100755 --- a/modules/openapi-generator/src/main/resources/typescript-angularjs/git_push.sh.mustache +++ b/modules/openapi-generator/src/main/resources/typescript-angularjs/git_push.sh.mustache @@ -55,4 +55,3 @@ 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/typescript-angularjs/licenseInfo.mustache b/modules/openapi-generator/src/main/resources/typescript-angularjs/licenseInfo.mustache index 9866f297a4d7e43b6e321965c75edff6e152b50a..be193d0c4fe807d927a4e2a2329b5c615954608c 100644 --- a/modules/openapi-generator/src/main/resources/typescript-angularjs/licenseInfo.mustache +++ b/modules/openapi-generator/src/main/resources/typescript-angularjs/licenseInfo.mustache @@ -2,8 +2,8 @@ * {{{appName}}} * {{{appDescription}}} * - * {{#version}}The version of the OpenAPI document: {{{version}}}{{/version}} - * {{#infoEmail}}Contact: {{{infoEmail}}}{{/infoEmail}} + * {{#version}}The version of the OpenAPI document: {{{.}}}{{/version}} + * {{#infoEmail}}Contact: {{{.}}}{{/infoEmail}} * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech diff --git a/modules/openapi-generator/src/main/resources/typescript-angularjs/model.mustache b/modules/openapi-generator/src/main/resources/typescript-angularjs/model.mustache index fe615e49bd63ea06afcfd4d3cd0c219aae3ebd74..90e55b66903dc4bc3d86bbf355b66100b7723b97 100644 --- a/modules/openapi-generator/src/main/resources/typescript-angularjs/model.mustache +++ b/modules/openapi-generator/src/main/resources/typescript-angularjs/model.mustache @@ -5,14 +5,14 @@ import * as models from './models'; {{#model}} {{#description}} /** - * {{{description}}} + * {{{.}}} */ {{/description}} -export interface {{classname}} {{#parent}}extends {{{parent}}} {{/parent}}{ +export interface {{classname}} {{#parent}}extends {{{.}}} {{/parent}}{ {{#vars}} {{#description}} /** - * {{{description}}} + * {{{.}}} */ {{/description}} "{{name}}"{{^required}}?{{/required}}: {{#isEnum}}{{{datatypeWithEnum}}}{{/isEnum}}{{^isEnum}}{{{dataType}}}{{/isEnum}}; diff --git a/modules/openapi-generator/src/main/resources/typescript-aurelia/api.mustache b/modules/openapi-generator/src/main/resources/typescript-aurelia/api.mustache index d035ba8530ca095d2859b51d34165a8679579108..c47d33c33eced2f296129cc83610620fffb2f3e5 100644 --- a/modules/openapi-generator/src/main/resources/typescript-aurelia/api.mustache +++ b/modules/openapi-generator/src/main/resources/typescript-aurelia/api.mustache @@ -39,16 +39,16 @@ export class {{classname}} extends Api { {{#operation}} /** {{#summary}} - * {{summary}} + * {{.}} {{/summary}} {{#notes}} - * {{notes}} + * {{.}} {{/notes}} {{#allParams}} * @param params.{{paramName}} {{description}} {{/allParams}} */ - async {{nickname}}({{#hasParams}}params: I{{operationIdCamelCase}}Params{{/hasParams}}): Promise<{{#returnType}}{{{returnType}}}{{/returnType}}{{^returnType}}any{{/returnType}}> { + async {{nickname}}({{#hasParams}}params: I{{operationIdCamelCase}}Params{{/hasParams}}): Promise<{{{returnType}}}{{^returnType}}any{{/returnType}}> { // Verify required parameters are set {{#allParams}} {{#required}} diff --git a/modules/openapi-generator/src/main/resources/typescript-aurelia/git_push.sh.mustache b/modules/openapi-generator/src/main/resources/typescript-aurelia/git_push.sh.mustache index 8b3f689c9121a65080ad038d37a2036b01e559a1..f0bed5bd84155f05bc3cdc67af008f524efb38a6 100755 --- a/modules/openapi-generator/src/main/resources/typescript-aurelia/git_push.sh.mustache +++ b/modules/openapi-generator/src/main/resources/typescript-aurelia/git_push.sh.mustache @@ -55,4 +55,3 @@ 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/typescript-aurelia/licenseInfo.mustache b/modules/openapi-generator/src/main/resources/typescript-aurelia/licenseInfo.mustache index 9866f297a4d7e43b6e321965c75edff6e152b50a..be193d0c4fe807d927a4e2a2329b5c615954608c 100644 --- a/modules/openapi-generator/src/main/resources/typescript-aurelia/licenseInfo.mustache +++ b/modules/openapi-generator/src/main/resources/typescript-aurelia/licenseInfo.mustache @@ -2,8 +2,8 @@ * {{{appName}}} * {{{appDescription}}} * - * {{#version}}The version of the OpenAPI document: {{{version}}}{{/version}} - * {{#infoEmail}}Contact: {{{infoEmail}}}{{/infoEmail}} + * {{#version}}The version of the OpenAPI document: {{{.}}}{{/version}} + * {{#infoEmail}}Contact: {{{.}}}{{/infoEmail}} * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech diff --git a/modules/openapi-generator/src/main/resources/typescript-aurelia/modelOneOf.mustache b/modules/openapi-generator/src/main/resources/typescript-aurelia/modelOneOf.mustache index ac93c4ab199042de6c98d7a4b7b79af92af465c7..bf7ac86684bc0842277deb2be066dcf8bdb478d8 100644 --- a/modules/openapi-generator/src/main/resources/typescript-aurelia/modelOneOf.mustache +++ b/modules/openapi-generator/src/main/resources/typescript-aurelia/modelOneOf.mustache @@ -1,6 +1,6 @@ /** * @type {{classname}}{{#description}} - * {{{description}}}{{/description}} + * {{{.}}}{{/description}} * @export */ export type {{classname}} = {{#oneOf}}{{{.}}}{{^-last}} | {{/-last}}{{/oneOf}}; diff --git a/modules/openapi-generator/src/main/resources/typescript-aurelia/models.mustache b/modules/openapi-generator/src/main/resources/typescript-aurelia/models.mustache index 75bf9ee4627293b5367d3113c50b671a7b3d4c32..76de4d46141378111a509c9e988dc1aefdd0bb42 100644 --- a/modules/openapi-generator/src/main/resources/typescript-aurelia/models.mustache +++ b/modules/openapi-generator/src/main/resources/typescript-aurelia/models.mustache @@ -5,11 +5,11 @@ {{^oneOf}} {{#description}} /** - * {{{description}}} + * {{{.}}} */ {{/description}} {{^isEnum}} -export interface {{classname}} {{#parent}}extends {{{parent}}} {{/parent}}{ +export interface {{classname}} {{#parent}}extends {{{.}}} {{/parent}}{ {{/isEnum}} {{#isEnum}} export type {{{classname}}} = {{#allowableValues}}{{#values}}'{{{.}}}'{{^-last}} | {{/-last}}{{/values}}{{/allowableValues}}; @@ -17,7 +17,7 @@ export type {{{classname}}} = {{#allowableValues}}{{#values}}'{{{.}}}'{{^-last}} {{#vars}} {{#description}} /** - * {{{description}}} + * {{{.}}} */ {{/description}} {{name}}{{^required}}?{{/required}}: {{#isEnum}}{{{datatypeWithEnum}}}{{/isEnum}}{{^isEnum}}{{{dataType}}}{{/isEnum}}; diff --git a/modules/openapi-generator/src/main/resources/typescript-aurelia/package.json.mustache b/modules/openapi-generator/src/main/resources/typescript-aurelia/package.json.mustache index ff7515308feb3577bb180a3214e54985030169c1..37be6a77b98e5afb5d7ce7f41205fd735e0ebf22 100644 --- a/modules/openapi-generator/src/main/resources/typescript-aurelia/package.json.mustache +++ b/modules/openapi-generator/src/main/resources/typescript-aurelia/package.json.mustache @@ -1,6 +1,6 @@ { - "name": "{{#npmName}}{{{npmName}}}{{/npmName}}{{^npmName}}typescript-aurelia-api{{/npmName}}", - "version": "{{#npmVersion}}{{{npmVersion}}}{{/npmVersion}}{{^npmVersion}}0.0.0{{/npmVersion}}", + "name": "{{{npmName}}}{{^npmName}}typescript-aurelia-api{{/npmName}}", + "version": "{{{npmVersion}}}{{^npmVersion}}0.0.0{{/npmVersion}}", "license": "Unlicense", "main": "./dist/Api.js", "browser": "./dist/Api.js", diff --git a/modules/openapi-generator/src/main/resources/typescript-axios/apiInner.mustache b/modules/openapi-generator/src/main/resources/typescript-axios/apiInner.mustache index b425c807a246edbfbecae543f1db4876effe73c5..c265be5b3d797560b7ea0ff5f113673398f26a7f 100644 --- a/modules/openapi-generator/src/main/resources/typescript-axios/apiInner.mustache +++ b/modules/openapi-generator/src/main/resources/typescript-axios/apiInner.mustache @@ -203,7 +203,7 @@ export const {{classname}}AxiosParamCreator = function (configuration?: Configur /** * {{classname}} - functional programming interface{{#description}} - * {{{description}}}{{/description}} + * {{{.}}}{{/description}} * @export */ export const {{classname}}Fp = function(configuration?: Configuration) { @@ -222,7 +222,7 @@ export const {{classname}}Fp = function(configuration?: Configuration) { * @deprecated{{/isDeprecated}} * @throws {RequiredError} */ - async {{nickname}}({{#allParams}}{{paramName}}{{^required}}?{{/required}}: {{{dataType}}}, {{/allParams}}options?: any): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<{{#returnType}}{{{returnType}}}{{/returnType}}{{^returnType}}void{{/returnType}}>> { + async {{nickname}}({{#allParams}}{{paramName}}{{^required}}?{{/required}}: {{{dataType}}}, {{/allParams}}options?: any): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<{{{returnType}}}{{^returnType}}void{{/returnType}}>> { const localVarAxiosArgs = await localVarAxiosParamCreator.{{nickname}}({{#allParams}}{{paramName}}, {{/allParams}}options); return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); }, @@ -251,7 +251,7 @@ export const {{classname}}Factory = function (configuration?: Configuration, bas * @deprecated{{/isDeprecated}} * @throws {RequiredError} */ - {{nickname}}({{#allParams}}{{paramName}}{{^required}}?{{/required}}: {{{dataType}}}, {{/allParams}}options?: any): AxiosPromise<{{#returnType}}{{{returnType}}}{{/returnType}}{{^returnType}}void{{/returnType}}> { + {{nickname}}({{#allParams}}{{paramName}}{{^required}}?{{/required}}: {{{dataType}}}, {{/allParams}}options?: any): AxiosPromise<{{{returnType}}}{{^returnType}}void{{/returnType}}> { return localVarFp.{{nickname}}({{#allParams}}{{paramName}}, {{/allParams}}options).then((request) => request(axios, basePath)); }, {{/operation}} @@ -280,7 +280,7 @@ export interface {{classname}}Interface { * @throws {RequiredError} * @memberof {{classname}}Interface */ - {{nickname}}({{#allParams}}{{paramName}}{{^required}}?{{/required}}: {{{dataType}}}, {{/allParams}}options?: any): AxiosPromise<{{#returnType}}{{{returnType}}}{{/returnType}}{{^returnType}}void{{/returnType}}>; + {{nickname}}({{#allParams}}{{paramName}}{{^required}}?{{/required}}: {{{dataType}}}, {{/allParams}}options?: any): AxiosPromise<{{{returnType}}}{{^returnType}}void{{/returnType}}>; {{/operation}} } @@ -313,7 +313,7 @@ export interface {{classname}}{{operationIdCamelCase}}Request { {{/useSingleRequestParameter}} /** * {{classname}} - object-oriented interface{{#description}} - * {{{description}}}{{/description}} + * {{{.}}}{{/description}} * @export * @class {{classname}} * @extends {BaseAPI} diff --git a/modules/openapi-generator/src/main/resources/typescript-axios/git_push.sh.mustache b/modules/openapi-generator/src/main/resources/typescript-axios/git_push.sh.mustache index 8b3f689c9121a65080ad038d37a2036b01e559a1..f0bed5bd84155f05bc3cdc67af008f524efb38a6 100755 --- a/modules/openapi-generator/src/main/resources/typescript-axios/git_push.sh.mustache +++ b/modules/openapi-generator/src/main/resources/typescript-axios/git_push.sh.mustache @@ -55,4 +55,3 @@ 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/typescript-axios/licenseInfo.mustache b/modules/openapi-generator/src/main/resources/typescript-axios/licenseInfo.mustache index 9866f297a4d7e43b6e321965c75edff6e152b50a..be193d0c4fe807d927a4e2a2329b5c615954608c 100644 --- a/modules/openapi-generator/src/main/resources/typescript-axios/licenseInfo.mustache +++ b/modules/openapi-generator/src/main/resources/typescript-axios/licenseInfo.mustache @@ -2,8 +2,8 @@ * {{{appName}}} * {{{appDescription}}} * - * {{#version}}The version of the OpenAPI document: {{{version}}}{{/version}} - * {{#infoEmail}}Contact: {{{infoEmail}}}{{/infoEmail}} + * {{#version}}The version of the OpenAPI document: {{{.}}}{{/version}} + * {{#infoEmail}}Contact: {{{.}}}{{/infoEmail}} * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech diff --git a/modules/openapi-generator/src/main/resources/typescript-axios/model.mustache b/modules/openapi-generator/src/main/resources/typescript-axios/model.mustache index 976a611b2f24ad529144d0b4c639196e8382cdb0..46838a8a08ed4adcd094c26c8c3e55e5b8d13d7d 100644 --- a/modules/openapi-generator/src/main/resources/typescript-axios/model.mustache +++ b/modules/openapi-generator/src/main/resources/typescript-axios/model.mustache @@ -8,4 +8,3 @@ import { {{class}} } from './{{filename}}';{{/imports}}{{/hasOneOf}}{{/hasAllOf} {{#models}}{{#model}} {{#isEnum}}{{>modelEnum}}{{/isEnum}}{{#oneOf}}{{#-first}}{{>modelOneOf}}{{/-first}}{{/oneOf}}{{#allOf}}{{#-first}}{{>modelAllOf}}{{/-first}}{{/allOf}}{{^isEnum}}{{^oneOf}}{{^allOf}}{{>modelGeneric}}{{/allOf}}{{/oneOf}}{{/isEnum}} {{/model}}{{/models}} - diff --git a/modules/openapi-generator/src/main/resources/typescript-axios/modelAllOf.mustache b/modules/openapi-generator/src/main/resources/typescript-axios/modelAllOf.mustache index 0c0dbf9fd898d905253a7532ac6e906b0fdca824..c163419686d4f213064b83fdfadb4da64cd76834 100644 --- a/modules/openapi-generator/src/main/resources/typescript-axios/modelAllOf.mustache +++ b/modules/openapi-generator/src/main/resources/typescript-axios/modelAllOf.mustache @@ -1,6 +1,6 @@ /** * @type {{classname}}{{#description}} - * {{{description}}}{{/description}} + * {{{.}}}{{/description}} * @export */ export type {{classname}} = {{#allOf}}{{{.}}}{{^-last}} & {{/-last}}{{/allOf}}; diff --git a/modules/openapi-generator/src/main/resources/typescript-axios/modelEnum.mustache b/modules/openapi-generator/src/main/resources/typescript-axios/modelEnum.mustache index 7ff0379b4c3a81c8f52d477d3ce87bbacb538456..5f1a5f44b6adf855e3982e85a88d4503533b5ed7 100644 --- a/modules/openapi-generator/src/main/resources/typescript-axios/modelEnum.mustache +++ b/modules/openapi-generator/src/main/resources/typescript-axios/modelEnum.mustache @@ -13,7 +13,7 @@ export enum {{classname}} { {{#enumVars}} {{#enumDescription}} /** - * {{enumDescription}} + * {{.}} */ {{/enumDescription}} {{{name}}} = {{{value}}}{{^-last}},{{/-last}} diff --git a/modules/openapi-generator/src/main/resources/typescript-axios/modelGeneric.mustache b/modules/openapi-generator/src/main/resources/typescript-axios/modelGeneric.mustache index df1e0fc8326010e7658405359e6d902558fc04c1..ea299c07d96bc093f535de300fb56a26ee2bf4f9 100644 --- a/modules/openapi-generator/src/main/resources/typescript-axios/modelGeneric.mustache +++ b/modules/openapi-generator/src/main/resources/typescript-axios/modelGeneric.mustache @@ -3,7 +3,7 @@ * @export * @interface {{classname}} */ -export interface {{classname}} {{#parent}}extends {{{parent}}} {{/parent}}{ +export interface {{classname}} {{#parent}}extends {{{.}}} {{/parent}}{ {{#additionalPropertiesType}} [key: string]: {{{additionalPropertiesType}}}{{#hasVars}} | any{{/hasVars}}; @@ -32,7 +32,7 @@ export enum {{enumName}} { {{#enumVars}} {{#enumDescription}} /** - * {{enumDescription}} + * {{.}} */ {{/enumDescription}} {{{name}}} = {{{value}}}{{^-last}},{{/-last}} diff --git a/modules/openapi-generator/src/main/resources/typescript-axios/modelOneOf.mustache b/modules/openapi-generator/src/main/resources/typescript-axios/modelOneOf.mustache index ac93c4ab199042de6c98d7a4b7b79af92af465c7..bf7ac86684bc0842277deb2be066dcf8bdb478d8 100644 --- a/modules/openapi-generator/src/main/resources/typescript-axios/modelOneOf.mustache +++ b/modules/openapi-generator/src/main/resources/typescript-axios/modelOneOf.mustache @@ -1,6 +1,6 @@ /** * @type {{classname}}{{#description}} - * {{{description}}}{{/description}} + * {{{.}}}{{/description}} * @export */ export type {{classname}} = {{#oneOf}}{{{.}}}{{^-last}} | {{/-last}}{{/oneOf}}; diff --git a/modules/openapi-generator/src/main/resources/typescript-fetch/apis.mustache b/modules/openapi-generator/src/main/resources/typescript-fetch/apis.mustache index ef0e8cbedc6848c51e1d7ddf4cdd2fd5aad2a096..fb3d06db22c3e1afe24499368c9f1349a20172a4 100644 --- a/modules/openapi-generator/src/main/resources/typescript-fetch/apis.mustache +++ b/modules/openapi-generator/src/main/resources/typescript-fetch/apis.mustache @@ -49,7 +49,7 @@ export interface {{classname}}Interface { * @throws {RequiredError} * @memberof {{classname}}Interface */ - {{nickname}}Raw({{#allParams.0}}requestParameters: {{#prefixParameterInterfaces}}{{classname}}{{/prefixParameterInterfaces}}{{operationIdCamelCase}}Request, {{/allParams.0}}initOverrides?: RequestInit): Promise<runtime.ApiResponse<{{#returnType}}{{{returnType}}}{{/returnType}}{{^returnType}}void{{/returnType}}>>; + {{nickname}}Raw({{#allParams.0}}requestParameters: {{#prefixParameterInterfaces}}{{classname}}{{/prefixParameterInterfaces}}{{operationIdCamelCase}}Request, {{/allParams.0}}initOverrides?: RequestInit): Promise<runtime.ApiResponse<{{{returnType}}}{{^returnType}}void{{/returnType}}>>; /** {{#notes}} @@ -60,10 +60,10 @@ export interface {{classname}}Interface { {{/summary}} */ {{^useSingleRequestParameter}} - {{nickname}}({{#allParams}}{{paramName}}{{^required}}?{{/required}}: {{#isEnum}}{{{datatypeWithEnum}}}{{/isEnum}}{{^isEnum}}{{{dataType}}}{{#isNullable}} | null{{/isNullable}}{{/isEnum}}, {{/allParams}}initOverrides?: RequestInit): Promise<{{#returnType}}{{{returnType}}}{{/returnType}}{{^returnType}}void{{/returnType}}>; + {{nickname}}({{#allParams}}{{paramName}}{{^required}}?{{/required}}: {{#isEnum}}{{{datatypeWithEnum}}}{{/isEnum}}{{^isEnum}}{{{dataType}}}{{#isNullable}} | null{{/isNullable}}{{/isEnum}}, {{/allParams}}initOverrides?: RequestInit): Promise<{{{returnType}}}{{^returnType}}void{{/returnType}}>; {{/useSingleRequestParameter}} {{#useSingleRequestParameter}} - {{nickname}}({{#allParams.0}}requestParameters: {{#prefixParameterInterfaces}}{{classname}}{{/prefixParameterInterfaces}}{{operationIdCamelCase}}Request, {{/allParams.0}}initOverrides?: RequestInit): Promise<{{#returnType}}{{{returnType}}}{{/returnType}}{{^returnType}}void{{/returnType}}>; + {{nickname}}({{#allParams.0}}requestParameters: {{#prefixParameterInterfaces}}{{classname}}{{/prefixParameterInterfaces}}{{operationIdCamelCase}}Request, {{/allParams.0}}initOverrides?: RequestInit): Promise<{{{returnType}}}{{^returnType}}void{{/returnType}}>; {{/useSingleRequestParameter}} {{/operation}} @@ -91,7 +91,7 @@ export class {{classname}} extends runtime.BaseAPI { * {{&summary}} {{/summary}} */ - async {{nickname}}Raw({{#allParams.0}}requestParameters: {{#prefixParameterInterfaces}}{{classname}}{{/prefixParameterInterfaces}}{{operationIdCamelCase}}Request, {{/allParams.0}}initOverrides?: RequestInit): Promise<runtime.ApiResponse<{{#returnType}}{{{returnType}}}{{/returnType}}{{^returnType}}void{{/returnType}}>> { + async {{nickname}}Raw({{#allParams.0}}requestParameters: {{#prefixParameterInterfaces}}{{classname}}{{/prefixParameterInterfaces}}{{operationIdCamelCase}}Request, {{/allParams.0}}initOverrides?: RequestInit): Promise<runtime.ApiResponse<{{{returnType}}}{{^returnType}}void{{/returnType}}>> { {{#allParams}} {{#required}} if (requestParameters.{{paramName}} === null || requestParameters.{{paramName}} === undefined) { @@ -263,7 +263,7 @@ export class {{classname}} extends runtime.BaseAPI { body: requestParameters.{{paramName}}{{#isArray}}{{#items}}{{^isPrimitiveType}}.map({{datatype}}ToJSON){{/isPrimitiveType}}{{/items}}{{/isArray}}, {{/withoutRuntimeChecks}} {{#withoutRuntimeChecks}} - body: requestParameters.{{paramName}}{{#isArray}}{{#items}}{{^isPrimitiveType}}{{/isPrimitiveType}}{{/items}}{{/isArray}}, + body: requestParameters.{{paramName}}, {{/withoutRuntimeChecks}} {{/isContainer}} {{^isContainer}} @@ -331,7 +331,7 @@ export class {{classname}} extends runtime.BaseAPI { {{/summary}} */ {{^useSingleRequestParameter}} - async {{nickname}}({{#allParams}}{{paramName}}{{^required}}?{{/required}}: {{#isEnum}}{{{datatypeWithEnum}}}{{/isEnum}}{{^isEnum}}{{{dataType}}}{{#isNullable}} | null{{/isNullable}}{{/isEnum}}, {{/allParams}}initOverrides?: RequestInit): Promise<{{#returnType}}{{{returnType}}}{{/returnType}}{{^returnType}}void{{/returnType}}> { + async {{nickname}}({{#allParams}}{{paramName}}{{^required}}?{{/required}}: {{#isEnum}}{{{datatypeWithEnum}}}{{/isEnum}}{{^isEnum}}{{{dataType}}}{{#isNullable}} | null{{/isNullable}}{{/isEnum}}, {{/allParams}}initOverrides?: RequestInit): Promise<{{{returnType}}}{{^returnType}}void{{/returnType}}> { {{#returnType}} const response = await this.{{nickname}}Raw({{#allParams.0}}{ {{#allParams}}{{paramName}}: {{paramName}}{{^-last}}, {{/-last}}{{/allParams}} }, {{/allParams.0}}initOverrides); return await response.value(); @@ -342,7 +342,7 @@ export class {{classname}} extends runtime.BaseAPI { } {{/useSingleRequestParameter}} {{#useSingleRequestParameter}} - async {{nickname}}({{#allParams.0}}requestParameters: {{#prefixParameterInterfaces}}{{classname}}{{/prefixParameterInterfaces}}{{operationIdCamelCase}}Request, {{/allParams.0}}initOverrides?: RequestInit): Promise<{{#returnType}}{{{returnType}}}{{/returnType}}{{^returnType}}void{{/returnType}}> { + async {{nickname}}({{#allParams.0}}requestParameters: {{#prefixParameterInterfaces}}{{classname}}{{/prefixParameterInterfaces}}{{operationIdCamelCase}}Request, {{/allParams.0}}initOverrides?: RequestInit): Promise<{{{returnType}}}{{^returnType}}void{{/returnType}}> { {{#returnType}} const response = await this.{{nickname}}Raw({{#allParams.0}}requestParameters, {{/allParams.0}}initOverrides); return await response.value(); diff --git a/modules/openapi-generator/src/main/resources/typescript-fetch/licenseInfo.mustache b/modules/openapi-generator/src/main/resources/typescript-fetch/licenseInfo.mustache index 9866f297a4d7e43b6e321965c75edff6e152b50a..be193d0c4fe807d927a4e2a2329b5c615954608c 100644 --- a/modules/openapi-generator/src/main/resources/typescript-fetch/licenseInfo.mustache +++ b/modules/openapi-generator/src/main/resources/typescript-fetch/licenseInfo.mustache @@ -2,8 +2,8 @@ * {{{appName}}} * {{{appDescription}}} * - * {{#version}}The version of the OpenAPI document: {{{version}}}{{/version}} - * {{#infoEmail}}Contact: {{{infoEmail}}}{{/infoEmail}} + * {{#version}}The version of the OpenAPI document: {{{.}}}{{/version}} + * {{#infoEmail}}Contact: {{{.}}}{{/infoEmail}} * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech diff --git a/modules/openapi-generator/src/main/resources/typescript-fetch/modelGeneric.mustache b/modules/openapi-generator/src/main/resources/typescript-fetch/modelGeneric.mustache index 3036e3662907560dadb7d36d0671686929cc1b45..1428b031f5a61e27f88af3bd81f78355c9753b61 100644 --- a/modules/openapi-generator/src/main/resources/typescript-fetch/modelGeneric.mustache +++ b/modules/openapi-generator/src/main/resources/typescript-fetch/modelGeneric.mustache @@ -39,7 +39,7 @@ export function {{classname}}FromJSONTyped(json: any, ignoreDiscriminator: boole } {{/discriminator}} return { - {{#parent}}...{{{parent}}}FromJSONTyped(json, ignoreDiscriminator),{{/parent}} + {{#parent}}...{{{.}}}FromJSONTyped(json, ignoreDiscriminator),{{/parent}} {{#additionalPropertiesType}} ...json, {{/additionalPropertiesType}} @@ -97,7 +97,7 @@ export function {{classname}}ToJSON(value?: {{classname}} | null): any { return null; } return { - {{#parent}}...{{{parent}}}ToJSON(value),{{/parent}} + {{#parent}}...{{{.}}}ToJSON(value),{{/parent}} {{#additionalPropertiesType}} ...value, {{/additionalPropertiesType}} @@ -137,4 +137,3 @@ export function {{classname}}ToJSON(value?: {{classname}} | null): any { return value; {{/hasVars}} } - diff --git a/modules/openapi-generator/src/main/resources/typescript-fetch/modelGenericInterfaces.mustache b/modules/openapi-generator/src/main/resources/typescript-fetch/modelGenericInterfaces.mustache index 10e71864ec4da451ddab3ea8c5bfd15fb3fd5fe5..c2b7823f7c23cbae0d90b4c9d0dec662ca4648b9 100644 --- a/modules/openapi-generator/src/main/resources/typescript-fetch/modelGenericInterfaces.mustache +++ b/modules/openapi-generator/src/main/resources/typescript-fetch/modelGenericInterfaces.mustache @@ -3,7 +3,7 @@ * @export * @interface {{classname}} */ -export interface {{classname}} {{#parent}}extends {{{parent}}} {{/parent}}{ +export interface {{classname}} {{#parent}}extends {{{.}}} {{/parent}}{ {{#additionalPropertiesType}} [key: string]: {{{additionalPropertiesType}}}{{#hasVars}} | any{{/hasVars}}; {{/additionalPropertiesType}} diff --git a/modules/openapi-generator/src/main/resources/typescript-fetch/sagas.mustache b/modules/openapi-generator/src/main/resources/typescript-fetch/sagas.mustache index ac5581582d8c9d6661db24e386c74f0d4f0dc738..5129d92758c2e05a22c28fbed1f2ed6e0715ac6c 100644 --- a/modules/openapi-generator/src/main/resources/typescript-fetch/sagas.mustache +++ b/modules/openapi-generator/src/main/resources/typescript-fetch/sagas.mustache @@ -105,7 +105,7 @@ export function *{{nickname}}SagaImp(_action_: Action<Payload{{#lambda.titlecase yield put({{nickname}}Request({{#allParams.0}}{{#returnTypeSupportsEntities}}requestPayload{{/returnTypeSupportsEntities}}{{^returnTypeSupportsEntities}}_action_.payload{{/returnTypeSupportsEntities}}{{/allParams.0}})); - const response{{#returnType}}: Required<{{{returnType}}}>{{/returnType}} = yield apiCall(Api.{{#lambda.camelcase}}{{classname}}{{/lambda.camelcase}}, Api.{{#lambda.camelcase}}{{classname}}{{/lambda.camelcase}}.{{nickname}}, + const response{{#returnType}}: Required<{{{.}}}>{{/returnType}} = yield apiCall(Api.{{#lambda.camelcase}}{{classname}}{{/lambda.camelcase}}, Api.{{#lambda.camelcase}}{{classname}}{{/lambda.camelcase}}.{{nickname}}, {{#allParams.0}} {{#allParams}} {{#isUniqueId}} diff --git a/modules/openapi-generator/src/main/resources/typescript-inversify/README.mustache b/modules/openapi-generator/src/main/resources/typescript-inversify/README.mustache index 2156b184ba43540aa42d0186c43f3eff3b623cdd..d2a56030d2c71a83762a5d5765a4ad0a99381bf2 100644 --- a/modules/openapi-generator/src/main/resources/typescript-inversify/README.mustache +++ b/modules/openapi-generator/src/main/resources/typescript-inversify/README.mustache @@ -67,8 +67,3 @@ container.bind<IHttpClient>("IApiHttpClient").to(HttpClient).inSingletonScope(); container.bind<IApiConfiguration>("IApiConfiguration").to(ApiConfiguration).inSingletonScope(); ApiServiceBinder.with(container); ``` - - - - - diff --git a/modules/openapi-generator/src/main/resources/typescript-inversify/git_push.sh.mustache b/modules/openapi-generator/src/main/resources/typescript-inversify/git_push.sh.mustache index 8b3f689c9121a65080ad038d37a2036b01e559a1..f0bed5bd84155f05bc3cdc67af008f524efb38a6 100755 --- a/modules/openapi-generator/src/main/resources/typescript-inversify/git_push.sh.mustache +++ b/modules/openapi-generator/src/main/resources/typescript-inversify/git_push.sh.mustache @@ -55,4 +55,3 @@ 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/typescript-inversify/licenseInfo.mustache b/modules/openapi-generator/src/main/resources/typescript-inversify/licenseInfo.mustache index 835764cfc729d721063604e603a10808335e97c8..16ba21d203d0eeb4aaad31474c615056cc169d3f 100644 --- a/modules/openapi-generator/src/main/resources/typescript-inversify/licenseInfo.mustache +++ b/modules/openapi-generator/src/main/resources/typescript-inversify/licenseInfo.mustache @@ -2,8 +2,8 @@ * {{{appName}}} * {{{appDescription}}} * - * {{#version}}The version of the OpenAPI document: {{{version}}}{{/version}} - * {{#infoEmail}}Contact: {{{infoEmail}}}{{/infoEmail}} + * {{#version}}The version of the OpenAPI document: {{{.}}}{{/version}} + * {{#infoEmail}}Contact: {{{.}}}{{/infoEmail}} * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech diff --git a/modules/openapi-generator/src/main/resources/typescript-inversify/model.mustache b/modules/openapi-generator/src/main/resources/typescript-inversify/model.mustache index 0afee5327317c1019fe991745b3a385cada31651..b8cc1f7e3a34aa368363367b07e854a2f72ded63 100644 --- a/modules/openapi-generator/src/main/resources/typescript-inversify/model.mustache +++ b/modules/openapi-generator/src/main/resources/typescript-inversify/model.mustache @@ -8,7 +8,7 @@ import { {{classname}} } from './{{filename}}'; {{#description}} /** - * {{{description}}} + * {{{.}}} */ {{/description}} {{#isEnum}}{{>modelEnum}}{{/isEnum}}{{^isEnum}}{{#isAlias}}{{>modelAlias}}{{/isAlias}}{{^isAlias}}{{#taggedUnions}}{{>modelTaggedUnion}}{{/taggedUnions}}{{^taggedUnions}}{{#oneOf}}{{#-first}}{{>modelOneOf}}{{/-first}}{{/oneOf}}{{^oneOf}}{{>modelGeneric}}{{/oneOf}}{{/taggedUnions}}{{/isAlias}}{{/isEnum}} diff --git a/modules/openapi-generator/src/main/resources/typescript-inversify/modelGeneric.mustache b/modules/openapi-generator/src/main/resources/typescript-inversify/modelGeneric.mustache index 0169ba55d86ab60a6e901dee5c97b1cc19353529..f08f7f53cae4f0cad82560c28254b7575341ba0a 100644 --- a/modules/openapi-generator/src/main/resources/typescript-inversify/modelGeneric.mustache +++ b/modules/openapi-generator/src/main/resources/typescript-inversify/modelGeneric.mustache @@ -1,8 +1,8 @@ -export interface {{classname}} {{#parent}}extends {{{parent}}} {{/parent}}{ {{>modelGenericAdditionalProperties}} +export interface {{classname}} {{#parent}}extends {{{.}}} {{/parent}}{ {{>modelGenericAdditionalProperties}} {{#vars}} {{#description}} /** - * {{{description}}} + * {{{.}}} */ {{/description}} {{#isReadOnly}}readonly {{/isReadOnly}}{{name}}{{^required}}?{{/required}}: {{#isEnum}}{{{datatypeWithEnum}}}{{/isEnum}}{{^isEnum}}{{{dataType}}}{{/isEnum}}{{#isNullable}} | null{{/isNullable}}; diff --git a/modules/openapi-generator/src/main/resources/typescript-inversify/modelOneOf.mustache b/modules/openapi-generator/src/main/resources/typescript-inversify/modelOneOf.mustache index 0763eaacf1e9e7615ab78d27153470446ca0e0f9..f6f30e029a76d8511fa4dbee9ef060fe12eef549 100644 --- a/modules/openapi-generator/src/main/resources/typescript-inversify/modelOneOf.mustache +++ b/modules/openapi-generator/src/main/resources/typescript-inversify/modelOneOf.mustache @@ -8,7 +8,7 @@ import { {{/hasImports}} /** * @type {{classname}}{{#description}} - * {{{description}}}{{/description}} + * {{{.}}}{{/description}} * @export */ export type {{classname}} = {{#oneOf}}{{{.}}}{{^-last}} | {{/-last}}{{/oneOf}}; diff --git a/modules/openapi-generator/src/main/resources/typescript-inversify/modelTaggedUnion.mustache b/modules/openapi-generator/src/main/resources/typescript-inversify/modelTaggedUnion.mustache index 8855da7ce2c70d4f74334a50ecbac5204f96f7d5..7056798e03b30960a4bffe5c3eb71c07847b9609 100644 --- a/modules/openapi-generator/src/main/resources/typescript-inversify/modelTaggedUnion.mustache +++ b/modules/openapi-generator/src/main/resources/typescript-inversify/modelTaggedUnion.mustache @@ -7,10 +7,10 @@ export interface {{classname}} { {{>modelGenericAdditionalProperties}} {{#allVars}} {{#description}} /** - * {{{description}}} + * {{{.}}} */ {{/description}} - {{name}}{{^required}}?{{/required}}: {{#discriminatorValue}}'{{discriminatorValue}}'{{/discriminatorValue}}{{^discriminatorValue}}{{#isEnum}}{{{datatypeWithEnum}}}{{/isEnum}}{{^isEnum}}{{{dataType}}}{{/isEnum}}{{/discriminatorValue}}; + {{name}}{{^required}}?{{/required}}: {{#discriminatorValue}}'{{.}}'{{/discriminatorValue}}{{^discriminatorValue}}{{#isEnum}}{{{datatypeWithEnum}}}{{/isEnum}}{{^isEnum}}{{{dataType}}}{{/isEnum}}{{/discriminatorValue}}; {{/allVars}} } {{>modelGenericEnums}} diff --git a/modules/openapi-generator/src/main/resources/typescript-jquery/api.mustache b/modules/openapi-generator/src/main/resources/typescript-jquery/api.mustache index f36874c01bb7817d22e1da9233ecb4ecdc98c1d3..83d6bc7c919d61e52e6c1d1d66059093ba548555 100644 --- a/modules/openapi-generator/src/main/resources/typescript-jquery/api.mustache +++ b/modules/openapi-generator/src/main/resources/typescript-jquery/api.mustache @@ -57,7 +57,7 @@ export class {{classname}} { {{/allParams}} */ public {{nickname}}({{#allParams}}{{paramName}}{{^required}}?{{/required}}: {{{dataType}}}, {{/allParams}}extraJQueryAjaxSettings?: JQueryAjaxSettings): JQuery.Promise< - { response: JQueryXHR; {{#returnType}}body: {{{returnType}}}; {{/returnType}}{{^returnType}}body?: any; {{/returnType}} }, + { response: JQueryXHR; {{#returnType}}body: {{{.}}}; {{/returnType}}{{^returnType}}body?: any; {{/returnType}} }, { response: JQueryXHR; errorThrown: string } > { let localVarPath = this.basePath + '{{{path}}}'{{#pathParams}}.replace('{' + '{{baseName}}' + '}', encodeURIComponent(String({{paramName}}))){{/pathParams}}; @@ -234,11 +234,11 @@ export class {{classname}} { } let dfd = $.Deferred< - { response: JQueryXHR; {{#returnType}}body: {{{returnType}}}; {{/returnType}}{{^returnType}}body?: any; {{/returnType}} }, + { response: JQueryXHR; {{#returnType}}body: {{{.}}}; {{/returnType}}{{^returnType}}body?: any; {{/returnType}} }, { response: JQueryXHR; errorThrown: string } >(); $.ajax(requestOptions).then( - (data: {{#returnType}}{{{returnType}}}{{/returnType}}{{^returnType}}any{{/returnType}}, textStatus: string, jqXHR: JQueryXHR) => + (data: {{{returnType}}}{{^returnType}}any{{/returnType}}, textStatus: string, jqXHR: JQueryXHR) => dfd.resolve({response: jqXHR, body: data}), (xhr: JQueryXHR, textStatus: string, errorThrown: string) => dfd.reject({response: xhr, errorThrown: errorThrown}) diff --git a/modules/openapi-generator/src/main/resources/typescript-jquery/git_push.sh.mustache b/modules/openapi-generator/src/main/resources/typescript-jquery/git_push.sh.mustache index 8b3f689c9121a65080ad038d37a2036b01e559a1..f0bed5bd84155f05bc3cdc67af008f524efb38a6 100755 --- a/modules/openapi-generator/src/main/resources/typescript-jquery/git_push.sh.mustache +++ b/modules/openapi-generator/src/main/resources/typescript-jquery/git_push.sh.mustache @@ -55,4 +55,3 @@ 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/typescript-jquery/licenseInfo.mustache b/modules/openapi-generator/src/main/resources/typescript-jquery/licenseInfo.mustache index 9866f297a4d7e43b6e321965c75edff6e152b50a..be193d0c4fe807d927a4e2a2329b5c615954608c 100644 --- a/modules/openapi-generator/src/main/resources/typescript-jquery/licenseInfo.mustache +++ b/modules/openapi-generator/src/main/resources/typescript-jquery/licenseInfo.mustache @@ -2,8 +2,8 @@ * {{{appName}}} * {{{appDescription}}} * - * {{#version}}The version of the OpenAPI document: {{{version}}}{{/version}} - * {{#infoEmail}}Contact: {{{infoEmail}}}{{/infoEmail}} + * {{#version}}The version of the OpenAPI document: {{{.}}}{{/version}} + * {{#infoEmail}}Contact: {{{.}}}{{/infoEmail}} * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech diff --git a/modules/openapi-generator/src/main/resources/typescript-jquery/model.mustache b/modules/openapi-generator/src/main/resources/typescript-jquery/model.mustache index aa7f905acd2043863e19635f2ef334e93363739e..58f33074bfa11d11e9a1f5c410dc812cc16d9404 100644 --- a/modules/openapi-generator/src/main/resources/typescript-jquery/model.mustache +++ b/modules/openapi-generator/src/main/resources/typescript-jquery/model.mustache @@ -5,7 +5,7 @@ import * as models from './models'; {{#description}} /** - * {{{description}}} + * {{{.}}} */ {{/description}} {{#isEnum}}{{>modelEnum}}{{/isEnum}}{{#oneOf}}{{#-first}}{{>modelOneOf}}{{/-first}}{{/oneOf}}{{^isEnum}}{{^oneOf}}{{>modelGeneric}}{{/oneOf}}{{/isEnum}} diff --git a/modules/openapi-generator/src/main/resources/typescript-jquery/modelEnum.mustache b/modules/openapi-generator/src/main/resources/typescript-jquery/modelEnum.mustache index 4788648411857fa58a1352dd7217bf8cbf9e23c5..a8870037fa098236635dedecf73c9e03414ac9d7 100644 --- a/modules/openapi-generator/src/main/resources/typescript-jquery/modelEnum.mustache +++ b/modules/openapi-generator/src/main/resources/typescript-jquery/modelEnum.mustache @@ -1,6 +1,6 @@ {{#description}} /** - * {{{description}}} + * {{{.}}} */ {{/description}} export enum {{classname}} { diff --git a/modules/openapi-generator/src/main/resources/typescript-jquery/modelGeneric.mustache b/modules/openapi-generator/src/main/resources/typescript-jquery/modelGeneric.mustache index 9ea4423b95d3e4153840cb521de66c11955d4ed7..2d0c1822360083cebc37b8b1bde2e3556c13ccad 100644 --- a/modules/openapi-generator/src/main/resources/typescript-jquery/modelGeneric.mustache +++ b/modules/openapi-generator/src/main/resources/typescript-jquery/modelGeneric.mustache @@ -1,4 +1,4 @@ -export interface {{classname}} {{#parent}}extends models.{{{parent}}} {{/parent}}{ +export interface {{classname}} {{#parent}}extends models.{{{.}}} {{/parent}}{ {{#additionalPropertiesType}} [key: string]: {{{additionalPropertiesType}}}{{#hasVars}} | any{{/hasVars}}; @@ -6,7 +6,7 @@ export interface {{classname}} {{#parent}}extends models.{{{parent}}} {{/parent} {{#vars}} {{#description}} /** - * {{{description}}} + * {{{.}}} */ {{/description}} {{name}}{{^required}}?{{/required}}: {{#isEnum}}{{{datatypeWithEnum}}}{{/isEnum}}{{^isEnum}}{{{dataType}}}{{/isEnum}}; diff --git a/modules/openapi-generator/src/main/resources/typescript-jquery/modelOneOf.mustache b/modules/openapi-generator/src/main/resources/typescript-jquery/modelOneOf.mustache index 783cb0f7bd96c8e6d4b70fab8f70da9ef369fbef..e4d1c02a9b06a2fe985ca888f5e2cec70866d0a1 100644 --- a/modules/openapi-generator/src/main/resources/typescript-jquery/modelOneOf.mustache +++ b/modules/openapi-generator/src/main/resources/typescript-jquery/modelOneOf.mustache @@ -1,6 +1,6 @@ /** * @type {{classname}}{{#description}} - * {{{description}}}{{/description}} + * {{{.}}}{{/description}} * @export */ export type {{classname}} = {{#oneOf}}models.{{{.}}}{{^-last}} | {{/-last}}{{/oneOf}}; \ No newline at end of file diff --git a/modules/openapi-generator/src/main/resources/typescript-jquery/tsconfig.mustache b/modules/openapi-generator/src/main/resources/typescript-jquery/tsconfig.mustache index ff5c84462d02e5982281399f8d9df0b52fea8076..f255a8814fc0c7bec6782e2005bff483589c4424 100644 --- a/modules/openapi-generator/src/main/resources/typescript-jquery/tsconfig.mustache +++ b/modules/openapi-generator/src/main/resources/typescript-jquery/tsconfig.mustache @@ -17,4 +17,3 @@ "index.ts" ] } - diff --git a/modules/openapi-generator/src/main/resources/typescript-nestjs/README.mustache b/modules/openapi-generator/src/main/resources/typescript-nestjs/README.mustache index 72312049e7acf56754273f875c049af98165429d..c3c32e95219cd11fde279170d3d83d360b07ac08 100644 --- a/modules/openapi-generator/src/main/resources/typescript-nestjs/README.mustache +++ b/modules/openapi-generator/src/main/resources/typescript-nestjs/README.mustache @@ -82,7 +82,7 @@ export class AppModule { ### Set service base path -If different than the generated base path, during app bootstrap, you can provide the base path to your service. +If different than the generated base path, during app bootstrap, you can provide the base path to your service. ``` import { BASE_PATH } from '{{npmName}}'; @@ -127,9 +127,9 @@ import { environment } from '../environments/environment'; ], imports: [ ], providers: [ - { - provide: 'BASE_PATH', - useValue: environment.API_BASE_PATH + { + provide: 'BASE_PATH', + useValue: environment.API_BASE_PATH } ] }) diff --git a/modules/openapi-generator/src/main/resources/typescript-nestjs/api.service.mustache b/modules/openapi-generator/src/main/resources/typescript-nestjs/api.service.mustache index 10e1dca34ed0d1a7c7ccad3433279879a0b03b43..abe11ed06d599ea2c2c6bc8ec715fbe34d1a57f4 100644 --- a/modules/openapi-generator/src/main/resources/typescript-nestjs/api.service.mustache +++ b/modules/openapi-generator/src/main/resources/typescript-nestjs/api.service.mustache @@ -70,7 +70,7 @@ export class {{classname}} { {{/allParams}} {{#hasQueryParams}} - let queryParameters = {}; + let queryParameters = {}; {{#queryParams}} {{#isListContainer}} if ({{paramName}}) { diff --git a/modules/openapi-generator/src/main/resources/typescript-nestjs/apiInterface.mustache b/modules/openapi-generator/src/main/resources/typescript-nestjs/apiInterface.mustache index 5d0ae5039150071bd697d4640382359d13f5af33..19d39ef52db37b2f311be4a3dcd6f0fbbe5e3251 100644 --- a/modules/openapi-generator/src/main/resources/typescript-nestjs/apiInterface.mustache +++ b/modules/openapi-generator/src/main/resources/typescript-nestjs/apiInterface.mustache @@ -26,7 +26,7 @@ export interface {{classname}}Interface { * {{notes}} {{#allParams}}* @param {{paramName}} {{description}} {{/allParams}}*/ - {{nickname}}({{#allParams}}{{paramName}}{{^required}}?{{/required}}: {{{dataType}}}, {{/allParams}}extraHttpRequestParams?: any): Observable<{{#returnType}}{{{returnType}}}{{/returnType}}{{^returnType}}{}{{/returnType}}>; + {{nickname}}({{#allParams}}{{paramName}}{{^required}}?{{/required}}: {{{dataType}}}, {{/allParams}}extraHttpRequestParams?: any): Observable<{{{returnType}}}{{^returnType}}{}{{/returnType}}>; {{/operation}} } diff --git a/modules/openapi-generator/src/main/resources/typescript-nestjs/git_push.sh.mustache b/modules/openapi-generator/src/main/resources/typescript-nestjs/git_push.sh.mustache index 8b3f689c9121a65080ad038d37a2036b01e559a1..f0bed5bd84155f05bc3cdc67af008f524efb38a6 100755 --- a/modules/openapi-generator/src/main/resources/typescript-nestjs/git_push.sh.mustache +++ b/modules/openapi-generator/src/main/resources/typescript-nestjs/git_push.sh.mustache @@ -55,4 +55,3 @@ 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/typescript-nestjs/licenseInfo.mustache b/modules/openapi-generator/src/main/resources/typescript-nestjs/licenseInfo.mustache index 835764cfc729d721063604e603a10808335e97c8..16ba21d203d0eeb4aaad31474c615056cc169d3f 100644 --- a/modules/openapi-generator/src/main/resources/typescript-nestjs/licenseInfo.mustache +++ b/modules/openapi-generator/src/main/resources/typescript-nestjs/licenseInfo.mustache @@ -2,8 +2,8 @@ * {{{appName}}} * {{{appDescription}}} * - * {{#version}}The version of the OpenAPI document: {{{version}}}{{/version}} - * {{#infoEmail}}Contact: {{{infoEmail}}}{{/infoEmail}} + * {{#version}}The version of the OpenAPI document: {{{.}}}{{/version}} + * {{#infoEmail}}Contact: {{{.}}}{{/infoEmail}} * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech diff --git a/modules/openapi-generator/src/main/resources/typescript-nestjs/model.mustache b/modules/openapi-generator/src/main/resources/typescript-nestjs/model.mustache index 0afee5327317c1019fe991745b3a385cada31651..b8cc1f7e3a34aa368363367b07e854a2f72ded63 100644 --- a/modules/openapi-generator/src/main/resources/typescript-nestjs/model.mustache +++ b/modules/openapi-generator/src/main/resources/typescript-nestjs/model.mustache @@ -8,7 +8,7 @@ import { {{classname}} } from './{{filename}}'; {{#description}} /** - * {{{description}}} + * {{{.}}} */ {{/description}} {{#isEnum}}{{>modelEnum}}{{/isEnum}}{{^isEnum}}{{#isAlias}}{{>modelAlias}}{{/isAlias}}{{^isAlias}}{{#taggedUnions}}{{>modelTaggedUnion}}{{/taggedUnions}}{{^taggedUnions}}{{#oneOf}}{{#-first}}{{>modelOneOf}}{{/-first}}{{/oneOf}}{{^oneOf}}{{>modelGeneric}}{{/oneOf}}{{/taggedUnions}}{{/isAlias}}{{/isEnum}} diff --git a/modules/openapi-generator/src/main/resources/typescript-nestjs/modelGeneric.mustache b/modules/openapi-generator/src/main/resources/typescript-nestjs/modelGeneric.mustache index 93d0fb629db375762801e071ec74fac37ce83655..43207b65e3058df79e848050d48f0c56ed7b4107 100644 --- a/modules/openapi-generator/src/main/resources/typescript-nestjs/modelGeneric.mustache +++ b/modules/openapi-generator/src/main/resources/typescript-nestjs/modelGeneric.mustache @@ -2,7 +2,7 @@ export interface {{classname}}{{#allParents}}{{#-first}} extends {{/-first}}{{{. {{#vars}} {{#description}} /** - * {{{description}}} + * {{{.}}} */ {{/description}} {{#isReadOnly}}readonly {{/isReadOnly}}{{{name}}}{{^required}}?{{/required}}: {{#isEnum}}{{{datatypeWithEnum}}}{{/isEnum}}{{^isEnum}}{{{dataType}}}{{/isEnum}}{{#isNullable}} | null{{/isNullable}}; diff --git a/modules/openapi-generator/src/main/resources/typescript-nestjs/modelOneOf.mustache b/modules/openapi-generator/src/main/resources/typescript-nestjs/modelOneOf.mustache index 0763eaacf1e9e7615ab78d27153470446ca0e0f9..f6f30e029a76d8511fa4dbee9ef060fe12eef549 100644 --- a/modules/openapi-generator/src/main/resources/typescript-nestjs/modelOneOf.mustache +++ b/modules/openapi-generator/src/main/resources/typescript-nestjs/modelOneOf.mustache @@ -8,7 +8,7 @@ import { {{/hasImports}} /** * @type {{classname}}{{#description}} - * {{{description}}}{{/description}} + * {{{.}}}{{/description}} * @export */ export type {{classname}} = {{#oneOf}}{{{.}}}{{^-last}} | {{/-last}}{{/oneOf}}; diff --git a/modules/openapi-generator/src/main/resources/typescript-nestjs/modelTaggedUnion.mustache b/modules/openapi-generator/src/main/resources/typescript-nestjs/modelTaggedUnion.mustache index 0189ea8b0ecdfd791a12cb71c19faec8b66f5135..24a9c0f0b60fdfa6a6e717343405ca0f987b616f 100644 --- a/modules/openapi-generator/src/main/resources/typescript-nestjs/modelTaggedUnion.mustache +++ b/modules/openapi-generator/src/main/resources/typescript-nestjs/modelTaggedUnion.mustache @@ -7,10 +7,10 @@ export interface {{classname}} { {{>modelGenericAdditionalProperties}} {{#allVars}} {{#description}} /** - * {{{description}}} + * {{{.}}} */ {{/description}} - {{name}}{{^required}}?{{/required}}: {{#discriminatorValue}}'{{discriminatorValue}}'{{/discriminatorValue}}{{^discriminatorValue}}{{#isEnum}}{{{datatypeWithEnum}}}{{/isEnum}}{{^isEnum}}{{{dataType}}}{{/isEnum}}{{/discriminatorValue}}{{#isNullable}} | null{{/isNullable}}; + {{name}}{{^required}}?{{/required}}: {{#discriminatorValue}}'{{.}}'{{/discriminatorValue}}{{^discriminatorValue}}{{#isEnum}}{{{datatypeWithEnum}}}{{/isEnum}}{{^isEnum}}{{{dataType}}}{{/isEnum}}{{/discriminatorValue}}{{#isNullable}} | null{{/isNullable}}; {{/allVars}} } {{>modelGenericEnums}} diff --git a/modules/openapi-generator/src/main/resources/typescript-nestjs/nodemon-debug.mustache b/modules/openapi-generator/src/main/resources/typescript-nestjs/nodemon-debug.mustache index f34d1d7b90a3fcd4556ba8dc35fabeb7141b765e..b6a38abc01149c8abf004f8f2f9caef31b9f97f2 100644 --- a/modules/openapi-generator/src/main/resources/typescript-nestjs/nodemon-debug.mustache +++ b/modules/openapi-generator/src/main/resources/typescript-nestjs/nodemon-debug.mustache @@ -4,4 +4,3 @@ "ignore": ["src/**/*.spec.ts"], "exec": "node --inspect-brk -r ts-node/register -r tsconfig-paths/register src/main.ts" } - \ No newline at end of file diff --git a/modules/openapi-generator/src/main/resources/typescript-nestjs/package.mustache b/modules/openapi-generator/src/main/resources/typescript-nestjs/package.mustache index fae4aca2ac3a175b87c55ad3e5c6ea222d6f52aa..55bd81ca901cc9616681922500285dc64bc96543 100644 --- a/modules/openapi-generator/src/main/resources/typescript-nestjs/package.mustache +++ b/modules/openapi-generator/src/main/resources/typescript-nestjs/package.mustache @@ -48,7 +48,7 @@ "tslint": "5.18.0", "typescript": "3.5.3", "wait-on": "^3.2.0" - }, + }, "jest": { "moduleFileExtensions": [ "js", diff --git a/modules/openapi-generator/src/main/resources/typescript-nestjs/tsconfig.mustache b/modules/openapi-generator/src/main/resources/typescript-nestjs/tsconfig.mustache index f617a1397401d13a392b97e61425de8fb7d2cb33..2e51b4661df256439945d4f869ec124398f39bab 100644 --- a/modules/openapi-generator/src/main/resources/typescript-nestjs/tsconfig.mustache +++ b/modules/openapi-generator/src/main/resources/typescript-nestjs/tsconfig.mustache @@ -6,7 +6,7 @@ "emitDecoratorMetadata": true, "experimentalDecorators": true, "target": "{{#supportsES6}}es6{{/supportsES6}}{{^supportsES6}}es5{{/supportsES6}}", - "sourceMap": true, + "sourceMap": true, "outDir": "./dist", "baseUrl": "./", "incremental": true 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 081893a932f20b789b1c9dc1bc42b69eee1cbcf5..6b7154dd6c8917d7f287f3885b6d92756cb39bf7 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 @@ -154,7 +154,7 @@ export class {{classname}} { * @param {{paramName}} {{description}} {{/allParams}} */ - public async {{nickname}} ({{#allParams}}{{paramName}}{{^required}}?{{/required}}: {{{dataType}}}, {{/allParams}}options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; {{#returnType}}body: {{{returnType}}}; {{/returnType}}{{^returnType}}body?: any; {{/returnType}} }> { + public async {{nickname}} ({{#allParams}}{{paramName}}{{^required}}?{{/required}}: {{{dataType}}}, {{/allParams}}options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; {{#returnType}}body: {{{.}}}; {{/returnType}}{{^returnType}}body?: any; {{/returnType}} }> { const localVarPath = this.basePath + '{{{path}}}'{{#pathParams}} .replace('{' + '{{baseName}}' + '}', encodeURIComponent(String({{paramName}}))){{/pathParams}}; let localVarQueryParameters: any = {}; @@ -261,13 +261,13 @@ export class {{classname}} { localVarRequestOptions.form = localVarFormParams; } } - return new Promise<{ response: http.IncomingMessage; {{#returnType}}body: {{{returnType}}}; {{/returnType}}{{^returnType}}body?: any; {{/returnType}} }>((resolve, reject) => { + return new Promise<{ response: http.IncomingMessage; {{#returnType}}body: {{{.}}}; {{/returnType}}{{^returnType}}body?: any; {{/returnType}} }>((resolve, reject) => { localVarRequest(localVarRequestOptions, (error, response, body) => { if (error) { reject(error); } else { {{#returnType}} - body = ObjectSerializer.deserialize(body, "{{{returnType}}}"); + body = ObjectSerializer.deserialize(body, "{{{.}}}"); {{/returnType}} if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { resolve({ response: response, body: body }); diff --git a/modules/openapi-generator/src/main/resources/typescript-node/git_push.sh.mustache b/modules/openapi-generator/src/main/resources/typescript-node/git_push.sh.mustache index 8b3f689c9121a65080ad038d37a2036b01e559a1..f0bed5bd84155f05bc3cdc67af008f524efb38a6 100755 --- a/modules/openapi-generator/src/main/resources/typescript-node/git_push.sh.mustache +++ b/modules/openapi-generator/src/main/resources/typescript-node/git_push.sh.mustache @@ -55,4 +55,3 @@ 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/typescript-node/licenseInfo.mustache b/modules/openapi-generator/src/main/resources/typescript-node/licenseInfo.mustache index 9866f297a4d7e43b6e321965c75edff6e152b50a..be193d0c4fe807d927a4e2a2329b5c615954608c 100644 --- a/modules/openapi-generator/src/main/resources/typescript-node/licenseInfo.mustache +++ b/modules/openapi-generator/src/main/resources/typescript-node/licenseInfo.mustache @@ -2,8 +2,8 @@ * {{{appName}}} * {{{appDescription}}} * - * {{#version}}The version of the OpenAPI document: {{{version}}}{{/version}} - * {{#infoEmail}}Contact: {{{infoEmail}}}{{/infoEmail}} + * {{#version}}The version of the OpenAPI document: {{{.}}}{{/version}} + * {{#infoEmail}}Contact: {{{.}}}{{/infoEmail}} * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech 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 1f0d487fdc49c22af189fe4d7a15061bc9a6bd56..2f981689c28d736b6469c74e72075ecc0ee62e83 100644 --- a/modules/openapi-generator/src/main/resources/typescript-node/model.mustache +++ b/modules/openapi-generator/src/main/resources/typescript-node/model.mustache @@ -8,15 +8,15 @@ import { {{classname}} } from '{{filename}}'; {{#description}} /** -* {{{description}}} +* {{{.}}} */ {{/description}} {{^isEnum}} -export class {{classname}} {{#parent}}extends {{{parent}}} {{/parent}}{ +export class {{classname}} {{#parent}}extends {{{.}}} {{/parent}}{ {{#vars}} {{#description}} /** - * {{{description}}} + * {{{.}}} */ {{/description}} '{{name}}'{{^required}}?{{/required}}: {{#isEnum}}{{{datatypeWithEnum}}}{{/isEnum}}{{^isEnum}}{{{dataType}}}{{#isNullable}} | null{{/isNullable}}{{/isEnum}}; diff --git a/modules/openapi-generator/src/main/resources/typescript-redux-query/apis.mustache b/modules/openapi-generator/src/main/resources/typescript-redux-query/apis.mustache index 5f6391541fdc49c9540591708f9073590e172e65..17751afc1971da309182efc2950bb0e2b11b9941 100644 --- a/modules/openapi-generator/src/main/resources/typescript-redux-query/apis.mustache +++ b/modules/openapi-generator/src/main/resources/typescript-redux-query/apis.mustache @@ -36,7 +36,7 @@ export interface {{operationIdCamelCase}}Request { * {{&summary}} {{/summary}} */ -function {{nickname}}Raw<T>({{#allParams.0}}requestParameters: {{operationIdCamelCase}}Request,{{/allParams.0}} requestConfig: runtime.TypedQueryConfig<T, {{#returnType}}{{{returnType}}}{{/returnType}}{{^returnType}}void{{/returnType}}> = {}): QueryConfig<T> { +function {{nickname}}Raw<T>({{#allParams.0}}requestParameters: {{operationIdCamelCase}}Request,{{/allParams.0}} requestConfig: runtime.TypedQueryConfig<T, {{{returnType}}}{{^returnType}}void{{/returnType}}> = {}): QueryConfig<T> { {{#allParams}} {{#required}} if (requestParameters.{{paramName}} === null || requestParameters.{{paramName}} === undefined) { @@ -223,12 +223,12 @@ function {{nickname}}Raw<T>({{#allParams.0}}requestParameters: {{operationIdCame {{/summary}} */ {{^useSingleRequestParameter}} -export function {{nickname}}<T>({{#allParams}}{{paramName}}{{^required}}?{{/required}}: {{#isEnum}}{{{datatypeWithEnum}}}{{/isEnum}}{{^isEnum}}{{{dataType}}}{{/isEnum}}{{^-last}}, {{/-last}}, {{/allParams}}requestConfig?: runtime.TypedQueryConfig<T, {{#returnType}}{{{returnType}}}{{/returnType}}{{^returnType}}void{{/returnType}}>): QueryConfig<T> { +export function {{nickname}}<T>({{#allParams}}{{paramName}}{{^required}}?{{/required}}: {{#isEnum}}{{{datatypeWithEnum}}}{{/isEnum}}{{^isEnum}}{{{dataType}}}{{/isEnum}}{{^-last}}, {{/-last}}, {{/allParams}}requestConfig?: runtime.TypedQueryConfig<T, {{{returnType}}}{{^returnType}}void{{/returnType}}>): QueryConfig<T> { return {{nickname}}Raw({{#allParams.0}}{ {{#allParams}}{{paramName}}: {{paramName}}{{^-last}}, {{/-last}}{{/allParams}} }, {{/allParams.0}} requestConfig); } {{/useSingleRequestParameter}} {{#useSingleRequestParameter}} -export function {{nickname}}<T>({{#allParams.0}}requestParameters: {{operationIdCamelCase}}Request,{{/allParams.0}} requestConfig?: runtime.TypedQueryConfig<T, {{#returnType}}{{{returnType}}}{{/returnType}}{{^returnType}}void{{/returnType}}>): QueryConfig<T> { +export function {{nickname}}<T>({{#allParams.0}}requestParameters: {{operationIdCamelCase}}Request,{{/allParams.0}} requestConfig?: runtime.TypedQueryConfig<T, {{{returnType}}}{{^returnType}}void{{/returnType}}>): QueryConfig<T> { return {{nickname}}Raw({{#allParams.0}}requestParameters,{{/allParams.0}} requestConfig); } {{/useSingleRequestParameter}} diff --git a/modules/openapi-generator/src/main/resources/typescript-redux-query/licenseInfo.mustache b/modules/openapi-generator/src/main/resources/typescript-redux-query/licenseInfo.mustache index 9866f297a4d7e43b6e321965c75edff6e152b50a..be193d0c4fe807d927a4e2a2329b5c615954608c 100644 --- a/modules/openapi-generator/src/main/resources/typescript-redux-query/licenseInfo.mustache +++ b/modules/openapi-generator/src/main/resources/typescript-redux-query/licenseInfo.mustache @@ -2,8 +2,8 @@ * {{{appName}}} * {{{appDescription}}} * - * {{#version}}The version of the OpenAPI document: {{{version}}}{{/version}} - * {{#infoEmail}}Contact: {{{infoEmail}}}{{/infoEmail}} + * {{#version}}The version of the OpenAPI document: {{{.}}}{{/version}} + * {{#infoEmail}}Contact: {{{.}}}{{/infoEmail}} * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech diff --git a/modules/openapi-generator/src/main/resources/typescript-redux-query/modelAllOf.mustache b/modules/openapi-generator/src/main/resources/typescript-redux-query/modelAllOf.mustache index 93eed6a1b074d84b99d6011281079d01f68970f0..2874ec09ed1a2b083d11f0a8c1d487a772796405 100644 --- a/modules/openapi-generator/src/main/resources/typescript-redux-query/modelAllOf.mustache +++ b/modules/openapi-generator/src/main/resources/typescript-redux-query/modelAllOf.mustache @@ -10,7 +10,7 @@ import { {{/hasImports}} /** * @type {{classname}}{{#description}} - * {{{description}}}{{/description}} + * {{{.}}}{{/description}} * @export */ export interface {{classname}} extends {{#allOf}}{{{.}}}{{^-last}}, {{/-last}}{{/allOf}} { diff --git a/modules/openapi-generator/src/main/resources/typescript-redux-query/modelOneOf.mustache b/modules/openapi-generator/src/main/resources/typescript-redux-query/modelOneOf.mustache index f6dacdd6fdb5d89ce6dcf50fc0cd951dd81c4b6c..d29930ce267f8d5bc46b54ad3a65dda492eb9e3c 100644 --- a/modules/openapi-generator/src/main/resources/typescript-redux-query/modelOneOf.mustache +++ b/modules/openapi-generator/src/main/resources/typescript-redux-query/modelOneOf.mustache @@ -10,7 +10,7 @@ import { {{/hasImports}} /** * @type {{classname}}{{#description}} - * {{{description}}}{{/description}} + * {{{.}}}{{/description}} * @export */ export type {{classname}} = {{#oneOf}}{{{.}}}{{^-last}} | {{/-last}}{{/oneOf}}; diff --git a/modules/openapi-generator/src/main/resources/typescript-rxjs/apis.mustache b/modules/openapi-generator/src/main/resources/typescript-rxjs/apis.mustache index a37b5309c60f30318571accc161d5f104da9d0e4..ff7594b46bd964aa27cdcdf8a033598ec41c70e4 100644 --- a/modules/openapi-generator/src/main/resources/typescript-rxjs/apis.mustache +++ b/modules/openapi-generator/src/main/resources/typescript-rxjs/apis.mustache @@ -24,7 +24,7 @@ export interface {{operationIdCamelCase}}Request { {{/operations}} {{#operations}} /** - * {{#description}}{{{description}}}{{/description}}{{^description}}no description{{/description}} + * {{{description}}}{{^description}}no description{{/description}} */ export class {{classname}} extends BaseAPI { @@ -37,11 +37,11 @@ export class {{classname}} extends BaseAPI { * {{&summary}} {{/summary}} */ - {{nickname}}({{#allParams.0}}{ {{#allParams}}{{paramName}}{{#vendorExtensions.x-param-name-alternative}}: {{vendorExtensions.x-param-name-alternative}}{{/vendorExtensions.x-param-name-alternative}}{{^-last}}, {{/-last}}{{/allParams}} }: {{operationIdCamelCase}}Request{{/allParams.0}}): Observable<{{#returnType}}{{{returnType}}}{{/returnType}}{{^returnType}}void{{/returnType}}> + {{nickname}}({{#allParams.0}}{ {{#allParams}}{{paramName}}{{#vendorExtensions.x-param-name-alternative}}: {{vendorExtensions.x-param-name-alternative}}{{/vendorExtensions.x-param-name-alternative}}{{^-last}}, {{/-last}}{{/allParams}} }: {{operationIdCamelCase}}Request{{/allParams.0}}): Observable<{{{returnType}}}{{^returnType}}void{{/returnType}}> {{#withProgressSubscriber}} - {{nickname}}({{#allParams.0}}{ {{#allParams}}{{paramName}}{{#vendorExtensions.x-param-name-alternative}}: {{vendorExtensions.x-param-name-alternative}}{{/vendorExtensions.x-param-name-alternative}}{{^-last}}, {{/-last}}{{/allParams}} }: {{operationIdCamelCase}}Request, {{/allParams.0}}opts?: Pick<OperationOpts, 'progressSubscriber'>): Observable<{{#returnType}}{{{returnType}}}{{/returnType}}{{^returnType}}void{{/returnType}}> + {{nickname}}({{#allParams.0}}{ {{#allParams}}{{paramName}}{{#vendorExtensions.x-param-name-alternative}}: {{vendorExtensions.x-param-name-alternative}}{{/vendorExtensions.x-param-name-alternative}}{{^-last}}, {{/-last}}{{/allParams}} }: {{operationIdCamelCase}}Request, {{/allParams.0}}opts?: Pick<OperationOpts, 'progressSubscriber'>): Observable<{{{returnType}}}{{^returnType}}void{{/returnType}}> {{/withProgressSubscriber}} - {{nickname}}({{#allParams.0}}{ {{#allParams}}{{paramName}}{{#vendorExtensions.x-param-name-alternative}}: {{vendorExtensions.x-param-name-alternative}}{{/vendorExtensions.x-param-name-alternative}}{{^-last}}, {{/-last}}{{/allParams}} }: {{operationIdCamelCase}}Request, {{/allParams.0}}opts?: OperationOpts): Observable<{{#returnType}}RawAjaxResponse<{{{returnType}}}>{{/returnType}}{{^returnType}}void | RawAjaxResponse<void>{{/returnType}}> + {{nickname}}({{#allParams.0}}{ {{#allParams}}{{paramName}}{{#vendorExtensions.x-param-name-alternative}}: {{vendorExtensions.x-param-name-alternative}}{{/vendorExtensions.x-param-name-alternative}}{{^-last}}, {{/-last}}{{/allParams}} }: {{operationIdCamelCase}}Request, {{/allParams.0}}opts?: OperationOpts): Observable<{{#returnType}}RawAjaxResponse<{{{.}}}>{{/returnType}}{{^returnType}}void | RawAjaxResponse<void>{{/returnType}}> {{nickname}}({{#allParams.0}}{ {{#allParams}}{{paramName}}{{#vendorExtensions.x-param-name-alternative}}: {{vendorExtensions.x-param-name-alternative}}{{/vendorExtensions.x-param-name-alternative}}{{^-last}}, {{/-last}}{{/allParams}} }: {{operationIdCamelCase}}Request, {{/allParams.0}}opts?: OperationOpts): Observable<{{#returnType}}{{{returnType}}} | RawAjaxResponse<{{{returnType}}}>{{/returnType}}{{^returnType}}void | RawAjaxResponse<void>{{/returnType}}> { {{#hasParams}} {{#allParams}} @@ -181,7 +181,7 @@ export class {{classname}} extends BaseAPI { {{/formParams}} {{/hasFormParams}} - return this.request<{{#returnType}}{{{returnType}}}{{/returnType}}{{^returnType}}void{{/returnType}}>({ + return this.request<{{{returnType}}}{{^returnType}}void{{/returnType}}>({ url: '{{{path}}}'{{#pathParams}}.replace({{=<% %>=}}'{<%baseName%>}'<%={{ }}=%>, encodeURI({{> paramNamePartial}})){{/pathParams}}, method: '{{httpMethod}}', {{#hasHttpHeaders}} diff --git a/modules/openapi-generator/src/main/resources/typescript-rxjs/licenseInfo.mustache b/modules/openapi-generator/src/main/resources/typescript-rxjs/licenseInfo.mustache index 9866f297a4d7e43b6e321965c75edff6e152b50a..be193d0c4fe807d927a4e2a2329b5c615954608c 100644 --- a/modules/openapi-generator/src/main/resources/typescript-rxjs/licenseInfo.mustache +++ b/modules/openapi-generator/src/main/resources/typescript-rxjs/licenseInfo.mustache @@ -2,8 +2,8 @@ * {{{appName}}} * {{{appDescription}}} * - * {{#version}}The version of the OpenAPI document: {{{version}}}{{/version}} - * {{#infoEmail}}Contact: {{{infoEmail}}}{{/infoEmail}} + * {{#version}}The version of the OpenAPI document: {{{.}}}{{/version}} + * {{#infoEmail}}Contact: {{{.}}}{{/infoEmail}} * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech diff --git a/modules/openapi-generator/src/main/resources/typescript-rxjs/modelAllOf.mustache b/modules/openapi-generator/src/main/resources/typescript-rxjs/modelAllOf.mustache index 2c4f686eacb949bf12c625fb6a30aa2eab06c18e..c38e8ab9372cbfe36b804949010b8cb3813b08d6 100644 --- a/modules/openapi-generator/src/main/resources/typescript-rxjs/modelAllOf.mustache +++ b/modules/openapi-generator/src/main/resources/typescript-rxjs/modelAllOf.mustache @@ -8,7 +8,7 @@ import { {{/hasImports}} /** * @type {{classname}}{{#description}} - * {{{description}}}{{/description}} + * {{{.}}}{{/description}} * @export */ export type {{classname}} = {{#allOf}}{{{.}}}{{^-last}} & {{/-last}}{{/allOf}}; \ No newline at end of file diff --git a/modules/openapi-generator/src/main/resources/typescript-rxjs/modelGeneric.mustache b/modules/openapi-generator/src/main/resources/typescript-rxjs/modelGeneric.mustache index 447c1de6e5a918e88fc2f65cfddd99f442c093ba..ddeaf2898c369b497b88a8c100fc419061fb4995 100644 --- a/modules/openapi-generator/src/main/resources/typescript-rxjs/modelGeneric.mustache +++ b/modules/openapi-generator/src/main/resources/typescript-rxjs/modelGeneric.mustache @@ -7,17 +7,17 @@ import { {{/hasImports}} /**{{#description}} - * {{{description}}}{{/description}} + * {{{.}}}{{/description}} * @export * @interface {{classname}} */ -export interface {{classname}} {{#parent}}extends {{{parent}}} {{/parent}}{ +export interface {{classname}} {{#parent}}extends {{{.}}} {{/parent}}{ {{#additionalPropertiesType}} [key: string]: {{{additionalPropertiesType}}}{{#hasVars}} | any{{/hasVars}}; {{/additionalPropertiesType}} {{#vars}} /**{{#description}} - * {{{description}}}{{/description}} + * {{{.}}}{{/description}} * @type {{=<% %>=}}{<%&datatype%>}<%={{ }}=%> * @memberof {{classname}} */ diff --git a/modules/openapi-generator/src/main/resources/typescript-rxjs/modelOneOf.mustache b/modules/openapi-generator/src/main/resources/typescript-rxjs/modelOneOf.mustache index 11e4f25fba487d07da3011ed804df646c2e87624..bdd72c001937533f0a2ad135c08401df3437c386 100644 --- a/modules/openapi-generator/src/main/resources/typescript-rxjs/modelOneOf.mustache +++ b/modules/openapi-generator/src/main/resources/typescript-rxjs/modelOneOf.mustache @@ -8,7 +8,7 @@ import { {{/hasImports}} /** * @type {{classname}}{{#description}} - * {{{description}}}{{/description}} + * {{{.}}}{{/description}} * @export */ export type {{classname}} = {{#oneOf}}{{{.}}}{{^-last}} | {{/-last}}{{/oneOf}}; \ No newline at end of file diff --git a/modules/openapi-generator/src/main/resources/typescript-rxjs/runtime.mustache b/modules/openapi-generator/src/main/resources/typescript-rxjs/runtime.mustache index cb89d5cedbf02afde29bbf0459b716531a5185c7..e4af4c84d3defb79034cdcc9e2638f10a0074ba2 100644 --- a/modules/openapi-generator/src/main/resources/typescript-rxjs/runtime.mustache +++ b/modules/openapi-generator/src/main/resources/typescript-rxjs/runtime.mustache @@ -147,7 +147,7 @@ export type HttpBody = Json | FormData; export interface RequestOpts extends AjaxRequest { query?: HttpQuery; // additional prop - // the following props have improved types over AjaxRequest + // the following props have improved types over AjaxRequest method: HttpMethod; headers?: HttpHeaders; body?: HttpBody; @@ -168,7 +168,7 @@ export interface OperationOpts { responseOpts?: ResponseOpts; } -// AjaxResponse with typed response +// AjaxResponse with typed response export interface RawAjaxResponse<T> extends AjaxResponse { response: T; } diff --git a/modules/openapi-generator/src/main/resources/typescript/README.mustache b/modules/openapi-generator/src/main/resources/typescript/README.mustache index d1c61395920d37cae391e6256230ec2817377938..3da8a111339d25473985e5998ec04e89fb78b69b 100644 --- a/modules/openapi-generator/src/main/resources/typescript/README.mustache +++ b/modules/openapi-generator/src/main/resources/typescript/README.mustache @@ -1,6 +1,6 @@ ## {{npmName}}@{{npmVersion}} -This generator creates TypeScript/JavaScript client that utilizes {{framework}}. +This generator creates TypeScript/JavaScript client that utilizes {{framework}}. ### Building diff --git a/modules/openapi-generator/src/main/resources/typescript/api/api.mustache b/modules/openapi-generator/src/main/resources/typescript/api/api.mustache index 1d36944043b2fe401f676ddaa5613f5ae618d943..1ae6103da095c3866b7c1ae6467429ec39a201c6 100644 --- a/modules/openapi-generator/src/main/resources/typescript/api/api.mustache +++ b/modules/openapi-generator/src/main/resources/typescript/api/api.mustache @@ -20,7 +20,7 @@ import { {{classname}} } from '..{{filename}}{{extensionForDeno}}'; {{#operations}} /** - * {{#description}}{{{description}}}{{/description}}{{^description}}no description{{/description}} + * {{{description}}}{{^description}}no description{{/description}} */ {{#useInversify}} @injectable() @@ -159,7 +159,7 @@ export class {{classname}}ResponseProcessor { * @params response Response returned by the server for a request to {{nickname}} * @throws ApiException if the response code was not in [200, 299] */ - public async {{nickname}}(response: ResponseContext): Promise<{{#returnType}}{{{returnType}}}{{/returnType}} {{^returnType}}void{{/returnType}}> { + public async {{nickname}}(response: ResponseContext): Promise<{{{returnType}}} {{^returnType}}void{{/returnType}}> { const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); {{#responses}} if (isCodeInRange("{{code}}", response.httpStatusCode)) { diff --git a/modules/openapi-generator/src/main/resources/typescript/api/baseapi.mustache b/modules/openapi-generator/src/main/resources/typescript/api/baseapi.mustache index e33b699f1e76e7a02423b004dfa173a5d3737548..aeb3f5207cdf81328d22be47e52a0c818f2b4e1d 100644 --- a/modules/openapi-generator/src/main/resources/typescript/api/baseapi.mustache +++ b/modules/openapi-generator/src/main/resources/typescript/api/baseapi.mustache @@ -17,7 +17,7 @@ export const COLLECTION_FORMATS = { /** - * + * * @export * @class BaseAPI */ @@ -31,7 +31,7 @@ export class BaseAPIRequestFactory { }; /** - * + * * @export * @class RequiredError * @extends {Error} diff --git a/modules/openapi-generator/src/main/resources/typescript/api/exception.mustache b/modules/openapi-generator/src/main/resources/typescript/api/exception.mustache index fb8d314eb41dc52851a5d06469954fa7e0cb0c4d..ca5a926c5969a2fa664e5b4ff493666c64c6e1ab 100644 --- a/modules/openapi-generator/src/main/resources/typescript/api/exception.mustache +++ b/modules/openapi-generator/src/main/resources/typescript/api/exception.mustache @@ -1,5 +1,5 @@ /** - * Represents an error caused by an api call i.e. it has attributes for a HTTP status code + * Represents an error caused by an api call i.e. it has attributes for a HTTP status code * and the returned body object. * * Example @@ -9,6 +9,6 @@ */ export class ApiException<T> extends Error { public constructor(public code: number, public body: T) { - super("HTTP-Code: " + code + "\nMessage: " + JSON.stringify(body)) + super("HTTP-Code: " + code + "\nMessage: " + JSON.stringify(body)) } } diff --git a/modules/openapi-generator/src/main/resources/typescript/api/middleware.mustache b/modules/openapi-generator/src/main/resources/typescript/api/middleware.mustache index 578756d534dd759829151c065839bf958d3d2b04..259e594f53358760653bb74d04f8cdb6d14cfa20 100644 --- a/modules/openapi-generator/src/main/resources/typescript/api/middleware.mustache +++ b/modules/openapi-generator/src/main/resources/typescript/api/middleware.mustache @@ -34,7 +34,7 @@ export class PromiseMiddlewareWrapper implements Middleware { pre(context: RequestContext): Observable<RequestContext> { return from(this.middleware.pre(context)); } - + post(context: ResponseContext): Observable<ResponseContext> { return from(this.middleware.post(context)); } diff --git a/modules/openapi-generator/src/main/resources/typescript/git_push.sh.mustache b/modules/openapi-generator/src/main/resources/typescript/git_push.sh.mustache index 8a32e53995d6e5f11738c11bd44f8c6663da86f3..90e9e063940ba3b15a3031503bd75a3622a70f2e 100755 --- a/modules/openapi-generator/src/main/resources/typescript/git_push.sh.mustache +++ b/modules/openapi-generator/src/main/resources/typescript/git_push.sh.mustache @@ -28,7 +28,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 @@ -49,4 +49,3 @@ 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" git push origin master 2>&1 | grep -v 'To https' - diff --git a/modules/openapi-generator/src/main/resources/typescript/http/http.mustache b/modules/openapi-generator/src/main/resources/typescript/http/http.mustache index 725b8e9a64a93fcde0ad51204c7888229f0c198a..71c7dae692b5ca8ba32decca9bffa14c79b08868 100644 --- a/modules/openapi-generator/src/main/resources/typescript/http/http.mustache +++ b/modules/openapi-generator/src/main/resources/typescript/http/http.mustache @@ -7,7 +7,7 @@ import * as FormData from "form-data"; {{#platforms}} {{^deno}} // typings of url-parse are incorrect... -// @ts-ignore +// @ts-ignore import * as URLParse from "url-parse"; {{/deno}} {{/platforms}} @@ -181,7 +181,7 @@ export class RequestContext { this.headers["Cookie"] += name + "=" + value + "; "; } - public setHeaderParam(key: string, value: string): void { + public setHeaderParam(key: string, value: string): void { this.headers[key] = value; } } diff --git a/modules/openapi-generator/src/main/resources/typescript/http/jquery.mustache b/modules/openapi-generator/src/main/resources/typescript/http/jquery.mustache index 9d1427b977fba6ab0fe41c1b926653634dbaf181..e3fade10e6ca9b733eda22f2415dc5483197e884 100644 --- a/modules/openapi-generator/src/main/resources/typescript/http/jquery.mustache +++ b/modules/openapi-generator/src/main/resources/typescript/http/jquery.mustache @@ -24,7 +24,7 @@ export class JQueryHttpLibrary implements HttpLibrary { // If we want a blob, we have to set the xhrFields' responseType AND add a // custom converter to overwrite the default deserialization of JQuery... requestOptions["xhrFields"] = { responseType: 'blob' }; - requestOptions["converters"] = {} + requestOptions["converters"] = {} requestOptions["converters"]["* blob"] = (result:any) => result; requestOptions["dataType"] = "blob"; diff --git a/modules/openapi-generator/src/main/resources/typescript/licenseInfo.mustache b/modules/openapi-generator/src/main/resources/typescript/licenseInfo.mustache index 469fb03940fe3eb12a2be95c6210e2efcac1d7ed..5a08cf75ec86450e105e1ef7c773c4699ae0c083 100644 --- a/modules/openapi-generator/src/main/resources/typescript/licenseInfo.mustache +++ b/modules/openapi-generator/src/main/resources/typescript/licenseInfo.mustache @@ -2,8 +2,8 @@ * {{{appName}}} * {{{appDescription}}} * - * {{#version}}OpenAPI spec version: {{{version}}}{{/version}} - * {{#infoEmail}}Contact: {{{infoEmail}}}{{/infoEmail}} + * {{#version}}OpenAPI spec version: {{{.}}}{{/version}} + * {{#infoEmail}}Contact: {{{.}}}{{/infoEmail}} * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech diff --git a/modules/openapi-generator/src/main/resources/typescript/model/ObjectSerializer.mustache b/modules/openapi-generator/src/main/resources/typescript/model/ObjectSerializer.mustache index 382e7f8d7b4be2b1faa738950b93942078c4d6f9..870b46342b0d3d7ac9fc470a136c25a640a292b0 100644 --- a/modules/openapi-generator/src/main/resources/typescript/model/ObjectSerializer.mustache +++ b/modules/openapi-generator/src/main/resources/typescript/model/ObjectSerializer.mustache @@ -27,7 +27,7 @@ const supportedMediaTypes: { [mediaType: string]: number } = { "application/octet-stream": 0 } - + let enumsMap: Set<string> = new Set<string>([ {{#models}} {{#model}} @@ -123,7 +123,7 @@ export class ObjectSerializer { if (!typeMap[type]) { // in case we dont know the type return data; } - + // Get the actual type of this object type = this.findCorrectType(data, type); diff --git a/modules/openapi-generator/src/main/resources/typescript/model/model.mustache b/modules/openapi-generator/src/main/resources/typescript/model/model.mustache index 3cf7498ceaa766a1e39fa430ac88064a09d2030e..e0e4f0bf39f61d2f8b659f3c68ea9d9b26364c1f 100644 --- a/modules/openapi-generator/src/main/resources/typescript/model/model.mustache +++ b/modules/openapi-generator/src/main/resources/typescript/model/model.mustache @@ -8,15 +8,15 @@ import { HttpFile } from '../http/http{{extensionForDeno}}'; {{#description}} /** -* {{{description}}} +* {{{.}}} */ {{/description}} {{^isEnum}} -export class {{classname}} {{#parent}}extends {{{parent}}} {{/parent}}{ +export class {{classname}} {{#parent}}extends {{{.}}} {{/parent}}{ {{#vars}} {{#description}} /** - * {{{description}}} + * {{{.}}} */ {{/description}} '{{name}}'{{^required}}?{{/required}}: {{#isEnum}}{{{datatypeWithEnum}}}{{/isEnum}}{{^isEnum}}{{{dataType}}}{{/isEnum}}; @@ -51,7 +51,7 @@ export class {{classname}} {{#parent}}extends {{{parent}}} {{/parent}}{ {{/parent}} } {{/isArray}} - + public constructor() { {{#parent}} super(); diff --git a/modules/openapi-generator/src/main/resources/typescript/services/ObjectParamAPI.mustache b/modules/openapi-generator/src/main/resources/typescript/services/ObjectParamAPI.mustache index 1c34257dcfa7e82d3d909ea7f20f57896456f2c3..e6aabfc1224494bebe29da86d6c803cf5a9a3a1d 100644 --- a/modules/openapi-generator/src/main/resources/typescript/services/ObjectParamAPI.mustache +++ b/modules/openapi-generator/src/main/resources/typescript/services/ObjectParamAPI.mustache @@ -26,7 +26,7 @@ export abstract class AbstractObject{{classname}} { {{/summary}} * @param param the request object */ - public abstract {{nickname}}(param: req.{{classname}}{{operationIdCamelCase}}Request, options?: Configuration): {{#useRxJS}}Observable{{/useRxJS}}{{^useRxJS}}Promise{{/useRxJS}}<{{#returnType}}{{{returnType}}}{{/returnType}}{{^returnType}}void{{/returnType}}>; + public abstract {{nickname}}(param: req.{{classname}}{{operationIdCamelCase}}Request, options?: Configuration): {{#useRxJS}}Observable{{/useRxJS}}{{^useRxJS}}Promise{{/useRxJS}}<{{{returnType}}}{{^returnType}}void{{/returnType}}>; {{/operation}} } diff --git a/modules/openapi-generator/src/main/resources/typescript/services/ObservableAPI.mustache b/modules/openapi-generator/src/main/resources/typescript/services/ObservableAPI.mustache index 209436b07b41b3de682dede4138f06b3329ad554..036d44dadf50719b7b5428b3e31b8a66f1078ed3 100644 --- a/modules/openapi-generator/src/main/resources/typescript/services/ObservableAPI.mustache +++ b/modules/openapi-generator/src/main/resources/typescript/services/ObservableAPI.mustache @@ -14,7 +14,7 @@ import { {{{ classname }}} } from "../models/{{{ classFilename }}}"; export abstract class AbstractObservable{{classname}} { {{#operation}} - public abstract {{nickname}}({{#allParams}}{{paramName}}{{^required}}?{{/required}}: {{{dataType}}}, {{/allParams}}options?: Configuration): Observable<{{#returnType}}{{{returnType}}}{{/returnType}}{{^returnType}}void{{/returnType}}>; + public abstract {{nickname}}({{#allParams}}{{paramName}}{{^required}}?{{/required}}: {{{dataType}}}, {{/allParams}}options?: Configuration): Observable<{{{returnType}}}{{^returnType}}void{{/returnType}}>; {{/operation}} } diff --git a/modules/openapi-generator/src/main/resources/typescript/services/PromiseAPI.mustache b/modules/openapi-generator/src/main/resources/typescript/services/PromiseAPI.mustache index d3403ff707a4734c6d851859f7e26650739bf567..e1455c52c80dcc2e075d7f253f94f33a9bee02d2 100644 --- a/modules/openapi-generator/src/main/resources/typescript/services/PromiseAPI.mustache +++ b/modules/openapi-generator/src/main/resources/typescript/services/PromiseAPI.mustache @@ -13,7 +13,7 @@ import { {{{ classname }}} } from "../models/{{{ classFilename }}}"; export abstract class AbstractPromise{{classname}} { {{#operation}} - public abstract {{nickname}}({{#allParams}}{{paramName}}{{^required}}?{{/required}}: {{{dataType}}}, {{/allParams}}options?: Configuration): Promise<{{#returnType}}{{{returnType}}}{{/returnType}}{{^returnType}}void{{/returnType}}>; + public abstract {{nickname}}({{#allParams}}{{paramName}}{{^required}}?{{/required}}: {{{dataType}}}, {{/allParams}}options?: Configuration): Promise<{{{returnType}}}{{^returnType}}void{{/returnType}}>; {{/operation}} } diff --git a/modules/openapi-generator/src/main/resources/typescript/services/api.mustache b/modules/openapi-generator/src/main/resources/typescript/services/api.mustache index 8992017a706534847f51bf13e92e9b885383ffd2..1494e1f71e656897626203f3c0a0036f30b2d96c 100644 --- a/modules/openapi-generator/src/main/resources/typescript/services/api.mustache +++ b/modules/openapi-generator/src/main/resources/typescript/services/api.mustache @@ -16,7 +16,7 @@ export abstract class Abstract{{classname}}RequestFactory { export abstract class Abstract{{classname}}ResponseProcessor { {{#operation}} - public abstract {{nickname}}(response: ResponseContext): Promise<{{#returnType}}{{{returnType}}}{{/returnType}} {{^returnType}}void{{/returnType}}>; + public abstract {{nickname}}(response: ResponseContext): Promise<{{{returnType}}} {{^returnType}}void{{/returnType}}>; {{/operation}} } diff --git a/modules/openapi-generator/src/main/resources/typescript/services/http.mustache b/modules/openapi-generator/src/main/resources/typescript/services/http.mustache index 89bda7bf3e3d93d0cd14bb97780a60c74347cdec..f234886dfd8443c3ef146865cc1599871203a22e 100644 --- a/modules/openapi-generator/src/main/resources/typescript/services/http.mustache +++ b/modules/openapi-generator/src/main/resources/typescript/services/http.mustache @@ -17,4 +17,3 @@ export abstract class AbstractMiddleware implements {{^useRxJS}}Promise{{/useRxJ export abstract class AbstractServerConfiguration implements BaseServerConfiguration { public abstract makeRequestContext(endpoint: string, httpMethod: HttpMethod): RequestContext; }; - diff --git a/modules/openapi-generator/src/main/resources/typescript/tsconfig.mustache b/modules/openapi-generator/src/main/resources/typescript/tsconfig.mustache index 886f26f68ac3cb77270a5679e84c96a88e40e642..011a217eb0632a7e685529f06c52f7dce972ba1e 100644 --- a/modules/openapi-generator/src/main/resources/typescript/tsconfig.mustache +++ b/modules/openapi-generator/src/main/resources/typescript/tsconfig.mustache @@ -6,7 +6,7 @@ "module": "{{#supportsES6}}es6{{/supportsES6}}{{^supportsES6}}commonjs{{/supportsES6}}", "moduleResolution": "node", "declaration": true, - + /* Additional Checks */ "noUnusedLocals": false, /* Report errors on unused locals. */ // TODO: reenable (unused imports!) "noUnusedParameters": false, /* Report errors on unused parameters. */ // TODO: set to true again diff --git a/modules/openapi-generator/src/main/resources/typescript/types/ObjectParamAPI.mustache b/modules/openapi-generator/src/main/resources/typescript/types/ObjectParamAPI.mustache index 43886364d6c3efa173691c8ffe41660599471904..d44164bd01914fe3d93b1bc13c32c64e135ba7fd 100644 --- a/modules/openapi-generator/src/main/resources/typescript/types/ObjectParamAPI.mustache +++ b/modules/openapi-generator/src/main/resources/typescript/types/ObjectParamAPI.mustache @@ -47,7 +47,7 @@ export class Object{{classname}} { {{/summary}} * @param param the request object */ - public {{nickname}}(param: {{classname}}{{operationIdCamelCase}}Request, options?: Configuration): {{#useRxJS}}Observable{{/useRxJS}}{{^useRxJS}}Promise{{/useRxJS}}<{{#returnType}}{{{returnType}}}{{/returnType}}{{^returnType}}void{{/returnType}}> { + public {{nickname}}(param: {{classname}}{{operationIdCamelCase}}Request, options?: Configuration): {{#useRxJS}}Observable{{/useRxJS}}{{^useRxJS}}Promise{{/useRxJS}}<{{{returnType}}}{{^returnType}}void{{/returnType}}> { return this.api.{{nickname}}({{#allParams}}param.{{paramName}}, {{/allParams}} options){{^useRxJS}}.toPromise(){{/useRxJS}}; } diff --git a/modules/openapi-generator/src/main/resources/typescript/types/ObservableAPI.mustache b/modules/openapi-generator/src/main/resources/typescript/types/ObservableAPI.mustache index da871ce94dde70009f626738a346dac3bedd7f3a..80b41d323641b159827bebb8d6baff29e5d5b6d8 100644 --- a/modules/openapi-generator/src/main/resources/typescript/types/ObservableAPI.mustache +++ b/modules/openapi-generator/src/main/resources/typescript/types/ObservableAPI.mustache @@ -62,7 +62,7 @@ export class Observable{{classname}} { * @param {{paramName}} {{description}} {{/allParams}} */ - public {{nickname}}({{#allParams}}{{paramName}}{{^required}}?{{/required}}: {{{dataType}}}, {{/allParams}}_options?: Configuration): Observable<{{#returnType}}{{{returnType}}}{{/returnType}}{{^returnType}}void{{/returnType}}> { + public {{nickname}}({{#allParams}}{{paramName}}{{^required}}?{{/required}}: {{{dataType}}}, {{/allParams}}_options?: Configuration): Observable<{{{returnType}}}{{^returnType}}void{{/returnType}}> { const requestContextPromise = this.requestFactory.{{nickname}}({{#allParams}}{{paramName}}, {{/allParams}}_options); // build promise chain @@ -80,7 +80,7 @@ export class Observable{{classname}} { return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.{{nickname}}(rsp))); })); } - + {{/operation}} } {{/operations}} diff --git a/modules/openapi-generator/src/main/resources/typescript/types/PromiseAPI.mustache b/modules/openapi-generator/src/main/resources/typescript/types/PromiseAPI.mustache index 9d74dd2a746e6f3b024e02c4ed83c12f33eacc6f..2c424db21fb48968b1068de8644a529dbdc9610b 100644 --- a/modules/openapi-generator/src/main/resources/typescript/types/PromiseAPI.mustache +++ b/modules/openapi-generator/src/main/resources/typescript/types/PromiseAPI.mustache @@ -52,7 +52,7 @@ export class Promise{{classname}} { * @param {{paramName}} {{description}} {{/allParams}} */ - public {{nickname}}({{#allParams}}{{paramName}}{{^required}}?{{/required}}: {{{dataType}}}, {{/allParams}}_options?: Configuration): Promise<{{#returnType}}{{{returnType}}}{{/returnType}}{{^returnType}}void{{/returnType}}> { + public {{nickname}}({{#allParams}}{{paramName}}{{^required}}?{{/required}}: {{{dataType}}}, {{/allParams}}_options?: Configuration): Promise<{{{returnType}}}{{^returnType}}void{{/returnType}}> { const result = this.api.{{nickname}}({{#allParams}}{{paramName}}, {{/allParams}}_options); return result.toPromise(); } diff --git a/modules/openapi-generator/src/main/resources/typescript/util.mustache b/modules/openapi-generator/src/main/resources/typescript/util.mustache index 07317f5828bca21fb4082107e7c4c228d23dce5f..484e07cdffaa1515941a2b6db37c12bf19a844b9 100644 --- a/modules/openapi-generator/src/main/resources/typescript/util.mustache +++ b/modules/openapi-generator/src/main/resources/typescript/util.mustache @@ -1,6 +1,6 @@ /** * Returns if a specific http code is in a given code range - * where the code range is defined as a combination of digits + * where the code range is defined as a combination of digits * and "X" (the letter X) with a length of 3 * * @param codeRange string with length 3 consisting of digits and "X" (the letter X) diff --git a/modules/openapi-generator/src/main/resources/wsdl-schema/jaxb-customization.mustache b/modules/openapi-generator/src/main/resources/wsdl-schema/jaxb-customization.mustache index cfdd31b1b58a732b861bf41599cbd2bbc693d323..02150baedd13d109d07000fa3ab89f0a9b88f06c 100644 --- a/modules/openapi-generator/src/main/resources/wsdl-schema/jaxb-customization.mustache +++ b/modules/openapi-generator/src/main/resources/wsdl-schema/jaxb-customization.mustache @@ -8,7 +8,7 @@ <enableWrapperStyle>true</enableWrapperStyle> <enableAsyncMapping>false</enableAsyncMapping> - + {{#models}} {{#model}} {{^allOf}} @@ -30,7 +30,7 @@ {{/allOf}} {{/model}} {{/models}} - + {{#models}} {{#model}} {{^vars}} @@ -46,5 +46,5 @@ {{/vars}} {{/model}} {{/models}} - + </jaxws:bindings> diff --git a/modules/openapi-generator/src/main/resources/wsdl-schema/wsdl-converter.mustache b/modules/openapi-generator/src/main/resources/wsdl-schema/wsdl-converter.mustache index c136126eb5a1542aec8d9fb8497441d683d4bcc9..d3bc158cd5931bcf95a8b09864b425f3538556fb 100644 --- a/modules/openapi-generator/src/main/resources/wsdl-schema/wsdl-converter.mustache +++ b/modules/openapi-generator/src/main/resources/wsdl-schema/wsdl-converter.mustache @@ -34,7 +34,7 @@ <xs:complexType name="{{classname}}"> {{#description}} <xs:annotation> - <xs:documentation>{{description}}</xs:documentation> + <xs:documentation>{{.}}</xs:documentation> </xs:annotation> {{/description}} <xs:sequence> @@ -44,21 +44,21 @@ <xs:simpleType> {{#description}} <xs:annotation> - <xs:documentation>{{description}}</xs:documentation> + <xs:documentation>{{.}}</xs:documentation> </xs:annotation> {{/description}} <xs:restriction base="xs:{{#isString}}string{{/isString}}{{^isString}}{{#isInteger}}integer{{/isInteger}}{{^isInteger}}{{#isDouble}}double{{/isDouble}}{{^isDouble}}long{{/isDouble}}{{/isInteger}}{{/isString}}"> {{#maximum}} - <xs:maxInclusive value="{{maximum}}" /> + <xs:maxInclusive value="{{.}}" /> {{/maximum}} {{#minimum}} - <xs:minInclusive value="{{minimum}}" /> + <xs:minInclusive value="{{.}}" /> {{/minimum}} {{#maxLength}} - <xs:maxLength value="{{maxLength}}" /> + <xs:maxLength value="{{.}}" /> {{/maxLength}} {{#minLength}} - <xs:minLength value="{{minLength}}" /> + <xs:minLength value="{{.}}" /> {{/minLength}} </xs:restriction> </xs:simpleType> @@ -66,14 +66,14 @@ {{/vendorExtensions.x-prop-has-minormax}} {{^vendorExtensions.x-prop-has-minormax}} {{#isContainer}} - <xs:element minOccurs="{{#minItems}}{{minItems}}{{/minItems}}{{^minItems}}{{#required}}1{{/required}}{{^required}}0{{/required}}{{/minItems}}" maxOccurs="{{#maxItems}}{{maxItems}}{{/maxItems}}{{^maxItems}}unbounded{{/maxItems}}" name="{{baseName}}" type="{{#items}}{{#isModel}}schemas:{{complexType}}{{/isModel}}{{^isModel}}{{#isFreeFormObject}}xs:string{{/isFreeFormObject}}{{^isFreeFormObject}}{{#isString}}xs:{{complexType}}{{/isString}}{{^isString}}{{#isNumeric}}xs:{{complexType}}{{/isNumeric}}{{^isNumeric}}schemas:{{complexType}}{{/isNumeric}}{{/isString}}{{/isFreeFormObject}}{{/isModel}}{{/items}}"{{^description}} /{{/description}}> + <xs:element minOccurs="{{minItems}}{{^minItems}}{{#required}}1{{/required}}{{^required}}0{{/required}}{{/minItems}}" maxOccurs="{{maxItems}}{{^maxItems}}unbounded{{/maxItems}}" name="{{baseName}}" type="{{#items}}{{#isModel}}schemas:{{complexType}}{{/isModel}}{{^isModel}}{{#isFreeFormObject}}xs:string{{/isFreeFormObject}}{{^isFreeFormObject}}{{#isString}}xs:{{complexType}}{{/isString}}{{^isString}}{{#isNumeric}}xs:{{complexType}}{{/isNumeric}}{{^isNumeric}}schemas:{{complexType}}{{/isNumeric}}{{/isString}}{{/isFreeFormObject}}{{/isModel}}{{/items}}"{{^description}} /{{/description}}> {{/isContainer}} {{^isContainer}} <xs:element minOccurs="{{#required}}1{{/required}}{{^required}}0{{/required}}"{{#vendorExtensions.x-prop-has-defaultvalue}} default="{{defaultValue}}"{{/vendorExtensions.x-prop-has-defaultvalue}} name="{{baseName}}" type="{{#isModel}}schemas:{{complexType}}{{/isModel}}{{^isModel}}{{#isEnum}}schemas:{{name}}{{/isEnum}}{{^isEnum}}{{#isNumber}}xs:double{{/isNumber}}{{^isNumber}}{{#isFreeFormObject}}xs:anyType{{/isFreeFormObject}}{{^isFreeFormObject}}{{#isUuid}}xs:string{{/isUuid}}{{^isUuid}}{{#isByteArray}}xs:string{{/isByteArray}}{{^isByteArray}}{{#allowableValues}}schemas:{{baseType}}{{/allowableValues}}{{^allowableValues}}{{#isFile}}{{#isBinary}}xs:hexBinary{{/isBinary}}{{/isFile}}{{^isFile}}xs:{{baseType}}{{/isFile}}{{/allowableValues}}{{/isByteArray}}{{/isUuid}}{{/isFreeFormObject}}{{/isNumber}}{{/isEnum}}{{/isModel}}"{{^description}} /{{/description}}> {{/isContainer}} {{#description}} <xs:annotation> - <xs:documentation>{{description}}</xs:documentation> + <xs:documentation>{{.}}</xs:documentation> </xs:annotation> </xs:element> {{/description}} @@ -93,7 +93,7 @@ <xs:simpleType name="{{name}}"> {{#description}} <xs:annotation> - <xs:documentation>{{description}}</xs:documentation> + <xs:documentation>{{.}}</xs:documentation> </xs:annotation> {{/description}} <xs:restriction base="xs:{{baseType}}"> @@ -116,7 +116,7 @@ <xs:simpleType name="{{name}}"> {{#description}} <xs:annotation> - <xs:documentation>{{description}}</xs:documentation> + <xs:documentation>{{.}}</xs:documentation> </xs:annotation> {{/description}} <xs:restriction base="xs:{{dataType}}"> @@ -164,31 +164,31 @@ <xs:simpleType> {{#description}} <xs:annotation> - <xs:documentation>{{description}}</xs:documentation> + <xs:documentation>{{.}}</xs:documentation> </xs:annotation> {{/description}} <xs:restriction base="xs:{{#isString}}string{{/isString}}{{^isString}}{{#isInteger}}integer{{/isInteger}}{{^isInteger}}{{#isDouble}}double{{/isDouble}}{{^isDouble}}long{{/isDouble}}{{/isInteger}}{{/isString}}"> {{#maximum}} - <xs:maxInclusive value="{{maximum}}" /> + <xs:maxInclusive value="{{.}}" /> {{/maximum}} {{#minimum}} - <xs:minInclusive value="{{minimum}}" /> + <xs:minInclusive value="{{.}}" /> {{/minimum}} {{#maxLength}} - <xs:maxLength value="{{maxLength}}" /> + <xs:maxLength value="{{.}}" /> {{/maxLength}} {{#minLength}} - <xs:minLength value="{{minLength}}" /> + <xs:minLength value="{{.}}" /> {{/minLength}} </xs:restriction> </xs:simpleType> </xs:element> {{/vendorExtensions.x-param-has-minormax}} {{^vendorExtensions.x-param-has-minormax}} - <xs:element minOccurs="{{#isArray}}{{#minItems}}{{minItems}}{{/minItems}}{{^minItems}}{{#required}}1{{/required}}{{^required}}0{{/required}}{{/minItems}}{{/isArray}}{{^isArray}}{{#required}}1{{/required}}{{^required}}0{{/required}}{{/isArray}}"{{#isArray}} maxOccurs="{{#maxItems}}{{maxItems}}{{/maxItems}}{{^maxItems}}unbounded{{/maxItems}}"{{/isArray}}{{#vendorExtensions.x-param-has-defaultvalue}} default="{{defaultValue}}"{{/vendorExtensions.x-param-has-defaultvalue}} name="{{#isBodyParam}}body{{/isBodyParam}}{{^isBodyParam}}{{paramName}}{{/isBodyParam}}" type="{{#isBodyParam}}schemas:{{#isArray}}{{baseType}}{{/isArray}}{{^isArray}}{{dataType}}{{/isArray}}{{/isBodyParam}}{{^isBodyParam}}{{#isModel}}schemas:{{dataType}}{{/isModel}}{{^isModel}}{{#isEnum}}schemas:{{baseName}}{{/isEnum}}{{^isEnum}}{{#isFile}}{{#isBinary}}xs:hexBinary{{/isBinary}}{{/isFile}}{{^isFile}}{{#isByteArray}}xs:string{{/isByteArray}}{{^isByteArray}}{{#isArray}}{{#isQueryParam}}{{#items}}xs:{{baseType}}{{/items}}{{/isQueryParam}}{{/isArray}}{{^isArray}}xs:{{dataType}}{{/isArray}}{{/isByteArray}}{{/isFile}}{{/isEnum}}{{/isModel}}{{/isBodyParam}}"{{^description}} /{{/description}}> + <xs:element minOccurs="{{#isArray}}{{minItems}}{{^minItems}}{{#required}}1{{/required}}{{^required}}0{{/required}}{{/minItems}}{{/isArray}}{{^isArray}}{{#required}}1{{/required}}{{^required}}0{{/required}}{{/isArray}}"{{#isArray}} maxOccurs="{{maxItems}}{{^maxItems}}unbounded{{/maxItems}}"{{/isArray}}{{#vendorExtensions.x-param-has-defaultvalue}} default="{{defaultValue}}"{{/vendorExtensions.x-param-has-defaultvalue}} name="{{#isBodyParam}}body{{/isBodyParam}}{{^isBodyParam}}{{paramName}}{{/isBodyParam}}" type="{{#isBodyParam}}schemas:{{#isArray}}{{baseType}}{{/isArray}}{{^isArray}}{{dataType}}{{/isArray}}{{/isBodyParam}}{{^isBodyParam}}{{#isModel}}schemas:{{dataType}}{{/isModel}}{{^isModel}}{{#isEnum}}schemas:{{baseName}}{{/isEnum}}{{^isEnum}}{{#isFile}}{{#isBinary}}xs:hexBinary{{/isBinary}}{{/isFile}}{{^isFile}}{{#isByteArray}}xs:string{{/isByteArray}}{{^isByteArray}}{{#isArray}}{{#isQueryParam}}{{#items}}xs:{{baseType}}{{/items}}{{/isQueryParam}}{{/isArray}}{{^isArray}}xs:{{dataType}}{{/isArray}}{{/isByteArray}}{{/isFile}}{{/isEnum}}{{/isModel}}{{/isBodyParam}}"{{^description}} /{{/description}}> {{#description}} <xs:annotation> - <xs:documentation>{{description}}</xs:documentation> + <xs:documentation>{{.}}</xs:documentation> </xs:annotation> </xs:element> {{/description}} @@ -224,7 +224,7 @@ {{/operations}} {{/apis}} {{/apiInfo}} - </xs:schema> + </xs:schema> </types> {{#apiInfo}} {{#apis}} @@ -266,11 +266,11 @@ {{#operation}} <operation name="{{operationId}}"> {{#notes}} - <documentation>{{notes}}</documentation> + <documentation>{{.}}</documentation> {{/notes}} {{^notes}} {{#summary}} - <documentation>{{summary}}</documentation> + <documentation>{{.}}</documentation> {{/summary}} {{/notes}} <input message="wsdl:{{operationId}}_RequestMessage" /> @@ -279,7 +279,7 @@ {{^is5xx}} <output message="wsdl:{{operationId}}_ResponseMessage"{{^message}} /{{/message}}> {{#message}} - <documentation>{{message}}</documentation> + <documentation>{{.}}</documentation> </output> {{/message}} {{/is5xx}} @@ -287,14 +287,14 @@ {{#is4xx}} <fault name="{{operationId}}_{{code}}" message="wsdl:{{operationId}}_{{code}}"{{^message}} /{{/message}}> {{#message}} - <documentation>{{message}}</documentation> + <documentation>{{.}}</documentation> </fault> {{/message}} {{/is4xx}} {{#is5xx}} <fault name="{{operationId}}_{{code}}" message="wsdl:{{operationId}}_{{code}}"{{^message}} /{{/message}}> {{#message}} - <documentation>{{message}}</documentation> + <documentation>{{.}}</documentation> </fault> {{/message}} {{/is5xx}} diff --git a/modules/openapi-generator/src/test/resources/3_0/protobuf-schema/pet.proto b/modules/openapi-generator/src/test/resources/3_0/protobuf-schema/pet.proto index 0ebbc7da96d1a278831624587dea0ef804c9c226..86da6922f5e3ea40296a0e4d19ba789903bfcba0 100644 --- a/modules/openapi-generator/src/test/resources/3_0/protobuf-schema/pet.proto +++ b/modules/openapi-generator/src/test/resources/3_0/protobuf-schema/pet.proto @@ -1,8 +1,8 @@ /* OAI Specification example for Polymorphism - + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - + The version of the OpenAPI document: 1.0.0 Generated by OpenAPI Generator: https://openapi-generator.tech diff --git a/modules/openapi-generator/src/test/resources/codegen/scala/JavaTimeObj.scala.txt b/modules/openapi-generator/src/test/resources/codegen/scala/JavaTimeObj.scala.txt index bd26dd8e6a483d1a121e76e8eba10b3ea2cef889..062e5cc52591ae8dedf717a7b1d0369ef7c3fc38 100644 --- a/modules/openapi-generator/src/test/resources/codegen/scala/JavaTimeObj.scala.txt +++ b/modules/openapi-generator/src/test/resources/codegen/scala/JavaTimeObj.scala.txt @@ -47,4 +47,3 @@ object SomeObjEnums { } } - diff --git a/modules/openapi-generator/src/test/resources/codegen/scala/SomeObj.scala.txt b/modules/openapi-generator/src/test/resources/codegen/scala/SomeObj.scala.txt index bb7de36212178e4cb8380ea4101aa318dd57820c..bb5c7fc08cb71fd8711236aefff481dda0a76c46 100644 --- a/modules/openapi-generator/src/test/resources/codegen/scala/SomeObj.scala.txt +++ b/modules/openapi-generator/src/test/resources/codegen/scala/SomeObj.scala.txt @@ -47,4 +47,3 @@ object SomeObjEnums { } } - diff --git a/samples/client/petstore/R/R/api_client.R b/samples/client/petstore/R/R/api_client.R index d2682119f938c55a9535093cffe5097c58dc3966..52ede81af0d0daec627ae7f5f8d6d809bdd95104 100644 --- a/samples/client/petstore/R/R/api_client.R +++ b/samples/client/petstore/R/R/api_client.R @@ -111,7 +111,7 @@ ApiClient <- R6::R6Class( if (is.null(self$maxRetryAttempts)) { self$maxRetryAttempts = 3 } - + if (!is.null(self$retryStatusCodes)) { for (i in 1 : self$maxRetryAttempts) { @@ -122,7 +122,7 @@ ApiClient <- R6::R6Class( } else { break; } - } + } } resp @@ -169,7 +169,7 @@ ApiClient <- R6::R6Class( returnObj <- NULL primitiveTypes <- c("character", "numeric", "integer", "logical", "complex") - # To handle the "map" type + # To handle the "map" type if (startsWith(returnType, "map(")) { innerReturnType <- regmatches(returnType, regexec(pattern = "map\\((.*)\\)", returnType))[[1]][2] returnObj <- lapply(names(obj), function(name) { @@ -207,7 +207,7 @@ ApiClient <- R6::R6Class( returnObj$fromJSON( jsonlite::toJSON(obj, digits = NA, auto_unbox = TRUE) ) - } + } # To handle primitive type else { diff --git a/samples/client/petstore/R/R/pet_api.R b/samples/client/petstore/R/R/pet_api.R index 1df44f5795aae35d11f66ab683be27c326afb710..fdb580cd5db5bf14d79f9d02084ce14fc6d0af57 100644 --- a/samples/client/petstore/R/R/pet_api.R +++ b/samples/client/petstore/R/R/pet_api.R @@ -51,7 +51,7 @@ #' Multiple status values can be provided with comma separated strings #' #' \itemize{ -#' \item \emph{ @param } status Enum < [available, pending, sold] > +#' \item \emph{ @param } status Enum < [available, pending, sold] > #' \item \emph{ @returnType } list( \link{Pet} ) \cr #' #' diff --git a/samples/client/petstore/R/git_push.sh b/samples/client/petstore/R/git_push.sh index ced3be2b0c7b2349ff06d18da19d4b31435c9fa6..9405f72e950cdb8ca24c3cf4d15cee7eac62fde7 100644 --- a/samples/client/petstore/R/git_push.sh +++ b/samples/client/petstore/R/git_push.sh @@ -55,4 +55,3 @@ 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/c/docs/PetAPI.md b/samples/client/petstore/c/docs/PetAPI.md index 1033f2e8eddf8aab93920c3e10fe4784a5641e80..b509819fa2515a605fb5a9591ed9e2f4e49922c9 100644 --- a/samples/client/petstore/c/docs/PetAPI.md +++ b/samples/client/petstore/c/docs/PetAPI.md @@ -24,7 +24,7 @@ void PetAPI_addPet(apiClient_t *apiClient, pet_t * body); ### Parameters Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**apiClient** | **apiClient_t \*** | context containing the client configuration | +**apiClient** | **apiClient_t \*** | context containing the client configuration | **body** | **[pet_t](pet.md) \*** | Pet object that needs to be added to the store | ### Return type @@ -52,7 +52,7 @@ void PetAPI_deletePet(apiClient_t *apiClient, long petId, char * api_key); ### Parameters Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**apiClient** | **apiClient_t \*** | context containing the client configuration | +**apiClient** | **apiClient_t \*** | context containing the client configuration | **petId** | **long** | Pet id to delete | **api_key** | **char \*** | | [optional] @@ -83,7 +83,7 @@ list_t* PetAPI_findPetsByStatus(apiClient_t *apiClient, list_t * status); ### Parameters Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**apiClient** | **apiClient_t \*** | context containing the client configuration | +**apiClient** | **apiClient_t \*** | context containing the client configuration | **status** | **[list_t](char.md) \*** | Status values that need to be considered for filter | ### Return type @@ -114,7 +114,7 @@ list_t* PetAPI_findPetsByTags(apiClient_t *apiClient, list_t * tags); ### Parameters Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**apiClient** | **apiClient_t \*** | context containing the client configuration | +**apiClient** | **apiClient_t \*** | context containing the client configuration | **tags** | **[list_t](char.md) \*** | Tags to filter by | ### Return type @@ -145,7 +145,7 @@ pet_t* PetAPI_getPetById(apiClient_t *apiClient, long petId); ### Parameters Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**apiClient** | **apiClient_t \*** | context containing the client configuration | +**apiClient** | **apiClient_t \*** | context containing the client configuration | **petId** | **long** | ID of pet to return | ### Return type @@ -174,7 +174,7 @@ void PetAPI_updatePet(apiClient_t *apiClient, pet_t * body); ### Parameters Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**apiClient** | **apiClient_t \*** | context containing the client configuration | +**apiClient** | **apiClient_t \*** | context containing the client configuration | **body** | **[pet_t](pet.md) \*** | Pet object that needs to be added to the store | ### Return type @@ -202,7 +202,7 @@ void PetAPI_updatePetWithForm(apiClient_t *apiClient, long petId, char * name, c ### Parameters Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**apiClient** | **apiClient_t \*** | context containing the client configuration | +**apiClient** | **apiClient_t \*** | context containing the client configuration | **petId** | **long** | ID of pet that needs to be updated | **name** | **char \*** | Updated name of the pet | [optional] **status** | **char \*** | Updated status of the pet | [optional] @@ -232,7 +232,7 @@ api_response_t* PetAPI_uploadFile(apiClient_t *apiClient, long petId, char * add ### Parameters Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**apiClient** | **apiClient_t \*** | context containing the client configuration | +**apiClient** | **apiClient_t \*** | context containing the client configuration | **petId** | **long** | ID of pet to update | **additionalMetadata** | **char \*** | Additional data to pass to server | [optional] **file** | **binary_t*** | file to upload | [optional] diff --git a/samples/client/petstore/c/docs/StoreAPI.md b/samples/client/petstore/c/docs/StoreAPI.md index c4ff376773559bec22cb4537c03c7efa405b620e..3c6736897ec4e38813c29a2bd21f55645d96d5c4 100644 --- a/samples/client/petstore/c/docs/StoreAPI.md +++ b/samples/client/petstore/c/docs/StoreAPI.md @@ -22,7 +22,7 @@ void StoreAPI_deleteOrder(apiClient_t *apiClient, char * orderId); ### Parameters Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**apiClient** | **apiClient_t \*** | context containing the client configuration | +**apiClient** | **apiClient_t \*** | context containing the client configuration | **orderId** | **char \*** | ID of the order that needs to be deleted | ### Return type @@ -52,7 +52,7 @@ list_t* StoreAPI_getInventory(apiClient_t *apiClient); ### Parameters Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**apiClient** | **apiClient_t \*** | context containing the client configuration | +**apiClient** | **apiClient_t \*** | context containing the client configuration | ### Return type @@ -85,7 +85,7 @@ order_t* StoreAPI_getOrderById(apiClient_t *apiClient, long orderId); ### Parameters Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**apiClient** | **apiClient_t \*** | context containing the client configuration | +**apiClient** | **apiClient_t \*** | context containing the client configuration | **orderId** | **long** | ID of pet that needs to be fetched | ### Return type @@ -114,7 +114,7 @@ order_t* StoreAPI_placeOrder(apiClient_t *apiClient, order_t * body); ### Parameters Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**apiClient** | **apiClient_t \*** | context containing the client configuration | +**apiClient** | **apiClient_t \*** | context containing the client configuration | **body** | **[order_t](order.md) \*** | order placed for purchasing the pet | ### Return type diff --git a/samples/client/petstore/c/docs/UserAPI.md b/samples/client/petstore/c/docs/UserAPI.md index 21ecbdc39f17f95a1fa3abd6bb7f370f36707bac..adf601fca211dd9c25b174870e7c725904225900 100644 --- a/samples/client/petstore/c/docs/UserAPI.md +++ b/samples/client/petstore/c/docs/UserAPI.md @@ -26,7 +26,7 @@ void UserAPI_createUser(apiClient_t *apiClient, user_t * body); ### Parameters Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**apiClient** | **apiClient_t \*** | context containing the client configuration | +**apiClient** | **apiClient_t \*** | context containing the client configuration | **body** | **[user_t](user.md) \*** | Created user object | ### Return type @@ -54,7 +54,7 @@ void UserAPI_createUsersWithArrayInput(apiClient_t *apiClient, list_t * body); ### Parameters Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**apiClient** | **apiClient_t \*** | context containing the client configuration | +**apiClient** | **apiClient_t \*** | context containing the client configuration | **body** | **[list_t](user.md) \*** | List of user object | ### Return type @@ -82,7 +82,7 @@ void UserAPI_createUsersWithListInput(apiClient_t *apiClient, list_t * body); ### Parameters Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**apiClient** | **apiClient_t \*** | context containing the client configuration | +**apiClient** | **apiClient_t \*** | context containing the client configuration | **body** | **[list_t](user.md) \*** | List of user object | ### Return type @@ -112,7 +112,7 @@ void UserAPI_deleteUser(apiClient_t *apiClient, char * username); ### Parameters Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**apiClient** | **apiClient_t \*** | context containing the client configuration | +**apiClient** | **apiClient_t \*** | context containing the client configuration | **username** | **char \*** | The name that needs to be deleted | ### Return type @@ -140,7 +140,7 @@ user_t* UserAPI_getUserByName(apiClient_t *apiClient, char * username); ### Parameters Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**apiClient** | **apiClient_t \*** | context containing the client configuration | +**apiClient** | **apiClient_t \*** | context containing the client configuration | **username** | **char \*** | The name that needs to be fetched. Use user1 for testing. | ### Return type @@ -169,7 +169,7 @@ char* UserAPI_loginUser(apiClient_t *apiClient, char * username, char * password ### Parameters Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**apiClient** | **apiClient_t \*** | context containing the client configuration | +**apiClient** | **apiClient_t \*** | context containing the client configuration | **username** | **char \*** | The user name for login | **password** | **char \*** | The password for login in clear text | @@ -200,7 +200,7 @@ void UserAPI_logoutUser(apiClient_t *apiClient); ### Parameters Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**apiClient** | **apiClient_t \*** | context containing the client configuration | +**apiClient** | **apiClient_t \*** | context containing the client configuration | ### Return type @@ -229,7 +229,7 @@ void UserAPI_updateUser(apiClient_t *apiClient, char * username, user_t * body); ### Parameters Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**apiClient** | **apiClient_t \*** | context containing the client configuration | +**apiClient** | **apiClient_t \*** | context containing the client configuration | **username** | **char \*** | name that need to be deleted | **body** | **[user_t](user.md) \*** | Updated user object | diff --git a/samples/client/petstore/cpp-qt/README.md b/samples/client/petstore/cpp-qt/README.md index 156bb656f1d7fc2abc34dfedf8753465df75a2fb..bdedf6eb3a8a31a6e481c566cfeec9f86709ab15 100644 --- a/samples/client/petstore/cpp-qt/README.md +++ b/samples/client/petstore/cpp-qt/README.md @@ -80,7 +80,7 @@ example.cpp: #include "../client/PFXPetApi.h" #include "example.h" #include <QTimer> -#include <QEventLoop> +#include <QEventLoop> PFXPet Example::create(){ PFXPet obj; @@ -91,7 +91,7 @@ void Example::exampleFunction1(){ PFXPetApi apiInstance; //OAuth Authentication supported right now - + QEventLoop loop; connect(&apiInstance, &PFXPetApi::addPetSignal, [&]() { loop.quit(); @@ -149,7 +149,7 @@ Class | Method | HTTP request | Description ## Documentation for Servers -Parameterized Servers are supported. Define a server in the API for each endpoint with arbitrary numbers of variables: +Parameterized Servers are supported. Define a server in the API for each endpoint with arbitrary numbers of variables: ``` servers: @@ -174,7 +174,7 @@ To change the default variable, use this function in each Api: ``` int setDefaultServerValue(int serverIndex,const QString &operation, const QString &variable,const QString &val); ``` -The parameter "serverIndex" will choose a server from the server list for each endpoint. There is always at least one server with index 0. The Paramter "operation" should be the desired endpoint operationid. +The parameter "serverIndex" will choose a server from the server list for each endpoint. There is always at least one server with index 0. The Paramter "operation" should be the desired endpoint operationid. Variable is the name of the variable you wish to change and the value is the new default Value. The function will return -1 when the variable does not exists, -2 if value is not defined in the variable enum and -3 if the operation is not found. diff --git a/samples/client/petstore/cpp-qt/client/PFXServerVariable.h b/samples/client/petstore/cpp-qt/client/PFXServerVariable.h index b4cd0036238046fcbf8381c135c786b54c7385f3..ed76e24ba378605fb00bec09fd06a221b07030c2 100644 --- a/samples/client/petstore/cpp-qt/client/PFXServerVariable.h +++ b/samples/client/petstore/cpp-qt/client/PFXServerVariable.h @@ -27,11 +27,11 @@ public: * @param defaultValue The default value to use for substitution. * @param enumValues An enumeration of string values to be used if the substitution options are from a limited set. */ - PFXServerVariable(const QString &description, const QString &defaultValue, const QSet<QString> &enumValues) + PFXServerVariable(const QString &description, const QString &defaultValue, const QSet<QString> &enumValues) : _defaultValue(defaultValue), _description(description), _enumValues(enumValues){} - + PFXServerVariable(){} ~PFXServerVariable(){} diff --git a/samples/client/petstore/cpp-qt/client/PFXclient.pri b/samples/client/petstore/cpp-qt/client/PFXclient.pri index 8cfd6cc625289d3552d0605b86894650cd7d18e2..b28c7479d9029c24f1f218246ee4e700202b5b87 100644 --- a/samples/client/petstore/cpp-qt/client/PFXclient.pri +++ b/samples/client/petstore/cpp-qt/client/PFXclient.pri @@ -37,4 +37,3 @@ SOURCES += \ $${PWD}/PFXHelpers.cpp \ $${PWD}/PFXHttpRequest.cpp \ $${PWD}/PFXHttpFileElement.cpp - diff --git a/samples/client/petstore/cpp-restsdk/client/ModelBase.h b/samples/client/petstore/cpp-restsdk/client/ModelBase.h index ca86ae1bdfb5799a41697631a7a01b15b527dbe1..9f0635f314d94c00d203c0ce390f9546f1875d9d 100644 --- a/samples/client/petstore/cpp-restsdk/client/ModelBase.h +++ b/samples/client/petstore/cpp-restsdk/client/ModelBase.h @@ -212,7 +212,7 @@ bool ModelBase::fromString( const utility::string_t& val, std::shared_ptr<T>& ou if(outVal == nullptr) { outVal = std::shared_ptr<T>(new T()); - } + } if( outVal != nullptr ) { ok = outVal->fromJson(web::json::value::parse(val)); diff --git a/samples/client/petstore/cpp-restsdk/client/git_push.sh b/samples/client/petstore/cpp-restsdk/client/git_push.sh index ced3be2b0c7b2349ff06d18da19d4b31435c9fa6..9405f72e950cdb8ca24c3cf4d15cee7eac62fde7 100644 --- a/samples/client/petstore/cpp-restsdk/client/git_push.sh +++ b/samples/client/petstore/cpp-restsdk/client/git_push.sh @@ -55,4 +55,3 @@ 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/cpp-tiny/README.md b/samples/client/petstore/cpp-tiny/README.md index e8bf721275b5015c3e8b5ed6b63e7e8169eb362c..872efdec8135c46136246bd4da4d55004aa9b6d6 100644 --- a/samples/client/petstore/cpp-tiny/README.md +++ b/samples/client/petstore/cpp-tiny/README.md @@ -70,4 +70,3 @@ All URIs are relative to http://petstore.swagger.iohttp://petstore.swagger.io/v2 |*Tag* | A tag for a pet| |*User* | A User who is purchasing from the pet store| - diff --git a/samples/client/petstore/cpp-tiny/lib/Models/ApiResponse.cpp b/samples/client/petstore/cpp-tiny/lib/Models/ApiResponse.cpp index e9be9e2b618726991f9d412c838548c2bea60065..7c5d4dee655afa24e53fa6130dec325686d39836 100644 --- a/samples/client/petstore/cpp-tiny/lib/Models/ApiResponse.cpp +++ b/samples/client/petstore/cpp-tiny/lib/Models/ApiResponse.cpp @@ -23,43 +23,43 @@ ApiResponse::~ApiResponse() void ApiResponse::fromJson(std::string jsonObj) -{ +{ bourne::json object = bourne::json::parse(jsonObj); const char *codeKey = "code"; - - if(object.has_key(codeKey)) + + if(object.has_key(codeKey)) { bourne::json value = object[codeKey]; - + jsonToValue(&code, value, "int"); } const char *typeKey = "type"; - - if(object.has_key(typeKey)) + + if(object.has_key(typeKey)) { bourne::json value = object[typeKey]; - + jsonToValue(&type, value, "std::string"); } const char *messageKey = "message"; - - if(object.has_key(messageKey)) + + if(object.has_key(messageKey)) { bourne::json value = object[messageKey]; - + jsonToValue(&message, value, "std::string"); @@ -73,21 +73,21 @@ ApiResponse::toJson() { bourne::json object = bourne::json::object(); - + object["code"] = getCode(); - + object["type"] = getType(); - + diff --git a/samples/client/petstore/cpp-tiny/lib/Models/Category.cpp b/samples/client/petstore/cpp-tiny/lib/Models/Category.cpp index 950b06ffd44a2db2d2fe83a1b04d3aeb46672b93..aa76177dae7c020c8b6e1dae6b41433a7978e2e8 100644 --- a/samples/client/petstore/cpp-tiny/lib/Models/Category.cpp +++ b/samples/client/petstore/cpp-tiny/lib/Models/Category.cpp @@ -22,30 +22,30 @@ Category::~Category() void Category::fromJson(std::string jsonObj) -{ +{ bourne::json object = bourne::json::parse(jsonObj); const char *idKey = "id"; - - if(object.has_key(idKey)) + + if(object.has_key(idKey)) { bourne::json value = object[idKey]; - + jsonToValue(&id, value, "long"); } const char *nameKey = "name"; - - if(object.has_key(nameKey)) + + if(object.has_key(nameKey)) { bourne::json value = object[nameKey]; - + jsonToValue(&name, value, "std::string"); @@ -59,14 +59,14 @@ Category::toJson() { bourne::json object = bourne::json::object(); - + object["id"] = getId(); - + diff --git a/samples/client/petstore/cpp-tiny/lib/Models/Helpers.cpp b/samples/client/petstore/cpp-tiny/lib/Models/Helpers.cpp index c3935b37cde97e1e8912a3f820d58a26c54cca30..5fc0fc2f991afecd6f061e6abd95e2be1abd3eed 100644 --- a/samples/client/petstore/cpp-tiny/lib/Models/Helpers.cpp +++ b/samples/client/petstore/cpp-tiny/lib/Models/Helpers.cpp @@ -23,39 +23,39 @@ jsonToValue(void* target, bourne::json value, std::string type) { if (target == NULL || value.is_null()) { return; - } - - else if (type.compare("bool") == 0) + } + + else if (type.compare("bool") == 0) { bool* val = static_cast<bool*> (target); *val = value.to_bool(); - } - - else if (type.compare("int") == 0) + } + + else if (type.compare("int") == 0) { int* val = static_cast<int*> (target); *val = value.to_int(); - } - - else if (type.compare("float") == 0) + } + + else if (type.compare("float") == 0) { float* val = static_cast<float*> (target); *val = (float)(value.to_float()); - } + } else if (type.compare("long") == 0) { long* val = static_cast<long*> (target); *val = (long)(value.to_int()); - } - - else if (type.compare("double") == 0) + } + + else if (type.compare("double") == 0) { double* val = static_cast<double*> (target); *val = value.to_float(); - } - - else if (type.compare("std::string") == 0) + } + + else if (type.compare("std::string") == 0) { std::string* val = static_cast<std::string*> (target); *val = value.to_string(); diff --git a/samples/client/petstore/cpp-tiny/lib/Models/Helpers.h b/samples/client/petstore/cpp-tiny/lib/Models/Helpers.h index 5ef7d9afdf77aa341eff4c41dbcdee370b36074d..710a3333f5877deada7cd9bb3022a48e0c559eb7 100644 --- a/samples/client/petstore/cpp-tiny/lib/Models/Helpers.h +++ b/samples/client/petstore/cpp-tiny/lib/Models/Helpers.h @@ -19,4 +19,3 @@ std::string stringify(float input); std::string stringify(std::string input); #endif /* TINY_CPP_CLIENT_HELPERS_H_ */ - diff --git a/samples/client/petstore/cpp-tiny/lib/Models/Order.cpp b/samples/client/petstore/cpp-tiny/lib/Models/Order.cpp index b8b7e00d3fc8fd35979b77db3ce87be02fb17b66..ca7083516acc596ee1532f45b0d6534ac96a33a6 100644 --- a/samples/client/petstore/cpp-tiny/lib/Models/Order.cpp +++ b/samples/client/petstore/cpp-tiny/lib/Models/Order.cpp @@ -26,82 +26,82 @@ Order::~Order() void Order::fromJson(std::string jsonObj) -{ +{ bourne::json object = bourne::json::parse(jsonObj); const char *idKey = "id"; - - if(object.has_key(idKey)) + + if(object.has_key(idKey)) { bourne::json value = object[idKey]; - + jsonToValue(&id, value, "long"); } const char *petIdKey = "petId"; - - if(object.has_key(petIdKey)) + + if(object.has_key(petIdKey)) { bourne::json value = object[petIdKey]; - + jsonToValue(&petId, value, "long"); } const char *quantityKey = "quantity"; - - if(object.has_key(quantityKey)) + + if(object.has_key(quantityKey)) { bourne::json value = object[quantityKey]; - + jsonToValue(&quantity, value, "int"); } const char *shipDateKey = "shipDate"; - - if(object.has_key(shipDateKey)) + + if(object.has_key(shipDateKey)) { bourne::json value = object[shipDateKey]; - + jsonToValue(&shipDate, value, "std::string"); } const char *statusKey = "status"; - - if(object.has_key(statusKey)) + + if(object.has_key(statusKey)) { bourne::json value = object[statusKey]; - + jsonToValue(&status, value, "std::string"); } const char *completeKey = "complete"; - - if(object.has_key(completeKey)) + + if(object.has_key(completeKey)) { bourne::json value = object[completeKey]; - + jsonToValue(&complete, value, "bool"); @@ -115,42 +115,42 @@ Order::toJson() { bourne::json object = bourne::json::object(); - + object["id"] = getId(); - + object["petId"] = getPetId(); - + object["quantity"] = getQuantity(); - + object["shipDate"] = getShipDate(); - + object["status"] = getStatus(); - + diff --git a/samples/client/petstore/cpp-tiny/lib/Models/Pet.cpp b/samples/client/petstore/cpp-tiny/lib/Models/Pet.cpp index 57f7781aef2af06ef8d26fd966d1d0ef27b0ad4b..43d7b89c40f6c392500e5662fff10a8c1a454875 100644 --- a/samples/client/petstore/cpp-tiny/lib/Models/Pet.cpp +++ b/samples/client/petstore/cpp-tiny/lib/Models/Pet.cpp @@ -26,30 +26,30 @@ Pet::~Pet() void Pet::fromJson(std::string jsonObj) -{ +{ bourne::json object = bourne::json::parse(jsonObj); const char *idKey = "id"; - - if(object.has_key(idKey)) + + if(object.has_key(idKey)) { bourne::json value = object[idKey]; - + jsonToValue(&id, value, "long"); } const char *categoryKey = "category"; - - if(object.has_key(categoryKey)) + + if(object.has_key(categoryKey)) { bourne::json value = object[categoryKey]; - + Category* obj = &category; obj->fromJson(value.dump()); @@ -57,21 +57,21 @@ Pet::fromJson(std::string jsonObj) } const char *nameKey = "name"; - - if(object.has_key(nameKey)) + + if(object.has_key(nameKey)) { bourne::json value = object[nameKey]; - + jsonToValue(&name, value, "std::string"); } const char *photoUrlsKey = "photoUrls"; - - if(object.has_key(photoUrlsKey)) + + if(object.has_key(photoUrlsKey)) { bourne::json value = object[photoUrlsKey]; @@ -82,8 +82,8 @@ Pet::fromJson(std::string jsonObj) { jsonToValue(&element, var, "std::string"); - - + + photoUrls_list.push_back(element); } photoUrls = photoUrls_list; @@ -92,8 +92,8 @@ Pet::fromJson(std::string jsonObj) } const char *tagsKey = "tags"; - - if(object.has_key(tagsKey)) + + if(object.has_key(tagsKey)) { bourne::json value = object[tagsKey]; @@ -103,9 +103,9 @@ Pet::fromJson(std::string jsonObj) for(auto& var : value.array_range()) { - + element.fromJson(var.dump()); - + tags_list.push_back(element); } tags = tags_list; @@ -114,13 +114,13 @@ Pet::fromJson(std::string jsonObj) } const char *statusKey = "status"; - - if(object.has_key(statusKey)) + + if(object.has_key(statusKey)) { bourne::json value = object[statusKey]; - + jsonToValue(&status, value, "std::string"); @@ -134,30 +134,30 @@ Pet::toJson() { bourne::json object = bourne::json::object(); - + object["id"] = getId(); - + object["category"] = getCategory().toJson(); - + object["name"] = getName(); - - - + + + std::list<std::string> photoUrls_list = getPhotoUrls(); bourne::json photoUrls_arr = bourne::json::array(); @@ -167,12 +167,12 @@ Pet::toJson() } object["photoUrls"] = photoUrls_arr; - - - + + + std::list<Tag> tags_list = getTags(); bourne::json tags_arr = bourne::json::array(); @@ -186,7 +186,7 @@ Pet::toJson() - + diff --git a/samples/client/petstore/cpp-tiny/lib/Models/Tag.cpp b/samples/client/petstore/cpp-tiny/lib/Models/Tag.cpp index e46d94258a1dd05263511f96cf860492d9d64d88..2a7acb6b22b4e9799c490c1f2d83e03a5c11fc14 100644 --- a/samples/client/petstore/cpp-tiny/lib/Models/Tag.cpp +++ b/samples/client/petstore/cpp-tiny/lib/Models/Tag.cpp @@ -22,30 +22,30 @@ Tag::~Tag() void Tag::fromJson(std::string jsonObj) -{ +{ bourne::json object = bourne::json::parse(jsonObj); const char *idKey = "id"; - - if(object.has_key(idKey)) + + if(object.has_key(idKey)) { bourne::json value = object[idKey]; - + jsonToValue(&id, value, "long"); } const char *nameKey = "name"; - - if(object.has_key(nameKey)) + + if(object.has_key(nameKey)) { bourne::json value = object[nameKey]; - + jsonToValue(&name, value, "std::string"); @@ -59,14 +59,14 @@ Tag::toJson() { bourne::json object = bourne::json::object(); - + object["id"] = getId(); - + diff --git a/samples/client/petstore/cpp-tiny/lib/Models/User.cpp b/samples/client/petstore/cpp-tiny/lib/Models/User.cpp index ac84c40205a900eac91ffb0edfd9572b394b4dcd..cad8a872247b52eac6a99d37f6ed610a11bd4491 100644 --- a/samples/client/petstore/cpp-tiny/lib/Models/User.cpp +++ b/samples/client/petstore/cpp-tiny/lib/Models/User.cpp @@ -28,108 +28,108 @@ User::~User() void User::fromJson(std::string jsonObj) -{ +{ bourne::json object = bourne::json::parse(jsonObj); const char *idKey = "id"; - - if(object.has_key(idKey)) + + if(object.has_key(idKey)) { bourne::json value = object[idKey]; - + jsonToValue(&id, value, "long"); } const char *usernameKey = "username"; - - if(object.has_key(usernameKey)) + + if(object.has_key(usernameKey)) { bourne::json value = object[usernameKey]; - + jsonToValue(&username, value, "std::string"); } const char *firstNameKey = "firstName"; - - if(object.has_key(firstNameKey)) + + if(object.has_key(firstNameKey)) { bourne::json value = object[firstNameKey]; - + jsonToValue(&firstName, value, "std::string"); } const char *lastNameKey = "lastName"; - - if(object.has_key(lastNameKey)) + + if(object.has_key(lastNameKey)) { bourne::json value = object[lastNameKey]; - + jsonToValue(&lastName, value, "std::string"); } const char *emailKey = "email"; - - if(object.has_key(emailKey)) + + if(object.has_key(emailKey)) { bourne::json value = object[emailKey]; - + jsonToValue(&email, value, "std::string"); } const char *passwordKey = "password"; - - if(object.has_key(passwordKey)) + + if(object.has_key(passwordKey)) { bourne::json value = object[passwordKey]; - + jsonToValue(&password, value, "std::string"); } const char *phoneKey = "phone"; - - if(object.has_key(phoneKey)) + + if(object.has_key(phoneKey)) { bourne::json value = object[phoneKey]; - + jsonToValue(&phone, value, "std::string"); } const char *userStatusKey = "userStatus"; - - if(object.has_key(userStatusKey)) + + if(object.has_key(userStatusKey)) { bourne::json value = object[userStatusKey]; - + jsonToValue(&userStatus, value, "int"); @@ -143,56 +143,56 @@ User::toJson() { bourne::json object = bourne::json::object(); - + object["id"] = getId(); - + object["username"] = getUsername(); - + object["firstName"] = getFirstName(); - + object["lastName"] = getLastName(); - + object["email"] = getEmail(); - + object["password"] = getPassword(); - + object["phone"] = getPhone(); - + diff --git a/samples/client/petstore/cpp-tiny/lib/service/PetApi.cpp b/samples/client/petstore/cpp-tiny/lib/service/PetApi.cpp index 1fa081a04b4d5cbc811569b962e2a717e1012003..8bf9e14179451331c2b46131638f2d6ff5a61f42 100644 --- a/samples/client/petstore/cpp-tiny/lib/service/PetApi.cpp +++ b/samples/client/petstore/cpp-tiny/lib/service/PetApi.cpp @@ -415,4 +415,3 @@ using namespace Tiny; - diff --git a/samples/client/petstore/cpp-tiny/lib/service/Response.h b/samples/client/petstore/cpp-tiny/lib/service/Response.h index 9b7b616b8f1b97c232794c9d01978fd712cd9c30..af7543e0c9b81761e7b1dbee3c7dec4bf644461d 100644 --- a/samples/client/petstore/cpp-tiny/lib/service/Response.h +++ b/samples/client/petstore/cpp-tiny/lib/service/Response.h @@ -21,5 +21,5 @@ template <typename T = std::string> T obj; }; } // namespace Tinyclient - + #endif /* TINY_CPP_CLIENT_RESPONSE_H_ */ diff --git a/samples/client/petstore/cpp-tiny/lib/service/StoreApi.cpp b/samples/client/petstore/cpp-tiny/lib/service/StoreApi.cpp index 210eb8277ac6660aa29f3384e8240c8f39047e9b..d52253f03fb7202615c08400919dba5874f0bd0e 100644 --- a/samples/client/petstore/cpp-tiny/lib/service/StoreApi.cpp +++ b/samples/client/petstore/cpp-tiny/lib/service/StoreApi.cpp @@ -182,4 +182,3 @@ using namespace Tiny; - diff --git a/samples/client/petstore/cpp-tiny/lib/service/UserApi.cpp b/samples/client/petstore/cpp-tiny/lib/service/UserApi.cpp index d1cf12b80a9ea05160bd0a4757987e1b1e8632fa..3323d805a0ce24fe09dffdb0b612a7c3741365cc 100644 --- a/samples/client/petstore/cpp-tiny/lib/service/UserApi.cpp +++ b/samples/client/petstore/cpp-tiny/lib/service/UserApi.cpp @@ -363,4 +363,3 @@ using namespace Tiny; - diff --git a/samples/client/petstore/cpp-tiny/root.cert b/samples/client/petstore/cpp-tiny/root.cert index bad9c08efad1a4772b312336cc585f8e8fcef86f..59d760f1e167641b8e6dcc5cca64991afe776c9d 100644 --- a/samples/client/petstore/cpp-tiny/root.cert +++ b/samples/client/petstore/cpp-tiny/root.cert @@ -50,4 +50,3 @@ "rqXRfboQnoZsG4q5WTP468SQvvG5\n" \ "-----END CERTIFICATE-----\n" \ */ - diff --git a/samples/client/petstore/cpp-tiny/test/RunTests.cpp b/samples/client/petstore/cpp-tiny/test/RunTests.cpp index 4caafb4ee4415bd4c0004e7c939cbe4598eb8515..92d0658939a041bda4bf9b9ac116700b0c22f535 100644 --- a/samples/client/petstore/cpp-tiny/test/RunTests.cpp +++ b/samples/client/petstore/cpp-tiny/test/RunTests.cpp @@ -184,7 +184,7 @@ void runTests(){ - + } int main(void) { @@ -200,5 +200,5 @@ void setup() { } void loop() { - + } diff --git a/samples/client/petstore/crystal/git_push.sh b/samples/client/petstore/crystal/git_push.sh index ced3be2b0c7b2349ff06d18da19d4b31435c9fa6..9405f72e950cdb8ca24c3cf4d15cee7eac62fde7 100644 --- a/samples/client/petstore/crystal/git_push.sh +++ b/samples/client/petstore/crystal/git_push.sh @@ -55,4 +55,3 @@ 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/csharp-netcore/OpenAPIClient-ConditionalSerialization/git_push.sh b/samples/client/petstore/csharp-netcore/OpenAPIClient-ConditionalSerialization/git_push.sh index ced3be2b0c7b2349ff06d18da19d4b31435c9fa6..9405f72e950cdb8ca24c3cf4d15cee7eac62fde7 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-ConditionalSerialization/git_push.sh +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-ConditionalSerialization/git_push.sh @@ -55,4 +55,3 @@ 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/csharp-netcore/OpenAPIClient-ConditionalSerialization/src/Org.OpenAPITools/Model/AdditionalPropertiesClass.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-ConditionalSerialization/src/Org.OpenAPITools/Model/AdditionalPropertiesClass.cs index 8a3ae3533a04732b60bc07ea6b622fb2801a3793..c2fe95dff689032355bb92b0d15f591625418d51 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-ConditionalSerialization/src/Org.OpenAPITools/Model/AdditionalPropertiesClass.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-ConditionalSerialization/src/Org.OpenAPITools/Model/AdditionalPropertiesClass.cs @@ -61,13 +61,13 @@ namespace Org.OpenAPITools.Model /// </summary> [DataMember(Name = "map_property", EmitDefaultValue = false)] public Dictionary<string, string> MapProperty - { + { get{ return _MapProperty;} set { _MapProperty = value; _flagMapProperty = true; - } + } } private Dictionary<string, string> _MapProperty; private bool _flagMapProperty; @@ -85,13 +85,13 @@ namespace Org.OpenAPITools.Model /// </summary> [DataMember(Name = "map_of_map_property", EmitDefaultValue = false)] public Dictionary<string, Dictionary<string, string>> MapOfMapProperty - { + { get{ return _MapOfMapProperty;} set { _MapOfMapProperty = value; _flagMapOfMapProperty = true; - } + } } private Dictionary<string, Dictionary<string, string>> _MapOfMapProperty; private bool _flagMapOfMapProperty; @@ -109,13 +109,13 @@ namespace Org.OpenAPITools.Model /// </summary> [DataMember(Name = "anytype_1", EmitDefaultValue = true)] public Object Anytype1 - { + { get{ return _Anytype1;} set { _Anytype1 = value; _flagAnytype1 = true; - } + } } private Object _Anytype1; private bool _flagAnytype1; @@ -133,13 +133,13 @@ namespace Org.OpenAPITools.Model /// </summary> [DataMember(Name = "map_with_undeclared_properties_anytype_1", EmitDefaultValue = false)] public Object MapWithUndeclaredPropertiesAnytype1 - { + { get{ return _MapWithUndeclaredPropertiesAnytype1;} set { _MapWithUndeclaredPropertiesAnytype1 = value; _flagMapWithUndeclaredPropertiesAnytype1 = true; - } + } } private Object _MapWithUndeclaredPropertiesAnytype1; private bool _flagMapWithUndeclaredPropertiesAnytype1; @@ -157,13 +157,13 @@ namespace Org.OpenAPITools.Model /// </summary> [DataMember(Name = "map_with_undeclared_properties_anytype_2", EmitDefaultValue = false)] public Object MapWithUndeclaredPropertiesAnytype2 - { + { get{ return _MapWithUndeclaredPropertiesAnytype2;} set { _MapWithUndeclaredPropertiesAnytype2 = value; _flagMapWithUndeclaredPropertiesAnytype2 = true; - } + } } private Object _MapWithUndeclaredPropertiesAnytype2; private bool _flagMapWithUndeclaredPropertiesAnytype2; @@ -181,13 +181,13 @@ namespace Org.OpenAPITools.Model /// </summary> [DataMember(Name = "map_with_undeclared_properties_anytype_3", EmitDefaultValue = false)] public Dictionary<string, Object> MapWithUndeclaredPropertiesAnytype3 - { + { get{ return _MapWithUndeclaredPropertiesAnytype3;} set { _MapWithUndeclaredPropertiesAnytype3 = value; _flagMapWithUndeclaredPropertiesAnytype3 = true; - } + } } private Dictionary<string, Object> _MapWithUndeclaredPropertiesAnytype3; private bool _flagMapWithUndeclaredPropertiesAnytype3; @@ -206,13 +206,13 @@ namespace Org.OpenAPITools.Model /// <value>an object with no declared properties and no undeclared properties, hence it's an empty map.</value> [DataMember(Name = "empty_map", EmitDefaultValue = false)] public Object EmptyMap - { + { get{ return _EmptyMap;} set { _EmptyMap = value; _flagEmptyMap = true; - } + } } private Object _EmptyMap; private bool _flagEmptyMap; @@ -230,13 +230,13 @@ namespace Org.OpenAPITools.Model /// </summary> [DataMember(Name = "map_with_undeclared_properties_string", EmitDefaultValue = false)] public Dictionary<string, string> MapWithUndeclaredPropertiesString - { + { get{ return _MapWithUndeclaredPropertiesString;} set { _MapWithUndeclaredPropertiesString = value; _flagMapWithUndeclaredPropertiesString = true; - } + } } private Dictionary<string, string> _MapWithUndeclaredPropertiesString; private bool _flagMapWithUndeclaredPropertiesString; diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-ConditionalSerialization/src/Org.OpenAPITools/Model/Animal.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-ConditionalSerialization/src/Org.OpenAPITools/Model/Animal.cs index 9e554565830c7d56928350894cc20a67d9b8568f..fbc617b2363eae5aed5d150ba4dbb00abd610930 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-ConditionalSerialization/src/Org.OpenAPITools/Model/Animal.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-ConditionalSerialization/src/Org.OpenAPITools/Model/Animal.cs @@ -63,13 +63,13 @@ namespace Org.OpenAPITools.Model /// </summary> [DataMember(Name = "className", IsRequired = true, EmitDefaultValue = false)] public string ClassName - { + { get{ return _ClassName;} set { _ClassName = value; _flagClassName = true; - } + } } private string _ClassName; private bool _flagClassName; @@ -87,13 +87,13 @@ namespace Org.OpenAPITools.Model /// </summary> [DataMember(Name = "color", EmitDefaultValue = false)] public string Color - { + { get{ return _Color;} set { _Color = value; _flagColor = true; - } + } } private string _Color; private bool _flagColor; diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-ConditionalSerialization/src/Org.OpenAPITools/Model/ApiResponse.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-ConditionalSerialization/src/Org.OpenAPITools/Model/ApiResponse.cs index 7e4ec34e6248b589c7ab1f2074c949fef5d4b8df..234a98da51eb3e7f476e3291d25a33eac75b7814 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-ConditionalSerialization/src/Org.OpenAPITools/Model/ApiResponse.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-ConditionalSerialization/src/Org.OpenAPITools/Model/ApiResponse.cs @@ -51,13 +51,13 @@ namespace Org.OpenAPITools.Model /// </summary> [DataMember(Name = "code", EmitDefaultValue = false)] public int Code - { + { get{ return _Code;} set { _Code = value; _flagCode = true; - } + } } private int _Code; private bool _flagCode; @@ -75,13 +75,13 @@ namespace Org.OpenAPITools.Model /// </summary> [DataMember(Name = "type", EmitDefaultValue = false)] public string Type - { + { get{ return _Type;} set { _Type = value; _flagType = true; - } + } } private string _Type; private bool _flagType; @@ -99,13 +99,13 @@ namespace Org.OpenAPITools.Model /// </summary> [DataMember(Name = "message", EmitDefaultValue = false)] public string Message - { + { get{ return _Message;} set { _Message = value; _flagMessage = true; - } + } } private string _Message; private bool _flagMessage; diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-ConditionalSerialization/src/Org.OpenAPITools/Model/Apple.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-ConditionalSerialization/src/Org.OpenAPITools/Model/Apple.cs index 1ffbb0c0951b712ca0fb04cb01a0d538e75dfacf..30252de25d7fc67c1a62d61a5e59b24f003e5848 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-ConditionalSerialization/src/Org.OpenAPITools/Model/Apple.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-ConditionalSerialization/src/Org.OpenAPITools/Model/Apple.cs @@ -49,13 +49,13 @@ namespace Org.OpenAPITools.Model /// </summary> [DataMember(Name = "cultivar", EmitDefaultValue = false)] public string Cultivar - { + { get{ return _Cultivar;} set { _Cultivar = value; _flagCultivar = true; - } + } } private string _Cultivar; private bool _flagCultivar; @@ -73,13 +73,13 @@ namespace Org.OpenAPITools.Model /// </summary> [DataMember(Name = "origin", EmitDefaultValue = false)] public string Origin - { + { get{ return _Origin;} set { _Origin = value; _flagOrigin = true; - } + } } private string _Origin; private bool _flagOrigin; diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-ConditionalSerialization/src/Org.OpenAPITools/Model/AppleReq.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-ConditionalSerialization/src/Org.OpenAPITools/Model/AppleReq.cs index f0fc8d536b0e1b165225a98c942f98ce8cf9fc83..246f212a314e9a9e2236bf5e11cc56fdf224c88a 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-ConditionalSerialization/src/Org.OpenAPITools/Model/AppleReq.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-ConditionalSerialization/src/Org.OpenAPITools/Model/AppleReq.cs @@ -54,13 +54,13 @@ namespace Org.OpenAPITools.Model /// </summary> [DataMember(Name = "cultivar", IsRequired = true, EmitDefaultValue = false)] public string Cultivar - { + { get{ return _Cultivar;} set { _Cultivar = value; _flagCultivar = true; - } + } } private string _Cultivar; private bool _flagCultivar; @@ -78,13 +78,13 @@ namespace Org.OpenAPITools.Model /// </summary> [DataMember(Name = "mealy", EmitDefaultValue = true)] public bool Mealy - { + { get{ return _Mealy;} set { _Mealy = value; _flagMealy = true; - } + } } private bool _Mealy; private bool _flagMealy; diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-ConditionalSerialization/src/Org.OpenAPITools/Model/ArrayOfArrayOfNumberOnly.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-ConditionalSerialization/src/Org.OpenAPITools/Model/ArrayOfArrayOfNumberOnly.cs index 99d5a446460e9aca0c501e7439574fe04fbe4caf..9d7ca3a848f23cd27656e2d50e5918f05747e9f2 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-ConditionalSerialization/src/Org.OpenAPITools/Model/ArrayOfArrayOfNumberOnly.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-ConditionalSerialization/src/Org.OpenAPITools/Model/ArrayOfArrayOfNumberOnly.cs @@ -47,13 +47,13 @@ namespace Org.OpenAPITools.Model /// </summary> [DataMember(Name = "ArrayArrayNumber", EmitDefaultValue = false)] public List<List<decimal>> ArrayArrayNumber - { + { get{ return _ArrayArrayNumber;} set { _ArrayArrayNumber = value; _flagArrayArrayNumber = true; - } + } } private List<List<decimal>> _ArrayArrayNumber; private bool _flagArrayArrayNumber; diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-ConditionalSerialization/src/Org.OpenAPITools/Model/ArrayOfNumberOnly.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-ConditionalSerialization/src/Org.OpenAPITools/Model/ArrayOfNumberOnly.cs index 7aa2e525878ca5e109357330b31d8792b17d8699..597c0087c72bcbee03f10cf33fb5581768cedc74 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-ConditionalSerialization/src/Org.OpenAPITools/Model/ArrayOfNumberOnly.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-ConditionalSerialization/src/Org.OpenAPITools/Model/ArrayOfNumberOnly.cs @@ -47,13 +47,13 @@ namespace Org.OpenAPITools.Model /// </summary> [DataMember(Name = "ArrayNumber", EmitDefaultValue = false)] public List<decimal> ArrayNumber - { + { get{ return _ArrayNumber;} set { _ArrayNumber = value; _flagArrayNumber = true; - } + } } private List<decimal> _ArrayNumber; private bool _flagArrayNumber; diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-ConditionalSerialization/src/Org.OpenAPITools/Model/ArrayTest.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-ConditionalSerialization/src/Org.OpenAPITools/Model/ArrayTest.cs index a35053405f312f2338abbd2d3176feb1f0060319..a70e778bf8222ca58252f14d6a43816f665bbc1d 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-ConditionalSerialization/src/Org.OpenAPITools/Model/ArrayTest.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-ConditionalSerialization/src/Org.OpenAPITools/Model/ArrayTest.cs @@ -51,13 +51,13 @@ namespace Org.OpenAPITools.Model /// </summary> [DataMember(Name = "array_of_string", EmitDefaultValue = false)] public List<string> ArrayOfString - { + { get{ return _ArrayOfString;} set { _ArrayOfString = value; _flagArrayOfString = true; - } + } } private List<string> _ArrayOfString; private bool _flagArrayOfString; @@ -75,13 +75,13 @@ namespace Org.OpenAPITools.Model /// </summary> [DataMember(Name = "array_array_of_integer", EmitDefaultValue = false)] public List<List<long>> ArrayArrayOfInteger - { + { get{ return _ArrayArrayOfInteger;} set { _ArrayArrayOfInteger = value; _flagArrayArrayOfInteger = true; - } + } } private List<List<long>> _ArrayArrayOfInteger; private bool _flagArrayArrayOfInteger; @@ -99,13 +99,13 @@ namespace Org.OpenAPITools.Model /// </summary> [DataMember(Name = "array_array_of_model", EmitDefaultValue = false)] public List<List<ReadOnlyFirst>> ArrayArrayOfModel - { + { get{ return _ArrayArrayOfModel;} set { _ArrayArrayOfModel = value; _flagArrayArrayOfModel = true; - } + } } private List<List<ReadOnlyFirst>> _ArrayArrayOfModel; private bool _flagArrayArrayOfModel; diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-ConditionalSerialization/src/Org.OpenAPITools/Model/Banana.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-ConditionalSerialization/src/Org.OpenAPITools/Model/Banana.cs index 74fce16d819bf1bf1c1842f76e6d20fdbb8567fa..0d4590cb56441e14b566794f5cdc5c4b1094e36f 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-ConditionalSerialization/src/Org.OpenAPITools/Model/Banana.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-ConditionalSerialization/src/Org.OpenAPITools/Model/Banana.cs @@ -47,13 +47,13 @@ namespace Org.OpenAPITools.Model /// </summary> [DataMember(Name = "lengthCm", EmitDefaultValue = false)] public decimal LengthCm - { + { get{ return _LengthCm;} set { _LengthCm = value; _flagLengthCm = true; - } + } } private decimal _LengthCm; private bool _flagLengthCm; diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-ConditionalSerialization/src/Org.OpenAPITools/Model/BananaReq.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-ConditionalSerialization/src/Org.OpenAPITools/Model/BananaReq.cs index 82e049f2eab42c52a2f98be0b83afe44be389394..d36231789823527df7dde621a3f9a8ff30f5c120 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-ConditionalSerialization/src/Org.OpenAPITools/Model/BananaReq.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-ConditionalSerialization/src/Org.OpenAPITools/Model/BananaReq.cs @@ -53,13 +53,13 @@ namespace Org.OpenAPITools.Model /// </summary> [DataMember(Name = "lengthCm", IsRequired = true, EmitDefaultValue = false)] public decimal LengthCm - { + { get{ return _LengthCm;} set { _LengthCm = value; _flagLengthCm = true; - } + } } private decimal _LengthCm; private bool _flagLengthCm; @@ -77,13 +77,13 @@ namespace Org.OpenAPITools.Model /// </summary> [DataMember(Name = "sweet", EmitDefaultValue = true)] public bool Sweet - { + { get{ return _Sweet;} set { _Sweet = value; _flagSweet = true; - } + } } private bool _Sweet; private bool _flagSweet; diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-ConditionalSerialization/src/Org.OpenAPITools/Model/BasquePig.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-ConditionalSerialization/src/Org.OpenAPITools/Model/BasquePig.cs index 1dca71f05583a67a8baa8cb32ca50edf22cd3e49..ef4518f3feacf08ca780c93f518a3e1d16e5f283 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-ConditionalSerialization/src/Org.OpenAPITools/Model/BasquePig.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-ConditionalSerialization/src/Org.OpenAPITools/Model/BasquePig.cs @@ -56,13 +56,13 @@ namespace Org.OpenAPITools.Model /// </summary> [DataMember(Name = "className", IsRequired = true, EmitDefaultValue = false)] public string ClassName - { + { get{ return _ClassName;} set { _ClassName = value; _flagClassName = true; - } + } } private string _ClassName; private bool _flagClassName; diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-ConditionalSerialization/src/Org.OpenAPITools/Model/Capitalization.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-ConditionalSerialization/src/Org.OpenAPITools/Model/Capitalization.cs index 0e7d2fc0fb8fffba80ee3afb39add79eff398d05..d6814413f46ef79167d6e160c3da8529d9ffd97b 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-ConditionalSerialization/src/Org.OpenAPITools/Model/Capitalization.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-ConditionalSerialization/src/Org.OpenAPITools/Model/Capitalization.cs @@ -57,13 +57,13 @@ namespace Org.OpenAPITools.Model /// </summary> [DataMember(Name = "smallCamel", EmitDefaultValue = false)] public string SmallCamel - { + { get{ return _SmallCamel;} set { _SmallCamel = value; _flagSmallCamel = true; - } + } } private string _SmallCamel; private bool _flagSmallCamel; @@ -81,13 +81,13 @@ namespace Org.OpenAPITools.Model /// </summary> [DataMember(Name = "CapitalCamel", EmitDefaultValue = false)] public string CapitalCamel - { + { get{ return _CapitalCamel;} set { _CapitalCamel = value; _flagCapitalCamel = true; - } + } } private string _CapitalCamel; private bool _flagCapitalCamel; @@ -105,13 +105,13 @@ namespace Org.OpenAPITools.Model /// </summary> [DataMember(Name = "small_Snake", EmitDefaultValue = false)] public string SmallSnake - { + { get{ return _SmallSnake;} set { _SmallSnake = value; _flagSmallSnake = true; - } + } } private string _SmallSnake; private bool _flagSmallSnake; @@ -129,13 +129,13 @@ namespace Org.OpenAPITools.Model /// </summary> [DataMember(Name = "Capital_Snake", EmitDefaultValue = false)] public string CapitalSnake - { + { get{ return _CapitalSnake;} set { _CapitalSnake = value; _flagCapitalSnake = true; - } + } } private string _CapitalSnake; private bool _flagCapitalSnake; @@ -153,13 +153,13 @@ namespace Org.OpenAPITools.Model /// </summary> [DataMember(Name = "SCA_ETH_Flow_Points", EmitDefaultValue = false)] public string SCAETHFlowPoints - { + { get{ return _SCAETHFlowPoints;} set { _SCAETHFlowPoints = value; _flagSCAETHFlowPoints = true; - } + } } private string _SCAETHFlowPoints; private bool _flagSCAETHFlowPoints; @@ -178,13 +178,13 @@ namespace Org.OpenAPITools.Model /// <value>Name of the pet </value> [DataMember(Name = "ATT_NAME", EmitDefaultValue = false)] public string ATT_NAME - { + { get{ return _ATT_NAME;} set { _ATT_NAME = value; _flagATT_NAME = true; - } + } } private string _ATT_NAME; private bool _flagATT_NAME; diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-ConditionalSerialization/src/Org.OpenAPITools/Model/Cat.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-ConditionalSerialization/src/Org.OpenAPITools/Model/Cat.cs index b2fec9a105fbd53bd50edcbd6ed5b957eb495458..181d3ceac59daa92c8e7e3f93905b042ffe053e8 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-ConditionalSerialization/src/Org.OpenAPITools/Model/Cat.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-ConditionalSerialization/src/Org.OpenAPITools/Model/Cat.cs @@ -59,13 +59,13 @@ namespace Org.OpenAPITools.Model /// </summary> [DataMember(Name = "declawed", EmitDefaultValue = true)] public bool Declawed - { + { get{ return _Declawed;} set { _Declawed = value; _flagDeclawed = true; - } + } } private bool _Declawed; private bool _flagDeclawed; diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-ConditionalSerialization/src/Org.OpenAPITools/Model/CatAllOf.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-ConditionalSerialization/src/Org.OpenAPITools/Model/CatAllOf.cs index d8032316af528e247e4cf570fe648a7f52287d9c..593a74e0bbb08983da04599dc01b1cdd81f704aa 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-ConditionalSerialization/src/Org.OpenAPITools/Model/CatAllOf.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-ConditionalSerialization/src/Org.OpenAPITools/Model/CatAllOf.cs @@ -47,13 +47,13 @@ namespace Org.OpenAPITools.Model /// </summary> [DataMember(Name = "declawed", EmitDefaultValue = true)] public bool Declawed - { + { get{ return _Declawed;} set { _Declawed = value; _flagDeclawed = true; - } + } } private bool _Declawed; private bool _flagDeclawed; diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-ConditionalSerialization/src/Org.OpenAPITools/Model/Category.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-ConditionalSerialization/src/Org.OpenAPITools/Model/Category.cs index a99b2e4df1fed5ba28b6537943e82c75da1abe9b..198799ca3869aa048b972b72887f93aab8b9b186 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-ConditionalSerialization/src/Org.OpenAPITools/Model/Category.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-ConditionalSerialization/src/Org.OpenAPITools/Model/Category.cs @@ -58,13 +58,13 @@ namespace Org.OpenAPITools.Model /// </summary> [DataMember(Name = "id", EmitDefaultValue = false)] public long Id - { + { get{ return _Id;} set { _Id = value; _flagId = true; - } + } } private long _Id; private bool _flagId; @@ -82,13 +82,13 @@ namespace Org.OpenAPITools.Model /// </summary> [DataMember(Name = "name", IsRequired = true, EmitDefaultValue = false)] public string Name - { + { get{ return _Name;} set { _Name = value; _flagName = true; - } + } } private string _Name; private bool _flagName; diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-ConditionalSerialization/src/Org.OpenAPITools/Model/ChildCat.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-ConditionalSerialization/src/Org.OpenAPITools/Model/ChildCat.cs index e07206d390c530ba118cf513baaa13189217a56b..ce251cfb76133a0f6e6c906ca2d088dc72a3604a 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-ConditionalSerialization/src/Org.OpenAPITools/Model/ChildCat.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-ConditionalSerialization/src/Org.OpenAPITools/Model/ChildCat.cs @@ -52,10 +52,10 @@ namespace Org.OpenAPITools.Model /// <summary> /// Gets or Sets PetType /// </summary> - + [DataMember(Name = "pet_type", IsRequired = true, EmitDefaultValue = false)] - public PetTypeEnum PetType - { + public PetTypeEnum PetType + { get{ return _PetType;} set { @@ -99,13 +99,13 @@ namespace Org.OpenAPITools.Model /// </summary> [DataMember(Name = "name", EmitDefaultValue = false)] public string Name - { + { get{ return _Name;} set { _Name = value; _flagName = true; - } + } } private string _Name; private bool _flagName; diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-ConditionalSerialization/src/Org.OpenAPITools/Model/ChildCatAllOf.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-ConditionalSerialization/src/Org.OpenAPITools/Model/ChildCatAllOf.cs index d3f5e7519b33015f4cdd76dc3f445e6cfe843e56..baeb457c982828577b7d990611f2512a38355cbe 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-ConditionalSerialization/src/Org.OpenAPITools/Model/ChildCatAllOf.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-ConditionalSerialization/src/Org.OpenAPITools/Model/ChildCatAllOf.cs @@ -50,10 +50,10 @@ namespace Org.OpenAPITools.Model /// <summary> /// Gets or Sets PetType /// </summary> - + [DataMember(Name = "pet_type", EmitDefaultValue = false)] - public PetTypeEnum? PetType - { + public PetTypeEnum? PetType + { get{ return _PetType;} set { @@ -89,13 +89,13 @@ namespace Org.OpenAPITools.Model /// </summary> [DataMember(Name = "name", EmitDefaultValue = false)] public string Name - { + { get{ return _Name;} set { _Name = value; _flagName = true; - } + } } private string _Name; private bool _flagName; diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-ConditionalSerialization/src/Org.OpenAPITools/Model/ClassModel.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-ConditionalSerialization/src/Org.OpenAPITools/Model/ClassModel.cs index 398ba005da8bfa88f54f8d9b8aff9fba58535032..6455eed39894fd59ac19af6dd740b39cb35eba7b 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-ConditionalSerialization/src/Org.OpenAPITools/Model/ClassModel.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-ConditionalSerialization/src/Org.OpenAPITools/Model/ClassModel.cs @@ -47,13 +47,13 @@ namespace Org.OpenAPITools.Model /// </summary> [DataMember(Name = "_class", EmitDefaultValue = false)] public string Class - { + { get{ return _Class;} set { _Class = value; _flagClass = true; - } + } } private string _Class; private bool _flagClass; diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-ConditionalSerialization/src/Org.OpenAPITools/Model/ComplexQuadrilateral.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-ConditionalSerialization/src/Org.OpenAPITools/Model/ComplexQuadrilateral.cs index 50a0471ba560a9041268d5d7256e28cb298b7e07..ffc1728777e7173a21b0e9bfcf7dc2ea0842ad91 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-ConditionalSerialization/src/Org.OpenAPITools/Model/ComplexQuadrilateral.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-ConditionalSerialization/src/Org.OpenAPITools/Model/ComplexQuadrilateral.cs @@ -59,13 +59,13 @@ namespace Org.OpenAPITools.Model /// </summary> [DataMember(Name = "shapeType", IsRequired = true, EmitDefaultValue = false)] public string ShapeType - { + { get{ return _ShapeType;} set { _ShapeType = value; _flagShapeType = true; - } + } } private string _ShapeType; private bool _flagShapeType; @@ -83,13 +83,13 @@ namespace Org.OpenAPITools.Model /// </summary> [DataMember(Name = "quadrilateralType", IsRequired = true, EmitDefaultValue = false)] public string QuadrilateralType - { + { get{ return _QuadrilateralType;} set { _QuadrilateralType = value; _flagQuadrilateralType = true; - } + } } private string _QuadrilateralType; private bool _flagQuadrilateralType; diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-ConditionalSerialization/src/Org.OpenAPITools/Model/DanishPig.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-ConditionalSerialization/src/Org.OpenAPITools/Model/DanishPig.cs index 9e783bb28d0519b7c9d6e46723689c47f40c7285..15c5d0feba6cd19942c3078318a904a5dec84f14 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-ConditionalSerialization/src/Org.OpenAPITools/Model/DanishPig.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-ConditionalSerialization/src/Org.OpenAPITools/Model/DanishPig.cs @@ -56,13 +56,13 @@ namespace Org.OpenAPITools.Model /// </summary> [DataMember(Name = "className", IsRequired = true, EmitDefaultValue = false)] public string ClassName - { + { get{ return _ClassName;} set { _ClassName = value; _flagClassName = true; - } + } } private string _ClassName; private bool _flagClassName; diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-ConditionalSerialization/src/Org.OpenAPITools/Model/DeprecatedObject.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-ConditionalSerialization/src/Org.OpenAPITools/Model/DeprecatedObject.cs index 2b7abe2240a33255a1b6ae6a13573d9f20b0ed2f..1bba408d1acaa941f4ea6e6952e7d9dcca1fa2cf 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-ConditionalSerialization/src/Org.OpenAPITools/Model/DeprecatedObject.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-ConditionalSerialization/src/Org.OpenAPITools/Model/DeprecatedObject.cs @@ -47,13 +47,13 @@ namespace Org.OpenAPITools.Model /// </summary> [DataMember(Name = "name", EmitDefaultValue = false)] public string Name - { + { get{ return _Name;} set { _Name = value; _flagName = true; - } + } } private string _Name; private bool _flagName; diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-ConditionalSerialization/src/Org.OpenAPITools/Model/Dog.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-ConditionalSerialization/src/Org.OpenAPITools/Model/Dog.cs index 713e93b0b1350ebadea12ac2ac9ac0a53cff1f44..2eb8b0cb74b402317feb211ee006898dfc1a7d9e 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-ConditionalSerialization/src/Org.OpenAPITools/Model/Dog.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-ConditionalSerialization/src/Org.OpenAPITools/Model/Dog.cs @@ -59,13 +59,13 @@ namespace Org.OpenAPITools.Model /// </summary> [DataMember(Name = "breed", EmitDefaultValue = false)] public string Breed - { + { get{ return _Breed;} set { _Breed = value; _flagBreed = true; - } + } } private string _Breed; private bool _flagBreed; diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-ConditionalSerialization/src/Org.OpenAPITools/Model/DogAllOf.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-ConditionalSerialization/src/Org.OpenAPITools/Model/DogAllOf.cs index d82ab386dc2aa1a7df8c1e69cfa5aa1098d45150..13ed8acb8eb571810cde3c0f4e5f8adff7523ebd 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-ConditionalSerialization/src/Org.OpenAPITools/Model/DogAllOf.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-ConditionalSerialization/src/Org.OpenAPITools/Model/DogAllOf.cs @@ -47,13 +47,13 @@ namespace Org.OpenAPITools.Model /// </summary> [DataMember(Name = "breed", EmitDefaultValue = false)] public string Breed - { + { get{ return _Breed;} set { _Breed = value; _flagBreed = true; - } + } } private string _Breed; private bool _flagBreed; diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-ConditionalSerialization/src/Org.OpenAPITools/Model/Drawing.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-ConditionalSerialization/src/Org.OpenAPITools/Model/Drawing.cs index 2dd0540c37d01ad5d2ad044dabe31cb50659003d..54753cf5d5c10bf3d265c2181e83bf010140c67a 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-ConditionalSerialization/src/Org.OpenAPITools/Model/Drawing.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-ConditionalSerialization/src/Org.OpenAPITools/Model/Drawing.cs @@ -52,13 +52,13 @@ namespace Org.OpenAPITools.Model /// </summary> [DataMember(Name = "mainShape", EmitDefaultValue = false)] public Shape MainShape - { + { get{ return _MainShape;} set { _MainShape = value; _flagMainShape = true; - } + } } private Shape _MainShape; private bool _flagMainShape; @@ -76,13 +76,13 @@ namespace Org.OpenAPITools.Model /// </summary> [DataMember(Name = "shapeOrNull", EmitDefaultValue = false)] public ShapeOrNull ShapeOrNull - { + { get{ return _ShapeOrNull;} set { _ShapeOrNull = value; _flagShapeOrNull = true; - } + } } private ShapeOrNull _ShapeOrNull; private bool _flagShapeOrNull; @@ -100,13 +100,13 @@ namespace Org.OpenAPITools.Model /// </summary> [DataMember(Name = "nullableShape", EmitDefaultValue = true)] public NullableShape NullableShape - { + { get{ return _NullableShape;} set { _NullableShape = value; _flagNullableShape = true; - } + } } private NullableShape _NullableShape; private bool _flagNullableShape; @@ -124,13 +124,13 @@ namespace Org.OpenAPITools.Model /// </summary> [DataMember(Name = "shapes", EmitDefaultValue = false)] public List<Shape> Shapes - { + { get{ return _Shapes;} set { _Shapes = value; _flagShapes = true; - } + } } private List<Shape> _Shapes; private bool _flagShapes; diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-ConditionalSerialization/src/Org.OpenAPITools/Model/EnumArrays.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-ConditionalSerialization/src/Org.OpenAPITools/Model/EnumArrays.cs index 970c5b99e5441f0fd7e4cc8367aa8cca07be19d3..eb934d218fac90833ed75464a69e54e6e18c632f 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-ConditionalSerialization/src/Org.OpenAPITools/Model/EnumArrays.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-ConditionalSerialization/src/Org.OpenAPITools/Model/EnumArrays.cs @@ -56,10 +56,10 @@ namespace Org.OpenAPITools.Model /// <summary> /// Gets or Sets JustSymbol /// </summary> - + [DataMember(Name = "just_symbol", EmitDefaultValue = false)] - public JustSymbolEnum? JustSymbol - { + public JustSymbolEnum? JustSymbol + { get{ return _JustSymbol;} set { @@ -103,10 +103,10 @@ namespace Org.OpenAPITools.Model /// <summary> /// Gets or Sets ArrayEnum /// </summary> - + [DataMember(Name = "array_enum", EmitDefaultValue = false)] - public List<ArrayEnumEnum> ArrayEnum - { + public List<ArrayEnumEnum> ArrayEnum + { get{ return _ArrayEnum;} set { diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-ConditionalSerialization/src/Org.OpenAPITools/Model/EnumTest.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-ConditionalSerialization/src/Org.OpenAPITools/Model/EnumTest.cs index a00c98160926536cb302deb88790810f8634e29c..bca247d0e21a6547cf1ce48a68b2634baadf1f7b 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-ConditionalSerialization/src/Org.OpenAPITools/Model/EnumTest.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-ConditionalSerialization/src/Org.OpenAPITools/Model/EnumTest.cs @@ -62,10 +62,10 @@ namespace Org.OpenAPITools.Model /// <summary> /// Gets or Sets EnumString /// </summary> - + [DataMember(Name = "enum_string", EmitDefaultValue = false)] - public EnumStringEnum? EnumString - { + public EnumStringEnum? EnumString + { get{ return _EnumString;} set { @@ -114,10 +114,10 @@ namespace Org.OpenAPITools.Model /// <summary> /// Gets or Sets EnumStringRequired /// </summary> - + [DataMember(Name = "enum_string_required", IsRequired = true, EmitDefaultValue = false)] - public EnumStringRequiredEnum EnumStringRequired - { + public EnumStringRequiredEnum EnumStringRequired + { get{ return _EnumStringRequired;} set { @@ -157,10 +157,10 @@ namespace Org.OpenAPITools.Model /// <summary> /// Gets or Sets EnumInteger /// </summary> - + [DataMember(Name = "enum_integer", EmitDefaultValue = false)] - public EnumIntegerEnum? EnumInteger - { + public EnumIntegerEnum? EnumInteger + { get{ return _EnumInteger;} set { @@ -200,10 +200,10 @@ namespace Org.OpenAPITools.Model /// <summary> /// Gets or Sets EnumIntegerOnly /// </summary> - + [DataMember(Name = "enum_integer_only", EmitDefaultValue = false)] - public EnumIntegerOnlyEnum? EnumIntegerOnly - { + public EnumIntegerOnlyEnum? EnumIntegerOnly + { get{ return _EnumIntegerOnly;} set { @@ -246,10 +246,10 @@ namespace Org.OpenAPITools.Model /// <summary> /// Gets or Sets EnumNumber /// </summary> - + [DataMember(Name = "enum_number", EmitDefaultValue = false)] - public EnumNumberEnum? EnumNumber - { + public EnumNumberEnum? EnumNumber + { get{ return _EnumNumber;} set { @@ -272,10 +272,10 @@ namespace Org.OpenAPITools.Model /// <summary> /// Gets or Sets OuterEnum /// </summary> - + [DataMember(Name = "outerEnum", EmitDefaultValue = true)] - public OuterEnum? OuterEnum - { + public OuterEnum? OuterEnum + { get{ return _OuterEnum;} set { @@ -298,10 +298,10 @@ namespace Org.OpenAPITools.Model /// <summary> /// Gets or Sets OuterEnumInteger /// </summary> - + [DataMember(Name = "outerEnumInteger", EmitDefaultValue = false)] - public OuterEnumInteger? OuterEnumInteger - { + public OuterEnumInteger? OuterEnumInteger + { get{ return _OuterEnumInteger;} set { @@ -324,10 +324,10 @@ namespace Org.OpenAPITools.Model /// <summary> /// Gets or Sets OuterEnumDefaultValue /// </summary> - + [DataMember(Name = "outerEnumDefaultValue", EmitDefaultValue = false)] - public OuterEnumDefaultValue? OuterEnumDefaultValue - { + public OuterEnumDefaultValue? OuterEnumDefaultValue + { get{ return _OuterEnumDefaultValue;} set { @@ -350,10 +350,10 @@ namespace Org.OpenAPITools.Model /// <summary> /// Gets or Sets OuterEnumIntegerDefaultValue /// </summary> - + [DataMember(Name = "outerEnumIntegerDefaultValue", EmitDefaultValue = false)] - public OuterEnumIntegerDefaultValue? OuterEnumIntegerDefaultValue - { + public OuterEnumIntegerDefaultValue? OuterEnumIntegerDefaultValue + { get{ return _OuterEnumIntegerDefaultValue;} set { diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-ConditionalSerialization/src/Org.OpenAPITools/Model/EquilateralTriangle.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-ConditionalSerialization/src/Org.OpenAPITools/Model/EquilateralTriangle.cs index cab8c52b5837a562c5c60633247850b4c4d60f59..7df9b39a53543bac3a1d216e5ba85785b5e33d63 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-ConditionalSerialization/src/Org.OpenAPITools/Model/EquilateralTriangle.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-ConditionalSerialization/src/Org.OpenAPITools/Model/EquilateralTriangle.cs @@ -59,13 +59,13 @@ namespace Org.OpenAPITools.Model /// </summary> [DataMember(Name = "shapeType", IsRequired = true, EmitDefaultValue = false)] public string ShapeType - { + { get{ return _ShapeType;} set { _ShapeType = value; _flagShapeType = true; - } + } } private string _ShapeType; private bool _flagShapeType; @@ -83,13 +83,13 @@ namespace Org.OpenAPITools.Model /// </summary> [DataMember(Name = "triangleType", IsRequired = true, EmitDefaultValue = false)] public string TriangleType - { + { get{ return _TriangleType;} set { _TriangleType = value; _flagTriangleType = true; - } + } } private string _TriangleType; private bool _flagTriangleType; diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-ConditionalSerialization/src/Org.OpenAPITools/Model/File.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-ConditionalSerialization/src/Org.OpenAPITools/Model/File.cs index 9e67adfbae24b9d306078d406b2304db9088a694..c2bba229a2ca74c065a96a026536e6958dbf2dbf 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-ConditionalSerialization/src/Org.OpenAPITools/Model/File.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-ConditionalSerialization/src/Org.OpenAPITools/Model/File.cs @@ -48,13 +48,13 @@ namespace Org.OpenAPITools.Model /// <value>Test capitalization</value> [DataMember(Name = "sourceURI", EmitDefaultValue = false)] public string SourceURI - { + { get{ return _SourceURI;} set { _SourceURI = value; _flagSourceURI = true; - } + } } private string _SourceURI; private bool _flagSourceURI; diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-ConditionalSerialization/src/Org.OpenAPITools/Model/FileSchemaTestClass.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-ConditionalSerialization/src/Org.OpenAPITools/Model/FileSchemaTestClass.cs index 9b51606f001b0517e381cd560514699c063138ab..767be5a1a437cfbdc703e76406719bad031b9bc9 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-ConditionalSerialization/src/Org.OpenAPITools/Model/FileSchemaTestClass.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-ConditionalSerialization/src/Org.OpenAPITools/Model/FileSchemaTestClass.cs @@ -49,13 +49,13 @@ namespace Org.OpenAPITools.Model /// </summary> [DataMember(Name = "file", EmitDefaultValue = false)] public File File - { + { get{ return _File;} set { _File = value; _flagFile = true; - } + } } private File _File; private bool _flagFile; @@ -73,13 +73,13 @@ namespace Org.OpenAPITools.Model /// </summary> [DataMember(Name = "files", EmitDefaultValue = false)] public List<File> Files - { + { get{ return _Files;} set { _Files = value; _flagFiles = true; - } + } } private List<File> _Files; private bool _flagFiles; diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-ConditionalSerialization/src/Org.OpenAPITools/Model/Foo.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-ConditionalSerialization/src/Org.OpenAPITools/Model/Foo.cs index cf002ab29816ae242dc3cda506df89ca4c31a267..6f323ec5c578cb46f52780093e422f06695a6ffd 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-ConditionalSerialization/src/Org.OpenAPITools/Model/Foo.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-ConditionalSerialization/src/Org.OpenAPITools/Model/Foo.cs @@ -48,13 +48,13 @@ namespace Org.OpenAPITools.Model /// </summary> [DataMember(Name = "bar", EmitDefaultValue = false)] public string Bar - { + { get{ return _Bar;} set { _Bar = value; _flagBar = true; - } + } } private string _Bar; private bool _flagBar; diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-ConditionalSerialization/src/Org.OpenAPITools/Model/FormatTest.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-ConditionalSerialization/src/Org.OpenAPITools/Model/FormatTest.cs index 771481dcbf4dc2104aeb95cda4753de662dacc8b..601a027e57a1e4cf6ddd604d18e855cf4c9a3dc6 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-ConditionalSerialization/src/Org.OpenAPITools/Model/FormatTest.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-ConditionalSerialization/src/Org.OpenAPITools/Model/FormatTest.cs @@ -87,13 +87,13 @@ namespace Org.OpenAPITools.Model /// </summary> [DataMember(Name = "integer", EmitDefaultValue = false)] public int Integer - { + { get{ return _Integer;} set { _Integer = value; _flagInteger = true; - } + } } private int _Integer; private bool _flagInteger; @@ -111,13 +111,13 @@ namespace Org.OpenAPITools.Model /// </summary> [DataMember(Name = "int32", EmitDefaultValue = false)] public int Int32 - { + { get{ return _Int32;} set { _Int32 = value; _flagInt32 = true; - } + } } private int _Int32; private bool _flagInt32; @@ -135,13 +135,13 @@ namespace Org.OpenAPITools.Model /// </summary> [DataMember(Name = "int64", EmitDefaultValue = false)] public long Int64 - { + { get{ return _Int64;} set { _Int64 = value; _flagInt64 = true; - } + } } private long _Int64; private bool _flagInt64; @@ -159,13 +159,13 @@ namespace Org.OpenAPITools.Model /// </summary> [DataMember(Name = "number", IsRequired = true, EmitDefaultValue = false)] public decimal Number - { + { get{ return _Number;} set { _Number = value; _flagNumber = true; - } + } } private decimal _Number; private bool _flagNumber; @@ -183,13 +183,13 @@ namespace Org.OpenAPITools.Model /// </summary> [DataMember(Name = "float", EmitDefaultValue = false)] public float Float - { + { get{ return _Float;} set { _Float = value; _flagFloat = true; - } + } } private float _Float; private bool _flagFloat; @@ -207,13 +207,13 @@ namespace Org.OpenAPITools.Model /// </summary> [DataMember(Name = "double", EmitDefaultValue = false)] public double Double - { + { get{ return _Double;} set { _Double = value; _flagDouble = true; - } + } } private double _Double; private bool _flagDouble; @@ -231,13 +231,13 @@ namespace Org.OpenAPITools.Model /// </summary> [DataMember(Name = "decimal", EmitDefaultValue = false)] public decimal Decimal - { + { get{ return _Decimal;} set { _Decimal = value; _flagDecimal = true; - } + } } private decimal _Decimal; private bool _flagDecimal; @@ -255,13 +255,13 @@ namespace Org.OpenAPITools.Model /// </summary> [DataMember(Name = "string", EmitDefaultValue = false)] public string String - { + { get{ return _String;} set { _String = value; _flagString = true; - } + } } private string _String; private bool _flagString; @@ -279,13 +279,13 @@ namespace Org.OpenAPITools.Model /// </summary> [DataMember(Name = "byte", IsRequired = true, EmitDefaultValue = false)] public byte[] Byte - { + { get{ return _Byte;} set { _Byte = value; _flagByte = true; - } + } } private byte[] _Byte; private bool _flagByte; @@ -303,13 +303,13 @@ namespace Org.OpenAPITools.Model /// </summary> [DataMember(Name = "binary", EmitDefaultValue = false)] public System.IO.Stream Binary - { + { get{ return _Binary;} set { _Binary = value; _flagBinary = true; - } + } } private System.IO.Stream _Binary; private bool _flagBinary; @@ -328,13 +328,13 @@ namespace Org.OpenAPITools.Model [JsonConverter(typeof(OpenAPIDateConverter))] [DataMember(Name = "date", IsRequired = true, EmitDefaultValue = false)] public DateTime Date - { + { get{ return _Date;} set { _Date = value; _flagDate = true; - } + } } private DateTime _Date; private bool _flagDate; @@ -352,13 +352,13 @@ namespace Org.OpenAPITools.Model /// </summary> [DataMember(Name = "dateTime", EmitDefaultValue = false)] public DateTime DateTime - { + { get{ return _DateTime;} set { _DateTime = value; _flagDateTime = true; - } + } } private DateTime _DateTime; private bool _flagDateTime; @@ -376,13 +376,13 @@ namespace Org.OpenAPITools.Model /// </summary> [DataMember(Name = "uuid", EmitDefaultValue = false)] public Guid Uuid - { + { get{ return _Uuid;} set { _Uuid = value; _flagUuid = true; - } + } } private Guid _Uuid; private bool _flagUuid; @@ -400,13 +400,13 @@ namespace Org.OpenAPITools.Model /// </summary> [DataMember(Name = "password", IsRequired = true, EmitDefaultValue = false)] public string Password - { + { get{ return _Password;} set { _Password = value; _flagPassword = true; - } + } } private string _Password; private bool _flagPassword; @@ -425,13 +425,13 @@ namespace Org.OpenAPITools.Model /// <value>A string that is a 10 digit number. Can have leading zeros.</value> [DataMember(Name = "pattern_with_digits", EmitDefaultValue = false)] public string PatternWithDigits - { + { get{ return _PatternWithDigits;} set { _PatternWithDigits = value; _flagPatternWithDigits = true; - } + } } private string _PatternWithDigits; private bool _flagPatternWithDigits; @@ -450,13 +450,13 @@ namespace Org.OpenAPITools.Model /// <value>A string starting with 'image_' (case insensitive) and one to three digits following i.e. Image_01.</value> [DataMember(Name = "pattern_with_digits_and_delimiter", EmitDefaultValue = false)] public string PatternWithDigitsAndDelimiter - { + { get{ return _PatternWithDigitsAndDelimiter;} set { _PatternWithDigitsAndDelimiter = value; _flagPatternWithDigitsAndDelimiter = true; - } + } } private string _PatternWithDigitsAndDelimiter; private bool _flagPatternWithDigitsAndDelimiter; diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-ConditionalSerialization/src/Org.OpenAPITools/Model/GrandparentAnimal.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-ConditionalSerialization/src/Org.OpenAPITools/Model/GrandparentAnimal.cs index ab4b68f27acd53cc862f9ced77a78d970a99e268..a32b734acb3ec618a44d38b41ac76c1b035eee08 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-ConditionalSerialization/src/Org.OpenAPITools/Model/GrandparentAnimal.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-ConditionalSerialization/src/Org.OpenAPITools/Model/GrandparentAnimal.cs @@ -60,13 +60,13 @@ namespace Org.OpenAPITools.Model /// </summary> [DataMember(Name = "pet_type", IsRequired = true, EmitDefaultValue = false)] public string PetType - { + { get{ return _PetType;} set { _PetType = value; _flagPetType = true; - } + } } private string _PetType; private bool _flagPetType; diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-ConditionalSerialization/src/Org.OpenAPITools/Model/HasOnlyReadOnly.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-ConditionalSerialization/src/Org.OpenAPITools/Model/HasOnlyReadOnly.cs index 76b3bfdcce3e510268cbb96a3ed4bf6adf2fee29..fecd58bf6e8e455b10fe982139d091d4ae027eb7 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-ConditionalSerialization/src/Org.OpenAPITools/Model/HasOnlyReadOnly.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-ConditionalSerialization/src/Org.OpenAPITools/Model/HasOnlyReadOnly.cs @@ -46,7 +46,7 @@ namespace Org.OpenAPITools.Model /// </summary> [DataMember(Name = "bar", EmitDefaultValue = false)] public string Bar { get; private set; } - + /// <summary> /// Returns false as Bar should not be serialized given that it's read-only. /// </summary> @@ -60,7 +60,7 @@ namespace Org.OpenAPITools.Model /// </summary> [DataMember(Name = "foo", EmitDefaultValue = false)] public string Foo { get; private set; } - + /// <summary> /// Returns false as Foo should not be serialized given that it's read-only. /// </summary> diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-ConditionalSerialization/src/Org.OpenAPITools/Model/HealthCheckResult.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-ConditionalSerialization/src/Org.OpenAPITools/Model/HealthCheckResult.cs index d0a48d18a8f1257e58d0ecf2625429a764c9ffe6..d96b46d30ab126edbf179adfef7c6bb1a6c084ff 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-ConditionalSerialization/src/Org.OpenAPITools/Model/HealthCheckResult.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-ConditionalSerialization/src/Org.OpenAPITools/Model/HealthCheckResult.cs @@ -47,13 +47,13 @@ namespace Org.OpenAPITools.Model /// </summary> [DataMember(Name = "NullableMessage", EmitDefaultValue = true)] public string NullableMessage - { + { get{ return _NullableMessage;} set { _NullableMessage = value; _flagNullableMessage = true; - } + } } private string _NullableMessage; private bool _flagNullableMessage; diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-ConditionalSerialization/src/Org.OpenAPITools/Model/InlineResponseDefault.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-ConditionalSerialization/src/Org.OpenAPITools/Model/InlineResponseDefault.cs index 3110927e009fba9e796e6d7c7e5fd4e5d304f9ab..5aa3f49c0447c658d0a7d986589c6e3204714897 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-ConditionalSerialization/src/Org.OpenAPITools/Model/InlineResponseDefault.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-ConditionalSerialization/src/Org.OpenAPITools/Model/InlineResponseDefault.cs @@ -47,13 +47,13 @@ namespace Org.OpenAPITools.Model /// </summary> [DataMember(Name = "string", EmitDefaultValue = false)] public Foo String - { + { get{ return _String;} set { _String = value; _flagString = true; - } + } } private Foo _String; private bool _flagString; diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-ConditionalSerialization/src/Org.OpenAPITools/Model/IsoscelesTriangle.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-ConditionalSerialization/src/Org.OpenAPITools/Model/IsoscelesTriangle.cs index f23664d54c9c5d1ec2f6e042d70d2e780f7de3a7..f1c29435e5d8f211ed6cc181d7c02861b385f128 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-ConditionalSerialization/src/Org.OpenAPITools/Model/IsoscelesTriangle.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-ConditionalSerialization/src/Org.OpenAPITools/Model/IsoscelesTriangle.cs @@ -55,13 +55,13 @@ namespace Org.OpenAPITools.Model /// </summary> [DataMember(Name = "shapeType", IsRequired = true, EmitDefaultValue = false)] public string ShapeType - { + { get{ return _ShapeType;} set { _ShapeType = value; _flagShapeType = true; - } + } } private string _ShapeType; private bool _flagShapeType; @@ -79,13 +79,13 @@ namespace Org.OpenAPITools.Model /// </summary> [DataMember(Name = "triangleType", IsRequired = true, EmitDefaultValue = false)] public string TriangleType - { + { get{ return _TriangleType;} set { _TriangleType = value; _flagTriangleType = true; - } + } } private string _TriangleType; private bool _flagTriangleType; diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-ConditionalSerialization/src/Org.OpenAPITools/Model/List.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-ConditionalSerialization/src/Org.OpenAPITools/Model/List.cs index dfb5a8abd4cb95eecfcb2dfd2abc26cc7e641d2a..25695fa2798be0ee684dc4f53d6a48f96d6d82d7 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-ConditionalSerialization/src/Org.OpenAPITools/Model/List.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-ConditionalSerialization/src/Org.OpenAPITools/Model/List.cs @@ -47,13 +47,13 @@ namespace Org.OpenAPITools.Model /// </summary> [DataMember(Name = "123-list", EmitDefaultValue = false)] public string _123List - { + { get{ return __123List;} set { __123List = value; _flag_123List = true; - } + } } private string __123List; private bool _flag_123List; diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-ConditionalSerialization/src/Org.OpenAPITools/Model/MapTest.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-ConditionalSerialization/src/Org.OpenAPITools/Model/MapTest.cs index 46684e9a9b3ee5274e935649c78efe8be4f8c4c4..bd53e65a4a86c6bf9b30266d2fcd92ad0417686b 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-ConditionalSerialization/src/Org.OpenAPITools/Model/MapTest.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-ConditionalSerialization/src/Org.OpenAPITools/Model/MapTest.cs @@ -57,10 +57,10 @@ namespace Org.OpenAPITools.Model /// <summary> /// Gets or Sets MapOfEnumString /// </summary> - + [DataMember(Name = "map_of_enum_string", EmitDefaultValue = false)] - public Dictionary<string, InnerEnum> MapOfEnumString - { + public Dictionary<string, InnerEnum> MapOfEnumString + { get{ return _MapOfEnumString;} set { @@ -100,13 +100,13 @@ namespace Org.OpenAPITools.Model /// </summary> [DataMember(Name = "map_map_of_string", EmitDefaultValue = false)] public Dictionary<string, Dictionary<string, string>> MapMapOfString - { + { get{ return _MapMapOfString;} set { _MapMapOfString = value; _flagMapMapOfString = true; - } + } } private Dictionary<string, Dictionary<string, string>> _MapMapOfString; private bool _flagMapMapOfString; @@ -124,13 +124,13 @@ namespace Org.OpenAPITools.Model /// </summary> [DataMember(Name = "direct_map", EmitDefaultValue = false)] public Dictionary<string, bool> DirectMap - { + { get{ return _DirectMap;} set { _DirectMap = value; _flagDirectMap = true; - } + } } private Dictionary<string, bool> _DirectMap; private bool _flagDirectMap; @@ -148,13 +148,13 @@ namespace Org.OpenAPITools.Model /// </summary> [DataMember(Name = "indirect_map", EmitDefaultValue = false)] public Dictionary<string, bool> IndirectMap - { + { get{ return _IndirectMap;} set { _IndirectMap = value; _flagIndirectMap = true; - } + } } private Dictionary<string, bool> _IndirectMap; private bool _flagIndirectMap; diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-ConditionalSerialization/src/Org.OpenAPITools/Model/MixedPropertiesAndAdditionalPropertiesClass.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-ConditionalSerialization/src/Org.OpenAPITools/Model/MixedPropertiesAndAdditionalPropertiesClass.cs index 398f665583f33e2e7745e82fdf7f1a6ce26fe538..9bea81f64bdfb3e88b562fe24be7c3b6a41d682c 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-ConditionalSerialization/src/Org.OpenAPITools/Model/MixedPropertiesAndAdditionalPropertiesClass.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-ConditionalSerialization/src/Org.OpenAPITools/Model/MixedPropertiesAndAdditionalPropertiesClass.cs @@ -51,13 +51,13 @@ namespace Org.OpenAPITools.Model /// </summary> [DataMember(Name = "uuid", EmitDefaultValue = false)] public Guid Uuid - { + { get{ return _Uuid;} set { _Uuid = value; _flagUuid = true; - } + } } private Guid _Uuid; private bool _flagUuid; @@ -75,13 +75,13 @@ namespace Org.OpenAPITools.Model /// </summary> [DataMember(Name = "dateTime", EmitDefaultValue = false)] public DateTime DateTime - { + { get{ return _DateTime;} set { _DateTime = value; _flagDateTime = true; - } + } } private DateTime _DateTime; private bool _flagDateTime; @@ -99,13 +99,13 @@ namespace Org.OpenAPITools.Model /// </summary> [DataMember(Name = "map", EmitDefaultValue = false)] public Dictionary<string, Animal> Map - { + { get{ return _Map;} set { _Map = value; _flagMap = true; - } + } } private Dictionary<string, Animal> _Map; private bool _flagMap; diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-ConditionalSerialization/src/Org.OpenAPITools/Model/Model200Response.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-ConditionalSerialization/src/Org.OpenAPITools/Model/Model200Response.cs index 551edfd19de07302f2288ed6065d0698290a3494..cba1bbba4c77522cd6490f7f5b9d1f9d6d1b967a 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-ConditionalSerialization/src/Org.OpenAPITools/Model/Model200Response.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-ConditionalSerialization/src/Org.OpenAPITools/Model/Model200Response.cs @@ -49,13 +49,13 @@ namespace Org.OpenAPITools.Model /// </summary> [DataMember(Name = "name", EmitDefaultValue = false)] public int Name - { + { get{ return _Name;} set { _Name = value; _flagName = true; - } + } } private int _Name; private bool _flagName; @@ -73,13 +73,13 @@ namespace Org.OpenAPITools.Model /// </summary> [DataMember(Name = "class", EmitDefaultValue = false)] public string Class - { + { get{ return _Class;} set { _Class = value; _flagClass = true; - } + } } private string _Class; private bool _flagClass; diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-ConditionalSerialization/src/Org.OpenAPITools/Model/ModelClient.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-ConditionalSerialization/src/Org.OpenAPITools/Model/ModelClient.cs index 0bef108925ea49fc069b39d754d4028b3698871d..1eb982843ea898efac51ab3474ab7ef549cbda76 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-ConditionalSerialization/src/Org.OpenAPITools/Model/ModelClient.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-ConditionalSerialization/src/Org.OpenAPITools/Model/ModelClient.cs @@ -47,13 +47,13 @@ namespace Org.OpenAPITools.Model /// </summary> [DataMember(Name = "client", EmitDefaultValue = false)] public string _Client - { + { get{ return __Client;} set { __Client = value; _flag_Client = true; - } + } } private string __Client; private bool _flag_Client; diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-ConditionalSerialization/src/Org.OpenAPITools/Model/Name.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-ConditionalSerialization/src/Org.OpenAPITools/Model/Name.cs index 02b318f8a357c32f80cd23318602ffb91331f0e0..05d81c9be6760e1bf51a7535cbda885ec79c063c 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-ConditionalSerialization/src/Org.OpenAPITools/Model/Name.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-ConditionalSerialization/src/Org.OpenAPITools/Model/Name.cs @@ -57,13 +57,13 @@ namespace Org.OpenAPITools.Model /// </summary> [DataMember(Name = "name", IsRequired = true, EmitDefaultValue = false)] public int _Name - { + { get{ return __Name;} set { __Name = value; _flag_Name = true; - } + } } private int __Name; private bool _flag_Name; @@ -81,7 +81,7 @@ namespace Org.OpenAPITools.Model /// </summary> [DataMember(Name = "snake_case", EmitDefaultValue = false)] public int SnakeCase { get; private set; } - + /// <summary> /// Returns false as SnakeCase should not be serialized given that it's read-only. /// </summary> @@ -95,13 +95,13 @@ namespace Org.OpenAPITools.Model /// </summary> [DataMember(Name = "property", EmitDefaultValue = false)] public string Property - { + { get{ return _Property;} set { _Property = value; _flagProperty = true; - } + } } private string _Property; private bool _flagProperty; @@ -119,7 +119,7 @@ namespace Org.OpenAPITools.Model /// </summary> [DataMember(Name = "123Number", EmitDefaultValue = false)] public int _123Number { get; private set; } - + /// <summary> /// Returns false as _123Number should not be serialized given that it's read-only. /// </summary> diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-ConditionalSerialization/src/Org.OpenAPITools/Model/NullableClass.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-ConditionalSerialization/src/Org.OpenAPITools/Model/NullableClass.cs index 0df684cf5343b266100bf0463d4e39885f8e5920..accbc695e1431af276e161f323c447a05dea5295 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-ConditionalSerialization/src/Org.OpenAPITools/Model/NullableClass.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-ConditionalSerialization/src/Org.OpenAPITools/Model/NullableClass.cs @@ -68,13 +68,13 @@ namespace Org.OpenAPITools.Model /// </summary> [DataMember(Name = "integer_prop", EmitDefaultValue = true)] public int? IntegerProp - { + { get{ return _IntegerProp;} set { _IntegerProp = value; _flagIntegerProp = true; - } + } } private int? _IntegerProp; private bool _flagIntegerProp; @@ -92,13 +92,13 @@ namespace Org.OpenAPITools.Model /// </summary> [DataMember(Name = "number_prop", EmitDefaultValue = true)] public decimal? NumberProp - { + { get{ return _NumberProp;} set { _NumberProp = value; _flagNumberProp = true; - } + } } private decimal? _NumberProp; private bool _flagNumberProp; @@ -116,13 +116,13 @@ namespace Org.OpenAPITools.Model /// </summary> [DataMember(Name = "boolean_prop", EmitDefaultValue = true)] public bool? BooleanProp - { + { get{ return _BooleanProp;} set { _BooleanProp = value; _flagBooleanProp = true; - } + } } private bool? _BooleanProp; private bool _flagBooleanProp; @@ -140,13 +140,13 @@ namespace Org.OpenAPITools.Model /// </summary> [DataMember(Name = "string_prop", EmitDefaultValue = true)] public string StringProp - { + { get{ return _StringProp;} set { _StringProp = value; _flagStringProp = true; - } + } } private string _StringProp; private bool _flagStringProp; @@ -165,13 +165,13 @@ namespace Org.OpenAPITools.Model [JsonConverter(typeof(OpenAPIDateConverter))] [DataMember(Name = "date_prop", EmitDefaultValue = true)] public DateTime? DateProp - { + { get{ return _DateProp;} set { _DateProp = value; _flagDateProp = true; - } + } } private DateTime? _DateProp; private bool _flagDateProp; @@ -189,13 +189,13 @@ namespace Org.OpenAPITools.Model /// </summary> [DataMember(Name = "datetime_prop", EmitDefaultValue = true)] public DateTime? DatetimeProp - { + { get{ return _DatetimeProp;} set { _DatetimeProp = value; _flagDatetimeProp = true; - } + } } private DateTime? _DatetimeProp; private bool _flagDatetimeProp; @@ -213,13 +213,13 @@ namespace Org.OpenAPITools.Model /// </summary> [DataMember(Name = "array_nullable_prop", EmitDefaultValue = true)] public List<Object> ArrayNullableProp - { + { get{ return _ArrayNullableProp;} set { _ArrayNullableProp = value; _flagArrayNullableProp = true; - } + } } private List<Object> _ArrayNullableProp; private bool _flagArrayNullableProp; @@ -237,13 +237,13 @@ namespace Org.OpenAPITools.Model /// </summary> [DataMember(Name = "array_and_items_nullable_prop", EmitDefaultValue = true)] public List<Object> ArrayAndItemsNullableProp - { + { get{ return _ArrayAndItemsNullableProp;} set { _ArrayAndItemsNullableProp = value; _flagArrayAndItemsNullableProp = true; - } + } } private List<Object> _ArrayAndItemsNullableProp; private bool _flagArrayAndItemsNullableProp; @@ -261,13 +261,13 @@ namespace Org.OpenAPITools.Model /// </summary> [DataMember(Name = "array_items_nullable", EmitDefaultValue = false)] public List<Object> ArrayItemsNullable - { + { get{ return _ArrayItemsNullable;} set { _ArrayItemsNullable = value; _flagArrayItemsNullable = true; - } + } } private List<Object> _ArrayItemsNullable; private bool _flagArrayItemsNullable; @@ -285,13 +285,13 @@ namespace Org.OpenAPITools.Model /// </summary> [DataMember(Name = "object_nullable_prop", EmitDefaultValue = true)] public Dictionary<string, Object> ObjectNullableProp - { + { get{ return _ObjectNullableProp;} set { _ObjectNullableProp = value; _flagObjectNullableProp = true; - } + } } private Dictionary<string, Object> _ObjectNullableProp; private bool _flagObjectNullableProp; @@ -309,13 +309,13 @@ namespace Org.OpenAPITools.Model /// </summary> [DataMember(Name = "object_and_items_nullable_prop", EmitDefaultValue = true)] public Dictionary<string, Object> ObjectAndItemsNullableProp - { + { get{ return _ObjectAndItemsNullableProp;} set { _ObjectAndItemsNullableProp = value; _flagObjectAndItemsNullableProp = true; - } + } } private Dictionary<string, Object> _ObjectAndItemsNullableProp; private bool _flagObjectAndItemsNullableProp; @@ -333,13 +333,13 @@ namespace Org.OpenAPITools.Model /// </summary> [DataMember(Name = "object_items_nullable", EmitDefaultValue = false)] public Dictionary<string, Object> ObjectItemsNullable - { + { get{ return _ObjectItemsNullable;} set { _ObjectItemsNullable = value; _flagObjectItemsNullable = true; - } + } } private Dictionary<string, Object> _ObjectItemsNullable; private bool _flagObjectItemsNullable; diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-ConditionalSerialization/src/Org.OpenAPITools/Model/NumberOnly.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-ConditionalSerialization/src/Org.OpenAPITools/Model/NumberOnly.cs index 9209ffb0261bfc4384b74e6a52388a25771b2f53..a14510d60e4b5c27786a14583fa728e0e3f55687 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-ConditionalSerialization/src/Org.OpenAPITools/Model/NumberOnly.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-ConditionalSerialization/src/Org.OpenAPITools/Model/NumberOnly.cs @@ -47,13 +47,13 @@ namespace Org.OpenAPITools.Model /// </summary> [DataMember(Name = "JustNumber", EmitDefaultValue = false)] public decimal JustNumber - { + { get{ return _JustNumber;} set { _JustNumber = value; _flagJustNumber = true; - } + } } private decimal _JustNumber; private bool _flagJustNumber; diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-ConditionalSerialization/src/Org.OpenAPITools/Model/ObjectWithDeprecatedFields.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-ConditionalSerialization/src/Org.OpenAPITools/Model/ObjectWithDeprecatedFields.cs index d07754cd2e7af31a21dd262256583ee0923bfb5e..15f8401c64a5b6ba2322f10e053eccb70bcf7c71 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-ConditionalSerialization/src/Org.OpenAPITools/Model/ObjectWithDeprecatedFields.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-ConditionalSerialization/src/Org.OpenAPITools/Model/ObjectWithDeprecatedFields.cs @@ -53,13 +53,13 @@ namespace Org.OpenAPITools.Model /// </summary> [DataMember(Name = "uuid", EmitDefaultValue = false)] public string Uuid - { + { get{ return _Uuid;} set { _Uuid = value; _flagUuid = true; - } + } } private string _Uuid; private bool _flagUuid; @@ -78,13 +78,13 @@ namespace Org.OpenAPITools.Model [DataMember(Name = "id", EmitDefaultValue = false)] [Obsolete] public decimal Id - { + { get{ return _Id;} set { _Id = value; _flagId = true; - } + } } private decimal _Id; private bool _flagId; @@ -103,13 +103,13 @@ namespace Org.OpenAPITools.Model [DataMember(Name = "deprecatedRef", EmitDefaultValue = false)] [Obsolete] public DeprecatedObject DeprecatedRef - { + { get{ return _DeprecatedRef;} set { _DeprecatedRef = value; _flagDeprecatedRef = true; - } + } } private DeprecatedObject _DeprecatedRef; private bool _flagDeprecatedRef; @@ -128,13 +128,13 @@ namespace Org.OpenAPITools.Model [DataMember(Name = "bars", EmitDefaultValue = false)] [Obsolete] public List<string> Bars - { + { get{ return _Bars;} set { _Bars = value; _flagBars = true; - } + } } private List<string> _Bars; private bool _flagBars; diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-ConditionalSerialization/src/Org.OpenAPITools/Model/Order.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-ConditionalSerialization/src/Org.OpenAPITools/Model/Order.cs index 57d934273993093d1d9eb2cae4cab8dc7a3b3936..023469af01abb2f12cbe055409531116f13826f6 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-ConditionalSerialization/src/Org.OpenAPITools/Model/Order.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-ConditionalSerialization/src/Org.OpenAPITools/Model/Order.cs @@ -64,10 +64,10 @@ namespace Org.OpenAPITools.Model /// Order Status /// </summary> /// <value>Order Status</value> - + [DataMember(Name = "status", EmitDefaultValue = false)] - public StatusEnum? Status - { + public StatusEnum? Status + { get{ return _Status;} set { @@ -111,13 +111,13 @@ namespace Org.OpenAPITools.Model /// </summary> [DataMember(Name = "id", EmitDefaultValue = false)] public long Id - { + { get{ return _Id;} set { _Id = value; _flagId = true; - } + } } private long _Id; private bool _flagId; @@ -135,13 +135,13 @@ namespace Org.OpenAPITools.Model /// </summary> [DataMember(Name = "petId", EmitDefaultValue = false)] public long PetId - { + { get{ return _PetId;} set { _PetId = value; _flagPetId = true; - } + } } private long _PetId; private bool _flagPetId; @@ -159,13 +159,13 @@ namespace Org.OpenAPITools.Model /// </summary> [DataMember(Name = "quantity", EmitDefaultValue = false)] public int Quantity - { + { get{ return _Quantity;} set { _Quantity = value; _flagQuantity = true; - } + } } private int _Quantity; private bool _flagQuantity; @@ -183,13 +183,13 @@ namespace Org.OpenAPITools.Model /// </summary> [DataMember(Name = "shipDate", EmitDefaultValue = false)] public DateTime ShipDate - { + { get{ return _ShipDate;} set { _ShipDate = value; _flagShipDate = true; - } + } } private DateTime _ShipDate; private bool _flagShipDate; @@ -207,13 +207,13 @@ namespace Org.OpenAPITools.Model /// </summary> [DataMember(Name = "complete", EmitDefaultValue = true)] public bool Complete - { + { get{ return _Complete;} set { _Complete = value; _flagComplete = true; - } + } } private bool _Complete; private bool _flagComplete; diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-ConditionalSerialization/src/Org.OpenAPITools/Model/OuterComposite.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-ConditionalSerialization/src/Org.OpenAPITools/Model/OuterComposite.cs index 9fb0d68d1a8bf13b7e2d109bac81c39ec7f17910..d67ddef141e07e435bd021b089ab4f2776211a88 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-ConditionalSerialization/src/Org.OpenAPITools/Model/OuterComposite.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-ConditionalSerialization/src/Org.OpenAPITools/Model/OuterComposite.cs @@ -51,13 +51,13 @@ namespace Org.OpenAPITools.Model /// </summary> [DataMember(Name = "my_number", EmitDefaultValue = false)] public decimal MyNumber - { + { get{ return _MyNumber;} set { _MyNumber = value; _flagMyNumber = true; - } + } } private decimal _MyNumber; private bool _flagMyNumber; @@ -75,13 +75,13 @@ namespace Org.OpenAPITools.Model /// </summary> [DataMember(Name = "my_string", EmitDefaultValue = false)] public string MyString - { + { get{ return _MyString;} set { _MyString = value; _flagMyString = true; - } + } } private string _MyString; private bool _flagMyString; @@ -99,13 +99,13 @@ namespace Org.OpenAPITools.Model /// </summary> [DataMember(Name = "my_boolean", EmitDefaultValue = true)] public bool MyBoolean - { + { get{ return _MyBoolean;} set { _MyBoolean = value; _flagMyBoolean = true; - } + } } private bool _MyBoolean; private bool _flagMyBoolean; diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-ConditionalSerialization/src/Org.OpenAPITools/Model/Pet.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-ConditionalSerialization/src/Org.OpenAPITools/Model/Pet.cs index d9b77cf3b8f8e5e5249c04142ff8dd7d681aeb69..cfdd6000e0675755f2aadc3aab43192c97598e39 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-ConditionalSerialization/src/Org.OpenAPITools/Model/Pet.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-ConditionalSerialization/src/Org.OpenAPITools/Model/Pet.cs @@ -64,10 +64,10 @@ namespace Org.OpenAPITools.Model /// pet status in the store /// </summary> /// <value>pet status in the store</value> - + [DataMember(Name = "status", EmitDefaultValue = false)] - public StatusEnum? Status - { + public StatusEnum? Status + { get{ return _Status;} set { @@ -121,13 +121,13 @@ namespace Org.OpenAPITools.Model /// </summary> [DataMember(Name = "id", EmitDefaultValue = false)] public long Id - { + { get{ return _Id;} set { _Id = value; _flagId = true; - } + } } private long _Id; private bool _flagId; @@ -145,13 +145,13 @@ namespace Org.OpenAPITools.Model /// </summary> [DataMember(Name = "category", EmitDefaultValue = false)] public Category Category - { + { get{ return _Category;} set { _Category = value; _flagCategory = true; - } + } } private Category _Category; private bool _flagCategory; @@ -169,13 +169,13 @@ namespace Org.OpenAPITools.Model /// </summary> [DataMember(Name = "name", IsRequired = true, EmitDefaultValue = false)] public string Name - { + { get{ return _Name;} set { _Name = value; _flagName = true; - } + } } private string _Name; private bool _flagName; @@ -193,13 +193,13 @@ namespace Org.OpenAPITools.Model /// </summary> [DataMember(Name = "photoUrls", IsRequired = true, EmitDefaultValue = false)] public List<string> PhotoUrls - { + { get{ return _PhotoUrls;} set { _PhotoUrls = value; _flagPhotoUrls = true; - } + } } private List<string> _PhotoUrls; private bool _flagPhotoUrls; @@ -217,13 +217,13 @@ namespace Org.OpenAPITools.Model /// </summary> [DataMember(Name = "tags", EmitDefaultValue = false)] public List<Tag> Tags - { + { get{ return _Tags;} set { _Tags = value; _flagTags = true; - } + } } private List<Tag> _Tags; private bool _flagTags; diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-ConditionalSerialization/src/Org.OpenAPITools/Model/QuadrilateralInterface.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-ConditionalSerialization/src/Org.OpenAPITools/Model/QuadrilateralInterface.cs index 08a2bfdd7fe56ab5ed9827d51bf118a6f9aa743d..43953913572fa3f584888efc3eca09a563ef3a7c 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-ConditionalSerialization/src/Org.OpenAPITools/Model/QuadrilateralInterface.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-ConditionalSerialization/src/Org.OpenAPITools/Model/QuadrilateralInterface.cs @@ -56,13 +56,13 @@ namespace Org.OpenAPITools.Model /// </summary> [DataMember(Name = "quadrilateralType", IsRequired = true, EmitDefaultValue = false)] public string QuadrilateralType - { + { get{ return _QuadrilateralType;} set { _QuadrilateralType = value; _flagQuadrilateralType = true; - } + } } private string _QuadrilateralType; private bool _flagQuadrilateralType; diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-ConditionalSerialization/src/Org.OpenAPITools/Model/ReadOnlyFirst.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-ConditionalSerialization/src/Org.OpenAPITools/Model/ReadOnlyFirst.cs index 0720f5429056da2351f5a4991415b0a45e97fa2d..cc931bc6e9c1aa554d1015117324dd45031fddd2 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-ConditionalSerialization/src/Org.OpenAPITools/Model/ReadOnlyFirst.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-ConditionalSerialization/src/Org.OpenAPITools/Model/ReadOnlyFirst.cs @@ -47,7 +47,7 @@ namespace Org.OpenAPITools.Model /// </summary> [DataMember(Name = "bar", EmitDefaultValue = false)] public string Bar { get; private set; } - + /// <summary> /// Returns false as Bar should not be serialized given that it's read-only. /// </summary> @@ -61,13 +61,13 @@ namespace Org.OpenAPITools.Model /// </summary> [DataMember(Name = "baz", EmitDefaultValue = false)] public string Baz - { + { get{ return _Baz;} set { _Baz = value; _flagBaz = true; - } + } } private string _Baz; private bool _flagBaz; diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-ConditionalSerialization/src/Org.OpenAPITools/Model/Return.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-ConditionalSerialization/src/Org.OpenAPITools/Model/Return.cs index 4d71922d6bf07f911bfa3b2770fd0ea132763177..3cdd052578d85b1af47c0cc69b88116df78b1dfa 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-ConditionalSerialization/src/Org.OpenAPITools/Model/Return.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-ConditionalSerialization/src/Org.OpenAPITools/Model/Return.cs @@ -47,13 +47,13 @@ namespace Org.OpenAPITools.Model /// </summary> [DataMember(Name = "return", EmitDefaultValue = false)] public int _Return - { + { get{ return __Return;} set { __Return = value; _flag_Return = true; - } + } } private int __Return; private bool _flag_Return; diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-ConditionalSerialization/src/Org.OpenAPITools/Model/ScaleneTriangle.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-ConditionalSerialization/src/Org.OpenAPITools/Model/ScaleneTriangle.cs index c99f9c1b94bd01449fa5782c78772798c9326639..5fa9b4b229359b949986a5018174becec24bfb8c 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-ConditionalSerialization/src/Org.OpenAPITools/Model/ScaleneTriangle.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-ConditionalSerialization/src/Org.OpenAPITools/Model/ScaleneTriangle.cs @@ -59,13 +59,13 @@ namespace Org.OpenAPITools.Model /// </summary> [DataMember(Name = "shapeType", IsRequired = true, EmitDefaultValue = false)] public string ShapeType - { + { get{ return _ShapeType;} set { _ShapeType = value; _flagShapeType = true; - } + } } private string _ShapeType; private bool _flagShapeType; @@ -83,13 +83,13 @@ namespace Org.OpenAPITools.Model /// </summary> [DataMember(Name = "triangleType", IsRequired = true, EmitDefaultValue = false)] public string TriangleType - { + { get{ return _TriangleType;} set { _TriangleType = value; _flagTriangleType = true; - } + } } private string _TriangleType; private bool _flagTriangleType; diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-ConditionalSerialization/src/Org.OpenAPITools/Model/ShapeInterface.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-ConditionalSerialization/src/Org.OpenAPITools/Model/ShapeInterface.cs index 252d2f1b67de1ddef1f20c688db1ee38d30b0598..42db332d22dc824e43091754b88a8b07f4018f43 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-ConditionalSerialization/src/Org.OpenAPITools/Model/ShapeInterface.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-ConditionalSerialization/src/Org.OpenAPITools/Model/ShapeInterface.cs @@ -56,13 +56,13 @@ namespace Org.OpenAPITools.Model /// </summary> [DataMember(Name = "shapeType", IsRequired = true, EmitDefaultValue = false)] public string ShapeType - { + { get{ return _ShapeType;} set { _ShapeType = value; _flagShapeType = true; - } + } } private string _ShapeType; private bool _flagShapeType; diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-ConditionalSerialization/src/Org.OpenAPITools/Model/SimpleQuadrilateral.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-ConditionalSerialization/src/Org.OpenAPITools/Model/SimpleQuadrilateral.cs index 987c37ca8fd906bd792bad0f2da7fdd64cba182f..000a2f40a2a60225ab35f0ef10ba0e5cfe5c0a15 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-ConditionalSerialization/src/Org.OpenAPITools/Model/SimpleQuadrilateral.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-ConditionalSerialization/src/Org.OpenAPITools/Model/SimpleQuadrilateral.cs @@ -59,13 +59,13 @@ namespace Org.OpenAPITools.Model /// </summary> [DataMember(Name = "shapeType", IsRequired = true, EmitDefaultValue = false)] public string ShapeType - { + { get{ return _ShapeType;} set { _ShapeType = value; _flagShapeType = true; - } + } } private string _ShapeType; private bool _flagShapeType; @@ -83,13 +83,13 @@ namespace Org.OpenAPITools.Model /// </summary> [DataMember(Name = "quadrilateralType", IsRequired = true, EmitDefaultValue = false)] public string QuadrilateralType - { + { get{ return _QuadrilateralType;} set { _QuadrilateralType = value; _flagQuadrilateralType = true; - } + } } private string _QuadrilateralType; private bool _flagQuadrilateralType; diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-ConditionalSerialization/src/Org.OpenAPITools/Model/SpecialModelName.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-ConditionalSerialization/src/Org.OpenAPITools/Model/SpecialModelName.cs index 15361a89e626df0c19179aa42b0afce1bc41b6c1..c278d855ea0c37c3b0af7c9833999f724b1bcfb6 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-ConditionalSerialization/src/Org.OpenAPITools/Model/SpecialModelName.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-ConditionalSerialization/src/Org.OpenAPITools/Model/SpecialModelName.cs @@ -49,13 +49,13 @@ namespace Org.OpenAPITools.Model /// </summary> [DataMember(Name = "$special[property.name]", EmitDefaultValue = false)] public long SpecialPropertyName - { + { get{ return _SpecialPropertyName;} set { _SpecialPropertyName = value; _flagSpecialPropertyName = true; - } + } } private long _SpecialPropertyName; private bool _flagSpecialPropertyName; @@ -73,13 +73,13 @@ namespace Org.OpenAPITools.Model /// </summary> [DataMember(Name = "_special_model.name_", EmitDefaultValue = false)] public string _SpecialModelName - { + { get{ return __SpecialModelName;} set { __SpecialModelName = value; _flag_SpecialModelName = true; - } + } } private string __SpecialModelName; private bool _flag_SpecialModelName; diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-ConditionalSerialization/src/Org.OpenAPITools/Model/Tag.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-ConditionalSerialization/src/Org.OpenAPITools/Model/Tag.cs index 573443ca6add8f05dbe87724539896b3d2a47928..a0676fc183e9eea9604bcadbfec9756e85141e8c 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-ConditionalSerialization/src/Org.OpenAPITools/Model/Tag.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-ConditionalSerialization/src/Org.OpenAPITools/Model/Tag.cs @@ -49,13 +49,13 @@ namespace Org.OpenAPITools.Model /// </summary> [DataMember(Name = "id", EmitDefaultValue = false)] public long Id - { + { get{ return _Id;} set { _Id = value; _flagId = true; - } + } } private long _Id; private bool _flagId; @@ -73,13 +73,13 @@ namespace Org.OpenAPITools.Model /// </summary> [DataMember(Name = "name", EmitDefaultValue = false)] public string Name - { + { get{ return _Name;} set { _Name = value; _flagName = true; - } + } } private string _Name; private bool _flagName; diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-ConditionalSerialization/src/Org.OpenAPITools/Model/TriangleInterface.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-ConditionalSerialization/src/Org.OpenAPITools/Model/TriangleInterface.cs index 21ef9120066fa1705d8071145f6015849ef288fb..7f0a072a9627a826cf8e730cefb02cdd24507725 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-ConditionalSerialization/src/Org.OpenAPITools/Model/TriangleInterface.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-ConditionalSerialization/src/Org.OpenAPITools/Model/TriangleInterface.cs @@ -56,13 +56,13 @@ namespace Org.OpenAPITools.Model /// </summary> [DataMember(Name = "triangleType", IsRequired = true, EmitDefaultValue = false)] public string TriangleType - { + { get{ return _TriangleType;} set { _TriangleType = value; _flagTriangleType = true; - } + } } private string _TriangleType; private bool _flagTriangleType; diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-ConditionalSerialization/src/Org.OpenAPITools/Model/User.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-ConditionalSerialization/src/Org.OpenAPITools/Model/User.cs index 16e9fdf6b7f6ccf2f3ef9a6e37f0c9d0709dc738..f38a6ae5f524001c447332c97dc9f1fb33f163c6 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-ConditionalSerialization/src/Org.OpenAPITools/Model/User.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-ConditionalSerialization/src/Org.OpenAPITools/Model/User.cs @@ -69,13 +69,13 @@ namespace Org.OpenAPITools.Model /// </summary> [DataMember(Name = "id", EmitDefaultValue = false)] public long Id - { + { get{ return _Id;} set { _Id = value; _flagId = true; - } + } } private long _Id; private bool _flagId; @@ -93,13 +93,13 @@ namespace Org.OpenAPITools.Model /// </summary> [DataMember(Name = "username", EmitDefaultValue = false)] public string Username - { + { get{ return _Username;} set { _Username = value; _flagUsername = true; - } + } } private string _Username; private bool _flagUsername; @@ -117,13 +117,13 @@ namespace Org.OpenAPITools.Model /// </summary> [DataMember(Name = "firstName", EmitDefaultValue = false)] public string FirstName - { + { get{ return _FirstName;} set { _FirstName = value; _flagFirstName = true; - } + } } private string _FirstName; private bool _flagFirstName; @@ -141,13 +141,13 @@ namespace Org.OpenAPITools.Model /// </summary> [DataMember(Name = "lastName", EmitDefaultValue = false)] public string LastName - { + { get{ return _LastName;} set { _LastName = value; _flagLastName = true; - } + } } private string _LastName; private bool _flagLastName; @@ -165,13 +165,13 @@ namespace Org.OpenAPITools.Model /// </summary> [DataMember(Name = "email", EmitDefaultValue = false)] public string Email - { + { get{ return _Email;} set { _Email = value; _flagEmail = true; - } + } } private string _Email; private bool _flagEmail; @@ -189,13 +189,13 @@ namespace Org.OpenAPITools.Model /// </summary> [DataMember(Name = "password", EmitDefaultValue = false)] public string Password - { + { get{ return _Password;} set { _Password = value; _flagPassword = true; - } + } } private string _Password; private bool _flagPassword; @@ -213,13 +213,13 @@ namespace Org.OpenAPITools.Model /// </summary> [DataMember(Name = "phone", EmitDefaultValue = false)] public string Phone - { + { get{ return _Phone;} set { _Phone = value; _flagPhone = true; - } + } } private string _Phone; private bool _flagPhone; @@ -238,13 +238,13 @@ namespace Org.OpenAPITools.Model /// <value>User Status</value> [DataMember(Name = "userStatus", EmitDefaultValue = false)] public int UserStatus - { + { get{ return _UserStatus;} set { _UserStatus = value; _flagUserStatus = true; - } + } } private int _UserStatus; private bool _flagUserStatus; @@ -263,13 +263,13 @@ namespace Org.OpenAPITools.Model /// <value>test code generation for objects Value must be a map of strings to values. It cannot be the 'null' value.</value> [DataMember(Name = "objectWithNoDeclaredProps", EmitDefaultValue = false)] public Object ObjectWithNoDeclaredProps - { + { get{ return _ObjectWithNoDeclaredProps;} set { _ObjectWithNoDeclaredProps = value; _flagObjectWithNoDeclaredProps = true; - } + } } private Object _ObjectWithNoDeclaredProps; private bool _flagObjectWithNoDeclaredProps; @@ -288,13 +288,13 @@ namespace Org.OpenAPITools.Model /// <value>test code generation for nullable objects. Value must be a map of strings to values or the 'null' value.</value> [DataMember(Name = "objectWithNoDeclaredPropsNullable", EmitDefaultValue = true)] public Object ObjectWithNoDeclaredPropsNullable - { + { get{ return _ObjectWithNoDeclaredPropsNullable;} set { _ObjectWithNoDeclaredPropsNullable = value; _flagObjectWithNoDeclaredPropsNullable = true; - } + } } private Object _ObjectWithNoDeclaredPropsNullable; private bool _flagObjectWithNoDeclaredPropsNullable; @@ -313,13 +313,13 @@ namespace Org.OpenAPITools.Model /// <value>test code generation for any type Here the 'type' attribute is not specified, which means the value can be anything, including the null value, string, number, boolean, array or object. See https://github.com/OAI/OpenAPI-Specification/issues/1389</value> [DataMember(Name = "anyTypeProp", EmitDefaultValue = true)] public Object AnyTypeProp - { + { get{ return _AnyTypeProp;} set { _AnyTypeProp = value; _flagAnyTypeProp = true; - } + } } private Object _AnyTypeProp; private bool _flagAnyTypeProp; @@ -338,13 +338,13 @@ namespace Org.OpenAPITools.Model /// <value>test code generation for any type Here the 'type' attribute is not specified, which means the value can be anything, including the null value, string, number, boolean, array or object. The 'nullable' attribute does not change the allowed values.</value> [DataMember(Name = "anyTypePropNullable", EmitDefaultValue = true)] public Object AnyTypePropNullable - { + { get{ return _AnyTypePropNullable;} set { _AnyTypePropNullable = value; _flagAnyTypePropNullable = true; - } + } } private Object _AnyTypePropNullable; private bool _flagAnyTypePropNullable; diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-ConditionalSerialization/src/Org.OpenAPITools/Model/Whale.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-ConditionalSerialization/src/Org.OpenAPITools/Model/Whale.cs index 74433740aa075490d537276b4ef07a8f18d80df0..eeda8ca8b42387c98276d109f25a3edf9914981f 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-ConditionalSerialization/src/Org.OpenAPITools/Model/Whale.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-ConditionalSerialization/src/Org.OpenAPITools/Model/Whale.cs @@ -60,13 +60,13 @@ namespace Org.OpenAPITools.Model /// </summary> [DataMember(Name = "hasBaleen", EmitDefaultValue = true)] public bool HasBaleen - { + { get{ return _HasBaleen;} set { _HasBaleen = value; _flagHasBaleen = true; - } + } } private bool _HasBaleen; private bool _flagHasBaleen; @@ -84,13 +84,13 @@ namespace Org.OpenAPITools.Model /// </summary> [DataMember(Name = "hasTeeth", EmitDefaultValue = true)] public bool HasTeeth - { + { get{ return _HasTeeth;} set { _HasTeeth = value; _flagHasTeeth = true; - } + } } private bool _HasTeeth; private bool _flagHasTeeth; @@ -108,13 +108,13 @@ namespace Org.OpenAPITools.Model /// </summary> [DataMember(Name = "className", IsRequired = true, EmitDefaultValue = false)] public string ClassName - { + { get{ return _ClassName;} set { _ClassName = value; _flagClassName = true; - } + } } private string _ClassName; private bool _flagClassName; diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-ConditionalSerialization/src/Org.OpenAPITools/Model/Zebra.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-ConditionalSerialization/src/Org.OpenAPITools/Model/Zebra.cs index ea635932f88f5f27227927be910dc7a1dc948cda..7b94ce7ec6f633aa162780462ec82f5fd0613bad 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-ConditionalSerialization/src/Org.OpenAPITools/Model/Zebra.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-ConditionalSerialization/src/Org.OpenAPITools/Model/Zebra.cs @@ -62,10 +62,10 @@ namespace Org.OpenAPITools.Model /// <summary> /// Gets or Sets Type /// </summary> - + [DataMember(Name = "type", EmitDefaultValue = false)] - public TypeEnum? Type - { + public TypeEnum? Type + { get{ return _Type;} set { @@ -110,13 +110,13 @@ namespace Org.OpenAPITools.Model /// </summary> [DataMember(Name = "className", IsRequired = true, EmitDefaultValue = false)] public string ClassName - { + { get{ return _ClassName;} set { _ClassName = value; _flagClassName = true; - } + } } private string _ClassName; private bool _flagClassName; diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-httpclient/README.md b/samples/client/petstore/csharp-netcore/OpenAPIClient-httpclient/README.md index 6f486abfc0e7bf38e3454636d6158e87580fdf61..4afe3a72eb0d76eec573c8a330dea7302c7f9d77 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-httpclient/README.md +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-httpclient/README.md @@ -61,7 +61,7 @@ HttpClient yourHttpClient = new HttpClient(yourHandler); var api = new YourApiClass(yourHttpClient, yourHandler); ``` -If you want to use an HttpClient and don't have access to the handler, for example in a DI context in Asp.net Core when using IHttpClientFactory. +If you want to use an HttpClient and don't have access to the handler, for example in a DI context in Asp.net Core when using IHttpClientFactory. ```csharp HttpClient yourHttpClient = new HttpClient(); @@ -72,7 +72,7 @@ You'll loose some configuration settings, the features affected are: Setting and Here an example of DI setup in a sample web project: ```csharp -services.AddHttpClient<YourApiClass>(httpClient => +services.AddHttpClient<YourApiClass>(httpClient => new PetApi(httpClient)); ``` diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-httpclient/git_push.sh b/samples/client/petstore/csharp-netcore/OpenAPIClient-httpclient/git_push.sh index ced3be2b0c7b2349ff06d18da19d4b31435c9fa6..9405f72e950cdb8ca24c3cf4d15cee7eac62fde7 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-httpclient/git_push.sh +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-httpclient/git_push.sh @@ -55,4 +55,3 @@ 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/csharp-netcore/OpenAPIClient-httpclient/src/Org.OpenAPITools/Client/ApiClient.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-httpclient/src/Org.OpenAPITools/Client/ApiClient.cs index 364fe9d25aa7999d3098ae7118388d7895645eba..a927c3f187308fb1ccab28dcde4ddcab30954f10 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-httpclient/src/Org.OpenAPITools/Client/ApiClient.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-httpclient/src/Org.OpenAPITools/Client/ApiClient.cs @@ -169,7 +169,7 @@ namespace Org.OpenAPITools.Client private readonly string _baseUrl; private readonly HttpClientHandler _httpClientHandler; - private readonly HttpClient _httpClient; + private readonly HttpClient _httpClient; private readonly bool _disposeClient; /// <summary> @@ -196,9 +196,9 @@ namespace Org.OpenAPITools.Client /// </summary> public ApiClient() : this(Org.OpenAPITools.Client.GlobalConfiguration.Instance.BasePath) - { + { } - + /// <summary> /// Initializes a new instance of the <see cref="ApiClient" />. /// **IMPORTANT** This will also create an istance of HttpClient, which is less than ideal. @@ -207,7 +207,7 @@ namespace Org.OpenAPITools.Client /// <param name="basePath">The target service's base path in URL format.</param> /// <exception cref="ArgumentException"></exception> public ApiClient(string basePath) - { + { if (string.IsNullOrEmpty(basePath)) throw new ArgumentException("basePath cannot be empty"); _httpClientHandler = new HttpClientHandler(); @@ -215,7 +215,7 @@ namespace Org.OpenAPITools.Client _disposeClient = true; _baseUrl = basePath; } - + /// <summary> /// Initializes a new instance of the <see cref="ApiClient" />, defaulting to the global configurations' base url. /// </summary> @@ -228,9 +228,9 @@ namespace Org.OpenAPITools.Client /// </remarks> public ApiClient(HttpClient client, HttpClientHandler handler = null) : this(client, Org.OpenAPITools.Client.GlobalConfiguration.Instance.BasePath, handler) - { + { } - + /// <summary> /// Initializes a new instance of the <see cref="ApiClient" />. /// </summary> @@ -244,10 +244,10 @@ namespace Org.OpenAPITools.Client /// The features affected are: Setting and Retrieving Cookies, Client Certificates, Proxy settings. /// </remarks> public ApiClient(HttpClient client, string basePath, HttpClientHandler handler = null) - { + { if (client == null) throw new ArgumentNullException("client cannot be null"); if (string.IsNullOrEmpty(basePath)) throw new ArgumentException("basePath cannot be empty"); - + _httpClientHandler = handler; _httpClient = client; _baseUrl = basePath; @@ -503,7 +503,7 @@ namespace Org.OpenAPITools.Client { return await ToApiResponse<T>(response, default(T), req.RequestUri); } - + object responseData = await deserializer.Deserialize<T>(response); // if the response type is oneOf/anyOf, call FromJSON to deserialize the data diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-net47/git_push.sh b/samples/client/petstore/csharp-netcore/OpenAPIClient-net47/git_push.sh index ced3be2b0c7b2349ff06d18da19d4b31435c9fa6..9405f72e950cdb8ca24c3cf4d15cee7eac62fde7 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-net47/git_push.sh +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-net47/git_push.sh @@ -55,4 +55,3 @@ 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/csharp-netcore/OpenAPIClient-net5.0/git_push.sh b/samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/git_push.sh index ced3be2b0c7b2349ff06d18da19d4b31435c9fa6..9405f72e950cdb8ca24c3cf4d15cee7eac62fde7 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/git_push.sh +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/git_push.sh @@ -55,4 +55,3 @@ 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/csharp-netcore/OpenAPIClient/git_push.sh b/samples/client/petstore/csharp-netcore/OpenAPIClient/git_push.sh index ced3be2b0c7b2349ff06d18da19d4b31435c9fa6..9405f72e950cdb8ca24c3cf4d15cee7eac62fde7 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient/git_push.sh +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient/git_push.sh @@ -55,4 +55,3 @@ 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/csharp-netcore/OpenAPIClientCore/git_push.sh b/samples/client/petstore/csharp-netcore/OpenAPIClientCore/git_push.sh index ced3be2b0c7b2349ff06d18da19d4b31435c9fa6..9405f72e950cdb8ca24c3cf4d15cee7eac62fde7 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClientCore/git_push.sh +++ b/samples/client/petstore/csharp-netcore/OpenAPIClientCore/git_push.sh @@ -55,4 +55,3 @@ 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/csharp-netcore/OpenAPIClientCoreAndNet47/git_push.sh b/samples/client/petstore/csharp-netcore/OpenAPIClientCoreAndNet47/git_push.sh index ced3be2b0c7b2349ff06d18da19d4b31435c9fa6..9405f72e950cdb8ca24c3cf4d15cee7eac62fde7 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClientCoreAndNet47/git_push.sh +++ b/samples/client/petstore/csharp-netcore/OpenAPIClientCoreAndNet47/git_push.sh @@ -55,4 +55,3 @@ 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/csharp/OpenAPIClient/build.bat b/samples/client/petstore/csharp/OpenAPIClient/build.bat index 9849135797df2ff9a8123c98bb268bc3c70e5c14..e153457ad3e59245be33aef2d94eaa50532d1f4e 100644 --- a/samples/client/petstore/csharp/OpenAPIClient/build.bat +++ b/samples/client/petstore/csharp/OpenAPIClient/build.bat @@ -14,4 +14,3 @@ copy packages\Newtonsoft.Json.12.0.3\lib\net45\Newtonsoft.Json.dll bin\Newtonsof copy packages\JsonSubTypes.1.6.0\lib\net45\JsonSubTypes.dll bin\JsonSubTypes.dll copy packages\RestSharp.105.1.0\lib\net45\RestSharp.dll bin\RestSharp.dll %CSCPATH%\csc /reference:bin\Newtonsoft.Json.dll;bin\JsonSubTypes.dll;bin\RestSharp.dll;System.ComponentModel.DataAnnotations.dll /target:library /out:bin\Org.OpenAPITools.dll /recurse:src\Org.OpenAPITools\*.cs /doc:bin\Org.OpenAPITools.xml - diff --git a/samples/client/petstore/csharp/OpenAPIClient/git_push.sh b/samples/client/petstore/csharp/OpenAPIClient/git_push.sh index ced3be2b0c7b2349ff06d18da19d4b31435c9fa6..9405f72e950cdb8ca24c3cf4d15cee7eac62fde7 100644 --- a/samples/client/petstore/csharp/OpenAPIClient/git_push.sh +++ b/samples/client/petstore/csharp/OpenAPIClient/git_push.sh @@ -55,4 +55,3 @@ 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/csharp/OpenAPIClient/src/Org.OpenAPITools/Model/ArrayTest.cs b/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools/Model/ArrayTest.cs index 975b256297e21c0c14ec7cbfe82a389f41450df3..3c47853b69b045e2a446c9b866e4ad4526b7b3ea 100644 --- a/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools/Model/ArrayTest.cs +++ b/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools/Model/ArrayTest.cs @@ -153,7 +153,7 @@ namespace Org.OpenAPITools.Model IEnumerable<System.ComponentModel.DataAnnotations.ValidationResult> IValidatableObject.Validate(ValidationContext validationContext) { - + yield break; } } diff --git a/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools/Model/FormatTest.cs b/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools/Model/FormatTest.cs index 4f0f0de587846e2f9663176aa5330e78af80ea6c..132ac07b6e4e2fab745cb6fd35a7056be9d952a0 100644 --- a/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools/Model/FormatTest.cs +++ b/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools/Model/FormatTest.cs @@ -402,7 +402,7 @@ namespace Org.OpenAPITools.Model IEnumerable<System.ComponentModel.DataAnnotations.ValidationResult> IValidatableObject.Validate(ValidationContext validationContext) { - + // Integer (int) maximum if(this.Integer > (int)100) { @@ -416,7 +416,7 @@ namespace Org.OpenAPITools.Model } - + // Int32 (int) maximum if(this.Int32 > (int)200) { @@ -430,7 +430,7 @@ namespace Org.OpenAPITools.Model } - + // Number (decimal) maximum if(this.Number > (decimal)543.2) { @@ -444,7 +444,7 @@ namespace Org.OpenAPITools.Model } - + // Float (float) maximum if(this.Float > (float)987.6) { @@ -458,7 +458,7 @@ namespace Org.OpenAPITools.Model } - + // Double (double) maximum if(this.Double > (double)123.4) { @@ -472,7 +472,7 @@ namespace Org.OpenAPITools.Model } - + // String (string) pattern Regex regexString = new Regex(@"[a-z]", RegexOptions.CultureInvariant | RegexOptions.IgnoreCase); if (false == regexString.Match(this.String).Success) @@ -491,9 +491,9 @@ namespace Org.OpenAPITools.Model { yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for Password, length must be greater than 10.", new [] { "Password" }); } - - + + // PatternWithDigits (string) pattern Regex regexPatternWithDigits = new Regex(@"^\\d{10}$", RegexOptions.CultureInvariant); if (false == regexPatternWithDigits.Match(this.PatternWithDigits).Success) @@ -502,7 +502,7 @@ namespace Org.OpenAPITools.Model } - + // PatternWithDigitsAndDelimiter (string) pattern Regex regexPatternWithDigitsAndDelimiter = new Regex(@"^image_\\d{1,3}$", RegexOptions.CultureInvariant | RegexOptions.IgnoreCase); if (false == regexPatternWithDigitsAndDelimiter.Match(this.PatternWithDigitsAndDelimiter).Success) diff --git a/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools/Model/Pet.cs b/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools/Model/Pet.cs index 558ee75f276662d40db4c89ae4be4ef3ade65966..16fa2ab775f5ad4d37b765559a095d9b38c1389a 100644 --- a/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools/Model/Pet.cs +++ b/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools/Model/Pet.cs @@ -251,7 +251,7 @@ namespace Org.OpenAPITools.Model IEnumerable<System.ComponentModel.DataAnnotations.ValidationResult> IValidatableObject.Validate(ValidationContext validationContext) { - + yield break; } } diff --git a/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools/Org.OpenAPITools.csproj b/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools/Org.OpenAPITools.csproj index 6c69e3745f60447382a410b536a3843d96ddba3e..ff0dacc12c855aa63f580026398aa5fd986bae47 100644 --- a/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools/Org.OpenAPITools.csproj +++ b/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools/Org.OpenAPITools.csproj @@ -77,4 +77,3 @@ The version of the OpenAPI document: 1.0.0 </ItemGroup> <Import Project="$(MsBuildToolsPath)\Microsoft.CSharp.targets" /> </Project> - diff --git a/samples/client/petstore/go/go-petstore/git_push.sh b/samples/client/petstore/go/go-petstore/git_push.sh index ced3be2b0c7b2349ff06d18da19d4b31435c9fa6..9405f72e950cdb8ca24c3cf4d15cee7eac62fde7 100644 --- a/samples/client/petstore/go/go-petstore/git_push.sh +++ b/samples/client/petstore/go/go-petstore/git_push.sh @@ -55,4 +55,3 @@ 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/haskell-http-client/README.md b/samples/client/petstore/haskell-http-client/README.md index 1843fd26977638b63b633fe17f150a3ace50de78..83b6c1fd9bf9da6e27f0d143cc8173ab2efd3c36 100644 --- a/samples/client/petstore/haskell-http-client/README.md +++ b/samples/client/petstore/haskell-http-client/README.md @@ -15,7 +15,7 @@ stack haddock ``` which will generate docs for this lib in the `docs` folder. -To generate the docs in the normal location (to enable hyperlinks to external libs), remove +To generate the docs in the normal location (to enable hyperlinks to external libs), remove ``` build: haddock-arguments: @@ -82,7 +82,7 @@ These options allow some customization of the code generation process. An example setting _dateTimeFormat_ and _strictFields_: ``` -java -jar openapi-generator-cli.jar generate -i petstore.yaml -g haskell-http-client -o output/haskell-http-client --additional-properties=dateTimeFormat="%Y-%m-%dT%H:%M:%S%Q%z" --additional-properties=strictFields=false +java -jar openapi-generator-cli.jar generate -i petstore.yaml -g haskell-http-client -o output/haskell-http-client --additional-properties=dateTimeFormat="%Y-%m-%dT%H:%M:%S%Q%z" --additional-properties=strictFields=false ``` View the full list of Codegen "config option" parameters with the command: @@ -136,10 +136,10 @@ in GHCi or via the Haddocks. * optional non-body parameters are included by using `applyOptionalParam` * optional body parameters are set by using `setBodyParam` -Example code generated for pretend _addFoo_ operation: +Example code generated for pretend _addFoo_ operation: ```haskell -data AddFoo +data AddFoo instance Consumes AddFoo MimeJSON instance Produces AddFoo MimeJSON instance Produces AddFoo MimeXML @@ -182,14 +182,14 @@ the config, it will be applied to the request. ```haskell mgr <- newManager defaultManagerSettings -config0 <- withStdoutLogging =<< newConfig +config0 <- withStdoutLogging =<< newConfig let config = config0 `addAuthMethod` AuthOAuthFoo "secret-key" -let addFooRequest = - addFoo - (ContentType MimeJSON) - (Accept MimeXML) +let addFooRequest = + addFoo + (ContentType MimeJSON) + (Accept MimeXML) (ParamBar paramBar) (ParamQux paramQux) modelBaz diff --git a/samples/client/petstore/haskell-http-client/git_push.sh b/samples/client/petstore/haskell-http-client/git_push.sh index ced3be2b0c7b2349ff06d18da19d4b31435c9fa6..9405f72e950cdb8ca24c3cf4d15cee7eac62fde7 100644 --- a/samples/client/petstore/haskell-http-client/git_push.sh +++ b/samples/client/petstore/haskell-http-client/git_push.sh @@ -55,4 +55,3 @@ 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/haskell-http-client/lib/OpenAPIPetstore/API/AnotherFake.hs b/samples/client/petstore/haskell-http-client/lib/OpenAPIPetstore/API/AnotherFake.hs index 6a08903b89806d311929c081291e771e7ed5e8a4..0d9ed04e89f76d0a38854fa90e8794e1976fad9e 100644 --- a/samples/client/petstore/haskell-http-client/lib/OpenAPIPetstore/API/AnotherFake.hs +++ b/samples/client/petstore/haskell-http-client/lib/OpenAPIPetstore/API/AnotherFake.hs @@ -65,7 +65,7 @@ import qualified Prelude as P -- -- To test special tags and operation ID starting with number -- -op123testSpecialTags +op123testSpecialTags :: (Consumes Op123testSpecialTags MimeJSON, MimeRender MimeJSON Client) => Client -- ^ "body" - client model -> OpenAPIPetstoreRequest Op123testSpecialTags MimeJSON Client MimeJSON 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 febc8e9232f51f265de6214ad695f9d68d2f6693..a953d5ccdbbf681545e0bd9858e638ab6643daad 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 @@ -65,7 +65,7 @@ import qualified Prelude as P -- -- this route creates an XmlItem -- -createXmlItem +createXmlItem :: (Consumes CreateXmlItem contentType, MimeRender contentType XmlItem) => ContentType contentType -- ^ request content-type ('MimeType') -> XmlItem -- ^ "xmlItem" - XmlItem Body @@ -101,7 +101,7 @@ instance Produces CreateXmlItem MimeNoContent -- -- Test serialization of outer boolean types -- -fakeOuterBooleanSerialize +fakeOuterBooleanSerialize :: (Consumes FakeOuterBooleanSerialize contentType) => ContentType contentType -- ^ request content-type ('MimeType') -> Accept accept -- ^ request accept ('MimeType') @@ -113,7 +113,7 @@ data FakeOuterBooleanSerialize -- | /Body Param/ "body" - Input boolean as post body instance HasBodyParam FakeOuterBooleanSerialize BodyBool - + -- | @*/*@ instance MimeType mtype => Consumes FakeOuterBooleanSerialize mtype @@ -127,7 +127,7 @@ instance MimeType mtype => Produces FakeOuterBooleanSerialize mtype -- -- Test serialization of object with outer number type -- -fakeOuterCompositeSerialize +fakeOuterCompositeSerialize :: (Consumes FakeOuterCompositeSerialize contentType) => ContentType contentType -- ^ request content-type ('MimeType') -> Accept accept -- ^ request accept ('MimeType') @@ -139,7 +139,7 @@ data FakeOuterCompositeSerialize -- | /Body Param/ "body" - Input composite as post body instance HasBodyParam FakeOuterCompositeSerialize OuterComposite - + -- | @*/*@ instance MimeType mtype => Consumes FakeOuterCompositeSerialize mtype @@ -153,7 +153,7 @@ instance MimeType mtype => Produces FakeOuterCompositeSerialize mtype -- -- Test serialization of outer number types -- -fakeOuterNumberSerialize +fakeOuterNumberSerialize :: (Consumes FakeOuterNumberSerialize contentType) => ContentType contentType -- ^ request content-type ('MimeType') -> Accept accept -- ^ request accept ('MimeType') @@ -165,7 +165,7 @@ data FakeOuterNumberSerialize -- | /Body Param/ "body" - Input number as post body instance HasBodyParam FakeOuterNumberSerialize BodyDouble - + -- | @*/*@ instance MimeType mtype => Consumes FakeOuterNumberSerialize mtype @@ -179,7 +179,7 @@ instance MimeType mtype => Produces FakeOuterNumberSerialize mtype -- -- Test serialization of outer string types -- -fakeOuterStringSerialize +fakeOuterStringSerialize :: (Consumes FakeOuterStringSerialize contentType) => ContentType contentType -- ^ request content-type ('MimeType') -> Accept accept -- ^ request accept ('MimeType') @@ -191,7 +191,7 @@ data FakeOuterStringSerialize -- | /Body Param/ "body" - Input string as post body instance HasBodyParam FakeOuterStringSerialize BodyText - + -- | @*/*@ instance MimeType mtype => Consumes FakeOuterStringSerialize mtype @@ -205,7 +205,7 @@ instance MimeType mtype => Produces FakeOuterStringSerialize mtype -- -- For this test, the body for this request much reference a schema named `File`. -- -testBodyWithFileSchema +testBodyWithFileSchema :: (Consumes TestBodyWithFileSchema MimeJSON, MimeRender MimeJSON FileSchemaTestClass) => FileSchemaTestClass -- ^ "body" -> OpenAPIPetstoreRequest TestBodyWithFileSchema MimeJSON NoContent MimeNoContent @@ -226,7 +226,7 @@ instance Produces TestBodyWithFileSchema MimeNoContent -- | @PUT \/fake\/body-with-query-params@ -- -testBodyWithQueryParams +testBodyWithQueryParams :: (Consumes TestBodyWithQueryParams MimeJSON, MimeRender MimeJSON User) => User -- ^ "body" -> Query -- ^ "query" @@ -253,7 +253,7 @@ instance Produces TestBodyWithQueryParams MimeNoContent -- -- To test \"client\" model -- -testClientModel +testClientModel :: (Consumes TestClientModel MimeJSON, MimeRender MimeJSON Client) => Client -- ^ "body" - client model -> OpenAPIPetstoreRequest TestClientModel MimeJSON Client MimeJSON @@ -283,7 +283,7 @@ instance Produces TestClientModel MimeJSON -- -- AuthMethod: 'AuthBasicHttpBasicTest' -- -testEndpointParameters +testEndpointParameters :: (Consumes TestEndpointParameters MimeFormUrlEncoded) => Number -- ^ "number" - None -> ParamDouble -- ^ "double" - None @@ -364,7 +364,7 @@ instance Produces TestEndpointParameters MimeNoContent -- -- To test enum parameters -- -testEnumParameters +testEnumParameters :: (Consumes TestEnumParameters MimeFormUrlEncoded) => OpenAPIPetstoreRequest TestEnumParameters MimeFormUrlEncoded NoContent MimeNoContent testEnumParameters = @@ -426,7 +426,7 @@ instance Produces TestEnumParameters MimeNoContent -- -- Fake endpoint to test group parameters (optional) -- -testGroupParameters +testGroupParameters :: RequiredStringGroup -- ^ "requiredStringGroup" - Required String in group parameters -> RequiredBooleanGroup -- ^ "requiredBooleanGroup" - Required Boolean in group parameters -> RequiredInt64Group -- ^ "requiredInt64Group" - Required Integer in group parameters @@ -462,7 +462,7 @@ instance Produces TestGroupParameters MimeNoContent -- -- test inline additionalProperties -- -testInlineAdditionalProperties +testInlineAdditionalProperties :: (Consumes TestInlineAdditionalProperties MimeJSON, MimeRender MimeJSON ParamMapMapStringText) => ParamMapMapStringText -- ^ "param" - request body -> OpenAPIPetstoreRequest TestInlineAdditionalProperties MimeJSON NoContent MimeNoContent @@ -487,7 +487,7 @@ instance Produces TestInlineAdditionalProperties MimeNoContent -- -- test json serialization of form data -- -testJsonFormData +testJsonFormData :: (Consumes TestJsonFormData MimeFormUrlEncoded) => Param -- ^ "param" - field1 -> Param2 -- ^ "param2" - field2 @@ -511,7 +511,7 @@ instance Produces TestJsonFormData MimeNoContent -- -- To test the collection format in query parameters -- -testQueryParameterCollectionFormat +testQueryParameterCollectionFormat :: Pipe -- ^ "pipe" -> Ioutil -- ^ "ioutil" -> Http -- ^ "http" diff --git a/samples/client/petstore/haskell-http-client/lib/OpenAPIPetstore/API/FakeClassnameTags123.hs b/samples/client/petstore/haskell-http-client/lib/OpenAPIPetstore/API/FakeClassnameTags123.hs index f002c0472583b7e33aca4ab8f4f4585b1d72d8b2..dd85853c1fb73f523c931ee05e52ccaf9e0db22e 100644 --- a/samples/client/petstore/haskell-http-client/lib/OpenAPIPetstore/API/FakeClassnameTags123.hs +++ b/samples/client/petstore/haskell-http-client/lib/OpenAPIPetstore/API/FakeClassnameTags123.hs @@ -67,7 +67,7 @@ import qualified Prelude as P -- -- AuthMethod: 'AuthApiKeyApiKeyQuery' -- -testClassname +testClassname :: (Consumes TestClassname MimeJSON, MimeRender MimeJSON Client) => Client -- ^ "body" - client model -> OpenAPIPetstoreRequest TestClassname MimeJSON Client MimeJSON diff --git a/samples/client/petstore/haskell-http-client/lib/OpenAPIPetstore/API/Pet.hs b/samples/client/petstore/haskell-http-client/lib/OpenAPIPetstore/API/Pet.hs index ac5745a55d9486069378e001b24a01f8db063b5a..4e0d64c91d75cf339d719c74e8a4a998bd58f4d3 100644 --- a/samples/client/petstore/haskell-http-client/lib/OpenAPIPetstore/API/Pet.hs +++ b/samples/client/petstore/haskell-http-client/lib/OpenAPIPetstore/API/Pet.hs @@ -65,7 +65,7 @@ import qualified Prelude as P -- -- AuthMethod: 'AuthOAuthPetstoreAuth' -- -addPet +addPet :: (Consumes AddPet contentType, MimeRender contentType Pet) => ContentType contentType -- ^ request content-type ('MimeType') -> Pet -- ^ "body" - Pet object that needs to be added to the store @@ -96,7 +96,7 @@ instance Produces AddPet MimeNoContent -- -- AuthMethod: 'AuthOAuthPetstoreAuth' -- -deletePet +deletePet :: PetId -- ^ "petId" - Pet id to delete -> OpenAPIPetstoreRequest DeletePet MimeNoContent NoContent MimeNoContent deletePet (PetId petId) = @@ -120,7 +120,7 @@ instance Produces DeletePet MimeNoContent -- -- AuthMethod: 'AuthOAuthPetstoreAuth' -- -findPetsByStatus +findPetsByStatus :: Accept accept -- ^ request accept ('MimeType') -> Status -- ^ "status" - Status values that need to be considered for filter -> OpenAPIPetstoreRequest FindPetsByStatus MimeNoContent [Pet] accept @@ -146,7 +146,7 @@ instance Produces FindPetsByStatus MimeJSON -- -- AuthMethod: 'AuthOAuthPetstoreAuth' -- -findPetsByTags +findPetsByTags :: Accept accept -- ^ request accept ('MimeType') -> Tags -- ^ "tags" - Tags to filter by -> OpenAPIPetstoreRequest FindPetsByTags MimeNoContent [Pet] accept @@ -174,7 +174,7 @@ instance Produces FindPetsByTags MimeJSON -- -- AuthMethod: 'AuthApiKeyApiKey' -- -getPetById +getPetById :: Accept accept -- ^ request accept ('MimeType') -> PetId -- ^ "petId" - ID of pet to return -> OpenAPIPetstoreRequest GetPetById MimeNoContent Pet accept @@ -197,7 +197,7 @@ instance Produces GetPetById MimeJSON -- -- AuthMethod: 'AuthOAuthPetstoreAuth' -- -updatePet +updatePet :: (Consumes UpdatePet contentType, MimeRender contentType Pet) => ContentType contentType -- ^ request content-type ('MimeType') -> Pet -- ^ "body" - Pet object that needs to be added to the store @@ -228,7 +228,7 @@ instance Produces UpdatePet MimeNoContent -- -- AuthMethod: 'AuthOAuthPetstoreAuth' -- -updatePetWithForm +updatePetWithForm :: (Consumes UpdatePetWithForm MimeFormUrlEncoded) => PetId -- ^ "petId" - ID of pet that needs to be updated -> OpenAPIPetstoreRequest UpdatePetWithForm MimeFormUrlEncoded NoContent MimeNoContent @@ -262,7 +262,7 @@ instance Produces UpdatePetWithForm MimeNoContent -- -- AuthMethod: 'AuthOAuthPetstoreAuth' -- -uploadFile +uploadFile :: (Consumes UploadFile MimeMultipartFormData) => PetId -- ^ "petId" - ID of pet to update -> OpenAPIPetstoreRequest UploadFile MimeMultipartFormData ApiResponse MimeJSON @@ -297,7 +297,7 @@ instance Produces UploadFile MimeJSON -- -- AuthMethod: 'AuthOAuthPetstoreAuth' -- -uploadFileWithRequiredFile +uploadFileWithRequiredFile :: (Consumes UploadFileWithRequiredFile MimeMultipartFormData) => RequiredFile -- ^ "requiredFile" - file to upload -> PetId -- ^ "petId" - ID of pet to update diff --git a/samples/client/petstore/haskell-http-client/lib/OpenAPIPetstore/API/Store.hs b/samples/client/petstore/haskell-http-client/lib/OpenAPIPetstore/API/Store.hs index 522b40491a23cb3559a5a564d24eebf09ec1ef56..971d8d039b9e4fe750b4e62ab35aa4777b77ff47 100644 --- a/samples/client/petstore/haskell-http-client/lib/OpenAPIPetstore/API/Store.hs +++ b/samples/client/petstore/haskell-http-client/lib/OpenAPIPetstore/API/Store.hs @@ -65,7 +65,7 @@ import qualified Prelude as P -- -- For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors -- -deleteOrder +deleteOrder :: OrderIdText -- ^ "orderId" - ID of the order that needs to be deleted -> OpenAPIPetstoreRequest DeleteOrder MimeNoContent NoContent MimeNoContent deleteOrder (OrderIdText orderId) = @@ -85,7 +85,7 @@ instance Produces DeleteOrder MimeNoContent -- -- AuthMethod: 'AuthApiKeyApiKey' -- -getInventory +getInventory :: OpenAPIPetstoreRequest GetInventory MimeNoContent ((Map.Map String Int)) MimeJSON getInventory = _mkRequest "GET" ["/store/inventory"] @@ -104,7 +104,7 @@ instance Produces GetInventory MimeJSON -- -- For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions -- -getOrderById +getOrderById :: Accept accept -- ^ request accept ('MimeType') -> OrderId -- ^ "orderId" - ID of pet that needs to be fetched -> OpenAPIPetstoreRequest GetOrderById MimeNoContent Order accept @@ -124,7 +124,7 @@ instance Produces GetOrderById MimeJSON -- -- Place an order for a pet -- -placeOrder +placeOrder :: (Consumes PlaceOrder contentType, MimeRender contentType Order) => ContentType contentType -- ^ request content-type ('MimeType') -> Accept accept -- ^ request accept ('MimeType') @@ -138,7 +138,7 @@ data PlaceOrder -- | /Body Param/ "body" - order placed for purchasing the pet instance HasBodyParam PlaceOrder Order - + -- | @*/*@ instance MimeType mtype => Consumes PlaceOrder mtype diff --git a/samples/client/petstore/haskell-http-client/lib/OpenAPIPetstore/API/User.hs b/samples/client/petstore/haskell-http-client/lib/OpenAPIPetstore/API/User.hs index 80db14091dfdf850996ffc548b36a22a667456e3..2f297ef86ca3c29b71b851f0807017945b827e4f 100644 --- a/samples/client/petstore/haskell-http-client/lib/OpenAPIPetstore/API/User.hs +++ b/samples/client/petstore/haskell-http-client/lib/OpenAPIPetstore/API/User.hs @@ -65,7 +65,7 @@ import qualified Prelude as P -- -- This can only be done by the logged in user. -- -createUser +createUser :: (Consumes CreateUser contentType, MimeRender contentType User) => ContentType contentType -- ^ request content-type ('MimeType') -> User -- ^ "body" - Created user object @@ -78,7 +78,7 @@ data CreateUser -- | /Body Param/ "body" - Created user object instance HasBodyParam CreateUser User - + -- | @*/*@ instance MimeType mtype => Consumes CreateUser mtype @@ -91,7 +91,7 @@ instance Produces CreateUser MimeNoContent -- -- Creates list of users with given input array -- -createUsersWithArrayInput +createUsersWithArrayInput :: (Consumes CreateUsersWithArrayInput contentType, MimeRender contentType Body) => ContentType contentType -- ^ request content-type ('MimeType') -> Body -- ^ "body" - List of user object @@ -104,7 +104,7 @@ data CreateUsersWithArrayInput -- | /Body Param/ "body" - List of user object instance HasBodyParam CreateUsersWithArrayInput Body - + -- | @*/*@ instance MimeType mtype => Consumes CreateUsersWithArrayInput mtype @@ -117,7 +117,7 @@ instance Produces CreateUsersWithArrayInput MimeNoContent -- -- Creates list of users with given input array -- -createUsersWithListInput +createUsersWithListInput :: (Consumes CreateUsersWithListInput contentType, MimeRender contentType Body) => ContentType contentType -- ^ request content-type ('MimeType') -> Body -- ^ "body" - List of user object @@ -130,7 +130,7 @@ data CreateUsersWithListInput -- | /Body Param/ "body" - List of user object instance HasBodyParam CreateUsersWithListInput Body - + -- | @*/*@ instance MimeType mtype => Consumes CreateUsersWithListInput mtype @@ -145,7 +145,7 @@ instance Produces CreateUsersWithListInput MimeNoContent -- -- This can only be done by the logged in user. -- -deleteUser +deleteUser :: Username -- ^ "username" - The name that needs to be deleted -> OpenAPIPetstoreRequest DeleteUser MimeNoContent NoContent MimeNoContent deleteUser (Username username) = @@ -161,7 +161,7 @@ instance Produces DeleteUser MimeNoContent -- -- Get user by user name -- -getUserByName +getUserByName :: Accept accept -- ^ request accept ('MimeType') -> Username -- ^ "username" - The name that needs to be fetched. Use user1 for testing. -> OpenAPIPetstoreRequest GetUserByName MimeNoContent User accept @@ -181,7 +181,7 @@ instance Produces GetUserByName MimeJSON -- -- Logs user into the system -- -loginUser +loginUser :: Accept accept -- ^ request accept ('MimeType') -> Username -- ^ "username" - The user name for login -> Password -- ^ "password" - The password for login in clear text @@ -204,7 +204,7 @@ instance Produces LoginUser MimeJSON -- -- Logs out current logged in user session -- -logoutUser +logoutUser :: OpenAPIPetstoreRequest LogoutUser MimeNoContent NoContent MimeNoContent logoutUser = _mkRequest "GET" ["/user/logout"] @@ -221,7 +221,7 @@ instance Produces LogoutUser MimeNoContent -- -- This can only be done by the logged in user. -- -updateUser +updateUser :: (Consumes UpdateUser contentType, MimeRender contentType User) => ContentType contentType -- ^ request content-type ('MimeType') -> User -- ^ "body" - Updated user object @@ -235,7 +235,7 @@ data UpdateUser -- | /Body Param/ "body" - Updated user object instance HasBodyParam UpdateUser User - + -- | @*/*@ instance MimeType mtype => Consumes UpdateUser mtype diff --git a/samples/client/petstore/haskell-http-client/lib/OpenAPIPetstore/Client.hs b/samples/client/petstore/haskell-http-client/lib/OpenAPIPetstore/Client.hs index 31cd12f7adaf23df59094696313b1ef76f74f5dc..4a36af68c9469a4180ce7ba795fd64f813f28163 100644 --- a/samples/client/petstore/haskell-http-client/lib/OpenAPIPetstore/Client.hs +++ b/samples/client/petstore/haskell-http-client/lib/OpenAPIPetstore/Client.hs @@ -69,7 +69,7 @@ dispatchLbs manager config request = do -- | pair of decoded http body and http response data MimeResult res = MimeResult { mimeResult :: Either MimeError res -- ^ decoded http body - , mimeResultResponse :: NH.Response BCL.ByteString -- ^ http response + , mimeResultResponse :: NH.Response BCL.ByteString -- ^ http response } deriving (Show, Functor, Foldable, Traversable) @@ -77,7 +77,7 @@ data MimeResult res = data MimeError = MimeError { mimeError :: String -- ^ unrender/parser error - , mimeErrorResponse :: NH.Response BCL.ByteString -- ^ http response + , mimeErrorResponse :: NH.Response BCL.ByteString -- ^ http response } deriving (Eq, Show) -- | send a request returning the 'MimeResult' @@ -171,7 +171,7 @@ _toInitRequest => OpenAPIPetstoreConfig -- ^ config -> OpenAPIPetstoreRequest req contentType res accept -- ^ request -> IO (InitRequest req contentType res accept) -- ^ initialized request -_toInitRequest config req0 = +_toInitRequest config req0 = runConfigLogWithExceptions "Client" config $ do parsedReq <- P.liftIO $ NH.parseRequest $ BCL.unpack $ BCL.append (configHost config) (BCL.concat (rUrlPath req0)) req1 <- P.liftIO $ _applyAuthMethods req0 config @@ -202,7 +202,7 @@ modifyInitRequest (InitRequest req) f = InitRequest (f req) modifyInitRequestM :: Monad m => InitRequest req contentType res accept -> (NH.Request -> m NH.Request) -> m (InitRequest req contentType res accept) modifyInitRequestM (InitRequest req) f = fmap InitRequest (f req) --- ** Logging +-- ** Logging -- | Run a block using the configured logger instance runConfigLog diff --git a/samples/client/petstore/haskell-http-client/lib/OpenAPIPetstore/Core.hs b/samples/client/petstore/haskell-http-client/lib/OpenAPIPetstore/Core.hs index 8d6194e4fcbb007819528745a11c2a3a2fbc76a2..8967c323038e96f7d72320c60df7cb6b5e63fb2d 100644 --- a/samples/client/petstore/haskell-http-client/lib/OpenAPIPetstore/Core.hs +++ b/samples/client/petstore/haskell-http-client/lib/OpenAPIPetstore/Core.hs @@ -70,7 +70,7 @@ import Prelude (($), (.), (<$>), (<*>), Maybe(..), Bool(..), Char, String, fmap, -- * OpenAPIPetstoreConfig --- | +-- | data OpenAPIPetstoreConfig = OpenAPIPetstoreConfig { configHost :: BCL.ByteString -- ^ host supplied in the Request , configUserAgent :: Text -- ^ user-agent supplied in the Request @@ -108,7 +108,7 @@ newConfig = do , configLogContext = logCxt , configAuthMethods = [] , configValidateAuthMethods = True - } + } -- | updates config use AuthMethod on matching requests addAuthMethod :: AuthMethod auth => OpenAPIPetstoreConfig -> auth -> OpenAPIPetstoreConfig @@ -130,7 +130,7 @@ withStderrLogging p = do -- | updates the config to disable logging withNoLogging :: OpenAPIPetstoreConfig -> OpenAPIPetstoreConfig withNoLogging p = p { configLogExecWithContext = runNullLogExec} - + -- * OpenAPIPetstoreRequest -- | Represents a request. @@ -229,7 +229,7 @@ data ParamBody -- ** OpenAPIPetstoreRequest Utils -_mkRequest :: NH.Method -- ^ Method +_mkRequest :: NH.Method -- ^ Method -> [BCL.ByteString] -- ^ Endpoint -> OpenAPIPetstoreRequest req contentType res accept -- ^ req: Request Type, res: Response Type _mkRequest m u = OpenAPIPetstoreRequest m u _mkParams [] @@ -263,13 +263,13 @@ removeHeader req header = _setContentTypeHeader :: forall req contentType res accept. MimeType contentType => OpenAPIPetstoreRequest req contentType res accept -> OpenAPIPetstoreRequest req contentType res accept _setContentTypeHeader req = - case mimeType (P.Proxy :: P.Proxy contentType) of + case mimeType (P.Proxy :: P.Proxy contentType) of Just m -> req `setHeader` [("content-type", BC.pack $ P.show m)] Nothing -> req `removeHeader` ["content-type"] _setAcceptHeader :: forall req contentType res accept. MimeType accept => OpenAPIPetstoreRequest req contentType res accept -> OpenAPIPetstoreRequest req contentType res accept _setAcceptHeader req = - case mimeType (P.Proxy :: P.Proxy accept) of + case mimeType (P.Proxy :: P.Proxy accept) of Just m -> req `setHeader` [("accept", BC.pack $ P.show m)] Nothing -> req `removeHeader` ["accept"] @@ -293,25 +293,25 @@ addQuery :: addQuery req query = req & L.over (rParamsL . paramsQueryL) (query P.++) addForm :: OpenAPIPetstoreRequest req contentType res accept -> WH.Form -> OpenAPIPetstoreRequest req contentType res accept -addForm req newform = +addForm req newform = let form = case paramsBody (rParams req) of ParamBodyFormUrlEncoded _form -> _form _ -> mempty in req & L.set (rParamsL . paramsBodyL) (ParamBodyFormUrlEncoded (newform <> form)) _addMultiFormPart :: OpenAPIPetstoreRequest req contentType res accept -> NH.Part -> OpenAPIPetstoreRequest req contentType res accept -_addMultiFormPart req newpart = +_addMultiFormPart req newpart = let parts = case paramsBody (rParams req) of ParamBodyMultipartFormData _parts -> _parts _ -> [] in req & L.set (rParamsL . paramsBodyL) (ParamBodyMultipartFormData (newpart : parts)) _setBodyBS :: OpenAPIPetstoreRequest req contentType res accept -> B.ByteString -> OpenAPIPetstoreRequest req contentType res accept -_setBodyBS req body = +_setBodyBS req body = req & L.set (rParamsL . paramsBodyL) (ParamBodyB body) _setBodyLBS :: OpenAPIPetstoreRequest req contentType res accept -> BL.ByteString -> OpenAPIPetstoreRequest req contentType res accept -_setBodyLBS req body = +_setBodyLBS req body = req & L.set (rParamsL . paramsBodyL) (ParamBodyBL body) _hasAuthType :: AuthMethod authMethod => OpenAPIPetstoreRequest req contentType res accept -> P.Proxy authMethod -> OpenAPIPetstoreRequest req contentType res accept @@ -380,7 +380,7 @@ _toCollA' c encode one xs = case c of {-# INLINE go #-} {-# INLINE expandList #-} {-# INLINE combine #-} - + -- * AuthMethods -- | Provides a method to apply auth methods to requests @@ -411,7 +411,7 @@ _applyAuthMethods req config@(OpenAPIPetstoreConfig {configAuthMethods = as}) = foldlM go req as where go r (AnyAuthMethod a) = applyAuthMethod config a r - + -- * Utils -- | Removes Null fields. (OpenAPI-Specification 2.0 does not allow Null in JSON) @@ -504,7 +504,7 @@ _showDate = -- * Byte/Binary Formatting - + -- | base64 encoded characters newtype ByteArray = ByteArray { unByteArray :: BL.ByteString } deriving (P.Eq,P.Data,P.Ord,P.Typeable,NF.NFData) diff --git a/samples/client/petstore/haskell-http-client/lib/OpenAPIPetstore/LoggingKatip.hs b/samples/client/petstore/haskell-http-client/lib/OpenAPIPetstore/LoggingKatip.hs index dc02fa713158fa5c2774ee304d5a9a57129d2096..717bdc506506e2bfc9eb611325a71250bae44633 100644 --- a/samples/client/petstore/haskell-http-client/lib/OpenAPIPetstore/LoggingKatip.hs +++ b/samples/client/petstore/haskell-http-client/lib/OpenAPIPetstore/LoggingKatip.hs @@ -115,4 +115,3 @@ levelError = LG.ErrorS levelDebug :: LogLevel levelDebug = LG.DebugS - diff --git a/samples/client/petstore/haskell-http-client/lib/OpenAPIPetstore/Model.hs b/samples/client/petstore/haskell-http-client/lib/OpenAPIPetstore/Model.hs index 53327dc686a3ba6ac3c76876dada26fe198f734e..f6f7e973276ed9443a43cbfaf539a748b5ad762d 100644 --- a/samples/client/petstore/haskell-http-client/lib/OpenAPIPetstore/Model.hs +++ b/samples/client/petstore/haskell-http-client/lib/OpenAPIPetstore/Model.hs @@ -2479,7 +2479,7 @@ instance AuthMethod AuthOAuthPetstoreAuth where applyAuthMethod _ a@(AuthOAuthPetstoreAuth secret) req = P.pure $ if (P.typeOf a `P.elem` rAuthTypes req) - then req `setHeader` toHeader ("Authorization", "Bearer " <> secret) + then req `setHeader` toHeader ("Authorization", "Bearer " <> secret) & L.over rAuthTypesL (P.filter (/= P.typeOf a)) else req diff --git a/samples/client/petstore/haskell-http-client/tests/Instances.hs b/samples/client/petstore/haskell-http-client/tests/Instances.hs index bb674c55b3a43d40559c2d9af20d1eaab5de4ae6..7f19bcbe19498635963f704caebf908f8bd61adb 100644 --- a/samples/client/petstore/haskell-http-client/tests/Instances.hs +++ b/samples/client/petstore/haskell-http-client/tests/Instances.hs @@ -71,7 +71,7 @@ instance Arbitrary A.Value where sizedObject n = liftM (A.object . map mapF) $ replicateM n $ (,) <$> (arbitrary :: Gen String) <*> simpleAndArrays - + -- | Checks if a given list has no duplicates in _O(n log n)_. hasNoDups :: (Ord a) @@ -86,7 +86,7 @@ hasNoDups = go Set.empty instance ApproxEq TI.Day where (=~) = (==) - + arbitraryReduced :: Arbitrary a => Int -> Gen a arbitraryReduced n = resize (n `div` 2) arbitrary @@ -103,7 +103,7 @@ arbitraryReducedMaybeValue n = do else return generated -- * Models - + instance Arbitrary AdditionalPropertiesAnyType where arbitrary = sized genAdditionalPropertiesAnyType diff --git a/samples/client/petstore/java/feign-no-nullable/README.md b/samples/client/petstore/java/feign-no-nullable/README.md index 8a2d579d815c1ed8dddbb1b39d0169f9c59bcf41..bab84254246619dc1320037da76b6cf8d103ce76 100644 --- a/samples/client/petstore/java/feign-no-nullable/README.md +++ b/samples/client/petstore/java/feign-no-nullable/README.md @@ -54,7 +54,7 @@ And to use the api you can follow the examples bellow: ApiClient apiClient = new ApiClient("oauth_password"); apiClient.setBasePath("https://localhost:8243/petstore/1/"); apiClient.setOauthPassword("username", "password", "client_id", "client_secret"); - + //Oauth client credentials flow ApiClient apiClient = new ApiClient("oauth_client_credentials"); apiClient.setBasePath("https://localhost:8243/petstore/1/"); @@ -62,7 +62,7 @@ And to use the api you can follow the examples bellow: PetApi petApi = apiClient.buildClient(PetApi.class); Pet petById = petApi.getPetById(12345L); - + System.out.println(petById); } ``` diff --git a/samples/client/petstore/java/feign-no-nullable/git_push.sh b/samples/client/petstore/java/feign-no-nullable/git_push.sh index ced3be2b0c7b2349ff06d18da19d4b31435c9fa6..9405f72e950cdb8ca24c3cf4d15cee7eac62fde7 100644 --- a/samples/client/petstore/java/feign-no-nullable/git_push.sh +++ b/samples/client/petstore/java/feign-no-nullable/git_push.sh @@ -55,4 +55,3 @@ 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/java/feign-no-nullable/pom.xml b/samples/client/petstore/java/feign-no-nullable/pom.xml index 12816bcddffb8922a3f1d99e319abb23127fdd67..c81c63c999c3b7f2bde651aa01ebd3ba86dbc0a9 100644 --- a/samples/client/petstore/java/feign-no-nullable/pom.xml +++ b/samples/client/petstore/java/feign-no-nullable/pom.xml @@ -218,7 +218,7 @@ <artifactId>jsr305</artifactId> <version>3.0.2</version> </dependency> - + <!-- HTTP client: Netflix Feign --> <dependency> <groupId>io.github.openfeign</groupId> diff --git a/samples/client/petstore/java/feign-no-nullable/src/main/java/org/openapitools/client/ApiClient.java b/samples/client/petstore/java/feign-no-nullable/src/main/java/org/openapitools/client/ApiClient.java index 8dd14bf1a27d84b78e0acbe9fb59b15900ea9b0d..674fa2c45a40cf9eaccad56fe1dd06110664c152 100644 --- a/samples/client/petstore/java/feign-no-nullable/src/main/java/org/openapitools/client/ApiClient.java +++ b/samples/client/petstore/java/feign-no-nullable/src/main/java/org/openapitools/client/ApiClient.java @@ -217,7 +217,7 @@ public class ApiClient { } /** - * Helper method to configure the client credentials for Oauth + * Helper method to configure the client credentials for Oauth * @param username Username * @param password Password */ diff --git a/samples/client/petstore/java/feign-no-nullable/src/main/java/org/openapitools/client/auth/HttpBasicAuth.java b/samples/client/petstore/java/feign-no-nullable/src/main/java/org/openapitools/client/auth/HttpBasicAuth.java index b275826472ac2e6ae8b32df5335e3a74f7850612..9fc0358f10c43174c3ea2adb25a71288f54a35ec 100644 --- a/samples/client/petstore/java/feign-no-nullable/src/main/java/org/openapitools/client/auth/HttpBasicAuth.java +++ b/samples/client/petstore/java/feign-no-nullable/src/main/java/org/openapitools/client/auth/HttpBasicAuth.java @@ -11,7 +11,7 @@ public class HttpBasicAuth implements RequestInterceptor { private String username; private String password; - + public String getUsername() { return username; } diff --git a/samples/client/petstore/java/feign-no-nullable/src/main/java/org/openapitools/client/auth/OAuthFlow.java b/samples/client/petstore/java/feign-no-nullable/src/main/java/org/openapitools/client/auth/OAuthFlow.java index 75c2a0c9740db7fb2f7c48d2a7119cd1d132031f..ac3ecef00206870d2e551eb55809a951ee98e795 100644 --- a/samples/client/petstore/java/feign-no-nullable/src/main/java/org/openapitools/client/auth/OAuthFlow.java +++ b/samples/client/petstore/java/feign-no-nullable/src/main/java/org/openapitools/client/auth/OAuthFlow.java @@ -16,7 +16,7 @@ package org.openapitools.client.auth; @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") public enum OAuthFlow { accessCode, //called authorizationCode in OpenAPI 3.0 - implicit, + implicit, password, application //called clientCredentials in OpenAPI 3.0 } diff --git a/samples/client/petstore/java/feign/README.md b/samples/client/petstore/java/feign/README.md index fa5dd565da46a613bcfaca9f008176ed65ec0d5b..ab73b6abf9785b16b1761458b6b5beb6202bda16 100644 --- a/samples/client/petstore/java/feign/README.md +++ b/samples/client/petstore/java/feign/README.md @@ -54,7 +54,7 @@ And to use the api you can follow the examples bellow: ApiClient apiClient = new ApiClient("oauth_password"); apiClient.setBasePath("https://localhost:8243/petstore/1/"); apiClient.setOauthPassword("username", "password", "client_id", "client_secret"); - + //Oauth client credentials flow ApiClient apiClient = new ApiClient("oauth_client_credentials"); apiClient.setBasePath("https://localhost:8243/petstore/1/"); @@ -62,7 +62,7 @@ And to use the api you can follow the examples bellow: PetApi petApi = apiClient.buildClient(PetApi.class); Pet petById = petApi.getPetById(12345L); - + System.out.println(petById); } ``` diff --git a/samples/client/petstore/java/feign/git_push.sh b/samples/client/petstore/java/feign/git_push.sh index ced3be2b0c7b2349ff06d18da19d4b31435c9fa6..9405f72e950cdb8ca24c3cf4d15cee7eac62fde7 100644 --- a/samples/client/petstore/java/feign/git_push.sh +++ b/samples/client/petstore/java/feign/git_push.sh @@ -55,4 +55,3 @@ 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/java/feign/pom.xml b/samples/client/petstore/java/feign/pom.xml index a963eaf0d2021a51c3bcb30769b4273d653068a5..57974bab472a8a1297c2a5e509876d0811977516 100644 --- a/samples/client/petstore/java/feign/pom.xml +++ b/samples/client/petstore/java/feign/pom.xml @@ -218,7 +218,7 @@ <artifactId>jsr305</artifactId> <version>3.0.2</version> </dependency> - + <!-- HTTP client: Netflix Feign --> <dependency> <groupId>io.github.openfeign</groupId> diff --git a/samples/client/petstore/java/feign/src/main/java/org/openapitools/client/ApiClient.java b/samples/client/petstore/java/feign/src/main/java/org/openapitools/client/ApiClient.java index 6dcf3fd179022f5bfd82e71b76ca2ad14b67dd0a..b9b1d341056a408c37c0bfd334c3d0ff0958fae1 100644 --- a/samples/client/petstore/java/feign/src/main/java/org/openapitools/client/ApiClient.java +++ b/samples/client/petstore/java/feign/src/main/java/org/openapitools/client/ApiClient.java @@ -224,7 +224,7 @@ public class ApiClient { } /** - * Helper method to configure the client credentials for Oauth + * Helper method to configure the client credentials for Oauth * @param username Username * @param password Password */ diff --git a/samples/client/petstore/java/feign/src/main/java/org/openapitools/client/auth/HttpBasicAuth.java b/samples/client/petstore/java/feign/src/main/java/org/openapitools/client/auth/HttpBasicAuth.java index b275826472ac2e6ae8b32df5335e3a74f7850612..9fc0358f10c43174c3ea2adb25a71288f54a35ec 100644 --- a/samples/client/petstore/java/feign/src/main/java/org/openapitools/client/auth/HttpBasicAuth.java +++ b/samples/client/petstore/java/feign/src/main/java/org/openapitools/client/auth/HttpBasicAuth.java @@ -11,7 +11,7 @@ public class HttpBasicAuth implements RequestInterceptor { private String username; private String password; - + public String getUsername() { return username; } diff --git a/samples/client/petstore/java/feign/src/main/java/org/openapitools/client/auth/OAuthFlow.java b/samples/client/petstore/java/feign/src/main/java/org/openapitools/client/auth/OAuthFlow.java index 75c2a0c9740db7fb2f7c48d2a7119cd1d132031f..ac3ecef00206870d2e551eb55809a951ee98e795 100644 --- a/samples/client/petstore/java/feign/src/main/java/org/openapitools/client/auth/OAuthFlow.java +++ b/samples/client/petstore/java/feign/src/main/java/org/openapitools/client/auth/OAuthFlow.java @@ -16,7 +16,7 @@ package org.openapitools.client.auth; @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") public enum OAuthFlow { accessCode, //called authorizationCode in OpenAPI 3.0 - implicit, + implicit, password, application //called clientCredentials in OpenAPI 3.0 } diff --git a/samples/client/petstore/java/google-api-client/build.gradle b/samples/client/petstore/java/google-api-client/build.gradle index 6ed3582a9d458ad162cb4f23395b580d5c296aaf..a13141ccd06873f983d7848f5d25417829bd19b7 100644 --- a/samples/client/petstore/java/google-api-client/build.gradle +++ b/samples/client/petstore/java/google-api-client/build.gradle @@ -24,7 +24,7 @@ if(hasProperty('target') && target == 'android') { apply plugin: 'com.android.library' apply plugin: 'com.github.dcendents.android-maven' - + android { compileSdkVersion 23 buildToolsVersion '23.0.2' @@ -36,7 +36,7 @@ if(hasProperty('target') && target == 'android') { sourceCompatibility JavaVersion.VERSION_1_7 targetCompatibility JavaVersion.VERSION_1_7 } - + // Rename the aar correctly libraryVariants.all { variant -> variant.outputs.each { output -> @@ -52,7 +52,7 @@ if(hasProperty('target') && target == 'android') { provided 'javax.annotation:jsr250-api:1.0' } } - + afterEvaluate { android.libraryVariants.all { variant -> def task = project.tasks.create "jar${variant.name.capitalize()}", Jar @@ -64,12 +64,12 @@ if(hasProperty('target') && target == 'android') { artifacts.add('archives', task); } } - + task sourcesJar(type: Jar) { from android.sourceSets.main.java.srcDirs classifier = 'sources' } - + artifacts { archives sourcesJar } @@ -87,7 +87,7 @@ if(hasProperty('target') && target == 'android') { pom.artifactId = 'petstore-google-api-client' } } - + task execute(type:JavaExec) { main = System.getProperty('mainClass') classpath = sourceSets.main.runtimeClasspath diff --git a/samples/client/petstore/java/google-api-client/git_push.sh b/samples/client/petstore/java/google-api-client/git_push.sh index ced3be2b0c7b2349ff06d18da19d4b31435c9fa6..9405f72e950cdb8ca24c3cf4d15cee7eac62fde7 100644 --- a/samples/client/petstore/java/google-api-client/git_push.sh +++ b/samples/client/petstore/java/google-api-client/git_push.sh @@ -55,4 +55,3 @@ 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/java/jersey1/build.gradle b/samples/client/petstore/java/jersey1/build.gradle index 76ccc3c06fa70b484aead996168ffdec6586ad92..26176baae04e57636fae7f32cba622657cb183f7 100644 --- a/samples/client/petstore/java/jersey1/build.gradle +++ b/samples/client/petstore/java/jersey1/build.gradle @@ -93,7 +93,7 @@ if(hasProperty('target') && target == 'android') { main = System.getProperty('mainClass') classpath = sourceSets.main.runtimeClasspath } - + task sourcesJar(type: Jar, dependsOn: classes) { classifier = 'sources' from sourceSets.main.allSource @@ -136,4 +136,3 @@ dependencies { implementation 'javax.annotation:javax.annotation-api:1.3.2' testImplementation "junit:junit:$junit_version" } - diff --git a/samples/client/petstore/java/jersey1/git_push.sh b/samples/client/petstore/java/jersey1/git_push.sh index ced3be2b0c7b2349ff06d18da19d4b31435c9fa6..9405f72e950cdb8ca24c3cf4d15cee7eac62fde7 100644 --- a/samples/client/petstore/java/jersey1/git_push.sh +++ b/samples/client/petstore/java/jersey1/git_push.sh @@ -55,4 +55,3 @@ 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/java/jersey1/src/main/java/org/openapitools/client/auth/OAuthFlow.java b/samples/client/petstore/java/jersey1/src/main/java/org/openapitools/client/auth/OAuthFlow.java index 75c2a0c9740db7fb2f7c48d2a7119cd1d132031f..ac3ecef00206870d2e551eb55809a951ee98e795 100644 --- a/samples/client/petstore/java/jersey1/src/main/java/org/openapitools/client/auth/OAuthFlow.java +++ b/samples/client/petstore/java/jersey1/src/main/java/org/openapitools/client/auth/OAuthFlow.java @@ -16,7 +16,7 @@ package org.openapitools.client.auth; @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") public enum OAuthFlow { accessCode, //called authorizationCode in OpenAPI 3.0 - implicit, + implicit, password, application //called clientCredentials in OpenAPI 3.0 } diff --git a/samples/client/petstore/java/jersey2-java8-localdatetime/git_push.sh b/samples/client/petstore/java/jersey2-java8-localdatetime/git_push.sh index ced3be2b0c7b2349ff06d18da19d4b31435c9fa6..9405f72e950cdb8ca24c3cf4d15cee7eac62fde7 100644 --- a/samples/client/petstore/java/jersey2-java8-localdatetime/git_push.sh +++ b/samples/client/petstore/java/jersey2-java8-localdatetime/git_push.sh @@ -55,4 +55,3 @@ 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/java/jersey2-java8/git_push.sh b/samples/client/petstore/java/jersey2-java8/git_push.sh index ced3be2b0c7b2349ff06d18da19d4b31435c9fa6..9405f72e950cdb8ca24c3cf4d15cee7eac62fde7 100644 --- a/samples/client/petstore/java/jersey2-java8/git_push.sh +++ b/samples/client/petstore/java/jersey2-java8/git_push.sh @@ -55,4 +55,3 @@ 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/java/microprofile-rest-client/pom.xml b/samples/client/petstore/java/microprofile-rest-client/pom.xml index 91b6ef610f539233c2d5d656c069a7b60c77d0ed..61d4de9908b83659c550203968c6316d4493a1fa 100644 --- a/samples/client/petstore/java/microprofile-rest-client/pom.xml +++ b/samples/client/petstore/java/microprofile-rest-client/pom.xml @@ -112,7 +112,7 @@ <artifactId>activation</artifactId> <version>1.1.1</version> </dependency> - + <dependency> <groupId>com.fasterxml.jackson.datatype</groupId> <artifactId>jackson-datatype-joda</artifactId> diff --git a/samples/client/petstore/java/microprofile-rest-client/src/main/java/org/openapitools/client/api/PetApi.java b/samples/client/petstore/java/microprofile-rest-client/src/main/java/org/openapitools/client/api/PetApi.java index 4c07867f5bc282dc0d11d339a44afd69c22dc412..1b6a89b1ba363aa61669bfa61ffdb2f818dfe40f 100644 --- a/samples/client/petstore/java/microprofile-rest-client/src/main/java/org/openapitools/client/api/PetApi.java +++ b/samples/client/petstore/java/microprofile-rest-client/src/main/java/org/openapitools/client/api/PetApi.java @@ -120,4 +120,3 @@ public interface PetApi { @Produces({ "application/json" }) public ModelApiResponse uploadFile(@PathParam("petId") Long petId, @Multipart(value = "additionalMetadata", required = false) String additionalMetadata, @Multipart(value = "file" , required = false) Attachment fileDetail) throws ApiException, ProcessingException; } - diff --git a/samples/client/petstore/java/microprofile-rest-client/src/main/java/org/openapitools/client/api/StoreApi.java b/samples/client/petstore/java/microprofile-rest-client/src/main/java/org/openapitools/client/api/StoreApi.java index 13afc8da3e61088ee2fd150047a4dc8fb27b76b6..f26df5e1653b8ce5abe6d3f8ac95e2261dcfe619 100644 --- a/samples/client/petstore/java/microprofile-rest-client/src/main/java/org/openapitools/client/api/StoreApi.java +++ b/samples/client/petstore/java/microprofile-rest-client/src/main/java/org/openapitools/client/api/StoreApi.java @@ -79,4 +79,3 @@ public interface StoreApi { @Produces({ "application/xml", "application/json" }) public Order placeOrder(Order body) throws ApiException, ProcessingException; } - diff --git a/samples/client/petstore/java/microprofile-rest-client/src/main/java/org/openapitools/client/api/UserApi.java b/samples/client/petstore/java/microprofile-rest-client/src/main/java/org/openapitools/client/api/UserApi.java index c19507649363a26079c6af8d6f54220358380885..fc8d0989eeb294d482a47d921daf47f728778220 100644 --- a/samples/client/petstore/java/microprofile-rest-client/src/main/java/org/openapitools/client/api/UserApi.java +++ b/samples/client/petstore/java/microprofile-rest-client/src/main/java/org/openapitools/client/api/UserApi.java @@ -110,4 +110,3 @@ public interface UserApi { @Path("/{username}") public void updateUser(@PathParam("username") String username, User body) throws ApiException, ProcessingException; } - diff --git a/samples/client/petstore/java/microprofile-rest-client/src/main/java/org/openapitools/client/model/Category.java b/samples/client/petstore/java/microprofile-rest-client/src/main/java/org/openapitools/client/model/Category.java index f733b6a1d8c2bb275b6ba90637026705f89dcbb4..77f5fa23fc23529e14da81d636410ca6fa2b2f67 100644 --- a/samples/client/petstore/java/microprofile-rest-client/src/main/java/org/openapitools/client/model/Category.java +++ b/samples/client/petstore/java/microprofile-rest-client/src/main/java/org/openapitools/client/model/Category.java @@ -35,7 +35,7 @@ public class Category { @JsonbProperty("name") private String name; - + /** * Get id * @return id diff --git a/samples/client/petstore/java/microprofile-rest-client/src/main/java/org/openapitools/client/model/ModelApiResponse.java b/samples/client/petstore/java/microprofile-rest-client/src/main/java/org/openapitools/client/model/ModelApiResponse.java index b1e11cad8b15a16e76185e7f5627b64857fa5cfc..d954778c3df6e542b7bea9c24650e87f9ba09da7 100644 --- a/samples/client/petstore/java/microprofile-rest-client/src/main/java/org/openapitools/client/model/ModelApiResponse.java +++ b/samples/client/petstore/java/microprofile-rest-client/src/main/java/org/openapitools/client/model/ModelApiResponse.java @@ -38,7 +38,7 @@ public class ModelApiResponse { @JsonbProperty("message") private String message; - + /** * Get code * @return code diff --git a/samples/client/petstore/java/microprofile-rest-client/src/main/java/org/openapitools/client/model/Order.java b/samples/client/petstore/java/microprofile-rest-client/src/main/java/org/openapitools/client/model/Order.java index 2393fe6ac12733aae79baa04c95c7f293d1c7b56..b775633f6ce739a0d7554996e0d9c2b5f0275aa8 100644 --- a/samples/client/petstore/java/microprofile-rest-client/src/main/java/org/openapitools/client/model/Order.java +++ b/samples/client/petstore/java/microprofile-rest-client/src/main/java/org/openapitools/client/model/Order.java @@ -47,7 +47,7 @@ public class Order { @JsonbTypeDeserializer(StatusEnum.Deserializer.class) public enum StatusEnum { - PLACED(String.valueOf("placed")), APPROVED(String.valueOf("approved")), DELIVERED(String.valueOf("delivered")); + PLACED(String.valueOf("placed")), APPROVED(String.valueOf("approved")), DELIVERED(String.valueOf("delivered")); String value; @@ -93,7 +93,7 @@ public class Order { @JsonbProperty("complete") private Boolean complete = false; - + /** * Get id * @return id diff --git a/samples/client/petstore/java/microprofile-rest-client/src/main/java/org/openapitools/client/model/Pet.java b/samples/client/petstore/java/microprofile-rest-client/src/main/java/org/openapitools/client/model/Pet.java index ea61ea0fba92c1bd55b0e1ddb1312472b5ab3c7e..da3b5f04bbdf28d341111896b00899265ef4d773 100644 --- a/samples/client/petstore/java/microprofile-rest-client/src/main/java/org/openapitools/client/model/Pet.java +++ b/samples/client/petstore/java/microprofile-rest-client/src/main/java/org/openapitools/client/model/Pet.java @@ -53,7 +53,7 @@ public class Pet { @JsonbTypeDeserializer(StatusEnum.Deserializer.class) public enum StatusEnum { - AVAILABLE(String.valueOf("available")), PENDING(String.valueOf("pending")), SOLD(String.valueOf("sold")); + AVAILABLE(String.valueOf("available")), PENDING(String.valueOf("pending")), SOLD(String.valueOf("sold")); String value; @@ -96,7 +96,7 @@ public class Pet { **/ @JsonbProperty("status") private StatusEnum status; - + /** * Get id * @return id diff --git a/samples/client/petstore/java/microprofile-rest-client/src/main/java/org/openapitools/client/model/Tag.java b/samples/client/petstore/java/microprofile-rest-client/src/main/java/org/openapitools/client/model/Tag.java index 1a5330676cc2e0d502e2e13b5829335ce0190bd1..e275dc39167058452ac16d8a604093403612e671 100644 --- a/samples/client/petstore/java/microprofile-rest-client/src/main/java/org/openapitools/client/model/Tag.java +++ b/samples/client/petstore/java/microprofile-rest-client/src/main/java/org/openapitools/client/model/Tag.java @@ -35,7 +35,7 @@ public class Tag { @JsonbProperty("name") private String name; - + /** * Get id * @return id diff --git a/samples/client/petstore/java/microprofile-rest-client/src/main/java/org/openapitools/client/model/User.java b/samples/client/petstore/java/microprofile-rest-client/src/main/java/org/openapitools/client/model/User.java index 6552a7a7fd12d9fa4e4ac96f75c68ccd68bd5cc4..6e7ddc52f9a4ef97782405adc2ca3bd73e01fbbd 100644 --- a/samples/client/petstore/java/microprofile-rest-client/src/main/java/org/openapitools/client/model/User.java +++ b/samples/client/petstore/java/microprofile-rest-client/src/main/java/org/openapitools/client/model/User.java @@ -56,7 +56,7 @@ public class User { **/ @JsonbProperty("userStatus") private Integer userStatus; - + /** * Get id * @return id diff --git a/samples/client/petstore/java/native-async/.travis.yml b/samples/client/petstore/java/native-async/.travis.yml index d489da682e9ece69f0a76f33dbc8975a7ddfb996..c946474792347207b7297e576471e805d4d91db8 100644 --- a/samples/client/petstore/java/native-async/.travis.yml +++ b/samples/client/petstore/java/native-async/.travis.yml @@ -12,5 +12,5 @@ script: - mvn test # uncomment below to test using gradle # - gradle test - # uncomment below to test using sbt + # uncomment below to test using sbt # - sbt test diff --git a/samples/client/petstore/java/native-async/git_push.sh b/samples/client/petstore/java/native-async/git_push.sh index ced3be2b0c7b2349ff06d18da19d4b31435c9fa6..9405f72e950cdb8ca24c3cf4d15cee7eac62fde7 100644 --- a/samples/client/petstore/java/native-async/git_push.sh +++ b/samples/client/petstore/java/native-async/git_push.sh @@ -55,4 +55,3 @@ 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/java/native-async/src/main/java/org/openapitools/client/ApiClient.java b/samples/client/petstore/java/native-async/src/main/java/org/openapitools/client/ApiClient.java index 4b5a1fb4bd3416e173397b7daa1de92951f5711c..478e6a7d6f8c965b34eee6dd9dd0cba7fb59e18f 100644 --- a/samples/client/petstore/java/native-async/src/main/java/org/openapitools/client/ApiClient.java +++ b/samples/client/petstore/java/native-async/src/main/java/org/openapitools/client/ApiClient.java @@ -378,7 +378,7 @@ public class ApiClient { this.readTimeout = readTimeout; return this; } - + /** * Get the read timeout that was set. * diff --git a/samples/client/petstore/java/native/.travis.yml b/samples/client/petstore/java/native/.travis.yml index d489da682e9ece69f0a76f33dbc8975a7ddfb996..c946474792347207b7297e576471e805d4d91db8 100644 --- a/samples/client/petstore/java/native/.travis.yml +++ b/samples/client/petstore/java/native/.travis.yml @@ -12,5 +12,5 @@ script: - mvn test # uncomment below to test using gradle # - gradle test - # uncomment below to test using sbt + # uncomment below to test using sbt # - sbt test diff --git a/samples/client/petstore/java/native/git_push.sh b/samples/client/petstore/java/native/git_push.sh index ced3be2b0c7b2349ff06d18da19d4b31435c9fa6..9405f72e950cdb8ca24c3cf4d15cee7eac62fde7 100644 --- a/samples/client/petstore/java/native/git_push.sh +++ b/samples/client/petstore/java/native/git_push.sh @@ -55,4 +55,3 @@ 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/java/native/src/main/java/org/openapitools/client/ApiClient.java b/samples/client/petstore/java/native/src/main/java/org/openapitools/client/ApiClient.java index 4b5a1fb4bd3416e173397b7daa1de92951f5711c..478e6a7d6f8c965b34eee6dd9dd0cba7fb59e18f 100644 --- a/samples/client/petstore/java/native/src/main/java/org/openapitools/client/ApiClient.java +++ b/samples/client/petstore/java/native/src/main/java/org/openapitools/client/ApiClient.java @@ -378,7 +378,7 @@ public class ApiClient { this.readTimeout = readTimeout; return this; } - + /** * Get the read timeout that was set. * diff --git a/samples/client/petstore/java/okhttp-gson-dynamicOperations/git_push.sh b/samples/client/petstore/java/okhttp-gson-dynamicOperations/git_push.sh index ced3be2b0c7b2349ff06d18da19d4b31435c9fa6..9405f72e950cdb8ca24c3cf4d15cee7eac62fde7 100644 --- a/samples/client/petstore/java/okhttp-gson-dynamicOperations/git_push.sh +++ b/samples/client/petstore/java/okhttp-gson-dynamicOperations/git_push.sh @@ -55,4 +55,3 @@ 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/java/okhttp-gson-dynamicOperations/src/main/java/org/openapitools/client/ProgressResponseBody.java b/samples/client/petstore/java/okhttp-gson-dynamicOperations/src/main/java/org/openapitools/client/ProgressResponseBody.java index 1235d56f9fda183b0b688f5746a4669c8f5a4da5..eee56669a4a3d3dc37136e3abb3a57419329d4de 100644 --- a/samples/client/petstore/java/okhttp-gson-dynamicOperations/src/main/java/org/openapitools/client/ProgressResponseBody.java +++ b/samples/client/petstore/java/okhttp-gson-dynamicOperations/src/main/java/org/openapitools/client/ProgressResponseBody.java @@ -68,5 +68,3 @@ public class ProgressResponseBody extends ResponseBody { }; } } - - diff --git a/samples/client/petstore/java/okhttp-gson-dynamicOperations/src/main/java/org/openapitools/client/auth/OAuthFlow.java b/samples/client/petstore/java/okhttp-gson-dynamicOperations/src/main/java/org/openapitools/client/auth/OAuthFlow.java index 75c2a0c9740db7fb2f7c48d2a7119cd1d132031f..ac3ecef00206870d2e551eb55809a951ee98e795 100644 --- a/samples/client/petstore/java/okhttp-gson-dynamicOperations/src/main/java/org/openapitools/client/auth/OAuthFlow.java +++ b/samples/client/petstore/java/okhttp-gson-dynamicOperations/src/main/java/org/openapitools/client/auth/OAuthFlow.java @@ -16,7 +16,7 @@ package org.openapitools.client.auth; @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") public enum OAuthFlow { accessCode, //called authorizationCode in OpenAPI 3.0 - implicit, + implicit, password, application //called clientCredentials in OpenAPI 3.0 } diff --git a/samples/client/petstore/java/okhttp-gson-parcelableModel/git_push.sh b/samples/client/petstore/java/okhttp-gson-parcelableModel/git_push.sh index ced3be2b0c7b2349ff06d18da19d4b31435c9fa6..9405f72e950cdb8ca24c3cf4d15cee7eac62fde7 100644 --- a/samples/client/petstore/java/okhttp-gson-parcelableModel/git_push.sh +++ b/samples/client/petstore/java/okhttp-gson-parcelableModel/git_push.sh @@ -55,4 +55,3 @@ 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/java/okhttp-gson-parcelableModel/src/main/java/org/openapitools/client/ProgressResponseBody.java b/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/org/openapitools/client/ProgressResponseBody.java index 1235d56f9fda183b0b688f5746a4669c8f5a4da5..eee56669a4a3d3dc37136e3abb3a57419329d4de 100644 --- a/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/org/openapitools/client/ProgressResponseBody.java +++ b/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/org/openapitools/client/ProgressResponseBody.java @@ -68,5 +68,3 @@ public class ProgressResponseBody extends ResponseBody { }; } } - - diff --git a/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/org/openapitools/client/auth/OAuthFlow.java b/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/org/openapitools/client/auth/OAuthFlow.java index 75c2a0c9740db7fb2f7c48d2a7119cd1d132031f..ac3ecef00206870d2e551eb55809a951ee98e795 100644 --- a/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/org/openapitools/client/auth/OAuthFlow.java +++ b/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/org/openapitools/client/auth/OAuthFlow.java @@ -16,7 +16,7 @@ package org.openapitools.client.auth; @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") public enum OAuthFlow { accessCode, //called authorizationCode in OpenAPI 3.0 - implicit, + implicit, password, application //called clientCredentials in OpenAPI 3.0 } diff --git a/samples/client/petstore/java/okhttp-gson/git_push.sh b/samples/client/petstore/java/okhttp-gson/git_push.sh index ced3be2b0c7b2349ff06d18da19d4b31435c9fa6..9405f72e950cdb8ca24c3cf4d15cee7eac62fde7 100644 --- a/samples/client/petstore/java/okhttp-gson/git_push.sh +++ b/samples/client/petstore/java/okhttp-gson/git_push.sh @@ -55,4 +55,3 @@ 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/java/okhttp-gson/src/main/java/org/openapitools/client/ProgressResponseBody.java b/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/ProgressResponseBody.java index 1235d56f9fda183b0b688f5746a4669c8f5a4da5..eee56669a4a3d3dc37136e3abb3a57419329d4de 100644 --- a/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/ProgressResponseBody.java +++ b/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/ProgressResponseBody.java @@ -68,5 +68,3 @@ public class ProgressResponseBody extends ResponseBody { }; } } - - diff --git a/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/auth/OAuthFlow.java b/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/auth/OAuthFlow.java index 75c2a0c9740db7fb2f7c48d2a7119cd1d132031f..ac3ecef00206870d2e551eb55809a951ee98e795 100644 --- a/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/auth/OAuthFlow.java +++ b/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/auth/OAuthFlow.java @@ -16,7 +16,7 @@ package org.openapitools.client.auth; @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") public enum OAuthFlow { accessCode, //called authorizationCode in OpenAPI 3.0 - implicit, + implicit, password, application //called clientCredentials in OpenAPI 3.0 } diff --git a/samples/client/petstore/java/rest-assured-jackson/README.md b/samples/client/petstore/java/rest-assured-jackson/README.md index 5ddd1aa2147fb571c819e74fae3f5b3ef698993e..2ccbba89edeaa57707ef2f6a3b04265d4728248d 100644 --- a/samples/client/petstore/java/rest-assured-jackson/README.md +++ b/samples/client/petstore/java/rest-assured-jackson/README.md @@ -40,4 +40,3 @@ It's recommended to create an instance of `ApiClient` per thread in a multithrea - diff --git a/samples/client/petstore/java/rest-assured-jackson/build.gradle b/samples/client/petstore/java/rest-assured-jackson/build.gradle index b343bf77f3eb97d10b273ce6bbb893c905593d1c..4a4238e94518d82190ec73087043d46a4d92137f 100644 --- a/samples/client/petstore/java/rest-assured-jackson/build.gradle +++ b/samples/client/petstore/java/rest-assured-jackson/build.gradle @@ -24,7 +24,7 @@ if(hasProperty('target') && target == 'android') { apply plugin: 'com.android.library' apply plugin: 'com.github.dcendents.android-maven' - + android { compileSdkVersion 23 buildToolsVersion '23.0.2' @@ -36,7 +36,7 @@ if(hasProperty('target') && target == 'android') { sourceCompatibility JavaVersion.VERSION_1_8 targetCompatibility JavaVersion.VERSION_1_8 } - + // Rename the aar correctly libraryVariants.all { variant -> variant.outputs.each { output -> @@ -52,7 +52,7 @@ if(hasProperty('target') && target == 'android') { provided 'javax.annotation:jsr250-api:1.0' } } - + afterEvaluate { android.libraryVariants.all { variant -> def task = project.tasks.create "jar${variant.name.capitalize()}", Jar @@ -64,12 +64,12 @@ if(hasProperty('target') && target == 'android') { artifacts.add('archives', task); } } - + task sourcesJar(type: Jar) { from android.sourceSets.main.java.srcDirs classifier = 'sources' } - + artifacts { archives sourcesJar } @@ -87,7 +87,7 @@ if(hasProperty('target') && target == 'android') { pom.artifactId = 'petstore-rest-assured-jackson' } } - + task execute(type:JavaExec) { main = System.getProperty('mainClass') classpath = sourceSets.main.runtimeClasspath diff --git a/samples/client/petstore/java/rest-assured-jackson/git_push.sh b/samples/client/petstore/java/rest-assured-jackson/git_push.sh index ced3be2b0c7b2349ff06d18da19d4b31435c9fa6..9405f72e950cdb8ca24c3cf4d15cee7eac62fde7 100644 --- a/samples/client/petstore/java/rest-assured-jackson/git_push.sh +++ b/samples/client/petstore/java/rest-assured-jackson/git_push.sh @@ -55,4 +55,3 @@ 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/java/rest-assured-jackson/src/main/java/org/openapitools/client/BeanValidationException.java b/samples/client/petstore/java/rest-assured-jackson/src/main/java/org/openapitools/client/BeanValidationException.java index 28b41ac559e596bb6ad970e44ad5c7f987ccfe01..53034a2a25ffbdf408ecfabe662484fd48598fcf 100644 --- a/samples/client/petstore/java/rest-assured-jackson/src/main/java/org/openapitools/client/BeanValidationException.java +++ b/samples/client/petstore/java/rest-assured-jackson/src/main/java/org/openapitools/client/BeanValidationException.java @@ -7,7 +7,7 @@ import javax.validation.ValidationException; public class BeanValidationException extends ValidationException { /** - * + * */ private static final long serialVersionUID = -5294733947409491364L; Set<ConstraintViolation<Object>> violations; diff --git a/samples/client/petstore/java/rest-assured/README.md b/samples/client/petstore/java/rest-assured/README.md index a9f06deddb41ace5e614648cbb3d6c3f63b61bf0..9ff4520358987e173b6b0d0bc5b0c338ecc2393a 100644 --- a/samples/client/petstore/java/rest-assured/README.md +++ b/samples/client/petstore/java/rest-assured/README.md @@ -40,4 +40,3 @@ It's recommended to create an instance of `ApiClient` per thread in a multithrea - diff --git a/samples/client/petstore/java/rest-assured/build.gradle b/samples/client/petstore/java/rest-assured/build.gradle index 7b06e86135ec05fd4ed7669ded2c3a7918487cf3..4b26258f395f692d559d493e35747418f2387b22 100644 --- a/samples/client/petstore/java/rest-assured/build.gradle +++ b/samples/client/petstore/java/rest-assured/build.gradle @@ -24,7 +24,7 @@ if(hasProperty('target') && target == 'android') { apply plugin: 'com.android.library' apply plugin: 'com.github.dcendents.android-maven' - + android { compileSdkVersion 23 buildToolsVersion '23.0.2' @@ -36,7 +36,7 @@ if(hasProperty('target') && target == 'android') { sourceCompatibility JavaVersion.VERSION_1_8 targetCompatibility JavaVersion.VERSION_1_8 } - + // Rename the aar correctly libraryVariants.all { variant -> variant.outputs.each { output -> @@ -52,7 +52,7 @@ if(hasProperty('target') && target == 'android') { provided 'javax.annotation:jsr250-api:1.0' } } - + afterEvaluate { android.libraryVariants.all { variant -> def task = project.tasks.create "jar${variant.name.capitalize()}", Jar @@ -64,12 +64,12 @@ if(hasProperty('target') && target == 'android') { artifacts.add('archives', task); } } - + task sourcesJar(type: Jar) { from android.sourceSets.main.java.srcDirs classifier = 'sources' } - + artifacts { archives sourcesJar } @@ -87,7 +87,7 @@ if(hasProperty('target') && target == 'android') { pom.artifactId = 'petstore-rest-assured' } } - + task execute(type:JavaExec) { main = System.getProperty('mainClass') classpath = sourceSets.main.runtimeClasspath diff --git a/samples/client/petstore/java/rest-assured/git_push.sh b/samples/client/petstore/java/rest-assured/git_push.sh index ced3be2b0c7b2349ff06d18da19d4b31435c9fa6..9405f72e950cdb8ca24c3cf4d15cee7eac62fde7 100644 --- a/samples/client/petstore/java/rest-assured/git_push.sh +++ b/samples/client/petstore/java/rest-assured/git_push.sh @@ -55,4 +55,3 @@ 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/java/rest-assured/src/main/java/org/openapitools/client/BeanValidationException.java b/samples/client/petstore/java/rest-assured/src/main/java/org/openapitools/client/BeanValidationException.java index 28b41ac559e596bb6ad970e44ad5c7f987ccfe01..53034a2a25ffbdf408ecfabe662484fd48598fcf 100644 --- a/samples/client/petstore/java/rest-assured/src/main/java/org/openapitools/client/BeanValidationException.java +++ b/samples/client/petstore/java/rest-assured/src/main/java/org/openapitools/client/BeanValidationException.java @@ -7,7 +7,7 @@ import javax.validation.ValidationException; public class BeanValidationException extends ValidationException { /** - * + * */ private static final long serialVersionUID = -5294733947409491364L; Set<ConstraintViolation<Object>> violations; diff --git a/samples/client/petstore/java/resteasy/git_push.sh b/samples/client/petstore/java/resteasy/git_push.sh index ced3be2b0c7b2349ff06d18da19d4b31435c9fa6..9405f72e950cdb8ca24c3cf4d15cee7eac62fde7 100644 --- a/samples/client/petstore/java/resteasy/git_push.sh +++ b/samples/client/petstore/java/resteasy/git_push.sh @@ -55,4 +55,3 @@ 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/java/resteasy/src/main/java/org/openapitools/client/auth/OAuthFlow.java b/samples/client/petstore/java/resteasy/src/main/java/org/openapitools/client/auth/OAuthFlow.java index 75c2a0c9740db7fb2f7c48d2a7119cd1d132031f..ac3ecef00206870d2e551eb55809a951ee98e795 100644 --- a/samples/client/petstore/java/resteasy/src/main/java/org/openapitools/client/auth/OAuthFlow.java +++ b/samples/client/petstore/java/resteasy/src/main/java/org/openapitools/client/auth/OAuthFlow.java @@ -16,7 +16,7 @@ package org.openapitools.client.auth; @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") public enum OAuthFlow { accessCode, //called authorizationCode in OpenAPI 3.0 - implicit, + implicit, password, application //called clientCredentials in OpenAPI 3.0 } diff --git a/samples/client/petstore/java/resttemplate-withXml/git_push.sh b/samples/client/petstore/java/resttemplate-withXml/git_push.sh index ced3be2b0c7b2349ff06d18da19d4b31435c9fa6..9405f72e950cdb8ca24c3cf4d15cee7eac62fde7 100644 --- a/samples/client/petstore/java/resttemplate-withXml/git_push.sh +++ b/samples/client/petstore/java/resttemplate-withXml/git_push.sh @@ -55,4 +55,3 @@ 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/java/resttemplate-withXml/src/main/java/org/openapitools/client/ApiClient.java b/samples/client/petstore/java/resttemplate-withXml/src/main/java/org/openapitools/client/ApiClient.java index 0dc1443266dca19df242990782e8b3f2b1845a0f..422daa4c21383011601dbef08e5f9a8f065a34ea 100644 --- a/samples/client/petstore/java/resttemplate-withXml/src/main/java/org/openapitools/client/ApiClient.java +++ b/samples/client/petstore/java/resttemplate-withXml/src/main/java/org/openapitools/client/ApiClient.java @@ -818,4 +818,3 @@ public class ApiClient extends JavaTimeFormatter { } } } - diff --git a/samples/client/petstore/java/resttemplate/git_push.sh b/samples/client/petstore/java/resttemplate/git_push.sh index ced3be2b0c7b2349ff06d18da19d4b31435c9fa6..9405f72e950cdb8ca24c3cf4d15cee7eac62fde7 100644 --- a/samples/client/petstore/java/resttemplate/git_push.sh +++ b/samples/client/petstore/java/resttemplate/git_push.sh @@ -55,4 +55,3 @@ 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/java/resttemplate/src/main/java/org/openapitools/client/ApiClient.java b/samples/client/petstore/java/resttemplate/src/main/java/org/openapitools/client/ApiClient.java index 58278a042d02436482ca1d545b1c049743252585..1912fef80a32def1976733052007f5bb2bba7fd5 100644 --- a/samples/client/petstore/java/resttemplate/src/main/java/org/openapitools/client/ApiClient.java +++ b/samples/client/petstore/java/resttemplate/src/main/java/org/openapitools/client/ApiClient.java @@ -805,4 +805,3 @@ public class ApiClient extends JavaTimeFormatter { } } } - diff --git a/samples/client/petstore/java/retrofit2-play26/README.md b/samples/client/petstore/java/retrofit2-play26/README.md index b15898583f752dfea757e5f6ed5cb8e9f250e0d2..54009b9f723a1d1156b5eff8a31e7811541f7651 100644 --- a/samples/client/petstore/java/retrofit2-play26/README.md +++ b/samples/client/petstore/java/retrofit2-play26/README.md @@ -36,4 +36,3 @@ After the client library is installed/deployed, you can use it in your Maven pro - diff --git a/samples/client/petstore/java/retrofit2-play26/git_push.sh b/samples/client/petstore/java/retrofit2-play26/git_push.sh index ced3be2b0c7b2349ff06d18da19d4b31435c9fa6..9405f72e950cdb8ca24c3cf4d15cee7eac62fde7 100644 --- a/samples/client/petstore/java/retrofit2-play26/git_push.sh +++ b/samples/client/petstore/java/retrofit2-play26/git_push.sh @@ -55,4 +55,3 @@ 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/java/retrofit2/README.md b/samples/client/petstore/java/retrofit2/README.md index 3501cbd8885c62781a7610d5903d255c16848260..432999f50c105d23d69f806afd66755af31210d6 100644 --- a/samples/client/petstore/java/retrofit2/README.md +++ b/samples/client/petstore/java/retrofit2/README.md @@ -36,4 +36,3 @@ After the client library is installed/deployed, you can use it in your Maven pro - diff --git a/samples/client/petstore/java/retrofit2/git_push.sh b/samples/client/petstore/java/retrofit2/git_push.sh index ced3be2b0c7b2349ff06d18da19d4b31435c9fa6..9405f72e950cdb8ca24c3cf4d15cee7eac62fde7 100644 --- a/samples/client/petstore/java/retrofit2/git_push.sh +++ b/samples/client/petstore/java/retrofit2/git_push.sh @@ -55,4 +55,3 @@ 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/java/retrofit2/src/main/java/org/openapitools/client/ApiClient.java b/samples/client/petstore/java/retrofit2/src/main/java/org/openapitools/client/ApiClient.java index 250b4b4d47a5fa5852719b3ca46aaac6dac82895..b65534d173f73ee5fb0c5b8d515715c5e80ff45c 100644 --- a/samples/client/petstore/java/retrofit2/src/main/java/org/openapitools/client/ApiClient.java +++ b/samples/client/petstore/java/retrofit2/src/main/java/org/openapitools/client/ApiClient.java @@ -315,7 +315,7 @@ public class ApiClient { throw new RuntimeException("The ApiClient was created with a built OkHttpClient so it's not possible to add an authorization interceptor to it"); } okBuilder.addInterceptor(authorization); - + return this; } diff --git a/samples/client/petstore/java/retrofit2/src/main/java/org/openapitools/client/auth/HttpBasicAuth.java b/samples/client/petstore/java/retrofit2/src/main/java/org/openapitools/client/auth/HttpBasicAuth.java index ba3c48f21b0440e454c3841f1c43e4f87f35bf7e..58a516fbd44d4df9b37e4066b4addd94d4ff826f 100644 --- a/samples/client/petstore/java/retrofit2/src/main/java/org/openapitools/client/auth/HttpBasicAuth.java +++ b/samples/client/petstore/java/retrofit2/src/main/java/org/openapitools/client/auth/HttpBasicAuth.java @@ -12,7 +12,7 @@ public class HttpBasicAuth implements Interceptor { private String username; private String password; - + public String getUsername() { return username; } diff --git a/samples/client/petstore/java/retrofit2/src/main/java/org/openapitools/client/auth/OAuth.java b/samples/client/petstore/java/retrofit2/src/main/java/org/openapitools/client/auth/OAuth.java index 5186a9a2368b46b5ab86c6f2d05bfc2e483d8fd6..d4de63700c436d2c73ea63b59a5f9f7ff2332df2 100644 --- a/samples/client/petstore/java/retrofit2/src/main/java/org/openapitools/client/auth/OAuth.java +++ b/samples/client/petstore/java/retrofit2/src/main/java/org/openapitools/client/auth/OAuth.java @@ -66,7 +66,7 @@ public class OAuth implements Interceptor { break; default: break; - } + } } @Override @@ -133,7 +133,7 @@ public class OAuth implements Interceptor { * Returns true if the access token has been updated */ public synchronized boolean updateAccessToken(String requestAccessToken) throws IOException { - if (getAccessToken() == null || getAccessToken().equals(requestAccessToken)) { + if (getAccessToken() == null || getAccessToken().equals(requestAccessToken)) { try { OAuthJSONAccessTokenResponse accessTokenResponse = oauthClient.accessToken(this.tokenRequestBuilder.buildBodyMessage()); if (accessTokenResponse != null && accessTokenResponse.getAccessToken() != null) { diff --git a/samples/client/petstore/java/retrofit2/src/main/java/org/openapitools/client/auth/OAuthFlow.java b/samples/client/petstore/java/retrofit2/src/main/java/org/openapitools/client/auth/OAuthFlow.java index 75c2a0c9740db7fb2f7c48d2a7119cd1d132031f..ac3ecef00206870d2e551eb55809a951ee98e795 100644 --- a/samples/client/petstore/java/retrofit2/src/main/java/org/openapitools/client/auth/OAuthFlow.java +++ b/samples/client/petstore/java/retrofit2/src/main/java/org/openapitools/client/auth/OAuthFlow.java @@ -16,7 +16,7 @@ package org.openapitools.client.auth; @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") public enum OAuthFlow { accessCode, //called authorizationCode in OpenAPI 3.0 - implicit, + implicit, password, application //called clientCredentials in OpenAPI 3.0 } diff --git a/samples/client/petstore/java/retrofit2/src/main/java/org/openapitools/client/auth/OAuthOkHttpClient.java b/samples/client/petstore/java/retrofit2/src/main/java/org/openapitools/client/auth/OAuthOkHttpClient.java index 2050febbd92e72eaa104ac52f022098d2850f4c8..7639a18022a25a0cda751d9a115f7721f84e14c7 100644 --- a/samples/client/petstore/java/retrofit2/src/main/java/org/openapitools/client/auth/OAuthOkHttpClient.java +++ b/samples/client/petstore/java/retrofit2/src/main/java/org/openapitools/client/auth/OAuthOkHttpClient.java @@ -56,7 +56,7 @@ public class OAuthOkHttpClient implements HttpClient { try { Response response = client.newCall(requestBuilder.build()).execute(); return OAuthClientResponseFactory.createCustomResponse( - response.body().string(), + response.body().string(), response.body().contentType().toString(), response.code(), responseClass); diff --git a/samples/client/petstore/java/retrofit2rx2/README.md b/samples/client/petstore/java/retrofit2rx2/README.md index faf18812a0d44d21e40c1965d7ef716977179f26..2a0bd6e5141b7c0b337afcd590876efe90356111 100644 --- a/samples/client/petstore/java/retrofit2rx2/README.md +++ b/samples/client/petstore/java/retrofit2rx2/README.md @@ -36,4 +36,3 @@ After the client library is installed/deployed, you can use it in your Maven pro - diff --git a/samples/client/petstore/java/retrofit2rx2/git_push.sh b/samples/client/petstore/java/retrofit2rx2/git_push.sh index ced3be2b0c7b2349ff06d18da19d4b31435c9fa6..9405f72e950cdb8ca24c3cf4d15cee7eac62fde7 100644 --- a/samples/client/petstore/java/retrofit2rx2/git_push.sh +++ b/samples/client/petstore/java/retrofit2rx2/git_push.sh @@ -55,4 +55,3 @@ 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/java/retrofit2rx2/src/main/java/org/openapitools/client/ApiClient.java b/samples/client/petstore/java/retrofit2rx2/src/main/java/org/openapitools/client/ApiClient.java index c232fc24259bc93a76b58908b0d8e5e5a856bf0f..4895f5b43c380be8a967cadba889724414059401 100644 --- a/samples/client/petstore/java/retrofit2rx2/src/main/java/org/openapitools/client/ApiClient.java +++ b/samples/client/petstore/java/retrofit2rx2/src/main/java/org/openapitools/client/ApiClient.java @@ -317,7 +317,7 @@ public class ApiClient { throw new RuntimeException("The ApiClient was created with a built OkHttpClient so it's not possible to add an authorization interceptor to it"); } okBuilder.addInterceptor(authorization); - + return this; } diff --git a/samples/client/petstore/java/retrofit2rx2/src/main/java/org/openapitools/client/auth/HttpBasicAuth.java b/samples/client/petstore/java/retrofit2rx2/src/main/java/org/openapitools/client/auth/HttpBasicAuth.java index ba3c48f21b0440e454c3841f1c43e4f87f35bf7e..58a516fbd44d4df9b37e4066b4addd94d4ff826f 100644 --- a/samples/client/petstore/java/retrofit2rx2/src/main/java/org/openapitools/client/auth/HttpBasicAuth.java +++ b/samples/client/petstore/java/retrofit2rx2/src/main/java/org/openapitools/client/auth/HttpBasicAuth.java @@ -12,7 +12,7 @@ public class HttpBasicAuth implements Interceptor { private String username; private String password; - + public String getUsername() { return username; } diff --git a/samples/client/petstore/java/retrofit2rx2/src/main/java/org/openapitools/client/auth/OAuth.java b/samples/client/petstore/java/retrofit2rx2/src/main/java/org/openapitools/client/auth/OAuth.java index 5186a9a2368b46b5ab86c6f2d05bfc2e483d8fd6..d4de63700c436d2c73ea63b59a5f9f7ff2332df2 100644 --- a/samples/client/petstore/java/retrofit2rx2/src/main/java/org/openapitools/client/auth/OAuth.java +++ b/samples/client/petstore/java/retrofit2rx2/src/main/java/org/openapitools/client/auth/OAuth.java @@ -66,7 +66,7 @@ public class OAuth implements Interceptor { break; default: break; - } + } } @Override @@ -133,7 +133,7 @@ public class OAuth implements Interceptor { * Returns true if the access token has been updated */ public synchronized boolean updateAccessToken(String requestAccessToken) throws IOException { - if (getAccessToken() == null || getAccessToken().equals(requestAccessToken)) { + if (getAccessToken() == null || getAccessToken().equals(requestAccessToken)) { try { OAuthJSONAccessTokenResponse accessTokenResponse = oauthClient.accessToken(this.tokenRequestBuilder.buildBodyMessage()); if (accessTokenResponse != null && accessTokenResponse.getAccessToken() != null) { diff --git a/samples/client/petstore/java/retrofit2rx2/src/main/java/org/openapitools/client/auth/OAuthFlow.java b/samples/client/petstore/java/retrofit2rx2/src/main/java/org/openapitools/client/auth/OAuthFlow.java index 75c2a0c9740db7fb2f7c48d2a7119cd1d132031f..ac3ecef00206870d2e551eb55809a951ee98e795 100644 --- a/samples/client/petstore/java/retrofit2rx2/src/main/java/org/openapitools/client/auth/OAuthFlow.java +++ b/samples/client/petstore/java/retrofit2rx2/src/main/java/org/openapitools/client/auth/OAuthFlow.java @@ -16,7 +16,7 @@ package org.openapitools.client.auth; @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") public enum OAuthFlow { accessCode, //called authorizationCode in OpenAPI 3.0 - implicit, + implicit, password, application //called clientCredentials in OpenAPI 3.0 } diff --git a/samples/client/petstore/java/retrofit2rx2/src/main/java/org/openapitools/client/auth/OAuthOkHttpClient.java b/samples/client/petstore/java/retrofit2rx2/src/main/java/org/openapitools/client/auth/OAuthOkHttpClient.java index 2050febbd92e72eaa104ac52f022098d2850f4c8..7639a18022a25a0cda751d9a115f7721f84e14c7 100644 --- a/samples/client/petstore/java/retrofit2rx2/src/main/java/org/openapitools/client/auth/OAuthOkHttpClient.java +++ b/samples/client/petstore/java/retrofit2rx2/src/main/java/org/openapitools/client/auth/OAuthOkHttpClient.java @@ -56,7 +56,7 @@ public class OAuthOkHttpClient implements HttpClient { try { Response response = client.newCall(requestBuilder.build()).execute(); return OAuthClientResponseFactory.createCustomResponse( - response.body().string(), + response.body().string(), response.body().contentType().toString(), response.code(), responseClass); diff --git a/samples/client/petstore/java/retrofit2rx3/README.md b/samples/client/petstore/java/retrofit2rx3/README.md index 8ef02d5debdd2091fa9f23dda3d81e2474e45a59..b3b06a53001c9aa998fdafad2bd293f6a99a704b 100644 --- a/samples/client/petstore/java/retrofit2rx3/README.md +++ b/samples/client/petstore/java/retrofit2rx3/README.md @@ -36,4 +36,3 @@ After the client library is installed/deployed, you can use it in your Maven pro - diff --git a/samples/client/petstore/java/retrofit2rx3/git_push.sh b/samples/client/petstore/java/retrofit2rx3/git_push.sh index ced3be2b0c7b2349ff06d18da19d4b31435c9fa6..9405f72e950cdb8ca24c3cf4d15cee7eac62fde7 100644 --- a/samples/client/petstore/java/retrofit2rx3/git_push.sh +++ b/samples/client/petstore/java/retrofit2rx3/git_push.sh @@ -55,4 +55,3 @@ 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/java/retrofit2rx3/src/main/java/org/openapitools/client/ApiClient.java b/samples/client/petstore/java/retrofit2rx3/src/main/java/org/openapitools/client/ApiClient.java index 12e7f8d4e66de594c3876f7ec80a1fd6e9ac4bb4..544e9f398f33ec1b971b734a22b23d2582980aa0 100644 --- a/samples/client/petstore/java/retrofit2rx3/src/main/java/org/openapitools/client/ApiClient.java +++ b/samples/client/petstore/java/retrofit2rx3/src/main/java/org/openapitools/client/ApiClient.java @@ -317,7 +317,7 @@ public class ApiClient { throw new RuntimeException("The ApiClient was created with a built OkHttpClient so it's not possible to add an authorization interceptor to it"); } okBuilder.addInterceptor(authorization); - + return this; } diff --git a/samples/client/petstore/java/retrofit2rx3/src/main/java/org/openapitools/client/auth/HttpBasicAuth.java b/samples/client/petstore/java/retrofit2rx3/src/main/java/org/openapitools/client/auth/HttpBasicAuth.java index ba3c48f21b0440e454c3841f1c43e4f87f35bf7e..58a516fbd44d4df9b37e4066b4addd94d4ff826f 100644 --- a/samples/client/petstore/java/retrofit2rx3/src/main/java/org/openapitools/client/auth/HttpBasicAuth.java +++ b/samples/client/petstore/java/retrofit2rx3/src/main/java/org/openapitools/client/auth/HttpBasicAuth.java @@ -12,7 +12,7 @@ public class HttpBasicAuth implements Interceptor { private String username; private String password; - + public String getUsername() { return username; } diff --git a/samples/client/petstore/java/retrofit2rx3/src/main/java/org/openapitools/client/auth/OAuth.java b/samples/client/petstore/java/retrofit2rx3/src/main/java/org/openapitools/client/auth/OAuth.java index 5186a9a2368b46b5ab86c6f2d05bfc2e483d8fd6..d4de63700c436d2c73ea63b59a5f9f7ff2332df2 100644 --- a/samples/client/petstore/java/retrofit2rx3/src/main/java/org/openapitools/client/auth/OAuth.java +++ b/samples/client/petstore/java/retrofit2rx3/src/main/java/org/openapitools/client/auth/OAuth.java @@ -66,7 +66,7 @@ public class OAuth implements Interceptor { break; default: break; - } + } } @Override @@ -133,7 +133,7 @@ public class OAuth implements Interceptor { * Returns true if the access token has been updated */ public synchronized boolean updateAccessToken(String requestAccessToken) throws IOException { - if (getAccessToken() == null || getAccessToken().equals(requestAccessToken)) { + if (getAccessToken() == null || getAccessToken().equals(requestAccessToken)) { try { OAuthJSONAccessTokenResponse accessTokenResponse = oauthClient.accessToken(this.tokenRequestBuilder.buildBodyMessage()); if (accessTokenResponse != null && accessTokenResponse.getAccessToken() != null) { diff --git a/samples/client/petstore/java/retrofit2rx3/src/main/java/org/openapitools/client/auth/OAuthFlow.java b/samples/client/petstore/java/retrofit2rx3/src/main/java/org/openapitools/client/auth/OAuthFlow.java index 75c2a0c9740db7fb2f7c48d2a7119cd1d132031f..ac3ecef00206870d2e551eb55809a951ee98e795 100644 --- a/samples/client/petstore/java/retrofit2rx3/src/main/java/org/openapitools/client/auth/OAuthFlow.java +++ b/samples/client/petstore/java/retrofit2rx3/src/main/java/org/openapitools/client/auth/OAuthFlow.java @@ -16,7 +16,7 @@ package org.openapitools.client.auth; @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") public enum OAuthFlow { accessCode, //called authorizationCode in OpenAPI 3.0 - implicit, + implicit, password, application //called clientCredentials in OpenAPI 3.0 } diff --git a/samples/client/petstore/java/retrofit2rx3/src/main/java/org/openapitools/client/auth/OAuthOkHttpClient.java b/samples/client/petstore/java/retrofit2rx3/src/main/java/org/openapitools/client/auth/OAuthOkHttpClient.java index 2050febbd92e72eaa104ac52f022098d2850f4c8..7639a18022a25a0cda751d9a115f7721f84e14c7 100644 --- a/samples/client/petstore/java/retrofit2rx3/src/main/java/org/openapitools/client/auth/OAuthOkHttpClient.java +++ b/samples/client/petstore/java/retrofit2rx3/src/main/java/org/openapitools/client/auth/OAuthOkHttpClient.java @@ -56,7 +56,7 @@ public class OAuthOkHttpClient implements HttpClient { try { Response response = client.newCall(requestBuilder.build()).execute(); return OAuthClientResponseFactory.createCustomResponse( - response.body().string(), + response.body().string(), response.body().contentType().toString(), response.code(), responseClass); diff --git a/samples/client/petstore/java/vertx-no-nullable/git_push.sh b/samples/client/petstore/java/vertx-no-nullable/git_push.sh index ced3be2b0c7b2349ff06d18da19d4b31435c9fa6..9405f72e950cdb8ca24c3cf4d15cee7eac62fde7 100644 --- a/samples/client/petstore/java/vertx-no-nullable/git_push.sh +++ b/samples/client/petstore/java/vertx-no-nullable/git_push.sh @@ -55,4 +55,3 @@ 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/java/vertx-no-nullable/pom.xml b/samples/client/petstore/java/vertx-no-nullable/pom.xml index 27d727dd8067776609d8892a7bf4069c0ffe8695..ed82307ce4ff09c6a2087f9fe9a3949ff69329ad 100644 --- a/samples/client/petstore/java/vertx-no-nullable/pom.xml +++ b/samples/client/petstore/java/vertx-no-nullable/pom.xml @@ -211,7 +211,7 @@ <artifactId>jsr305</artifactId> <version>3.0.2</version> </dependency> - + <!-- Vertx --> <dependency> <groupId>io.vertx</groupId> diff --git a/samples/client/petstore/java/vertx/git_push.sh b/samples/client/petstore/java/vertx/git_push.sh index ced3be2b0c7b2349ff06d18da19d4b31435c9fa6..9405f72e950cdb8ca24c3cf4d15cee7eac62fde7 100644 --- a/samples/client/petstore/java/vertx/git_push.sh +++ b/samples/client/petstore/java/vertx/git_push.sh @@ -55,4 +55,3 @@ 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/java/vertx/pom.xml b/samples/client/petstore/java/vertx/pom.xml index 05940bfdbddbaa9fcb73dfadaf6df81111cf5334..07d20c311d18caf723dc7106e5fb4a5977857c12 100644 --- a/samples/client/petstore/java/vertx/pom.xml +++ b/samples/client/petstore/java/vertx/pom.xml @@ -211,7 +211,7 @@ <artifactId>jsr305</artifactId> <version>3.0.2</version> </dependency> - + <!-- Vertx --> <dependency> <groupId>io.vertx</groupId> diff --git a/samples/client/petstore/java/webclient-nulable-arrays/build.gradle b/samples/client/petstore/java/webclient-nulable-arrays/build.gradle index 343400c83c227b25985ac2abb7bc5df5a05382a6..85246dc6513c04b86caf9d8c361af9eb7c651cc6 100644 --- a/samples/client/petstore/java/webclient-nulable-arrays/build.gradle +++ b/samples/client/petstore/java/webclient-nulable-arrays/build.gradle @@ -93,7 +93,7 @@ if(hasProperty('target') && target == 'android') { main = System.getProperty('mainClass') classpath = sourceSets.main.runtimeClasspath } - + task sourcesJar(type: Jar, dependsOn: classes) { classifier = 'sources' from sourceSets.main.allSource @@ -138,4 +138,3 @@ dependencies { implementation "javax.annotation:javax.annotation-api:$javax_annotation_version" testImplementation "junit:junit:$junit_version" } - diff --git a/samples/client/petstore/java/webclient-nulable-arrays/git_push.sh b/samples/client/petstore/java/webclient-nulable-arrays/git_push.sh index ced3be2b0c7b2349ff06d18da19d4b31435c9fa6..9405f72e950cdb8ca24c3cf4d15cee7eac62fde7 100644 --- a/samples/client/petstore/java/webclient-nulable-arrays/git_push.sh +++ b/samples/client/petstore/java/webclient-nulable-arrays/git_push.sh @@ -55,4 +55,3 @@ 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/java/webclient-nulable-arrays/pom.xml b/samples/client/petstore/java/webclient-nulable-arrays/pom.xml index 54c073f0f2e61c5537603825951126798af36ffb..30382edacdfd07234c9e3878890d347d13931588 100644 --- a/samples/client/petstore/java/webclient-nulable-arrays/pom.xml +++ b/samples/client/petstore/java/webclient-nulable-arrays/pom.xml @@ -64,7 +64,7 @@ <artifactId>swagger-annotations</artifactId> <version>${swagger-annotations-version}</version> </dependency> - + <!-- @Nullable annotation --> <dependency> <groupId>com.google.code.findbugs</groupId> diff --git a/samples/client/petstore/java/webclient/build.gradle b/samples/client/petstore/java/webclient/build.gradle index 44643bd52e014130333e505f1b8c7d9e9cd80bef..6091974a8bc3d3fae21e11f75edde4591a2dc852 100644 --- a/samples/client/petstore/java/webclient/build.gradle +++ b/samples/client/petstore/java/webclient/build.gradle @@ -93,7 +93,7 @@ if(hasProperty('target') && target == 'android') { main = System.getProperty('mainClass') classpath = sourceSets.main.runtimeClasspath } - + task sourcesJar(type: Jar, dependsOn: classes) { classifier = 'sources' from sourceSets.main.allSource @@ -138,4 +138,3 @@ dependencies { implementation "javax.annotation:javax.annotation-api:$javax_annotation_version" testImplementation "junit:junit:$junit_version" } - diff --git a/samples/client/petstore/java/webclient/git_push.sh b/samples/client/petstore/java/webclient/git_push.sh index ced3be2b0c7b2349ff06d18da19d4b31435c9fa6..9405f72e950cdb8ca24c3cf4d15cee7eac62fde7 100644 --- a/samples/client/petstore/java/webclient/git_push.sh +++ b/samples/client/petstore/java/webclient/git_push.sh @@ -55,4 +55,3 @@ 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/java/webclient/pom.xml b/samples/client/petstore/java/webclient/pom.xml index 6b73f3358b05b14432116e5fc3373d0ff879cf76..fd9ba16704737b6814eb6d23ef50c214ee4b31f0 100644 --- a/samples/client/petstore/java/webclient/pom.xml +++ b/samples/client/petstore/java/webclient/pom.xml @@ -64,7 +64,7 @@ <artifactId>swagger-annotations</artifactId> <version>${swagger-annotations-version}</version> </dependency> - + <!-- @Nullable annotation --> <dependency> <groupId>com.google.code.findbugs</groupId> diff --git a/samples/client/petstore/javascript-es6/git_push.sh b/samples/client/petstore/javascript-es6/git_push.sh index ced3be2b0c7b2349ff06d18da19d4b31435c9fa6..9405f72e950cdb8ca24c3cf4d15cee7eac62fde7 100644 --- a/samples/client/petstore/javascript-es6/git_push.sh +++ b/samples/client/petstore/javascript-es6/git_push.sh @@ -55,4 +55,3 @@ 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/javascript-promise-es6/git_push.sh b/samples/client/petstore/javascript-promise-es6/git_push.sh index ced3be2b0c7b2349ff06d18da19d4b31435c9fa6..9405f72e950cdb8ca24c3cf4d15cee7eac62fde7 100644 --- a/samples/client/petstore/javascript-promise-es6/git_push.sh +++ b/samples/client/petstore/javascript-promise-es6/git_push.sh @@ -55,4 +55,3 @@ 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/kotlin-gson/src/main/kotlin/org/openapitools/client/infrastructure/Serializer.kt b/samples/client/petstore/kotlin-gson/src/main/kotlin/org/openapitools/client/infrastructure/Serializer.kt index d32b9d22c619d9b7491926ce6d84f16cc72e4636..6e16e4f6582b705fe504f3d5ab15082852433523 100644 --- a/samples/client/petstore/kotlin-gson/src/main/kotlin/org/openapitools/client/infrastructure/Serializer.kt +++ b/samples/client/petstore/kotlin-gson/src/main/kotlin/org/openapitools/client/infrastructure/Serializer.kt @@ -14,7 +14,7 @@ object Serializer { .registerTypeAdapter(LocalDateTime::class.java, LocalDateTimeAdapter()) .registerTypeAdapter(LocalDate::class.java, LocalDateAdapter()) .registerTypeAdapter(ByteArray::class.java, ByteArrayAdapter()) - + @JvmStatic val gson: Gson by lazy { gsonBuilder.create() diff --git a/samples/client/petstore/kotlin-jvm-okhttp4-coroutines/src/main/kotlin/org/openapitools/client/infrastructure/Serializer.kt b/samples/client/petstore/kotlin-jvm-okhttp4-coroutines/src/main/kotlin/org/openapitools/client/infrastructure/Serializer.kt index d32b9d22c619d9b7491926ce6d84f16cc72e4636..6e16e4f6582b705fe504f3d5ab15082852433523 100644 --- a/samples/client/petstore/kotlin-jvm-okhttp4-coroutines/src/main/kotlin/org/openapitools/client/infrastructure/Serializer.kt +++ b/samples/client/petstore/kotlin-jvm-okhttp4-coroutines/src/main/kotlin/org/openapitools/client/infrastructure/Serializer.kt @@ -14,7 +14,7 @@ object Serializer { .registerTypeAdapter(LocalDateTime::class.java, LocalDateTimeAdapter()) .registerTypeAdapter(LocalDate::class.java, LocalDateAdapter()) .registerTypeAdapter(ByteArray::class.java, ByteArrayAdapter()) - + @JvmStatic val gson: Gson by lazy { gsonBuilder.create() diff --git a/samples/client/petstore/kotlin-multiplatform/src/commonMain/kotlin/org/openapitools/client/infrastructure/Bytes.kt b/samples/client/petstore/kotlin-multiplatform/src/commonMain/kotlin/org/openapitools/client/infrastructure/Bytes.kt index b8f12a0852988ec3eb87af99c73765c06a73ac88..7d30ce18fcf1ab6698589a7ac7debbf7705796db 100644 --- a/samples/client/petstore/kotlin-multiplatform/src/commonMain/kotlin/org/openapitools/client/infrastructure/Bytes.kt +++ b/samples/client/petstore/kotlin-multiplatform/src/commonMain/kotlin/org/openapitools/client/infrastructure/Bytes.kt @@ -98,5 +98,3 @@ private fun ByteReadPacket.decodeBase64Bytes(): Input = buildPacket { } } } - - diff --git a/samples/client/petstore/kotlin-retrofit2-kotlinx_serialization/src/main/kotlin/org/openapitools/client/apis/PetApi.kt b/samples/client/petstore/kotlin-retrofit2-kotlinx_serialization/src/main/kotlin/org/openapitools/client/apis/PetApi.kt index d30336f02e9e9faf692e05d4969f73874d3baa06..1af051c6c7fd09464df3c35b4b3607c6149091a3 100644 --- a/samples/client/petstore/kotlin-retrofit2-kotlinx_serialization/src/main/kotlin/org/openapitools/client/apis/PetApi.kt +++ b/samples/client/petstore/kotlin-retrofit2-kotlinx_serialization/src/main/kotlin/org/openapitools/client/apis/PetApi.kt @@ -16,7 +16,7 @@ interface PetApi { * * Responses: * - 405: Invalid input - * + * * @param body Pet object that needs to be added to the store * @return [Call]<[Unit]> */ @@ -28,7 +28,7 @@ interface PetApi { * * Responses: * - 400: Invalid pet value - * + * * @param petId Pet id to delete * @param apiKey (optional) * @return [Call]<[Unit]> @@ -42,7 +42,7 @@ interface PetApi { * Responses: * - 200: successful operation * - 400: Invalid status value - * + * * @param status Status values that need to be considered for filter * @return [Call]<[kotlin.collections.List<Pet>]> */ @@ -55,7 +55,7 @@ interface PetApi { * Responses: * - 200: successful operation * - 400: Invalid tag value - * + * * @param tags Tags to filter by * @return [Call]<[kotlin.collections.List<Pet>]> */ @@ -70,7 +70,7 @@ interface PetApi { * - 200: successful operation * - 400: Invalid ID supplied * - 404: Pet not found - * + * * @param petId ID of pet to return * @return [Call]<[Pet]> */ @@ -84,7 +84,7 @@ interface PetApi { * - 400: Invalid ID supplied * - 404: Pet not found * - 405: Validation exception - * + * * @param body Pet object that needs to be added to the store * @return [Call]<[Unit]> */ @@ -96,7 +96,7 @@ interface PetApi { * * Responses: * - 405: Invalid input - * + * * @param petId ID of pet that needs to be updated * @param name Updated name of the pet (optional) * @param status Updated status of the pet (optional) @@ -111,7 +111,7 @@ interface PetApi { * * Responses: * - 200: successful operation - * + * * @param petId ID of pet to update * @param additionalMetadata Additional data to pass to server (optional) * @param file file to upload (optional) diff --git a/samples/client/petstore/kotlin-retrofit2-kotlinx_serialization/src/main/kotlin/org/openapitools/client/apis/StoreApi.kt b/samples/client/petstore/kotlin-retrofit2-kotlinx_serialization/src/main/kotlin/org/openapitools/client/apis/StoreApi.kt index be05f2bb6968d043c1f838c43ce9f5587ec88e74..fafaee31d9154afe41168c0e3bcd2e259f378238 100644 --- a/samples/client/petstore/kotlin-retrofit2-kotlinx_serialization/src/main/kotlin/org/openapitools/client/apis/StoreApi.kt +++ b/samples/client/petstore/kotlin-retrofit2-kotlinx_serialization/src/main/kotlin/org/openapitools/client/apis/StoreApi.kt @@ -14,7 +14,7 @@ interface StoreApi { * Responses: * - 400: Invalid ID supplied * - 404: Order not found - * + * * @param orderId ID of the order that needs to be deleted * @return [Call]<[Unit]> */ @@ -26,7 +26,7 @@ interface StoreApi { * Returns a map of status codes to quantities * Responses: * - 200: successful operation - * + * * @return [Call]<[kotlin.collections.Map<kotlin.String, kotlin.Int>]> */ @GET("store/inventory") @@ -39,7 +39,7 @@ interface StoreApi { * - 200: successful operation * - 400: Invalid ID supplied * - 404: Order not found - * + * * @param orderId ID of pet that needs to be fetched * @return [Call]<[Order]> */ @@ -52,7 +52,7 @@ interface StoreApi { * Responses: * - 200: successful operation * - 400: Invalid Order - * + * * @param body order placed for purchasing the pet * @return [Call]<[Order]> */ diff --git a/samples/client/petstore/kotlin-retrofit2-kotlinx_serialization/src/main/kotlin/org/openapitools/client/apis/UserApi.kt b/samples/client/petstore/kotlin-retrofit2-kotlinx_serialization/src/main/kotlin/org/openapitools/client/apis/UserApi.kt index 66c1e7fbd2646d112c2d6ecf58a19c3c977ad7be..e583e79039fd1267d546ee0906edc1078f983484 100644 --- a/samples/client/petstore/kotlin-retrofit2-kotlinx_serialization/src/main/kotlin/org/openapitools/client/apis/UserApi.kt +++ b/samples/client/petstore/kotlin-retrofit2-kotlinx_serialization/src/main/kotlin/org/openapitools/client/apis/UserApi.kt @@ -13,7 +13,7 @@ interface UserApi { * This can only be done by the logged in user. * Responses: * - 0: successful operation - * + * * @param body Created user object * @return [Call]<[Unit]> */ @@ -25,7 +25,7 @@ interface UserApi { * * Responses: * - 0: successful operation - * + * * @param body List of user object * @return [Call]<[Unit]> */ @@ -37,7 +37,7 @@ interface UserApi { * * Responses: * - 0: successful operation - * + * * @param body List of user object * @return [Call]<[Unit]> */ @@ -50,7 +50,7 @@ interface UserApi { * Responses: * - 400: Invalid username supplied * - 404: User not found - * + * * @param username The name that needs to be deleted * @return [Call]<[Unit]> */ @@ -64,7 +64,7 @@ interface UserApi { * - 200: successful operation * - 400: Invalid username supplied * - 404: User not found - * + * * @param username The name that needs to be fetched. Use user1 for testing. * @return [Call]<[User]> */ @@ -77,7 +77,7 @@ interface UserApi { * Responses: * - 200: successful operation * - 400: Invalid username/password supplied - * + * * @param username The user name for login * @param password The password for login in clear text * @return [Call]<[kotlin.String]> @@ -90,7 +90,7 @@ interface UserApi { * * Responses: * - 0: successful operation - * + * * @return [Call]<[Unit]> */ @GET("user/logout") @@ -102,7 +102,7 @@ interface UserApi { * Responses: * - 400: Invalid user supplied * - 404: User not found - * + * * @param username name that need to be deleted * @param body Updated user object * @return [Call]<[Unit]> diff --git a/samples/client/petstore/kotlin-retrofit2-kotlinx_serialization/src/main/kotlin/org/openapitools/client/auth/ApiKeyAuth.kt b/samples/client/petstore/kotlin-retrofit2-kotlinx_serialization/src/main/kotlin/org/openapitools/client/auth/ApiKeyAuth.kt index 524d5190ef8871a8338dc968d55359407548b2b9..ddb369be5f8f87d8e1ccc2d5342d8e3775707e00 100644 --- a/samples/client/petstore/kotlin-retrofit2-kotlinx_serialization/src/main/kotlin/org/openapitools/client/auth/ApiKeyAuth.kt +++ b/samples/client/petstore/kotlin-retrofit2-kotlinx_serialization/src/main/kotlin/org/openapitools/client/auth/ApiKeyAuth.kt @@ -12,7 +12,7 @@ class ApiKeyAuth( private val paramName: String = "", private var apiKey: String = "" ) : Interceptor { - + @Throws(IOException::class) override fun intercept(chain: Interceptor.Chain): Response { var request = chain.request() diff --git a/samples/client/petstore/kotlin-retrofit2-kotlinx_serialization/src/main/kotlin/org/openapitools/client/auth/OAuth.kt b/samples/client/petstore/kotlin-retrofit2-kotlinx_serialization/src/main/kotlin/org/openapitools/client/auth/OAuth.kt index 311a8f4397948f55baf8a25cc8ca758b51303019..cb6c411e348307614029e478eb89fb427f1d5ddc 100644 --- a/samples/client/petstore/kotlin-retrofit2-kotlinx_serialization/src/main/kotlin/org/openapitools/client/auth/OAuth.kt +++ b/samples/client/petstore/kotlin-retrofit2-kotlinx_serialization/src/main/kotlin/org/openapitools/client/auth/OAuth.kt @@ -30,7 +30,7 @@ class OAuth( private var oauthClient: OAuthClient = OAuthClient(OAuthOkHttpClient(client)) - @Volatile + @Volatile private var accessToken: String? = null var authenticationRequestBuilder: AuthenticationRequestBuilder? = null private var accessTokenListener: AccessTokenListener? = null @@ -38,14 +38,14 @@ class OAuth( constructor( requestBuilder: TokenRequestBuilder ) : this( - OkHttpClient(), + OkHttpClient(), requestBuilder ) constructor( - flow: OAuthFlow, - authorizationUrl: String, - tokenUrl: String, + flow: OAuthFlow, + authorizationUrl: String, + tokenUrl: String, scopes: String ) : this( OAuthClientRequest.tokenLocation(tokenUrl).setScope(scopes) @@ -62,7 +62,7 @@ class OAuth( tokenRequestBuilder.setGrantType(GrantType.PASSWORD) OAuthFlow.application -> tokenRequestBuilder.setGrantType(GrantType.CLIENT_CREDENTIALS) - } + } } @Throws(IOException::class) @@ -128,9 +128,9 @@ class OAuth( * Returns true if the access token has been updated */ @Throws(IOException::class) - @Synchronized + @Synchronized fun updateAccessToken(requestAccessToken: String?): Boolean { - if (accessToken == null || accessToken.equals(requestAccessToken)) { + if (accessToken == null || accessToken.equals(requestAccessToken)) { return try { val accessTokenResponse = oauthClient.accessToken(this.tokenRequestBuilder.buildBodyMessage()) if (accessTokenResponse != null && accessTokenResponse.accessToken != null) { diff --git a/samples/client/petstore/kotlin-retrofit2-kotlinx_serialization/src/main/kotlin/org/openapitools/client/auth/OAuthOkHttpClient.kt b/samples/client/petstore/kotlin-retrofit2-kotlinx_serialization/src/main/kotlin/org/openapitools/client/auth/OAuthOkHttpClient.kt index aa70ca9d2f184058187e629848f13f25ce1f6a3b..6680059d05365482a2fd2ef144bb667b7f8a3167 100644 --- a/samples/client/petstore/kotlin-retrofit2-kotlinx_serialization/src/main/kotlin/org/openapitools/client/auth/OAuthOkHttpClient.kt +++ b/samples/client/petstore/kotlin-retrofit2-kotlinx_serialization/src/main/kotlin/org/openapitools/client/auth/OAuthOkHttpClient.kt @@ -22,9 +22,9 @@ class OAuthOkHttpClient( @Throws(OAuthSystemException::class, OAuthProblemException::class) override fun <T : OAuthClientResponse?> execute( - request: OAuthClientRequest, + request: OAuthClientRequest, headers: Map<String, String>?, - requestMethod: String, + requestMethod: String, responseClass: Class<T>?): T { var mediaType = "application/json".toMediaTypeOrNull() @@ -44,7 +44,7 @@ class OAuthOkHttpClient( try { val response = client.newCall(requestBuilder.build()).execute() return OAuthClientResponseFactory.createCustomResponse( - response.body?.string(), + response.body?.string(), response.body?.contentType()?.toString(), response.code, response.headers.toMultimap(), diff --git a/samples/client/petstore/kotlin-retrofit2-rx3/src/main/kotlin/org/openapitools/client/apis/PetApi.kt b/samples/client/petstore/kotlin-retrofit2-rx3/src/main/kotlin/org/openapitools/client/apis/PetApi.kt index d90c3c85f92adce560240082c938bb2d8bb4f1a4..8f04b3fd8f9c0db9fc2afe898856994fe3ac7764 100644 --- a/samples/client/petstore/kotlin-retrofit2-rx3/src/main/kotlin/org/openapitools/client/apis/PetApi.kt +++ b/samples/client/petstore/kotlin-retrofit2-rx3/src/main/kotlin/org/openapitools/client/apis/PetApi.kt @@ -17,7 +17,7 @@ interface PetApi { * * Responses: * - 405: Invalid input - * + * * @param body Pet object that needs to be added to the store * @return [Call]<[Unit]> */ @@ -29,7 +29,7 @@ interface PetApi { * * Responses: * - 400: Invalid pet value - * + * * @param petId Pet id to delete * @param apiKey (optional) * @return [Call]<[Unit]> @@ -43,7 +43,7 @@ interface PetApi { * Responses: * - 200: successful operation * - 400: Invalid status value - * + * * @param status Status values that need to be considered for filter * @return [Call]<[kotlin.collections.List<Pet>]> */ @@ -56,7 +56,7 @@ interface PetApi { * Responses: * - 200: successful operation * - 400: Invalid tag value - * + * * @param tags Tags to filter by * @return [Call]<[kotlin.collections.List<Pet>]> */ @@ -71,7 +71,7 @@ interface PetApi { * - 200: successful operation * - 400: Invalid ID supplied * - 404: Pet not found - * + * * @param petId ID of pet to return * @return [Call]<[Pet]> */ @@ -85,7 +85,7 @@ interface PetApi { * - 400: Invalid ID supplied * - 404: Pet not found * - 405: Validation exception - * + * * @param body Pet object that needs to be added to the store * @return [Call]<[Unit]> */ @@ -97,7 +97,7 @@ interface PetApi { * * Responses: * - 405: Invalid input - * + * * @param petId ID of pet that needs to be updated * @param name Updated name of the pet (optional) * @param status Updated status of the pet (optional) @@ -112,7 +112,7 @@ interface PetApi { * * Responses: * - 200: successful operation - * + * * @param petId ID of pet to update * @param additionalMetadata Additional data to pass to server (optional) * @param file file to upload (optional) diff --git a/samples/client/petstore/kotlin-retrofit2-rx3/src/main/kotlin/org/openapitools/client/apis/StoreApi.kt b/samples/client/petstore/kotlin-retrofit2-rx3/src/main/kotlin/org/openapitools/client/apis/StoreApi.kt index 11acb2eb8b700f34f20e1d9584fb5e594da6664a..a7477057560fc0f42f575747928b0679b9da3aef 100644 --- a/samples/client/petstore/kotlin-retrofit2-rx3/src/main/kotlin/org/openapitools/client/apis/StoreApi.kt +++ b/samples/client/petstore/kotlin-retrofit2-rx3/src/main/kotlin/org/openapitools/client/apis/StoreApi.kt @@ -15,7 +15,7 @@ interface StoreApi { * Responses: * - 400: Invalid ID supplied * - 404: Order not found - * + * * @param orderId ID of the order that needs to be deleted * @return [Call]<[Unit]> */ @@ -27,7 +27,7 @@ interface StoreApi { * Returns a map of status codes to quantities * Responses: * - 200: successful operation - * + * * @return [Call]<[kotlin.collections.Map<kotlin.String, kotlin.Int>]> */ @GET("store/inventory") @@ -40,7 +40,7 @@ interface StoreApi { * - 200: successful operation * - 400: Invalid ID supplied * - 404: Order not found - * + * * @param orderId ID of pet that needs to be fetched * @return [Call]<[Order]> */ @@ -53,7 +53,7 @@ interface StoreApi { * Responses: * - 200: successful operation * - 400: Invalid Order - * + * * @param body order placed for purchasing the pet * @return [Call]<[Order]> */ diff --git a/samples/client/petstore/kotlin-retrofit2-rx3/src/main/kotlin/org/openapitools/client/apis/UserApi.kt b/samples/client/petstore/kotlin-retrofit2-rx3/src/main/kotlin/org/openapitools/client/apis/UserApi.kt index d6fad78e88f3962f71c54a4e89ffe193ff1a3022..3a762879cd7f33136a1a417a7b8ad34a78b7e0b5 100644 --- a/samples/client/petstore/kotlin-retrofit2-rx3/src/main/kotlin/org/openapitools/client/apis/UserApi.kt +++ b/samples/client/petstore/kotlin-retrofit2-rx3/src/main/kotlin/org/openapitools/client/apis/UserApi.kt @@ -14,7 +14,7 @@ interface UserApi { * This can only be done by the logged in user. * Responses: * - 0: successful operation - * + * * @param body Created user object * @return [Call]<[Unit]> */ @@ -26,7 +26,7 @@ interface UserApi { * * Responses: * - 0: successful operation - * + * * @param body List of user object * @return [Call]<[Unit]> */ @@ -38,7 +38,7 @@ interface UserApi { * * Responses: * - 0: successful operation - * + * * @param body List of user object * @return [Call]<[Unit]> */ @@ -51,7 +51,7 @@ interface UserApi { * Responses: * - 400: Invalid username supplied * - 404: User not found - * + * * @param username The name that needs to be deleted * @return [Call]<[Unit]> */ @@ -65,7 +65,7 @@ interface UserApi { * - 200: successful operation * - 400: Invalid username supplied * - 404: User not found - * + * * @param username The name that needs to be fetched. Use user1 for testing. * @return [Call]<[User]> */ @@ -78,7 +78,7 @@ interface UserApi { * Responses: * - 200: successful operation * - 400: Invalid username/password supplied - * + * * @param username The user name for login * @param password The password for login in clear text * @return [Call]<[kotlin.String]> @@ -91,7 +91,7 @@ interface UserApi { * * Responses: * - 0: successful operation - * + * * @return [Call]<[Unit]> */ @GET("user/logout") @@ -103,7 +103,7 @@ interface UserApi { * Responses: * - 400: Invalid user supplied * - 404: User not found - * + * * @param username name that need to be deleted * @param body Updated user object * @return [Call]<[Unit]> diff --git a/samples/client/petstore/kotlin-retrofit2-rx3/src/main/kotlin/org/openapitools/client/auth/ApiKeyAuth.kt b/samples/client/petstore/kotlin-retrofit2-rx3/src/main/kotlin/org/openapitools/client/auth/ApiKeyAuth.kt index 524d5190ef8871a8338dc968d55359407548b2b9..ddb369be5f8f87d8e1ccc2d5342d8e3775707e00 100644 --- a/samples/client/petstore/kotlin-retrofit2-rx3/src/main/kotlin/org/openapitools/client/auth/ApiKeyAuth.kt +++ b/samples/client/petstore/kotlin-retrofit2-rx3/src/main/kotlin/org/openapitools/client/auth/ApiKeyAuth.kt @@ -12,7 +12,7 @@ class ApiKeyAuth( private val paramName: String = "", private var apiKey: String = "" ) : Interceptor { - + @Throws(IOException::class) override fun intercept(chain: Interceptor.Chain): Response { var request = chain.request() diff --git a/samples/client/petstore/kotlin-retrofit2-rx3/src/main/kotlin/org/openapitools/client/auth/OAuth.kt b/samples/client/petstore/kotlin-retrofit2-rx3/src/main/kotlin/org/openapitools/client/auth/OAuth.kt index 311a8f4397948f55baf8a25cc8ca758b51303019..cb6c411e348307614029e478eb89fb427f1d5ddc 100644 --- a/samples/client/petstore/kotlin-retrofit2-rx3/src/main/kotlin/org/openapitools/client/auth/OAuth.kt +++ b/samples/client/petstore/kotlin-retrofit2-rx3/src/main/kotlin/org/openapitools/client/auth/OAuth.kt @@ -30,7 +30,7 @@ class OAuth( private var oauthClient: OAuthClient = OAuthClient(OAuthOkHttpClient(client)) - @Volatile + @Volatile private var accessToken: String? = null var authenticationRequestBuilder: AuthenticationRequestBuilder? = null private var accessTokenListener: AccessTokenListener? = null @@ -38,14 +38,14 @@ class OAuth( constructor( requestBuilder: TokenRequestBuilder ) : this( - OkHttpClient(), + OkHttpClient(), requestBuilder ) constructor( - flow: OAuthFlow, - authorizationUrl: String, - tokenUrl: String, + flow: OAuthFlow, + authorizationUrl: String, + tokenUrl: String, scopes: String ) : this( OAuthClientRequest.tokenLocation(tokenUrl).setScope(scopes) @@ -62,7 +62,7 @@ class OAuth( tokenRequestBuilder.setGrantType(GrantType.PASSWORD) OAuthFlow.application -> tokenRequestBuilder.setGrantType(GrantType.CLIENT_CREDENTIALS) - } + } } @Throws(IOException::class) @@ -128,9 +128,9 @@ class OAuth( * Returns true if the access token has been updated */ @Throws(IOException::class) - @Synchronized + @Synchronized fun updateAccessToken(requestAccessToken: String?): Boolean { - if (accessToken == null || accessToken.equals(requestAccessToken)) { + if (accessToken == null || accessToken.equals(requestAccessToken)) { return try { val accessTokenResponse = oauthClient.accessToken(this.tokenRequestBuilder.buildBodyMessage()) if (accessTokenResponse != null && accessTokenResponse.accessToken != null) { diff --git a/samples/client/petstore/kotlin-retrofit2-rx3/src/main/kotlin/org/openapitools/client/auth/OAuthOkHttpClient.kt b/samples/client/petstore/kotlin-retrofit2-rx3/src/main/kotlin/org/openapitools/client/auth/OAuthOkHttpClient.kt index aa70ca9d2f184058187e629848f13f25ce1f6a3b..6680059d05365482a2fd2ef144bb667b7f8a3167 100644 --- a/samples/client/petstore/kotlin-retrofit2-rx3/src/main/kotlin/org/openapitools/client/auth/OAuthOkHttpClient.kt +++ b/samples/client/petstore/kotlin-retrofit2-rx3/src/main/kotlin/org/openapitools/client/auth/OAuthOkHttpClient.kt @@ -22,9 +22,9 @@ class OAuthOkHttpClient( @Throws(OAuthSystemException::class, OAuthProblemException::class) override fun <T : OAuthClientResponse?> execute( - request: OAuthClientRequest, + request: OAuthClientRequest, headers: Map<String, String>?, - requestMethod: String, + requestMethod: String, responseClass: Class<T>?): T { var mediaType = "application/json".toMediaTypeOrNull() @@ -44,7 +44,7 @@ class OAuthOkHttpClient( try { val response = client.newCall(requestBuilder.build()).execute() return OAuthClientResponseFactory.createCustomResponse( - response.body?.string(), + response.body?.string(), response.body?.contentType()?.toString(), response.code, response.headers.toMultimap(), diff --git a/samples/client/petstore/kotlin-retrofit2/src/main/kotlin/org/openapitools/client/apis/PetApi.kt b/samples/client/petstore/kotlin-retrofit2/src/main/kotlin/org/openapitools/client/apis/PetApi.kt index d30336f02e9e9faf692e05d4969f73874d3baa06..1af051c6c7fd09464df3c35b4b3607c6149091a3 100644 --- a/samples/client/petstore/kotlin-retrofit2/src/main/kotlin/org/openapitools/client/apis/PetApi.kt +++ b/samples/client/petstore/kotlin-retrofit2/src/main/kotlin/org/openapitools/client/apis/PetApi.kt @@ -16,7 +16,7 @@ interface PetApi { * * Responses: * - 405: Invalid input - * + * * @param body Pet object that needs to be added to the store * @return [Call]<[Unit]> */ @@ -28,7 +28,7 @@ interface PetApi { * * Responses: * - 400: Invalid pet value - * + * * @param petId Pet id to delete * @param apiKey (optional) * @return [Call]<[Unit]> @@ -42,7 +42,7 @@ interface PetApi { * Responses: * - 200: successful operation * - 400: Invalid status value - * + * * @param status Status values that need to be considered for filter * @return [Call]<[kotlin.collections.List<Pet>]> */ @@ -55,7 +55,7 @@ interface PetApi { * Responses: * - 200: successful operation * - 400: Invalid tag value - * + * * @param tags Tags to filter by * @return [Call]<[kotlin.collections.List<Pet>]> */ @@ -70,7 +70,7 @@ interface PetApi { * - 200: successful operation * - 400: Invalid ID supplied * - 404: Pet not found - * + * * @param petId ID of pet to return * @return [Call]<[Pet]> */ @@ -84,7 +84,7 @@ interface PetApi { * - 400: Invalid ID supplied * - 404: Pet not found * - 405: Validation exception - * + * * @param body Pet object that needs to be added to the store * @return [Call]<[Unit]> */ @@ -96,7 +96,7 @@ interface PetApi { * * Responses: * - 405: Invalid input - * + * * @param petId ID of pet that needs to be updated * @param name Updated name of the pet (optional) * @param status Updated status of the pet (optional) @@ -111,7 +111,7 @@ interface PetApi { * * Responses: * - 200: successful operation - * + * * @param petId ID of pet to update * @param additionalMetadata Additional data to pass to server (optional) * @param file file to upload (optional) diff --git a/samples/client/petstore/kotlin-retrofit2/src/main/kotlin/org/openapitools/client/apis/StoreApi.kt b/samples/client/petstore/kotlin-retrofit2/src/main/kotlin/org/openapitools/client/apis/StoreApi.kt index be05f2bb6968d043c1f838c43ce9f5587ec88e74..fafaee31d9154afe41168c0e3bcd2e259f378238 100644 --- a/samples/client/petstore/kotlin-retrofit2/src/main/kotlin/org/openapitools/client/apis/StoreApi.kt +++ b/samples/client/petstore/kotlin-retrofit2/src/main/kotlin/org/openapitools/client/apis/StoreApi.kt @@ -14,7 +14,7 @@ interface StoreApi { * Responses: * - 400: Invalid ID supplied * - 404: Order not found - * + * * @param orderId ID of the order that needs to be deleted * @return [Call]<[Unit]> */ @@ -26,7 +26,7 @@ interface StoreApi { * Returns a map of status codes to quantities * Responses: * - 200: successful operation - * + * * @return [Call]<[kotlin.collections.Map<kotlin.String, kotlin.Int>]> */ @GET("store/inventory") @@ -39,7 +39,7 @@ interface StoreApi { * - 200: successful operation * - 400: Invalid ID supplied * - 404: Order not found - * + * * @param orderId ID of pet that needs to be fetched * @return [Call]<[Order]> */ @@ -52,7 +52,7 @@ interface StoreApi { * Responses: * - 200: successful operation * - 400: Invalid Order - * + * * @param body order placed for purchasing the pet * @return [Call]<[Order]> */ diff --git a/samples/client/petstore/kotlin-retrofit2/src/main/kotlin/org/openapitools/client/apis/UserApi.kt b/samples/client/petstore/kotlin-retrofit2/src/main/kotlin/org/openapitools/client/apis/UserApi.kt index 66c1e7fbd2646d112c2d6ecf58a19c3c977ad7be..e583e79039fd1267d546ee0906edc1078f983484 100644 --- a/samples/client/petstore/kotlin-retrofit2/src/main/kotlin/org/openapitools/client/apis/UserApi.kt +++ b/samples/client/petstore/kotlin-retrofit2/src/main/kotlin/org/openapitools/client/apis/UserApi.kt @@ -13,7 +13,7 @@ interface UserApi { * This can only be done by the logged in user. * Responses: * - 0: successful operation - * + * * @param body Created user object * @return [Call]<[Unit]> */ @@ -25,7 +25,7 @@ interface UserApi { * * Responses: * - 0: successful operation - * + * * @param body List of user object * @return [Call]<[Unit]> */ @@ -37,7 +37,7 @@ interface UserApi { * * Responses: * - 0: successful operation - * + * * @param body List of user object * @return [Call]<[Unit]> */ @@ -50,7 +50,7 @@ interface UserApi { * Responses: * - 400: Invalid username supplied * - 404: User not found - * + * * @param username The name that needs to be deleted * @return [Call]<[Unit]> */ @@ -64,7 +64,7 @@ interface UserApi { * - 200: successful operation * - 400: Invalid username supplied * - 404: User not found - * + * * @param username The name that needs to be fetched. Use user1 for testing. * @return [Call]<[User]> */ @@ -77,7 +77,7 @@ interface UserApi { * Responses: * - 200: successful operation * - 400: Invalid username/password supplied - * + * * @param username The user name for login * @param password The password for login in clear text * @return [Call]<[kotlin.String]> @@ -90,7 +90,7 @@ interface UserApi { * * Responses: * - 0: successful operation - * + * * @return [Call]<[Unit]> */ @GET("user/logout") @@ -102,7 +102,7 @@ interface UserApi { * Responses: * - 400: Invalid user supplied * - 404: User not found - * + * * @param username name that need to be deleted * @param body Updated user object * @return [Call]<[Unit]> diff --git a/samples/client/petstore/kotlin-retrofit2/src/main/kotlin/org/openapitools/client/auth/ApiKeyAuth.kt b/samples/client/petstore/kotlin-retrofit2/src/main/kotlin/org/openapitools/client/auth/ApiKeyAuth.kt index 524d5190ef8871a8338dc968d55359407548b2b9..ddb369be5f8f87d8e1ccc2d5342d8e3775707e00 100644 --- a/samples/client/petstore/kotlin-retrofit2/src/main/kotlin/org/openapitools/client/auth/ApiKeyAuth.kt +++ b/samples/client/petstore/kotlin-retrofit2/src/main/kotlin/org/openapitools/client/auth/ApiKeyAuth.kt @@ -12,7 +12,7 @@ class ApiKeyAuth( private val paramName: String = "", private var apiKey: String = "" ) : Interceptor { - + @Throws(IOException::class) override fun intercept(chain: Interceptor.Chain): Response { var request = chain.request() diff --git a/samples/client/petstore/kotlin-retrofit2/src/main/kotlin/org/openapitools/client/auth/OAuth.kt b/samples/client/petstore/kotlin-retrofit2/src/main/kotlin/org/openapitools/client/auth/OAuth.kt index 311a8f4397948f55baf8a25cc8ca758b51303019..cb6c411e348307614029e478eb89fb427f1d5ddc 100644 --- a/samples/client/petstore/kotlin-retrofit2/src/main/kotlin/org/openapitools/client/auth/OAuth.kt +++ b/samples/client/petstore/kotlin-retrofit2/src/main/kotlin/org/openapitools/client/auth/OAuth.kt @@ -30,7 +30,7 @@ class OAuth( private var oauthClient: OAuthClient = OAuthClient(OAuthOkHttpClient(client)) - @Volatile + @Volatile private var accessToken: String? = null var authenticationRequestBuilder: AuthenticationRequestBuilder? = null private var accessTokenListener: AccessTokenListener? = null @@ -38,14 +38,14 @@ class OAuth( constructor( requestBuilder: TokenRequestBuilder ) : this( - OkHttpClient(), + OkHttpClient(), requestBuilder ) constructor( - flow: OAuthFlow, - authorizationUrl: String, - tokenUrl: String, + flow: OAuthFlow, + authorizationUrl: String, + tokenUrl: String, scopes: String ) : this( OAuthClientRequest.tokenLocation(tokenUrl).setScope(scopes) @@ -62,7 +62,7 @@ class OAuth( tokenRequestBuilder.setGrantType(GrantType.PASSWORD) OAuthFlow.application -> tokenRequestBuilder.setGrantType(GrantType.CLIENT_CREDENTIALS) - } + } } @Throws(IOException::class) @@ -128,9 +128,9 @@ class OAuth( * Returns true if the access token has been updated */ @Throws(IOException::class) - @Synchronized + @Synchronized fun updateAccessToken(requestAccessToken: String?): Boolean { - if (accessToken == null || accessToken.equals(requestAccessToken)) { + if (accessToken == null || accessToken.equals(requestAccessToken)) { return try { val accessTokenResponse = oauthClient.accessToken(this.tokenRequestBuilder.buildBodyMessage()) if (accessTokenResponse != null && accessTokenResponse.accessToken != null) { diff --git a/samples/client/petstore/kotlin-retrofit2/src/main/kotlin/org/openapitools/client/auth/OAuthOkHttpClient.kt b/samples/client/petstore/kotlin-retrofit2/src/main/kotlin/org/openapitools/client/auth/OAuthOkHttpClient.kt index aa70ca9d2f184058187e629848f13f25ce1f6a3b..6680059d05365482a2fd2ef144bb667b7f8a3167 100644 --- a/samples/client/petstore/kotlin-retrofit2/src/main/kotlin/org/openapitools/client/auth/OAuthOkHttpClient.kt +++ b/samples/client/petstore/kotlin-retrofit2/src/main/kotlin/org/openapitools/client/auth/OAuthOkHttpClient.kt @@ -22,9 +22,9 @@ class OAuthOkHttpClient( @Throws(OAuthSystemException::class, OAuthProblemException::class) override fun <T : OAuthClientResponse?> execute( - request: OAuthClientRequest, + request: OAuthClientRequest, headers: Map<String, String>?, - requestMethod: String, + requestMethod: String, responseClass: Class<T>?): T { var mediaType = "application/json".toMediaTypeOrNull() @@ -44,7 +44,7 @@ class OAuthOkHttpClient( try { val response = client.newCall(requestBuilder.build()).execute() return OAuthClientResponseFactory.createCustomResponse( - response.body?.string(), + response.body?.string(), response.body?.contentType()?.toString(), response.code, response.headers.toMultimap(), diff --git a/samples/client/petstore/lua/git_push.sh b/samples/client/petstore/lua/git_push.sh index ced3be2b0c7b2349ff06d18da19d4b31435c9fa6..9405f72e950cdb8ca24c3cf4d15cee7eac62fde7 100644 --- a/samples/client/petstore/lua/git_push.sh +++ b/samples/client/petstore/lua/git_push.sh @@ -55,4 +55,3 @@ 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/lua/petstore/api/pet_api.lua b/samples/client/petstore/lua/petstore/api/pet_api.lua index 02e0392c3e2631e443dbefc3b4e652eca9c7637e..f3385f1c4ca9fbf08c459262a17b3067bae02eca 100644 --- a/samples/client/petstore/lua/petstore/api/pet_api.lua +++ b/samples/client/petstore/lua/petstore/api/pet_api.lua @@ -1,8 +1,8 @@ --[[ 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. - + The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech diff --git a/samples/client/petstore/lua/petstore/api/store_api.lua b/samples/client/petstore/lua/petstore/api/store_api.lua index d50456ffffd6f530eed160d9f0be84415781bca5..aa2433d3befe9ab5342b01744c3d5e63a20fb33b 100644 --- a/samples/client/petstore/lua/petstore/api/store_api.lua +++ b/samples/client/petstore/lua/petstore/api/store_api.lua @@ -1,8 +1,8 @@ --[[ 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. - + The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech diff --git a/samples/client/petstore/lua/petstore/api/user_api.lua b/samples/client/petstore/lua/petstore/api/user_api.lua index 57ecdce822b06b28a613d175d28d71fefe5cec0f..ab6585ea375f0bf2de3f9300db407c3d33938b14 100644 --- a/samples/client/petstore/lua/petstore/api/user_api.lua +++ b/samples/client/petstore/lua/petstore/api/user_api.lua @@ -1,8 +1,8 @@ --[[ 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. - + The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech diff --git a/samples/client/petstore/lua/petstore/model/api_response.lua b/samples/client/petstore/lua/petstore/model/api_response.lua index 9531219b71b0e717859b20e284f4ef3541d87b6c..a35211a807ef266e585c40873ae883f4f515feb4 100644 --- a/samples/client/petstore/lua/petstore/model/api_response.lua +++ b/samples/client/petstore/lua/petstore/model/api_response.lua @@ -1,8 +1,8 @@ --[[ 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. - + The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech diff --git a/samples/client/petstore/lua/petstore/model/category.lua b/samples/client/petstore/lua/petstore/model/category.lua index fd15b89da0e6861dd9f09ea2cd20c8b0f825ac57..95e1d3d4501756cffde3561afddc8a8c4c84f46d 100644 --- a/samples/client/petstore/lua/petstore/model/category.lua +++ b/samples/client/petstore/lua/petstore/model/category.lua @@ -1,8 +1,8 @@ --[[ 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. - + The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech diff --git a/samples/client/petstore/lua/petstore/model/order.lua b/samples/client/petstore/lua/petstore/model/order.lua index 48a691b72d7056c8a62d56c89f407447cef298a5..207f154926ed41c58e10c7a051047c579ece1b88 100644 --- a/samples/client/petstore/lua/petstore/model/order.lua +++ b/samples/client/petstore/lua/petstore/model/order.lua @@ -1,8 +1,8 @@ --[[ 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. - + The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech diff --git a/samples/client/petstore/lua/petstore/model/pet.lua b/samples/client/petstore/lua/petstore/model/pet.lua index 5f887e32b552d94404e6c47c9e865e2d25e91bc6..41edb1f9a292e5218c26c9f8e032b5ee5f8c29fb 100644 --- a/samples/client/petstore/lua/petstore/model/pet.lua +++ b/samples/client/petstore/lua/petstore/model/pet.lua @@ -1,8 +1,8 @@ --[[ 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. - + The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech diff --git a/samples/client/petstore/lua/petstore/model/tag.lua b/samples/client/petstore/lua/petstore/model/tag.lua index 872dfab64bc75665786dc3ca1cb5e7e1003bca7f..046fa31f4bf96050fd4c3ea21b4cfff229fab81d 100644 --- a/samples/client/petstore/lua/petstore/model/tag.lua +++ b/samples/client/petstore/lua/petstore/model/tag.lua @@ -1,8 +1,8 @@ --[[ 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. - + The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech diff --git a/samples/client/petstore/lua/petstore/model/user.lua b/samples/client/petstore/lua/petstore/model/user.lua index 82539d731da6245f54bcbb2847a0673064611e3c..ae0b97969d14e70f2d11e9c3747d9cfeadff14fe 100644 --- a/samples/client/petstore/lua/petstore/model/user.lua +++ b/samples/client/petstore/lua/petstore/model/user.lua @@ -1,8 +1,8 @@ --[[ 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. - + The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech diff --git a/samples/client/petstore/nim/README.md b/samples/client/petstore/nim/README.md index 11a5499e00e02c05fcef8d17c9d68923d2596e98..246b928e6f1f5a8c5629bcd13a0dd53797244e58 100644 --- a/samples/client/petstore/nim/README.md +++ b/samples/client/petstore/nim/README.md @@ -51,4 +51,3 @@ To generate documentation with Nim DocGen, use: ``` nim doc --project --index:on petstore.nim ``` - diff --git a/samples/client/petstore/objc/core-data/.gitignore b/samples/client/petstore/objc/core-data/.gitignore index 79d9331b6d490961ccd07b1e73282d549c7df10b..01103f6f5ef6961daba1092fc853c92c3e4069c6 100644 --- a/samples/client/petstore/objc/core-data/.gitignore +++ b/samples/client/petstore/objc/core-data/.gitignore @@ -44,7 +44,7 @@ Carthage/Build # fastlane # -# It is recommended to not store the screenshots in the git repo. Instead, use fastlane to re-generate the +# 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 diff --git a/samples/client/petstore/objc/core-data/README.md b/samples/client/petstore/objc/core-data/README.md index 10694bd5135b72636b2ab837ef062e3a9e6d5b64..e5367df54d45461a3ec59c160a54cc911873d85b 100644 --- a/samples/client/petstore/objc/core-data/README.md +++ b/samples/client/petstore/objc/core-data/README.md @@ -143,4 +143,3 @@ Class | Method | HTTP request | Description - diff --git a/samples/client/petstore/objc/core-data/SwaggerClient.podspec b/samples/client/petstore/objc/core-data/SwaggerClient.podspec index f4f4390578edec6b58a7cee6cb2eb70546b52580..310ec4844743ef6b1eb2f2dd92673727fc327fc4 100644 --- a/samples/client/petstore/objc/core-data/SwaggerClient.podspec +++ b/samples/client/petstore/objc/core-data/SwaggerClient.podspec @@ -34,4 +34,3 @@ Pod::Spec.new do |s| s.dependency 'JSONModel', '~> 1.2' s.dependency 'ISO8601', '~> 0.6' end - diff --git a/samples/client/petstore/objc/core-data/SwaggerClient/Core/SWGObject.m b/samples/client/petstore/objc/core-data/SwaggerClient/Core/SWGObject.m index 1a90a21d1cc45d56c04e8bdd57ea41f916719a93..f985195d4b129fafa865042b6f64d53677a21572 100644 --- a/samples/client/petstore/objc/core-data/SwaggerClient/Core/SWGObject.m +++ b/samples/client/petstore/objc/core-data/SwaggerClient/Core/SWGObject.m @@ -14,7 +14,7 @@ classNames = [NSMutableSet new]; lock = [NSObject new]; }); - + BOOL initSync; @synchronized(lock) { diff --git a/samples/client/petstore/objc/core-data/SwaggerClient/Core/SWGQueryParamCollection.m b/samples/client/petstore/objc/core-data/SwaggerClient/Core/SWGQueryParamCollection.m index 9aa8a091762d1ffd8983b9fc2ff6c0e36124596c..d65b091f2e3c0beddb908ede3e2e37fe7dcc274f 100644 --- a/samples/client/petstore/objc/core-data/SwaggerClient/Core/SWGQueryParamCollection.m +++ b/samples/client/petstore/objc/core-data/SwaggerClient/Core/SWGQueryParamCollection.m @@ -13,7 +13,7 @@ _values = values; _format = format; } - + return self; } diff --git a/samples/client/petstore/objc/core-data/docs/SWGPetApi.md b/samples/client/petstore/objc/core-data/docs/SWGPetApi.md index e2dde91d7987660131a35632cc3463c5aca3dd11..7d2e7b60795f0d7daf17a157d926f8f19517a60e 100644 --- a/samples/client/petstore/objc/core-data/docs/SWGPetApi.md +++ b/samples/client/petstore/objc/core-data/docs/SWGPetApi.md @@ -22,7 +22,7 @@ Method | HTTP request | Description Add a new pet to the store -### Example +### Example ```objc SWGDefaultConfiguration *apiConfig = [SWGDefaultConfiguration sharedConfig]; @@ -73,7 +73,7 @@ void (empty response body) Deletes a pet -### Example +### Example ```objc SWGDefaultConfiguration *apiConfig = [SWGDefaultConfiguration sharedConfig]; @@ -128,7 +128,7 @@ Finds Pets by status Multiple status values can be provided with comma separated strings -### Example +### Example ```objc SWGDefaultConfiguration *apiConfig = [SWGDefaultConfiguration sharedConfig]; @@ -183,7 +183,7 @@ Finds Pets by tags Multiple tags can be provided with comma separated strings. Use tag1, tag2, tag3 for testing. -### Example +### Example ```objc SWGDefaultConfiguration *apiConfig = [SWGDefaultConfiguration sharedConfig]; @@ -238,7 +238,7 @@ Find pet by ID Returns a pet when ID < 10. ID > 10 or nonintegers will simulate API error conditions -### Example +### Example ```objc SWGDefaultConfiguration *apiConfig = [SWGDefaultConfiguration sharedConfig]; @@ -296,7 +296,7 @@ Name | Type | Description | Notes Update an existing pet -### Example +### Example ```objc SWGDefaultConfiguration *apiConfig = [SWGDefaultConfiguration sharedConfig]; @@ -348,7 +348,7 @@ void (empty response body) Updates a pet in the store with form data -### Example +### Example ```objc SWGDefaultConfiguration *apiConfig = [SWGDefaultConfiguration sharedConfig]; @@ -406,7 +406,7 @@ void (empty response body) uploads an image -### Example +### Example ```objc SWGDefaultConfiguration *apiConfig = [SWGDefaultConfiguration sharedConfig]; diff --git a/samples/client/petstore/objc/core-data/docs/SWGStoreApi.md b/samples/client/petstore/objc/core-data/docs/SWGStoreApi.md index 0aec03add1dcb3b711cbdd226dc2f05a5cb878e4..18b0e1d01ff0d7fcf2480cc273d3651c912096cf 100644 --- a/samples/client/petstore/objc/core-data/docs/SWGStoreApi.md +++ b/samples/client/petstore/objc/core-data/docs/SWGStoreApi.md @@ -20,7 +20,7 @@ Delete purchase order by ID For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors -### Example +### Example ```objc NSString* orderId = @"orderId_example"; // ID of the order that needs to be deleted @@ -67,7 +67,7 @@ Returns pet inventories by status Returns a map of status codes to quantities -### Example +### Example ```objc SWGDefaultConfiguration *apiConfig = [SWGDefaultConfiguration sharedConfig]; @@ -120,7 +120,7 @@ Find purchase order by ID For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions -### Example +### Example ```objc NSString* orderId = @"orderId_example"; // ID of pet that needs to be fetched @@ -168,7 +168,7 @@ No authorization required Place an order for a pet -### Example +### Example ```objc SWGOrder* order = [[SWGOrder alloc] init]; // order placed for purchasing the pet (optional) diff --git a/samples/client/petstore/objc/core-data/docs/SWGUserApi.md b/samples/client/petstore/objc/core-data/docs/SWGUserApi.md index 549a9e0f72cfcdd30e0c923fa3190230ede501e1..bd75635f49f63414a688453f558c22a3b11a6d84 100644 --- a/samples/client/petstore/objc/core-data/docs/SWGUserApi.md +++ b/samples/client/petstore/objc/core-data/docs/SWGUserApi.md @@ -24,7 +24,7 @@ Create user This can only be done by the logged in user. -### Example +### Example ```objc SWGUser* user = [[SWGUser alloc] init]; // Created user object (optional) @@ -69,7 +69,7 @@ No authorization required Creates list of users with given input array -### Example +### Example ```objc NSArray<SWGUser>* user = @[[[SWGUser alloc] init]]; // List of user object (optional) @@ -114,7 +114,7 @@ No authorization required Creates list of users with given input array -### Example +### Example ```objc NSArray<SWGUser>* user = @[[[SWGUser alloc] init]]; // List of user object (optional) @@ -161,7 +161,7 @@ Delete user This can only be done by the logged in user. -### Example +### Example ```objc NSString* username = @"username_example"; // The name that needs to be deleted @@ -206,7 +206,7 @@ No authorization required Get user by user name -### Example +### Example ```objc NSString* username = @"username_example"; // The name that needs to be fetched. Use user1 for testing. @@ -255,7 +255,7 @@ No authorization required Logs user into the system -### Example +### Example ```objc NSString* username = @"username_example"; // The user name for login (optional) @@ -306,7 +306,7 @@ No authorization required Logs out current logged in user session -### Example +### Example ```objc @@ -350,7 +350,7 @@ Updated user This can only be done by the logged in user. -### Example +### Example ```objc NSString* username = @"username_example"; // name that need to be deleted diff --git a/samples/client/petstore/objc/core-data/git_push.sh b/samples/client/petstore/objc/core-data/git_push.sh index ced3be2b0c7b2349ff06d18da19d4b31435c9fa6..9405f72e950cdb8ca24c3cf4d15cee7eac62fde7 100644 --- a/samples/client/petstore/objc/core-data/git_push.sh +++ b/samples/client/petstore/objc/core-data/git_push.sh @@ -55,4 +55,3 @@ 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/objc/default/.gitignore b/samples/client/petstore/objc/default/.gitignore index 79d9331b6d490961ccd07b1e73282d549c7df10b..01103f6f5ef6961daba1092fc853c92c3e4069c6 100644 --- a/samples/client/petstore/objc/default/.gitignore +++ b/samples/client/petstore/objc/default/.gitignore @@ -44,7 +44,7 @@ Carthage/Build # fastlane # -# It is recommended to not store the screenshots in the git repo. Instead, use fastlane to re-generate the +# 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 diff --git a/samples/client/petstore/objc/default/README.md b/samples/client/petstore/objc/default/README.md index 10694bd5135b72636b2ab837ef062e3a9e6d5b64..e5367df54d45461a3ec59c160a54cc911873d85b 100644 --- a/samples/client/petstore/objc/default/README.md +++ b/samples/client/petstore/objc/default/README.md @@ -143,4 +143,3 @@ Class | Method | HTTP request | Description - diff --git a/samples/client/petstore/objc/default/SwaggerClient.podspec b/samples/client/petstore/objc/default/SwaggerClient.podspec index f00eda35f71a61448690256857f8b917698af04e..c58a3f751b16693bb2ab4177c8c3551a2f48b8c1 100644 --- a/samples/client/petstore/objc/default/SwaggerClient.podspec +++ b/samples/client/petstore/objc/default/SwaggerClient.podspec @@ -34,4 +34,3 @@ Pod::Spec.new do |s| s.dependency 'JSONModel', '~> 1.2' s.dependency 'ISO8601', '~> 0.6' end - diff --git a/samples/client/petstore/objc/default/SwaggerClient/Core/SWGObject.m b/samples/client/petstore/objc/default/SwaggerClient/Core/SWGObject.m index 1a90a21d1cc45d56c04e8bdd57ea41f916719a93..f985195d4b129fafa865042b6f64d53677a21572 100644 --- a/samples/client/petstore/objc/default/SwaggerClient/Core/SWGObject.m +++ b/samples/client/petstore/objc/default/SwaggerClient/Core/SWGObject.m @@ -14,7 +14,7 @@ classNames = [NSMutableSet new]; lock = [NSObject new]; }); - + BOOL initSync; @synchronized(lock) { diff --git a/samples/client/petstore/objc/default/SwaggerClient/Core/SWGQueryParamCollection.m b/samples/client/petstore/objc/default/SwaggerClient/Core/SWGQueryParamCollection.m index 9aa8a091762d1ffd8983b9fc2ff6c0e36124596c..d65b091f2e3c0beddb908ede3e2e37fe7dcc274f 100644 --- a/samples/client/petstore/objc/default/SwaggerClient/Core/SWGQueryParamCollection.m +++ b/samples/client/petstore/objc/default/SwaggerClient/Core/SWGQueryParamCollection.m @@ -13,7 +13,7 @@ _values = values; _format = format; } - + return self; } diff --git a/samples/client/petstore/objc/default/docs/SWGPetApi.md b/samples/client/petstore/objc/default/docs/SWGPetApi.md index e2dde91d7987660131a35632cc3463c5aca3dd11..7d2e7b60795f0d7daf17a157d926f8f19517a60e 100644 --- a/samples/client/petstore/objc/default/docs/SWGPetApi.md +++ b/samples/client/petstore/objc/default/docs/SWGPetApi.md @@ -22,7 +22,7 @@ Method | HTTP request | Description Add a new pet to the store -### Example +### Example ```objc SWGDefaultConfiguration *apiConfig = [SWGDefaultConfiguration sharedConfig]; @@ -73,7 +73,7 @@ void (empty response body) Deletes a pet -### Example +### Example ```objc SWGDefaultConfiguration *apiConfig = [SWGDefaultConfiguration sharedConfig]; @@ -128,7 +128,7 @@ Finds Pets by status Multiple status values can be provided with comma separated strings -### Example +### Example ```objc SWGDefaultConfiguration *apiConfig = [SWGDefaultConfiguration sharedConfig]; @@ -183,7 +183,7 @@ Finds Pets by tags Multiple tags can be provided with comma separated strings. Use tag1, tag2, tag3 for testing. -### Example +### Example ```objc SWGDefaultConfiguration *apiConfig = [SWGDefaultConfiguration sharedConfig]; @@ -238,7 +238,7 @@ Find pet by ID Returns a pet when ID < 10. ID > 10 or nonintegers will simulate API error conditions -### Example +### Example ```objc SWGDefaultConfiguration *apiConfig = [SWGDefaultConfiguration sharedConfig]; @@ -296,7 +296,7 @@ Name | Type | Description | Notes Update an existing pet -### Example +### Example ```objc SWGDefaultConfiguration *apiConfig = [SWGDefaultConfiguration sharedConfig]; @@ -348,7 +348,7 @@ void (empty response body) Updates a pet in the store with form data -### Example +### Example ```objc SWGDefaultConfiguration *apiConfig = [SWGDefaultConfiguration sharedConfig]; @@ -406,7 +406,7 @@ void (empty response body) uploads an image -### Example +### Example ```objc SWGDefaultConfiguration *apiConfig = [SWGDefaultConfiguration sharedConfig]; diff --git a/samples/client/petstore/objc/default/docs/SWGStoreApi.md b/samples/client/petstore/objc/default/docs/SWGStoreApi.md index 0aec03add1dcb3b711cbdd226dc2f05a5cb878e4..18b0e1d01ff0d7fcf2480cc273d3651c912096cf 100644 --- a/samples/client/petstore/objc/default/docs/SWGStoreApi.md +++ b/samples/client/petstore/objc/default/docs/SWGStoreApi.md @@ -20,7 +20,7 @@ Delete purchase order by ID For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors -### Example +### Example ```objc NSString* orderId = @"orderId_example"; // ID of the order that needs to be deleted @@ -67,7 +67,7 @@ Returns pet inventories by status Returns a map of status codes to quantities -### Example +### Example ```objc SWGDefaultConfiguration *apiConfig = [SWGDefaultConfiguration sharedConfig]; @@ -120,7 +120,7 @@ Find purchase order by ID For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions -### Example +### Example ```objc NSString* orderId = @"orderId_example"; // ID of pet that needs to be fetched @@ -168,7 +168,7 @@ No authorization required Place an order for a pet -### Example +### Example ```objc SWGOrder* order = [[SWGOrder alloc] init]; // order placed for purchasing the pet (optional) diff --git a/samples/client/petstore/objc/default/docs/SWGUserApi.md b/samples/client/petstore/objc/default/docs/SWGUserApi.md index 549a9e0f72cfcdd30e0c923fa3190230ede501e1..bd75635f49f63414a688453f558c22a3b11a6d84 100644 --- a/samples/client/petstore/objc/default/docs/SWGUserApi.md +++ b/samples/client/petstore/objc/default/docs/SWGUserApi.md @@ -24,7 +24,7 @@ Create user This can only be done by the logged in user. -### Example +### Example ```objc SWGUser* user = [[SWGUser alloc] init]; // Created user object (optional) @@ -69,7 +69,7 @@ No authorization required Creates list of users with given input array -### Example +### Example ```objc NSArray<SWGUser>* user = @[[[SWGUser alloc] init]]; // List of user object (optional) @@ -114,7 +114,7 @@ No authorization required Creates list of users with given input array -### Example +### Example ```objc NSArray<SWGUser>* user = @[[[SWGUser alloc] init]]; // List of user object (optional) @@ -161,7 +161,7 @@ Delete user This can only be done by the logged in user. -### Example +### Example ```objc NSString* username = @"username_example"; // The name that needs to be deleted @@ -206,7 +206,7 @@ No authorization required Get user by user name -### Example +### Example ```objc NSString* username = @"username_example"; // The name that needs to be fetched. Use user1 for testing. @@ -255,7 +255,7 @@ No authorization required Logs user into the system -### Example +### Example ```objc NSString* username = @"username_example"; // The user name for login (optional) @@ -306,7 +306,7 @@ No authorization required Logs out current logged in user session -### Example +### Example ```objc @@ -350,7 +350,7 @@ Updated user This can only be done by the logged in user. -### Example +### Example ```objc NSString* username = @"username_example"; // name that need to be deleted diff --git a/samples/client/petstore/objc/default/git_push.sh b/samples/client/petstore/objc/default/git_push.sh index ced3be2b0c7b2349ff06d18da19d4b31435c9fa6..9405f72e950cdb8ca24c3cf4d15cee7eac62fde7 100644 --- a/samples/client/petstore/objc/default/git_push.sh +++ b/samples/client/petstore/objc/default/git_push.sh @@ -55,4 +55,3 @@ 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/perl/bin/autodoc b/samples/client/petstore/perl/bin/autodoc index f2292179ca71a6299e25090579e80cf7e33356d4..956e3cdcb9118b56c798058a538eef187dcd44c8 100644 --- a/samples/client/petstore/perl/bin/autodoc +++ b/samples/client/petstore/perl/bin/autodoc @@ -5,7 +5,7 @@ use lib File::Spec->catdir($FindBin::Bin, '..', 'lib'); use Moose::Util qw(apply_all_roles); use Getopt::Std; - + my %options=(); getopts("wnphmHc:", \%options); help if $options{h}; @@ -64,8 +64,8 @@ Usage: autodoc [OPTION] [-c My::App::Class] -w wide format (default) -n narrow format - -p POD format - -H HTML format + -p POD format + -H HTML format -m Markdown format -h print this help message -c your application class @@ -74,4 +74,3 @@ HELP exit(0); } - diff --git a/samples/client/petstore/perl/docs/AnotherFakeApi.md b/samples/client/petstore/perl/docs/AnotherFakeApi.md index a0b0fd6f8ea7e6a471cb29230b8d9627051343b8..4ac7c9fd4db7bf94ebd0a2bc46c10cc52a6a7680 100644 --- a/samples/client/petstore/perl/docs/AnotherFakeApi.md +++ b/samples/client/petstore/perl/docs/AnotherFakeApi.md @@ -19,7 +19,7 @@ To test special tags To test special tags and operation ID starting with number -### Example +### Example ```perl use Data::Dumper; use WWW::OpenAPIClient::AnotherFakeApi; @@ -28,7 +28,7 @@ my $api_instance = WWW::OpenAPIClient::AnotherFakeApi->new( my $client = WWW::OpenAPIClient::Object::Client->new(); # Client | client model -eval { +eval { my $result = $api_instance->call_123_test_special_tags(client => $client); print Dumper($result); }; diff --git a/samples/client/petstore/perl/docs/DefaultApi.md b/samples/client/petstore/perl/docs/DefaultApi.md index 4a824e8fe438879a07b7d1dbeea804222f276ce2..c7ad7536631b536333ecc47896248e05b228040a 100644 --- a/samples/client/petstore/perl/docs/DefaultApi.md +++ b/samples/client/petstore/perl/docs/DefaultApi.md @@ -17,7 +17,7 @@ Method | HTTP request | Description -### Example +### Example ```perl use Data::Dumper; use WWW::OpenAPIClient::DefaultApi; @@ -25,7 +25,7 @@ my $api_instance = WWW::OpenAPIClient::DefaultApi->new( ); -eval { +eval { my $result = $api_instance->foo_get(); print Dumper($result); }; diff --git a/samples/client/petstore/perl/docs/FakeApi.md b/samples/client/petstore/perl/docs/FakeApi.md index 9db900a571aaa7106fb91a7ace35c66fc4f69bd5..3640b7749ebedbb016f0a98155d41b81742e149e 100644 --- a/samples/client/petstore/perl/docs/FakeApi.md +++ b/samples/client/petstore/perl/docs/FakeApi.md @@ -33,7 +33,7 @@ Method | HTTP request | Description Health check endpoint -### Example +### Example ```perl use Data::Dumper; use WWW::OpenAPIClient::FakeApi; @@ -41,7 +41,7 @@ my $api_instance = WWW::OpenAPIClient::FakeApi->new( ); -eval { +eval { my $result = $api_instance->fake_health_get(); print Dumper($result); }; @@ -73,7 +73,7 @@ No authorization required test http signature authentication -### Example +### Example ```perl use Data::Dumper; use WWW::OpenAPIClient::FakeApi; @@ -87,7 +87,7 @@ my $pet = WWW::OpenAPIClient::Object::Pet->new(); # Pet | Pet object that needs my $query_1 = "query_1_example"; # string | query parameter my $header_1 = "header_1_example"; # string | header parameter -eval { +eval { $api_instance->fake_http_signature_test(pet => $pet, query_1 => $query_1, header_1 => $header_1); }; if ($@) { @@ -125,7 +125,7 @@ void (empty response body) Test serialization of outer boolean types -### Example +### Example ```perl use Data::Dumper; use WWW::OpenAPIClient::FakeApi; @@ -134,7 +134,7 @@ my $api_instance = WWW::OpenAPIClient::FakeApi->new( my $body = WWW::OpenAPIClient::Object::boolean->new(); # boolean | Input boolean as post body -eval { +eval { my $result = $api_instance->fake_outer_boolean_serialize(body => $body); print Dumper($result); }; @@ -171,7 +171,7 @@ No authorization required Test serialization of object with outer number type -### Example +### Example ```perl use Data::Dumper; use WWW::OpenAPIClient::FakeApi; @@ -180,7 +180,7 @@ my $api_instance = WWW::OpenAPIClient::FakeApi->new( my $outer_composite = WWW::OpenAPIClient::Object::OuterComposite->new(); # OuterComposite | Input composite as post body -eval { +eval { my $result = $api_instance->fake_outer_composite_serialize(outer_composite => $outer_composite); print Dumper($result); }; @@ -217,7 +217,7 @@ No authorization required Test serialization of outer number types -### Example +### Example ```perl use Data::Dumper; use WWW::OpenAPIClient::FakeApi; @@ -226,7 +226,7 @@ my $api_instance = WWW::OpenAPIClient::FakeApi->new( my $body = WWW::OpenAPIClient::Object::double->new(); # double | Input number as post body -eval { +eval { my $result = $api_instance->fake_outer_number_serialize(body => $body); print Dumper($result); }; @@ -263,7 +263,7 @@ No authorization required Test serialization of outer string types -### Example +### Example ```perl use Data::Dumper; use WWW::OpenAPIClient::FakeApi; @@ -272,7 +272,7 @@ my $api_instance = WWW::OpenAPIClient::FakeApi->new( my $body = WWW::OpenAPIClient::Object::string->new(); # string | Input string as post body -eval { +eval { my $result = $api_instance->fake_outer_string_serialize(body => $body); print Dumper($result); }; @@ -309,7 +309,7 @@ No authorization required Test serialization of enum (int) properties with examples -### Example +### Example ```perl use Data::Dumper; use WWW::OpenAPIClient::FakeApi; @@ -318,7 +318,7 @@ my $api_instance = WWW::OpenAPIClient::FakeApi->new( my $outer_object_with_enum_property = WWW::OpenAPIClient::Object::OuterObjectWithEnumProperty->new(); # OuterObjectWithEnumProperty | Input enum (int) as post body -eval { +eval { my $result = $api_instance->fake_property_enum_integer_serialize(outer_object_with_enum_property => $outer_object_with_enum_property); print Dumper($result); }; @@ -355,7 +355,7 @@ No authorization required For this test, the body has to be a binary file. -### Example +### Example ```perl use Data::Dumper; use WWW::OpenAPIClient::FakeApi; @@ -364,7 +364,7 @@ my $api_instance = WWW::OpenAPIClient::FakeApi->new( my $body = WWW::OpenAPIClient::Object::string->new(); # string | image to upload -eval { +eval { $api_instance->test_body_with_binary(body => $body); }; if ($@) { @@ -400,7 +400,7 @@ No authorization required For this test, the body for this request must reference a schema named `File`. -### Example +### Example ```perl use Data::Dumper; use WWW::OpenAPIClient::FakeApi; @@ -409,7 +409,7 @@ my $api_instance = WWW::OpenAPIClient::FakeApi->new( my $file_schema_test_class = WWW::OpenAPIClient::Object::FileSchemaTestClass->new(); # FileSchemaTestClass | -eval { +eval { $api_instance->test_body_with_file_schema(file_schema_test_class => $file_schema_test_class); }; if ($@) { @@ -443,7 +443,7 @@ No authorization required -### Example +### Example ```perl use Data::Dumper; use WWW::OpenAPIClient::FakeApi; @@ -453,7 +453,7 @@ my $api_instance = WWW::OpenAPIClient::FakeApi->new( my $query = "query_example"; # string | my $user = WWW::OpenAPIClient::Object::User->new(); # User | -eval { +eval { $api_instance->test_body_with_query_params(query => $query, user => $user); }; if ($@) { @@ -490,7 +490,7 @@ To test \"client\" model To test \"client\" model -### Example +### Example ```perl use Data::Dumper; use WWW::OpenAPIClient::FakeApi; @@ -499,7 +499,7 @@ my $api_instance = WWW::OpenAPIClient::FakeApi->new( my $client = WWW::OpenAPIClient::Object::Client->new(); # Client | client model -eval { +eval { my $result = $api_instance->test_client_model(client => $client); print Dumper($result); }; @@ -536,7 +536,7 @@ Fake endpoint for testing various parameters å‡ç«¯é»ž å½ã®ã‚¨ãƒ³ãƒ‰ãƒã‚¤ãƒ³ Fake endpoint for testing various parameters å‡ç«¯é»ž å½ã®ã‚¨ãƒ³ãƒ‰ãƒã‚¤ãƒ³ãƒˆ 가짜 엔드 í¬ì¸íЏ -### Example +### Example ```perl use Data::Dumper; use WWW::OpenAPIClient::FakeApi; @@ -563,7 +563,7 @@ my $date_time = DateTime->from_epoch(epoch => str2time('null')); # DateTime | No my $password = "password_example"; # string | None my $callback = "callback_example"; # string | None -eval { +eval { $api_instance->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); }; if ($@) { @@ -612,7 +612,7 @@ To test enum parameters To test enum parameters -### Example +### Example ```perl use Data::Dumper; use WWW::OpenAPIClient::FakeApi; @@ -628,7 +628,7 @@ my $enum_query_double = 3.4; # double | Query parameter enum test (double) my $enum_form_string_array = ['$']; # ARRAY[string] | Form parameter enum test (string array) my $enum_form_string = '-efg'; # string | Form parameter enum test (string) -eval { +eval { $api_instance->test_enum_parameters(enum_header_string_array => $enum_header_string_array, enum_header_string => $enum_header_string, enum_query_string_array => $enum_query_string_array, enum_query_string => $enum_query_string, enum_query_integer => $enum_query_integer, enum_query_double => $enum_query_double, enum_form_string_array => $enum_form_string_array, enum_form_string => $enum_form_string); }; if ($@) { @@ -671,7 +671,7 @@ Fake endpoint to test group parameters (optional) Fake endpoint to test group parameters (optional) -### Example +### Example ```perl use Data::Dumper; use WWW::OpenAPIClient::FakeApi; @@ -690,7 +690,7 @@ my $string_group = 56; # int | String in group parameters my $boolean_group = null; # boolean | Boolean in group parameters my $int64_group = 789; # int | Integer in group parameters -eval { +eval { $api_instance->test_group_parameters(required_string_group => $required_string_group, required_boolean_group => $required_boolean_group, required_int64_group => $required_int64_group, string_group => $string_group, boolean_group => $boolean_group, int64_group => $int64_group); }; if ($@) { @@ -729,7 +729,7 @@ void (empty response body) test inline additionalProperties -### Example +### Example ```perl use Data::Dumper; use WWW::OpenAPIClient::FakeApi; @@ -738,7 +738,7 @@ my $api_instance = WWW::OpenAPIClient::FakeApi->new( my $request_body = WWW::OpenAPIClient::Object::HASH[string,string]->new(); # HASH[string,string] | request body -eval { +eval { $api_instance->test_inline_additional_properties(request_body => $request_body); }; if ($@) { @@ -772,7 +772,7 @@ No authorization required test json serialization of form data -### Example +### Example ```perl use Data::Dumper; use WWW::OpenAPIClient::FakeApi; @@ -782,7 +782,7 @@ my $api_instance = WWW::OpenAPIClient::FakeApi->new( my $param = "param_example"; # string | field1 my $param2 = "param2_example"; # string | field2 -eval { +eval { $api_instance->test_json_form_data(param => $param, param2 => $param2); }; if ($@) { @@ -819,7 +819,7 @@ No authorization required To test the collection format in query parameters -### Example +### Example ```perl use Data::Dumper; use WWW::OpenAPIClient::FakeApi; @@ -832,7 +832,7 @@ my $http = [("null")]; # ARRAY[string] | my $url = [("null")]; # ARRAY[string] | my $context = [("null")]; # ARRAY[string] | -eval { +eval { $api_instance->test_query_parameter_collection_format(pipe => $pipe, ioutil => $ioutil, http => $http, url => $url, context => $context); }; if ($@) { diff --git a/samples/client/petstore/perl/docs/FakeClassnameTags123Api.md b/samples/client/petstore/perl/docs/FakeClassnameTags123Api.md index 67c2122cb6ff114a9064d93c8cbbd6499225da5d..5a72ceab7f74b634b4e09d6af4721ae31336f884 100644 --- a/samples/client/petstore/perl/docs/FakeClassnameTags123Api.md +++ b/samples/client/petstore/perl/docs/FakeClassnameTags123Api.md @@ -19,7 +19,7 @@ To test class name in snake case To test class name in snake case -### Example +### Example ```perl use Data::Dumper; use WWW::OpenAPIClient::FakeClassnameTags123Api; @@ -33,7 +33,7 @@ my $api_instance = WWW::OpenAPIClient::FakeClassnameTags123Api->new( my $client = WWW::OpenAPIClient::Object::Client->new(); # Client | client model -eval { +eval { my $result = $api_instance->test_classname(client => $client); print Dumper($result); }; diff --git a/samples/client/petstore/perl/docs/PetApi.md b/samples/client/petstore/perl/docs/PetApi.md index 5218d9282f190d00597006904b87ab53eba5dfb8..f35f4afad855e03e1f6b2b424c7068ea42761082 100644 --- a/samples/client/petstore/perl/docs/PetApi.md +++ b/samples/client/petstore/perl/docs/PetApi.md @@ -25,7 +25,7 @@ Method | HTTP request | Description Add a new pet to the store -### Example +### Example ```perl use Data::Dumper; use WWW::OpenAPIClient::PetApi; @@ -37,7 +37,7 @@ my $api_instance = WWW::OpenAPIClient::PetApi->new( my $pet = WWW::OpenAPIClient::Object::Pet->new(); # Pet | Pet object that needs to be added to the store -eval { +eval { $api_instance->add_pet(pet => $pet); }; if ($@) { @@ -71,7 +71,7 @@ void (empty response body) Deletes a pet -### Example +### Example ```perl use Data::Dumper; use WWW::OpenAPIClient::PetApi; @@ -84,7 +84,7 @@ my $api_instance = WWW::OpenAPIClient::PetApi->new( my $pet_id = 789; # int | Pet id to delete my $api_key = "api_key_example"; # string | -eval { +eval { $api_instance->delete_pet(pet_id => $pet_id, api_key => $api_key); }; if ($@) { @@ -121,7 +121,7 @@ Finds Pets by status Multiple status values can be provided with comma separated strings -### Example +### Example ```perl use Data::Dumper; use WWW::OpenAPIClient::PetApi; @@ -133,7 +133,7 @@ my $api_instance = WWW::OpenAPIClient::PetApi->new( my $status = [("'available'")]; # ARRAY[string] | Status values that need to be considered for filter -eval { +eval { my $result = $api_instance->find_pets_by_status(status => $status); print Dumper($result); }; @@ -170,7 +170,7 @@ Finds Pets by tags Multiple tags can be provided with comma separated strings. Use tag1, tag2, tag3 for testing. -### Example +### Example ```perl use Data::Dumper; use WWW::OpenAPIClient::PetApi; @@ -182,7 +182,7 @@ my $api_instance = WWW::OpenAPIClient::PetApi->new( my $tags = [("null")]; # ARRAY[string] | Tags to filter by -eval { +eval { my $result = $api_instance->find_pets_by_tags(tags => $tags); print Dumper($result); }; @@ -219,7 +219,7 @@ Find pet by ID Returns a single pet -### Example +### Example ```perl use Data::Dumper; use WWW::OpenAPIClient::PetApi; @@ -233,7 +233,7 @@ my $api_instance = WWW::OpenAPIClient::PetApi->new( my $pet_id = 789; # int | ID of pet to return -eval { +eval { my $result = $api_instance->get_pet_by_id(pet_id => $pet_id); print Dumper($result); }; @@ -268,7 +268,7 @@ Name | Type | Description | Notes Update an existing pet -### Example +### Example ```perl use Data::Dumper; use WWW::OpenAPIClient::PetApi; @@ -280,7 +280,7 @@ my $api_instance = WWW::OpenAPIClient::PetApi->new( my $pet = WWW::OpenAPIClient::Object::Pet->new(); # Pet | Pet object that needs to be added to the store -eval { +eval { $api_instance->update_pet(pet => $pet); }; if ($@) { @@ -314,7 +314,7 @@ void (empty response body) Updates a pet in the store with form data -### Example +### Example ```perl use Data::Dumper; use WWW::OpenAPIClient::PetApi; @@ -328,7 +328,7 @@ my $pet_id = 789; # int | ID of pet that needs to be updated my $name = "name_example"; # string | Updated name of the pet my $status = "status_example"; # string | Updated status of the pet -eval { +eval { $api_instance->update_pet_with_form(pet_id => $pet_id, name => $name, status => $status); }; if ($@) { @@ -364,7 +364,7 @@ void (empty response body) uploads an image -### Example +### Example ```perl use Data::Dumper; use WWW::OpenAPIClient::PetApi; @@ -378,7 +378,7 @@ my $pet_id = 789; # int | ID of pet to update my $additional_metadata = "additional_metadata_example"; # string | Additional data to pass to server my $file = "/path/to/file"; # string | file to upload -eval { +eval { my $result = $api_instance->upload_file(pet_id => $pet_id, additional_metadata => $additional_metadata, file => $file); print Dumper($result); }; @@ -415,7 +415,7 @@ Name | Type | Description | Notes uploads an image (required) -### Example +### Example ```perl use Data::Dumper; use WWW::OpenAPIClient::PetApi; @@ -429,7 +429,7 @@ my $pet_id = 789; # int | ID of pet to update my $required_file = "/path/to/file"; # string | file to upload my $additional_metadata = "additional_metadata_example"; # string | Additional data to pass to server -eval { +eval { my $result = $api_instance->upload_file_with_required_file(pet_id => $pet_id, required_file => $required_file, additional_metadata => $additional_metadata); print Dumper($result); }; diff --git a/samples/client/petstore/perl/docs/StoreApi.md b/samples/client/petstore/perl/docs/StoreApi.md index e467823c53a98cc7f7c8409438f6a632faec431b..b57d02e8d525c40aca63518cfd74063ff49ae778 100644 --- a/samples/client/petstore/perl/docs/StoreApi.md +++ b/samples/client/petstore/perl/docs/StoreApi.md @@ -22,7 +22,7 @@ Delete purchase order by ID For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors -### Example +### Example ```perl use Data::Dumper; use WWW::OpenAPIClient::StoreApi; @@ -31,7 +31,7 @@ my $api_instance = WWW::OpenAPIClient::StoreApi->new( my $order_id = "order_id_example"; # string | ID of the order that needs to be deleted -eval { +eval { $api_instance->delete_order(order_id => $order_id); }; if ($@) { @@ -67,7 +67,7 @@ Returns pet inventories by status Returns a map of status codes to quantities -### Example +### Example ```perl use Data::Dumper; use WWW::OpenAPIClient::StoreApi; @@ -80,7 +80,7 @@ my $api_instance = WWW::OpenAPIClient::StoreApi->new( ); -eval { +eval { my $result = $api_instance->get_inventory(); print Dumper($result); }; @@ -114,7 +114,7 @@ Find purchase order by ID For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions -### Example +### Example ```perl use Data::Dumper; use WWW::OpenAPIClient::StoreApi; @@ -123,7 +123,7 @@ my $api_instance = WWW::OpenAPIClient::StoreApi->new( my $order_id = 789; # int | ID of pet that needs to be fetched -eval { +eval { my $result = $api_instance->get_order_by_id(order_id => $order_id); print Dumper($result); }; @@ -158,7 +158,7 @@ No authorization required Place an order for a pet -### Example +### Example ```perl use Data::Dumper; use WWW::OpenAPIClient::StoreApi; @@ -167,7 +167,7 @@ my $api_instance = WWW::OpenAPIClient::StoreApi->new( my $order = WWW::OpenAPIClient::Object::Order->new(); # Order | order placed for purchasing the pet -eval { +eval { my $result = $api_instance->place_order(order => $order); print Dumper($result); }; diff --git a/samples/client/petstore/perl/docs/UserApi.md b/samples/client/petstore/perl/docs/UserApi.md index 3ab7ae9e4064e9d28c5f19afbc6649e328f6a6be..fd789384f9bff67d06dc8cabe9ce842989e0b01b 100644 --- a/samples/client/petstore/perl/docs/UserApi.md +++ b/samples/client/petstore/perl/docs/UserApi.md @@ -26,7 +26,7 @@ Create user This can only be done by the logged in user. -### Example +### Example ```perl use Data::Dumper; use WWW::OpenAPIClient::UserApi; @@ -35,7 +35,7 @@ my $api_instance = WWW::OpenAPIClient::UserApi->new( my $user = WWW::OpenAPIClient::Object::User->new(); # User | Created user object -eval { +eval { $api_instance->create_user(user => $user); }; if ($@) { @@ -69,7 +69,7 @@ No authorization required Creates list of users with given input array -### Example +### Example ```perl use Data::Dumper; use WWW::OpenAPIClient::UserApi; @@ -78,7 +78,7 @@ my $api_instance = WWW::OpenAPIClient::UserApi->new( my $user = [WWW::OpenAPIClient::Object::ARRAY[User]->new()]; # ARRAY[User] | List of user object -eval { +eval { $api_instance->create_users_with_array_input(user => $user); }; if ($@) { @@ -112,7 +112,7 @@ No authorization required Creates list of users with given input array -### Example +### Example ```perl use Data::Dumper; use WWW::OpenAPIClient::UserApi; @@ -121,7 +121,7 @@ my $api_instance = WWW::OpenAPIClient::UserApi->new( my $user = [WWW::OpenAPIClient::Object::ARRAY[User]->new()]; # ARRAY[User] | List of user object -eval { +eval { $api_instance->create_users_with_list_input(user => $user); }; if ($@) { @@ -157,7 +157,7 @@ Delete user This can only be done by the logged in user. -### Example +### Example ```perl use Data::Dumper; use WWW::OpenAPIClient::UserApi; @@ -166,7 +166,7 @@ my $api_instance = WWW::OpenAPIClient::UserApi->new( my $username = "username_example"; # string | The name that needs to be deleted -eval { +eval { $api_instance->delete_user(username => $username); }; if ($@) { @@ -200,7 +200,7 @@ No authorization required Get user by user name -### Example +### Example ```perl use Data::Dumper; use WWW::OpenAPIClient::UserApi; @@ -209,7 +209,7 @@ my $api_instance = WWW::OpenAPIClient::UserApi->new( my $username = "username_example"; # string | The name that needs to be fetched. Use user1 for testing. -eval { +eval { my $result = $api_instance->get_user_by_name(username => $username); print Dumper($result); }; @@ -244,7 +244,7 @@ No authorization required Logs user into the system -### Example +### Example ```perl use Data::Dumper; use WWW::OpenAPIClient::UserApi; @@ -254,7 +254,7 @@ my $api_instance = WWW::OpenAPIClient::UserApi->new( my $username = "username_example"; # string | The user name for login my $password = "password_example"; # string | The password for login in clear text -eval { +eval { my $result = $api_instance->login_user(username => $username, password => $password); print Dumper($result); }; @@ -290,7 +290,7 @@ No authorization required Logs out current logged in user session -### Example +### Example ```perl use Data::Dumper; use WWW::OpenAPIClient::UserApi; @@ -298,7 +298,7 @@ my $api_instance = WWW::OpenAPIClient::UserApi->new( ); -eval { +eval { $api_instance->logout_user(); }; if ($@) { @@ -331,7 +331,7 @@ Updated user This can only be done by the logged in user. -### Example +### Example ```perl use Data::Dumper; use WWW::OpenAPIClient::UserApi; @@ -341,7 +341,7 @@ my $api_instance = WWW::OpenAPIClient::UserApi->new( my $username = "username_example"; # string | name that need to be deleted my $user = WWW::OpenAPIClient::Object::User->new(); # User | Updated user object -eval { +eval { $api_instance->update_user(username => $username, user => $user); }; if ($@) { diff --git a/samples/client/petstore/perl/git_push.sh b/samples/client/petstore/perl/git_push.sh index ced3be2b0c7b2349ff06d18da19d4b31435c9fa6..9405f72e950cdb8ca24c3cf4d15cee7eac62fde7 100644 --- a/samples/client/petstore/perl/git_push.sh +++ b/samples/client/petstore/perl/git_push.sh @@ -55,4 +55,3 @@ 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/perl/lib/WWW/OpenAPIClient/AnotherFakeApi.pm b/samples/client/petstore/perl/lib/WWW/OpenAPIClient/AnotherFakeApi.pm index cd1df44004df84edc47935b5d2839038f7a11f47..80105003ff3f6f7c057fadf8a06b18ff40f3390e 100644 --- a/samples/client/petstore/perl/lib/WWW/OpenAPIClient/AnotherFakeApi.pm +++ b/samples/client/petstore/perl/lib/WWW/OpenAPIClient/AnotherFakeApi.pm @@ -22,7 +22,7 @@ package WWW::OpenAPIClient::AnotherFakeApi; require 5.6.0; use strict; use warnings; -use utf8; +use utf8; use Exporter; use Carp qw( croak ); use Log::Any qw($log); @@ -52,7 +52,7 @@ sub new { # call_123_test_special_tags # # To test special tags -# +# # @param Client $client client model (required) { my $params = { @@ -62,7 +62,7 @@ sub new { required => '1', }, }; - __PACKAGE__->method_documentation->{ 'call_123_test_special_tags' } = { + __PACKAGE__->method_documentation->{ 'call_123_test_special_tags' } = { summary => 'To test special tags', params => $params, returns => 'Client', diff --git a/samples/client/petstore/perl/lib/WWW/OpenAPIClient/ApiClient.pm b/samples/client/petstore/perl/lib/WWW/OpenAPIClient/ApiClient.pm index 0d6852ecedc56fb525710eb7c19ed97b234e37ff..5e6c766c7c49924f02670a0907e05c641eb99d76 100644 --- a/samples/client/petstore/perl/lib/WWW/OpenAPIClient/ApiClient.pm +++ b/samples/client/petstore/perl/lib/WWW/OpenAPIClient/ApiClient.pm @@ -69,7 +69,7 @@ sub set_user_agent { # Set timeout # # @param integer $seconds Number of seconds before timing out [set to 0 for no timeout] -# +# sub set_timeout { my ($self, $seconds) = @_; if (!looks_like_number($seconds)) { @@ -90,11 +90,11 @@ sub call_api { my ($resource_path, $method, $query_params, $post_params, $header_params, $body_data, $auth_settings) = @_; # update parameters based on authentication settings - $self->update_params_for_auth($header_params, $query_params, $auth_settings); + $self->update_params_for_auth($header_params, $query_params, $auth_settings); my $_url = $self->{config}{base_url} . $resource_path; - # build query + # build query if (%$query_params) { $_url = ($_url . '?' . eval { URI::Query->new($query_params)->stringify }); } @@ -107,15 +107,15 @@ sub call_api { my $_request; if ($method eq 'POST') { # multipart - $header_params->{'Content-Type'} = lc $header_params->{'Content-Type'} eq 'multipart/form' ? + $header_params->{'Content-Type'} = lc $header_params->{'Content-Type'} eq 'multipart/form' ? 'form-data' : $header_params->{'Content-Type'}; - + $_request = POST($_url, %$header_params, Content => $_body_data); } elsif ($method eq 'PUT') { # multipart - $header_params->{'Content-Type'} = lc $header_params->{'Content-Type'} eq 'multipart/form' ? + $header_params->{'Content-Type'} = lc $header_params->{'Content-Type'} eq 'multipart/form' ? 'form-data' : $header_params->{'Content-Type'}; $_request = PUT($_url, %$header_params, Content => $_body_data); @@ -127,7 +127,7 @@ sub call_api { } elsif ($method eq 'HEAD') { my $headers = HTTP::Headers->new(%$header_params); - $_request = HEAD($_url,%$header_params); + $_request = HEAD($_url,%$header_params); } elsif ($method eq 'DELETE') { #TODO support form data my $headers = HTTP::Headers->new(%$header_params); @@ -137,7 +137,7 @@ sub call_api { } else { } - + $self->{ua}->timeout($self->{http_timeout} || $self->{config}{http_timeout}); $self->{ua}->agent($self->{http_user_agent} || $self->{config}{http_user_agent}); @@ -148,7 +148,7 @@ sub call_api { unless ($_response->is_success) { croak(sprintf "API Exception(%s): %s\n%s", $_response->code, $_response->message, $_response->content); } - + return $_response->content; } @@ -215,7 +215,7 @@ sub to_string { } # Deserialize a JSON string into an object -# +# # @param string $class class name is passed as a string # @param string $data data of the body # @return object an instance of $class @@ -317,17 +317,17 @@ sub get_api_key_with_prefix my $prefix = $self->{config}{api_key_prefix}{$key_name}; return $prefix ? "$prefix $api_key" : $api_key; -} +} # update header and query param based on authentication setting -# +# # @param array $headerParams header parameters (by ref) # @param array $queryParams query parameters (by ref) # @param array $authSettings array of authentication scheme (e.g ['api_key']) sub update_params_for_auth { my ($self, $header_params, $query_params, $auth_settings) = @_; - return $self->_global_auth_setup($header_params, $query_params) + return $self->_global_auth_setup($header_params, $query_params) unless $auth_settings && @$auth_settings; # one endpoint can have more than 1 auth settings @@ -372,12 +372,12 @@ sub update_params_for_auth { } } -# The endpoint API class has not found any settings for auth. This may be deliberate, -# in which case update_params_for_auth() will be a no-op. But it may also be that the -# OpenAPI Spec does not describe the intended authorization. So we check in the config for any -# auth tokens and if we find any, we use them for all endpoints; +# The endpoint API class has not found any settings for auth. This may be deliberate, +# in which case update_params_for_auth() will be a no-op. But it may also be that the +# OpenAPI Spec does not describe the intended authorization. So we check in the config for any +# auth tokens and if we find any, we use them for all endpoints; sub _global_auth_setup { - my ($self, $header_params, $query_params) = @_; + my ($self, $header_params, $query_params) = @_; my $tokens = $self->{config}->get_tokens; return unless keys %$tokens; diff --git a/samples/client/petstore/perl/lib/WWW/OpenAPIClient/ApiFactory.pm b/samples/client/petstore/perl/lib/WWW/OpenAPIClient/ApiFactory.pm index 8a9952a676686ae6ca86108a8d787c1fa9cf0aa3..e4187931886464fdcc8c2f5318dc212866c244c1 100644 --- a/samples/client/petstore/perl/lib/WWW/OpenAPIClient/ApiFactory.pm +++ b/samples/client/petstore/perl/lib/WWW/OpenAPIClient/ApiFactory.pm @@ -37,42 +37,42 @@ use WWW::OpenAPIClient::ApiClient; =head1 Synopsis package My::Petstore::App; - + use WWW::OpenAPIClient::ApiFactory; - + my $api_factory = WWW::OpenAPIClient::ApiFactory->new( ... ); # any args for ApiClient constructor # later... - my $pet_api = $api_factory->get_api('Pet'); - + my $pet_api = $api_factory->get_api('Pet'); + # $pet_api isa WWW::OpenAPIClient::PetApi - + my $pet = $pet_api->get_pet_by_id(pet_id => $pet_id); # object attributes have proper accessors: printf "Pet's name is %s", $pet->name; # change the value stored on the object: - $pet->name('Dave'); + $pet->name('Dave'); =cut # Load all the API classes and construct a lookup table at startup time -my %_apis = map { $_ =~ /^WWW::OpenAPIClient::(.*)$/; $1 => $_ } - grep {$_ =~ /Api$/} +my %_apis = map { $_ =~ /^WWW::OpenAPIClient::(.*)$/; $1 => $_ } + grep {$_ =~ /Api$/} usesub 'WWW::OpenAPIClient'; =head1 new($api_client) - + create a new WWW::OpenAPIClient::ApiFactory instance with the given WWW::OpenAPIClient::ApiClient instance. =head1 new(%parameters) Any parameters are optional, and are passed to and stored on the api_client object. - + See L<WWW::OpenAPIClient::ApiClient> and L<WWW::OpenAPIClient::Configuration> for valid parameters -=cut +=cut sub new { my ($class) = shift; @@ -88,31 +88,31 @@ sub new { =head1 get_api($which) - Returns an API object of the requested type. - - $which is a nickname for the class: - + Returns an API object of the requested type. + + $which is a nickname for the class: + FooBarClient::BazApi has nickname 'Baz' - + =cut sub get_api { my ($self, $which) = @_; croak "API not specified" unless $which; my $api_class = $_apis{"${which}Api"} || croak "No known API for '$which'"; - return $api_class->new($self->api_client); + return $api_class->new($self->api_client); } =head1 api_client() Returns the api_client object, should you ever need it. - + =cut sub api_client { $_[0]->{api_client} } =head1 apis_available() -=cut +=cut sub apis_available { return map { $_ =~ s/Api$//; $_ } sort keys %_apis } diff --git a/samples/client/petstore/perl/lib/WWW/OpenAPIClient/Configuration.pm b/samples/client/petstore/perl/lib/WWW/OpenAPIClient/Configuration.pm index 9bf21bd97efac7b8f95898d1dbb917457259e014..5282ac09acb9b42df703c4513e1283e498c90bc7 100644 --- a/samples/client/petstore/perl/lib/WWW/OpenAPIClient/Configuration.pm +++ b/samples/client/petstore/perl/lib/WWW/OpenAPIClient/Configuration.pm @@ -118,7 +118,7 @@ sub new { sub get_tokens { my $self = shift; - + my $tokens = {}; $tokens->{username} = $self->{username} if $self->{username}; $tokens->{password} = $self->{password} if $self->{password}; @@ -144,13 +144,13 @@ sub clear_tokens { $self->{api_key} = {}; $self->{api_key_prefix} = {}; $self->{api_key_in} = {}; - + return \%tokens; } sub accept_tokens { my ($self, $tokens) = @_; - + foreach my $known_name (qw(username password access_token)) { next unless $tokens->{$known_name}; $self->{$known_name} = delete $tokens->{$known_name}; @@ -165,6 +165,6 @@ sub accept_tokens { croak "Tokens can only go in 'head' or 'query' (not in '$in')" unless $in =~ /^(?:head|query)$/; $self->{api_key_in}{$token_name} = $in; } -} +} 1; diff --git a/samples/client/petstore/perl/lib/WWW/OpenAPIClient/DefaultApi.pm b/samples/client/petstore/perl/lib/WWW/OpenAPIClient/DefaultApi.pm index 9ff4e14475de0f0d65168c71887709706dc80e77..83256b8931fe49928d3bacd0681a728b022b66e7 100644 --- a/samples/client/petstore/perl/lib/WWW/OpenAPIClient/DefaultApi.pm +++ b/samples/client/petstore/perl/lib/WWW/OpenAPIClient/DefaultApi.pm @@ -22,7 +22,7 @@ package WWW::OpenAPIClient::DefaultApi; require 5.6.0; use strict; use warnings; -use utf8; +use utf8; use Exporter; use Carp qw( croak ); use Log::Any qw($log); @@ -52,11 +52,11 @@ sub new { # foo_get # # -# +# { my $params = { }; - __PACKAGE__->method_documentation->{ 'foo_get' } = { + __PACKAGE__->method_documentation->{ 'foo_get' } = { summary => '', params => $params, returns => 'InlineResponseDefault', diff --git a/samples/client/petstore/perl/lib/WWW/OpenAPIClient/FakeApi.pm b/samples/client/petstore/perl/lib/WWW/OpenAPIClient/FakeApi.pm index d3879045deea95b9e2fc2226971176e85730f71a..d94110b59a1b1a59aaa3d1d7dadace7b2d12b15f 100644 --- a/samples/client/petstore/perl/lib/WWW/OpenAPIClient/FakeApi.pm +++ b/samples/client/petstore/perl/lib/WWW/OpenAPIClient/FakeApi.pm @@ -22,7 +22,7 @@ package WWW::OpenAPIClient::FakeApi; require 5.6.0; use strict; use warnings; -use utf8; +use utf8; use Exporter; use Carp qw( croak ); use Log::Any qw($log); @@ -52,11 +52,11 @@ sub new { # fake_health_get # # Health check endpoint -# +# { my $params = { }; - __PACKAGE__->method_documentation->{ 'fake_health_get' } = { + __PACKAGE__->method_documentation->{ 'fake_health_get' } = { summary => 'Health check endpoint', params => $params, returns => 'HealthCheckResult', @@ -101,7 +101,7 @@ sub fake_health_get { # fake_http_signature_test # # test http signature authentication -# +# # @param Pet $pet Pet object that needs to be added to the store (required) # @param string $query_1 query parameter (optional) # @param string $header_1 header parameter (optional) @@ -123,7 +123,7 @@ sub fake_health_get { required => '0', }, }; - __PACKAGE__->method_documentation->{ 'fake_http_signature_test' } = { + __PACKAGE__->method_documentation->{ 'fake_http_signature_test' } = { summary => 'test http signature authentication', params => $params, returns => undef, @@ -184,7 +184,7 @@ sub fake_http_signature_test { # fake_outer_boolean_serialize # # -# +# # @param boolean $body Input boolean as post body (optional) { my $params = { @@ -194,7 +194,7 @@ sub fake_http_signature_test { required => '0', }, }; - __PACKAGE__->method_documentation->{ 'fake_outer_boolean_serialize' } = { + __PACKAGE__->method_documentation->{ 'fake_outer_boolean_serialize' } = { summary => '', params => $params, returns => 'boolean', @@ -244,7 +244,7 @@ sub fake_outer_boolean_serialize { # fake_outer_composite_serialize # # -# +# # @param OuterComposite $outer_composite Input composite as post body (optional) { my $params = { @@ -254,7 +254,7 @@ sub fake_outer_boolean_serialize { required => '0', }, }; - __PACKAGE__->method_documentation->{ 'fake_outer_composite_serialize' } = { + __PACKAGE__->method_documentation->{ 'fake_outer_composite_serialize' } = { summary => '', params => $params, returns => 'OuterComposite', @@ -304,7 +304,7 @@ sub fake_outer_composite_serialize { # fake_outer_number_serialize # # -# +# # @param double $body Input number as post body (optional) { my $params = { @@ -314,7 +314,7 @@ sub fake_outer_composite_serialize { required => '0', }, }; - __PACKAGE__->method_documentation->{ 'fake_outer_number_serialize' } = { + __PACKAGE__->method_documentation->{ 'fake_outer_number_serialize' } = { summary => '', params => $params, returns => 'double', @@ -364,7 +364,7 @@ sub fake_outer_number_serialize { # fake_outer_string_serialize # # -# +# # @param string $body Input string as post body (optional) { my $params = { @@ -374,7 +374,7 @@ sub fake_outer_number_serialize { required => '0', }, }; - __PACKAGE__->method_documentation->{ 'fake_outer_string_serialize' } = { + __PACKAGE__->method_documentation->{ 'fake_outer_string_serialize' } = { summary => '', params => $params, returns => 'string', @@ -424,7 +424,7 @@ sub fake_outer_string_serialize { # fake_property_enum_integer_serialize # # -# +# # @param OuterObjectWithEnumProperty $outer_object_with_enum_property Input enum (int) as post body (required) { my $params = { @@ -434,7 +434,7 @@ sub fake_outer_string_serialize { required => '1', }, }; - __PACKAGE__->method_documentation->{ 'fake_property_enum_integer_serialize' } = { + __PACKAGE__->method_documentation->{ 'fake_property_enum_integer_serialize' } = { summary => '', params => $params, returns => 'OuterObjectWithEnumProperty', @@ -489,7 +489,7 @@ sub fake_property_enum_integer_serialize { # test_body_with_binary # # -# +# # @param string $body image to upload (required) { my $params = { @@ -499,7 +499,7 @@ sub fake_property_enum_integer_serialize { required => '1', }, }; - __PACKAGE__->method_documentation->{ 'test_body_with_binary' } = { + __PACKAGE__->method_documentation->{ 'test_body_with_binary' } = { summary => '', params => $params, returns => undef, @@ -545,7 +545,7 @@ sub test_body_with_binary { # test_body_with_file_schema # # -# +# # @param FileSchemaTestClass $file_schema_test_class (required) { my $params = { @@ -555,7 +555,7 @@ sub test_body_with_binary { required => '1', }, }; - __PACKAGE__->method_documentation->{ 'test_body_with_file_schema' } = { + __PACKAGE__->method_documentation->{ 'test_body_with_file_schema' } = { summary => '', params => $params, returns => undef, @@ -606,7 +606,7 @@ sub test_body_with_file_schema { # test_body_with_query_params # # -# +# # @param string $query (required) # @param User $user (required) { @@ -622,7 +622,7 @@ sub test_body_with_file_schema { required => '1', }, }; - __PACKAGE__->method_documentation->{ 'test_body_with_query_params' } = { + __PACKAGE__->method_documentation->{ 'test_body_with_query_params' } = { summary => '', params => $params, returns => undef, @@ -683,7 +683,7 @@ sub test_body_with_query_params { # test_client_model # # To test \"client\" model -# +# # @param Client $client client model (required) { my $params = { @@ -693,7 +693,7 @@ sub test_body_with_query_params { required => '1', }, }; - __PACKAGE__->method_documentation->{ 'test_client_model' } = { + __PACKAGE__->method_documentation->{ 'test_client_model' } = { summary => 'To test \"client\" model', params => $params, returns => 'Client', @@ -748,7 +748,7 @@ sub test_client_model { # test_endpoint_parameters # # Fake endpoint for testing various parameters å‡ç«¯é»ž å½ã®ã‚¨ãƒ³ãƒ‰ãƒã‚¤ãƒ³ãƒˆ 가짜 엔드 í¬ì¸íЏ -# +# # @param double $number None (required) # @param double $double None (required) # @param string $pattern_without_delimiter None (required) @@ -836,7 +836,7 @@ sub test_client_model { required => '0', }, }; - __PACKAGE__->method_documentation->{ 'test_endpoint_parameters' } = { + __PACKAGE__->method_documentation->{ 'test_endpoint_parameters' } = { summary => 'Fake endpoint for testing various parameters å‡ç«¯é»ž å½ã®ã‚¨ãƒ³ãƒ‰ãƒã‚¤ãƒ³ãƒˆ 가짜 엔드 í¬ì¸íЏ ', params => $params, returns => undef, @@ -886,73 +886,73 @@ sub test_endpoint_parameters { if ( exists $args{'integer'} ) { $form_params->{'integer'} = $self->{api_client}->to_form_value($args{'integer'}); } - + # form params if ( exists $args{'int32'} ) { $form_params->{'int32'} = $self->{api_client}->to_form_value($args{'int32'}); } - + # form params if ( exists $args{'int64'} ) { $form_params->{'int64'} = $self->{api_client}->to_form_value($args{'int64'}); } - + # form params if ( exists $args{'number'} ) { $form_params->{'number'} = $self->{api_client}->to_form_value($args{'number'}); } - + # form params if ( exists $args{'float'} ) { $form_params->{'float'} = $self->{api_client}->to_form_value($args{'float'}); } - + # form params if ( exists $args{'double'} ) { $form_params->{'double'} = $self->{api_client}->to_form_value($args{'double'}); } - + # form params if ( exists $args{'string'} ) { $form_params->{'string'} = $self->{api_client}->to_form_value($args{'string'}); } - + # form params if ( exists $args{'pattern_without_delimiter'} ) { $form_params->{'pattern_without_delimiter'} = $self->{api_client}->to_form_value($args{'pattern_without_delimiter'}); } - + # form params if ( exists $args{'byte'} ) { $form_params->{'byte'} = $self->{api_client}->to_form_value($args{'byte'}); } - + # form params if ( exists $args{'binary'} ) { $form_params->{'binary'} = [] unless defined $form_params->{'binary'}; push @{$form_params->{'binary'}}, $args{'binary'}; } - + # form params if ( exists $args{'date'} ) { $form_params->{'date'} = $self->{api_client}->to_form_value($args{'date'}); } - + # form params if ( exists $args{'date_time'} ) { $form_params->{'dateTime'} = $self->{api_client}->to_form_value($args{'date_time'}); } - + # form params if ( exists $args{'password'} ) { $form_params->{'password'} = $self->{api_client}->to_form_value($args{'password'}); } - + # form params if ( exists $args{'callback'} ) { $form_params->{'callback'} = $self->{api_client}->to_form_value($args{'callback'}); } - + my $_body_data; # authentication setting, if any my $auth_settings = [qw(http_basic_test )]; @@ -968,7 +968,7 @@ sub test_endpoint_parameters { # test_enum_parameters # # To test enum parameters -# +# # @param ARRAY[string] $enum_header_string_array Header parameter enum test (string array) (optional) # @param string $enum_header_string Header parameter enum test (string) (optional, default to '-efg') # @param ARRAY[string] $enum_query_string_array Query parameter enum test (string array) (optional) @@ -1020,7 +1020,7 @@ sub test_endpoint_parameters { required => '0', }, }; - __PACKAGE__->method_documentation->{ 'test_enum_parameters' } = { + __PACKAGE__->method_documentation->{ 'test_enum_parameters' } = { summary => 'To test enum parameters', params => $params, returns => undef, @@ -1080,12 +1080,12 @@ sub test_enum_parameters { if ( exists $args{'enum_form_string_array'} ) { $form_params->{'enum_form_string_array'} = $self->{api_client}->to_form_value($args{'enum_form_string_array'}); } - + # form params if ( exists $args{'enum_form_string'} ) { $form_params->{'enum_form_string'} = $self->{api_client}->to_form_value($args{'enum_form_string'}); } - + my $_body_data; # authentication setting, if any my $auth_settings = [qw()]; @@ -1101,7 +1101,7 @@ sub test_enum_parameters { # test_group_parameters # # Fake endpoint to test group parameters (optional) -# +# # @param int $required_string_group Required String in group parameters (required) # @param boolean $required_boolean_group Required Boolean in group parameters (required) # @param int $required_int64_group Required Integer in group parameters (required) @@ -1141,7 +1141,7 @@ sub test_enum_parameters { required => '0', }, }; - __PACKAGE__->method_documentation->{ 'test_group_parameters' } = { + __PACKAGE__->method_documentation->{ 'test_group_parameters' } = { summary => 'Fake endpoint to test group parameters (optional)', params => $params, returns => undef, @@ -1227,7 +1227,7 @@ sub test_group_parameters { # test_inline_additional_properties # # test inline additionalProperties -# +# # @param HASH[string,string] $request_body request body (required) { my $params = { @@ -1237,7 +1237,7 @@ sub test_group_parameters { required => '1', }, }; - __PACKAGE__->method_documentation->{ 'test_inline_additional_properties' } = { + __PACKAGE__->method_documentation->{ 'test_inline_additional_properties' } = { summary => 'test inline additionalProperties', params => $params, returns => undef, @@ -1288,7 +1288,7 @@ sub test_inline_additional_properties { # test_json_form_data # # test json serialization of form data -# +# # @param string $param field1 (required) # @param string $param2 field2 (required) { @@ -1304,7 +1304,7 @@ sub test_inline_additional_properties { required => '1', }, }; - __PACKAGE__->method_documentation->{ 'test_json_form_data' } = { + __PACKAGE__->method_documentation->{ 'test_json_form_data' } = { summary => 'test json serialization of form data', params => $params, returns => undef, @@ -1344,12 +1344,12 @@ sub test_json_form_data { if ( exists $args{'param'} ) { $form_params->{'param'} = $self->{api_client}->to_form_value($args{'param'}); } - + # form params if ( exists $args{'param2'} ) { $form_params->{'param2'} = $self->{api_client}->to_form_value($args{'param2'}); } - + my $_body_data; # authentication setting, if any my $auth_settings = [qw()]; @@ -1365,7 +1365,7 @@ sub test_json_form_data { # test_query_parameter_collection_format # # -# +# # @param ARRAY[string] $pipe (required) # @param ARRAY[string] $ioutil (required) # @param ARRAY[string] $http (required) @@ -1399,7 +1399,7 @@ sub test_json_form_data { required => '1', }, }; - __PACKAGE__->method_documentation->{ 'test_query_parameter_collection_format' } = { + __PACKAGE__->method_documentation->{ 'test_query_parameter_collection_format' } = { summary => '', params => $params, returns => undef, diff --git a/samples/client/petstore/perl/lib/WWW/OpenAPIClient/FakeClassnameTags123Api.pm b/samples/client/petstore/perl/lib/WWW/OpenAPIClient/FakeClassnameTags123Api.pm index c521d2c5758f38bc8e11d779535a26186b20bcd8..6bed4ef5f0c0f58e15f38794eb662b4617ea1ca7 100644 --- a/samples/client/petstore/perl/lib/WWW/OpenAPIClient/FakeClassnameTags123Api.pm +++ b/samples/client/petstore/perl/lib/WWW/OpenAPIClient/FakeClassnameTags123Api.pm @@ -22,7 +22,7 @@ package WWW::OpenAPIClient::FakeClassnameTags123Api; require 5.6.0; use strict; use warnings; -use utf8; +use utf8; use Exporter; use Carp qw( croak ); use Log::Any qw($log); @@ -52,7 +52,7 @@ sub new { # test_classname # # To test class name in snake case -# +# # @param Client $client client model (required) { my $params = { @@ -62,7 +62,7 @@ sub new { required => '1', }, }; - __PACKAGE__->method_documentation->{ 'test_classname' } = { + __PACKAGE__->method_documentation->{ 'test_classname' } = { summary => 'To test class name in snake case', params => $params, returns => 'Client', diff --git a/samples/client/petstore/perl/lib/WWW/OpenAPIClient/Object/AdditionalPropertiesClass.pm b/samples/client/petstore/perl/lib/WWW/OpenAPIClient/Object/AdditionalPropertiesClass.pm index 3bbbceeb84bc66049d3f4b963d40ffbfd5d8c253..80616971f55f1019f4c1054e04aa9b29ed4242ab 100644 --- a/samples/client/petstore/perl/lib/WWW/OpenAPIClient/Object/AdditionalPropertiesClass.pm +++ b/samples/client/petstore/perl/lib/WWW/OpenAPIClient/Object/AdditionalPropertiesClass.pm @@ -61,17 +61,17 @@ Generated by: https://openapi-generator.tech # __PACKAGE__->mk_classdata('attribute_map' => {}); __PACKAGE__->mk_classdata('openapi_types' => {}); -__PACKAGE__->mk_classdata('method_documentation' => {}); +__PACKAGE__->mk_classdata('method_documentation' => {}); __PACKAGE__->mk_classdata('class_documentation' => {}); # new plain object -sub new { - my ($class, %args) = @_; +sub new { + my ($class, %args) = @_; my $self = bless {}, $class; $self->init(%args); - + return $self; } @@ -95,7 +95,7 @@ sub to_hash { } # used by JSON for serialization -sub TO_JSON { +sub TO_JSON { my $self = shift; my $_data = {}; foreach my $_key (keys %{$self->attribute_map}) { @@ -113,7 +113,7 @@ sub from_hash { # loop through attributes and use openapi_types to deserialize the data while ( my ($_key, $_type) = each %{$self->openapi_types} ) { - my $_json_attribute = $self->attribute_map->{$_key}; + my $_json_attribute = $self->attribute_map->{$_key}; if ($_type =~ /^array\[(.+)\]$/i) { # array my $_subclass = $1; my @_array = (); @@ -134,7 +134,7 @@ sub from_hash { $log->debugf("Warning: %s (%s) does not exist in input hash\n", $_key, $_json_attribute); } } - + return $self; } @@ -154,7 +154,6 @@ sub _deserialize { } - __PACKAGE__->class_documentation({description => '', class => 'AdditionalPropertiesClass', required => [], # TODO diff --git a/samples/client/petstore/perl/lib/WWW/OpenAPIClient/Object/Animal.pm b/samples/client/petstore/perl/lib/WWW/OpenAPIClient/Object/Animal.pm index 15d93a053251e61445ebfe686800aa216a35ca1e..c84ba835dca0dad11a90b212c366a9776848b3a7 100644 --- a/samples/client/petstore/perl/lib/WWW/OpenAPIClient/Object/Animal.pm +++ b/samples/client/petstore/perl/lib/WWW/OpenAPIClient/Object/Animal.pm @@ -61,17 +61,17 @@ Generated by: https://openapi-generator.tech # __PACKAGE__->mk_classdata('attribute_map' => {}); __PACKAGE__->mk_classdata('openapi_types' => {}); -__PACKAGE__->mk_classdata('method_documentation' => {}); +__PACKAGE__->mk_classdata('method_documentation' => {}); __PACKAGE__->mk_classdata('class_documentation' => {}); # new plain object -sub new { - my ($class, %args) = @_; +sub new { + my ($class, %args) = @_; my $self = bless {}, $class; $self->init(%args); - + return $self; } @@ -95,7 +95,7 @@ sub to_hash { } # used by JSON for serialization -sub TO_JSON { +sub TO_JSON { my $self = shift; my $_data = {}; foreach my $_key (keys %{$self->attribute_map}) { @@ -113,7 +113,7 @@ sub from_hash { # loop through attributes and use openapi_types to deserialize the data while ( my ($_key, $_type) = each %{$self->openapi_types} ) { - my $_json_attribute = $self->attribute_map->{$_key}; + my $_json_attribute = $self->attribute_map->{$_key}; if ($_type =~ /^array\[(.+)\]$/i) { # array my $_subclass = $1; my @_array = (); @@ -134,7 +134,7 @@ sub from_hash { $log->debugf("Warning: %s (%s) does not exist in input hash\n", $_key, $_json_attribute); } } - + return $self; } @@ -154,7 +154,6 @@ sub _deserialize { } - __PACKAGE__->class_documentation({description => '', class => 'Animal', required => [], # TODO diff --git a/samples/client/petstore/perl/lib/WWW/OpenAPIClient/Object/ApiResponse.pm b/samples/client/petstore/perl/lib/WWW/OpenAPIClient/Object/ApiResponse.pm index 673b1954e3bf7604ccf92a7e7abd2f509c8e72da..be5106973085c6c79c4f6deaadcaa8cc8e7e2e6e 100644 --- a/samples/client/petstore/perl/lib/WWW/OpenAPIClient/Object/ApiResponse.pm +++ b/samples/client/petstore/perl/lib/WWW/OpenAPIClient/Object/ApiResponse.pm @@ -61,17 +61,17 @@ Generated by: https://openapi-generator.tech # __PACKAGE__->mk_classdata('attribute_map' => {}); __PACKAGE__->mk_classdata('openapi_types' => {}); -__PACKAGE__->mk_classdata('method_documentation' => {}); +__PACKAGE__->mk_classdata('method_documentation' => {}); __PACKAGE__->mk_classdata('class_documentation' => {}); # new plain object -sub new { - my ($class, %args) = @_; +sub new { + my ($class, %args) = @_; my $self = bless {}, $class; $self->init(%args); - + return $self; } @@ -95,7 +95,7 @@ sub to_hash { } # used by JSON for serialization -sub TO_JSON { +sub TO_JSON { my $self = shift; my $_data = {}; foreach my $_key (keys %{$self->attribute_map}) { @@ -113,7 +113,7 @@ sub from_hash { # loop through attributes and use openapi_types to deserialize the data while ( my ($_key, $_type) = each %{$self->openapi_types} ) { - my $_json_attribute = $self->attribute_map->{$_key}; + my $_json_attribute = $self->attribute_map->{$_key}; if ($_type =~ /^array\[(.+)\]$/i) { # array my $_subclass = $1; my @_array = (); @@ -134,7 +134,7 @@ sub from_hash { $log->debugf("Warning: %s (%s) does not exist in input hash\n", $_key, $_json_attribute); } } - + return $self; } @@ -154,7 +154,6 @@ sub _deserialize { } - __PACKAGE__->class_documentation({description => '', class => 'ApiResponse', required => [], # TODO diff --git a/samples/client/petstore/perl/lib/WWW/OpenAPIClient/Object/ArrayOfArrayOfNumberOnly.pm b/samples/client/petstore/perl/lib/WWW/OpenAPIClient/Object/ArrayOfArrayOfNumberOnly.pm index 89f25673a038af3052a5342afcb09a716da8e635..710a8c450ab8ab401d5aca00609e559415cd3bb6 100644 --- a/samples/client/petstore/perl/lib/WWW/OpenAPIClient/Object/ArrayOfArrayOfNumberOnly.pm +++ b/samples/client/petstore/perl/lib/WWW/OpenAPIClient/Object/ArrayOfArrayOfNumberOnly.pm @@ -61,17 +61,17 @@ Generated by: https://openapi-generator.tech # __PACKAGE__->mk_classdata('attribute_map' => {}); __PACKAGE__->mk_classdata('openapi_types' => {}); -__PACKAGE__->mk_classdata('method_documentation' => {}); +__PACKAGE__->mk_classdata('method_documentation' => {}); __PACKAGE__->mk_classdata('class_documentation' => {}); # new plain object -sub new { - my ($class, %args) = @_; +sub new { + my ($class, %args) = @_; my $self = bless {}, $class; $self->init(%args); - + return $self; } @@ -95,7 +95,7 @@ sub to_hash { } # used by JSON for serialization -sub TO_JSON { +sub TO_JSON { my $self = shift; my $_data = {}; foreach my $_key (keys %{$self->attribute_map}) { @@ -113,7 +113,7 @@ sub from_hash { # loop through attributes and use openapi_types to deserialize the data while ( my ($_key, $_type) = each %{$self->openapi_types} ) { - my $_json_attribute = $self->attribute_map->{$_key}; + my $_json_attribute = $self->attribute_map->{$_key}; if ($_type =~ /^array\[(.+)\]$/i) { # array my $_subclass = $1; my @_array = (); @@ -134,7 +134,7 @@ sub from_hash { $log->debugf("Warning: %s (%s) does not exist in input hash\n", $_key, $_json_attribute); } } - + return $self; } @@ -154,7 +154,6 @@ sub _deserialize { } - __PACKAGE__->class_documentation({description => '', class => 'ArrayOfArrayOfNumberOnly', required => [], # TODO diff --git a/samples/client/petstore/perl/lib/WWW/OpenAPIClient/Object/ArrayOfNumberOnly.pm b/samples/client/petstore/perl/lib/WWW/OpenAPIClient/Object/ArrayOfNumberOnly.pm index 20d4ce4299f87b6ed404613d2407aabbb7295956..02cbce5acf36cb287e47d1c6e84e4b53a1786df6 100644 --- a/samples/client/petstore/perl/lib/WWW/OpenAPIClient/Object/ArrayOfNumberOnly.pm +++ b/samples/client/petstore/perl/lib/WWW/OpenAPIClient/Object/ArrayOfNumberOnly.pm @@ -61,17 +61,17 @@ Generated by: https://openapi-generator.tech # __PACKAGE__->mk_classdata('attribute_map' => {}); __PACKAGE__->mk_classdata('openapi_types' => {}); -__PACKAGE__->mk_classdata('method_documentation' => {}); +__PACKAGE__->mk_classdata('method_documentation' => {}); __PACKAGE__->mk_classdata('class_documentation' => {}); # new plain object -sub new { - my ($class, %args) = @_; +sub new { + my ($class, %args) = @_; my $self = bless {}, $class; $self->init(%args); - + return $self; } @@ -95,7 +95,7 @@ sub to_hash { } # used by JSON for serialization -sub TO_JSON { +sub TO_JSON { my $self = shift; my $_data = {}; foreach my $_key (keys %{$self->attribute_map}) { @@ -113,7 +113,7 @@ sub from_hash { # loop through attributes and use openapi_types to deserialize the data while ( my ($_key, $_type) = each %{$self->openapi_types} ) { - my $_json_attribute = $self->attribute_map->{$_key}; + my $_json_attribute = $self->attribute_map->{$_key}; if ($_type =~ /^array\[(.+)\]$/i) { # array my $_subclass = $1; my @_array = (); @@ -134,7 +134,7 @@ sub from_hash { $log->debugf("Warning: %s (%s) does not exist in input hash\n", $_key, $_json_attribute); } } - + return $self; } @@ -154,7 +154,6 @@ sub _deserialize { } - __PACKAGE__->class_documentation({description => '', class => 'ArrayOfNumberOnly', required => [], # TODO diff --git a/samples/client/petstore/perl/lib/WWW/OpenAPIClient/Object/ArrayTest.pm b/samples/client/petstore/perl/lib/WWW/OpenAPIClient/Object/ArrayTest.pm index 3ea06c42ee79fd6d583bcb4e009ba2c662ed0537..c264d79a98b9ff7b03be80bf176c731eee3ac70d 100644 --- a/samples/client/petstore/perl/lib/WWW/OpenAPIClient/Object/ArrayTest.pm +++ b/samples/client/petstore/perl/lib/WWW/OpenAPIClient/Object/ArrayTest.pm @@ -62,17 +62,17 @@ Generated by: https://openapi-generator.tech # __PACKAGE__->mk_classdata('attribute_map' => {}); __PACKAGE__->mk_classdata('openapi_types' => {}); -__PACKAGE__->mk_classdata('method_documentation' => {}); +__PACKAGE__->mk_classdata('method_documentation' => {}); __PACKAGE__->mk_classdata('class_documentation' => {}); # new plain object -sub new { - my ($class, %args) = @_; +sub new { + my ($class, %args) = @_; my $self = bless {}, $class; $self->init(%args); - + return $self; } @@ -96,7 +96,7 @@ sub to_hash { } # used by JSON for serialization -sub TO_JSON { +sub TO_JSON { my $self = shift; my $_data = {}; foreach my $_key (keys %{$self->attribute_map}) { @@ -114,7 +114,7 @@ sub from_hash { # loop through attributes and use openapi_types to deserialize the data while ( my ($_key, $_type) = each %{$self->openapi_types} ) { - my $_json_attribute = $self->attribute_map->{$_key}; + my $_json_attribute = $self->attribute_map->{$_key}; if ($_type =~ /^array\[(.+)\]$/i) { # array my $_subclass = $1; my @_array = (); @@ -135,7 +135,7 @@ sub from_hash { $log->debugf("Warning: %s (%s) does not exist in input hash\n", $_key, $_json_attribute); } } - + return $self; } @@ -155,7 +155,6 @@ sub _deserialize { } - __PACKAGE__->class_documentation({description => '', class => 'ArrayTest', required => [], # TODO diff --git a/samples/client/petstore/perl/lib/WWW/OpenAPIClient/Object/Capitalization.pm b/samples/client/petstore/perl/lib/WWW/OpenAPIClient/Object/Capitalization.pm index 59165095981301e52d65f3f5c9a930b65573f5d2..3ccae2f45c275ddd6195a57ab1556ab0183faa62 100644 --- a/samples/client/petstore/perl/lib/WWW/OpenAPIClient/Object/Capitalization.pm +++ b/samples/client/petstore/perl/lib/WWW/OpenAPIClient/Object/Capitalization.pm @@ -61,17 +61,17 @@ Generated by: https://openapi-generator.tech # __PACKAGE__->mk_classdata('attribute_map' => {}); __PACKAGE__->mk_classdata('openapi_types' => {}); -__PACKAGE__->mk_classdata('method_documentation' => {}); +__PACKAGE__->mk_classdata('method_documentation' => {}); __PACKAGE__->mk_classdata('class_documentation' => {}); # new plain object -sub new { - my ($class, %args) = @_; +sub new { + my ($class, %args) = @_; my $self = bless {}, $class; $self->init(%args); - + return $self; } @@ -95,7 +95,7 @@ sub to_hash { } # used by JSON for serialization -sub TO_JSON { +sub TO_JSON { my $self = shift; my $_data = {}; foreach my $_key (keys %{$self->attribute_map}) { @@ -113,7 +113,7 @@ sub from_hash { # loop through attributes and use openapi_types to deserialize the data while ( my ($_key, $_type) = each %{$self->openapi_types} ) { - my $_json_attribute = $self->attribute_map->{$_key}; + my $_json_attribute = $self->attribute_map->{$_key}; if ($_type =~ /^array\[(.+)\]$/i) { # array my $_subclass = $1; my @_array = (); @@ -134,7 +134,7 @@ sub from_hash { $log->debugf("Warning: %s (%s) does not exist in input hash\n", $_key, $_json_attribute); } } - + return $self; } @@ -154,7 +154,6 @@ sub _deserialize { } - __PACKAGE__->class_documentation({description => '', class => 'Capitalization', required => [], # TODO diff --git a/samples/client/petstore/perl/lib/WWW/OpenAPIClient/Object/Cat.pm b/samples/client/petstore/perl/lib/WWW/OpenAPIClient/Object/Cat.pm index 69f331f0ba954c064604df1fcef211bd1223c803..a3bc7cadfb0527484f80a630791dac8ae9bcc70c 100644 --- a/samples/client/petstore/perl/lib/WWW/OpenAPIClient/Object/Cat.pm +++ b/samples/client/petstore/perl/lib/WWW/OpenAPIClient/Object/Cat.pm @@ -63,17 +63,17 @@ Generated by: https://openapi-generator.tech # __PACKAGE__->mk_classdata('attribute_map' => {}); __PACKAGE__->mk_classdata('openapi_types' => {}); -__PACKAGE__->mk_classdata('method_documentation' => {}); +__PACKAGE__->mk_classdata('method_documentation' => {}); __PACKAGE__->mk_classdata('class_documentation' => {}); # new plain object -sub new { - my ($class, %args) = @_; +sub new { + my ($class, %args) = @_; my $self = bless {}, $class; $self->init(%args); - + return $self; } @@ -103,7 +103,7 @@ sub to_hash { } # used by JSON for serialization -sub TO_JSON { +sub TO_JSON { my $self = shift; my $_data = {}; foreach my $_key (keys %{$self->attribute_map}) { @@ -124,7 +124,7 @@ sub from_hash { # loop through attributes and use openapi_types to deserialize the data while ( my ($_key, $_type) = each %{$self->openapi_types} ) { - my $_json_attribute = $self->attribute_map->{$_key}; + my $_json_attribute = $self->attribute_map->{$_key}; if ($_type =~ /^array\[(.+)\]$/i) { # array my $_subclass = $1; my @_array = (); @@ -148,7 +148,7 @@ sub from_hash { # call parent (Animal) from_hash $self->WWW::OpenAPIClient::Object::Animal::from_hash($hash); - + return $self; } @@ -168,7 +168,6 @@ sub _deserialize { } - __PACKAGE__->class_documentation({description => '', class => 'Cat', required => [], # TODO diff --git a/samples/client/petstore/perl/lib/WWW/OpenAPIClient/Object/CatAllOf.pm b/samples/client/petstore/perl/lib/WWW/OpenAPIClient/Object/CatAllOf.pm index 0e30dfe8a3dbb6d1846c6fbcd275e7d8184dcc2b..756a3277fdb540e24856bf0b279a0f0337368e38 100644 --- a/samples/client/petstore/perl/lib/WWW/OpenAPIClient/Object/CatAllOf.pm +++ b/samples/client/petstore/perl/lib/WWW/OpenAPIClient/Object/CatAllOf.pm @@ -61,17 +61,17 @@ Generated by: https://openapi-generator.tech # __PACKAGE__->mk_classdata('attribute_map' => {}); __PACKAGE__->mk_classdata('openapi_types' => {}); -__PACKAGE__->mk_classdata('method_documentation' => {}); +__PACKAGE__->mk_classdata('method_documentation' => {}); __PACKAGE__->mk_classdata('class_documentation' => {}); # new plain object -sub new { - my ($class, %args) = @_; +sub new { + my ($class, %args) = @_; my $self = bless {}, $class; $self->init(%args); - + return $self; } @@ -95,7 +95,7 @@ sub to_hash { } # used by JSON for serialization -sub TO_JSON { +sub TO_JSON { my $self = shift; my $_data = {}; foreach my $_key (keys %{$self->attribute_map}) { @@ -113,7 +113,7 @@ sub from_hash { # loop through attributes and use openapi_types to deserialize the data while ( my ($_key, $_type) = each %{$self->openapi_types} ) { - my $_json_attribute = $self->attribute_map->{$_key}; + my $_json_attribute = $self->attribute_map->{$_key}; if ($_type =~ /^array\[(.+)\]$/i) { # array my $_subclass = $1; my @_array = (); @@ -134,7 +134,7 @@ sub from_hash { $log->debugf("Warning: %s (%s) does not exist in input hash\n", $_key, $_json_attribute); } } - + return $self; } @@ -154,7 +154,6 @@ sub _deserialize { } - __PACKAGE__->class_documentation({description => '', class => 'CatAllOf', required => [], # TODO diff --git a/samples/client/petstore/perl/lib/WWW/OpenAPIClient/Object/Category.pm b/samples/client/petstore/perl/lib/WWW/OpenAPIClient/Object/Category.pm index f83ccda5a96cc0b60422f734f8971a8ac350bb91..ba7781f9685c2bae2eae0aec9ea73a4e2a59ec57 100644 --- a/samples/client/petstore/perl/lib/WWW/OpenAPIClient/Object/Category.pm +++ b/samples/client/petstore/perl/lib/WWW/OpenAPIClient/Object/Category.pm @@ -61,17 +61,17 @@ Generated by: https://openapi-generator.tech # __PACKAGE__->mk_classdata('attribute_map' => {}); __PACKAGE__->mk_classdata('openapi_types' => {}); -__PACKAGE__->mk_classdata('method_documentation' => {}); +__PACKAGE__->mk_classdata('method_documentation' => {}); __PACKAGE__->mk_classdata('class_documentation' => {}); # new plain object -sub new { - my ($class, %args) = @_; +sub new { + my ($class, %args) = @_; my $self = bless {}, $class; $self->init(%args); - + return $self; } @@ -95,7 +95,7 @@ sub to_hash { } # used by JSON for serialization -sub TO_JSON { +sub TO_JSON { my $self = shift; my $_data = {}; foreach my $_key (keys %{$self->attribute_map}) { @@ -113,7 +113,7 @@ sub from_hash { # loop through attributes and use openapi_types to deserialize the data while ( my ($_key, $_type) = each %{$self->openapi_types} ) { - my $_json_attribute = $self->attribute_map->{$_key}; + my $_json_attribute = $self->attribute_map->{$_key}; if ($_type =~ /^array\[(.+)\]$/i) { # array my $_subclass = $1; my @_array = (); @@ -134,7 +134,7 @@ sub from_hash { $log->debugf("Warning: %s (%s) does not exist in input hash\n", $_key, $_json_attribute); } } - + return $self; } @@ -154,7 +154,6 @@ sub _deserialize { } - __PACKAGE__->class_documentation({description => '', class => 'Category', required => [], # TODO diff --git a/samples/client/petstore/perl/lib/WWW/OpenAPIClient/Object/ClassModel.pm b/samples/client/petstore/perl/lib/WWW/OpenAPIClient/Object/ClassModel.pm index 6d4995336ce072a046ec0b91fa7b49815f842f7e..43466b5250783c0266cb4fd6ae07ca0680a9e885 100644 --- a/samples/client/petstore/perl/lib/WWW/OpenAPIClient/Object/ClassModel.pm +++ b/samples/client/petstore/perl/lib/WWW/OpenAPIClient/Object/ClassModel.pm @@ -61,17 +61,17 @@ Generated by: https://openapi-generator.tech # __PACKAGE__->mk_classdata('attribute_map' => {}); __PACKAGE__->mk_classdata('openapi_types' => {}); -__PACKAGE__->mk_classdata('method_documentation' => {}); +__PACKAGE__->mk_classdata('method_documentation' => {}); __PACKAGE__->mk_classdata('class_documentation' => {}); # new plain object -sub new { - my ($class, %args) = @_; +sub new { + my ($class, %args) = @_; my $self = bless {}, $class; $self->init(%args); - + return $self; } @@ -95,7 +95,7 @@ sub to_hash { } # used by JSON for serialization -sub TO_JSON { +sub TO_JSON { my $self = shift; my $_data = {}; foreach my $_key (keys %{$self->attribute_map}) { @@ -113,7 +113,7 @@ sub from_hash { # loop through attributes and use openapi_types to deserialize the data while ( my ($_key, $_type) = each %{$self->openapi_types} ) { - my $_json_attribute = $self->attribute_map->{$_key}; + my $_json_attribute = $self->attribute_map->{$_key}; if ($_type =~ /^array\[(.+)\]$/i) { # array my $_subclass = $1; my @_array = (); @@ -134,7 +134,7 @@ sub from_hash { $log->debugf("Warning: %s (%s) does not exist in input hash\n", $_key, $_json_attribute); } } - + return $self; } @@ -154,7 +154,6 @@ sub _deserialize { } - __PACKAGE__->class_documentation({description => 'Model for testing model with \"_class\" property', class => 'ClassModel', required => [], # TODO diff --git a/samples/client/petstore/perl/lib/WWW/OpenAPIClient/Object/Client.pm b/samples/client/petstore/perl/lib/WWW/OpenAPIClient/Object/Client.pm index f4989a15608f9cfcfe7beb4b9bb3971dff65a8ab..a60ed0bbbf349be57b091e90dceddf135c2a1a18 100644 --- a/samples/client/petstore/perl/lib/WWW/OpenAPIClient/Object/Client.pm +++ b/samples/client/petstore/perl/lib/WWW/OpenAPIClient/Object/Client.pm @@ -61,17 +61,17 @@ Generated by: https://openapi-generator.tech # __PACKAGE__->mk_classdata('attribute_map' => {}); __PACKAGE__->mk_classdata('openapi_types' => {}); -__PACKAGE__->mk_classdata('method_documentation' => {}); +__PACKAGE__->mk_classdata('method_documentation' => {}); __PACKAGE__->mk_classdata('class_documentation' => {}); # new plain object -sub new { - my ($class, %args) = @_; +sub new { + my ($class, %args) = @_; my $self = bless {}, $class; $self->init(%args); - + return $self; } @@ -95,7 +95,7 @@ sub to_hash { } # used by JSON for serialization -sub TO_JSON { +sub TO_JSON { my $self = shift; my $_data = {}; foreach my $_key (keys %{$self->attribute_map}) { @@ -113,7 +113,7 @@ sub from_hash { # loop through attributes and use openapi_types to deserialize the data while ( my ($_key, $_type) = each %{$self->openapi_types} ) { - my $_json_attribute = $self->attribute_map->{$_key}; + my $_json_attribute = $self->attribute_map->{$_key}; if ($_type =~ /^array\[(.+)\]$/i) { # array my $_subclass = $1; my @_array = (); @@ -134,7 +134,7 @@ sub from_hash { $log->debugf("Warning: %s (%s) does not exist in input hash\n", $_key, $_json_attribute); } } - + return $self; } @@ -154,7 +154,6 @@ sub _deserialize { } - __PACKAGE__->class_documentation({description => '', class => 'Client', required => [], # TODO diff --git a/samples/client/petstore/perl/lib/WWW/OpenAPIClient/Object/DeprecatedObject.pm b/samples/client/petstore/perl/lib/WWW/OpenAPIClient/Object/DeprecatedObject.pm index 7cf7d36aa7efd9271c138fa2eb57444342ef28a5..cd1e7e6bde1ba7762b8bedc45cf11ad34678998f 100644 --- a/samples/client/petstore/perl/lib/WWW/OpenAPIClient/Object/DeprecatedObject.pm +++ b/samples/client/petstore/perl/lib/WWW/OpenAPIClient/Object/DeprecatedObject.pm @@ -61,17 +61,17 @@ Generated by: https://openapi-generator.tech # __PACKAGE__->mk_classdata('attribute_map' => {}); __PACKAGE__->mk_classdata('openapi_types' => {}); -__PACKAGE__->mk_classdata('method_documentation' => {}); +__PACKAGE__->mk_classdata('method_documentation' => {}); __PACKAGE__->mk_classdata('class_documentation' => {}); # new plain object -sub new { - my ($class, %args) = @_; +sub new { + my ($class, %args) = @_; my $self = bless {}, $class; $self->init(%args); - + return $self; } @@ -95,7 +95,7 @@ sub to_hash { } # used by JSON for serialization -sub TO_JSON { +sub TO_JSON { my $self = shift; my $_data = {}; foreach my $_key (keys %{$self->attribute_map}) { @@ -113,7 +113,7 @@ sub from_hash { # loop through attributes and use openapi_types to deserialize the data while ( my ($_key, $_type) = each %{$self->openapi_types} ) { - my $_json_attribute = $self->attribute_map->{$_key}; + my $_json_attribute = $self->attribute_map->{$_key}; if ($_type =~ /^array\[(.+)\]$/i) { # array my $_subclass = $1; my @_array = (); @@ -134,7 +134,7 @@ sub from_hash { $log->debugf("Warning: %s (%s) does not exist in input hash\n", $_key, $_json_attribute); } } - + return $self; } @@ -154,7 +154,6 @@ sub _deserialize { } - __PACKAGE__->class_documentation({description => '', class => 'DeprecatedObject', required => [], # TODO diff --git a/samples/client/petstore/perl/lib/WWW/OpenAPIClient/Object/Dog.pm b/samples/client/petstore/perl/lib/WWW/OpenAPIClient/Object/Dog.pm index 5b10bbfc0ff3aeea8b5bd709450322646973b1ae..ab74ace57760d7820d881c019966d6fb06f34ecd 100644 --- a/samples/client/petstore/perl/lib/WWW/OpenAPIClient/Object/Dog.pm +++ b/samples/client/petstore/perl/lib/WWW/OpenAPIClient/Object/Dog.pm @@ -63,17 +63,17 @@ Generated by: https://openapi-generator.tech # __PACKAGE__->mk_classdata('attribute_map' => {}); __PACKAGE__->mk_classdata('openapi_types' => {}); -__PACKAGE__->mk_classdata('method_documentation' => {}); +__PACKAGE__->mk_classdata('method_documentation' => {}); __PACKAGE__->mk_classdata('class_documentation' => {}); # new plain object -sub new { - my ($class, %args) = @_; +sub new { + my ($class, %args) = @_; my $self = bless {}, $class; $self->init(%args); - + return $self; } @@ -103,7 +103,7 @@ sub to_hash { } # used by JSON for serialization -sub TO_JSON { +sub TO_JSON { my $self = shift; my $_data = {}; foreach my $_key (keys %{$self->attribute_map}) { @@ -124,7 +124,7 @@ sub from_hash { # loop through attributes and use openapi_types to deserialize the data while ( my ($_key, $_type) = each %{$self->openapi_types} ) { - my $_json_attribute = $self->attribute_map->{$_key}; + my $_json_attribute = $self->attribute_map->{$_key}; if ($_type =~ /^array\[(.+)\]$/i) { # array my $_subclass = $1; my @_array = (); @@ -148,7 +148,7 @@ sub from_hash { # call parent (Animal) from_hash $self->WWW::OpenAPIClient::Object::Animal::from_hash($hash); - + return $self; } @@ -168,7 +168,6 @@ sub _deserialize { } - __PACKAGE__->class_documentation({description => '', class => 'Dog', required => [], # TODO diff --git a/samples/client/petstore/perl/lib/WWW/OpenAPIClient/Object/DogAllOf.pm b/samples/client/petstore/perl/lib/WWW/OpenAPIClient/Object/DogAllOf.pm index df524136e74383e9cdadba35243d62a1d804be5d..b9b60b22ad33b8bc71ad203eb76f595aeb8517f6 100644 --- a/samples/client/petstore/perl/lib/WWW/OpenAPIClient/Object/DogAllOf.pm +++ b/samples/client/petstore/perl/lib/WWW/OpenAPIClient/Object/DogAllOf.pm @@ -61,17 +61,17 @@ Generated by: https://openapi-generator.tech # __PACKAGE__->mk_classdata('attribute_map' => {}); __PACKAGE__->mk_classdata('openapi_types' => {}); -__PACKAGE__->mk_classdata('method_documentation' => {}); +__PACKAGE__->mk_classdata('method_documentation' => {}); __PACKAGE__->mk_classdata('class_documentation' => {}); # new plain object -sub new { - my ($class, %args) = @_; +sub new { + my ($class, %args) = @_; my $self = bless {}, $class; $self->init(%args); - + return $self; } @@ -95,7 +95,7 @@ sub to_hash { } # used by JSON for serialization -sub TO_JSON { +sub TO_JSON { my $self = shift; my $_data = {}; foreach my $_key (keys %{$self->attribute_map}) { @@ -113,7 +113,7 @@ sub from_hash { # loop through attributes and use openapi_types to deserialize the data while ( my ($_key, $_type) = each %{$self->openapi_types} ) { - my $_json_attribute = $self->attribute_map->{$_key}; + my $_json_attribute = $self->attribute_map->{$_key}; if ($_type =~ /^array\[(.+)\]$/i) { # array my $_subclass = $1; my @_array = (); @@ -134,7 +134,7 @@ sub from_hash { $log->debugf("Warning: %s (%s) does not exist in input hash\n", $_key, $_json_attribute); } } - + return $self; } @@ -154,7 +154,6 @@ sub _deserialize { } - __PACKAGE__->class_documentation({description => '', class => 'DogAllOf', required => [], # TODO diff --git a/samples/client/petstore/perl/lib/WWW/OpenAPIClient/Object/EnumArrays.pm b/samples/client/petstore/perl/lib/WWW/OpenAPIClient/Object/EnumArrays.pm index edbfc4b5432fd119d986df08a627559f8eade930..fc3051a33f99b040cea9e390d1c4a05964a0d4f2 100644 --- a/samples/client/petstore/perl/lib/WWW/OpenAPIClient/Object/EnumArrays.pm +++ b/samples/client/petstore/perl/lib/WWW/OpenAPIClient/Object/EnumArrays.pm @@ -61,17 +61,17 @@ Generated by: https://openapi-generator.tech # __PACKAGE__->mk_classdata('attribute_map' => {}); __PACKAGE__->mk_classdata('openapi_types' => {}); -__PACKAGE__->mk_classdata('method_documentation' => {}); +__PACKAGE__->mk_classdata('method_documentation' => {}); __PACKAGE__->mk_classdata('class_documentation' => {}); # new plain object -sub new { - my ($class, %args) = @_; +sub new { + my ($class, %args) = @_; my $self = bless {}, $class; $self->init(%args); - + return $self; } @@ -95,7 +95,7 @@ sub to_hash { } # used by JSON for serialization -sub TO_JSON { +sub TO_JSON { my $self = shift; my $_data = {}; foreach my $_key (keys %{$self->attribute_map}) { @@ -113,7 +113,7 @@ sub from_hash { # loop through attributes and use openapi_types to deserialize the data while ( my ($_key, $_type) = each %{$self->openapi_types} ) { - my $_json_attribute = $self->attribute_map->{$_key}; + my $_json_attribute = $self->attribute_map->{$_key}; if ($_type =~ /^array\[(.+)\]$/i) { # array my $_subclass = $1; my @_array = (); @@ -134,7 +134,7 @@ sub from_hash { $log->debugf("Warning: %s (%s) does not exist in input hash\n", $_key, $_json_attribute); } } - + return $self; } @@ -154,7 +154,6 @@ sub _deserialize { } - __PACKAGE__->class_documentation({description => '', class => 'EnumArrays', required => [], # TODO diff --git a/samples/client/petstore/perl/lib/WWW/OpenAPIClient/Object/EnumClass.pm b/samples/client/petstore/perl/lib/WWW/OpenAPIClient/Object/EnumClass.pm index d6b23f1dbfd0e01490f301d0db910b981da8d69a..98917574d11a8ec4abf5eb3996fbdab33b981cdc 100644 --- a/samples/client/petstore/perl/lib/WWW/OpenAPIClient/Object/EnumClass.pm +++ b/samples/client/petstore/perl/lib/WWW/OpenAPIClient/Object/EnumClass.pm @@ -61,17 +61,17 @@ Generated by: https://openapi-generator.tech # __PACKAGE__->mk_classdata('attribute_map' => {}); __PACKAGE__->mk_classdata('openapi_types' => {}); -__PACKAGE__->mk_classdata('method_documentation' => {}); +__PACKAGE__->mk_classdata('method_documentation' => {}); __PACKAGE__->mk_classdata('class_documentation' => {}); # new plain object -sub new { - my ($class, %args) = @_; +sub new { + my ($class, %args) = @_; my $self = bless {}, $class; $self->init(%args); - + return $self; } @@ -95,7 +95,7 @@ sub to_hash { } # used by JSON for serialization -sub TO_JSON { +sub TO_JSON { my $self = shift; my $_data = {}; foreach my $_key (keys %{$self->attribute_map}) { @@ -113,7 +113,7 @@ sub from_hash { # loop through attributes and use openapi_types to deserialize the data while ( my ($_key, $_type) = each %{$self->openapi_types} ) { - my $_json_attribute = $self->attribute_map->{$_key}; + my $_json_attribute = $self->attribute_map->{$_key}; if ($_type =~ /^array\[(.+)\]$/i) { # array my $_subclass = $1; my @_array = (); @@ -134,7 +134,7 @@ sub from_hash { $log->debugf("Warning: %s (%s) does not exist in input hash\n", $_key, $_json_attribute); } } - + return $self; } @@ -154,7 +154,6 @@ sub _deserialize { } - __PACKAGE__->class_documentation({description => '', class => 'EnumClass', required => [], # TODO diff --git a/samples/client/petstore/perl/lib/WWW/OpenAPIClient/Object/EnumTest.pm b/samples/client/petstore/perl/lib/WWW/OpenAPIClient/Object/EnumTest.pm index a563f72d70ec4d8ad4fe5f7b8958565e656f6210..4d12ae2544a1ee5288559f807d96cc334297a0e7 100644 --- a/samples/client/petstore/perl/lib/WWW/OpenAPIClient/Object/EnumTest.pm +++ b/samples/client/petstore/perl/lib/WWW/OpenAPIClient/Object/EnumTest.pm @@ -65,17 +65,17 @@ Generated by: https://openapi-generator.tech # __PACKAGE__->mk_classdata('attribute_map' => {}); __PACKAGE__->mk_classdata('openapi_types' => {}); -__PACKAGE__->mk_classdata('method_documentation' => {}); +__PACKAGE__->mk_classdata('method_documentation' => {}); __PACKAGE__->mk_classdata('class_documentation' => {}); # new plain object -sub new { - my ($class, %args) = @_; +sub new { + my ($class, %args) = @_; my $self = bless {}, $class; $self->init(%args); - + return $self; } @@ -99,7 +99,7 @@ sub to_hash { } # used by JSON for serialization -sub TO_JSON { +sub TO_JSON { my $self = shift; my $_data = {}; foreach my $_key (keys %{$self->attribute_map}) { @@ -117,7 +117,7 @@ sub from_hash { # loop through attributes and use openapi_types to deserialize the data while ( my ($_key, $_type) = each %{$self->openapi_types} ) { - my $_json_attribute = $self->attribute_map->{$_key}; + my $_json_attribute = $self->attribute_map->{$_key}; if ($_type =~ /^array\[(.+)\]$/i) { # array my $_subclass = $1; my @_array = (); @@ -138,7 +138,7 @@ sub from_hash { $log->debugf("Warning: %s (%s) does not exist in input hash\n", $_key, $_json_attribute); } } - + return $self; } @@ -158,7 +158,6 @@ sub _deserialize { } - __PACKAGE__->class_documentation({description => '', class => 'EnumTest', required => [], # TODO diff --git a/samples/client/petstore/perl/lib/WWW/OpenAPIClient/Object/File.pm b/samples/client/petstore/perl/lib/WWW/OpenAPIClient/Object/File.pm index 44d4650e543f3ddf937bd2436d52e8c521ddc71e..ba5693d73870224d4886eadbe24c33cee53ebe8b 100644 --- a/samples/client/petstore/perl/lib/WWW/OpenAPIClient/Object/File.pm +++ b/samples/client/petstore/perl/lib/WWW/OpenAPIClient/Object/File.pm @@ -61,17 +61,17 @@ Generated by: https://openapi-generator.tech # __PACKAGE__->mk_classdata('attribute_map' => {}); __PACKAGE__->mk_classdata('openapi_types' => {}); -__PACKAGE__->mk_classdata('method_documentation' => {}); +__PACKAGE__->mk_classdata('method_documentation' => {}); __PACKAGE__->mk_classdata('class_documentation' => {}); # new plain object -sub new { - my ($class, %args) = @_; +sub new { + my ($class, %args) = @_; my $self = bless {}, $class; $self->init(%args); - + return $self; } @@ -95,7 +95,7 @@ sub to_hash { } # used by JSON for serialization -sub TO_JSON { +sub TO_JSON { my $self = shift; my $_data = {}; foreach my $_key (keys %{$self->attribute_map}) { @@ -113,7 +113,7 @@ sub from_hash { # loop through attributes and use openapi_types to deserialize the data while ( my ($_key, $_type) = each %{$self->openapi_types} ) { - my $_json_attribute = $self->attribute_map->{$_key}; + my $_json_attribute = $self->attribute_map->{$_key}; if ($_type =~ /^array\[(.+)\]$/i) { # array my $_subclass = $1; my @_array = (); @@ -134,7 +134,7 @@ sub from_hash { $log->debugf("Warning: %s (%s) does not exist in input hash\n", $_key, $_json_attribute); } } - + return $self; } @@ -154,7 +154,6 @@ sub _deserialize { } - __PACKAGE__->class_documentation({description => 'Must be named `File` for test.', class => 'File', required => [], # TODO diff --git a/samples/client/petstore/perl/lib/WWW/OpenAPIClient/Object/FileSchemaTestClass.pm b/samples/client/petstore/perl/lib/WWW/OpenAPIClient/Object/FileSchemaTestClass.pm index e31bac19a615fa9e4e41d3ad1d3b638eaae127d4..420be77669b32f1b61bf227d80b6784d6832bb66 100644 --- a/samples/client/petstore/perl/lib/WWW/OpenAPIClient/Object/FileSchemaTestClass.pm +++ b/samples/client/petstore/perl/lib/WWW/OpenAPIClient/Object/FileSchemaTestClass.pm @@ -62,17 +62,17 @@ Generated by: https://openapi-generator.tech # __PACKAGE__->mk_classdata('attribute_map' => {}); __PACKAGE__->mk_classdata('openapi_types' => {}); -__PACKAGE__->mk_classdata('method_documentation' => {}); +__PACKAGE__->mk_classdata('method_documentation' => {}); __PACKAGE__->mk_classdata('class_documentation' => {}); # new plain object -sub new { - my ($class, %args) = @_; +sub new { + my ($class, %args) = @_; my $self = bless {}, $class; $self->init(%args); - + return $self; } @@ -96,7 +96,7 @@ sub to_hash { } # used by JSON for serialization -sub TO_JSON { +sub TO_JSON { my $self = shift; my $_data = {}; foreach my $_key (keys %{$self->attribute_map}) { @@ -114,7 +114,7 @@ sub from_hash { # loop through attributes and use openapi_types to deserialize the data while ( my ($_key, $_type) = each %{$self->openapi_types} ) { - my $_json_attribute = $self->attribute_map->{$_key}; + my $_json_attribute = $self->attribute_map->{$_key}; if ($_type =~ /^array\[(.+)\]$/i) { # array my $_subclass = $1; my @_array = (); @@ -135,7 +135,7 @@ sub from_hash { $log->debugf("Warning: %s (%s) does not exist in input hash\n", $_key, $_json_attribute); } } - + return $self; } @@ -155,7 +155,6 @@ sub _deserialize { } - __PACKAGE__->class_documentation({description => '', class => 'FileSchemaTestClass', required => [], # TODO diff --git a/samples/client/petstore/perl/lib/WWW/OpenAPIClient/Object/Foo.pm b/samples/client/petstore/perl/lib/WWW/OpenAPIClient/Object/Foo.pm index 378a588f94559a3157c1b1695f730cf98adc3eae..e400a15003bd6442002639d0e73a376c9364e150 100644 --- a/samples/client/petstore/perl/lib/WWW/OpenAPIClient/Object/Foo.pm +++ b/samples/client/petstore/perl/lib/WWW/OpenAPIClient/Object/Foo.pm @@ -61,17 +61,17 @@ Generated by: https://openapi-generator.tech # __PACKAGE__->mk_classdata('attribute_map' => {}); __PACKAGE__->mk_classdata('openapi_types' => {}); -__PACKAGE__->mk_classdata('method_documentation' => {}); +__PACKAGE__->mk_classdata('method_documentation' => {}); __PACKAGE__->mk_classdata('class_documentation' => {}); # new plain object -sub new { - my ($class, %args) = @_; +sub new { + my ($class, %args) = @_; my $self = bless {}, $class; $self->init(%args); - + return $self; } @@ -95,7 +95,7 @@ sub to_hash { } # used by JSON for serialization -sub TO_JSON { +sub TO_JSON { my $self = shift; my $_data = {}; foreach my $_key (keys %{$self->attribute_map}) { @@ -113,7 +113,7 @@ sub from_hash { # loop through attributes and use openapi_types to deserialize the data while ( my ($_key, $_type) = each %{$self->openapi_types} ) { - my $_json_attribute = $self->attribute_map->{$_key}; + my $_json_attribute = $self->attribute_map->{$_key}; if ($_type =~ /^array\[(.+)\]$/i) { # array my $_subclass = $1; my @_array = (); @@ -134,7 +134,7 @@ sub from_hash { $log->debugf("Warning: %s (%s) does not exist in input hash\n", $_key, $_json_attribute); } } - + return $self; } @@ -154,7 +154,6 @@ sub _deserialize { } - __PACKAGE__->class_documentation({description => '', class => 'Foo', required => [], # TODO diff --git a/samples/client/petstore/perl/lib/WWW/OpenAPIClient/Object/FormatTest.pm b/samples/client/petstore/perl/lib/WWW/OpenAPIClient/Object/FormatTest.pm index de296cf393956054ef79d8132e450119fd8d382f..9091a6b34446afffb4ee197343e250cd6a09c11a 100644 --- a/samples/client/petstore/perl/lib/WWW/OpenAPIClient/Object/FormatTest.pm +++ b/samples/client/petstore/perl/lib/WWW/OpenAPIClient/Object/FormatTest.pm @@ -62,17 +62,17 @@ Generated by: https://openapi-generator.tech # __PACKAGE__->mk_classdata('attribute_map' => {}); __PACKAGE__->mk_classdata('openapi_types' => {}); -__PACKAGE__->mk_classdata('method_documentation' => {}); +__PACKAGE__->mk_classdata('method_documentation' => {}); __PACKAGE__->mk_classdata('class_documentation' => {}); # new plain object -sub new { - my ($class, %args) = @_; +sub new { + my ($class, %args) = @_; my $self = bless {}, $class; $self->init(%args); - + return $self; } @@ -96,7 +96,7 @@ sub to_hash { } # used by JSON for serialization -sub TO_JSON { +sub TO_JSON { my $self = shift; my $_data = {}; foreach my $_key (keys %{$self->attribute_map}) { @@ -114,7 +114,7 @@ sub from_hash { # loop through attributes and use openapi_types to deserialize the data while ( my ($_key, $_type) = each %{$self->openapi_types} ) { - my $_json_attribute = $self->attribute_map->{$_key}; + my $_json_attribute = $self->attribute_map->{$_key}; if ($_type =~ /^array\[(.+)\]$/i) { # array my $_subclass = $1; my @_array = (); @@ -135,7 +135,7 @@ sub from_hash { $log->debugf("Warning: %s (%s) does not exist in input hash\n", $_key, $_json_attribute); } } - + return $self; } @@ -155,7 +155,6 @@ sub _deserialize { } - __PACKAGE__->class_documentation({description => '', class => 'FormatTest', required => [], # TODO diff --git a/samples/client/petstore/perl/lib/WWW/OpenAPIClient/Object/HasOnlyReadOnly.pm b/samples/client/petstore/perl/lib/WWW/OpenAPIClient/Object/HasOnlyReadOnly.pm index cde0076373c7b1311902fed2f8a3a31b807387b8..356ca359076d0acc6339d152bed4f35eb9cf32e2 100644 --- a/samples/client/petstore/perl/lib/WWW/OpenAPIClient/Object/HasOnlyReadOnly.pm +++ b/samples/client/petstore/perl/lib/WWW/OpenAPIClient/Object/HasOnlyReadOnly.pm @@ -61,17 +61,17 @@ Generated by: https://openapi-generator.tech # __PACKAGE__->mk_classdata('attribute_map' => {}); __PACKAGE__->mk_classdata('openapi_types' => {}); -__PACKAGE__->mk_classdata('method_documentation' => {}); +__PACKAGE__->mk_classdata('method_documentation' => {}); __PACKAGE__->mk_classdata('class_documentation' => {}); # new plain object -sub new { - my ($class, %args) = @_; +sub new { + my ($class, %args) = @_; my $self = bless {}, $class; $self->init(%args); - + return $self; } @@ -95,7 +95,7 @@ sub to_hash { } # used by JSON for serialization -sub TO_JSON { +sub TO_JSON { my $self = shift; my $_data = {}; foreach my $_key (keys %{$self->attribute_map}) { @@ -113,7 +113,7 @@ sub from_hash { # loop through attributes and use openapi_types to deserialize the data while ( my ($_key, $_type) = each %{$self->openapi_types} ) { - my $_json_attribute = $self->attribute_map->{$_key}; + my $_json_attribute = $self->attribute_map->{$_key}; if ($_type =~ /^array\[(.+)\]$/i) { # array my $_subclass = $1; my @_array = (); @@ -134,7 +134,7 @@ sub from_hash { $log->debugf("Warning: %s (%s) does not exist in input hash\n", $_key, $_json_attribute); } } - + return $self; } @@ -154,7 +154,6 @@ sub _deserialize { } - __PACKAGE__->class_documentation({description => '', class => 'HasOnlyReadOnly', required => [], # TODO diff --git a/samples/client/petstore/perl/lib/WWW/OpenAPIClient/Object/HealthCheckResult.pm b/samples/client/petstore/perl/lib/WWW/OpenAPIClient/Object/HealthCheckResult.pm index f8a88db29227b8b720f1bb6ac4c65728121be3cd..7665da0f575c06878ad08450e59ac255b6b65b1a 100644 --- a/samples/client/petstore/perl/lib/WWW/OpenAPIClient/Object/HealthCheckResult.pm +++ b/samples/client/petstore/perl/lib/WWW/OpenAPIClient/Object/HealthCheckResult.pm @@ -61,17 +61,17 @@ Generated by: https://openapi-generator.tech # __PACKAGE__->mk_classdata('attribute_map' => {}); __PACKAGE__->mk_classdata('openapi_types' => {}); -__PACKAGE__->mk_classdata('method_documentation' => {}); +__PACKAGE__->mk_classdata('method_documentation' => {}); __PACKAGE__->mk_classdata('class_documentation' => {}); # new plain object -sub new { - my ($class, %args) = @_; +sub new { + my ($class, %args) = @_; my $self = bless {}, $class; $self->init(%args); - + return $self; } @@ -95,7 +95,7 @@ sub to_hash { } # used by JSON for serialization -sub TO_JSON { +sub TO_JSON { my $self = shift; my $_data = {}; foreach my $_key (keys %{$self->attribute_map}) { @@ -113,7 +113,7 @@ sub from_hash { # loop through attributes and use openapi_types to deserialize the data while ( my ($_key, $_type) = each %{$self->openapi_types} ) { - my $_json_attribute = $self->attribute_map->{$_key}; + my $_json_attribute = $self->attribute_map->{$_key}; if ($_type =~ /^array\[(.+)\]$/i) { # array my $_subclass = $1; my @_array = (); @@ -134,7 +134,7 @@ sub from_hash { $log->debugf("Warning: %s (%s) does not exist in input hash\n", $_key, $_json_attribute); } } - + return $self; } @@ -154,7 +154,6 @@ sub _deserialize { } - __PACKAGE__->class_documentation({description => 'Just a string to inform instance is up and running. Make it nullable in hope to get it as pointer in generated model.', class => 'HealthCheckResult', required => [], # TODO diff --git a/samples/client/petstore/perl/lib/WWW/OpenAPIClient/Object/InlineResponseDefault.pm b/samples/client/petstore/perl/lib/WWW/OpenAPIClient/Object/InlineResponseDefault.pm index 7c9c51f0a96d9a66827ac89afa843d2a5d4e17b4..b9d951ed2720110b58056058e38abcba0ceaf9a4 100644 --- a/samples/client/petstore/perl/lib/WWW/OpenAPIClient/Object/InlineResponseDefault.pm +++ b/samples/client/petstore/perl/lib/WWW/OpenAPIClient/Object/InlineResponseDefault.pm @@ -62,17 +62,17 @@ Generated by: https://openapi-generator.tech # __PACKAGE__->mk_classdata('attribute_map' => {}); __PACKAGE__->mk_classdata('openapi_types' => {}); -__PACKAGE__->mk_classdata('method_documentation' => {}); +__PACKAGE__->mk_classdata('method_documentation' => {}); __PACKAGE__->mk_classdata('class_documentation' => {}); # new plain object -sub new { - my ($class, %args) = @_; +sub new { + my ($class, %args) = @_; my $self = bless {}, $class; $self->init(%args); - + return $self; } @@ -96,7 +96,7 @@ sub to_hash { } # used by JSON for serialization -sub TO_JSON { +sub TO_JSON { my $self = shift; my $_data = {}; foreach my $_key (keys %{$self->attribute_map}) { @@ -114,7 +114,7 @@ sub from_hash { # loop through attributes and use openapi_types to deserialize the data while ( my ($_key, $_type) = each %{$self->openapi_types} ) { - my $_json_attribute = $self->attribute_map->{$_key}; + my $_json_attribute = $self->attribute_map->{$_key}; if ($_type =~ /^array\[(.+)\]$/i) { # array my $_subclass = $1; my @_array = (); @@ -135,7 +135,7 @@ sub from_hash { $log->debugf("Warning: %s (%s) does not exist in input hash\n", $_key, $_json_attribute); } } - + return $self; } @@ -155,7 +155,6 @@ sub _deserialize { } - __PACKAGE__->class_documentation({description => '', class => 'InlineResponseDefault', required => [], # TODO diff --git a/samples/client/petstore/perl/lib/WWW/OpenAPIClient/Object/List.pm b/samples/client/petstore/perl/lib/WWW/OpenAPIClient/Object/List.pm index 08b426283c6051bd4d320d7d76203182cf2af164..f88f37aa6e5201e00f76d17e3f80d61bc2c32d70 100644 --- a/samples/client/petstore/perl/lib/WWW/OpenAPIClient/Object/List.pm +++ b/samples/client/petstore/perl/lib/WWW/OpenAPIClient/Object/List.pm @@ -61,17 +61,17 @@ Generated by: https://openapi-generator.tech # __PACKAGE__->mk_classdata('attribute_map' => {}); __PACKAGE__->mk_classdata('openapi_types' => {}); -__PACKAGE__->mk_classdata('method_documentation' => {}); +__PACKAGE__->mk_classdata('method_documentation' => {}); __PACKAGE__->mk_classdata('class_documentation' => {}); # new plain object -sub new { - my ($class, %args) = @_; +sub new { + my ($class, %args) = @_; my $self = bless {}, $class; $self->init(%args); - + return $self; } @@ -95,7 +95,7 @@ sub to_hash { } # used by JSON for serialization -sub TO_JSON { +sub TO_JSON { my $self = shift; my $_data = {}; foreach my $_key (keys %{$self->attribute_map}) { @@ -113,7 +113,7 @@ sub from_hash { # loop through attributes and use openapi_types to deserialize the data while ( my ($_key, $_type) = each %{$self->openapi_types} ) { - my $_json_attribute = $self->attribute_map->{$_key}; + my $_json_attribute = $self->attribute_map->{$_key}; if ($_type =~ /^array\[(.+)\]$/i) { # array my $_subclass = $1; my @_array = (); @@ -134,7 +134,7 @@ sub from_hash { $log->debugf("Warning: %s (%s) does not exist in input hash\n", $_key, $_json_attribute); } } - + return $self; } @@ -154,7 +154,6 @@ sub _deserialize { } - __PACKAGE__->class_documentation({description => '', class => 'List', required => [], # TODO diff --git a/samples/client/petstore/perl/lib/WWW/OpenAPIClient/Object/MapTest.pm b/samples/client/petstore/perl/lib/WWW/OpenAPIClient/Object/MapTest.pm index 4c3c66b987f9f1d31630e926a615566a95094ef9..6fb048ca8e112baf921b1764dd95bb457c0482a9 100644 --- a/samples/client/petstore/perl/lib/WWW/OpenAPIClient/Object/MapTest.pm +++ b/samples/client/petstore/perl/lib/WWW/OpenAPIClient/Object/MapTest.pm @@ -61,17 +61,17 @@ Generated by: https://openapi-generator.tech # __PACKAGE__->mk_classdata('attribute_map' => {}); __PACKAGE__->mk_classdata('openapi_types' => {}); -__PACKAGE__->mk_classdata('method_documentation' => {}); +__PACKAGE__->mk_classdata('method_documentation' => {}); __PACKAGE__->mk_classdata('class_documentation' => {}); # new plain object -sub new { - my ($class, %args) = @_; +sub new { + my ($class, %args) = @_; my $self = bless {}, $class; $self->init(%args); - + return $self; } @@ -95,7 +95,7 @@ sub to_hash { } # used by JSON for serialization -sub TO_JSON { +sub TO_JSON { my $self = shift; my $_data = {}; foreach my $_key (keys %{$self->attribute_map}) { @@ -113,7 +113,7 @@ sub from_hash { # loop through attributes and use openapi_types to deserialize the data while ( my ($_key, $_type) = each %{$self->openapi_types} ) { - my $_json_attribute = $self->attribute_map->{$_key}; + my $_json_attribute = $self->attribute_map->{$_key}; if ($_type =~ /^array\[(.+)\]$/i) { # array my $_subclass = $1; my @_array = (); @@ -134,7 +134,7 @@ sub from_hash { $log->debugf("Warning: %s (%s) does not exist in input hash\n", $_key, $_json_attribute); } } - + return $self; } @@ -154,7 +154,6 @@ sub _deserialize { } - __PACKAGE__->class_documentation({description => '', class => 'MapTest', required => [], # TODO diff --git a/samples/client/petstore/perl/lib/WWW/OpenAPIClient/Object/MixedPropertiesAndAdditionalPropertiesClass.pm b/samples/client/petstore/perl/lib/WWW/OpenAPIClient/Object/MixedPropertiesAndAdditionalPropertiesClass.pm index d413341cf5b5f1f344b016f5b6854145b43c95d7..49bc4d8008daad330c361a25213533ac688e7b37 100644 --- a/samples/client/petstore/perl/lib/WWW/OpenAPIClient/Object/MixedPropertiesAndAdditionalPropertiesClass.pm +++ b/samples/client/petstore/perl/lib/WWW/OpenAPIClient/Object/MixedPropertiesAndAdditionalPropertiesClass.pm @@ -62,17 +62,17 @@ Generated by: https://openapi-generator.tech # __PACKAGE__->mk_classdata('attribute_map' => {}); __PACKAGE__->mk_classdata('openapi_types' => {}); -__PACKAGE__->mk_classdata('method_documentation' => {}); +__PACKAGE__->mk_classdata('method_documentation' => {}); __PACKAGE__->mk_classdata('class_documentation' => {}); # new plain object -sub new { - my ($class, %args) = @_; +sub new { + my ($class, %args) = @_; my $self = bless {}, $class; $self->init(%args); - + return $self; } @@ -96,7 +96,7 @@ sub to_hash { } # used by JSON for serialization -sub TO_JSON { +sub TO_JSON { my $self = shift; my $_data = {}; foreach my $_key (keys %{$self->attribute_map}) { @@ -114,7 +114,7 @@ sub from_hash { # loop through attributes and use openapi_types to deserialize the data while ( my ($_key, $_type) = each %{$self->openapi_types} ) { - my $_json_attribute = $self->attribute_map->{$_key}; + my $_json_attribute = $self->attribute_map->{$_key}; if ($_type =~ /^array\[(.+)\]$/i) { # array my $_subclass = $1; my @_array = (); @@ -135,7 +135,7 @@ sub from_hash { $log->debugf("Warning: %s (%s) does not exist in input hash\n", $_key, $_json_attribute); } } - + return $self; } @@ -155,7 +155,6 @@ sub _deserialize { } - __PACKAGE__->class_documentation({description => '', class => 'MixedPropertiesAndAdditionalPropertiesClass', required => [], # TODO diff --git a/samples/client/petstore/perl/lib/WWW/OpenAPIClient/Object/Model200Response.pm b/samples/client/petstore/perl/lib/WWW/OpenAPIClient/Object/Model200Response.pm index fd006c5ad6b9e367a0414467ef15dc6bffd02337..b6ba3d4fea2577f7f2f2af48d6e113616b07a233 100644 --- a/samples/client/petstore/perl/lib/WWW/OpenAPIClient/Object/Model200Response.pm +++ b/samples/client/petstore/perl/lib/WWW/OpenAPIClient/Object/Model200Response.pm @@ -61,17 +61,17 @@ Generated by: https://openapi-generator.tech # __PACKAGE__->mk_classdata('attribute_map' => {}); __PACKAGE__->mk_classdata('openapi_types' => {}); -__PACKAGE__->mk_classdata('method_documentation' => {}); +__PACKAGE__->mk_classdata('method_documentation' => {}); __PACKAGE__->mk_classdata('class_documentation' => {}); # new plain object -sub new { - my ($class, %args) = @_; +sub new { + my ($class, %args) = @_; my $self = bless {}, $class; $self->init(%args); - + return $self; } @@ -95,7 +95,7 @@ sub to_hash { } # used by JSON for serialization -sub TO_JSON { +sub TO_JSON { my $self = shift; my $_data = {}; foreach my $_key (keys %{$self->attribute_map}) { @@ -113,7 +113,7 @@ sub from_hash { # loop through attributes and use openapi_types to deserialize the data while ( my ($_key, $_type) = each %{$self->openapi_types} ) { - my $_json_attribute = $self->attribute_map->{$_key}; + my $_json_attribute = $self->attribute_map->{$_key}; if ($_type =~ /^array\[(.+)\]$/i) { # array my $_subclass = $1; my @_array = (); @@ -134,7 +134,7 @@ sub from_hash { $log->debugf("Warning: %s (%s) does not exist in input hash\n", $_key, $_json_attribute); } } - + return $self; } @@ -154,7 +154,6 @@ sub _deserialize { } - __PACKAGE__->class_documentation({description => 'Model for testing model name starting with number', class => 'Model200Response', required => [], # TODO diff --git a/samples/client/petstore/perl/lib/WWW/OpenAPIClient/Object/ModelReturn.pm b/samples/client/petstore/perl/lib/WWW/OpenAPIClient/Object/ModelReturn.pm index 4972e0a9dba315c0bb3d5f892987cbd1a3264b4d..a2b9dd03e951afe3835ecedd72a718367f22867f 100644 --- a/samples/client/petstore/perl/lib/WWW/OpenAPIClient/Object/ModelReturn.pm +++ b/samples/client/petstore/perl/lib/WWW/OpenAPIClient/Object/ModelReturn.pm @@ -61,17 +61,17 @@ Generated by: https://openapi-generator.tech # __PACKAGE__->mk_classdata('attribute_map' => {}); __PACKAGE__->mk_classdata('openapi_types' => {}); -__PACKAGE__->mk_classdata('method_documentation' => {}); +__PACKAGE__->mk_classdata('method_documentation' => {}); __PACKAGE__->mk_classdata('class_documentation' => {}); # new plain object -sub new { - my ($class, %args) = @_; +sub new { + my ($class, %args) = @_; my $self = bless {}, $class; $self->init(%args); - + return $self; } @@ -95,7 +95,7 @@ sub to_hash { } # used by JSON for serialization -sub TO_JSON { +sub TO_JSON { my $self = shift; my $_data = {}; foreach my $_key (keys %{$self->attribute_map}) { @@ -113,7 +113,7 @@ sub from_hash { # loop through attributes and use openapi_types to deserialize the data while ( my ($_key, $_type) = each %{$self->openapi_types} ) { - my $_json_attribute = $self->attribute_map->{$_key}; + my $_json_attribute = $self->attribute_map->{$_key}; if ($_type =~ /^array\[(.+)\]$/i) { # array my $_subclass = $1; my @_array = (); @@ -134,7 +134,7 @@ sub from_hash { $log->debugf("Warning: %s (%s) does not exist in input hash\n", $_key, $_json_attribute); } } - + return $self; } @@ -154,7 +154,6 @@ sub _deserialize { } - __PACKAGE__->class_documentation({description => 'Model for testing reserved words', class => 'ModelReturn', required => [], # TODO diff --git a/samples/client/petstore/perl/lib/WWW/OpenAPIClient/Object/Name.pm b/samples/client/petstore/perl/lib/WWW/OpenAPIClient/Object/Name.pm index 29a78caf5276b8b181a5730a19a9abcffd5b3b15..905fc94c75bab612dd5c1a72292c07350423205f 100644 --- a/samples/client/petstore/perl/lib/WWW/OpenAPIClient/Object/Name.pm +++ b/samples/client/petstore/perl/lib/WWW/OpenAPIClient/Object/Name.pm @@ -61,17 +61,17 @@ Generated by: https://openapi-generator.tech # __PACKAGE__->mk_classdata('attribute_map' => {}); __PACKAGE__->mk_classdata('openapi_types' => {}); -__PACKAGE__->mk_classdata('method_documentation' => {}); +__PACKAGE__->mk_classdata('method_documentation' => {}); __PACKAGE__->mk_classdata('class_documentation' => {}); # new plain object -sub new { - my ($class, %args) = @_; +sub new { + my ($class, %args) = @_; my $self = bless {}, $class; $self->init(%args); - + return $self; } @@ -95,7 +95,7 @@ sub to_hash { } # used by JSON for serialization -sub TO_JSON { +sub TO_JSON { my $self = shift; my $_data = {}; foreach my $_key (keys %{$self->attribute_map}) { @@ -113,7 +113,7 @@ sub from_hash { # loop through attributes and use openapi_types to deserialize the data while ( my ($_key, $_type) = each %{$self->openapi_types} ) { - my $_json_attribute = $self->attribute_map->{$_key}; + my $_json_attribute = $self->attribute_map->{$_key}; if ($_type =~ /^array\[(.+)\]$/i) { # array my $_subclass = $1; my @_array = (); @@ -134,7 +134,7 @@ sub from_hash { $log->debugf("Warning: %s (%s) does not exist in input hash\n", $_key, $_json_attribute); } } - + return $self; } @@ -154,7 +154,6 @@ sub _deserialize { } - __PACKAGE__->class_documentation({description => 'Model for testing model name same as property name', class => 'Name', required => [], # TODO diff --git a/samples/client/petstore/perl/lib/WWW/OpenAPIClient/Object/NullableClass.pm b/samples/client/petstore/perl/lib/WWW/OpenAPIClient/Object/NullableClass.pm index 9e538e95c7beb4c18f95501a520b4b5bac4cdd2d..eb35f4c6b3677e4874f3db871d641a9ab9aad245 100644 --- a/samples/client/petstore/perl/lib/WWW/OpenAPIClient/Object/NullableClass.pm +++ b/samples/client/petstore/perl/lib/WWW/OpenAPIClient/Object/NullableClass.pm @@ -61,17 +61,17 @@ Generated by: https://openapi-generator.tech # __PACKAGE__->mk_classdata('attribute_map' => {}); __PACKAGE__->mk_classdata('openapi_types' => {}); -__PACKAGE__->mk_classdata('method_documentation' => {}); +__PACKAGE__->mk_classdata('method_documentation' => {}); __PACKAGE__->mk_classdata('class_documentation' => {}); # new plain object -sub new { - my ($class, %args) = @_; +sub new { + my ($class, %args) = @_; my $self = bless {}, $class; $self->init(%args); - + return $self; } @@ -95,7 +95,7 @@ sub to_hash { } # used by JSON for serialization -sub TO_JSON { +sub TO_JSON { my $self = shift; my $_data = {}; foreach my $_key (keys %{$self->attribute_map}) { @@ -113,7 +113,7 @@ sub from_hash { # loop through attributes and use openapi_types to deserialize the data while ( my ($_key, $_type) = each %{$self->openapi_types} ) { - my $_json_attribute = $self->attribute_map->{$_key}; + my $_json_attribute = $self->attribute_map->{$_key}; if ($_type =~ /^array\[(.+)\]$/i) { # array my $_subclass = $1; my @_array = (); @@ -134,7 +134,7 @@ sub from_hash { $log->debugf("Warning: %s (%s) does not exist in input hash\n", $_key, $_json_attribute); } } - + return $self; } @@ -154,7 +154,6 @@ sub _deserialize { } - __PACKAGE__->class_documentation({description => '', class => 'NullableClass', required => [], # TODO diff --git a/samples/client/petstore/perl/lib/WWW/OpenAPIClient/Object/NumberOnly.pm b/samples/client/petstore/perl/lib/WWW/OpenAPIClient/Object/NumberOnly.pm index ab9e9d3dd406c4fae79fb9db33cb3fa5e89e72a4..990cf69ef80fa55adf13e93ec11a81295c9d7872 100644 --- a/samples/client/petstore/perl/lib/WWW/OpenAPIClient/Object/NumberOnly.pm +++ b/samples/client/petstore/perl/lib/WWW/OpenAPIClient/Object/NumberOnly.pm @@ -61,17 +61,17 @@ Generated by: https://openapi-generator.tech # __PACKAGE__->mk_classdata('attribute_map' => {}); __PACKAGE__->mk_classdata('openapi_types' => {}); -__PACKAGE__->mk_classdata('method_documentation' => {}); +__PACKAGE__->mk_classdata('method_documentation' => {}); __PACKAGE__->mk_classdata('class_documentation' => {}); # new plain object -sub new { - my ($class, %args) = @_; +sub new { + my ($class, %args) = @_; my $self = bless {}, $class; $self->init(%args); - + return $self; } @@ -95,7 +95,7 @@ sub to_hash { } # used by JSON for serialization -sub TO_JSON { +sub TO_JSON { my $self = shift; my $_data = {}; foreach my $_key (keys %{$self->attribute_map}) { @@ -113,7 +113,7 @@ sub from_hash { # loop through attributes and use openapi_types to deserialize the data while ( my ($_key, $_type) = each %{$self->openapi_types} ) { - my $_json_attribute = $self->attribute_map->{$_key}; + my $_json_attribute = $self->attribute_map->{$_key}; if ($_type =~ /^array\[(.+)\]$/i) { # array my $_subclass = $1; my @_array = (); @@ -134,7 +134,7 @@ sub from_hash { $log->debugf("Warning: %s (%s) does not exist in input hash\n", $_key, $_json_attribute); } } - + return $self; } @@ -154,7 +154,6 @@ sub _deserialize { } - __PACKAGE__->class_documentation({description => '', class => 'NumberOnly', required => [], # TODO diff --git a/samples/client/petstore/perl/lib/WWW/OpenAPIClient/Object/ObjectWithDeprecatedFields.pm b/samples/client/petstore/perl/lib/WWW/OpenAPIClient/Object/ObjectWithDeprecatedFields.pm index af996b0a05f14994e5fb63a681cf0a46624c6f0e..3980ecf0a257b4119859f715da291cc024139c5a 100644 --- a/samples/client/petstore/perl/lib/WWW/OpenAPIClient/Object/ObjectWithDeprecatedFields.pm +++ b/samples/client/petstore/perl/lib/WWW/OpenAPIClient/Object/ObjectWithDeprecatedFields.pm @@ -62,17 +62,17 @@ Generated by: https://openapi-generator.tech # __PACKAGE__->mk_classdata('attribute_map' => {}); __PACKAGE__->mk_classdata('openapi_types' => {}); -__PACKAGE__->mk_classdata('method_documentation' => {}); +__PACKAGE__->mk_classdata('method_documentation' => {}); __PACKAGE__->mk_classdata('class_documentation' => {}); # new plain object -sub new { - my ($class, %args) = @_; +sub new { + my ($class, %args) = @_; my $self = bless {}, $class; $self->init(%args); - + return $self; } @@ -96,7 +96,7 @@ sub to_hash { } # used by JSON for serialization -sub TO_JSON { +sub TO_JSON { my $self = shift; my $_data = {}; foreach my $_key (keys %{$self->attribute_map}) { @@ -114,7 +114,7 @@ sub from_hash { # loop through attributes and use openapi_types to deserialize the data while ( my ($_key, $_type) = each %{$self->openapi_types} ) { - my $_json_attribute = $self->attribute_map->{$_key}; + my $_json_attribute = $self->attribute_map->{$_key}; if ($_type =~ /^array\[(.+)\]$/i) { # array my $_subclass = $1; my @_array = (); @@ -135,7 +135,7 @@ sub from_hash { $log->debugf("Warning: %s (%s) does not exist in input hash\n", $_key, $_json_attribute); } } - + return $self; } @@ -155,7 +155,6 @@ sub _deserialize { } - __PACKAGE__->class_documentation({description => '', class => 'ObjectWithDeprecatedFields', required => [], # TODO diff --git a/samples/client/petstore/perl/lib/WWW/OpenAPIClient/Object/Order.pm b/samples/client/petstore/perl/lib/WWW/OpenAPIClient/Object/Order.pm index 645ba74faae24955197d0bddfb471bc13d295dce..e4a9f745990401f0b2c364782b0a46f026768a47 100644 --- a/samples/client/petstore/perl/lib/WWW/OpenAPIClient/Object/Order.pm +++ b/samples/client/petstore/perl/lib/WWW/OpenAPIClient/Object/Order.pm @@ -61,17 +61,17 @@ Generated by: https://openapi-generator.tech # __PACKAGE__->mk_classdata('attribute_map' => {}); __PACKAGE__->mk_classdata('openapi_types' => {}); -__PACKAGE__->mk_classdata('method_documentation' => {}); +__PACKAGE__->mk_classdata('method_documentation' => {}); __PACKAGE__->mk_classdata('class_documentation' => {}); # new plain object -sub new { - my ($class, %args) = @_; +sub new { + my ($class, %args) = @_; my $self = bless {}, $class; $self->init(%args); - + return $self; } @@ -95,7 +95,7 @@ sub to_hash { } # used by JSON for serialization -sub TO_JSON { +sub TO_JSON { my $self = shift; my $_data = {}; foreach my $_key (keys %{$self->attribute_map}) { @@ -113,7 +113,7 @@ sub from_hash { # loop through attributes and use openapi_types to deserialize the data while ( my ($_key, $_type) = each %{$self->openapi_types} ) { - my $_json_attribute = $self->attribute_map->{$_key}; + my $_json_attribute = $self->attribute_map->{$_key}; if ($_type =~ /^array\[(.+)\]$/i) { # array my $_subclass = $1; my @_array = (); @@ -134,7 +134,7 @@ sub from_hash { $log->debugf("Warning: %s (%s) does not exist in input hash\n", $_key, $_json_attribute); } } - + return $self; } @@ -154,7 +154,6 @@ sub _deserialize { } - __PACKAGE__->class_documentation({description => '', class => 'Order', required => [], # TODO diff --git a/samples/client/petstore/perl/lib/WWW/OpenAPIClient/Object/OuterComposite.pm b/samples/client/petstore/perl/lib/WWW/OpenAPIClient/Object/OuterComposite.pm index aa5a9526aaa6c55736504845f3c5c0de0ae63dde..f0643e54add59dde4708ad9f6cffb118de75b69f 100644 --- a/samples/client/petstore/perl/lib/WWW/OpenAPIClient/Object/OuterComposite.pm +++ b/samples/client/petstore/perl/lib/WWW/OpenAPIClient/Object/OuterComposite.pm @@ -61,17 +61,17 @@ Generated by: https://openapi-generator.tech # __PACKAGE__->mk_classdata('attribute_map' => {}); __PACKAGE__->mk_classdata('openapi_types' => {}); -__PACKAGE__->mk_classdata('method_documentation' => {}); +__PACKAGE__->mk_classdata('method_documentation' => {}); __PACKAGE__->mk_classdata('class_documentation' => {}); # new plain object -sub new { - my ($class, %args) = @_; +sub new { + my ($class, %args) = @_; my $self = bless {}, $class; $self->init(%args); - + return $self; } @@ -95,7 +95,7 @@ sub to_hash { } # used by JSON for serialization -sub TO_JSON { +sub TO_JSON { my $self = shift; my $_data = {}; foreach my $_key (keys %{$self->attribute_map}) { @@ -113,7 +113,7 @@ sub from_hash { # loop through attributes and use openapi_types to deserialize the data while ( my ($_key, $_type) = each %{$self->openapi_types} ) { - my $_json_attribute = $self->attribute_map->{$_key}; + my $_json_attribute = $self->attribute_map->{$_key}; if ($_type =~ /^array\[(.+)\]$/i) { # array my $_subclass = $1; my @_array = (); @@ -134,7 +134,7 @@ sub from_hash { $log->debugf("Warning: %s (%s) does not exist in input hash\n", $_key, $_json_attribute); } } - + return $self; } @@ -154,7 +154,6 @@ sub _deserialize { } - __PACKAGE__->class_documentation({description => '', class => 'OuterComposite', required => [], # TODO diff --git a/samples/client/petstore/perl/lib/WWW/OpenAPIClient/Object/OuterEnum.pm b/samples/client/petstore/perl/lib/WWW/OpenAPIClient/Object/OuterEnum.pm index 44d1e6ca8ad7c62f4893c94f870d2bddffd270db..a07684584a440b61daf8b7126b038d9692cc72fe 100644 --- a/samples/client/petstore/perl/lib/WWW/OpenAPIClient/Object/OuterEnum.pm +++ b/samples/client/petstore/perl/lib/WWW/OpenAPIClient/Object/OuterEnum.pm @@ -61,17 +61,17 @@ Generated by: https://openapi-generator.tech # __PACKAGE__->mk_classdata('attribute_map' => {}); __PACKAGE__->mk_classdata('openapi_types' => {}); -__PACKAGE__->mk_classdata('method_documentation' => {}); +__PACKAGE__->mk_classdata('method_documentation' => {}); __PACKAGE__->mk_classdata('class_documentation' => {}); # new plain object -sub new { - my ($class, %args) = @_; +sub new { + my ($class, %args) = @_; my $self = bless {}, $class; $self->init(%args); - + return $self; } @@ -95,7 +95,7 @@ sub to_hash { } # used by JSON for serialization -sub TO_JSON { +sub TO_JSON { my $self = shift; my $_data = {}; foreach my $_key (keys %{$self->attribute_map}) { @@ -113,7 +113,7 @@ sub from_hash { # loop through attributes and use openapi_types to deserialize the data while ( my ($_key, $_type) = each %{$self->openapi_types} ) { - my $_json_attribute = $self->attribute_map->{$_key}; + my $_json_attribute = $self->attribute_map->{$_key}; if ($_type =~ /^array\[(.+)\]$/i) { # array my $_subclass = $1; my @_array = (); @@ -134,7 +134,7 @@ sub from_hash { $log->debugf("Warning: %s (%s) does not exist in input hash\n", $_key, $_json_attribute); } } - + return $self; } @@ -154,7 +154,6 @@ sub _deserialize { } - __PACKAGE__->class_documentation({description => '', class => 'OuterEnum', required => [], # TODO diff --git a/samples/client/petstore/perl/lib/WWW/OpenAPIClient/Object/OuterEnumDefaultValue.pm b/samples/client/petstore/perl/lib/WWW/OpenAPIClient/Object/OuterEnumDefaultValue.pm index 5942b8ff798e98ba801a2dc722b641ce46b4e2de..9b14db60a33d400f8e4c035f03124d5d6c42da05 100644 --- a/samples/client/petstore/perl/lib/WWW/OpenAPIClient/Object/OuterEnumDefaultValue.pm +++ b/samples/client/petstore/perl/lib/WWW/OpenAPIClient/Object/OuterEnumDefaultValue.pm @@ -61,17 +61,17 @@ Generated by: https://openapi-generator.tech # __PACKAGE__->mk_classdata('attribute_map' => {}); __PACKAGE__->mk_classdata('openapi_types' => {}); -__PACKAGE__->mk_classdata('method_documentation' => {}); +__PACKAGE__->mk_classdata('method_documentation' => {}); __PACKAGE__->mk_classdata('class_documentation' => {}); # new plain object -sub new { - my ($class, %args) = @_; +sub new { + my ($class, %args) = @_; my $self = bless {}, $class; $self->init(%args); - + return $self; } @@ -95,7 +95,7 @@ sub to_hash { } # used by JSON for serialization -sub TO_JSON { +sub TO_JSON { my $self = shift; my $_data = {}; foreach my $_key (keys %{$self->attribute_map}) { @@ -113,7 +113,7 @@ sub from_hash { # loop through attributes and use openapi_types to deserialize the data while ( my ($_key, $_type) = each %{$self->openapi_types} ) { - my $_json_attribute = $self->attribute_map->{$_key}; + my $_json_attribute = $self->attribute_map->{$_key}; if ($_type =~ /^array\[(.+)\]$/i) { # array my $_subclass = $1; my @_array = (); @@ -134,7 +134,7 @@ sub from_hash { $log->debugf("Warning: %s (%s) does not exist in input hash\n", $_key, $_json_attribute); } } - + return $self; } @@ -154,7 +154,6 @@ sub _deserialize { } - __PACKAGE__->class_documentation({description => '', class => 'OuterEnumDefaultValue', required => [], # TODO diff --git a/samples/client/petstore/perl/lib/WWW/OpenAPIClient/Object/OuterEnumInteger.pm b/samples/client/petstore/perl/lib/WWW/OpenAPIClient/Object/OuterEnumInteger.pm index 5309a43dfa27b9b7c220f672e9a73b59ccfde624..14ff2ff0955c87e6421128138fd3242b7f9ac2c7 100644 --- a/samples/client/petstore/perl/lib/WWW/OpenAPIClient/Object/OuterEnumInteger.pm +++ b/samples/client/petstore/perl/lib/WWW/OpenAPIClient/Object/OuterEnumInteger.pm @@ -61,17 +61,17 @@ Generated by: https://openapi-generator.tech # __PACKAGE__->mk_classdata('attribute_map' => {}); __PACKAGE__->mk_classdata('openapi_types' => {}); -__PACKAGE__->mk_classdata('method_documentation' => {}); +__PACKAGE__->mk_classdata('method_documentation' => {}); __PACKAGE__->mk_classdata('class_documentation' => {}); # new plain object -sub new { - my ($class, %args) = @_; +sub new { + my ($class, %args) = @_; my $self = bless {}, $class; $self->init(%args); - + return $self; } @@ -95,7 +95,7 @@ sub to_hash { } # used by JSON for serialization -sub TO_JSON { +sub TO_JSON { my $self = shift; my $_data = {}; foreach my $_key (keys %{$self->attribute_map}) { @@ -113,7 +113,7 @@ sub from_hash { # loop through attributes and use openapi_types to deserialize the data while ( my ($_key, $_type) = each %{$self->openapi_types} ) { - my $_json_attribute = $self->attribute_map->{$_key}; + my $_json_attribute = $self->attribute_map->{$_key}; if ($_type =~ /^array\[(.+)\]$/i) { # array my $_subclass = $1; my @_array = (); @@ -134,7 +134,7 @@ sub from_hash { $log->debugf("Warning: %s (%s) does not exist in input hash\n", $_key, $_json_attribute); } } - + return $self; } @@ -154,7 +154,6 @@ sub _deserialize { } - __PACKAGE__->class_documentation({description => '', class => 'OuterEnumInteger', required => [], # TODO diff --git a/samples/client/petstore/perl/lib/WWW/OpenAPIClient/Object/OuterEnumIntegerDefaultValue.pm b/samples/client/petstore/perl/lib/WWW/OpenAPIClient/Object/OuterEnumIntegerDefaultValue.pm index d12618951d35c7aaa09dbda92bdc7d091488522b..3c10bfe39f3da863c720f9db7153e6c889bf57f5 100644 --- a/samples/client/petstore/perl/lib/WWW/OpenAPIClient/Object/OuterEnumIntegerDefaultValue.pm +++ b/samples/client/petstore/perl/lib/WWW/OpenAPIClient/Object/OuterEnumIntegerDefaultValue.pm @@ -61,17 +61,17 @@ Generated by: https://openapi-generator.tech # __PACKAGE__->mk_classdata('attribute_map' => {}); __PACKAGE__->mk_classdata('openapi_types' => {}); -__PACKAGE__->mk_classdata('method_documentation' => {}); +__PACKAGE__->mk_classdata('method_documentation' => {}); __PACKAGE__->mk_classdata('class_documentation' => {}); # new plain object -sub new { - my ($class, %args) = @_; +sub new { + my ($class, %args) = @_; my $self = bless {}, $class; $self->init(%args); - + return $self; } @@ -95,7 +95,7 @@ sub to_hash { } # used by JSON for serialization -sub TO_JSON { +sub TO_JSON { my $self = shift; my $_data = {}; foreach my $_key (keys %{$self->attribute_map}) { @@ -113,7 +113,7 @@ sub from_hash { # loop through attributes and use openapi_types to deserialize the data while ( my ($_key, $_type) = each %{$self->openapi_types} ) { - my $_json_attribute = $self->attribute_map->{$_key}; + my $_json_attribute = $self->attribute_map->{$_key}; if ($_type =~ /^array\[(.+)\]$/i) { # array my $_subclass = $1; my @_array = (); @@ -134,7 +134,7 @@ sub from_hash { $log->debugf("Warning: %s (%s) does not exist in input hash\n", $_key, $_json_attribute); } } - + return $self; } @@ -154,7 +154,6 @@ sub _deserialize { } - __PACKAGE__->class_documentation({description => '', class => 'OuterEnumIntegerDefaultValue', required => [], # TODO diff --git a/samples/client/petstore/perl/lib/WWW/OpenAPIClient/Object/OuterObjectWithEnumProperty.pm b/samples/client/petstore/perl/lib/WWW/OpenAPIClient/Object/OuterObjectWithEnumProperty.pm index 39644d24d5c2b21ed4c0139e091bc93b7fea8d2a..12e1846b537d6d057472724aeb478d8cb55fd7e4 100644 --- a/samples/client/petstore/perl/lib/WWW/OpenAPIClient/Object/OuterObjectWithEnumProperty.pm +++ b/samples/client/petstore/perl/lib/WWW/OpenAPIClient/Object/OuterObjectWithEnumProperty.pm @@ -62,17 +62,17 @@ Generated by: https://openapi-generator.tech # __PACKAGE__->mk_classdata('attribute_map' => {}); __PACKAGE__->mk_classdata('openapi_types' => {}); -__PACKAGE__->mk_classdata('method_documentation' => {}); +__PACKAGE__->mk_classdata('method_documentation' => {}); __PACKAGE__->mk_classdata('class_documentation' => {}); # new plain object -sub new { - my ($class, %args) = @_; +sub new { + my ($class, %args) = @_; my $self = bless {}, $class; $self->init(%args); - + return $self; } @@ -96,7 +96,7 @@ sub to_hash { } # used by JSON for serialization -sub TO_JSON { +sub TO_JSON { my $self = shift; my $_data = {}; foreach my $_key (keys %{$self->attribute_map}) { @@ -114,7 +114,7 @@ sub from_hash { # loop through attributes and use openapi_types to deserialize the data while ( my ($_key, $_type) = each %{$self->openapi_types} ) { - my $_json_attribute = $self->attribute_map->{$_key}; + my $_json_attribute = $self->attribute_map->{$_key}; if ($_type =~ /^array\[(.+)\]$/i) { # array my $_subclass = $1; my @_array = (); @@ -135,7 +135,7 @@ sub from_hash { $log->debugf("Warning: %s (%s) does not exist in input hash\n", $_key, $_json_attribute); } } - + return $self; } @@ -155,7 +155,6 @@ sub _deserialize { } - __PACKAGE__->class_documentation({description => '', class => 'OuterObjectWithEnumProperty', required => [], # TODO diff --git a/samples/client/petstore/perl/lib/WWW/OpenAPIClient/Object/Pet.pm b/samples/client/petstore/perl/lib/WWW/OpenAPIClient/Object/Pet.pm index 86b73132280ba26155e51a294096b82580d1dc30..43f2672c95563ee56af11df2d0946235626ee1a6 100644 --- a/samples/client/petstore/perl/lib/WWW/OpenAPIClient/Object/Pet.pm +++ b/samples/client/petstore/perl/lib/WWW/OpenAPIClient/Object/Pet.pm @@ -63,17 +63,17 @@ Generated by: https://openapi-generator.tech # __PACKAGE__->mk_classdata('attribute_map' => {}); __PACKAGE__->mk_classdata('openapi_types' => {}); -__PACKAGE__->mk_classdata('method_documentation' => {}); +__PACKAGE__->mk_classdata('method_documentation' => {}); __PACKAGE__->mk_classdata('class_documentation' => {}); # new plain object -sub new { - my ($class, %args) = @_; +sub new { + my ($class, %args) = @_; my $self = bless {}, $class; $self->init(%args); - + return $self; } @@ -97,7 +97,7 @@ sub to_hash { } # used by JSON for serialization -sub TO_JSON { +sub TO_JSON { my $self = shift; my $_data = {}; foreach my $_key (keys %{$self->attribute_map}) { @@ -115,7 +115,7 @@ sub from_hash { # loop through attributes and use openapi_types to deserialize the data while ( my ($_key, $_type) = each %{$self->openapi_types} ) { - my $_json_attribute = $self->attribute_map->{$_key}; + my $_json_attribute = $self->attribute_map->{$_key}; if ($_type =~ /^array\[(.+)\]$/i) { # array my $_subclass = $1; my @_array = (); @@ -136,7 +136,7 @@ sub from_hash { $log->debugf("Warning: %s (%s) does not exist in input hash\n", $_key, $_json_attribute); } } - + return $self; } @@ -156,7 +156,6 @@ sub _deserialize { } - __PACKAGE__->class_documentation({description => '', class => 'Pet', required => [], # TODO diff --git a/samples/client/petstore/perl/lib/WWW/OpenAPIClient/Object/ReadOnlyFirst.pm b/samples/client/petstore/perl/lib/WWW/OpenAPIClient/Object/ReadOnlyFirst.pm index f04defe0d97d34afa6533cc2aaca39d6a5057090..1563ebce861428aaa4714ec8f0130c0083c65417 100644 --- a/samples/client/petstore/perl/lib/WWW/OpenAPIClient/Object/ReadOnlyFirst.pm +++ b/samples/client/petstore/perl/lib/WWW/OpenAPIClient/Object/ReadOnlyFirst.pm @@ -61,17 +61,17 @@ Generated by: https://openapi-generator.tech # __PACKAGE__->mk_classdata('attribute_map' => {}); __PACKAGE__->mk_classdata('openapi_types' => {}); -__PACKAGE__->mk_classdata('method_documentation' => {}); +__PACKAGE__->mk_classdata('method_documentation' => {}); __PACKAGE__->mk_classdata('class_documentation' => {}); # new plain object -sub new { - my ($class, %args) = @_; +sub new { + my ($class, %args) = @_; my $self = bless {}, $class; $self->init(%args); - + return $self; } @@ -95,7 +95,7 @@ sub to_hash { } # used by JSON for serialization -sub TO_JSON { +sub TO_JSON { my $self = shift; my $_data = {}; foreach my $_key (keys %{$self->attribute_map}) { @@ -113,7 +113,7 @@ sub from_hash { # loop through attributes and use openapi_types to deserialize the data while ( my ($_key, $_type) = each %{$self->openapi_types} ) { - my $_json_attribute = $self->attribute_map->{$_key}; + my $_json_attribute = $self->attribute_map->{$_key}; if ($_type =~ /^array\[(.+)\]$/i) { # array my $_subclass = $1; my @_array = (); @@ -134,7 +134,7 @@ sub from_hash { $log->debugf("Warning: %s (%s) does not exist in input hash\n", $_key, $_json_attribute); } } - + return $self; } @@ -154,7 +154,6 @@ sub _deserialize { } - __PACKAGE__->class_documentation({description => '', class => 'ReadOnlyFirst', required => [], # TODO diff --git a/samples/client/petstore/perl/lib/WWW/OpenAPIClient/Object/SpecialModelName.pm b/samples/client/petstore/perl/lib/WWW/OpenAPIClient/Object/SpecialModelName.pm index bb884cfa0de22fe340f0faaea07e216cb923f808..fa9de2f527edcddb8e5dd944afc1e1b1293b438a 100644 --- a/samples/client/petstore/perl/lib/WWW/OpenAPIClient/Object/SpecialModelName.pm +++ b/samples/client/petstore/perl/lib/WWW/OpenAPIClient/Object/SpecialModelName.pm @@ -61,17 +61,17 @@ Generated by: https://openapi-generator.tech # __PACKAGE__->mk_classdata('attribute_map' => {}); __PACKAGE__->mk_classdata('openapi_types' => {}); -__PACKAGE__->mk_classdata('method_documentation' => {}); +__PACKAGE__->mk_classdata('method_documentation' => {}); __PACKAGE__->mk_classdata('class_documentation' => {}); # new plain object -sub new { - my ($class, %args) = @_; +sub new { + my ($class, %args) = @_; my $self = bless {}, $class; $self->init(%args); - + return $self; } @@ -95,7 +95,7 @@ sub to_hash { } # used by JSON for serialization -sub TO_JSON { +sub TO_JSON { my $self = shift; my $_data = {}; foreach my $_key (keys %{$self->attribute_map}) { @@ -113,7 +113,7 @@ sub from_hash { # loop through attributes and use openapi_types to deserialize the data while ( my ($_key, $_type) = each %{$self->openapi_types} ) { - my $_json_attribute = $self->attribute_map->{$_key}; + my $_json_attribute = $self->attribute_map->{$_key}; if ($_type =~ /^array\[(.+)\]$/i) { # array my $_subclass = $1; my @_array = (); @@ -134,7 +134,7 @@ sub from_hash { $log->debugf("Warning: %s (%s) does not exist in input hash\n", $_key, $_json_attribute); } } - + return $self; } @@ -154,7 +154,6 @@ sub _deserialize { } - __PACKAGE__->class_documentation({description => '', class => 'SpecialModelName', required => [], # TODO diff --git a/samples/client/petstore/perl/lib/WWW/OpenAPIClient/Object/Tag.pm b/samples/client/petstore/perl/lib/WWW/OpenAPIClient/Object/Tag.pm index 41399693422433184ec2d137423c0ca60b864a84..998d3179a3df0acc36010048c2e1970fb0a54f6a 100644 --- a/samples/client/petstore/perl/lib/WWW/OpenAPIClient/Object/Tag.pm +++ b/samples/client/petstore/perl/lib/WWW/OpenAPIClient/Object/Tag.pm @@ -61,17 +61,17 @@ Generated by: https://openapi-generator.tech # __PACKAGE__->mk_classdata('attribute_map' => {}); __PACKAGE__->mk_classdata('openapi_types' => {}); -__PACKAGE__->mk_classdata('method_documentation' => {}); +__PACKAGE__->mk_classdata('method_documentation' => {}); __PACKAGE__->mk_classdata('class_documentation' => {}); # new plain object -sub new { - my ($class, %args) = @_; +sub new { + my ($class, %args) = @_; my $self = bless {}, $class; $self->init(%args); - + return $self; } @@ -95,7 +95,7 @@ sub to_hash { } # used by JSON for serialization -sub TO_JSON { +sub TO_JSON { my $self = shift; my $_data = {}; foreach my $_key (keys %{$self->attribute_map}) { @@ -113,7 +113,7 @@ sub from_hash { # loop through attributes and use openapi_types to deserialize the data while ( my ($_key, $_type) = each %{$self->openapi_types} ) { - my $_json_attribute = $self->attribute_map->{$_key}; + my $_json_attribute = $self->attribute_map->{$_key}; if ($_type =~ /^array\[(.+)\]$/i) { # array my $_subclass = $1; my @_array = (); @@ -134,7 +134,7 @@ sub from_hash { $log->debugf("Warning: %s (%s) does not exist in input hash\n", $_key, $_json_attribute); } } - + return $self; } @@ -154,7 +154,6 @@ sub _deserialize { } - __PACKAGE__->class_documentation({description => '', class => 'Tag', required => [], # TODO diff --git a/samples/client/petstore/perl/lib/WWW/OpenAPIClient/Object/User.pm b/samples/client/petstore/perl/lib/WWW/OpenAPIClient/Object/User.pm index 9b86889ea4202fee82c4d1b3597c7e7f085118eb..e301902cc0395a50e7f4ec17acce9b364e564b83 100644 --- a/samples/client/petstore/perl/lib/WWW/OpenAPIClient/Object/User.pm +++ b/samples/client/petstore/perl/lib/WWW/OpenAPIClient/Object/User.pm @@ -61,17 +61,17 @@ Generated by: https://openapi-generator.tech # __PACKAGE__->mk_classdata('attribute_map' => {}); __PACKAGE__->mk_classdata('openapi_types' => {}); -__PACKAGE__->mk_classdata('method_documentation' => {}); +__PACKAGE__->mk_classdata('method_documentation' => {}); __PACKAGE__->mk_classdata('class_documentation' => {}); # new plain object -sub new { - my ($class, %args) = @_; +sub new { + my ($class, %args) = @_; my $self = bless {}, $class; $self->init(%args); - + return $self; } @@ -95,7 +95,7 @@ sub to_hash { } # used by JSON for serialization -sub TO_JSON { +sub TO_JSON { my $self = shift; my $_data = {}; foreach my $_key (keys %{$self->attribute_map}) { @@ -113,7 +113,7 @@ sub from_hash { # loop through attributes and use openapi_types to deserialize the data while ( my ($_key, $_type) = each %{$self->openapi_types} ) { - my $_json_attribute = $self->attribute_map->{$_key}; + my $_json_attribute = $self->attribute_map->{$_key}; if ($_type =~ /^array\[(.+)\]$/i) { # array my $_subclass = $1; my @_array = (); @@ -134,7 +134,7 @@ sub from_hash { $log->debugf("Warning: %s (%s) does not exist in input hash\n", $_key, $_json_attribute); } } - + return $self; } @@ -154,7 +154,6 @@ sub _deserialize { } - __PACKAGE__->class_documentation({description => '', class => 'User', required => [], # TODO diff --git a/samples/client/petstore/perl/lib/WWW/OpenAPIClient/PetApi.pm b/samples/client/petstore/perl/lib/WWW/OpenAPIClient/PetApi.pm index f55d7b63834a318a9ba441bc2188b8ed9d398c62..03e7a9316cee55825d67509948b8fb0d983a47c3 100644 --- a/samples/client/petstore/perl/lib/WWW/OpenAPIClient/PetApi.pm +++ b/samples/client/petstore/perl/lib/WWW/OpenAPIClient/PetApi.pm @@ -22,7 +22,7 @@ package WWW::OpenAPIClient::PetApi; require 5.6.0; use strict; use warnings; -use utf8; +use utf8; use Exporter; use Carp qw( croak ); use Log::Any qw($log); @@ -52,7 +52,7 @@ sub new { # add_pet # # Add a new pet to the store -# +# # @param Pet $pet Pet object that needs to be added to the store (required) { my $params = { @@ -62,7 +62,7 @@ sub new { required => '1', }, }; - __PACKAGE__->method_documentation->{ 'add_pet' } = { + __PACKAGE__->method_documentation->{ 'add_pet' } = { summary => 'Add a new pet to the store', params => $params, returns => undef, @@ -113,7 +113,7 @@ sub add_pet { # delete_pet # # Deletes a pet -# +# # @param int $pet_id Pet id to delete (required) # @param string $api_key (optional) { @@ -129,7 +129,7 @@ sub add_pet { required => '0', }, }; - __PACKAGE__->method_documentation->{ 'delete_pet' } = { + __PACKAGE__->method_documentation->{ 'delete_pet' } = { summary => 'Deletes a pet', params => $params, returns => undef, @@ -187,7 +187,7 @@ sub delete_pet { # find_pets_by_status # # Finds Pets by status -# +# # @param ARRAY[string] $status Status values that need to be considered for filter (required) { my $params = { @@ -197,7 +197,7 @@ sub delete_pet { required => '1', }, }; - __PACKAGE__->method_documentation->{ 'find_pets_by_status' } = { + __PACKAGE__->method_documentation->{ 'find_pets_by_status' } = { summary => 'Finds Pets by status', params => $params, returns => 'ARRAY[Pet]', @@ -252,7 +252,7 @@ sub find_pets_by_status { # find_pets_by_tags # # Finds Pets by tags -# +# # @param ARRAY[string] $tags Tags to filter by (required) { my $params = { @@ -262,7 +262,7 @@ sub find_pets_by_status { required => '1', }, }; - __PACKAGE__->method_documentation->{ 'find_pets_by_tags' } = { + __PACKAGE__->method_documentation->{ 'find_pets_by_tags' } = { summary => 'Finds Pets by tags', params => $params, returns => 'ARRAY[Pet]', @@ -317,7 +317,7 @@ sub find_pets_by_tags { # get_pet_by_id # # Find pet by ID -# +# # @param int $pet_id ID of pet to return (required) { my $params = { @@ -327,7 +327,7 @@ sub find_pets_by_tags { required => '1', }, }; - __PACKAGE__->method_documentation->{ 'get_pet_by_id' } = { + __PACKAGE__->method_documentation->{ 'get_pet_by_id' } = { summary => 'Find pet by ID', params => $params, returns => 'Pet', @@ -384,7 +384,7 @@ sub get_pet_by_id { # update_pet # # Update an existing pet -# +# # @param Pet $pet Pet object that needs to be added to the store (required) { my $params = { @@ -394,7 +394,7 @@ sub get_pet_by_id { required => '1', }, }; - __PACKAGE__->method_documentation->{ 'update_pet' } = { + __PACKAGE__->method_documentation->{ 'update_pet' } = { summary => 'Update an existing pet', params => $params, returns => undef, @@ -445,7 +445,7 @@ sub update_pet { # update_pet_with_form # # Updates a pet in the store with form data -# +# # @param int $pet_id ID of pet that needs to be updated (required) # @param string $name Updated name of the pet (optional) # @param string $status Updated status of the pet (optional) @@ -467,7 +467,7 @@ sub update_pet { required => '0', }, }; - __PACKAGE__->method_documentation->{ 'update_pet_with_form' } = { + __PACKAGE__->method_documentation->{ 'update_pet_with_form' } = { summary => 'Updates a pet in the store with form data', params => $params, returns => undef, @@ -509,12 +509,12 @@ sub update_pet_with_form { if ( exists $args{'name'} ) { $form_params->{'name'} = $self->{api_client}->to_form_value($args{'name'}); } - + # form params if ( exists $args{'status'} ) { $form_params->{'status'} = $self->{api_client}->to_form_value($args{'status'}); } - + my $_body_data; # authentication setting, if any my $auth_settings = [qw(petstore_auth )]; @@ -530,7 +530,7 @@ sub update_pet_with_form { # upload_file # # uploads an image -# +# # @param int $pet_id ID of pet to update (required) # @param string $additional_metadata Additional data to pass to server (optional) # @param string $file file to upload (optional) @@ -552,7 +552,7 @@ sub update_pet_with_form { required => '0', }, }; - __PACKAGE__->method_documentation->{ 'upload_file' } = { + __PACKAGE__->method_documentation->{ 'upload_file' } = { summary => 'uploads an image', params => $params, returns => 'ApiResponse', @@ -594,13 +594,13 @@ sub upload_file { if ( exists $args{'additional_metadata'} ) { $form_params->{'additionalMetadata'} = $self->{api_client}->to_form_value($args{'additional_metadata'}); } - + # form params if ( exists $args{'file'} ) { $form_params->{'file'} = [] unless defined $form_params->{'file'}; push @{$form_params->{'file'}}, $args{'file'}; } - + my $_body_data; # authentication setting, if any my $auth_settings = [qw(petstore_auth )]; @@ -620,7 +620,7 @@ sub upload_file { # upload_file_with_required_file # # uploads an image (required) -# +# # @param int $pet_id ID of pet to update (required) # @param string $required_file file to upload (required) # @param string $additional_metadata Additional data to pass to server (optional) @@ -642,7 +642,7 @@ sub upload_file { required => '0', }, }; - __PACKAGE__->method_documentation->{ 'upload_file_with_required_file' } = { + __PACKAGE__->method_documentation->{ 'upload_file_with_required_file' } = { summary => 'uploads an image (required)', params => $params, returns => 'ApiResponse', @@ -689,13 +689,13 @@ sub upload_file_with_required_file { if ( exists $args{'additional_metadata'} ) { $form_params->{'additionalMetadata'} = $self->{api_client}->to_form_value($args{'additional_metadata'}); } - + # form params if ( exists $args{'required_file'} ) { $form_params->{'requiredFile'} = [] unless defined $form_params->{'requiredFile'}; push @{$form_params->{'requiredFile'}}, $args{'required_file'}; } - + my $_body_data; # authentication setting, if any my $auth_settings = [qw(petstore_auth )]; diff --git a/samples/client/petstore/perl/lib/WWW/OpenAPIClient/Role/AutoDoc.pm b/samples/client/petstore/perl/lib/WWW/OpenAPIClient/Role/AutoDoc.pm index db553b53a1fdfa969c8c35221e638a39533d4635..5d8c853d24255767fb387440ceec0dd85b437f36 100644 --- a/samples/client/petstore/perl/lib/WWW/OpenAPIClient/Role/AutoDoc.pm +++ b/samples/client/petstore/perl/lib/WWW/OpenAPIClient/Role/AutoDoc.pm @@ -72,7 +72,7 @@ sub _printisa { } # ----- format specs ----- - format INHERIT = + format INHERIT = @* - $myclass @@ -82,16 +82,16 @@ $myclass $dsub All subclasses: @* $sub - + Target API: @* @* $app_name, $app_version Generated on: @* $generated_date - Generator class: @* + Generator class: @* $generator_class - + . - format ROLES = + format ROLES = Composes: ^<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< ~ $rolepkg requires: ^<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< ~ @@ -110,10 +110,10 @@ $myclass =head2 @* version: @* $app_name, $app_version - + Automatically generated by the Perl Generator in the OpenAPI Generator project: -=over 4 +=over 4 =item Build date: @* $generated_date @@ -121,14 +121,14 @@ Automatically generated by the Perl Generator in the OpenAPI Generator project: =item Build package: @* $generator_class -=item Codegen version: +=item Codegen version: =back =head1 INHERITANCE -=head2 Base class(es) +=head2 Base class(es) @* $isa @@ -137,24 +137,24 @@ $isa @* $dsub - + =head2 All subclasses @* $sub - + =head1 COMPOSITION -@* composes the following roles: -$myclass +@* composes the following roles: +$myclass . format ROLES_POD = =head2 C<@*> $rolepkg - + Requires: @* @@ -189,7 +189,7 @@ HEAD die "Don't know how to print '$how'"; } - $self->_printmethod($_, $how) for uniq sort $self->meta->get_all_method_names; #$self->meta->get_method_list, + $self->_printmethod($_, $how) for uniq sort $self->meta->get_all_method_names; #$self->meta->get_method_list, if ($how eq 'pod') { $~ = 'METHOD_POD_CLOSE'; @@ -203,7 +203,7 @@ sub _printmethod { my ($self, $methodname, $how) = @_; return if $methodname =~ /^_/; return if $self->meta->has_attribute($methodname); - my %internal = map {$_ => 1} qw(BUILD BUILDARGS meta can new DEMOLISHALL DESTROY + my %internal = map {$_ => 1} qw(BUILD BUILDARGS meta can new DEMOLISHALL DESTROY DOES isa BUILDALL does VERSION dump ); return if $internal{$methodname}; @@ -221,7 +221,7 @@ sub _printmethod { my $aa = $method->associated_attribute; $on = $aa->{isa}; $via = $aa->{name}; - $original_pkg = $on; + $original_pkg = $on; $doc = $original_pkg->method_documentation->{$delegate_to}->{summary}; } else { @@ -253,7 +253,7 @@ METHODS Name delegates to on via =========================================================================================================================================================================== . - format METHOD = + format METHOD = @<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< @<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<... @<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<... @<<<<<<<<<<<<<<<<... $methodname, $delegate_to, $on, $via . @@ -272,14 +272,14 @@ $methodname . - format METHODHEAD_POD = + format METHODHEAD_POD = =head1 METHODS . - - format METHOD_POD = - + + format METHOD_POD = + =head2 C<@*()> $methodname @@ -288,7 +288,7 @@ $methodname . - format METHOD_POD_DELEGATED = + format METHOD_POD_DELEGATED = =head2 C<@*()> $methodname @@ -297,7 +297,7 @@ $methodname $original_pkg Delegates to: @*() $delegate_to - On: @* + On: @* $on Via: @*() $via @@ -308,7 +308,7 @@ $methodname . format METHOD_POD_CLOSE = - + . # ----- / format specs ----- } @@ -382,15 +382,15 @@ ATTRIBUTES ---------- Name is isa reqd lazy doc handles ============================================================================================================== -. - format ATTR = +. + format ATTR = @<<<<<<<<<<<<<<<<< @< @<<<<<<<<<<<<<<<<<<<<<<<< @<<< @<<< @<< ^<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< $attrname, $is, $tc, $reqd, $lazy, $has_doc, $handles ^<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< ~~ $handles . - format ATTR_NARROW = + format ATTR_NARROW = @* $attrname is: @* @@ -434,7 +434,7 @@ $attrname $handles . - format ATTR_POD_CLOSE = + format ATTR_POD_CLOSE = . diff --git a/samples/client/petstore/perl/lib/WWW/OpenAPIClient/StoreApi.pm b/samples/client/petstore/perl/lib/WWW/OpenAPIClient/StoreApi.pm index 3b87d3d8f73186b9df0c0b50a9ba8cf577f167c2..a11c6ded365bc2bc50c3ce6602162a6c69da4cc5 100644 --- a/samples/client/petstore/perl/lib/WWW/OpenAPIClient/StoreApi.pm +++ b/samples/client/petstore/perl/lib/WWW/OpenAPIClient/StoreApi.pm @@ -22,7 +22,7 @@ package WWW::OpenAPIClient::StoreApi; require 5.6.0; use strict; use warnings; -use utf8; +use utf8; use Exporter; use Carp qw( croak ); use Log::Any qw($log); @@ -52,7 +52,7 @@ sub new { # delete_order # # Delete purchase order by ID -# +# # @param string $order_id ID of the order that needs to be deleted (required) { my $params = { @@ -62,7 +62,7 @@ sub new { required => '1', }, }; - __PACKAGE__->method_documentation->{ 'delete_order' } = { + __PACKAGE__->method_documentation->{ 'delete_order' } = { summary => 'Delete purchase order by ID', params => $params, returns => undef, @@ -115,11 +115,11 @@ sub delete_order { # get_inventory # # Returns pet inventories by status -# +# { my $params = { }; - __PACKAGE__->method_documentation->{ 'get_inventory' } = { + __PACKAGE__->method_documentation->{ 'get_inventory' } = { summary => 'Returns pet inventories by status', params => $params, returns => 'HASH[string,int]', @@ -164,7 +164,7 @@ sub get_inventory { # get_order_by_id # # Find purchase order by ID -# +# # @param int $order_id ID of pet that needs to be fetched (required) { my $params = { @@ -174,7 +174,7 @@ sub get_inventory { required => '1', }, }; - __PACKAGE__->method_documentation->{ 'get_order_by_id' } = { + __PACKAGE__->method_documentation->{ 'get_order_by_id' } = { summary => 'Find purchase order by ID', params => $params, returns => 'Order', @@ -231,7 +231,7 @@ sub get_order_by_id { # place_order # # Place an order for a pet -# +# # @param Order $order order placed for purchasing the pet (required) { my $params = { @@ -241,7 +241,7 @@ sub get_order_by_id { required => '1', }, }; - __PACKAGE__->method_documentation->{ 'place_order' } = { + __PACKAGE__->method_documentation->{ 'place_order' } = { summary => 'Place an order for a pet', params => $params, returns => 'Order', diff --git a/samples/client/petstore/perl/lib/WWW/OpenAPIClient/UserApi.pm b/samples/client/petstore/perl/lib/WWW/OpenAPIClient/UserApi.pm index 15bb4b97a3c189eb696e4435a0b462ae2b42cdb6..787b60d4a5fe263825127529c21c89a07761ff1e 100644 --- a/samples/client/petstore/perl/lib/WWW/OpenAPIClient/UserApi.pm +++ b/samples/client/petstore/perl/lib/WWW/OpenAPIClient/UserApi.pm @@ -22,7 +22,7 @@ package WWW::OpenAPIClient::UserApi; require 5.6.0; use strict; use warnings; -use utf8; +use utf8; use Exporter; use Carp qw( croak ); use Log::Any qw($log); @@ -52,7 +52,7 @@ sub new { # create_user # # Create user -# +# # @param User $user Created user object (required) { my $params = { @@ -62,7 +62,7 @@ sub new { required => '1', }, }; - __PACKAGE__->method_documentation->{ 'create_user' } = { + __PACKAGE__->method_documentation->{ 'create_user' } = { summary => 'Create user', params => $params, returns => undef, @@ -113,7 +113,7 @@ sub create_user { # create_users_with_array_input # # Creates list of users with given input array -# +# # @param ARRAY[User] $user List of user object (required) { my $params = { @@ -123,7 +123,7 @@ sub create_user { required => '1', }, }; - __PACKAGE__->method_documentation->{ 'create_users_with_array_input' } = { + __PACKAGE__->method_documentation->{ 'create_users_with_array_input' } = { summary => 'Creates list of users with given input array', params => $params, returns => undef, @@ -174,7 +174,7 @@ sub create_users_with_array_input { # create_users_with_list_input # # Creates list of users with given input array -# +# # @param ARRAY[User] $user List of user object (required) { my $params = { @@ -184,7 +184,7 @@ sub create_users_with_array_input { required => '1', }, }; - __PACKAGE__->method_documentation->{ 'create_users_with_list_input' } = { + __PACKAGE__->method_documentation->{ 'create_users_with_list_input' } = { summary => 'Creates list of users with given input array', params => $params, returns => undef, @@ -235,7 +235,7 @@ sub create_users_with_list_input { # delete_user # # Delete user -# +# # @param string $username The name that needs to be deleted (required) { my $params = { @@ -245,7 +245,7 @@ sub create_users_with_list_input { required => '1', }, }; - __PACKAGE__->method_documentation->{ 'delete_user' } = { + __PACKAGE__->method_documentation->{ 'delete_user' } = { summary => 'Delete user', params => $params, returns => undef, @@ -298,7 +298,7 @@ sub delete_user { # get_user_by_name # # Get user by user name -# +# # @param string $username The name that needs to be fetched. Use user1 for testing. (required) { my $params = { @@ -308,7 +308,7 @@ sub delete_user { required => '1', }, }; - __PACKAGE__->method_documentation->{ 'get_user_by_name' } = { + __PACKAGE__->method_documentation->{ 'get_user_by_name' } = { summary => 'Get user by user name', params => $params, returns => 'User', @@ -365,7 +365,7 @@ sub get_user_by_name { # login_user # # Logs user into the system -# +# # @param string $username The user name for login (required) # @param string $password The password for login in clear text (required) { @@ -381,7 +381,7 @@ sub get_user_by_name { required => '1', }, }; - __PACKAGE__->method_documentation->{ 'login_user' } = { + __PACKAGE__->method_documentation->{ 'login_user' } = { summary => 'Logs user into the system', params => $params, returns => 'string', @@ -446,11 +446,11 @@ sub login_user { # logout_user # # Logs out current logged in user session -# +# { my $params = { }; - __PACKAGE__->method_documentation->{ 'logout_user' } = { + __PACKAGE__->method_documentation->{ 'logout_user' } = { summary => 'Logs out current logged in user session', params => $params, returns => undef, @@ -491,7 +491,7 @@ sub logout_user { # update_user # # Updated user -# +# # @param string $username name that need to be deleted (required) # @param User $user Updated user object (required) { @@ -507,7 +507,7 @@ sub logout_user { required => '1', }, }; - __PACKAGE__->method_documentation->{ 'update_user' } = { + __PACKAGE__->method_documentation->{ 'update_user' } = { summary => 'Updated user', params => $params, returns => undef, diff --git a/samples/client/petstore/php/OpenAPIClient-php/git_push.sh b/samples/client/petstore/php/OpenAPIClient-php/git_push.sh index ced3be2b0c7b2349ff06d18da19d4b31435c9fa6..9405f72e950cdb8ca24c3cf4d15cee7eac62fde7 100644 --- a/samples/client/petstore/php/OpenAPIClient-php/git_push.sh +++ b/samples/client/petstore/php/OpenAPIClient-php/git_push.sh @@ -55,4 +55,3 @@ 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/php/OpenAPIClient-php/lib/HeaderSelector.php b/samples/client/petstore/php/OpenAPIClient-php/lib/HeaderSelector.php index bc497ef88449f5bb37627196c896fc5097f1347f..64ac0d3debed9b321f20fd27213437e07a29f1ad 100644 --- a/samples/client/petstore/php/OpenAPIClient-php/lib/HeaderSelector.php +++ b/samples/client/petstore/php/OpenAPIClient-php/lib/HeaderSelector.php @@ -106,4 +106,3 @@ class HeaderSelector } } } - diff --git a/samples/client/petstore/powershell/src/PSPetstore/Private/PSHttpSignatureAuth.ps1 b/samples/client/petstore/powershell/src/PSPetstore/Private/PSHttpSignatureAuth.ps1 index 43c6ad42fb320de75b6d6723a09572132ab626e6..4e65904771499a7471012f9289d2487a96507760 100644 --- a/samples/client/petstore/powershell/src/PSPetstore/Private/PSHttpSignatureAuth.ps1 +++ b/samples/client/petstore/powershell/src/PSPetstore/Private/PSHttpSignatureAuth.ps1 @@ -403,7 +403,7 @@ function ConvertTo-ECDSAANS1Format{ ) $derLength = 68 #default lenght for ECDSA code signinged bit 0x44 - $rbytesLength = 32 #R length 0x20 + $rbytesLength = 32 #R length 0x20 $sbytesLength = 32 #S length 0x20 [byte[]]$rBytes = $signedBytes[0..31] [byte[]]$sBytes = $signedBytes[32..63] @@ -424,11 +424,11 @@ function ConvertTo-ECDSAANS1Format{ $derBytes += 48 # start of the sequence 0x30 $derBytes += $derLength # total length r lenth, type and r bytes - + $derBytes += 2 # tag for integer $derBytes += $rbytesLength # length of r $derBytes += $rBytes - + $derBytes += 2 #tag for integer $derBytes += $sbytesLength #length of s $derBytes += $sBytes diff --git a/samples/client/petstore/python-asyncio/git_push.sh b/samples/client/petstore/python-asyncio/git_push.sh index ced3be2b0c7b2349ff06d18da19d4b31435c9fa6..9405f72e950cdb8ca24c3cf4d15cee7eac62fde7 100644 --- a/samples/client/petstore/python-asyncio/git_push.sh +++ b/samples/client/petstore/python-asyncio/git_push.sh @@ -55,4 +55,3 @@ 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/python-asyncio/petstore_api/api/another_fake_api.py b/samples/client/petstore/python-asyncio/petstore_api/api/another_fake_api.py index 6fdd4523647203eebe67e8bbbdf0dcc269711bf6..b95df897b49330e2b3c3b2997cbb5a8c0d29e038 100644 --- a/samples/client/petstore/python-asyncio/petstore_api/api/another_fake_api.py +++ b/samples/client/petstore/python-asyncio/petstore_api/api/another_fake_api.py @@ -153,7 +153,7 @@ class AnotherFakeApi(object): # Authentication setting auth_settings = [] # noqa: E501 - + response_types_map = { 200: "Client", } 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 252a82c0ef447692ac9c6eb9fa1de456d7bc7326..28f2d63182845b36ab0f1f638b358bb17fa9ecce 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 @@ -149,7 +149,7 @@ class FakeApi(object): # Authentication setting auth_settings = [] # noqa: E501 - + response_types_map = {} return self.api_client.call_api( @@ -278,7 +278,7 @@ class FakeApi(object): # Authentication setting auth_settings = [] # noqa: E501 - + response_types_map = { 200: "bool", } @@ -409,7 +409,7 @@ class FakeApi(object): # Authentication setting auth_settings = [] # noqa: E501 - + response_types_map = { 200: "OuterComposite", } @@ -540,7 +540,7 @@ class FakeApi(object): # Authentication setting auth_settings = [] # noqa: E501 - + response_types_map = { 200: "float", } @@ -671,7 +671,7 @@ class FakeApi(object): # Authentication setting auth_settings = [] # noqa: E501 - + response_types_map = { 200: "str", } @@ -806,7 +806,7 @@ class FakeApi(object): # Authentication setting auth_settings = [] # noqa: E501 - + response_types_map = {} return self.api_client.call_api( @@ -948,7 +948,7 @@ class FakeApi(object): # Authentication setting auth_settings = [] # noqa: E501 - + response_types_map = {} return self.api_client.call_api( @@ -1085,7 +1085,7 @@ class FakeApi(object): # Authentication setting auth_settings = [] # noqa: E501 - + response_types_map = { 200: "Client", } @@ -1351,7 +1351,7 @@ class FakeApi(object): # Authentication setting auth_settings = ['http_basic_test'] # noqa: E501 - + response_types_map = {} return self.api_client.call_api( @@ -1532,7 +1532,7 @@ class FakeApi(object): # Authentication setting auth_settings = [] # noqa: E501 - + response_types_map = {} return self.api_client.call_api( @@ -1704,7 +1704,7 @@ class FakeApi(object): body_params = None # Authentication setting auth_settings = [] # noqa: E501 - + response_types_map = {} return self.api_client.call_api( @@ -1835,7 +1835,7 @@ class FakeApi(object): # Authentication setting auth_settings = [] # noqa: E501 - + response_types_map = {} return self.api_client.call_api( @@ -1977,7 +1977,7 @@ class FakeApi(object): # Authentication setting auth_settings = [] # noqa: E501 - + response_types_map = {} return self.api_client.call_api( @@ -2155,7 +2155,7 @@ class FakeApi(object): body_params = None # Authentication setting auth_settings = [] # noqa: E501 - + response_types_map = {} return self.api_client.call_api( diff --git a/samples/client/petstore/python-asyncio/petstore_api/api/fake_classname_tags_123_api.py b/samples/client/petstore/python-asyncio/petstore_api/api/fake_classname_tags_123_api.py index f87835d7a61d55bb91cc3a55c1004a119c80e963..5d6405e2cbdb67b8f0c76641928a8f2ba7525fba 100644 --- a/samples/client/petstore/python-asyncio/petstore_api/api/fake_classname_tags_123_api.py +++ b/samples/client/petstore/python-asyncio/petstore_api/api/fake_classname_tags_123_api.py @@ -153,7 +153,7 @@ class FakeClassnameTags123Api(object): # Authentication setting auth_settings = ['api_key_query'] # noqa: E501 - + response_types_map = { 200: "Client", } diff --git a/samples/client/petstore/python-asyncio/petstore_api/api/pet_api.py b/samples/client/petstore/python-asyncio/petstore_api/api/pet_api.py index 5baedc8e6d27b17c8e5d1c2fef38eba417b63c21..50dab4563e927c3e6f670959e41e5a21ed18e4b2 100644 --- a/samples/client/petstore/python-asyncio/petstore_api/api/pet_api.py +++ b/samples/client/petstore/python-asyncio/petstore_api/api/pet_api.py @@ -147,7 +147,7 @@ class PetApi(object): # Authentication setting auth_settings = ['petstore_auth'] # noqa: E501 - + response_types_map = {} return self.api_client.call_api( @@ -281,7 +281,7 @@ class PetApi(object): body_params = None # Authentication setting auth_settings = ['petstore_auth'] # noqa: E501 - + response_types_map = {} return self.api_client.call_api( @@ -415,7 +415,7 @@ class PetApi(object): # Authentication setting auth_settings = ['petstore_auth'] # noqa: E501 - + response_types_map = { 200: "list[Pet]", 400: None, @@ -552,7 +552,7 @@ class PetApi(object): # Authentication setting auth_settings = ['petstore_auth'] # noqa: E501 - + response_types_map = { 200: "list[Pet]", 400: None, @@ -688,7 +688,7 @@ class PetApi(object): # Authentication setting auth_settings = ['api_key'] # noqa: E501 - + response_types_map = { 200: "Pet", 400: None, @@ -823,7 +823,7 @@ class PetApi(object): # Authentication setting auth_settings = ['petstore_auth'] # noqa: E501 - + response_types_map = {} return self.api_client.call_api( @@ -968,7 +968,7 @@ class PetApi(object): # Authentication setting auth_settings = ['petstore_auth'] # noqa: E501 - + response_types_map = {} return self.api_client.call_api( @@ -1117,7 +1117,7 @@ class PetApi(object): # Authentication setting auth_settings = ['petstore_auth'] # noqa: E501 - + response_types_map = { 200: "ApiResponse", } @@ -1272,7 +1272,7 @@ class PetApi(object): # Authentication setting auth_settings = ['petstore_auth'] # noqa: E501 - + response_types_map = { 200: "ApiResponse", } diff --git a/samples/client/petstore/python-asyncio/petstore_api/api/store_api.py b/samples/client/petstore/python-asyncio/petstore_api/api/store_api.py index 734d8e17dc93bbb60bc90d32504846a55ca42d38..092a4542774d505423e88000bed647628e2f1652 100644 --- a/samples/client/petstore/python-asyncio/petstore_api/api/store_api.py +++ b/samples/client/petstore/python-asyncio/petstore_api/api/store_api.py @@ -145,7 +145,7 @@ class StoreApi(object): body_params = None # Authentication setting auth_settings = [] # noqa: E501 - + response_types_map = {} return self.api_client.call_api( @@ -267,7 +267,7 @@ class StoreApi(object): # Authentication setting auth_settings = ['api_key'] # noqa: E501 - + response_types_map = { 200: "dict(str, int)", } @@ -406,7 +406,7 @@ class StoreApi(object): # Authentication setting auth_settings = [] # noqa: E501 - + response_types_map = { 200: "Order", 400: None, @@ -541,7 +541,7 @@ class StoreApi(object): # Authentication setting auth_settings = [] # noqa: E501 - + response_types_map = { 200: "Order", 400: None, diff --git a/samples/client/petstore/python-asyncio/petstore_api/api/user_api.py b/samples/client/petstore/python-asyncio/petstore_api/api/user_api.py index 9f8be84771ae03c6dff1090955e4f91e77651b02..7c68a89e624d12fa9cfb27b3a44a7bda370019b4 100644 --- a/samples/client/petstore/python-asyncio/petstore_api/api/user_api.py +++ b/samples/client/petstore/python-asyncio/petstore_api/api/user_api.py @@ -145,7 +145,7 @@ class UserApi(object): body_params = local_var_params['body'] # Authentication setting auth_settings = [] # noqa: E501 - + response_types_map = {} return self.api_client.call_api( @@ -272,7 +272,7 @@ class UserApi(object): body_params = local_var_params['body'] # Authentication setting auth_settings = [] # noqa: E501 - + response_types_map = {} return self.api_client.call_api( @@ -399,7 +399,7 @@ class UserApi(object): body_params = local_var_params['body'] # Authentication setting auth_settings = [] # noqa: E501 - + response_types_map = {} return self.api_client.call_api( @@ -528,7 +528,7 @@ class UserApi(object): body_params = None # Authentication setting auth_settings = [] # noqa: E501 - + response_types_map = {} return self.api_client.call_api( @@ -659,7 +659,7 @@ class UserApi(object): # Authentication setting auth_settings = [] # noqa: E501 - + response_types_map = { 200: "User", 400: None, @@ -805,7 +805,7 @@ class UserApi(object): # Authentication setting auth_settings = [] # noqa: E501 - + response_types_map = { 200: "str", 400: None, @@ -924,7 +924,7 @@ class UserApi(object): body_params = None # Authentication setting auth_settings = [] # noqa: E501 - + response_types_map = {} return self.api_client.call_api( @@ -1064,7 +1064,7 @@ class UserApi(object): body_params = local_var_params['body'] # Authentication setting auth_settings = [] # noqa: E501 - + response_types_map = {} return self.api_client.call_api( 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 14d998d167348b9e139aa1ee01ff2448b85cb9bf..3e51664dac3e7962c6a9d6d4baebb9e7c96246f2 100644 --- a/samples/client/petstore/python-asyncio/petstore_api/api_client.py +++ b/samples/client/petstore/python-asyncio/petstore_api/api_client.py @@ -197,7 +197,7 @@ class ApiClient(object): if not _preload_content: return return_data - + response_type = response_types_map.get(response_data.status, None) if six.PY3 and response_type not in ["file", "bytes"]: @@ -209,7 +209,7 @@ class ApiClient(object): response_data.data = response_data.data.decode(encoding) # deserialize response data - + if response_type: return_data = self.deserialize(response_data, response_type) else: diff --git a/samples/client/petstore/python-asyncio/petstore_api/configuration.py b/samples/client/petstore/python-asyncio/petstore_api/configuration.py index 16afbfa72789f58a5b88d362e51e3c7bc7906bab..38b2562be3175b72ef607eb027917273b00dfaef 100644 --- a/samples/client/petstore/python-asyncio/petstore_api/configuration.py +++ b/samples/client/petstore/python-asyncio/petstore_api/configuration.py @@ -77,8 +77,8 @@ class Configuration(object): :param server_operation_variables: Mapping from operation ID to a mapping with string values to replace variables in templated server configuration. The validation of enums is performed for variables with defined enum values before. - :param ssl_ca_cert: str - the path to a file of concatenated CA certificates - in PEM format + :param ssl_ca_cert: str - the path to a file of concatenated CA certificates + in PEM format :Example: diff --git a/samples/client/petstore/python-legacy/git_push.sh b/samples/client/petstore/python-legacy/git_push.sh index ced3be2b0c7b2349ff06d18da19d4b31435c9fa6..9405f72e950cdb8ca24c3cf4d15cee7eac62fde7 100644 --- a/samples/client/petstore/python-legacy/git_push.sh +++ b/samples/client/petstore/python-legacy/git_push.sh @@ -55,4 +55,3 @@ 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/python-legacy/petstore_api/api/another_fake_api.py b/samples/client/petstore/python-legacy/petstore_api/api/another_fake_api.py index 6fdd4523647203eebe67e8bbbdf0dcc269711bf6..b95df897b49330e2b3c3b2997cbb5a8c0d29e038 100644 --- a/samples/client/petstore/python-legacy/petstore_api/api/another_fake_api.py +++ b/samples/client/petstore/python-legacy/petstore_api/api/another_fake_api.py @@ -153,7 +153,7 @@ class AnotherFakeApi(object): # Authentication setting auth_settings = [] # noqa: E501 - + response_types_map = { 200: "Client", } diff --git a/samples/client/petstore/python-legacy/petstore_api/api/fake_api.py b/samples/client/petstore/python-legacy/petstore_api/api/fake_api.py index 252a82c0ef447692ac9c6eb9fa1de456d7bc7326..28f2d63182845b36ab0f1f638b358bb17fa9ecce 100644 --- a/samples/client/petstore/python-legacy/petstore_api/api/fake_api.py +++ b/samples/client/petstore/python-legacy/petstore_api/api/fake_api.py @@ -149,7 +149,7 @@ class FakeApi(object): # Authentication setting auth_settings = [] # noqa: E501 - + response_types_map = {} return self.api_client.call_api( @@ -278,7 +278,7 @@ class FakeApi(object): # Authentication setting auth_settings = [] # noqa: E501 - + response_types_map = { 200: "bool", } @@ -409,7 +409,7 @@ class FakeApi(object): # Authentication setting auth_settings = [] # noqa: E501 - + response_types_map = { 200: "OuterComposite", } @@ -540,7 +540,7 @@ class FakeApi(object): # Authentication setting auth_settings = [] # noqa: E501 - + response_types_map = { 200: "float", } @@ -671,7 +671,7 @@ class FakeApi(object): # Authentication setting auth_settings = [] # noqa: E501 - + response_types_map = { 200: "str", } @@ -806,7 +806,7 @@ class FakeApi(object): # Authentication setting auth_settings = [] # noqa: E501 - + response_types_map = {} return self.api_client.call_api( @@ -948,7 +948,7 @@ class FakeApi(object): # Authentication setting auth_settings = [] # noqa: E501 - + response_types_map = {} return self.api_client.call_api( @@ -1085,7 +1085,7 @@ class FakeApi(object): # Authentication setting auth_settings = [] # noqa: E501 - + response_types_map = { 200: "Client", } @@ -1351,7 +1351,7 @@ class FakeApi(object): # Authentication setting auth_settings = ['http_basic_test'] # noqa: E501 - + response_types_map = {} return self.api_client.call_api( @@ -1532,7 +1532,7 @@ class FakeApi(object): # Authentication setting auth_settings = [] # noqa: E501 - + response_types_map = {} return self.api_client.call_api( @@ -1704,7 +1704,7 @@ class FakeApi(object): body_params = None # Authentication setting auth_settings = [] # noqa: E501 - + response_types_map = {} return self.api_client.call_api( @@ -1835,7 +1835,7 @@ class FakeApi(object): # Authentication setting auth_settings = [] # noqa: E501 - + response_types_map = {} return self.api_client.call_api( @@ -1977,7 +1977,7 @@ class FakeApi(object): # Authentication setting auth_settings = [] # noqa: E501 - + response_types_map = {} return self.api_client.call_api( @@ -2155,7 +2155,7 @@ class FakeApi(object): body_params = None # Authentication setting auth_settings = [] # noqa: E501 - + response_types_map = {} return self.api_client.call_api( diff --git a/samples/client/petstore/python-legacy/petstore_api/api/fake_classname_tags_123_api.py b/samples/client/petstore/python-legacy/petstore_api/api/fake_classname_tags_123_api.py index f87835d7a61d55bb91cc3a55c1004a119c80e963..5d6405e2cbdb67b8f0c76641928a8f2ba7525fba 100644 --- a/samples/client/petstore/python-legacy/petstore_api/api/fake_classname_tags_123_api.py +++ b/samples/client/petstore/python-legacy/petstore_api/api/fake_classname_tags_123_api.py @@ -153,7 +153,7 @@ class FakeClassnameTags123Api(object): # Authentication setting auth_settings = ['api_key_query'] # noqa: E501 - + response_types_map = { 200: "Client", } diff --git a/samples/client/petstore/python-legacy/petstore_api/api/pet_api.py b/samples/client/petstore/python-legacy/petstore_api/api/pet_api.py index 5baedc8e6d27b17c8e5d1c2fef38eba417b63c21..50dab4563e927c3e6f670959e41e5a21ed18e4b2 100644 --- a/samples/client/petstore/python-legacy/petstore_api/api/pet_api.py +++ b/samples/client/petstore/python-legacy/petstore_api/api/pet_api.py @@ -147,7 +147,7 @@ class PetApi(object): # Authentication setting auth_settings = ['petstore_auth'] # noqa: E501 - + response_types_map = {} return self.api_client.call_api( @@ -281,7 +281,7 @@ class PetApi(object): body_params = None # Authentication setting auth_settings = ['petstore_auth'] # noqa: E501 - + response_types_map = {} return self.api_client.call_api( @@ -415,7 +415,7 @@ class PetApi(object): # Authentication setting auth_settings = ['petstore_auth'] # noqa: E501 - + response_types_map = { 200: "list[Pet]", 400: None, @@ -552,7 +552,7 @@ class PetApi(object): # Authentication setting auth_settings = ['petstore_auth'] # noqa: E501 - + response_types_map = { 200: "list[Pet]", 400: None, @@ -688,7 +688,7 @@ class PetApi(object): # Authentication setting auth_settings = ['api_key'] # noqa: E501 - + response_types_map = { 200: "Pet", 400: None, @@ -823,7 +823,7 @@ class PetApi(object): # Authentication setting auth_settings = ['petstore_auth'] # noqa: E501 - + response_types_map = {} return self.api_client.call_api( @@ -968,7 +968,7 @@ class PetApi(object): # Authentication setting auth_settings = ['petstore_auth'] # noqa: E501 - + response_types_map = {} return self.api_client.call_api( @@ -1117,7 +1117,7 @@ class PetApi(object): # Authentication setting auth_settings = ['petstore_auth'] # noqa: E501 - + response_types_map = { 200: "ApiResponse", } @@ -1272,7 +1272,7 @@ class PetApi(object): # Authentication setting auth_settings = ['petstore_auth'] # noqa: E501 - + response_types_map = { 200: "ApiResponse", } diff --git a/samples/client/petstore/python-legacy/petstore_api/api/store_api.py b/samples/client/petstore/python-legacy/petstore_api/api/store_api.py index 734d8e17dc93bbb60bc90d32504846a55ca42d38..092a4542774d505423e88000bed647628e2f1652 100644 --- a/samples/client/petstore/python-legacy/petstore_api/api/store_api.py +++ b/samples/client/petstore/python-legacy/petstore_api/api/store_api.py @@ -145,7 +145,7 @@ class StoreApi(object): body_params = None # Authentication setting auth_settings = [] # noqa: E501 - + response_types_map = {} return self.api_client.call_api( @@ -267,7 +267,7 @@ class StoreApi(object): # Authentication setting auth_settings = ['api_key'] # noqa: E501 - + response_types_map = { 200: "dict(str, int)", } @@ -406,7 +406,7 @@ class StoreApi(object): # Authentication setting auth_settings = [] # noqa: E501 - + response_types_map = { 200: "Order", 400: None, @@ -541,7 +541,7 @@ class StoreApi(object): # Authentication setting auth_settings = [] # noqa: E501 - + response_types_map = { 200: "Order", 400: None, diff --git a/samples/client/petstore/python-legacy/petstore_api/api/user_api.py b/samples/client/petstore/python-legacy/petstore_api/api/user_api.py index 9f8be84771ae03c6dff1090955e4f91e77651b02..7c68a89e624d12fa9cfb27b3a44a7bda370019b4 100644 --- a/samples/client/petstore/python-legacy/petstore_api/api/user_api.py +++ b/samples/client/petstore/python-legacy/petstore_api/api/user_api.py @@ -145,7 +145,7 @@ class UserApi(object): body_params = local_var_params['body'] # Authentication setting auth_settings = [] # noqa: E501 - + response_types_map = {} return self.api_client.call_api( @@ -272,7 +272,7 @@ class UserApi(object): body_params = local_var_params['body'] # Authentication setting auth_settings = [] # noqa: E501 - + response_types_map = {} return self.api_client.call_api( @@ -399,7 +399,7 @@ class UserApi(object): body_params = local_var_params['body'] # Authentication setting auth_settings = [] # noqa: E501 - + response_types_map = {} return self.api_client.call_api( @@ -528,7 +528,7 @@ class UserApi(object): body_params = None # Authentication setting auth_settings = [] # noqa: E501 - + response_types_map = {} return self.api_client.call_api( @@ -659,7 +659,7 @@ class UserApi(object): # Authentication setting auth_settings = [] # noqa: E501 - + response_types_map = { 200: "User", 400: None, @@ -805,7 +805,7 @@ class UserApi(object): # Authentication setting auth_settings = [] # noqa: E501 - + response_types_map = { 200: "str", 400: None, @@ -924,7 +924,7 @@ class UserApi(object): body_params = None # Authentication setting auth_settings = [] # noqa: E501 - + response_types_map = {} return self.api_client.call_api( @@ -1064,7 +1064,7 @@ class UserApi(object): body_params = local_var_params['body'] # Authentication setting auth_settings = [] # noqa: E501 - + response_types_map = {} return self.api_client.call_api( diff --git a/samples/client/petstore/python-legacy/petstore_api/api_client.py b/samples/client/petstore/python-legacy/petstore_api/api_client.py index 52c58e68a08f8950b40fc08b1774efcaf4669942..035e1e374ba561339808b1b3156c54278412dfd9 100644 --- a/samples/client/petstore/python-legacy/petstore_api/api_client.py +++ b/samples/client/petstore/python-legacy/petstore_api/api_client.py @@ -196,7 +196,7 @@ class ApiClient(object): if not _preload_content: return return_data - + response_type = response_types_map.get(response_data.status, None) if six.PY3 and response_type not in ["file", "bytes"]: @@ -208,7 +208,7 @@ class ApiClient(object): response_data.data = response_data.data.decode(encoding) # deserialize response data - + if response_type: return_data = self.deserialize(response_data, response_type) else: diff --git a/samples/client/petstore/python-legacy/petstore_api/configuration.py b/samples/client/petstore/python-legacy/petstore_api/configuration.py index d5fc19dc02fb5f6630b203d11b8e1c1d082b63d9..000c796fa37e157adb829ab6601ca77c5ff6f202 100644 --- a/samples/client/petstore/python-legacy/petstore_api/configuration.py +++ b/samples/client/petstore/python-legacy/petstore_api/configuration.py @@ -78,8 +78,8 @@ class Configuration(object): :param server_operation_variables: Mapping from operation ID to a mapping with string values to replace variables in templated server configuration. The validation of enums is performed for variables with defined enum values before. - :param ssl_ca_cert: str - the path to a file of concatenated CA certificates - in PEM format + :param ssl_ca_cert: str - the path to a file of concatenated CA certificates + in PEM format :Example: diff --git a/samples/client/petstore/python-tornado/git_push.sh b/samples/client/petstore/python-tornado/git_push.sh index ced3be2b0c7b2349ff06d18da19d4b31435c9fa6..9405f72e950cdb8ca24c3cf4d15cee7eac62fde7 100644 --- a/samples/client/petstore/python-tornado/git_push.sh +++ b/samples/client/petstore/python-tornado/git_push.sh @@ -55,4 +55,3 @@ 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/python-tornado/petstore_api/api/another_fake_api.py b/samples/client/petstore/python-tornado/petstore_api/api/another_fake_api.py index 6fdd4523647203eebe67e8bbbdf0dcc269711bf6..b95df897b49330e2b3c3b2997cbb5a8c0d29e038 100644 --- a/samples/client/petstore/python-tornado/petstore_api/api/another_fake_api.py +++ b/samples/client/petstore/python-tornado/petstore_api/api/another_fake_api.py @@ -153,7 +153,7 @@ class AnotherFakeApi(object): # Authentication setting auth_settings = [] # noqa: E501 - + response_types_map = { 200: "Client", } 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 252a82c0ef447692ac9c6eb9fa1de456d7bc7326..28f2d63182845b36ab0f1f638b358bb17fa9ecce 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 @@ -149,7 +149,7 @@ class FakeApi(object): # Authentication setting auth_settings = [] # noqa: E501 - + response_types_map = {} return self.api_client.call_api( @@ -278,7 +278,7 @@ class FakeApi(object): # Authentication setting auth_settings = [] # noqa: E501 - + response_types_map = { 200: "bool", } @@ -409,7 +409,7 @@ class FakeApi(object): # Authentication setting auth_settings = [] # noqa: E501 - + response_types_map = { 200: "OuterComposite", } @@ -540,7 +540,7 @@ class FakeApi(object): # Authentication setting auth_settings = [] # noqa: E501 - + response_types_map = { 200: "float", } @@ -671,7 +671,7 @@ class FakeApi(object): # Authentication setting auth_settings = [] # noqa: E501 - + response_types_map = { 200: "str", } @@ -806,7 +806,7 @@ class FakeApi(object): # Authentication setting auth_settings = [] # noqa: E501 - + response_types_map = {} return self.api_client.call_api( @@ -948,7 +948,7 @@ class FakeApi(object): # Authentication setting auth_settings = [] # noqa: E501 - + response_types_map = {} return self.api_client.call_api( @@ -1085,7 +1085,7 @@ class FakeApi(object): # Authentication setting auth_settings = [] # noqa: E501 - + response_types_map = { 200: "Client", } @@ -1351,7 +1351,7 @@ class FakeApi(object): # Authentication setting auth_settings = ['http_basic_test'] # noqa: E501 - + response_types_map = {} return self.api_client.call_api( @@ -1532,7 +1532,7 @@ class FakeApi(object): # Authentication setting auth_settings = [] # noqa: E501 - + response_types_map = {} return self.api_client.call_api( @@ -1704,7 +1704,7 @@ class FakeApi(object): body_params = None # Authentication setting auth_settings = [] # noqa: E501 - + response_types_map = {} return self.api_client.call_api( @@ -1835,7 +1835,7 @@ class FakeApi(object): # Authentication setting auth_settings = [] # noqa: E501 - + response_types_map = {} return self.api_client.call_api( @@ -1977,7 +1977,7 @@ class FakeApi(object): # Authentication setting auth_settings = [] # noqa: E501 - + response_types_map = {} return self.api_client.call_api( @@ -2155,7 +2155,7 @@ class FakeApi(object): body_params = None # Authentication setting auth_settings = [] # noqa: E501 - + response_types_map = {} return self.api_client.call_api( diff --git a/samples/client/petstore/python-tornado/petstore_api/api/fake_classname_tags_123_api.py b/samples/client/petstore/python-tornado/petstore_api/api/fake_classname_tags_123_api.py index f87835d7a61d55bb91cc3a55c1004a119c80e963..5d6405e2cbdb67b8f0c76641928a8f2ba7525fba 100644 --- a/samples/client/petstore/python-tornado/petstore_api/api/fake_classname_tags_123_api.py +++ b/samples/client/petstore/python-tornado/petstore_api/api/fake_classname_tags_123_api.py @@ -153,7 +153,7 @@ class FakeClassnameTags123Api(object): # Authentication setting auth_settings = ['api_key_query'] # noqa: E501 - + response_types_map = { 200: "Client", } diff --git a/samples/client/petstore/python-tornado/petstore_api/api/pet_api.py b/samples/client/petstore/python-tornado/petstore_api/api/pet_api.py index 5baedc8e6d27b17c8e5d1c2fef38eba417b63c21..50dab4563e927c3e6f670959e41e5a21ed18e4b2 100644 --- a/samples/client/petstore/python-tornado/petstore_api/api/pet_api.py +++ b/samples/client/petstore/python-tornado/petstore_api/api/pet_api.py @@ -147,7 +147,7 @@ class PetApi(object): # Authentication setting auth_settings = ['petstore_auth'] # noqa: E501 - + response_types_map = {} return self.api_client.call_api( @@ -281,7 +281,7 @@ class PetApi(object): body_params = None # Authentication setting auth_settings = ['petstore_auth'] # noqa: E501 - + response_types_map = {} return self.api_client.call_api( @@ -415,7 +415,7 @@ class PetApi(object): # Authentication setting auth_settings = ['petstore_auth'] # noqa: E501 - + response_types_map = { 200: "list[Pet]", 400: None, @@ -552,7 +552,7 @@ class PetApi(object): # Authentication setting auth_settings = ['petstore_auth'] # noqa: E501 - + response_types_map = { 200: "list[Pet]", 400: None, @@ -688,7 +688,7 @@ class PetApi(object): # Authentication setting auth_settings = ['api_key'] # noqa: E501 - + response_types_map = { 200: "Pet", 400: None, @@ -823,7 +823,7 @@ class PetApi(object): # Authentication setting auth_settings = ['petstore_auth'] # noqa: E501 - + response_types_map = {} return self.api_client.call_api( @@ -968,7 +968,7 @@ class PetApi(object): # Authentication setting auth_settings = ['petstore_auth'] # noqa: E501 - + response_types_map = {} return self.api_client.call_api( @@ -1117,7 +1117,7 @@ class PetApi(object): # Authentication setting auth_settings = ['petstore_auth'] # noqa: E501 - + response_types_map = { 200: "ApiResponse", } @@ -1272,7 +1272,7 @@ class PetApi(object): # Authentication setting auth_settings = ['petstore_auth'] # noqa: E501 - + response_types_map = { 200: "ApiResponse", } diff --git a/samples/client/petstore/python-tornado/petstore_api/api/store_api.py b/samples/client/petstore/python-tornado/petstore_api/api/store_api.py index 734d8e17dc93bbb60bc90d32504846a55ca42d38..092a4542774d505423e88000bed647628e2f1652 100644 --- a/samples/client/petstore/python-tornado/petstore_api/api/store_api.py +++ b/samples/client/petstore/python-tornado/petstore_api/api/store_api.py @@ -145,7 +145,7 @@ class StoreApi(object): body_params = None # Authentication setting auth_settings = [] # noqa: E501 - + response_types_map = {} return self.api_client.call_api( @@ -267,7 +267,7 @@ class StoreApi(object): # Authentication setting auth_settings = ['api_key'] # noqa: E501 - + response_types_map = { 200: "dict(str, int)", } @@ -406,7 +406,7 @@ class StoreApi(object): # Authentication setting auth_settings = [] # noqa: E501 - + response_types_map = { 200: "Order", 400: None, @@ -541,7 +541,7 @@ class StoreApi(object): # Authentication setting auth_settings = [] # noqa: E501 - + response_types_map = { 200: "Order", 400: None, diff --git a/samples/client/petstore/python-tornado/petstore_api/api/user_api.py b/samples/client/petstore/python-tornado/petstore_api/api/user_api.py index 9f8be84771ae03c6dff1090955e4f91e77651b02..7c68a89e624d12fa9cfb27b3a44a7bda370019b4 100644 --- a/samples/client/petstore/python-tornado/petstore_api/api/user_api.py +++ b/samples/client/petstore/python-tornado/petstore_api/api/user_api.py @@ -145,7 +145,7 @@ class UserApi(object): body_params = local_var_params['body'] # Authentication setting auth_settings = [] # noqa: E501 - + response_types_map = {} return self.api_client.call_api( @@ -272,7 +272,7 @@ class UserApi(object): body_params = local_var_params['body'] # Authentication setting auth_settings = [] # noqa: E501 - + response_types_map = {} return self.api_client.call_api( @@ -399,7 +399,7 @@ class UserApi(object): body_params = local_var_params['body'] # Authentication setting auth_settings = [] # noqa: E501 - + response_types_map = {} return self.api_client.call_api( @@ -528,7 +528,7 @@ class UserApi(object): body_params = None # Authentication setting auth_settings = [] # noqa: E501 - + response_types_map = {} return self.api_client.call_api( @@ -659,7 +659,7 @@ class UserApi(object): # Authentication setting auth_settings = [] # noqa: E501 - + response_types_map = { 200: "User", 400: None, @@ -805,7 +805,7 @@ class UserApi(object): # Authentication setting auth_settings = [] # noqa: E501 - + response_types_map = { 200: "str", 400: None, @@ -924,7 +924,7 @@ class UserApi(object): body_params = None # Authentication setting auth_settings = [] # noqa: E501 - + response_types_map = {} return self.api_client.call_api( @@ -1064,7 +1064,7 @@ class UserApi(object): body_params = local_var_params['body'] # Authentication setting auth_settings = [] # noqa: E501 - + response_types_map = {} return self.api_client.call_api( 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 a8778557f977d214bfd3634d241fe31f5aeb01a2..6d29ac71238f803f084462738ddfeb53b9264354 100644 --- a/samples/client/petstore/python-tornado/petstore_api/api_client.py +++ b/samples/client/petstore/python-tornado/petstore_api/api_client.py @@ -198,7 +198,7 @@ class ApiClient(object): if not _preload_content: raise tornado.gen.Return(return_data) - + response_type = response_types_map.get(response_data.status, None) if six.PY3 and response_type not in ["file", "bytes"]: @@ -210,7 +210,7 @@ class ApiClient(object): response_data.data = response_data.data.decode(encoding) # deserialize response data - + if response_type: return_data = self.deserialize(response_data, response_type) else: diff --git a/samples/client/petstore/python-tornado/petstore_api/configuration.py b/samples/client/petstore/python-tornado/petstore_api/configuration.py index d5fc19dc02fb5f6630b203d11b8e1c1d082b63d9..000c796fa37e157adb829ab6601ca77c5ff6f202 100644 --- a/samples/client/petstore/python-tornado/petstore_api/configuration.py +++ b/samples/client/petstore/python-tornado/petstore_api/configuration.py @@ -78,8 +78,8 @@ class Configuration(object): :param server_operation_variables: Mapping from operation ID to a mapping with string values to replace variables in templated server configuration. The validation of enums is performed for variables with defined enum values before. - :param ssl_ca_cert: str - the path to a file of concatenated CA certificates - in PEM format + :param ssl_ca_cert: str - the path to a file of concatenated CA certificates + in PEM format :Example: diff --git a/samples/client/petstore/python/git_push.sh b/samples/client/petstore/python/git_push.sh index ced3be2b0c7b2349ff06d18da19d4b31435c9fa6..9405f72e950cdb8ca24c3cf4d15cee7eac62fde7 100644 --- a/samples/client/petstore/python/git_push.sh +++ b/samples/client/petstore/python/git_push.sh @@ -55,4 +55,3 @@ 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/python/petstore_api/configuration.py b/samples/client/petstore/python/petstore_api/configuration.py index ccd984b7f5f8f881b2d6056b3b41d24fe575ebac..8fc4edbf89afa4f743b4273c02d5518c150053dd 100644 --- a/samples/client/petstore/python/petstore_api/configuration.py +++ b/samples/client/petstore/python/petstore_api/configuration.py @@ -73,7 +73,7 @@ class Configuration(object): :param server_operation_variables: Mapping from operation ID to a mapping with string values to replace variables in templated server configuration. The validation of enums is performed for variables with defined enum values before. - :param ssl_ca_cert: str - the path to a file of concatenated CA certificates + :param ssl_ca_cert: str - the path to a file of concatenated CA certificates in PEM format :Example: diff --git a/samples/client/petstore/python_disallowAdditionalPropertiesIfNotPresent/git_push.sh b/samples/client/petstore/python_disallowAdditionalPropertiesIfNotPresent/git_push.sh index ced3be2b0c7b2349ff06d18da19d4b31435c9fa6..9405f72e950cdb8ca24c3cf4d15cee7eac62fde7 100644 --- a/samples/client/petstore/python_disallowAdditionalPropertiesIfNotPresent/git_push.sh +++ b/samples/client/petstore/python_disallowAdditionalPropertiesIfNotPresent/git_push.sh @@ -55,4 +55,3 @@ 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/python_disallowAdditionalPropertiesIfNotPresent/petstore_api/configuration.py b/samples/client/petstore/python_disallowAdditionalPropertiesIfNotPresent/petstore_api/configuration.py index ccd984b7f5f8f881b2d6056b3b41d24fe575ebac..8fc4edbf89afa4f743b4273c02d5518c150053dd 100644 --- a/samples/client/petstore/python_disallowAdditionalPropertiesIfNotPresent/petstore_api/configuration.py +++ b/samples/client/petstore/python_disallowAdditionalPropertiesIfNotPresent/petstore_api/configuration.py @@ -73,7 +73,7 @@ class Configuration(object): :param server_operation_variables: Mapping from operation ID to a mapping with string values to replace variables in templated server configuration. The validation of enums is performed for variables with defined enum values before. - :param ssl_ca_cert: str - the path to a file of concatenated CA certificates + :param ssl_ca_cert: str - the path to a file of concatenated CA certificates in PEM format :Example: diff --git a/samples/client/petstore/ruby-faraday/git_push.sh b/samples/client/petstore/ruby-faraday/git_push.sh index ced3be2b0c7b2349ff06d18da19d4b31435c9fa6..9405f72e950cdb8ca24c3cf4d15cee7eac62fde7 100644 --- a/samples/client/petstore/ruby-faraday/git_push.sh +++ b/samples/client/petstore/ruby-faraday/git_push.sh @@ -55,4 +55,3 @@ 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/ruby/git_push.sh b/samples/client/petstore/ruby/git_push.sh index ced3be2b0c7b2349ff06d18da19d4b31435c9fa6..9405f72e950cdb8ca24c3cf4d15cee7eac62fde7 100644 --- a/samples/client/petstore/ruby/git_push.sh +++ b/samples/client/petstore/ruby/git_push.sh @@ -55,4 +55,3 @@ 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/rust/hyper/petstore/git_push.sh b/samples/client/petstore/rust/hyper/petstore/git_push.sh index ced3be2b0c7b2349ff06d18da19d4b31435c9fa6..9405f72e950cdb8ca24c3cf4d15cee7eac62fde7 100644 --- a/samples/client/petstore/rust/hyper/petstore/git_push.sh +++ b/samples/client/petstore/rust/hyper/petstore/git_push.sh @@ -55,4 +55,3 @@ 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/rust/hyper/petstore/src/apis/mod.rs b/samples/client/petstore/rust/hyper/petstore/src/apis/mod.rs index 8e1f9cc2adb5260e4e3af40236a09d41fa9d1fd3..c9d96c29fd0c8d75c46aca8b2ea3d758bd36af60 100644 --- a/samples/client/petstore/rust/hyper/petstore/src/apis/mod.rs +++ b/samples/client/petstore/rust/hyper/petstore/src/apis/mod.rs @@ -16,7 +16,7 @@ pub struct ApiError<T> { pub content: Option<T>, } -impl<'de, T> From<(hyper::StatusCode, &'de [u8])> for Error<T> +impl<'de, T> From<(hyper::StatusCode, &'de [u8])> for Error<T> where T: serde::Deserialize<'de> { fn from(e: (hyper::StatusCode, &'de [u8])) -> Self { if e.1.len() == 0 { diff --git a/samples/client/petstore/rust/reqwest/petstore-async/git_push.sh b/samples/client/petstore/rust/reqwest/petstore-async/git_push.sh index ced3be2b0c7b2349ff06d18da19d4b31435c9fa6..9405f72e950cdb8ca24c3cf4d15cee7eac62fde7 100644 --- a/samples/client/petstore/rust/reqwest/petstore-async/git_push.sh +++ b/samples/client/petstore/rust/reqwest/petstore-async/git_push.sh @@ -55,4 +55,3 @@ 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/rust/reqwest/petstore/git_push.sh b/samples/client/petstore/rust/reqwest/petstore/git_push.sh index ced3be2b0c7b2349ff06d18da19d4b31435c9fa6..9405f72e950cdb8ca24c3cf4d15cee7eac62fde7 100644 --- a/samples/client/petstore/rust/reqwest/petstore/git_push.sh +++ b/samples/client/petstore/rust/reqwest/petstore/git_push.sh @@ -55,4 +55,3 @@ 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/scala-akka/src/main/scala/org/openapitools/client/api/PetApi.scala b/samples/client/petstore/scala-akka/src/main/scala/org/openapitools/client/api/PetApi.scala index c0ba5d4c6ae2a88b2e0a233603092375a3978682..c57354a5a95326b694fdce7cf60c22ee6d371deb 100644 --- a/samples/client/petstore/scala-akka/src/main/scala/org/openapitools/client/api/PetApi.scala +++ b/samples/client/petstore/scala-akka/src/main/scala/org/openapitools/client/api/PetApi.scala @@ -24,7 +24,7 @@ object PetApi { } class PetApi(baseUrl: String) { - + /** * Expected answers: * code 200 : Pet (successful operation) diff --git a/samples/client/petstore/scala-akka/src/main/scala/org/openapitools/client/api/StoreApi.scala b/samples/client/petstore/scala-akka/src/main/scala/org/openapitools/client/api/StoreApi.scala index ba8a34ef6ec8b2c71cd4d59e5ed1083306a0a9e2..81776a43dcc6195f9035096c2de0a4e37187bf9d 100644 --- a/samples/client/petstore/scala-akka/src/main/scala/org/openapitools/client/api/StoreApi.scala +++ b/samples/client/petstore/scala-akka/src/main/scala/org/openapitools/client/api/StoreApi.scala @@ -22,7 +22,7 @@ object StoreApi { } class StoreApi(baseUrl: String) { - + /** * For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors * diff --git a/samples/client/petstore/scala-akka/src/main/scala/org/openapitools/client/api/UserApi.scala b/samples/client/petstore/scala-akka/src/main/scala/org/openapitools/client/api/UserApi.scala index 83a7a46de65ec9b41df26727b4205d60b0e3da5c..ce3c362f553c84d002884c9578e0a66a4d1ff0ed 100644 --- a/samples/client/petstore/scala-akka/src/main/scala/org/openapitools/client/api/UserApi.scala +++ b/samples/client/petstore/scala-akka/src/main/scala/org/openapitools/client/api/UserApi.scala @@ -22,7 +22,7 @@ object UserApi { } class UserApi(baseUrl: String) { - + /** * This can only be done by the logged in user. * diff --git a/samples/client/petstore/scala-akka/src/main/scala/org/openapitools/client/model/ApiResponse.scala b/samples/client/petstore/scala-akka/src/main/scala/org/openapitools/client/model/ApiResponse.scala index 3ddf32c9bda7da53a81e9786c76ddb12e800a029..fd96f81da8e11da24c952411c4ed4b123135d547 100644 --- a/samples/client/petstore/scala-akka/src/main/scala/org/openapitools/client/model/ApiResponse.scala +++ b/samples/client/petstore/scala-akka/src/main/scala/org/openapitools/client/model/ApiResponse.scala @@ -19,4 +19,3 @@ case class ApiResponse ( message: Option[String] = None ) extends ApiModel - diff --git a/samples/client/petstore/scala-akka/src/main/scala/org/openapitools/client/model/Category.scala b/samples/client/petstore/scala-akka/src/main/scala/org/openapitools/client/model/Category.scala index e62645a38b2a2e49544d8cecdff0b1de690016ce..8f5791b43c721b834f497d9d2cffad802b88e0a9 100644 --- a/samples/client/petstore/scala-akka/src/main/scala/org/openapitools/client/model/Category.scala +++ b/samples/client/petstore/scala-akka/src/main/scala/org/openapitools/client/model/Category.scala @@ -18,4 +18,3 @@ case class Category ( name: Option[String] = None ) extends ApiModel - diff --git a/samples/client/petstore/scala-akka/src/main/scala/org/openapitools/client/model/Order.scala b/samples/client/petstore/scala-akka/src/main/scala/org/openapitools/client/model/Order.scala index 95204d35e5df1a28d1c075b71f389bd11c55a197..370abcfb04ada21411dfadfa3a8b4c2a045a8cae 100644 --- a/samples/client/petstore/scala-akka/src/main/scala/org/openapitools/client/model/Order.scala +++ b/samples/client/petstore/scala-akka/src/main/scala/org/openapitools/client/model/Order.scala @@ -34,4 +34,3 @@ object OrderEnums { } } - diff --git a/samples/client/petstore/scala-akka/src/main/scala/org/openapitools/client/model/Pet.scala b/samples/client/petstore/scala-akka/src/main/scala/org/openapitools/client/model/Pet.scala index 3a78a7c3f18337f20d77715c80ee6185c1828c9d..9422e64d58bcb1171c65bfc5793df721bb3986cd 100644 --- a/samples/client/petstore/scala-akka/src/main/scala/org/openapitools/client/model/Pet.scala +++ b/samples/client/petstore/scala-akka/src/main/scala/org/openapitools/client/model/Pet.scala @@ -33,4 +33,3 @@ object PetEnums { } } - diff --git a/samples/client/petstore/scala-akka/src/main/scala/org/openapitools/client/model/Tag.scala b/samples/client/petstore/scala-akka/src/main/scala/org/openapitools/client/model/Tag.scala index ac0c7763720cb574ebbb29201140978541a80daa..10e6455e072c4bfc902c7464587e289690668da4 100644 --- a/samples/client/petstore/scala-akka/src/main/scala/org/openapitools/client/model/Tag.scala +++ b/samples/client/petstore/scala-akka/src/main/scala/org/openapitools/client/model/Tag.scala @@ -18,4 +18,3 @@ case class Tag ( name: Option[String] = None ) extends ApiModel - diff --git a/samples/client/petstore/scala-akka/src/main/scala/org/openapitools/client/model/User.scala b/samples/client/petstore/scala-akka/src/main/scala/org/openapitools/client/model/User.scala index aad2117b16d54ccc4bf26d8c312da2a545791d4b..d8dafdc59c471096dbfd77950b221de4a7f3895a 100644 --- a/samples/client/petstore/scala-akka/src/main/scala/org/openapitools/client/model/User.scala +++ b/samples/client/petstore/scala-akka/src/main/scala/org/openapitools/client/model/User.scala @@ -25,4 +25,3 @@ case class User ( userStatus: Option[Int] = None ) extends ApiModel - diff --git a/samples/client/petstore/scala-httpclient-deprecated/build.gradle b/samples/client/petstore/scala-httpclient-deprecated/build.gradle index d05105184ff6794fa8155c390444433f081cbbad..ef58789495a5f95139734898865d0a6edaeb8eb8 100644 --- a/samples/client/petstore/scala-httpclient-deprecated/build.gradle +++ b/samples/client/petstore/scala-httpclient-deprecated/build.gradle @@ -23,7 +23,7 @@ if(hasProperty('target') && target == 'android') { apply plugin: 'com.android.library' apply plugin: 'com.github.dcendents.android-maven' - + android { compileSdkVersion 23 buildToolsVersion '23.0.2' @@ -35,7 +35,7 @@ if(hasProperty('target') && target == 'android') { sourceCompatibility JavaVersion.VERSION_1_7 targetCompatibility JavaVersion.VERSION_1_7 } - + // Rename the aar correctly libraryVariants.all { variant -> variant.outputs.each { output -> @@ -51,7 +51,7 @@ if(hasProperty('target') && target == 'android') { provided 'javax.annotation:jsr250-api:1.0' } } - + afterEvaluate { android.libraryVariants.all { variant -> def task = project.tasks.create "jar${variant.name.capitalize()}", Jar @@ -63,12 +63,12 @@ if(hasProperty('target') && target == 'android') { artifacts.add('archives', task); } } - + task sourcesJar(type: Jar) { from android.sourceSets.main.java.srcDirs classifier = 'sources' } - + artifacts { archives sourcesJar } @@ -78,16 +78,16 @@ if(hasProperty('target') && target == 'android') { apply plugin: 'scala' apply plugin: 'java' apply plugin: 'maven' - + sourceCompatibility = JavaVersion.VERSION_1_7 targetCompatibility = JavaVersion.VERSION_1_7 - + install { repositories.mavenInstaller { pom.artifactId = 'scala-legacy-petstore' } } - + task execute(type:JavaExec) { main = System.getProperty('mainClass') classpath = sourceSets.main.runtimeClasspath diff --git a/samples/client/petstore/scala-httpclient-deprecated/build.sbt b/samples/client/petstore/scala-httpclient-deprecated/build.sbt index 0565bb12ae1976cd3ae7e59855412d784795165a..41b353d0143497b94be87978e27c0f8673992286 100644 --- a/samples/client/petstore/scala-httpclient-deprecated/build.sbt +++ b/samples/client/petstore/scala-httpclient-deprecated/build.sbt @@ -29,4 +29,3 @@ scalacOptions := Seq( ) publishArtifact in (Compile, packageDoc) := false - diff --git a/samples/client/petstore/scala-httpclient-deprecated/git_push.sh b/samples/client/petstore/scala-httpclient-deprecated/git_push.sh index ced3be2b0c7b2349ff06d18da19d4b31435c9fa6..9405f72e950cdb8ca24c3cf4d15cee7eac62fde7 100644 --- a/samples/client/petstore/scala-httpclient-deprecated/git_push.sh +++ b/samples/client/petstore/scala-httpclient-deprecated/git_push.sh @@ -55,4 +55,3 @@ 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/scala-sttp/src/main/scala/org/openapitools/client/model/ApiResponse.scala b/samples/client/petstore/scala-sttp/src/main/scala/org/openapitools/client/model/ApiResponse.scala index aaaeae4c340ce872aedbd02575e645de40227709..b0abb512265edac36f7d8bc8b95d0e7f66ba60a0 100644 --- a/samples/client/petstore/scala-sttp/src/main/scala/org/openapitools/client/model/ApiResponse.scala +++ b/samples/client/petstore/scala-sttp/src/main/scala/org/openapitools/client/model/ApiResponse.scala @@ -22,4 +22,3 @@ case class ApiResponse( message: Option[String] = None ) - diff --git a/samples/client/petstore/scala-sttp/src/main/scala/org/openapitools/client/model/Category.scala b/samples/client/petstore/scala-sttp/src/main/scala/org/openapitools/client/model/Category.scala index 81d132f226e7ee72477af1b6c1f85154fd639946..169acc49cefdacc6694347fca7384b27c1b47aec 100644 --- a/samples/client/petstore/scala-sttp/src/main/scala/org/openapitools/client/model/Category.scala +++ b/samples/client/petstore/scala-sttp/src/main/scala/org/openapitools/client/model/Category.scala @@ -21,4 +21,3 @@ case class Category( name: Option[String] = None ) - diff --git a/samples/client/petstore/scala-sttp/src/main/scala/org/openapitools/client/model/Order.scala b/samples/client/petstore/scala-sttp/src/main/scala/org/openapitools/client/model/Order.scala index 222b0564f54415fed304b6624f9f19d9a3cb71fe..9e805e256b2185139321ef28a5fae6a4a074298b 100644 --- a/samples/client/petstore/scala-sttp/src/main/scala/org/openapitools/client/model/Order.scala +++ b/samples/client/petstore/scala-sttp/src/main/scala/org/openapitools/client/model/Order.scala @@ -37,4 +37,3 @@ object OrderEnums { } } - diff --git a/samples/client/petstore/scala-sttp/src/main/scala/org/openapitools/client/model/Pet.scala b/samples/client/petstore/scala-sttp/src/main/scala/org/openapitools/client/model/Pet.scala index 0e48ba900d8527b83ad1523a9b54885838443788..3cbab6051284d0ffb49dac25fa1043ada3a896dd 100644 --- a/samples/client/petstore/scala-sttp/src/main/scala/org/openapitools/client/model/Pet.scala +++ b/samples/client/petstore/scala-sttp/src/main/scala/org/openapitools/client/model/Pet.scala @@ -36,4 +36,3 @@ object PetEnums { } } - diff --git a/samples/client/petstore/scala-sttp/src/main/scala/org/openapitools/client/model/Tag.scala b/samples/client/petstore/scala-sttp/src/main/scala/org/openapitools/client/model/Tag.scala index d1ce00a9a84b0e92af26bf763f2c970cff11eb96..c2020246658a160a78018d46c3d3e4434b3b2d68 100644 --- a/samples/client/petstore/scala-sttp/src/main/scala/org/openapitools/client/model/Tag.scala +++ b/samples/client/petstore/scala-sttp/src/main/scala/org/openapitools/client/model/Tag.scala @@ -21,4 +21,3 @@ case class Tag( name: Option[String] = None ) - diff --git a/samples/client/petstore/scala-sttp/src/main/scala/org/openapitools/client/model/User.scala b/samples/client/petstore/scala-sttp/src/main/scala/org/openapitools/client/model/User.scala index 729b4bcc658ce00b1f15e1e9ab6ec396ea3443e6..6977180bccee59d7f84fb621f5f1b499d9ef3d54 100644 --- a/samples/client/petstore/scala-sttp/src/main/scala/org/openapitools/client/model/User.scala +++ b/samples/client/petstore/scala-sttp/src/main/scala/org/openapitools/client/model/User.scala @@ -28,4 +28,3 @@ case class User( userStatus: Option[Int] = None ) - diff --git a/samples/client/petstore/swift5/alamofireLibrary/PetstoreClient/Classes/OpenAPIs/Extensions.swift b/samples/client/petstore/swift5/alamofireLibrary/PetstoreClient/Classes/OpenAPIs/Extensions.swift index e23035dde30ee6d11b591fd6b816eb212eb0450e..a4f0c7a3b3601c3289dda0fdf229b8109068aa91 100644 --- a/samples/client/petstore/swift5/alamofireLibrary/PetstoreClient/Classes/OpenAPIs/Extensions.swift +++ b/samples/client/petstore/swift5/alamofireLibrary/PetstoreClient/Classes/OpenAPIs/Extensions.swift @@ -185,4 +185,4 @@ extension HTTPURLResponse { var isStatusCodeSuccessful: Bool { return Array(200 ..< 300).contains(statusCode) } -} +} \ No newline at end of file diff --git a/samples/client/petstore/swift5/alamofireLibrary/docs/AnotherFakeAPI.md b/samples/client/petstore/swift5/alamofireLibrary/docs/AnotherFakeAPI.md index aead5f1f980fe641e09ff1a44a3c82c8f39c85e3..26346e81a4cb33233fcb57ee23aee08b14e6c3c4 100644 --- a/samples/client/petstore/swift5/alamofireLibrary/docs/AnotherFakeAPI.md +++ b/samples/client/petstore/swift5/alamofireLibrary/docs/AnotherFakeAPI.md @@ -16,7 +16,7 @@ To test special tags To test special tags and operation ID starting with number -### Example +### Example ```swift // The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new import PetstoreClient diff --git a/samples/client/petstore/swift5/alamofireLibrary/docs/FakeAPI.md b/samples/client/petstore/swift5/alamofireLibrary/docs/FakeAPI.md index 553a46281aa01cf593e8ef0fa0539ddc19f99511..f07991250846a1e6fe7f81ae88ec439c319174a5 100644 --- a/samples/client/petstore/swift5/alamofireLibrary/docs/FakeAPI.md +++ b/samples/client/petstore/swift5/alamofireLibrary/docs/FakeAPI.md @@ -27,7 +27,7 @@ Method | HTTP request | Description Test serialization of outer boolean types -### Example +### Example ```swift // The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new import PetstoreClient @@ -76,7 +76,7 @@ No authorization required Test serialization of object with outer number type -### Example +### Example ```swift // The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new import PetstoreClient @@ -125,7 +125,7 @@ No authorization required Test serialization of outer number types -### Example +### Example ```swift // The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new import PetstoreClient @@ -174,7 +174,7 @@ No authorization required Test serialization of outer string types -### Example +### Example ```swift // The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new import PetstoreClient @@ -223,7 +223,7 @@ No authorization required For this test, the body for this request much reference a schema named `File`. -### Example +### Example ```swift // The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new import PetstoreClient @@ -270,7 +270,7 @@ No authorization required -### Example +### Example ```swift // The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new import PetstoreClient @@ -321,7 +321,7 @@ To test \"client\" model To test \"client\" model -### Example +### Example ```swift // The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new import PetstoreClient @@ -371,7 +371,7 @@ Fake endpoint for testing various parameters å‡ç«¯é»ž å½ã®ã‚¨ãƒ³ãƒ‰ãƒã‚¤ Fake endpoint for testing various parameters å‡ç«¯é»ž å½ã®ã‚¨ãƒ³ãƒ‰ãƒã‚¤ãƒ³ãƒˆ 가짜 엔드 í¬ì¸íЏ -### Example +### Example ```swift // The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new import PetstoreClient @@ -447,7 +447,7 @@ To test enum parameters To test enum parameters -### Example +### Example ```swift // The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new import PetstoreClient @@ -511,7 +511,7 @@ Fake endpoint to test group parameters (optional) Fake endpoint to test group parameters (optional) -### Example +### Example ```swift // The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new import PetstoreClient @@ -569,7 +569,7 @@ No authorization required test inline additionalProperties -### Example +### Example ```swift // The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new import PetstoreClient @@ -617,7 +617,7 @@ No authorization required test json serialization of form data -### Example +### Example ```swift // The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new import PetstoreClient diff --git a/samples/client/petstore/swift5/alamofireLibrary/docs/FakeClassnameTags123API.md b/samples/client/petstore/swift5/alamofireLibrary/docs/FakeClassnameTags123API.md index 9f24b46edbc3a52a58c554db3ebdddf7c24692f9..5b9b66073fe0b2b3cb0083ccaafafa72b63bae3c 100644 --- a/samples/client/petstore/swift5/alamofireLibrary/docs/FakeClassnameTags123API.md +++ b/samples/client/petstore/swift5/alamofireLibrary/docs/FakeClassnameTags123API.md @@ -16,7 +16,7 @@ To test class name in snake case To test class name in snake case -### Example +### Example ```swift // The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new import PetstoreClient diff --git a/samples/client/petstore/swift5/alamofireLibrary/docs/PetAPI.md b/samples/client/petstore/swift5/alamofireLibrary/docs/PetAPI.md index 27efe08334762cbdec4a544ae7dad3d5e43eaeb5..5babbd06a3c08be466769ad385648598979a778a 100644 --- a/samples/client/petstore/swift5/alamofireLibrary/docs/PetAPI.md +++ b/samples/client/petstore/swift5/alamofireLibrary/docs/PetAPI.md @@ -22,7 +22,7 @@ Method | HTTP request | Description Add a new pet to the store -### Example +### Example ```swift // The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new import PetstoreClient @@ -70,7 +70,7 @@ Void (empty response body) Deletes a pet -### Example +### Example ```swift // The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new import PetstoreClient @@ -122,7 +122,7 @@ Finds Pets by status Multiple status values can be provided with comma separated strings -### Example +### Example ```swift // The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new import PetstoreClient @@ -172,7 +172,7 @@ Finds Pets by tags Multiple tags can be provided with comma separated strings. Use tag1, tag2, tag3 for testing. -### Example +### Example ```swift // The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new import PetstoreClient @@ -222,7 +222,7 @@ Find pet by ID Returns a single pet -### Example +### Example ```swift // The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new import PetstoreClient @@ -270,7 +270,7 @@ Name | Type | Description | Notes Update an existing pet -### Example +### Example ```swift // The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new import PetstoreClient @@ -318,7 +318,7 @@ Void (empty response body) Updates a pet in the store with form data -### Example +### Example ```swift // The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new import PetstoreClient @@ -370,7 +370,7 @@ Void (empty response body) uploads an image -### Example +### Example ```swift // The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new import PetstoreClient @@ -422,7 +422,7 @@ Name | Type | Description | Notes uploads an image (required) -### Example +### Example ```swift // The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new import PetstoreClient diff --git a/samples/client/petstore/swift5/alamofireLibrary/docs/StoreAPI.md b/samples/client/petstore/swift5/alamofireLibrary/docs/StoreAPI.md index 383dda5d3c71edfe059c03fea27d3c18d723bfac..b023aa9e45236ab37239ca482ea4a843ed60e7db 100644 --- a/samples/client/petstore/swift5/alamofireLibrary/docs/StoreAPI.md +++ b/samples/client/petstore/swift5/alamofireLibrary/docs/StoreAPI.md @@ -19,7 +19,7 @@ Delete purchase order by ID For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors -### Example +### Example ```swift // The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new import PetstoreClient @@ -69,7 +69,7 @@ Returns pet inventories by status Returns a map of status codes to quantities -### Example +### Example ```swift // The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new import PetstoreClient @@ -115,7 +115,7 @@ Find purchase order by ID For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions -### Example +### Example ```swift // The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new import PetstoreClient @@ -163,7 +163,7 @@ No authorization required Place an order for a pet -### Example +### Example ```swift // The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new import PetstoreClient diff --git a/samples/client/petstore/swift5/alamofireLibrary/docs/UserAPI.md b/samples/client/petstore/swift5/alamofireLibrary/docs/UserAPI.md index 380813bc68c02383e46b016c9e768915da8a4559..5fc9160daf471ed337dc5d07c036956ff2785255 100644 --- a/samples/client/petstore/swift5/alamofireLibrary/docs/UserAPI.md +++ b/samples/client/petstore/swift5/alamofireLibrary/docs/UserAPI.md @@ -23,7 +23,7 @@ Create user This can only be done by the logged in user. -### Example +### Example ```swift // The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new import PetstoreClient @@ -71,7 +71,7 @@ No authorization required Creates list of users with given input array -### Example +### Example ```swift // The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new import PetstoreClient @@ -119,7 +119,7 @@ No authorization required Creates list of users with given input array -### Example +### Example ```swift // The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new import PetstoreClient @@ -169,7 +169,7 @@ Delete user This can only be done by the logged in user. -### Example +### Example ```swift // The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new import PetstoreClient @@ -217,7 +217,7 @@ No authorization required Get user by user name -### Example +### Example ```swift // The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new import PetstoreClient @@ -265,7 +265,7 @@ No authorization required Logs user into the system -### Example +### Example ```swift // The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new import PetstoreClient @@ -315,7 +315,7 @@ No authorization required Logs out current logged in user session -### Example +### Example ```swift // The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new import PetstoreClient @@ -361,7 +361,7 @@ Updated user This can only be done by the logged in user. -### Example +### Example ```swift // The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new import PetstoreClient diff --git a/samples/client/petstore/swift5/alamofireLibrary/git_push.sh b/samples/client/petstore/swift5/alamofireLibrary/git_push.sh index ced3be2b0c7b2349ff06d18da19d4b31435c9fa6..9405f72e950cdb8ca24c3cf4d15cee7eac62fde7 100644 --- a/samples/client/petstore/swift5/alamofireLibrary/git_push.sh +++ b/samples/client/petstore/swift5/alamofireLibrary/git_push.sh @@ -55,4 +55,3 @@ 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/PetstoreClient/Classes/OpenAPIs/Extensions.swift b/samples/client/petstore/swift5/combineLibrary/PetstoreClient/Classes/OpenAPIs/Extensions.swift index e23035dde30ee6d11b591fd6b816eb212eb0450e..a4f0c7a3b3601c3289dda0fdf229b8109068aa91 100644 --- a/samples/client/petstore/swift5/combineLibrary/PetstoreClient/Classes/OpenAPIs/Extensions.swift +++ b/samples/client/petstore/swift5/combineLibrary/PetstoreClient/Classes/OpenAPIs/Extensions.swift @@ -185,4 +185,4 @@ extension HTTPURLResponse { var isStatusCodeSuccessful: Bool { return Array(200 ..< 300).contains(statusCode) } -} +} \ No newline at end of file diff --git a/samples/client/petstore/swift5/combineLibrary/docs/AnotherFakeAPI.md b/samples/client/petstore/swift5/combineLibrary/docs/AnotherFakeAPI.md index aead5f1f980fe641e09ff1a44a3c82c8f39c85e3..26346e81a4cb33233fcb57ee23aee08b14e6c3c4 100644 --- a/samples/client/petstore/swift5/combineLibrary/docs/AnotherFakeAPI.md +++ b/samples/client/petstore/swift5/combineLibrary/docs/AnotherFakeAPI.md @@ -16,7 +16,7 @@ To test special tags To test special tags and operation ID starting with number -### Example +### Example ```swift // The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new import PetstoreClient diff --git a/samples/client/petstore/swift5/combineLibrary/docs/FakeAPI.md b/samples/client/petstore/swift5/combineLibrary/docs/FakeAPI.md index 553a46281aa01cf593e8ef0fa0539ddc19f99511..f07991250846a1e6fe7f81ae88ec439c319174a5 100644 --- a/samples/client/petstore/swift5/combineLibrary/docs/FakeAPI.md +++ b/samples/client/petstore/swift5/combineLibrary/docs/FakeAPI.md @@ -27,7 +27,7 @@ Method | HTTP request | Description Test serialization of outer boolean types -### Example +### Example ```swift // The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new import PetstoreClient @@ -76,7 +76,7 @@ No authorization required Test serialization of object with outer number type -### Example +### Example ```swift // The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new import PetstoreClient @@ -125,7 +125,7 @@ No authorization required Test serialization of outer number types -### Example +### Example ```swift // The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new import PetstoreClient @@ -174,7 +174,7 @@ No authorization required Test serialization of outer string types -### Example +### Example ```swift // The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new import PetstoreClient @@ -223,7 +223,7 @@ No authorization required For this test, the body for this request much reference a schema named `File`. -### Example +### Example ```swift // The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new import PetstoreClient @@ -270,7 +270,7 @@ No authorization required -### Example +### Example ```swift // The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new import PetstoreClient @@ -321,7 +321,7 @@ To test \"client\" model To test \"client\" model -### Example +### Example ```swift // The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new import PetstoreClient @@ -371,7 +371,7 @@ Fake endpoint for testing various parameters å‡ç«¯é»ž å½ã®ã‚¨ãƒ³ãƒ‰ãƒã‚¤ Fake endpoint for testing various parameters å‡ç«¯é»ž å½ã®ã‚¨ãƒ³ãƒ‰ãƒã‚¤ãƒ³ãƒˆ 가짜 엔드 í¬ì¸íЏ -### Example +### Example ```swift // The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new import PetstoreClient @@ -447,7 +447,7 @@ To test enum parameters To test enum parameters -### Example +### Example ```swift // The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new import PetstoreClient @@ -511,7 +511,7 @@ Fake endpoint to test group parameters (optional) Fake endpoint to test group parameters (optional) -### Example +### Example ```swift // The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new import PetstoreClient @@ -569,7 +569,7 @@ No authorization required test inline additionalProperties -### Example +### Example ```swift // The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new import PetstoreClient @@ -617,7 +617,7 @@ No authorization required test json serialization of form data -### Example +### Example ```swift // The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new import PetstoreClient diff --git a/samples/client/petstore/swift5/combineLibrary/docs/FakeClassnameTags123API.md b/samples/client/petstore/swift5/combineLibrary/docs/FakeClassnameTags123API.md index 9f24b46edbc3a52a58c554db3ebdddf7c24692f9..5b9b66073fe0b2b3cb0083ccaafafa72b63bae3c 100644 --- a/samples/client/petstore/swift5/combineLibrary/docs/FakeClassnameTags123API.md +++ b/samples/client/petstore/swift5/combineLibrary/docs/FakeClassnameTags123API.md @@ -16,7 +16,7 @@ To test class name in snake case To test class name in snake case -### Example +### Example ```swift // The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new import PetstoreClient diff --git a/samples/client/petstore/swift5/combineLibrary/docs/PetAPI.md b/samples/client/petstore/swift5/combineLibrary/docs/PetAPI.md index 27efe08334762cbdec4a544ae7dad3d5e43eaeb5..5babbd06a3c08be466769ad385648598979a778a 100644 --- a/samples/client/petstore/swift5/combineLibrary/docs/PetAPI.md +++ b/samples/client/petstore/swift5/combineLibrary/docs/PetAPI.md @@ -22,7 +22,7 @@ Method | HTTP request | Description Add a new pet to the store -### Example +### Example ```swift // The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new import PetstoreClient @@ -70,7 +70,7 @@ Void (empty response body) Deletes a pet -### Example +### Example ```swift // The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new import PetstoreClient @@ -122,7 +122,7 @@ Finds Pets by status Multiple status values can be provided with comma separated strings -### Example +### Example ```swift // The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new import PetstoreClient @@ -172,7 +172,7 @@ Finds Pets by tags Multiple tags can be provided with comma separated strings. Use tag1, tag2, tag3 for testing. -### Example +### Example ```swift // The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new import PetstoreClient @@ -222,7 +222,7 @@ Find pet by ID Returns a single pet -### Example +### Example ```swift // The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new import PetstoreClient @@ -270,7 +270,7 @@ Name | Type | Description | Notes Update an existing pet -### Example +### Example ```swift // The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new import PetstoreClient @@ -318,7 +318,7 @@ Void (empty response body) Updates a pet in the store with form data -### Example +### Example ```swift // The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new import PetstoreClient @@ -370,7 +370,7 @@ Void (empty response body) uploads an image -### Example +### Example ```swift // The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new import PetstoreClient @@ -422,7 +422,7 @@ Name | Type | Description | Notes uploads an image (required) -### Example +### Example ```swift // The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new import PetstoreClient diff --git a/samples/client/petstore/swift5/combineLibrary/docs/StoreAPI.md b/samples/client/petstore/swift5/combineLibrary/docs/StoreAPI.md index 383dda5d3c71edfe059c03fea27d3c18d723bfac..b023aa9e45236ab37239ca482ea4a843ed60e7db 100644 --- a/samples/client/petstore/swift5/combineLibrary/docs/StoreAPI.md +++ b/samples/client/petstore/swift5/combineLibrary/docs/StoreAPI.md @@ -19,7 +19,7 @@ Delete purchase order by ID For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors -### Example +### Example ```swift // The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new import PetstoreClient @@ -69,7 +69,7 @@ Returns pet inventories by status Returns a map of status codes to quantities -### Example +### Example ```swift // The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new import PetstoreClient @@ -115,7 +115,7 @@ Find purchase order by ID For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions -### Example +### Example ```swift // The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new import PetstoreClient @@ -163,7 +163,7 @@ No authorization required Place an order for a pet -### Example +### Example ```swift // The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new import PetstoreClient diff --git a/samples/client/petstore/swift5/combineLibrary/docs/UserAPI.md b/samples/client/petstore/swift5/combineLibrary/docs/UserAPI.md index 380813bc68c02383e46b016c9e768915da8a4559..5fc9160daf471ed337dc5d07c036956ff2785255 100644 --- a/samples/client/petstore/swift5/combineLibrary/docs/UserAPI.md +++ b/samples/client/petstore/swift5/combineLibrary/docs/UserAPI.md @@ -23,7 +23,7 @@ Create user This can only be done by the logged in user. -### Example +### Example ```swift // The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new import PetstoreClient @@ -71,7 +71,7 @@ No authorization required Creates list of users with given input array -### Example +### Example ```swift // The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new import PetstoreClient @@ -119,7 +119,7 @@ No authorization required Creates list of users with given input array -### Example +### Example ```swift // The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new import PetstoreClient @@ -169,7 +169,7 @@ Delete user This can only be done by the logged in user. -### Example +### Example ```swift // The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new import PetstoreClient @@ -217,7 +217,7 @@ No authorization required Get user by user name -### Example +### Example ```swift // The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new import PetstoreClient @@ -265,7 +265,7 @@ No authorization required Logs user into the system -### Example +### Example ```swift // The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new import PetstoreClient @@ -315,7 +315,7 @@ No authorization required Logs out current logged in user session -### Example +### Example ```swift // The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new import PetstoreClient @@ -361,7 +361,7 @@ Updated user This can only be done by the logged in user. -### Example +### Example ```swift // The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new import PetstoreClient diff --git a/samples/client/petstore/swift5/combineLibrary/git_push.sh b/samples/client/petstore/swift5/combineLibrary/git_push.sh index ced3be2b0c7b2349ff06d18da19d4b31435c9fa6..9405f72e950cdb8ca24c3cf4d15cee7eac62fde7 100644 --- a/samples/client/petstore/swift5/combineLibrary/git_push.sh +++ b/samples/client/petstore/swift5/combineLibrary/git_push.sh @@ -55,4 +55,3 @@ 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/PetstoreClient/Classes/OpenAPIs/Extensions.swift b/samples/client/petstore/swift5/default/PetstoreClient/Classes/OpenAPIs/Extensions.swift index e23035dde30ee6d11b591fd6b816eb212eb0450e..a4f0c7a3b3601c3289dda0fdf229b8109068aa91 100644 --- a/samples/client/petstore/swift5/default/PetstoreClient/Classes/OpenAPIs/Extensions.swift +++ b/samples/client/petstore/swift5/default/PetstoreClient/Classes/OpenAPIs/Extensions.swift @@ -185,4 +185,4 @@ extension HTTPURLResponse { var isStatusCodeSuccessful: Bool { return Array(200 ..< 300).contains(statusCode) } -} +} \ No newline at end of file diff --git a/samples/client/petstore/swift5/default/docs/AnotherFakeAPI.md b/samples/client/petstore/swift5/default/docs/AnotherFakeAPI.md index aead5f1f980fe641e09ff1a44a3c82c8f39c85e3..26346e81a4cb33233fcb57ee23aee08b14e6c3c4 100644 --- a/samples/client/petstore/swift5/default/docs/AnotherFakeAPI.md +++ b/samples/client/petstore/swift5/default/docs/AnotherFakeAPI.md @@ -16,7 +16,7 @@ To test special tags To test special tags and operation ID starting with number -### Example +### Example ```swift // The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new import PetstoreClient diff --git a/samples/client/petstore/swift5/default/docs/FakeAPI.md b/samples/client/petstore/swift5/default/docs/FakeAPI.md index 01d7c662e3c6befab00063e5b96a0a9b1d7a5903..106dec1b83925820113997caee437a1d246437a4 100644 --- a/samples/client/petstore/swift5/default/docs/FakeAPI.md +++ b/samples/client/petstore/swift5/default/docs/FakeAPI.md @@ -29,7 +29,7 @@ creates an XmlItem this route creates an XmlItem -### Example +### Example ```swift // The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new import PetstoreClient @@ -79,7 +79,7 @@ No authorization required Test serialization of outer boolean types -### Example +### Example ```swift // The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new import PetstoreClient @@ -128,7 +128,7 @@ No authorization required Test serialization of object with outer number type -### Example +### Example ```swift // The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new import PetstoreClient @@ -177,7 +177,7 @@ No authorization required Test serialization of outer number types -### Example +### Example ```swift // The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new import PetstoreClient @@ -226,7 +226,7 @@ No authorization required Test serialization of outer string types -### Example +### Example ```swift // The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new import PetstoreClient @@ -275,7 +275,7 @@ No authorization required For this test, the body for this request much reference a schema named `File`. -### Example +### Example ```swift // The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new import PetstoreClient @@ -322,7 +322,7 @@ No authorization required -### Example +### Example ```swift // The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new import PetstoreClient @@ -373,7 +373,7 @@ To test \"client\" model To test \"client\" model -### Example +### Example ```swift // The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new import PetstoreClient @@ -423,7 +423,7 @@ Fake endpoint for testing various parameters å‡ç«¯é»ž å½ã®ã‚¨ãƒ³ãƒ‰ãƒã‚¤ Fake endpoint for testing various parameters å‡ç«¯é»ž å½ã®ã‚¨ãƒ³ãƒ‰ãƒã‚¤ãƒ³ãƒˆ 가짜 엔드 í¬ì¸íЏ -### Example +### Example ```swift // The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new import PetstoreClient @@ -499,7 +499,7 @@ To test enum parameters To test enum parameters -### Example +### Example ```swift // The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new import PetstoreClient @@ -563,7 +563,7 @@ Fake endpoint to test group parameters (optional) Fake endpoint to test group parameters (optional) -### Example +### Example ```swift // The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new import PetstoreClient @@ -621,7 +621,7 @@ No authorization required test inline additionalProperties -### Example +### Example ```swift // The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new import PetstoreClient @@ -669,7 +669,7 @@ No authorization required test json serialization of form data -### Example +### Example ```swift // The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new import PetstoreClient @@ -721,7 +721,7 @@ No authorization required To test the collection format in query parameters -### Example +### Example ```swift // The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new import PetstoreClient diff --git a/samples/client/petstore/swift5/default/docs/FakeClassnameTags123API.md b/samples/client/petstore/swift5/default/docs/FakeClassnameTags123API.md index 9f24b46edbc3a52a58c554db3ebdddf7c24692f9..5b9b66073fe0b2b3cb0083ccaafafa72b63bae3c 100644 --- a/samples/client/petstore/swift5/default/docs/FakeClassnameTags123API.md +++ b/samples/client/petstore/swift5/default/docs/FakeClassnameTags123API.md @@ -16,7 +16,7 @@ To test class name in snake case To test class name in snake case -### Example +### Example ```swift // The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new import PetstoreClient diff --git a/samples/client/petstore/swift5/default/docs/PetAPI.md b/samples/client/petstore/swift5/default/docs/PetAPI.md index 1daf962858256b95d09c87294f222fe13d1fd769..6195924f3c23927a40a8d9d0d58e869d7caac4f6 100644 --- a/samples/client/petstore/swift5/default/docs/PetAPI.md +++ b/samples/client/petstore/swift5/default/docs/PetAPI.md @@ -22,7 +22,7 @@ Method | HTTP request | Description Add a new pet to the store -### Example +### Example ```swift // The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new import PetstoreClient @@ -70,7 +70,7 @@ Void (empty response body) Deletes a pet -### Example +### Example ```swift // The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new import PetstoreClient @@ -122,7 +122,7 @@ Finds Pets by status Multiple status values can be provided with comma separated strings -### Example +### Example ```swift // The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new import PetstoreClient @@ -172,7 +172,7 @@ Finds Pets by tags Multiple tags can be provided with comma separated strings. Use tag1, tag2, tag3 for testing. -### Example +### Example ```swift // The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new import PetstoreClient @@ -222,7 +222,7 @@ Find pet by ID Returns a single pet -### Example +### Example ```swift // The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new import PetstoreClient @@ -270,7 +270,7 @@ Name | Type | Description | Notes Update an existing pet -### Example +### Example ```swift // The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new import PetstoreClient @@ -318,7 +318,7 @@ Void (empty response body) Updates a pet in the store with form data -### Example +### Example ```swift // The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new import PetstoreClient @@ -370,7 +370,7 @@ Void (empty response body) uploads an image -### Example +### Example ```swift // The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new import PetstoreClient @@ -422,7 +422,7 @@ Name | Type | Description | Notes uploads an image (required) -### Example +### Example ```swift // The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new import PetstoreClient diff --git a/samples/client/petstore/swift5/default/docs/StoreAPI.md b/samples/client/petstore/swift5/default/docs/StoreAPI.md index 383dda5d3c71edfe059c03fea27d3c18d723bfac..b023aa9e45236ab37239ca482ea4a843ed60e7db 100644 --- a/samples/client/petstore/swift5/default/docs/StoreAPI.md +++ b/samples/client/petstore/swift5/default/docs/StoreAPI.md @@ -19,7 +19,7 @@ Delete purchase order by ID For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors -### Example +### Example ```swift // The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new import PetstoreClient @@ -69,7 +69,7 @@ Returns pet inventories by status Returns a map of status codes to quantities -### Example +### Example ```swift // The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new import PetstoreClient @@ -115,7 +115,7 @@ Find purchase order by ID For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions -### Example +### Example ```swift // The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new import PetstoreClient @@ -163,7 +163,7 @@ No authorization required Place an order for a pet -### Example +### Example ```swift // The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new import PetstoreClient diff --git a/samples/client/petstore/swift5/default/docs/UserAPI.md b/samples/client/petstore/swift5/default/docs/UserAPI.md index 380813bc68c02383e46b016c9e768915da8a4559..5fc9160daf471ed337dc5d07c036956ff2785255 100644 --- a/samples/client/petstore/swift5/default/docs/UserAPI.md +++ b/samples/client/petstore/swift5/default/docs/UserAPI.md @@ -23,7 +23,7 @@ Create user This can only be done by the logged in user. -### Example +### Example ```swift // The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new import PetstoreClient @@ -71,7 +71,7 @@ No authorization required Creates list of users with given input array -### Example +### Example ```swift // The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new import PetstoreClient @@ -119,7 +119,7 @@ No authorization required Creates list of users with given input array -### Example +### Example ```swift // The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new import PetstoreClient @@ -169,7 +169,7 @@ Delete user This can only be done by the logged in user. -### Example +### Example ```swift // The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new import PetstoreClient @@ -217,7 +217,7 @@ No authorization required Get user by user name -### Example +### Example ```swift // The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new import PetstoreClient @@ -265,7 +265,7 @@ No authorization required Logs user into the system -### Example +### Example ```swift // The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new import PetstoreClient @@ -315,7 +315,7 @@ No authorization required Logs out current logged in user session -### Example +### Example ```swift // The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new import PetstoreClient @@ -361,7 +361,7 @@ Updated user This can only be done by the logged in user. -### Example +### Example ```swift // The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new import PetstoreClient diff --git a/samples/client/petstore/swift5/default/git_push.sh b/samples/client/petstore/swift5/default/git_push.sh index ced3be2b0c7b2349ff06d18da19d4b31435c9fa6..9405f72e950cdb8ca24c3cf4d15cee7eac62fde7 100644 --- a/samples/client/petstore/swift5/default/git_push.sh +++ b/samples/client/petstore/swift5/default/git_push.sh @@ -55,4 +55,3 @@ 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/deprecated/PetstoreClient/Classes/OpenAPIs/Extensions.swift b/samples/client/petstore/swift5/deprecated/PetstoreClient/Classes/OpenAPIs/Extensions.swift index e23035dde30ee6d11b591fd6b816eb212eb0450e..a4f0c7a3b3601c3289dda0fdf229b8109068aa91 100644 --- a/samples/client/petstore/swift5/deprecated/PetstoreClient/Classes/OpenAPIs/Extensions.swift +++ b/samples/client/petstore/swift5/deprecated/PetstoreClient/Classes/OpenAPIs/Extensions.swift @@ -185,4 +185,4 @@ extension HTTPURLResponse { var isStatusCodeSuccessful: Bool { return Array(200 ..< 300).contains(statusCode) } -} +} \ No newline at end of file diff --git a/samples/client/petstore/swift5/deprecated/docs/PetAPI.md b/samples/client/petstore/swift5/deprecated/docs/PetAPI.md index 3dd1748247934407a8be4be34fb719fc5cd4c055..c602c9fb5725042e19be4266233fbac876912578 100644 --- a/samples/client/petstore/swift5/deprecated/docs/PetAPI.md +++ b/samples/client/petstore/swift5/deprecated/docs/PetAPI.md @@ -21,7 +21,7 @@ Method | HTTP request | Description Add a new pet to the store -### Example +### Example ```swift // The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new import PetstoreClient @@ -69,7 +69,7 @@ Void (empty response body) Deletes a pet -### Example +### Example ```swift // The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new import PetstoreClient @@ -121,7 +121,7 @@ Finds Pets by status Multiple status values can be provided with comma separated strings -### Example +### Example ```swift // The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new import PetstoreClient @@ -171,7 +171,7 @@ Finds Pets by tags Multiple tags can be provided with comma separated strings. Use tag1, tag2, tag3 for testing. -### Example +### Example ```swift // The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new import PetstoreClient @@ -221,7 +221,7 @@ Find pet by ID Returns a single pet -### Example +### Example ```swift // The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new import PetstoreClient @@ -269,7 +269,7 @@ Name | Type | Description | Notes Update an existing pet -### Example +### Example ```swift // The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new import PetstoreClient @@ -317,7 +317,7 @@ Void (empty response body) Updates a pet in the store with form data -### Example +### Example ```swift // The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new import PetstoreClient @@ -369,7 +369,7 @@ Void (empty response body) uploads an image -### Example +### Example ```swift // The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new import PetstoreClient diff --git a/samples/client/petstore/swift5/deprecated/docs/StoreAPI.md b/samples/client/petstore/swift5/deprecated/docs/StoreAPI.md index f28f141f638da37563f95567dd41a4f4f561e695..8a0441527c18321dc1f54955be7569b370fb93f2 100644 --- a/samples/client/petstore/swift5/deprecated/docs/StoreAPI.md +++ b/samples/client/petstore/swift5/deprecated/docs/StoreAPI.md @@ -19,7 +19,7 @@ Delete purchase order by ID For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors -### Example +### Example ```swift // The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new import PetstoreClient @@ -69,7 +69,7 @@ Returns pet inventories by status Returns a map of status codes to quantities -### Example +### Example ```swift // The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new import PetstoreClient @@ -115,7 +115,7 @@ Find purchase order by ID For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions -### Example +### Example ```swift // The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new import PetstoreClient @@ -163,7 +163,7 @@ No authorization required Place an order for a pet -### Example +### Example ```swift // The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new import PetstoreClient diff --git a/samples/client/petstore/swift5/deprecated/docs/UserAPI.md b/samples/client/petstore/swift5/deprecated/docs/UserAPI.md index 18f3327a1e2fe4f59dff5b2ea1c56cf372c5f4f2..5ef3d53cb735f48daff07e271776fa327d587447 100644 --- a/samples/client/petstore/swift5/deprecated/docs/UserAPI.md +++ b/samples/client/petstore/swift5/deprecated/docs/UserAPI.md @@ -23,7 +23,7 @@ Create user This can only be done by the logged in user. -### Example +### Example ```swift // The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new import PetstoreClient @@ -71,7 +71,7 @@ Void (empty response body) Creates list of users with given input array -### Example +### Example ```swift // The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new import PetstoreClient @@ -119,7 +119,7 @@ Void (empty response body) Creates list of users with given input array -### Example +### Example ```swift // The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new import PetstoreClient @@ -169,7 +169,7 @@ Delete user This can only be done by the logged in user. -### Example +### Example ```swift // The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new import PetstoreClient @@ -217,7 +217,7 @@ Void (empty response body) Get user by user name -### Example +### Example ```swift // The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new import PetstoreClient @@ -265,7 +265,7 @@ No authorization required Logs user into the system -### Example +### Example ```swift // The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new import PetstoreClient @@ -315,7 +315,7 @@ No authorization required Logs out current logged in user session -### Example +### Example ```swift // The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new import PetstoreClient @@ -361,7 +361,7 @@ Updated user This can only be done by the logged in user. -### Example +### Example ```swift // The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new import PetstoreClient diff --git a/samples/client/petstore/swift5/deprecated/git_push.sh b/samples/client/petstore/swift5/deprecated/git_push.sh index ced3be2b0c7b2349ff06d18da19d4b31435c9fa6..9405f72e950cdb8ca24c3cf4d15cee7eac62fde7 100644 --- a/samples/client/petstore/swift5/deprecated/git_push.sh +++ b/samples/client/petstore/swift5/deprecated/git_push.sh @@ -55,4 +55,3 @@ 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/PetstoreClient/Classes/OpenAPIs/Extensions.swift b/samples/client/petstore/swift5/nonPublicApi/PetstoreClient/Classes/OpenAPIs/Extensions.swift index 65ae1c6c642558493f039f39158faaeb5d6e05e4..b628320a4a626f870d2ce7454586c43e548e55df 100644 --- a/samples/client/petstore/swift5/nonPublicApi/PetstoreClient/Classes/OpenAPIs/Extensions.swift +++ b/samples/client/petstore/swift5/nonPublicApi/PetstoreClient/Classes/OpenAPIs/Extensions.swift @@ -185,4 +185,4 @@ extension HTTPURLResponse { var isStatusCodeSuccessful: Bool { return Array(200 ..< 300).contains(statusCode) } -} +} \ No newline at end of file diff --git a/samples/client/petstore/swift5/nonPublicApi/docs/AnotherFakeAPI.md b/samples/client/petstore/swift5/nonPublicApi/docs/AnotherFakeAPI.md index 387f5f5bb0c9f7becb43c7b4667e8e5c855f3db9..4477db083ea389720aa6c0c5dece0c56199afd64 100644 --- a/samples/client/petstore/swift5/nonPublicApi/docs/AnotherFakeAPI.md +++ b/samples/client/petstore/swift5/nonPublicApi/docs/AnotherFakeAPI.md @@ -16,7 +16,7 @@ To test special tags To test special tags and operation ID starting with number -### Example +### Example ```swift // The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new import PetstoreClient diff --git a/samples/client/petstore/swift5/nonPublicApi/docs/FakeAPI.md b/samples/client/petstore/swift5/nonPublicApi/docs/FakeAPI.md index b922f6ff7061cc72cfed03ae372e03ed1efa5109..d18c94250105369d4d86fbd2fb18ccbc853a51dd 100644 --- a/samples/client/petstore/swift5/nonPublicApi/docs/FakeAPI.md +++ b/samples/client/petstore/swift5/nonPublicApi/docs/FakeAPI.md @@ -27,7 +27,7 @@ Method | HTTP request | Description Test serialization of outer boolean types -### Example +### Example ```swift // The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new import PetstoreClient @@ -76,7 +76,7 @@ No authorization required Test serialization of object with outer number type -### Example +### Example ```swift // The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new import PetstoreClient @@ -125,7 +125,7 @@ No authorization required Test serialization of outer number types -### Example +### Example ```swift // The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new import PetstoreClient @@ -174,7 +174,7 @@ No authorization required Test serialization of outer string types -### Example +### Example ```swift // The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new import PetstoreClient @@ -223,7 +223,7 @@ No authorization required For this test, the body for this request much reference a schema named `File`. -### Example +### Example ```swift // The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new import PetstoreClient @@ -270,7 +270,7 @@ No authorization required -### Example +### Example ```swift // The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new import PetstoreClient @@ -321,7 +321,7 @@ To test \"client\" model To test \"client\" model -### Example +### Example ```swift // The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new import PetstoreClient @@ -371,7 +371,7 @@ Fake endpoint for testing various parameters å‡ç«¯é»ž å½ã®ã‚¨ãƒ³ãƒ‰ãƒã‚¤ Fake endpoint for testing various parameters å‡ç«¯é»ž å½ã®ã‚¨ãƒ³ãƒ‰ãƒã‚¤ãƒ³ãƒˆ 가짜 엔드 í¬ì¸íЏ -### Example +### Example ```swift // The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new import PetstoreClient @@ -447,7 +447,7 @@ To test enum parameters To test enum parameters -### Example +### Example ```swift // The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new import PetstoreClient @@ -511,7 +511,7 @@ Fake endpoint to test group parameters (optional) Fake endpoint to test group parameters (optional) -### Example +### Example ```swift // The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new import PetstoreClient @@ -569,7 +569,7 @@ No authorization required test inline additionalProperties -### Example +### Example ```swift // The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new import PetstoreClient @@ -617,7 +617,7 @@ No authorization required test json serialization of form data -### Example +### Example ```swift // The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new import PetstoreClient diff --git a/samples/client/petstore/swift5/nonPublicApi/docs/FakeClassnameTags123API.md b/samples/client/petstore/swift5/nonPublicApi/docs/FakeClassnameTags123API.md index 4d82fa29a547fb57fde1cc2e4ea788ccf5747c08..fbceb57f20efc9f517b821762742957a8fa7f792 100644 --- a/samples/client/petstore/swift5/nonPublicApi/docs/FakeClassnameTags123API.md +++ b/samples/client/petstore/swift5/nonPublicApi/docs/FakeClassnameTags123API.md @@ -16,7 +16,7 @@ To test class name in snake case To test class name in snake case -### Example +### Example ```swift // The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new import PetstoreClient diff --git a/samples/client/petstore/swift5/nonPublicApi/docs/PetAPI.md b/samples/client/petstore/swift5/nonPublicApi/docs/PetAPI.md index 8fd9872c0e9a634907f9982f44a9e593781a1dba..eb2db2040cddb5bd53f50d5c2dc2655e5066d977 100644 --- a/samples/client/petstore/swift5/nonPublicApi/docs/PetAPI.md +++ b/samples/client/petstore/swift5/nonPublicApi/docs/PetAPI.md @@ -22,7 +22,7 @@ Method | HTTP request | Description Add a new pet to the store -### Example +### Example ```swift // The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new import PetstoreClient @@ -70,7 +70,7 @@ Void (empty response body) Deletes a pet -### Example +### Example ```swift // The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new import PetstoreClient @@ -122,7 +122,7 @@ Finds Pets by status Multiple status values can be provided with comma separated strings -### Example +### Example ```swift // The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new import PetstoreClient @@ -172,7 +172,7 @@ Finds Pets by tags Multiple tags can be provided with comma separated strings. Use tag1, tag2, tag3 for testing. -### Example +### Example ```swift // The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new import PetstoreClient @@ -222,7 +222,7 @@ Find pet by ID Returns a single pet -### Example +### Example ```swift // The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new import PetstoreClient @@ -270,7 +270,7 @@ Name | Type | Description | Notes Update an existing pet -### Example +### Example ```swift // The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new import PetstoreClient @@ -318,7 +318,7 @@ Void (empty response body) Updates a pet in the store with form data -### Example +### Example ```swift // The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new import PetstoreClient @@ -370,7 +370,7 @@ Void (empty response body) uploads an image -### Example +### Example ```swift // The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new import PetstoreClient @@ -422,7 +422,7 @@ Name | Type | Description | Notes uploads an image (required) -### Example +### Example ```swift // The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new import PetstoreClient diff --git a/samples/client/petstore/swift5/nonPublicApi/docs/StoreAPI.md b/samples/client/petstore/swift5/nonPublicApi/docs/StoreAPI.md index 02968503f8228c8d6aa791575a6b1c21873f66f8..100cf07cdc801995a2e4d91e28c49817f5723072 100644 --- a/samples/client/petstore/swift5/nonPublicApi/docs/StoreAPI.md +++ b/samples/client/petstore/swift5/nonPublicApi/docs/StoreAPI.md @@ -19,7 +19,7 @@ Delete purchase order by ID For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors -### Example +### Example ```swift // The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new import PetstoreClient @@ -69,7 +69,7 @@ Returns pet inventories by status Returns a map of status codes to quantities -### Example +### Example ```swift // The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new import PetstoreClient @@ -115,7 +115,7 @@ Find purchase order by ID For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions -### Example +### Example ```swift // The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new import PetstoreClient @@ -163,7 +163,7 @@ No authorization required Place an order for a pet -### Example +### Example ```swift // The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new import PetstoreClient diff --git a/samples/client/petstore/swift5/nonPublicApi/docs/UserAPI.md b/samples/client/petstore/swift5/nonPublicApi/docs/UserAPI.md index 56fba1b3c9ebe7c85a11736145ef25a078b71812..fed69766b0f21336ab896cdd097c56081482c613 100644 --- a/samples/client/petstore/swift5/nonPublicApi/docs/UserAPI.md +++ b/samples/client/petstore/swift5/nonPublicApi/docs/UserAPI.md @@ -23,7 +23,7 @@ Create user This can only be done by the logged in user. -### Example +### Example ```swift // The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new import PetstoreClient @@ -71,7 +71,7 @@ No authorization required Creates list of users with given input array -### Example +### Example ```swift // The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new import PetstoreClient @@ -119,7 +119,7 @@ No authorization required Creates list of users with given input array -### Example +### Example ```swift // The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new import PetstoreClient @@ -169,7 +169,7 @@ Delete user This can only be done by the logged in user. -### Example +### Example ```swift // The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new import PetstoreClient @@ -217,7 +217,7 @@ No authorization required Get user by user name -### Example +### Example ```swift // The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new import PetstoreClient @@ -265,7 +265,7 @@ No authorization required Logs user into the system -### Example +### Example ```swift // The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new import PetstoreClient @@ -315,7 +315,7 @@ No authorization required Logs out current logged in user session -### Example +### Example ```swift // The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new import PetstoreClient @@ -361,7 +361,7 @@ Updated user This can only be done by the logged in user. -### Example +### Example ```swift // The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new import PetstoreClient diff --git a/samples/client/petstore/swift5/nonPublicApi/git_push.sh b/samples/client/petstore/swift5/nonPublicApi/git_push.sh index ced3be2b0c7b2349ff06d18da19d4b31435c9fa6..9405f72e950cdb8ca24c3cf4d15cee7eac62fde7 100644 --- a/samples/client/petstore/swift5/nonPublicApi/git_push.sh +++ b/samples/client/petstore/swift5/nonPublicApi/git_push.sh @@ -55,4 +55,3 @@ 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/PetstoreClient/Classes/OpenAPIs/Extensions.swift b/samples/client/petstore/swift5/objcCompatible/PetstoreClient/Classes/OpenAPIs/Extensions.swift index e23035dde30ee6d11b591fd6b816eb212eb0450e..a4f0c7a3b3601c3289dda0fdf229b8109068aa91 100644 --- a/samples/client/petstore/swift5/objcCompatible/PetstoreClient/Classes/OpenAPIs/Extensions.swift +++ b/samples/client/petstore/swift5/objcCompatible/PetstoreClient/Classes/OpenAPIs/Extensions.swift @@ -185,4 +185,4 @@ extension HTTPURLResponse { var isStatusCodeSuccessful: Bool { return Array(200 ..< 300).contains(statusCode) } -} +} \ No newline at end of file diff --git a/samples/client/petstore/swift5/objcCompatible/docs/AnotherFakeAPI.md b/samples/client/petstore/swift5/objcCompatible/docs/AnotherFakeAPI.md index aead5f1f980fe641e09ff1a44a3c82c8f39c85e3..26346e81a4cb33233fcb57ee23aee08b14e6c3c4 100644 --- a/samples/client/petstore/swift5/objcCompatible/docs/AnotherFakeAPI.md +++ b/samples/client/petstore/swift5/objcCompatible/docs/AnotherFakeAPI.md @@ -16,7 +16,7 @@ To test special tags To test special tags and operation ID starting with number -### Example +### Example ```swift // The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new import PetstoreClient diff --git a/samples/client/petstore/swift5/objcCompatible/docs/FakeAPI.md b/samples/client/petstore/swift5/objcCompatible/docs/FakeAPI.md index 779e16b3ce63a1349327d7f967335b99112f40cd..c0a0824fb70f8dc128c12c7b00b9cf34895ffd12 100644 --- a/samples/client/petstore/swift5/objcCompatible/docs/FakeAPI.md +++ b/samples/client/petstore/swift5/objcCompatible/docs/FakeAPI.md @@ -27,7 +27,7 @@ Method | HTTP request | Description Test serialization of outer boolean types -### Example +### Example ```swift // The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new import PetstoreClient @@ -76,7 +76,7 @@ No authorization required Test serialization of object with outer number type -### Example +### Example ```swift // The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new import PetstoreClient @@ -125,7 +125,7 @@ No authorization required Test serialization of outer number types -### Example +### Example ```swift // The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new import PetstoreClient @@ -174,7 +174,7 @@ No authorization required Test serialization of outer string types -### Example +### Example ```swift // The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new import PetstoreClient @@ -223,7 +223,7 @@ No authorization required For this test, the body for this request much reference a schema named `File`. -### Example +### Example ```swift // The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new import PetstoreClient @@ -270,7 +270,7 @@ No authorization required -### Example +### Example ```swift // The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new import PetstoreClient @@ -321,7 +321,7 @@ To test \"client\" model To test \"client\" model -### Example +### Example ```swift // The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new import PetstoreClient @@ -371,7 +371,7 @@ Fake endpoint for testing various parameters å‡ç«¯é»ž å½ã®ã‚¨ãƒ³ãƒ‰ãƒã‚¤ Fake endpoint for testing various parameters å‡ç«¯é»ž å½ã®ã‚¨ãƒ³ãƒ‰ãƒã‚¤ãƒ³ãƒˆ 가짜 엔드 í¬ì¸íЏ -### Example +### Example ```swift // The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new import PetstoreClient @@ -447,7 +447,7 @@ To test enum parameters To test enum parameters -### Example +### Example ```swift // The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new import PetstoreClient @@ -511,7 +511,7 @@ Fake endpoint to test group parameters (optional) Fake endpoint to test group parameters (optional) -### Example +### Example ```swift // The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new import PetstoreClient @@ -569,7 +569,7 @@ No authorization required test inline additionalProperties -### Example +### Example ```swift // The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new import PetstoreClient @@ -617,7 +617,7 @@ No authorization required test json serialization of form data -### Example +### Example ```swift // The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new import PetstoreClient diff --git a/samples/client/petstore/swift5/objcCompatible/docs/FakeClassnameTags123API.md b/samples/client/petstore/swift5/objcCompatible/docs/FakeClassnameTags123API.md index 9f24b46edbc3a52a58c554db3ebdddf7c24692f9..5b9b66073fe0b2b3cb0083ccaafafa72b63bae3c 100644 --- a/samples/client/petstore/swift5/objcCompatible/docs/FakeClassnameTags123API.md +++ b/samples/client/petstore/swift5/objcCompatible/docs/FakeClassnameTags123API.md @@ -16,7 +16,7 @@ To test class name in snake case To test class name in snake case -### Example +### Example ```swift // The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new import PetstoreClient diff --git a/samples/client/petstore/swift5/objcCompatible/docs/PetAPI.md b/samples/client/petstore/swift5/objcCompatible/docs/PetAPI.md index c03e60bc084ee1c9df87b2e570e9e41cde996a95..b3187a5112817789dbfbaf62c2109eeafd802da3 100644 --- a/samples/client/petstore/swift5/objcCompatible/docs/PetAPI.md +++ b/samples/client/petstore/swift5/objcCompatible/docs/PetAPI.md @@ -22,7 +22,7 @@ Method | HTTP request | Description Add a new pet to the store -### Example +### Example ```swift // The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new import PetstoreClient @@ -70,7 +70,7 @@ Void (empty response body) Deletes a pet -### Example +### Example ```swift // The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new import PetstoreClient @@ -122,7 +122,7 @@ Finds Pets by status Multiple status values can be provided with comma separated strings -### Example +### Example ```swift // The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new import PetstoreClient @@ -172,7 +172,7 @@ Finds Pets by tags Multiple tags can be provided with comma separated strings. Use tag1, tag2, tag3 for testing. -### Example +### Example ```swift // The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new import PetstoreClient @@ -222,7 +222,7 @@ Find pet by ID Returns a single pet -### Example +### Example ```swift // The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new import PetstoreClient @@ -270,7 +270,7 @@ Name | Type | Description | Notes Update an existing pet -### Example +### Example ```swift // The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new import PetstoreClient @@ -318,7 +318,7 @@ Void (empty response body) Updates a pet in the store with form data -### Example +### Example ```swift // The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new import PetstoreClient @@ -370,7 +370,7 @@ Void (empty response body) uploads an image -### Example +### Example ```swift // The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new import PetstoreClient @@ -422,7 +422,7 @@ Name | Type | Description | Notes uploads an image (required) -### Example +### Example ```swift // The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new import PetstoreClient diff --git a/samples/client/petstore/swift5/objcCompatible/docs/StoreAPI.md b/samples/client/petstore/swift5/objcCompatible/docs/StoreAPI.md index 4add349c9c1984a815d1d59c57d28657c6672170..dd4c3d8b044f3d24126a7df0482188fdc137acd2 100644 --- a/samples/client/petstore/swift5/objcCompatible/docs/StoreAPI.md +++ b/samples/client/petstore/swift5/objcCompatible/docs/StoreAPI.md @@ -19,7 +19,7 @@ Delete purchase order by ID For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors -### Example +### Example ```swift // The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new import PetstoreClient @@ -69,7 +69,7 @@ Returns pet inventories by status Returns a map of status codes to quantities -### Example +### Example ```swift // The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new import PetstoreClient @@ -115,7 +115,7 @@ Find purchase order by ID For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions -### Example +### Example ```swift // The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new import PetstoreClient @@ -163,7 +163,7 @@ No authorization required Place an order for a pet -### Example +### Example ```swift // The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new import PetstoreClient diff --git a/samples/client/petstore/swift5/objcCompatible/docs/UserAPI.md b/samples/client/petstore/swift5/objcCompatible/docs/UserAPI.md index 18e233420ab3aafbd83dfda5d012bcf7da096cad..dd2d5009670a0b9d0ae22cddd461b9358ad70d05 100644 --- a/samples/client/petstore/swift5/objcCompatible/docs/UserAPI.md +++ b/samples/client/petstore/swift5/objcCompatible/docs/UserAPI.md @@ -23,7 +23,7 @@ Create user This can only be done by the logged in user. -### Example +### Example ```swift // The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new import PetstoreClient @@ -71,7 +71,7 @@ No authorization required Creates list of users with given input array -### Example +### Example ```swift // The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new import PetstoreClient @@ -119,7 +119,7 @@ No authorization required Creates list of users with given input array -### Example +### Example ```swift // The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new import PetstoreClient @@ -169,7 +169,7 @@ Delete user This can only be done by the logged in user. -### Example +### Example ```swift // The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new import PetstoreClient @@ -217,7 +217,7 @@ No authorization required Get user by user name -### Example +### Example ```swift // The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new import PetstoreClient @@ -265,7 +265,7 @@ No authorization required Logs user into the system -### Example +### Example ```swift // The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new import PetstoreClient @@ -315,7 +315,7 @@ No authorization required Logs out current logged in user session -### Example +### Example ```swift // The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new import PetstoreClient @@ -361,7 +361,7 @@ Updated user This can only be done by the logged in user. -### Example +### Example ```swift // The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new import PetstoreClient diff --git a/samples/client/petstore/swift5/objcCompatible/git_push.sh b/samples/client/petstore/swift5/objcCompatible/git_push.sh index ced3be2b0c7b2349ff06d18da19d4b31435c9fa6..9405f72e950cdb8ca24c3cf4d15cee7eac62fde7 100644 --- a/samples/client/petstore/swift5/objcCompatible/git_push.sh +++ b/samples/client/petstore/swift5/objcCompatible/git_push.sh @@ -55,4 +55,3 @@ 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/oneOf/PetstoreClient/Classes/OpenAPIs/Extensions.swift b/samples/client/petstore/swift5/oneOf/PetstoreClient/Classes/OpenAPIs/Extensions.swift index e23035dde30ee6d11b591fd6b816eb212eb0450e..a4f0c7a3b3601c3289dda0fdf229b8109068aa91 100644 --- a/samples/client/petstore/swift5/oneOf/PetstoreClient/Classes/OpenAPIs/Extensions.swift +++ b/samples/client/petstore/swift5/oneOf/PetstoreClient/Classes/OpenAPIs/Extensions.swift @@ -185,4 +185,4 @@ extension HTTPURLResponse { var isStatusCodeSuccessful: Bool { return Array(200 ..< 300).contains(statusCode) } -} +} \ No newline at end of file diff --git a/samples/client/petstore/swift5/oneOf/docs/DefaultAPI.md b/samples/client/petstore/swift5/oneOf/docs/DefaultAPI.md index bcefe1e3ffa1ccf27b7f68ebf85241af9be5a43c..18647665e29cf99172741b0154a3ce25b9d38d5f 100644 --- a/samples/client/petstore/swift5/oneOf/docs/DefaultAPI.md +++ b/samples/client/petstore/swift5/oneOf/docs/DefaultAPI.md @@ -14,7 +14,7 @@ Method | HTTP request | Description -### Example +### Example ```swift // The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new import PetstoreClient diff --git a/samples/client/petstore/swift5/oneOf/git_push.sh b/samples/client/petstore/swift5/oneOf/git_push.sh index ced3be2b0c7b2349ff06d18da19d4b31435c9fa6..9405f72e950cdb8ca24c3cf4d15cee7eac62fde7 100644 --- a/samples/client/petstore/swift5/oneOf/git_push.sh +++ b/samples/client/petstore/swift5/oneOf/git_push.sh @@ -55,4 +55,3 @@ 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/PetstoreClient/Classes/OpenAPIs/Extensions.swift b/samples/client/petstore/swift5/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/Extensions.swift index 68c3c6ee7e404cdd55cfb87ac30caeb717c1a8f7..96acdc5e82553dca1e03484bb3f317b1533d40c2 100644 --- a/samples/client/petstore/swift5/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/Extensions.swift +++ b/samples/client/petstore/swift5/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/Extensions.swift @@ -201,4 +201,4 @@ extension RequestBuilder { } return deferred.promise } -} +} \ No newline at end of file diff --git a/samples/client/petstore/swift5/promisekitLibrary/docs/AnotherFakeAPI.md b/samples/client/petstore/swift5/promisekitLibrary/docs/AnotherFakeAPI.md index 7ac52a2b12729f38f83f072f5eace8bac392a16f..dd75fccf4a6b9a32a45e6b813832807d132d96d6 100644 --- a/samples/client/petstore/swift5/promisekitLibrary/docs/AnotherFakeAPI.md +++ b/samples/client/petstore/swift5/promisekitLibrary/docs/AnotherFakeAPI.md @@ -16,7 +16,7 @@ To test special tags To test special tags and operation ID starting with number -### Example +### Example ```swift // The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new import PetstoreClient diff --git a/samples/client/petstore/swift5/promisekitLibrary/docs/FakeAPI.md b/samples/client/petstore/swift5/promisekitLibrary/docs/FakeAPI.md index a79f3ecc8af666af0d4d037f19eb48631ca29282..0d4d1a6ce2690b38148cb184cf6f251777689e73 100644 --- a/samples/client/petstore/swift5/promisekitLibrary/docs/FakeAPI.md +++ b/samples/client/petstore/swift5/promisekitLibrary/docs/FakeAPI.md @@ -27,7 +27,7 @@ Method | HTTP request | Description Test serialization of outer boolean types -### Example +### Example ```swift // The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new import PetstoreClient @@ -73,7 +73,7 @@ No authorization required Test serialization of object with outer number type -### Example +### Example ```swift // The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new import PetstoreClient @@ -119,7 +119,7 @@ No authorization required Test serialization of outer number types -### Example +### Example ```swift // The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new import PetstoreClient @@ -165,7 +165,7 @@ No authorization required Test serialization of outer string types -### Example +### Example ```swift // The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new import PetstoreClient @@ -211,7 +211,7 @@ No authorization required For this test, the body for this request much reference a schema named `File`. -### Example +### Example ```swift // The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new import PetstoreClient @@ -255,7 +255,7 @@ No authorization required -### Example +### Example ```swift // The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new import PetstoreClient @@ -303,7 +303,7 @@ To test \"client\" model To test \"client\" model -### Example +### Example ```swift // The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new import PetstoreClient @@ -350,7 +350,7 @@ Fake endpoint for testing various parameters å‡ç«¯é»ž å½ã®ã‚¨ãƒ³ãƒ‰ãƒã‚¤ Fake endpoint for testing various parameters å‡ç«¯é»ž å½ã®ã‚¨ãƒ³ãƒ‰ãƒã‚¤ãƒ³ãƒˆ 가짜 엔드 í¬ì¸íЏ -### Example +### Example ```swift // The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new import PetstoreClient @@ -423,7 +423,7 @@ To test enum parameters To test enum parameters -### Example +### Example ```swift // The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new import PetstoreClient @@ -484,7 +484,7 @@ Fake endpoint to test group parameters (optional) Fake endpoint to test group parameters (optional) -### Example +### Example ```swift // The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new import PetstoreClient @@ -539,7 +539,7 @@ No authorization required test inline additionalProperties -### Example +### Example ```swift // The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new import PetstoreClient @@ -584,7 +584,7 @@ No authorization required test json serialization of form data -### Example +### Example ```swift // The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new import PetstoreClient diff --git a/samples/client/petstore/swift5/promisekitLibrary/docs/FakeClassnameTags123API.md b/samples/client/petstore/swift5/promisekitLibrary/docs/FakeClassnameTags123API.md index 1b1b9c14102425c0acf7879b05af1ce3a8cadf42..38f9ac0387346963812ef0feae37b2f1e2b951b0 100644 --- a/samples/client/petstore/swift5/promisekitLibrary/docs/FakeClassnameTags123API.md +++ b/samples/client/petstore/swift5/promisekitLibrary/docs/FakeClassnameTags123API.md @@ -16,7 +16,7 @@ To test class name in snake case To test class name in snake case -### Example +### Example ```swift // The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new import PetstoreClient diff --git a/samples/client/petstore/swift5/promisekitLibrary/docs/PetAPI.md b/samples/client/petstore/swift5/promisekitLibrary/docs/PetAPI.md index e767ea772f89f48776a4e3c8545fb98393df0a91..8a516ca30148a4b3e88027bc86d18e98abe3da0c 100644 --- a/samples/client/petstore/swift5/promisekitLibrary/docs/PetAPI.md +++ b/samples/client/petstore/swift5/promisekitLibrary/docs/PetAPI.md @@ -22,7 +22,7 @@ Method | HTTP request | Description Add a new pet to the store -### Example +### Example ```swift // The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new import PetstoreClient @@ -67,7 +67,7 @@ Void (empty response body) Deletes a pet -### Example +### Example ```swift // The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new import PetstoreClient @@ -116,7 +116,7 @@ Finds Pets by status Multiple status values can be provided with comma separated strings -### Example +### Example ```swift // The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new import PetstoreClient @@ -163,7 +163,7 @@ Finds Pets by tags Multiple tags can be provided with comma separated strings. Use tag1, tag2, tag3 for testing. -### Example +### Example ```swift // The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new import PetstoreClient @@ -210,7 +210,7 @@ Find pet by ID Returns a single pet -### Example +### Example ```swift // The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new import PetstoreClient @@ -255,7 +255,7 @@ Name | Type | Description | Notes Update an existing pet -### Example +### Example ```swift // The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new import PetstoreClient @@ -300,7 +300,7 @@ Void (empty response body) Updates a pet in the store with form data -### Example +### Example ```swift // The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new import PetstoreClient @@ -349,7 +349,7 @@ Void (empty response body) uploads an image -### Example +### Example ```swift // The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new import PetstoreClient @@ -398,7 +398,7 @@ Name | Type | Description | Notes uploads an image (required) -### Example +### Example ```swift // The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new import PetstoreClient diff --git a/samples/client/petstore/swift5/promisekitLibrary/docs/StoreAPI.md b/samples/client/petstore/swift5/promisekitLibrary/docs/StoreAPI.md index e33defdf28d4e0592f6f30bb2f0aeadbfa77fb91..1477d323926144ddbde653ae8db938667176ff8c 100644 --- a/samples/client/petstore/swift5/promisekitLibrary/docs/StoreAPI.md +++ b/samples/client/petstore/swift5/promisekitLibrary/docs/StoreAPI.md @@ -19,7 +19,7 @@ Delete purchase order by ID For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors -### Example +### Example ```swift // The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new import PetstoreClient @@ -66,7 +66,7 @@ Returns pet inventories by status Returns a map of status codes to quantities -### Example +### Example ```swift // The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new import PetstoreClient @@ -109,7 +109,7 @@ Find purchase order by ID For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions -### Example +### Example ```swift // The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new import PetstoreClient @@ -154,7 +154,7 @@ No authorization required Place an order for a pet -### Example +### Example ```swift // The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new import PetstoreClient diff --git a/samples/client/petstore/swift5/promisekitLibrary/docs/UserAPI.md b/samples/client/petstore/swift5/promisekitLibrary/docs/UserAPI.md index e18cc451e98ebf1570a7ab51af148782fc095245..39efffd2bafa37df22294440d43e164f2b2ed46d 100644 --- a/samples/client/petstore/swift5/promisekitLibrary/docs/UserAPI.md +++ b/samples/client/petstore/swift5/promisekitLibrary/docs/UserAPI.md @@ -23,7 +23,7 @@ Create user This can only be done by the logged in user. -### Example +### Example ```swift // The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new import PetstoreClient @@ -68,7 +68,7 @@ No authorization required Creates list of users with given input array -### Example +### Example ```swift // The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new import PetstoreClient @@ -113,7 +113,7 @@ No authorization required Creates list of users with given input array -### Example +### Example ```swift // The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new import PetstoreClient @@ -160,7 +160,7 @@ Delete user This can only be done by the logged in user. -### Example +### Example ```swift // The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new import PetstoreClient @@ -205,7 +205,7 @@ No authorization required Get user by user name -### Example +### Example ```swift // The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new import PetstoreClient @@ -250,7 +250,7 @@ No authorization required Logs user into the system -### Example +### Example ```swift // The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new import PetstoreClient @@ -297,7 +297,7 @@ No authorization required Logs out current logged in user session -### Example +### Example ```swift // The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new import PetstoreClient @@ -340,7 +340,7 @@ Updated user This can only be done by the logged in user. -### Example +### Example ```swift // The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new import PetstoreClient diff --git a/samples/client/petstore/swift5/promisekitLibrary/git_push.sh b/samples/client/petstore/swift5/promisekitLibrary/git_push.sh index ced3be2b0c7b2349ff06d18da19d4b31435c9fa6..9405f72e950cdb8ca24c3cf4d15cee7eac62fde7 100644 --- a/samples/client/petstore/swift5/promisekitLibrary/git_push.sh +++ b/samples/client/petstore/swift5/promisekitLibrary/git_push.sh @@ -55,4 +55,3 @@ 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/readonlyProperties/PetstoreClient/Classes/OpenAPIs/Extensions.swift b/samples/client/petstore/swift5/readonlyProperties/PetstoreClient/Classes/OpenAPIs/Extensions.swift index e23035dde30ee6d11b591fd6b816eb212eb0450e..a4f0c7a3b3601c3289dda0fdf229b8109068aa91 100644 --- a/samples/client/petstore/swift5/readonlyProperties/PetstoreClient/Classes/OpenAPIs/Extensions.swift +++ b/samples/client/petstore/swift5/readonlyProperties/PetstoreClient/Classes/OpenAPIs/Extensions.swift @@ -185,4 +185,4 @@ extension HTTPURLResponse { var isStatusCodeSuccessful: Bool { return Array(200 ..< 300).contains(statusCode) } -} +} \ No newline at end of file diff --git a/samples/client/petstore/swift5/readonlyProperties/docs/AnotherFakeAPI.md b/samples/client/petstore/swift5/readonlyProperties/docs/AnotherFakeAPI.md index aead5f1f980fe641e09ff1a44a3c82c8f39c85e3..26346e81a4cb33233fcb57ee23aee08b14e6c3c4 100644 --- a/samples/client/petstore/swift5/readonlyProperties/docs/AnotherFakeAPI.md +++ b/samples/client/petstore/swift5/readonlyProperties/docs/AnotherFakeAPI.md @@ -16,7 +16,7 @@ To test special tags To test special tags and operation ID starting with number -### Example +### Example ```swift // The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new import PetstoreClient diff --git a/samples/client/petstore/swift5/readonlyProperties/docs/FakeAPI.md b/samples/client/petstore/swift5/readonlyProperties/docs/FakeAPI.md index 553a46281aa01cf593e8ef0fa0539ddc19f99511..f07991250846a1e6fe7f81ae88ec439c319174a5 100644 --- a/samples/client/petstore/swift5/readonlyProperties/docs/FakeAPI.md +++ b/samples/client/petstore/swift5/readonlyProperties/docs/FakeAPI.md @@ -27,7 +27,7 @@ Method | HTTP request | Description Test serialization of outer boolean types -### Example +### Example ```swift // The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new import PetstoreClient @@ -76,7 +76,7 @@ No authorization required Test serialization of object with outer number type -### Example +### Example ```swift // The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new import PetstoreClient @@ -125,7 +125,7 @@ No authorization required Test serialization of outer number types -### Example +### Example ```swift // The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new import PetstoreClient @@ -174,7 +174,7 @@ No authorization required Test serialization of outer string types -### Example +### Example ```swift // The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new import PetstoreClient @@ -223,7 +223,7 @@ No authorization required For this test, the body for this request much reference a schema named `File`. -### Example +### Example ```swift // The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new import PetstoreClient @@ -270,7 +270,7 @@ No authorization required -### Example +### Example ```swift // The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new import PetstoreClient @@ -321,7 +321,7 @@ To test \"client\" model To test \"client\" model -### Example +### Example ```swift // The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new import PetstoreClient @@ -371,7 +371,7 @@ Fake endpoint for testing various parameters å‡ç«¯é»ž å½ã®ã‚¨ãƒ³ãƒ‰ãƒã‚¤ Fake endpoint for testing various parameters å‡ç«¯é»ž å½ã®ã‚¨ãƒ³ãƒ‰ãƒã‚¤ãƒ³ãƒˆ 가짜 엔드 í¬ì¸íЏ -### Example +### Example ```swift // The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new import PetstoreClient @@ -447,7 +447,7 @@ To test enum parameters To test enum parameters -### Example +### Example ```swift // The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new import PetstoreClient @@ -511,7 +511,7 @@ Fake endpoint to test group parameters (optional) Fake endpoint to test group parameters (optional) -### Example +### Example ```swift // The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new import PetstoreClient @@ -569,7 +569,7 @@ No authorization required test inline additionalProperties -### Example +### Example ```swift // The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new import PetstoreClient @@ -617,7 +617,7 @@ No authorization required test json serialization of form data -### Example +### Example ```swift // The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new import PetstoreClient diff --git a/samples/client/petstore/swift5/readonlyProperties/docs/FakeClassnameTags123API.md b/samples/client/petstore/swift5/readonlyProperties/docs/FakeClassnameTags123API.md index 9f24b46edbc3a52a58c554db3ebdddf7c24692f9..5b9b66073fe0b2b3cb0083ccaafafa72b63bae3c 100644 --- a/samples/client/petstore/swift5/readonlyProperties/docs/FakeClassnameTags123API.md +++ b/samples/client/petstore/swift5/readonlyProperties/docs/FakeClassnameTags123API.md @@ -16,7 +16,7 @@ To test class name in snake case To test class name in snake case -### Example +### Example ```swift // The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new import PetstoreClient diff --git a/samples/client/petstore/swift5/readonlyProperties/docs/PetAPI.md b/samples/client/petstore/swift5/readonlyProperties/docs/PetAPI.md index 27efe08334762cbdec4a544ae7dad3d5e43eaeb5..5babbd06a3c08be466769ad385648598979a778a 100644 --- a/samples/client/petstore/swift5/readonlyProperties/docs/PetAPI.md +++ b/samples/client/petstore/swift5/readonlyProperties/docs/PetAPI.md @@ -22,7 +22,7 @@ Method | HTTP request | Description Add a new pet to the store -### Example +### Example ```swift // The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new import PetstoreClient @@ -70,7 +70,7 @@ Void (empty response body) Deletes a pet -### Example +### Example ```swift // The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new import PetstoreClient @@ -122,7 +122,7 @@ Finds Pets by status Multiple status values can be provided with comma separated strings -### Example +### Example ```swift // The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new import PetstoreClient @@ -172,7 +172,7 @@ Finds Pets by tags Multiple tags can be provided with comma separated strings. Use tag1, tag2, tag3 for testing. -### Example +### Example ```swift // The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new import PetstoreClient @@ -222,7 +222,7 @@ Find pet by ID Returns a single pet -### Example +### Example ```swift // The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new import PetstoreClient @@ -270,7 +270,7 @@ Name | Type | Description | Notes Update an existing pet -### Example +### Example ```swift // The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new import PetstoreClient @@ -318,7 +318,7 @@ Void (empty response body) Updates a pet in the store with form data -### Example +### Example ```swift // The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new import PetstoreClient @@ -370,7 +370,7 @@ Void (empty response body) uploads an image -### Example +### Example ```swift // The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new import PetstoreClient @@ -422,7 +422,7 @@ Name | Type | Description | Notes uploads an image (required) -### Example +### Example ```swift // The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new import PetstoreClient diff --git a/samples/client/petstore/swift5/readonlyProperties/docs/StoreAPI.md b/samples/client/petstore/swift5/readonlyProperties/docs/StoreAPI.md index 383dda5d3c71edfe059c03fea27d3c18d723bfac..b023aa9e45236ab37239ca482ea4a843ed60e7db 100644 --- a/samples/client/petstore/swift5/readonlyProperties/docs/StoreAPI.md +++ b/samples/client/petstore/swift5/readonlyProperties/docs/StoreAPI.md @@ -19,7 +19,7 @@ Delete purchase order by ID For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors -### Example +### Example ```swift // The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new import PetstoreClient @@ -69,7 +69,7 @@ Returns pet inventories by status Returns a map of status codes to quantities -### Example +### Example ```swift // The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new import PetstoreClient @@ -115,7 +115,7 @@ Find purchase order by ID For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions -### Example +### Example ```swift // The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new import PetstoreClient @@ -163,7 +163,7 @@ No authorization required Place an order for a pet -### Example +### Example ```swift // The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new import PetstoreClient diff --git a/samples/client/petstore/swift5/readonlyProperties/docs/UserAPI.md b/samples/client/petstore/swift5/readonlyProperties/docs/UserAPI.md index 380813bc68c02383e46b016c9e768915da8a4559..5fc9160daf471ed337dc5d07c036956ff2785255 100644 --- a/samples/client/petstore/swift5/readonlyProperties/docs/UserAPI.md +++ b/samples/client/petstore/swift5/readonlyProperties/docs/UserAPI.md @@ -23,7 +23,7 @@ Create user This can only be done by the logged in user. -### Example +### Example ```swift // The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new import PetstoreClient @@ -71,7 +71,7 @@ No authorization required Creates list of users with given input array -### Example +### Example ```swift // The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new import PetstoreClient @@ -119,7 +119,7 @@ No authorization required Creates list of users with given input array -### Example +### Example ```swift // The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new import PetstoreClient @@ -169,7 +169,7 @@ Delete user This can only be done by the logged in user. -### Example +### Example ```swift // The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new import PetstoreClient @@ -217,7 +217,7 @@ No authorization required Get user by user name -### Example +### Example ```swift // The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new import PetstoreClient @@ -265,7 +265,7 @@ No authorization required Logs user into the system -### Example +### Example ```swift // The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new import PetstoreClient @@ -315,7 +315,7 @@ No authorization required Logs out current logged in user session -### Example +### Example ```swift // The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new import PetstoreClient @@ -361,7 +361,7 @@ Updated user This can only be done by the logged in user. -### Example +### Example ```swift // The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new import PetstoreClient diff --git a/samples/client/petstore/swift5/readonlyProperties/git_push.sh b/samples/client/petstore/swift5/readonlyProperties/git_push.sh index ced3be2b0c7b2349ff06d18da19d4b31435c9fa6..9405f72e950cdb8ca24c3cf4d15cee7eac62fde7 100644 --- a/samples/client/petstore/swift5/readonlyProperties/git_push.sh +++ b/samples/client/petstore/swift5/readonlyProperties/git_push.sh @@ -55,4 +55,3 @@ 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/PetstoreClient/Classes/OpenAPIs/Extensions.swift b/samples/client/petstore/swift5/resultLibrary/PetstoreClient/Classes/OpenAPIs/Extensions.swift index e23035dde30ee6d11b591fd6b816eb212eb0450e..a4f0c7a3b3601c3289dda0fdf229b8109068aa91 100644 --- a/samples/client/petstore/swift5/resultLibrary/PetstoreClient/Classes/OpenAPIs/Extensions.swift +++ b/samples/client/petstore/swift5/resultLibrary/PetstoreClient/Classes/OpenAPIs/Extensions.swift @@ -185,4 +185,4 @@ extension HTTPURLResponse { var isStatusCodeSuccessful: Bool { return Array(200 ..< 300).contains(statusCode) } -} +} \ No newline at end of file diff --git a/samples/client/petstore/swift5/resultLibrary/docs/AnotherFakeAPI.md b/samples/client/petstore/swift5/resultLibrary/docs/AnotherFakeAPI.md index aead5f1f980fe641e09ff1a44a3c82c8f39c85e3..26346e81a4cb33233fcb57ee23aee08b14e6c3c4 100644 --- a/samples/client/petstore/swift5/resultLibrary/docs/AnotherFakeAPI.md +++ b/samples/client/petstore/swift5/resultLibrary/docs/AnotherFakeAPI.md @@ -16,7 +16,7 @@ To test special tags To test special tags and operation ID starting with number -### Example +### Example ```swift // The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new import PetstoreClient diff --git a/samples/client/petstore/swift5/resultLibrary/docs/FakeAPI.md b/samples/client/petstore/swift5/resultLibrary/docs/FakeAPI.md index 553a46281aa01cf593e8ef0fa0539ddc19f99511..f07991250846a1e6fe7f81ae88ec439c319174a5 100644 --- a/samples/client/petstore/swift5/resultLibrary/docs/FakeAPI.md +++ b/samples/client/petstore/swift5/resultLibrary/docs/FakeAPI.md @@ -27,7 +27,7 @@ Method | HTTP request | Description Test serialization of outer boolean types -### Example +### Example ```swift // The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new import PetstoreClient @@ -76,7 +76,7 @@ No authorization required Test serialization of object with outer number type -### Example +### Example ```swift // The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new import PetstoreClient @@ -125,7 +125,7 @@ No authorization required Test serialization of outer number types -### Example +### Example ```swift // The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new import PetstoreClient @@ -174,7 +174,7 @@ No authorization required Test serialization of outer string types -### Example +### Example ```swift // The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new import PetstoreClient @@ -223,7 +223,7 @@ No authorization required For this test, the body for this request much reference a schema named `File`. -### Example +### Example ```swift // The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new import PetstoreClient @@ -270,7 +270,7 @@ No authorization required -### Example +### Example ```swift // The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new import PetstoreClient @@ -321,7 +321,7 @@ To test \"client\" model To test \"client\" model -### Example +### Example ```swift // The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new import PetstoreClient @@ -371,7 +371,7 @@ Fake endpoint for testing various parameters å‡ç«¯é»ž å½ã®ã‚¨ãƒ³ãƒ‰ãƒã‚¤ Fake endpoint for testing various parameters å‡ç«¯é»ž å½ã®ã‚¨ãƒ³ãƒ‰ãƒã‚¤ãƒ³ãƒˆ 가짜 엔드 í¬ì¸íЏ -### Example +### Example ```swift // The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new import PetstoreClient @@ -447,7 +447,7 @@ To test enum parameters To test enum parameters -### Example +### Example ```swift // The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new import PetstoreClient @@ -511,7 +511,7 @@ Fake endpoint to test group parameters (optional) Fake endpoint to test group parameters (optional) -### Example +### Example ```swift // The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new import PetstoreClient @@ -569,7 +569,7 @@ No authorization required test inline additionalProperties -### Example +### Example ```swift // The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new import PetstoreClient @@ -617,7 +617,7 @@ No authorization required test json serialization of form data -### Example +### Example ```swift // The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new import PetstoreClient diff --git a/samples/client/petstore/swift5/resultLibrary/docs/FakeClassnameTags123API.md b/samples/client/petstore/swift5/resultLibrary/docs/FakeClassnameTags123API.md index 9f24b46edbc3a52a58c554db3ebdddf7c24692f9..5b9b66073fe0b2b3cb0083ccaafafa72b63bae3c 100644 --- a/samples/client/petstore/swift5/resultLibrary/docs/FakeClassnameTags123API.md +++ b/samples/client/petstore/swift5/resultLibrary/docs/FakeClassnameTags123API.md @@ -16,7 +16,7 @@ To test class name in snake case To test class name in snake case -### Example +### Example ```swift // The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new import PetstoreClient diff --git a/samples/client/petstore/swift5/resultLibrary/docs/PetAPI.md b/samples/client/petstore/swift5/resultLibrary/docs/PetAPI.md index 27efe08334762cbdec4a544ae7dad3d5e43eaeb5..5babbd06a3c08be466769ad385648598979a778a 100644 --- a/samples/client/petstore/swift5/resultLibrary/docs/PetAPI.md +++ b/samples/client/petstore/swift5/resultLibrary/docs/PetAPI.md @@ -22,7 +22,7 @@ Method | HTTP request | Description Add a new pet to the store -### Example +### Example ```swift // The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new import PetstoreClient @@ -70,7 +70,7 @@ Void (empty response body) Deletes a pet -### Example +### Example ```swift // The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new import PetstoreClient @@ -122,7 +122,7 @@ Finds Pets by status Multiple status values can be provided with comma separated strings -### Example +### Example ```swift // The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new import PetstoreClient @@ -172,7 +172,7 @@ Finds Pets by tags Multiple tags can be provided with comma separated strings. Use tag1, tag2, tag3 for testing. -### Example +### Example ```swift // The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new import PetstoreClient @@ -222,7 +222,7 @@ Find pet by ID Returns a single pet -### Example +### Example ```swift // The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new import PetstoreClient @@ -270,7 +270,7 @@ Name | Type | Description | Notes Update an existing pet -### Example +### Example ```swift // The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new import PetstoreClient @@ -318,7 +318,7 @@ Void (empty response body) Updates a pet in the store with form data -### Example +### Example ```swift // The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new import PetstoreClient @@ -370,7 +370,7 @@ Void (empty response body) uploads an image -### Example +### Example ```swift // The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new import PetstoreClient @@ -422,7 +422,7 @@ Name | Type | Description | Notes uploads an image (required) -### Example +### Example ```swift // The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new import PetstoreClient diff --git a/samples/client/petstore/swift5/resultLibrary/docs/StoreAPI.md b/samples/client/petstore/swift5/resultLibrary/docs/StoreAPI.md index 383dda5d3c71edfe059c03fea27d3c18d723bfac..b023aa9e45236ab37239ca482ea4a843ed60e7db 100644 --- a/samples/client/petstore/swift5/resultLibrary/docs/StoreAPI.md +++ b/samples/client/petstore/swift5/resultLibrary/docs/StoreAPI.md @@ -19,7 +19,7 @@ Delete purchase order by ID For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors -### Example +### Example ```swift // The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new import PetstoreClient @@ -69,7 +69,7 @@ Returns pet inventories by status Returns a map of status codes to quantities -### Example +### Example ```swift // The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new import PetstoreClient @@ -115,7 +115,7 @@ Find purchase order by ID For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions -### Example +### Example ```swift // The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new import PetstoreClient @@ -163,7 +163,7 @@ No authorization required Place an order for a pet -### Example +### Example ```swift // The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new import PetstoreClient diff --git a/samples/client/petstore/swift5/resultLibrary/docs/UserAPI.md b/samples/client/petstore/swift5/resultLibrary/docs/UserAPI.md index 380813bc68c02383e46b016c9e768915da8a4559..5fc9160daf471ed337dc5d07c036956ff2785255 100644 --- a/samples/client/petstore/swift5/resultLibrary/docs/UserAPI.md +++ b/samples/client/petstore/swift5/resultLibrary/docs/UserAPI.md @@ -23,7 +23,7 @@ Create user This can only be done by the logged in user. -### Example +### Example ```swift // The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new import PetstoreClient @@ -71,7 +71,7 @@ No authorization required Creates list of users with given input array -### Example +### Example ```swift // The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new import PetstoreClient @@ -119,7 +119,7 @@ No authorization required Creates list of users with given input array -### Example +### Example ```swift // The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new import PetstoreClient @@ -169,7 +169,7 @@ Delete user This can only be done by the logged in user. -### Example +### Example ```swift // The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new import PetstoreClient @@ -217,7 +217,7 @@ No authorization required Get user by user name -### Example +### Example ```swift // The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new import PetstoreClient @@ -265,7 +265,7 @@ No authorization required Logs user into the system -### Example +### Example ```swift // The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new import PetstoreClient @@ -315,7 +315,7 @@ No authorization required Logs out current logged in user session -### Example +### Example ```swift // The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new import PetstoreClient @@ -361,7 +361,7 @@ Updated user This can only be done by the logged in user. -### Example +### Example ```swift // The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new import PetstoreClient diff --git a/samples/client/petstore/swift5/resultLibrary/git_push.sh b/samples/client/petstore/swift5/resultLibrary/git_push.sh index ced3be2b0c7b2349ff06d18da19d4b31435c9fa6..9405f72e950cdb8ca24c3cf4d15cee7eac62fde7 100644 --- a/samples/client/petstore/swift5/resultLibrary/git_push.sh +++ b/samples/client/petstore/swift5/resultLibrary/git_push.sh @@ -55,4 +55,3 @@ 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/PetstoreClient/Classes/OpenAPIs/Extensions.swift b/samples/client/petstore/swift5/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/Extensions.swift index dc0913d093f8c61839eb3ed4ed411a828528f32c..a11a8925afdb7ec1a000b8824d2cccfc04745614 100644 --- a/samples/client/petstore/swift5/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/Extensions.swift +++ b/samples/client/petstore/swift5/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/Extensions.swift @@ -99,4 +99,4 @@ extension HTTPURLResponse { var isStatusCodeSuccessful: Bool { return Array(200 ..< 300).contains(statusCode) } -} +} \ No newline at end of file diff --git a/samples/client/petstore/swift5/rxswiftLibrary/docs/AnotherFakeAPI.md b/samples/client/petstore/swift5/rxswiftLibrary/docs/AnotherFakeAPI.md index dcd62507d964a2ee8ce47d396cf070af7b32883f..f15b1445427d59e7db290c71e0eeff76372d1aa7 100644 --- a/samples/client/petstore/swift5/rxswiftLibrary/docs/AnotherFakeAPI.md +++ b/samples/client/petstore/swift5/rxswiftLibrary/docs/AnotherFakeAPI.md @@ -16,7 +16,7 @@ To test special tags To test special tags and operation ID starting with number -### Example +### Example ```swift // The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new import PetstoreClient diff --git a/samples/client/petstore/swift5/rxswiftLibrary/docs/FakeAPI.md b/samples/client/petstore/swift5/rxswiftLibrary/docs/FakeAPI.md index 76acf726217a5202b0b58cde8265906753573921..aecb7880a3c0d13669630932ef35d8edbee32c69 100644 --- a/samples/client/petstore/swift5/rxswiftLibrary/docs/FakeAPI.md +++ b/samples/client/petstore/swift5/rxswiftLibrary/docs/FakeAPI.md @@ -27,7 +27,7 @@ Method | HTTP request | Description Test serialization of outer boolean types -### Example +### Example ```swift // The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new import PetstoreClient @@ -67,7 +67,7 @@ No authorization required Test serialization of object with outer number type -### Example +### Example ```swift // The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new import PetstoreClient @@ -107,7 +107,7 @@ No authorization required Test serialization of outer number types -### Example +### Example ```swift // The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new import PetstoreClient @@ -147,7 +147,7 @@ No authorization required Test serialization of outer string types -### Example +### Example ```swift // The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new import PetstoreClient @@ -187,7 +187,7 @@ No authorization required For this test, the body for this request much reference a schema named `File`. -### Example +### Example ```swift // The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new import PetstoreClient @@ -225,7 +225,7 @@ No authorization required -### Example +### Example ```swift // The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new import PetstoreClient @@ -267,7 +267,7 @@ To test \"client\" model To test \"client\" model -### Example +### Example ```swift // The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new import PetstoreClient @@ -307,7 +307,7 @@ Fake endpoint for testing various parameters å‡ç«¯é»ž å½ã®ã‚¨ãƒ³ãƒ‰ãƒã‚¤ Fake endpoint for testing various parameters å‡ç«¯é»ž å½ã®ã‚¨ãƒ³ãƒ‰ãƒã‚¤ãƒ³ãƒˆ 가짜 엔드 í¬ì¸íЏ -### Example +### Example ```swift // The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new import PetstoreClient @@ -373,7 +373,7 @@ To test enum parameters To test enum parameters -### Example +### Example ```swift // The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new import PetstoreClient @@ -427,7 +427,7 @@ Fake endpoint to test group parameters (optional) Fake endpoint to test group parameters (optional) -### Example +### Example ```swift // The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new import PetstoreClient @@ -475,7 +475,7 @@ No authorization required test inline additionalProperties -### Example +### Example ```swift // The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new import PetstoreClient @@ -513,7 +513,7 @@ No authorization required test json serialization of form data -### Example +### Example ```swift // The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new import PetstoreClient diff --git a/samples/client/petstore/swift5/rxswiftLibrary/docs/FakeClassnameTags123API.md b/samples/client/petstore/swift5/rxswiftLibrary/docs/FakeClassnameTags123API.md index 1b94500e7940af1f34e9d83440a143a805db8a96..2c9668be139a38e9851e96e7f01eca143e7bf260 100644 --- a/samples/client/petstore/swift5/rxswiftLibrary/docs/FakeClassnameTags123API.md +++ b/samples/client/petstore/swift5/rxswiftLibrary/docs/FakeClassnameTags123API.md @@ -16,7 +16,7 @@ To test class name in snake case To test class name in snake case -### Example +### Example ```swift // The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new import PetstoreClient diff --git a/samples/client/petstore/swift5/rxswiftLibrary/docs/PetAPI.md b/samples/client/petstore/swift5/rxswiftLibrary/docs/PetAPI.md index c0ec8a91fb4cea71aee9635fa1e1ecfcc82e146b..a87db33f46dca4e613331fabc06fd32256c50cf8 100644 --- a/samples/client/petstore/swift5/rxswiftLibrary/docs/PetAPI.md +++ b/samples/client/petstore/swift5/rxswiftLibrary/docs/PetAPI.md @@ -22,7 +22,7 @@ Method | HTTP request | Description Add a new pet to the store -### Example +### Example ```swift // The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new import PetstoreClient @@ -60,7 +60,7 @@ Void (empty response body) Deletes a pet -### Example +### Example ```swift // The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new import PetstoreClient @@ -102,7 +102,7 @@ Finds Pets by status Multiple status values can be provided with comma separated strings -### Example +### Example ```swift // The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new import PetstoreClient @@ -142,7 +142,7 @@ Finds Pets by tags Multiple tags can be provided with comma separated strings. Use tag1, tag2, tag3 for testing. -### Example +### Example ```swift // The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new import PetstoreClient @@ -182,7 +182,7 @@ Find pet by ID Returns a single pet -### Example +### Example ```swift // The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new import PetstoreClient @@ -220,7 +220,7 @@ Name | Type | Description | Notes Update an existing pet -### Example +### Example ```swift // The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new import PetstoreClient @@ -258,7 +258,7 @@ Void (empty response body) Updates a pet in the store with form data -### Example +### Example ```swift // The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new import PetstoreClient @@ -300,7 +300,7 @@ Void (empty response body) uploads an image -### Example +### Example ```swift // The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new import PetstoreClient @@ -342,7 +342,7 @@ Name | Type | Description | Notes uploads an image (required) -### Example +### Example ```swift // The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new import PetstoreClient diff --git a/samples/client/petstore/swift5/rxswiftLibrary/docs/StoreAPI.md b/samples/client/petstore/swift5/rxswiftLibrary/docs/StoreAPI.md index 456d08d952ac9aa18e4d11dff51b33ec322eba6c..8d795213c0f234a5c5f9d2eae61c791320a3afb2 100644 --- a/samples/client/petstore/swift5/rxswiftLibrary/docs/StoreAPI.md +++ b/samples/client/petstore/swift5/rxswiftLibrary/docs/StoreAPI.md @@ -19,7 +19,7 @@ Delete purchase order by ID For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors -### Example +### Example ```swift // The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new import PetstoreClient @@ -59,7 +59,7 @@ Returns pet inventories by status Returns a map of status codes to quantities -### Example +### Example ```swift // The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new import PetstoreClient @@ -95,7 +95,7 @@ Find purchase order by ID For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions -### Example +### Example ```swift // The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new import PetstoreClient @@ -133,7 +133,7 @@ No authorization required Place an order for a pet -### Example +### Example ```swift // The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new import PetstoreClient diff --git a/samples/client/petstore/swift5/rxswiftLibrary/docs/UserAPI.md b/samples/client/petstore/swift5/rxswiftLibrary/docs/UserAPI.md index a707c7085a37e4f8c3e5f31c87263966cefc681c..3abfe410f70a4d1764d3effb061af8900affcb43 100644 --- a/samples/client/petstore/swift5/rxswiftLibrary/docs/UserAPI.md +++ b/samples/client/petstore/swift5/rxswiftLibrary/docs/UserAPI.md @@ -23,7 +23,7 @@ Create user This can only be done by the logged in user. -### Example +### Example ```swift // The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new import PetstoreClient @@ -61,7 +61,7 @@ No authorization required Creates list of users with given input array -### Example +### Example ```swift // The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new import PetstoreClient @@ -99,7 +99,7 @@ No authorization required Creates list of users with given input array -### Example +### Example ```swift // The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new import PetstoreClient @@ -139,7 +139,7 @@ Delete user This can only be done by the logged in user. -### Example +### Example ```swift // The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new import PetstoreClient @@ -177,7 +177,7 @@ No authorization required Get user by user name -### Example +### Example ```swift // The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new import PetstoreClient @@ -215,7 +215,7 @@ No authorization required Logs user into the system -### Example +### Example ```swift // The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new import PetstoreClient @@ -255,7 +255,7 @@ No authorization required Logs out current logged in user session -### Example +### Example ```swift // The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new import PetstoreClient @@ -291,7 +291,7 @@ Updated user This can only be done by the logged in user. -### Example +### Example ```swift // The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new import PetstoreClient diff --git a/samples/client/petstore/swift5/rxswiftLibrary/git_push.sh b/samples/client/petstore/swift5/rxswiftLibrary/git_push.sh index ced3be2b0c7b2349ff06d18da19d4b31435c9fa6..9405f72e950cdb8ca24c3cf4d15cee7eac62fde7 100644 --- a/samples/client/petstore/swift5/rxswiftLibrary/git_push.sh +++ b/samples/client/petstore/swift5/rxswiftLibrary/git_push.sh @@ -55,4 +55,3 @@ 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/Sources/PetstoreClient/Extensions.swift b/samples/client/petstore/swift5/urlsessionLibrary/Sources/PetstoreClient/Extensions.swift index e23035dde30ee6d11b591fd6b816eb212eb0450e..a4f0c7a3b3601c3289dda0fdf229b8109068aa91 100644 --- a/samples/client/petstore/swift5/urlsessionLibrary/Sources/PetstoreClient/Extensions.swift +++ b/samples/client/petstore/swift5/urlsessionLibrary/Sources/PetstoreClient/Extensions.swift @@ -185,4 +185,4 @@ extension HTTPURLResponse { var isStatusCodeSuccessful: Bool { return Array(200 ..< 300).contains(statusCode) } -} +} \ No newline at end of file diff --git a/samples/client/petstore/swift5/urlsessionLibrary/docs/AnotherFakeAPI.md b/samples/client/petstore/swift5/urlsessionLibrary/docs/AnotherFakeAPI.md index aead5f1f980fe641e09ff1a44a3c82c8f39c85e3..26346e81a4cb33233fcb57ee23aee08b14e6c3c4 100644 --- a/samples/client/petstore/swift5/urlsessionLibrary/docs/AnotherFakeAPI.md +++ b/samples/client/petstore/swift5/urlsessionLibrary/docs/AnotherFakeAPI.md @@ -16,7 +16,7 @@ To test special tags To test special tags and operation ID starting with number -### Example +### Example ```swift // The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new import PetstoreClient diff --git a/samples/client/petstore/swift5/urlsessionLibrary/docs/FakeAPI.md b/samples/client/petstore/swift5/urlsessionLibrary/docs/FakeAPI.md index 553a46281aa01cf593e8ef0fa0539ddc19f99511..f07991250846a1e6fe7f81ae88ec439c319174a5 100644 --- a/samples/client/petstore/swift5/urlsessionLibrary/docs/FakeAPI.md +++ b/samples/client/petstore/swift5/urlsessionLibrary/docs/FakeAPI.md @@ -27,7 +27,7 @@ Method | HTTP request | Description Test serialization of outer boolean types -### Example +### Example ```swift // The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new import PetstoreClient @@ -76,7 +76,7 @@ No authorization required Test serialization of object with outer number type -### Example +### Example ```swift // The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new import PetstoreClient @@ -125,7 +125,7 @@ No authorization required Test serialization of outer number types -### Example +### Example ```swift // The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new import PetstoreClient @@ -174,7 +174,7 @@ No authorization required Test serialization of outer string types -### Example +### Example ```swift // The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new import PetstoreClient @@ -223,7 +223,7 @@ No authorization required For this test, the body for this request much reference a schema named `File`. -### Example +### Example ```swift // The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new import PetstoreClient @@ -270,7 +270,7 @@ No authorization required -### Example +### Example ```swift // The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new import PetstoreClient @@ -321,7 +321,7 @@ To test \"client\" model To test \"client\" model -### Example +### Example ```swift // The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new import PetstoreClient @@ -371,7 +371,7 @@ Fake endpoint for testing various parameters å‡ç«¯é»ž å½ã®ã‚¨ãƒ³ãƒ‰ãƒã‚¤ Fake endpoint for testing various parameters å‡ç«¯é»ž å½ã®ã‚¨ãƒ³ãƒ‰ãƒã‚¤ãƒ³ãƒˆ 가짜 엔드 í¬ì¸íЏ -### Example +### Example ```swift // The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new import PetstoreClient @@ -447,7 +447,7 @@ To test enum parameters To test enum parameters -### Example +### Example ```swift // The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new import PetstoreClient @@ -511,7 +511,7 @@ Fake endpoint to test group parameters (optional) Fake endpoint to test group parameters (optional) -### Example +### Example ```swift // The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new import PetstoreClient @@ -569,7 +569,7 @@ No authorization required test inline additionalProperties -### Example +### Example ```swift // The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new import PetstoreClient @@ -617,7 +617,7 @@ No authorization required test json serialization of form data -### Example +### Example ```swift // The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new import PetstoreClient diff --git a/samples/client/petstore/swift5/urlsessionLibrary/docs/FakeClassnameTags123API.md b/samples/client/petstore/swift5/urlsessionLibrary/docs/FakeClassnameTags123API.md index 9f24b46edbc3a52a58c554db3ebdddf7c24692f9..5b9b66073fe0b2b3cb0083ccaafafa72b63bae3c 100644 --- a/samples/client/petstore/swift5/urlsessionLibrary/docs/FakeClassnameTags123API.md +++ b/samples/client/petstore/swift5/urlsessionLibrary/docs/FakeClassnameTags123API.md @@ -16,7 +16,7 @@ To test class name in snake case To test class name in snake case -### Example +### Example ```swift // The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new import PetstoreClient diff --git a/samples/client/petstore/swift5/urlsessionLibrary/docs/PetAPI.md b/samples/client/petstore/swift5/urlsessionLibrary/docs/PetAPI.md index 27efe08334762cbdec4a544ae7dad3d5e43eaeb5..5babbd06a3c08be466769ad385648598979a778a 100644 --- a/samples/client/petstore/swift5/urlsessionLibrary/docs/PetAPI.md +++ b/samples/client/petstore/swift5/urlsessionLibrary/docs/PetAPI.md @@ -22,7 +22,7 @@ Method | HTTP request | Description Add a new pet to the store -### Example +### Example ```swift // The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new import PetstoreClient @@ -70,7 +70,7 @@ Void (empty response body) Deletes a pet -### Example +### Example ```swift // The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new import PetstoreClient @@ -122,7 +122,7 @@ Finds Pets by status Multiple status values can be provided with comma separated strings -### Example +### Example ```swift // The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new import PetstoreClient @@ -172,7 +172,7 @@ Finds Pets by tags Multiple tags can be provided with comma separated strings. Use tag1, tag2, tag3 for testing. -### Example +### Example ```swift // The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new import PetstoreClient @@ -222,7 +222,7 @@ Find pet by ID Returns a single pet -### Example +### Example ```swift // The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new import PetstoreClient @@ -270,7 +270,7 @@ Name | Type | Description | Notes Update an existing pet -### Example +### Example ```swift // The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new import PetstoreClient @@ -318,7 +318,7 @@ Void (empty response body) Updates a pet in the store with form data -### Example +### Example ```swift // The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new import PetstoreClient @@ -370,7 +370,7 @@ Void (empty response body) uploads an image -### Example +### Example ```swift // The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new import PetstoreClient @@ -422,7 +422,7 @@ Name | Type | Description | Notes uploads an image (required) -### Example +### Example ```swift // The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new import PetstoreClient diff --git a/samples/client/petstore/swift5/urlsessionLibrary/docs/StoreAPI.md b/samples/client/petstore/swift5/urlsessionLibrary/docs/StoreAPI.md index 383dda5d3c71edfe059c03fea27d3c18d723bfac..b023aa9e45236ab37239ca482ea4a843ed60e7db 100644 --- a/samples/client/petstore/swift5/urlsessionLibrary/docs/StoreAPI.md +++ b/samples/client/petstore/swift5/urlsessionLibrary/docs/StoreAPI.md @@ -19,7 +19,7 @@ Delete purchase order by ID For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors -### Example +### Example ```swift // The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new import PetstoreClient @@ -69,7 +69,7 @@ Returns pet inventories by status Returns a map of status codes to quantities -### Example +### Example ```swift // The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new import PetstoreClient @@ -115,7 +115,7 @@ Find purchase order by ID For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions -### Example +### Example ```swift // The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new import PetstoreClient @@ -163,7 +163,7 @@ No authorization required Place an order for a pet -### Example +### Example ```swift // The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new import PetstoreClient diff --git a/samples/client/petstore/swift5/urlsessionLibrary/docs/UserAPI.md b/samples/client/petstore/swift5/urlsessionLibrary/docs/UserAPI.md index 380813bc68c02383e46b016c9e768915da8a4559..5fc9160daf471ed337dc5d07c036956ff2785255 100644 --- a/samples/client/petstore/swift5/urlsessionLibrary/docs/UserAPI.md +++ b/samples/client/petstore/swift5/urlsessionLibrary/docs/UserAPI.md @@ -23,7 +23,7 @@ Create user This can only be done by the logged in user. -### Example +### Example ```swift // The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new import PetstoreClient @@ -71,7 +71,7 @@ No authorization required Creates list of users with given input array -### Example +### Example ```swift // The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new import PetstoreClient @@ -119,7 +119,7 @@ No authorization required Creates list of users with given input array -### Example +### Example ```swift // The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new import PetstoreClient @@ -169,7 +169,7 @@ Delete user This can only be done by the logged in user. -### Example +### Example ```swift // The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new import PetstoreClient @@ -217,7 +217,7 @@ No authorization required Get user by user name -### Example +### Example ```swift // The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new import PetstoreClient @@ -265,7 +265,7 @@ No authorization required Logs user into the system -### Example +### Example ```swift // The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new import PetstoreClient @@ -315,7 +315,7 @@ No authorization required Logs out current logged in user session -### Example +### Example ```swift // The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new import PetstoreClient @@ -361,7 +361,7 @@ Updated user This can only be done by the logged in user. -### Example +### Example ```swift // The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new import PetstoreClient diff --git a/samples/client/petstore/swift5/urlsessionLibrary/git_push.sh b/samples/client/petstore/swift5/urlsessionLibrary/git_push.sh index ced3be2b0c7b2349ff06d18da19d4b31435c9fa6..9405f72e950cdb8ca24c3cf4d15cee7eac62fde7 100644 --- a/samples/client/petstore/swift5/urlsessionLibrary/git_push.sh +++ b/samples/client/petstore/swift5/urlsessionLibrary/git_push.sh @@ -55,4 +55,3 @@ 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/vaporLibrary/Sources/PetstoreClient/Extensions.swift b/samples/client/petstore/swift5/vaporLibrary/Sources/PetstoreClient/Extensions.swift index b212303ae1d2890ba348286b1092c908f55db7dc..85e9a859c3b61f286fe99366e8167abd22afbb55 100644 --- a/samples/client/petstore/swift5/vaporLibrary/Sources/PetstoreClient/Extensions.swift +++ b/samples/client/petstore/swift5/vaporLibrary/Sources/PetstoreClient/Extensions.swift @@ -128,4 +128,3 @@ extension Set: RequestDecodable where Element: Content { extension Set: Content where Element: Content { } extension AnyCodable: Content {} - diff --git a/samples/client/petstore/swift5/vaporLibrary/docs/AnotherFakeAPI.md b/samples/client/petstore/swift5/vaporLibrary/docs/AnotherFakeAPI.md index 1e71f1db8719bd7490558950094438eaec0797eb..4eb46a0745aa2d50a473532548cd5b27c19e2f10 100644 --- a/samples/client/petstore/swift5/vaporLibrary/docs/AnotherFakeAPI.md +++ b/samples/client/petstore/swift5/vaporLibrary/docs/AnotherFakeAPI.md @@ -16,7 +16,7 @@ To test special tags To test special tags and operation ID starting with number -### Example +### Example ```swift // The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new import PetstoreClient diff --git a/samples/client/petstore/swift5/vaporLibrary/docs/FakeAPI.md b/samples/client/petstore/swift5/vaporLibrary/docs/FakeAPI.md index 1883af3085cad27bb3f7a589b1f8dc1f5fcea964..82b999d9d761fb7ca602ed814bf182ccb021251f 100644 --- a/samples/client/petstore/swift5/vaporLibrary/docs/FakeAPI.md +++ b/samples/client/petstore/swift5/vaporLibrary/docs/FakeAPI.md @@ -29,7 +29,7 @@ creates an XmlItem this route creates an XmlItem -### Example +### Example ```swift // The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new import PetstoreClient @@ -88,7 +88,7 @@ No authorization required Test serialization of outer boolean types -### Example +### Example ```swift // The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new import PetstoreClient @@ -146,7 +146,7 @@ No authorization required Test serialization of object with outer number type -### Example +### Example ```swift // The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new import PetstoreClient @@ -204,7 +204,7 @@ No authorization required Test serialization of outer number types -### Example +### Example ```swift // The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new import PetstoreClient @@ -262,7 +262,7 @@ No authorization required Test serialization of outer string types -### Example +### Example ```swift // The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new import PetstoreClient @@ -320,7 +320,7 @@ No authorization required For this test, the body for this request much reference a schema named `File`. -### Example +### Example ```swift // The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new import PetstoreClient @@ -376,7 +376,7 @@ No authorization required -### Example +### Example ```swift // The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new import PetstoreClient @@ -436,7 +436,7 @@ To test \"client\" model To test \"client\" model -### Example +### Example ```swift // The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new import PetstoreClient @@ -495,7 +495,7 @@ Fake endpoint for testing various parameters å‡ç«¯é»ž å½ã®ã‚¨ãƒ³ãƒ‰ãƒã‚¤ Fake endpoint for testing various parameters å‡ç«¯é»ž å½ã®ã‚¨ãƒ³ãƒ‰ãƒã‚¤ãƒ³ãƒˆ 가짜 엔드 í¬ì¸íЏ -### Example +### Example ```swift // The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new import PetstoreClient @@ -582,7 +582,7 @@ To test enum parameters To test enum parameters -### Example +### Example ```swift // The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new import PetstoreClient @@ -657,7 +657,7 @@ Fake endpoint to test group parameters (optional) Fake endpoint to test group parameters (optional) -### Example +### Example ```swift // The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new import PetstoreClient @@ -724,7 +724,7 @@ No authorization required test inline additionalProperties -### Example +### Example ```swift // The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new import PetstoreClient @@ -781,7 +781,7 @@ No authorization required test json serialization of form data -### Example +### Example ```swift // The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new import PetstoreClient @@ -842,7 +842,7 @@ No authorization required To test the collection format in query parameters -### Example +### Example ```swift // The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new import PetstoreClient diff --git a/samples/client/petstore/swift5/vaporLibrary/docs/FakeClassnameTags123API.md b/samples/client/petstore/swift5/vaporLibrary/docs/FakeClassnameTags123API.md index 1aebe78f145caa8ec7ed1b06056a3810867a6e60..a914d27659e39e9d9fb917cc56950f546029deec 100644 --- a/samples/client/petstore/swift5/vaporLibrary/docs/FakeClassnameTags123API.md +++ b/samples/client/petstore/swift5/vaporLibrary/docs/FakeClassnameTags123API.md @@ -16,7 +16,7 @@ To test class name in snake case To test class name in snake case -### Example +### Example ```swift // The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new import PetstoreClient diff --git a/samples/client/petstore/swift5/vaporLibrary/docs/PetAPI.md b/samples/client/petstore/swift5/vaporLibrary/docs/PetAPI.md index 88f6a37703806e221a191953b196bb0c868d4b37..296c48cb4c494ee5fca985f8734d2c3505aab6e5 100644 --- a/samples/client/petstore/swift5/vaporLibrary/docs/PetAPI.md +++ b/samples/client/petstore/swift5/vaporLibrary/docs/PetAPI.md @@ -22,7 +22,7 @@ Method | HTTP request | Description Add a new pet to the store -### Example +### Example ```swift // The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new import PetstoreClient @@ -81,7 +81,7 @@ public enum AddPet { Deletes a pet -### Example +### Example ```swift // The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new import PetstoreClient @@ -144,7 +144,7 @@ Finds Pets by status Multiple status values can be provided with comma separated strings -### Example +### Example ```swift // The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new import PetstoreClient @@ -205,7 +205,7 @@ Finds Pets by tags Multiple tags can be provided with comma separated strings. Use tag1, tag2, tag3 for testing. -### Example +### Example ```swift // The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new import PetstoreClient @@ -266,7 +266,7 @@ Find pet by ID Returns a single pet -### Example +### Example ```swift // The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new import PetstoreClient @@ -327,7 +327,7 @@ public enum GetPetById { Update an existing pet -### Example +### Example ```swift // The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new import PetstoreClient @@ -390,7 +390,7 @@ public enum UpdatePet { Updates a pet in the store with form data -### Example +### Example ```swift // The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new import PetstoreClient @@ -451,7 +451,7 @@ public enum UpdatePetWithForm { uploads an image -### Example +### Example ```swift // The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new import PetstoreClient @@ -512,7 +512,7 @@ public enum UploadFile { uploads an image (required) -### Example +### Example ```swift // The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new import PetstoreClient diff --git a/samples/client/petstore/swift5/vaporLibrary/docs/StoreAPI.md b/samples/client/petstore/swift5/vaporLibrary/docs/StoreAPI.md index d5d5e28833ff6e56932c93e74b311a938a1ac967..8358219d798e4aa280fb9b4cbebdd278ff7d6bb1 100644 --- a/samples/client/petstore/swift5/vaporLibrary/docs/StoreAPI.md +++ b/samples/client/petstore/swift5/vaporLibrary/docs/StoreAPI.md @@ -19,7 +19,7 @@ Delete purchase order by ID For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors -### Example +### Example ```swift // The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new import PetstoreClient @@ -80,7 +80,7 @@ Returns pet inventories by status Returns a map of status codes to quantities -### Example +### Example ```swift // The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new import PetstoreClient @@ -135,7 +135,7 @@ Find purchase order by ID For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions -### Example +### Example ```swift // The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new import PetstoreClient @@ -196,7 +196,7 @@ No authorization required Place an order for a pet -### Example +### Example ```swift // The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new import PetstoreClient diff --git a/samples/client/petstore/swift5/vaporLibrary/docs/UserAPI.md b/samples/client/petstore/swift5/vaporLibrary/docs/UserAPI.md index 1d6e94e04315fc402678766a0b1456209050637e..4c069a00b8b299da4f08f505d28c5d4f3ed8f423 100644 --- a/samples/client/petstore/swift5/vaporLibrary/docs/UserAPI.md +++ b/samples/client/petstore/swift5/vaporLibrary/docs/UserAPI.md @@ -23,7 +23,7 @@ Create user This can only be done by the logged in user. -### Example +### Example ```swift // The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new import PetstoreClient @@ -78,7 +78,7 @@ No authorization required Creates list of users with given input array -### Example +### Example ```swift // The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new import PetstoreClient @@ -133,7 +133,7 @@ No authorization required Creates list of users with given input array -### Example +### Example ```swift // The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new import PetstoreClient @@ -190,7 +190,7 @@ Delete user This can only be done by the logged in user. -### Example +### Example ```swift // The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new import PetstoreClient @@ -249,7 +249,7 @@ No authorization required Get user by user name -### Example +### Example ```swift // The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new import PetstoreClient @@ -310,7 +310,7 @@ No authorization required Logs user into the system -### Example +### Example ```swift // The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new import PetstoreClient @@ -371,7 +371,7 @@ No authorization required Logs out current logged in user session -### Example +### Example ```swift // The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new import PetstoreClient @@ -424,7 +424,7 @@ Updated user This can only be done by the logged in user. -### Example +### Example ```swift // The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new import PetstoreClient diff --git a/samples/client/petstore/swift5/x-swift-hashable/PetstoreClient/Classes/OpenAPIs/Extensions.swift b/samples/client/petstore/swift5/x-swift-hashable/PetstoreClient/Classes/OpenAPIs/Extensions.swift index e23035dde30ee6d11b591fd6b816eb212eb0450e..a4f0c7a3b3601c3289dda0fdf229b8109068aa91 100644 --- a/samples/client/petstore/swift5/x-swift-hashable/PetstoreClient/Classes/OpenAPIs/Extensions.swift +++ b/samples/client/petstore/swift5/x-swift-hashable/PetstoreClient/Classes/OpenAPIs/Extensions.swift @@ -185,4 +185,4 @@ extension HTTPURLResponse { var isStatusCodeSuccessful: Bool { return Array(200 ..< 300).contains(statusCode) } -} +} \ No newline at end of file diff --git a/samples/client/petstore/swift5/x-swift-hashable/docs/AnotherFakeAPI.md b/samples/client/petstore/swift5/x-swift-hashable/docs/AnotherFakeAPI.md index aead5f1f980fe641e09ff1a44a3c82c8f39c85e3..26346e81a4cb33233fcb57ee23aee08b14e6c3c4 100644 --- a/samples/client/petstore/swift5/x-swift-hashable/docs/AnotherFakeAPI.md +++ b/samples/client/petstore/swift5/x-swift-hashable/docs/AnotherFakeAPI.md @@ -16,7 +16,7 @@ To test special tags To test special tags and operation ID starting with number -### Example +### Example ```swift // The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new import PetstoreClient diff --git a/samples/client/petstore/swift5/x-swift-hashable/docs/FakeAPI.md b/samples/client/petstore/swift5/x-swift-hashable/docs/FakeAPI.md index 553a46281aa01cf593e8ef0fa0539ddc19f99511..f07991250846a1e6fe7f81ae88ec439c319174a5 100644 --- a/samples/client/petstore/swift5/x-swift-hashable/docs/FakeAPI.md +++ b/samples/client/petstore/swift5/x-swift-hashable/docs/FakeAPI.md @@ -27,7 +27,7 @@ Method | HTTP request | Description Test serialization of outer boolean types -### Example +### Example ```swift // The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new import PetstoreClient @@ -76,7 +76,7 @@ No authorization required Test serialization of object with outer number type -### Example +### Example ```swift // The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new import PetstoreClient @@ -125,7 +125,7 @@ No authorization required Test serialization of outer number types -### Example +### Example ```swift // The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new import PetstoreClient @@ -174,7 +174,7 @@ No authorization required Test serialization of outer string types -### Example +### Example ```swift // The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new import PetstoreClient @@ -223,7 +223,7 @@ No authorization required For this test, the body for this request much reference a schema named `File`. -### Example +### Example ```swift // The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new import PetstoreClient @@ -270,7 +270,7 @@ No authorization required -### Example +### Example ```swift // The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new import PetstoreClient @@ -321,7 +321,7 @@ To test \"client\" model To test \"client\" model -### Example +### Example ```swift // The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new import PetstoreClient @@ -371,7 +371,7 @@ Fake endpoint for testing various parameters å‡ç«¯é»ž å½ã®ã‚¨ãƒ³ãƒ‰ãƒã‚¤ Fake endpoint for testing various parameters å‡ç«¯é»ž å½ã®ã‚¨ãƒ³ãƒ‰ãƒã‚¤ãƒ³ãƒˆ 가짜 엔드 í¬ì¸íЏ -### Example +### Example ```swift // The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new import PetstoreClient @@ -447,7 +447,7 @@ To test enum parameters To test enum parameters -### Example +### Example ```swift // The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new import PetstoreClient @@ -511,7 +511,7 @@ Fake endpoint to test group parameters (optional) Fake endpoint to test group parameters (optional) -### Example +### Example ```swift // The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new import PetstoreClient @@ -569,7 +569,7 @@ No authorization required test inline additionalProperties -### Example +### Example ```swift // The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new import PetstoreClient @@ -617,7 +617,7 @@ No authorization required test json serialization of form data -### Example +### Example ```swift // The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new import PetstoreClient diff --git a/samples/client/petstore/swift5/x-swift-hashable/docs/FakeClassnameTags123API.md b/samples/client/petstore/swift5/x-swift-hashable/docs/FakeClassnameTags123API.md index 9f24b46edbc3a52a58c554db3ebdddf7c24692f9..5b9b66073fe0b2b3cb0083ccaafafa72b63bae3c 100644 --- a/samples/client/petstore/swift5/x-swift-hashable/docs/FakeClassnameTags123API.md +++ b/samples/client/petstore/swift5/x-swift-hashable/docs/FakeClassnameTags123API.md @@ -16,7 +16,7 @@ To test class name in snake case To test class name in snake case -### Example +### Example ```swift // The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new import PetstoreClient diff --git a/samples/client/petstore/swift5/x-swift-hashable/docs/PetAPI.md b/samples/client/petstore/swift5/x-swift-hashable/docs/PetAPI.md index 27efe08334762cbdec4a544ae7dad3d5e43eaeb5..5babbd06a3c08be466769ad385648598979a778a 100644 --- a/samples/client/petstore/swift5/x-swift-hashable/docs/PetAPI.md +++ b/samples/client/petstore/swift5/x-swift-hashable/docs/PetAPI.md @@ -22,7 +22,7 @@ Method | HTTP request | Description Add a new pet to the store -### Example +### Example ```swift // The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new import PetstoreClient @@ -70,7 +70,7 @@ Void (empty response body) Deletes a pet -### Example +### Example ```swift // The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new import PetstoreClient @@ -122,7 +122,7 @@ Finds Pets by status Multiple status values can be provided with comma separated strings -### Example +### Example ```swift // The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new import PetstoreClient @@ -172,7 +172,7 @@ Finds Pets by tags Multiple tags can be provided with comma separated strings. Use tag1, tag2, tag3 for testing. -### Example +### Example ```swift // The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new import PetstoreClient @@ -222,7 +222,7 @@ Find pet by ID Returns a single pet -### Example +### Example ```swift // The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new import PetstoreClient @@ -270,7 +270,7 @@ Name | Type | Description | Notes Update an existing pet -### Example +### Example ```swift // The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new import PetstoreClient @@ -318,7 +318,7 @@ Void (empty response body) Updates a pet in the store with form data -### Example +### Example ```swift // The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new import PetstoreClient @@ -370,7 +370,7 @@ Void (empty response body) uploads an image -### Example +### Example ```swift // The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new import PetstoreClient @@ -422,7 +422,7 @@ Name | Type | Description | Notes uploads an image (required) -### Example +### Example ```swift // The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new import PetstoreClient diff --git a/samples/client/petstore/swift5/x-swift-hashable/docs/StoreAPI.md b/samples/client/petstore/swift5/x-swift-hashable/docs/StoreAPI.md index 383dda5d3c71edfe059c03fea27d3c18d723bfac..b023aa9e45236ab37239ca482ea4a843ed60e7db 100644 --- a/samples/client/petstore/swift5/x-swift-hashable/docs/StoreAPI.md +++ b/samples/client/petstore/swift5/x-swift-hashable/docs/StoreAPI.md @@ -19,7 +19,7 @@ Delete purchase order by ID For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors -### Example +### Example ```swift // The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new import PetstoreClient @@ -69,7 +69,7 @@ Returns pet inventories by status Returns a map of status codes to quantities -### Example +### Example ```swift // The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new import PetstoreClient @@ -115,7 +115,7 @@ Find purchase order by ID For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions -### Example +### Example ```swift // The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new import PetstoreClient @@ -163,7 +163,7 @@ No authorization required Place an order for a pet -### Example +### Example ```swift // The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new import PetstoreClient diff --git a/samples/client/petstore/swift5/x-swift-hashable/docs/UserAPI.md b/samples/client/petstore/swift5/x-swift-hashable/docs/UserAPI.md index 380813bc68c02383e46b016c9e768915da8a4559..5fc9160daf471ed337dc5d07c036956ff2785255 100644 --- a/samples/client/petstore/swift5/x-swift-hashable/docs/UserAPI.md +++ b/samples/client/petstore/swift5/x-swift-hashable/docs/UserAPI.md @@ -23,7 +23,7 @@ Create user This can only be done by the logged in user. -### Example +### Example ```swift // The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new import PetstoreClient @@ -71,7 +71,7 @@ No authorization required Creates list of users with given input array -### Example +### Example ```swift // The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new import PetstoreClient @@ -119,7 +119,7 @@ No authorization required Creates list of users with given input array -### Example +### Example ```swift // The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new import PetstoreClient @@ -169,7 +169,7 @@ Delete user This can only be done by the logged in user. -### Example +### Example ```swift // The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new import PetstoreClient @@ -217,7 +217,7 @@ No authorization required Get user by user name -### Example +### Example ```swift // The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new import PetstoreClient @@ -265,7 +265,7 @@ No authorization required Logs user into the system -### Example +### Example ```swift // The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new import PetstoreClient @@ -315,7 +315,7 @@ No authorization required Logs out current logged in user session -### Example +### Example ```swift // The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new import PetstoreClient @@ -361,7 +361,7 @@ Updated user This can only be done by the logged in user. -### Example +### Example ```swift // The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new import PetstoreClient diff --git a/samples/client/petstore/swift5/x-swift-hashable/git_push.sh b/samples/client/petstore/swift5/x-swift-hashable/git_push.sh index ced3be2b0c7b2349ff06d18da19d4b31435c9fa6..9405f72e950cdb8ca24c3cf4d15cee7eac62fde7 100644 --- a/samples/client/petstore/swift5/x-swift-hashable/git_push.sh +++ b/samples/client/petstore/swift5/x-swift-hashable/git_push.sh @@ -55,4 +55,3 @@ 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/typescript-angular-v10-provided-in-root/builds/default/README.md b/samples/client/petstore/typescript-angular-v10-provided-in-root/builds/default/README.md index f16604dcfff1a161cc41ecea7c996856870199ab..f2e5a1c1ee2d0a75ed23142ed3e0e83ed4cfaf45 100644 --- a/samples/client/petstore/typescript-angular-v10-provided-in-root/builds/default/README.md +++ b/samples/client/petstore/typescript-angular-v10-provided-in-root/builds/default/README.md @@ -152,7 +152,7 @@ export class AppModule { ### Set service base path -If different than the generated base path, during app bootstrap, you can provide the base path to your service. +If different than the generated base path, during app bootstrap, you can provide the base path to your service. ``` import { BASE_PATH } from ''; @@ -200,4 +200,4 @@ import { environment } from '../environments/environment'; bootstrap: [ AppComponent ] }) export class AppModule { } -``` +``` diff --git a/samples/client/petstore/typescript-angular-v10-provided-in-root/builds/default/git_push.sh b/samples/client/petstore/typescript-angular-v10-provided-in-root/builds/default/git_push.sh index ced3be2b0c7b2349ff06d18da19d4b31435c9fa6..9405f72e950cdb8ca24c3cf4d15cee7eac62fde7 100644 --- a/samples/client/petstore/typescript-angular-v10-provided-in-root/builds/default/git_push.sh +++ b/samples/client/petstore/typescript-angular-v10-provided-in-root/builds/default/git_push.sh @@ -55,4 +55,3 @@ 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/typescript-angular-v10-provided-in-root/builds/with-npm/README.md b/samples/client/petstore/typescript-angular-v10-provided-in-root/builds/with-npm/README.md index 33aa0a2c9cef6c7ff0b34cac88094c45301c3460..000c51d694b6daf9ed30ce4654460f6515fca8d5 100644 --- a/samples/client/petstore/typescript-angular-v10-provided-in-root/builds/with-npm/README.md +++ b/samples/client/petstore/typescript-angular-v10-provided-in-root/builds/with-npm/README.md @@ -152,7 +152,7 @@ export class AppModule { ### Set service base path -If different than the generated base path, during app bootstrap, you can provide the base path to your service. +If different than the generated base path, during app bootstrap, you can provide the base path to your service. ``` import { BASE_PATH } from '@openapitools/typescript-angular-petstore'; @@ -200,4 +200,4 @@ import { environment } from '../environments/environment'; bootstrap: [ AppComponent ] }) export class AppModule { } -``` +``` diff --git a/samples/client/petstore/typescript-angular-v10-provided-in-root/builds/with-npm/git_push.sh b/samples/client/petstore/typescript-angular-v10-provided-in-root/builds/with-npm/git_push.sh index ced3be2b0c7b2349ff06d18da19d4b31435c9fa6..9405f72e950cdb8ca24c3cf4d15cee7eac62fde7 100644 --- a/samples/client/petstore/typescript-angular-v10-provided-in-root/builds/with-npm/git_push.sh +++ b/samples/client/petstore/typescript-angular-v10-provided-in-root/builds/with-npm/git_push.sh @@ -55,4 +55,3 @@ 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/typescript-angular-v11-oneOf/builds/default/README.md b/samples/client/petstore/typescript-angular-v11-oneOf/builds/default/README.md index f16604dcfff1a161cc41ecea7c996856870199ab..f2e5a1c1ee2d0a75ed23142ed3e0e83ed4cfaf45 100644 --- a/samples/client/petstore/typescript-angular-v11-oneOf/builds/default/README.md +++ b/samples/client/petstore/typescript-angular-v11-oneOf/builds/default/README.md @@ -152,7 +152,7 @@ export class AppModule { ### Set service base path -If different than the generated base path, during app bootstrap, you can provide the base path to your service. +If different than the generated base path, during app bootstrap, you can provide the base path to your service. ``` import { BASE_PATH } from ''; @@ -200,4 +200,4 @@ import { environment } from '../environments/environment'; bootstrap: [ AppComponent ] }) export class AppModule { } -``` +``` diff --git a/samples/client/petstore/typescript-angular-v11-oneOf/builds/default/git_push.sh b/samples/client/petstore/typescript-angular-v11-oneOf/builds/default/git_push.sh index ced3be2b0c7b2349ff06d18da19d4b31435c9fa6..9405f72e950cdb8ca24c3cf4d15cee7eac62fde7 100644 --- a/samples/client/petstore/typescript-angular-v11-oneOf/builds/default/git_push.sh +++ b/samples/client/petstore/typescript-angular-v11-oneOf/builds/default/git_push.sh @@ -55,4 +55,3 @@ 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/typescript-angular-v11-provided-in-root/builds/default/README.md b/samples/client/petstore/typescript-angular-v11-provided-in-root/builds/default/README.md index f16604dcfff1a161cc41ecea7c996856870199ab..f2e5a1c1ee2d0a75ed23142ed3e0e83ed4cfaf45 100644 --- a/samples/client/petstore/typescript-angular-v11-provided-in-root/builds/default/README.md +++ b/samples/client/petstore/typescript-angular-v11-provided-in-root/builds/default/README.md @@ -152,7 +152,7 @@ export class AppModule { ### Set service base path -If different than the generated base path, during app bootstrap, you can provide the base path to your service. +If different than the generated base path, during app bootstrap, you can provide the base path to your service. ``` import { BASE_PATH } from ''; @@ -200,4 +200,4 @@ import { environment } from '../environments/environment'; bootstrap: [ AppComponent ] }) export class AppModule { } -``` +``` diff --git a/samples/client/petstore/typescript-angular-v11-provided-in-root/builds/default/git_push.sh b/samples/client/petstore/typescript-angular-v11-provided-in-root/builds/default/git_push.sh index ced3be2b0c7b2349ff06d18da19d4b31435c9fa6..9405f72e950cdb8ca24c3cf4d15cee7eac62fde7 100644 --- a/samples/client/petstore/typescript-angular-v11-provided-in-root/builds/default/git_push.sh +++ b/samples/client/petstore/typescript-angular-v11-provided-in-root/builds/default/git_push.sh @@ -55,4 +55,3 @@ 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/typescript-angular-v11-provided-in-root/builds/with-npm/README.md b/samples/client/petstore/typescript-angular-v11-provided-in-root/builds/with-npm/README.md index 33aa0a2c9cef6c7ff0b34cac88094c45301c3460..000c51d694b6daf9ed30ce4654460f6515fca8d5 100644 --- a/samples/client/petstore/typescript-angular-v11-provided-in-root/builds/with-npm/README.md +++ b/samples/client/petstore/typescript-angular-v11-provided-in-root/builds/with-npm/README.md @@ -152,7 +152,7 @@ export class AppModule { ### Set service base path -If different than the generated base path, during app bootstrap, you can provide the base path to your service. +If different than the generated base path, during app bootstrap, you can provide the base path to your service. ``` import { BASE_PATH } from '@openapitools/typescript-angular-petstore'; @@ -200,4 +200,4 @@ import { environment } from '../environments/environment'; bootstrap: [ AppComponent ] }) export class AppModule { } -``` +``` diff --git a/samples/client/petstore/typescript-angular-v11-provided-in-root/builds/with-npm/git_push.sh b/samples/client/petstore/typescript-angular-v11-provided-in-root/builds/with-npm/git_push.sh index ced3be2b0c7b2349ff06d18da19d4b31435c9fa6..9405f72e950cdb8ca24c3cf4d15cee7eac62fde7 100644 --- a/samples/client/petstore/typescript-angular-v11-provided-in-root/builds/with-npm/git_push.sh +++ b/samples/client/petstore/typescript-angular-v11-provided-in-root/builds/with-npm/git_push.sh @@ -55,4 +55,3 @@ 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/typescript-angular-v6-not-provided-in-root/builds/default/README.md b/samples/client/petstore/typescript-angular-v6-not-provided-in-root/builds/default/README.md index f16604dcfff1a161cc41ecea7c996856870199ab..f2e5a1c1ee2d0a75ed23142ed3e0e83ed4cfaf45 100644 --- a/samples/client/petstore/typescript-angular-v6-not-provided-in-root/builds/default/README.md +++ b/samples/client/petstore/typescript-angular-v6-not-provided-in-root/builds/default/README.md @@ -152,7 +152,7 @@ export class AppModule { ### Set service base path -If different than the generated base path, during app bootstrap, you can provide the base path to your service. +If different than the generated base path, during app bootstrap, you can provide the base path to your service. ``` import { BASE_PATH } from ''; @@ -200,4 +200,4 @@ import { environment } from '../environments/environment'; bootstrap: [ AppComponent ] }) export class AppModule { } -``` +``` diff --git a/samples/client/petstore/typescript-angular-v6-not-provided-in-root/builds/default/git_push.sh b/samples/client/petstore/typescript-angular-v6-not-provided-in-root/builds/default/git_push.sh index ced3be2b0c7b2349ff06d18da19d4b31435c9fa6..9405f72e950cdb8ca24c3cf4d15cee7eac62fde7 100644 --- a/samples/client/petstore/typescript-angular-v6-not-provided-in-root/builds/default/git_push.sh +++ b/samples/client/petstore/typescript-angular-v6-not-provided-in-root/builds/default/git_push.sh @@ -55,4 +55,3 @@ 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/typescript-angular-v6-not-provided-in-root/builds/with-npm/README.md b/samples/client/petstore/typescript-angular-v6-not-provided-in-root/builds/with-npm/README.md index 33aa0a2c9cef6c7ff0b34cac88094c45301c3460..000c51d694b6daf9ed30ce4654460f6515fca8d5 100644 --- a/samples/client/petstore/typescript-angular-v6-not-provided-in-root/builds/with-npm/README.md +++ b/samples/client/petstore/typescript-angular-v6-not-provided-in-root/builds/with-npm/README.md @@ -152,7 +152,7 @@ export class AppModule { ### Set service base path -If different than the generated base path, during app bootstrap, you can provide the base path to your service. +If different than the generated base path, during app bootstrap, you can provide the base path to your service. ``` import { BASE_PATH } from '@openapitools/typescript-angular-petstore'; @@ -200,4 +200,4 @@ import { environment } from '../environments/environment'; bootstrap: [ AppComponent ] }) export class AppModule { } -``` +``` diff --git a/samples/client/petstore/typescript-angular-v6-not-provided-in-root/builds/with-npm/git_push.sh b/samples/client/petstore/typescript-angular-v6-not-provided-in-root/builds/with-npm/git_push.sh index ced3be2b0c7b2349ff06d18da19d4b31435c9fa6..9405f72e950cdb8ca24c3cf4d15cee7eac62fde7 100644 --- a/samples/client/petstore/typescript-angular-v6-not-provided-in-root/builds/with-npm/git_push.sh +++ b/samples/client/petstore/typescript-angular-v6-not-provided-in-root/builds/with-npm/git_push.sh @@ -55,4 +55,3 @@ 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/typescript-angular-v6-provided-in-root/builds/default/README.md b/samples/client/petstore/typescript-angular-v6-provided-in-root/builds/default/README.md index f16604dcfff1a161cc41ecea7c996856870199ab..f2e5a1c1ee2d0a75ed23142ed3e0e83ed4cfaf45 100644 --- a/samples/client/petstore/typescript-angular-v6-provided-in-root/builds/default/README.md +++ b/samples/client/petstore/typescript-angular-v6-provided-in-root/builds/default/README.md @@ -152,7 +152,7 @@ export class AppModule { ### Set service base path -If different than the generated base path, during app bootstrap, you can provide the base path to your service. +If different than the generated base path, during app bootstrap, you can provide the base path to your service. ``` import { BASE_PATH } from ''; @@ -200,4 +200,4 @@ import { environment } from '../environments/environment'; bootstrap: [ AppComponent ] }) export class AppModule { } -``` +``` diff --git a/samples/client/petstore/typescript-angular-v6-provided-in-root/builds/default/git_push.sh b/samples/client/petstore/typescript-angular-v6-provided-in-root/builds/default/git_push.sh index ced3be2b0c7b2349ff06d18da19d4b31435c9fa6..9405f72e950cdb8ca24c3cf4d15cee7eac62fde7 100644 --- a/samples/client/petstore/typescript-angular-v6-provided-in-root/builds/default/git_push.sh +++ b/samples/client/petstore/typescript-angular-v6-provided-in-root/builds/default/git_push.sh @@ -55,4 +55,3 @@ 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/typescript-angular-v6-provided-in-root/builds/with-npm/README.md b/samples/client/petstore/typescript-angular-v6-provided-in-root/builds/with-npm/README.md index 1d41428c57665f337160dcebbe3242359d39f285..9ce9074b88369b07417451e68a3d3ea139fa8337 100644 --- a/samples/client/petstore/typescript-angular-v6-provided-in-root/builds/with-npm/README.md +++ b/samples/client/petstore/typescript-angular-v6-provided-in-root/builds/with-npm/README.md @@ -152,7 +152,7 @@ export class AppModule { ### Set service base path -If different than the generated base path, during app bootstrap, you can provide the base path to your service. +If different than the generated base path, during app bootstrap, you can provide the base path to your service. ``` import { BASE_PATH } from '@openapitools/angular2-typescript-petstore'; @@ -200,4 +200,4 @@ import { environment } from '../environments/environment'; bootstrap: [ AppComponent ] }) export class AppModule { } -``` +``` diff --git a/samples/client/petstore/typescript-angular-v6-provided-in-root/builds/with-npm/git_push.sh b/samples/client/petstore/typescript-angular-v6-provided-in-root/builds/with-npm/git_push.sh index ced3be2b0c7b2349ff06d18da19d4b31435c9fa6..9405f72e950cdb8ca24c3cf4d15cee7eac62fde7 100644 --- a/samples/client/petstore/typescript-angular-v6-provided-in-root/builds/with-npm/git_push.sh +++ b/samples/client/petstore/typescript-angular-v6-provided-in-root/builds/with-npm/git_push.sh @@ -55,4 +55,3 @@ 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/typescript-angular-v7-not-provided-in-root/builds/default/README.md b/samples/client/petstore/typescript-angular-v7-not-provided-in-root/builds/default/README.md index f16604dcfff1a161cc41ecea7c996856870199ab..f2e5a1c1ee2d0a75ed23142ed3e0e83ed4cfaf45 100644 --- a/samples/client/petstore/typescript-angular-v7-not-provided-in-root/builds/default/README.md +++ b/samples/client/petstore/typescript-angular-v7-not-provided-in-root/builds/default/README.md @@ -152,7 +152,7 @@ export class AppModule { ### Set service base path -If different than the generated base path, during app bootstrap, you can provide the base path to your service. +If different than the generated base path, during app bootstrap, you can provide the base path to your service. ``` import { BASE_PATH } from ''; @@ -200,4 +200,4 @@ import { environment } from '../environments/environment'; bootstrap: [ AppComponent ] }) export class AppModule { } -``` +``` diff --git a/samples/client/petstore/typescript-angular-v7-not-provided-in-root/builds/default/git_push.sh b/samples/client/petstore/typescript-angular-v7-not-provided-in-root/builds/default/git_push.sh index ced3be2b0c7b2349ff06d18da19d4b31435c9fa6..9405f72e950cdb8ca24c3cf4d15cee7eac62fde7 100644 --- a/samples/client/petstore/typescript-angular-v7-not-provided-in-root/builds/default/git_push.sh +++ b/samples/client/petstore/typescript-angular-v7-not-provided-in-root/builds/default/git_push.sh @@ -55,4 +55,3 @@ 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/typescript-angular-v7-not-provided-in-root/builds/with-npm/README.md b/samples/client/petstore/typescript-angular-v7-not-provided-in-root/builds/with-npm/README.md index 33aa0a2c9cef6c7ff0b34cac88094c45301c3460..000c51d694b6daf9ed30ce4654460f6515fca8d5 100644 --- a/samples/client/petstore/typescript-angular-v7-not-provided-in-root/builds/with-npm/README.md +++ b/samples/client/petstore/typescript-angular-v7-not-provided-in-root/builds/with-npm/README.md @@ -152,7 +152,7 @@ export class AppModule { ### Set service base path -If different than the generated base path, during app bootstrap, you can provide the base path to your service. +If different than the generated base path, during app bootstrap, you can provide the base path to your service. ``` import { BASE_PATH } from '@openapitools/typescript-angular-petstore'; @@ -200,4 +200,4 @@ import { environment } from '../environments/environment'; bootstrap: [ AppComponent ] }) export class AppModule { } -``` +``` diff --git a/samples/client/petstore/typescript-angular-v7-not-provided-in-root/builds/with-npm/git_push.sh b/samples/client/petstore/typescript-angular-v7-not-provided-in-root/builds/with-npm/git_push.sh index ced3be2b0c7b2349ff06d18da19d4b31435c9fa6..9405f72e950cdb8ca24c3cf4d15cee7eac62fde7 100644 --- a/samples/client/petstore/typescript-angular-v7-not-provided-in-root/builds/with-npm/git_push.sh +++ b/samples/client/petstore/typescript-angular-v7-not-provided-in-root/builds/with-npm/git_push.sh @@ -55,4 +55,3 @@ 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/typescript-angular-v7-provided-in-root/builds/default/README.md b/samples/client/petstore/typescript-angular-v7-provided-in-root/builds/default/README.md index f16604dcfff1a161cc41ecea7c996856870199ab..f2e5a1c1ee2d0a75ed23142ed3e0e83ed4cfaf45 100644 --- a/samples/client/petstore/typescript-angular-v7-provided-in-root/builds/default/README.md +++ b/samples/client/petstore/typescript-angular-v7-provided-in-root/builds/default/README.md @@ -152,7 +152,7 @@ export class AppModule { ### Set service base path -If different than the generated base path, during app bootstrap, you can provide the base path to your service. +If different than the generated base path, during app bootstrap, you can provide the base path to your service. ``` import { BASE_PATH } from ''; @@ -200,4 +200,4 @@ import { environment } from '../environments/environment'; bootstrap: [ AppComponent ] }) export class AppModule { } -``` +``` diff --git a/samples/client/petstore/typescript-angular-v7-provided-in-root/builds/default/git_push.sh b/samples/client/petstore/typescript-angular-v7-provided-in-root/builds/default/git_push.sh index ced3be2b0c7b2349ff06d18da19d4b31435c9fa6..9405f72e950cdb8ca24c3cf4d15cee7eac62fde7 100644 --- a/samples/client/petstore/typescript-angular-v7-provided-in-root/builds/default/git_push.sh +++ b/samples/client/petstore/typescript-angular-v7-provided-in-root/builds/default/git_push.sh @@ -55,4 +55,3 @@ 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/typescript-angular-v7-provided-in-root/builds/with-npm/README.md b/samples/client/petstore/typescript-angular-v7-provided-in-root/builds/with-npm/README.md index 33aa0a2c9cef6c7ff0b34cac88094c45301c3460..000c51d694b6daf9ed30ce4654460f6515fca8d5 100644 --- a/samples/client/petstore/typescript-angular-v7-provided-in-root/builds/with-npm/README.md +++ b/samples/client/petstore/typescript-angular-v7-provided-in-root/builds/with-npm/README.md @@ -152,7 +152,7 @@ export class AppModule { ### Set service base path -If different than the generated base path, during app bootstrap, you can provide the base path to your service. +If different than the generated base path, during app bootstrap, you can provide the base path to your service. ``` import { BASE_PATH } from '@openapitools/typescript-angular-petstore'; @@ -200,4 +200,4 @@ import { environment } from '../environments/environment'; bootstrap: [ AppComponent ] }) export class AppModule { } -``` +``` diff --git a/samples/client/petstore/typescript-angular-v7-provided-in-root/builds/with-npm/git_push.sh b/samples/client/petstore/typescript-angular-v7-provided-in-root/builds/with-npm/git_push.sh index ced3be2b0c7b2349ff06d18da19d4b31435c9fa6..9405f72e950cdb8ca24c3cf4d15cee7eac62fde7 100644 --- a/samples/client/petstore/typescript-angular-v7-provided-in-root/builds/with-npm/git_push.sh +++ b/samples/client/petstore/typescript-angular-v7-provided-in-root/builds/with-npm/git_push.sh @@ -55,4 +55,3 @@ 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/typescript-angular-v8-provided-in-root/builds/single-request-parameter/README.md b/samples/client/petstore/typescript-angular-v8-provided-in-root/builds/single-request-parameter/README.md index 33aa0a2c9cef6c7ff0b34cac88094c45301c3460..000c51d694b6daf9ed30ce4654460f6515fca8d5 100644 --- a/samples/client/petstore/typescript-angular-v8-provided-in-root/builds/single-request-parameter/README.md +++ b/samples/client/petstore/typescript-angular-v8-provided-in-root/builds/single-request-parameter/README.md @@ -152,7 +152,7 @@ export class AppModule { ### Set service base path -If different than the generated base path, during app bootstrap, you can provide the base path to your service. +If different than the generated base path, during app bootstrap, you can provide the base path to your service. ``` import { BASE_PATH } from '@openapitools/typescript-angular-petstore'; @@ -200,4 +200,4 @@ import { environment } from '../environments/environment'; bootstrap: [ AppComponent ] }) export class AppModule { } -``` +``` diff --git a/samples/client/petstore/typescript-angular-v8-provided-in-root/builds/single-request-parameter/git_push.sh b/samples/client/petstore/typescript-angular-v8-provided-in-root/builds/single-request-parameter/git_push.sh index ced3be2b0c7b2349ff06d18da19d4b31435c9fa6..9405f72e950cdb8ca24c3cf4d15cee7eac62fde7 100644 --- a/samples/client/petstore/typescript-angular-v8-provided-in-root/builds/single-request-parameter/git_push.sh +++ b/samples/client/petstore/typescript-angular-v8-provided-in-root/builds/single-request-parameter/git_push.sh @@ -55,4 +55,3 @@ 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/typescript-angular-v8-provided-in-root/builds/with-npm/README.md b/samples/client/petstore/typescript-angular-v8-provided-in-root/builds/with-npm/README.md index 33aa0a2c9cef6c7ff0b34cac88094c45301c3460..000c51d694b6daf9ed30ce4654460f6515fca8d5 100644 --- a/samples/client/petstore/typescript-angular-v8-provided-in-root/builds/with-npm/README.md +++ b/samples/client/petstore/typescript-angular-v8-provided-in-root/builds/with-npm/README.md @@ -152,7 +152,7 @@ export class AppModule { ### Set service base path -If different than the generated base path, during app bootstrap, you can provide the base path to your service. +If different than the generated base path, during app bootstrap, you can provide the base path to your service. ``` import { BASE_PATH } from '@openapitools/typescript-angular-petstore'; @@ -200,4 +200,4 @@ import { environment } from '../environments/environment'; bootstrap: [ AppComponent ] }) export class AppModule { } -``` +``` diff --git a/samples/client/petstore/typescript-angular-v8-provided-in-root/builds/with-npm/git_push.sh b/samples/client/petstore/typescript-angular-v8-provided-in-root/builds/with-npm/git_push.sh index ced3be2b0c7b2349ff06d18da19d4b31435c9fa6..9405f72e950cdb8ca24c3cf4d15cee7eac62fde7 100644 --- a/samples/client/petstore/typescript-angular-v8-provided-in-root/builds/with-npm/git_push.sh +++ b/samples/client/petstore/typescript-angular-v8-provided-in-root/builds/with-npm/git_push.sh @@ -55,4 +55,3 @@ 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/typescript-angular-v8-provided-in-root/builds/with-prefixed-module-name/README.md b/samples/client/petstore/typescript-angular-v8-provided-in-root/builds/with-prefixed-module-name/README.md index 1d3f3340be4bee0d6aad33f832573a6f7467105d..94a5d04d975dc80a4c199eb6e29112022bfefa02 100644 --- a/samples/client/petstore/typescript-angular-v8-provided-in-root/builds/with-prefixed-module-name/README.md +++ b/samples/client/petstore/typescript-angular-v8-provided-in-root/builds/with-prefixed-module-name/README.md @@ -152,7 +152,7 @@ export class AppModule { ### Set service base path -If different than the generated base path, during app bootstrap, you can provide the base path to your service. +If different than the generated base path, during app bootstrap, you can provide the base path to your service. ``` import { BASE_PATH } from '@openapitools/typescript-angular-petstore'; @@ -200,4 +200,4 @@ import { environment } from '../environments/environment'; bootstrap: [ AppComponent ] }) export class AppModule { } -``` +``` diff --git a/samples/client/petstore/typescript-angular-v8-provided-in-root/builds/with-prefixed-module-name/git_push.sh b/samples/client/petstore/typescript-angular-v8-provided-in-root/builds/with-prefixed-module-name/git_push.sh index ced3be2b0c7b2349ff06d18da19d4b31435c9fa6..9405f72e950cdb8ca24c3cf4d15cee7eac62fde7 100644 --- a/samples/client/petstore/typescript-angular-v8-provided-in-root/builds/with-prefixed-module-name/git_push.sh +++ b/samples/client/petstore/typescript-angular-v8-provided-in-root/builds/with-prefixed-module-name/git_push.sh @@ -55,4 +55,3 @@ 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/typescript-angular-v9-provided-in-any/builds/default/README.md b/samples/client/petstore/typescript-angular-v9-provided-in-any/builds/default/README.md index f16604dcfff1a161cc41ecea7c996856870199ab..f2e5a1c1ee2d0a75ed23142ed3e0e83ed4cfaf45 100644 --- a/samples/client/petstore/typescript-angular-v9-provided-in-any/builds/default/README.md +++ b/samples/client/petstore/typescript-angular-v9-provided-in-any/builds/default/README.md @@ -152,7 +152,7 @@ export class AppModule { ### Set service base path -If different than the generated base path, during app bootstrap, you can provide the base path to your service. +If different than the generated base path, during app bootstrap, you can provide the base path to your service. ``` import { BASE_PATH } from ''; @@ -200,4 +200,4 @@ import { environment } from '../environments/environment'; bootstrap: [ AppComponent ] }) export class AppModule { } -``` +``` diff --git a/samples/client/petstore/typescript-angular-v9-provided-in-any/builds/default/git_push.sh b/samples/client/petstore/typescript-angular-v9-provided-in-any/builds/default/git_push.sh index ced3be2b0c7b2349ff06d18da19d4b31435c9fa6..9405f72e950cdb8ca24c3cf4d15cee7eac62fde7 100644 --- a/samples/client/petstore/typescript-angular-v9-provided-in-any/builds/default/git_push.sh +++ b/samples/client/petstore/typescript-angular-v9-provided-in-any/builds/default/git_push.sh @@ -55,4 +55,3 @@ 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/typescript-angular-v9-provided-in-root/builds/default/README.md b/samples/client/petstore/typescript-angular-v9-provided-in-root/builds/default/README.md index f16604dcfff1a161cc41ecea7c996856870199ab..f2e5a1c1ee2d0a75ed23142ed3e0e83ed4cfaf45 100644 --- a/samples/client/petstore/typescript-angular-v9-provided-in-root/builds/default/README.md +++ b/samples/client/petstore/typescript-angular-v9-provided-in-root/builds/default/README.md @@ -152,7 +152,7 @@ export class AppModule { ### Set service base path -If different than the generated base path, during app bootstrap, you can provide the base path to your service. +If different than the generated base path, during app bootstrap, you can provide the base path to your service. ``` import { BASE_PATH } from ''; @@ -200,4 +200,4 @@ import { environment } from '../environments/environment'; bootstrap: [ AppComponent ] }) export class AppModule { } -``` +``` diff --git a/samples/client/petstore/typescript-angular-v9-provided-in-root/builds/default/git_push.sh b/samples/client/petstore/typescript-angular-v9-provided-in-root/builds/default/git_push.sh index ced3be2b0c7b2349ff06d18da19d4b31435c9fa6..9405f72e950cdb8ca24c3cf4d15cee7eac62fde7 100644 --- a/samples/client/petstore/typescript-angular-v9-provided-in-root/builds/default/git_push.sh +++ b/samples/client/petstore/typescript-angular-v9-provided-in-root/builds/default/git_push.sh @@ -55,4 +55,3 @@ 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/typescript-angular-v9-provided-in-root/builds/with-npm/README.md b/samples/client/petstore/typescript-angular-v9-provided-in-root/builds/with-npm/README.md index 33aa0a2c9cef6c7ff0b34cac88094c45301c3460..000c51d694b6daf9ed30ce4654460f6515fca8d5 100644 --- a/samples/client/petstore/typescript-angular-v9-provided-in-root/builds/with-npm/README.md +++ b/samples/client/petstore/typescript-angular-v9-provided-in-root/builds/with-npm/README.md @@ -152,7 +152,7 @@ export class AppModule { ### Set service base path -If different than the generated base path, during app bootstrap, you can provide the base path to your service. +If different than the generated base path, during app bootstrap, you can provide the base path to your service. ``` import { BASE_PATH } from '@openapitools/typescript-angular-petstore'; @@ -200,4 +200,4 @@ import { environment } from '../environments/environment'; bootstrap: [ AppComponent ] }) export class AppModule { } -``` +``` diff --git a/samples/client/petstore/typescript-angular-v9-provided-in-root/builds/with-npm/git_push.sh b/samples/client/petstore/typescript-angular-v9-provided-in-root/builds/with-npm/git_push.sh index ced3be2b0c7b2349ff06d18da19d4b31435c9fa6..9405f72e950cdb8ca24c3cf4d15cee7eac62fde7 100644 --- a/samples/client/petstore/typescript-angular-v9-provided-in-root/builds/with-npm/git_push.sh +++ b/samples/client/petstore/typescript-angular-v9-provided-in-root/builds/with-npm/git_push.sh @@ -55,4 +55,3 @@ 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/typescript-aurelia/default/git_push.sh b/samples/client/petstore/typescript-aurelia/default/git_push.sh index ced3be2b0c7b2349ff06d18da19d4b31435c9fa6..9405f72e950cdb8ca24c3cf4d15cee7eac62fde7 100644 --- a/samples/client/petstore/typescript-aurelia/default/git_push.sh +++ b/samples/client/petstore/typescript-aurelia/default/git_push.sh @@ -55,4 +55,3 @@ 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/typescript-axios/builds/composed-schemas/git_push.sh b/samples/client/petstore/typescript-axios/builds/composed-schemas/git_push.sh index ced3be2b0c7b2349ff06d18da19d4b31435c9fa6..9405f72e950cdb8ca24c3cf4d15cee7eac62fde7 100644 --- a/samples/client/petstore/typescript-axios/builds/composed-schemas/git_push.sh +++ b/samples/client/petstore/typescript-axios/builds/composed-schemas/git_push.sh @@ -55,4 +55,3 @@ 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/typescript-axios/builds/default/git_push.sh b/samples/client/petstore/typescript-axios/builds/default/git_push.sh index ced3be2b0c7b2349ff06d18da19d4b31435c9fa6..9405f72e950cdb8ca24c3cf4d15cee7eac62fde7 100644 --- a/samples/client/petstore/typescript-axios/builds/default/git_push.sh +++ b/samples/client/petstore/typescript-axios/builds/default/git_push.sh @@ -55,4 +55,3 @@ 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/typescript-axios/builds/es6-target/git_push.sh b/samples/client/petstore/typescript-axios/builds/es6-target/git_push.sh index ced3be2b0c7b2349ff06d18da19d4b31435c9fa6..9405f72e950cdb8ca24c3cf4d15cee7eac62fde7 100644 --- a/samples/client/petstore/typescript-axios/builds/es6-target/git_push.sh +++ b/samples/client/petstore/typescript-axios/builds/es6-target/git_push.sh @@ -55,4 +55,3 @@ 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/typescript-axios/builds/with-complex-headers/git_push.sh b/samples/client/petstore/typescript-axios/builds/with-complex-headers/git_push.sh index ced3be2b0c7b2349ff06d18da19d4b31435c9fa6..9405f72e950cdb8ca24c3cf4d15cee7eac62fde7 100644 --- a/samples/client/petstore/typescript-axios/builds/with-complex-headers/git_push.sh +++ b/samples/client/petstore/typescript-axios/builds/with-complex-headers/git_push.sh @@ -55,4 +55,3 @@ 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/typescript-axios/builds/with-fake-endpoints-models-for-testing-with-http-signature/git_push.sh b/samples/client/petstore/typescript-axios/builds/with-fake-endpoints-models-for-testing-with-http-signature/git_push.sh index ced3be2b0c7b2349ff06d18da19d4b31435c9fa6..9405f72e950cdb8ca24c3cf4d15cee7eac62fde7 100644 --- a/samples/client/petstore/typescript-axios/builds/with-fake-endpoints-models-for-testing-with-http-signature/git_push.sh +++ b/samples/client/petstore/typescript-axios/builds/with-fake-endpoints-models-for-testing-with-http-signature/git_push.sh @@ -55,4 +55,3 @@ 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/typescript-axios/builds/with-interfaces/git_push.sh b/samples/client/petstore/typescript-axios/builds/with-interfaces/git_push.sh index ced3be2b0c7b2349ff06d18da19d4b31435c9fa6..9405f72e950cdb8ca24c3cf4d15cee7eac62fde7 100644 --- a/samples/client/petstore/typescript-axios/builds/with-interfaces/git_push.sh +++ b/samples/client/petstore/typescript-axios/builds/with-interfaces/git_push.sh @@ -55,4 +55,3 @@ 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/typescript-axios/builds/with-npm-version-and-separate-models-and-api/git_push.sh b/samples/client/petstore/typescript-axios/builds/with-npm-version-and-separate-models-and-api/git_push.sh index ced3be2b0c7b2349ff06d18da19d4b31435c9fa6..9405f72e950cdb8ca24c3cf4d15cee7eac62fde7 100644 --- a/samples/client/petstore/typescript-axios/builds/with-npm-version-and-separate-models-and-api/git_push.sh +++ b/samples/client/petstore/typescript-axios/builds/with-npm-version-and-separate-models-and-api/git_push.sh @@ -55,4 +55,3 @@ 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/typescript-axios/builds/with-npm-version-and-separate-models-and-api/model/some/levels/deep/api-response.ts b/samples/client/petstore/typescript-axios/builds/with-npm-version-and-separate-models-and-api/model/some/levels/deep/api-response.ts index 9a706d3e6c5f284d1dcbf2375e8fb0799cc7a772..2a6dca479687c5358b95aa8458e066cd7eb20af8 100644 --- a/samples/client/petstore/typescript-axios/builds/with-npm-version-and-separate-models-and-api/model/some/levels/deep/api-response.ts +++ b/samples/client/petstore/typescript-axios/builds/with-npm-version-and-separate-models-and-api/model/some/levels/deep/api-response.ts @@ -40,4 +40,3 @@ export interface ApiResponse { message?: string; } - diff --git a/samples/client/petstore/typescript-axios/builds/with-npm-version-and-separate-models-and-api/model/some/levels/deep/category.ts b/samples/client/petstore/typescript-axios/builds/with-npm-version-and-separate-models-and-api/model/some/levels/deep/category.ts index a51d595dbf4ff6f50df7a17c02353c57ae4b1476..40563929cfb15597c9ffc266920ff831f917bd4c 100644 --- a/samples/client/petstore/typescript-axios/builds/with-npm-version-and-separate-models-and-api/model/some/levels/deep/category.ts +++ b/samples/client/petstore/typescript-axios/builds/with-npm-version-and-separate-models-and-api/model/some/levels/deep/category.ts @@ -34,4 +34,3 @@ export interface Category { name?: string; } - diff --git a/samples/client/petstore/typescript-axios/builds/with-npm-version-and-separate-models-and-api/model/some/levels/deep/order.ts b/samples/client/petstore/typescript-axios/builds/with-npm-version-and-separate-models-and-api/model/some/levels/deep/order.ts index 96693b94262e4c887d0336a5ce4b397b056863ed..2d09d96315d0929e2e24bca1e378554d942a2c92 100644 --- a/samples/client/petstore/typescript-axios/builds/with-npm-version-and-separate-models-and-api/model/some/levels/deep/order.ts +++ b/samples/client/petstore/typescript-axios/builds/with-npm-version-and-separate-models-and-api/model/some/levels/deep/order.ts @@ -69,4 +69,3 @@ export enum OrderStatusEnum { } - diff --git a/samples/client/petstore/typescript-axios/builds/with-npm-version-and-separate-models-and-api/model/some/levels/deep/pet.ts b/samples/client/petstore/typescript-axios/builds/with-npm-version-and-separate-models-and-api/model/some/levels/deep/pet.ts index 9eba0fe99aeca1415ce6547031597eb85ff89344..c303280738606737840c96d1641db484edf3a1c2 100644 --- a/samples/client/petstore/typescript-axios/builds/with-npm-version-and-separate-models-and-api/model/some/levels/deep/pet.ts +++ b/samples/client/petstore/typescript-axios/builds/with-npm-version-and-separate-models-and-api/model/some/levels/deep/pet.ts @@ -71,4 +71,3 @@ export enum PetStatusEnum { } - diff --git a/samples/client/petstore/typescript-axios/builds/with-npm-version-and-separate-models-and-api/model/some/levels/deep/tag.ts b/samples/client/petstore/typescript-axios/builds/with-npm-version-and-separate-models-and-api/model/some/levels/deep/tag.ts index ef7ccf845ff69833610dd0203e81b97f19af4fac..6cfb904b9b1f063416372d6dbcaca8edb88c30d8 100644 --- a/samples/client/petstore/typescript-axios/builds/with-npm-version-and-separate-models-and-api/model/some/levels/deep/tag.ts +++ b/samples/client/petstore/typescript-axios/builds/with-npm-version-and-separate-models-and-api/model/some/levels/deep/tag.ts @@ -34,4 +34,3 @@ export interface Tag { name?: string; } - diff --git a/samples/client/petstore/typescript-axios/builds/with-npm-version-and-separate-models-and-api/model/some/levels/deep/user.ts b/samples/client/petstore/typescript-axios/builds/with-npm-version-and-separate-models-and-api/model/some/levels/deep/user.ts index f24b822626ee8af5cef0ff2ef3900829c5a837cb..ae8d75a9cea4159fa96a5e6d2f79f00ac0d7e53e 100644 --- a/samples/client/petstore/typescript-axios/builds/with-npm-version-and-separate-models-and-api/model/some/levels/deep/user.ts +++ b/samples/client/petstore/typescript-axios/builds/with-npm-version-and-separate-models-and-api/model/some/levels/deep/user.ts @@ -70,4 +70,3 @@ export interface User { userStatus?: number; } - diff --git a/samples/client/petstore/typescript-axios/builds/with-npm-version/git_push.sh b/samples/client/petstore/typescript-axios/builds/with-npm-version/git_push.sh index ced3be2b0c7b2349ff06d18da19d4b31435c9fa6..9405f72e950cdb8ca24c3cf4d15cee7eac62fde7 100644 --- a/samples/client/petstore/typescript-axios/builds/with-npm-version/git_push.sh +++ b/samples/client/petstore/typescript-axios/builds/with-npm-version/git_push.sh @@ -55,4 +55,3 @@ 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/typescript-axios/builds/with-single-request-parameters/git_push.sh b/samples/client/petstore/typescript-axios/builds/with-single-request-parameters/git_push.sh index ced3be2b0c7b2349ff06d18da19d4b31435c9fa6..9405f72e950cdb8ca24c3cf4d15cee7eac62fde7 100644 --- a/samples/client/petstore/typescript-axios/builds/with-single-request-parameters/git_push.sh +++ b/samples/client/petstore/typescript-axios/builds/with-single-request-parameters/git_push.sh @@ -55,4 +55,3 @@ 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/typescript-fetch/builds/default-v3.0/models/AdditionalPropertiesClass.ts b/samples/client/petstore/typescript-fetch/builds/default-v3.0/models/AdditionalPropertiesClass.ts index 32f8310b09d5b5ff50711296ed0b49fe91b1f8f2..4036c2835bf2b7a4c2a1f90247570c98fd5867b6 100644 --- a/samples/client/petstore/typescript-fetch/builds/default-v3.0/models/AdditionalPropertiesClass.ts +++ b/samples/client/petstore/typescript-fetch/builds/default-v3.0/models/AdditionalPropertiesClass.ts @@ -62,4 +62,3 @@ export function AdditionalPropertiesClassToJSON(value?: AdditionalPropertiesClas }; } - diff --git a/samples/client/petstore/typescript-fetch/builds/default-v3.0/models/Animal.ts b/samples/client/petstore/typescript-fetch/builds/default-v3.0/models/Animal.ts index ae4d54ec09d852d847c1a096d1ac8e96e94c8541..d7615f2bef72d15122dc01b0d3a845c2c61a4952 100644 --- a/samples/client/petstore/typescript-fetch/builds/default-v3.0/models/Animal.ts +++ b/samples/client/petstore/typescript-fetch/builds/default-v3.0/models/Animal.ts @@ -75,4 +75,3 @@ export function AnimalToJSON(value?: Animal | null): any { }; } - diff --git a/samples/client/petstore/typescript-fetch/builds/default-v3.0/models/ArrayOfArrayOfNumberOnly.ts b/samples/client/petstore/typescript-fetch/builds/default-v3.0/models/ArrayOfArrayOfNumberOnly.ts index 7a5dc98e3dbc07d43184c0a8da8f5b32fe4e80be..d550728ba7cc6bac1f5c80ec884c7ab78f761dfa 100644 --- a/samples/client/petstore/typescript-fetch/builds/default-v3.0/models/ArrayOfArrayOfNumberOnly.ts +++ b/samples/client/petstore/typescript-fetch/builds/default-v3.0/models/ArrayOfArrayOfNumberOnly.ts @@ -54,4 +54,3 @@ export function ArrayOfArrayOfNumberOnlyToJSON(value?: ArrayOfArrayOfNumberOnly }; } - diff --git a/samples/client/petstore/typescript-fetch/builds/default-v3.0/models/ArrayOfNumberOnly.ts b/samples/client/petstore/typescript-fetch/builds/default-v3.0/models/ArrayOfNumberOnly.ts index 6167138f49a47ebac04269af75f926373ce12d05..834ed08cee39be7b2d49b2b311794bb19ab2e0eb 100644 --- a/samples/client/petstore/typescript-fetch/builds/default-v3.0/models/ArrayOfNumberOnly.ts +++ b/samples/client/petstore/typescript-fetch/builds/default-v3.0/models/ArrayOfNumberOnly.ts @@ -54,4 +54,3 @@ export function ArrayOfNumberOnlyToJSON(value?: ArrayOfNumberOnly | null): any { }; } - diff --git a/samples/client/petstore/typescript-fetch/builds/default-v3.0/models/ArrayTest.ts b/samples/client/petstore/typescript-fetch/builds/default-v3.0/models/ArrayTest.ts index 64cb8305ef0ec7b2a95e3802c4a8ff9b54a67aa0..e4c5f1e0c5b61c35b2ef22181955f8561b09e7c6 100644 --- a/samples/client/petstore/typescript-fetch/builds/default-v3.0/models/ArrayTest.ts +++ b/samples/client/petstore/typescript-fetch/builds/default-v3.0/models/ArrayTest.ts @@ -77,4 +77,3 @@ export function ArrayTestToJSON(value?: ArrayTest | null): any { }; } - diff --git a/samples/client/petstore/typescript-fetch/builds/default-v3.0/models/Capitalization.ts b/samples/client/petstore/typescript-fetch/builds/default-v3.0/models/Capitalization.ts index 72152fe0462025b77eeb09039d29fe7ddfe9f536..8bfd529f1a267e533760aea67f8cf6c2d350fb00 100644 --- a/samples/client/petstore/typescript-fetch/builds/default-v3.0/models/Capitalization.ts +++ b/samples/client/petstore/typescript-fetch/builds/default-v3.0/models/Capitalization.ts @@ -94,4 +94,3 @@ export function CapitalizationToJSON(value?: Capitalization | null): any { }; } - diff --git a/samples/client/petstore/typescript-fetch/builds/default-v3.0/models/Cat.ts b/samples/client/petstore/typescript-fetch/builds/default-v3.0/models/Cat.ts index dfc78c6c29f8c96330ef4ff9adc14c5ca835ea53..9ca592b7f455d9a5288eb3d447088162e2870592 100644 --- a/samples/client/petstore/typescript-fetch/builds/default-v3.0/models/Cat.ts +++ b/samples/client/petstore/typescript-fetch/builds/default-v3.0/models/Cat.ts @@ -65,4 +65,3 @@ export function CatToJSON(value?: Cat | null): any { }; } - diff --git a/samples/client/petstore/typescript-fetch/builds/default-v3.0/models/CatAllOf.ts b/samples/client/petstore/typescript-fetch/builds/default-v3.0/models/CatAllOf.ts index 766c45c5b03ee4e556d6904f51c8900c37985adf..1ac10c45164d8ff47b74c365b63af0b0d7e33c13 100644 --- a/samples/client/petstore/typescript-fetch/builds/default-v3.0/models/CatAllOf.ts +++ b/samples/client/petstore/typescript-fetch/builds/default-v3.0/models/CatAllOf.ts @@ -54,4 +54,3 @@ export function CatAllOfToJSON(value?: CatAllOf | null): any { }; } - diff --git a/samples/client/petstore/typescript-fetch/builds/default-v3.0/models/Category.ts b/samples/client/petstore/typescript-fetch/builds/default-v3.0/models/Category.ts index 56751e4309618de97e453f16ea513212b5d81524..ec6ee21ff39b88dba6076a36f9ecb7e1afba93c8 100644 --- a/samples/client/petstore/typescript-fetch/builds/default-v3.0/models/Category.ts +++ b/samples/client/petstore/typescript-fetch/builds/default-v3.0/models/Category.ts @@ -62,4 +62,3 @@ export function CategoryToJSON(value?: Category | null): any { }; } - diff --git a/samples/client/petstore/typescript-fetch/builds/default-v3.0/models/ClassModel.ts b/samples/client/petstore/typescript-fetch/builds/default-v3.0/models/ClassModel.ts index bd3f23ab18602f51a3885f2143ff953d05a4640a..f149bb682566b8c3217cdccb91767ebac706cb78 100644 --- a/samples/client/petstore/typescript-fetch/builds/default-v3.0/models/ClassModel.ts +++ b/samples/client/petstore/typescript-fetch/builds/default-v3.0/models/ClassModel.ts @@ -54,4 +54,3 @@ export function ClassModelToJSON(value?: ClassModel | null): any { }; } - diff --git a/samples/client/petstore/typescript-fetch/builds/default-v3.0/models/Client.ts b/samples/client/petstore/typescript-fetch/builds/default-v3.0/models/Client.ts index dc42457e08f8920c6e0a112d41de0bbcd75a321d..44f2c241f245418b37cd10d445d2dda8b5ff13eb 100644 --- a/samples/client/petstore/typescript-fetch/builds/default-v3.0/models/Client.ts +++ b/samples/client/petstore/typescript-fetch/builds/default-v3.0/models/Client.ts @@ -54,4 +54,3 @@ export function ClientToJSON(value?: Client | null): any { }; } - diff --git a/samples/client/petstore/typescript-fetch/builds/default-v3.0/models/DeprecatedObject.ts b/samples/client/petstore/typescript-fetch/builds/default-v3.0/models/DeprecatedObject.ts index 08f1e2b6cae65925fbdd20126d41be9baa0821f7..5c3876e4396500bd001ca019a180619a102b4ccd 100644 --- a/samples/client/petstore/typescript-fetch/builds/default-v3.0/models/DeprecatedObject.ts +++ b/samples/client/petstore/typescript-fetch/builds/default-v3.0/models/DeprecatedObject.ts @@ -54,4 +54,3 @@ export function DeprecatedObjectToJSON(value?: DeprecatedObject | null): any { }; } - diff --git a/samples/client/petstore/typescript-fetch/builds/default-v3.0/models/Dog.ts b/samples/client/petstore/typescript-fetch/builds/default-v3.0/models/Dog.ts index e2b30b48a14776d711e4c8fe1e56991ccde17538..2194d53d12fc5bdbfebe93270c4bc736b88a0f41 100644 --- a/samples/client/petstore/typescript-fetch/builds/default-v3.0/models/Dog.ts +++ b/samples/client/petstore/typescript-fetch/builds/default-v3.0/models/Dog.ts @@ -65,4 +65,3 @@ export function DogToJSON(value?: Dog | null): any { }; } - diff --git a/samples/client/petstore/typescript-fetch/builds/default-v3.0/models/DogAllOf.ts b/samples/client/petstore/typescript-fetch/builds/default-v3.0/models/DogAllOf.ts index 06213d41d2ffd3767f92cea6aaf2fac69bb696fe..12f6f67feb80f47ab54153d1915079120390d0f4 100644 --- a/samples/client/petstore/typescript-fetch/builds/default-v3.0/models/DogAllOf.ts +++ b/samples/client/petstore/typescript-fetch/builds/default-v3.0/models/DogAllOf.ts @@ -54,4 +54,3 @@ export function DogAllOfToJSON(value?: DogAllOf | null): any { }; } - diff --git a/samples/client/petstore/typescript-fetch/builds/default-v3.0/models/EnumArrays.ts b/samples/client/petstore/typescript-fetch/builds/default-v3.0/models/EnumArrays.ts index 57c569031b473951427b60e9b8955a1d5aa0db7b..186b145d5e0edf8bab09c96663952fce07fdb76b 100644 --- a/samples/client/petstore/typescript-fetch/builds/default-v3.0/models/EnumArrays.ts +++ b/samples/client/petstore/typescript-fetch/builds/default-v3.0/models/EnumArrays.ts @@ -78,4 +78,3 @@ export function EnumArraysToJSON(value?: EnumArrays | null): any { }; } - diff --git a/samples/client/petstore/typescript-fetch/builds/default-v3.0/models/EnumTest.ts b/samples/client/petstore/typescript-fetch/builds/default-v3.0/models/EnumTest.ts index fbd6a1cf2c8a6c286d1f70ab0eed0962e5bfbb23..0dad062d603e287f10fd61e7ac275f2997090342 100644 --- a/samples/client/petstore/typescript-fetch/builds/default-v3.0/models/EnumTest.ts +++ b/samples/client/petstore/typescript-fetch/builds/default-v3.0/models/EnumTest.ts @@ -161,4 +161,3 @@ export function EnumTestToJSON(value?: EnumTest | null): any { }; } - diff --git a/samples/client/petstore/typescript-fetch/builds/default-v3.0/models/FileSchemaTestClass.ts b/samples/client/petstore/typescript-fetch/builds/default-v3.0/models/FileSchemaTestClass.ts index 2724ae8b2c9366a216a106fcd3cb70c370bfb171..78c4b71733fb942329a14dafeab84b825f9a6f80 100644 --- a/samples/client/petstore/typescript-fetch/builds/default-v3.0/models/FileSchemaTestClass.ts +++ b/samples/client/petstore/typescript-fetch/builds/default-v3.0/models/FileSchemaTestClass.ts @@ -62,4 +62,3 @@ export function FileSchemaTestClassToJSON(value?: FileSchemaTestClass | null): a }; } - diff --git a/samples/client/petstore/typescript-fetch/builds/default-v3.0/models/Foo.ts b/samples/client/petstore/typescript-fetch/builds/default-v3.0/models/Foo.ts index c8bd526e1a3bada0130714f081a7f252872a8ce5..90d10f435b0a2e11a5de4eb65d692388a52ff19f 100644 --- a/samples/client/petstore/typescript-fetch/builds/default-v3.0/models/Foo.ts +++ b/samples/client/petstore/typescript-fetch/builds/default-v3.0/models/Foo.ts @@ -54,4 +54,3 @@ export function FooToJSON(value?: Foo | null): any { }; } - diff --git a/samples/client/petstore/typescript-fetch/builds/default-v3.0/models/FormatTest.ts b/samples/client/petstore/typescript-fetch/builds/default-v3.0/models/FormatTest.ts index 1e35670f7d6113b7a3633bd75193219855d6493b..dc076e5ed75ac1f2a37b8e2a82a90955c6add3ee 100644 --- a/samples/client/petstore/typescript-fetch/builds/default-v3.0/models/FormatTest.ts +++ b/samples/client/petstore/typescript-fetch/builds/default-v3.0/models/FormatTest.ts @@ -181,4 +181,3 @@ export function FormatTestToJSON(value?: FormatTest | null): any { }; } - diff --git a/samples/client/petstore/typescript-fetch/builds/default-v3.0/models/HasOnlyReadOnly.ts b/samples/client/petstore/typescript-fetch/builds/default-v3.0/models/HasOnlyReadOnly.ts index 68f5300a1737cf1c6f901480ba2bd63d4bb11901..e29e66a5b3e9bf58f6696ef52bdc7c0726280f0d 100644 --- a/samples/client/petstore/typescript-fetch/builds/default-v3.0/models/HasOnlyReadOnly.ts +++ b/samples/client/petstore/typescript-fetch/builds/default-v3.0/models/HasOnlyReadOnly.ts @@ -60,4 +60,3 @@ export function HasOnlyReadOnlyToJSON(value?: HasOnlyReadOnly | null): any { }; } - diff --git a/samples/client/petstore/typescript-fetch/builds/default-v3.0/models/HealthCheckResult.ts b/samples/client/petstore/typescript-fetch/builds/default-v3.0/models/HealthCheckResult.ts index 3eb0f453831502c52499f1b39d58625379f00db6..f70dfe19150da34234642121cb62a37bc2be3de7 100644 --- a/samples/client/petstore/typescript-fetch/builds/default-v3.0/models/HealthCheckResult.ts +++ b/samples/client/petstore/typescript-fetch/builds/default-v3.0/models/HealthCheckResult.ts @@ -54,4 +54,3 @@ export function HealthCheckResultToJSON(value?: HealthCheckResult | null): any { }; } - diff --git a/samples/client/petstore/typescript-fetch/builds/default-v3.0/models/InlineResponseDefault.ts b/samples/client/petstore/typescript-fetch/builds/default-v3.0/models/InlineResponseDefault.ts index e314eab04fe11b3ea6d0690b4bcfd4072b8d0a54..572379f86a4db81735ccdadd85db41f0f61b55af 100644 --- a/samples/client/petstore/typescript-fetch/builds/default-v3.0/models/InlineResponseDefault.ts +++ b/samples/client/petstore/typescript-fetch/builds/default-v3.0/models/InlineResponseDefault.ts @@ -61,4 +61,3 @@ export function InlineResponseDefaultToJSON(value?: InlineResponseDefault | null }; } - diff --git a/samples/client/petstore/typescript-fetch/builds/default-v3.0/models/List.ts b/samples/client/petstore/typescript-fetch/builds/default-v3.0/models/List.ts index a2f1f6a84fae3fb84ceab80f898c98e984df3f6c..ef025131e767968dafea3c4e43bdb9b66adab353 100644 --- a/samples/client/petstore/typescript-fetch/builds/default-v3.0/models/List.ts +++ b/samples/client/petstore/typescript-fetch/builds/default-v3.0/models/List.ts @@ -54,4 +54,3 @@ export function ListToJSON(value?: List | null): any { }; } - diff --git a/samples/client/petstore/typescript-fetch/builds/default-v3.0/models/MapTest.ts b/samples/client/petstore/typescript-fetch/builds/default-v3.0/models/MapTest.ts index ca67d6cc33cb0ef2f0a6b2a7e9d5eccb402d0772..9375da6e5ef3d1d2b6a155d4b64bd1e5fdd6ddb8 100644 --- a/samples/client/petstore/typescript-fetch/builds/default-v3.0/models/MapTest.ts +++ b/samples/client/petstore/typescript-fetch/builds/default-v3.0/models/MapTest.ts @@ -87,4 +87,3 @@ export function MapTestToJSON(value?: MapTest | null): any { }; } - diff --git a/samples/client/petstore/typescript-fetch/builds/default-v3.0/models/MixedPropertiesAndAdditionalPropertiesClass.ts b/samples/client/petstore/typescript-fetch/builds/default-v3.0/models/MixedPropertiesAndAdditionalPropertiesClass.ts index e92e7582210f906dee97358ccba4b4785da0f3cc..ebb07fd89cb411a8b5cdeaed3efbf925993df3e9 100644 --- a/samples/client/petstore/typescript-fetch/builds/default-v3.0/models/MixedPropertiesAndAdditionalPropertiesClass.ts +++ b/samples/client/petstore/typescript-fetch/builds/default-v3.0/models/MixedPropertiesAndAdditionalPropertiesClass.ts @@ -77,4 +77,3 @@ export function MixedPropertiesAndAdditionalPropertiesClassToJSON(value?: MixedP }; } - diff --git a/samples/client/petstore/typescript-fetch/builds/default-v3.0/models/Model200Response.ts b/samples/client/petstore/typescript-fetch/builds/default-v3.0/models/Model200Response.ts index 472330811972e5c27b1d6a09c56b372bbdf4dbaf..ba25d3451c6dac8158ca1a877eb14cfae213875d 100644 --- a/samples/client/petstore/typescript-fetch/builds/default-v3.0/models/Model200Response.ts +++ b/samples/client/petstore/typescript-fetch/builds/default-v3.0/models/Model200Response.ts @@ -62,4 +62,3 @@ export function Model200ResponseToJSON(value?: Model200Response | null): any { }; } - diff --git a/samples/client/petstore/typescript-fetch/builds/default-v3.0/models/ModelApiResponse.ts b/samples/client/petstore/typescript-fetch/builds/default-v3.0/models/ModelApiResponse.ts index 1a8ee47211111e29d206b0a7d227266dfcdf6f8e..5ba9e329f485a19cd1ea06711c7efe9a5b83ae85 100644 --- a/samples/client/petstore/typescript-fetch/builds/default-v3.0/models/ModelApiResponse.ts +++ b/samples/client/petstore/typescript-fetch/builds/default-v3.0/models/ModelApiResponse.ts @@ -70,4 +70,3 @@ export function ModelApiResponseToJSON(value?: ModelApiResponse | null): any { }; } - diff --git a/samples/client/petstore/typescript-fetch/builds/default-v3.0/models/ModelFile.ts b/samples/client/petstore/typescript-fetch/builds/default-v3.0/models/ModelFile.ts index b9852f190432400cf6ca2854ef2826cadd233a16..822256afd604e86423dec2c4758beb530fb47890 100644 --- a/samples/client/petstore/typescript-fetch/builds/default-v3.0/models/ModelFile.ts +++ b/samples/client/petstore/typescript-fetch/builds/default-v3.0/models/ModelFile.ts @@ -54,4 +54,3 @@ export function ModelFileToJSON(value?: ModelFile | null): any { }; } - diff --git a/samples/client/petstore/typescript-fetch/builds/default-v3.0/models/Name.ts b/samples/client/petstore/typescript-fetch/builds/default-v3.0/models/Name.ts index 58701f32448e2ae8209b0ce96e882399636df4c7..20737db87c2bf66af2be63f777d37e63b1a2ac9b 100644 --- a/samples/client/petstore/typescript-fetch/builds/default-v3.0/models/Name.ts +++ b/samples/client/petstore/typescript-fetch/builds/default-v3.0/models/Name.ts @@ -76,4 +76,3 @@ export function NameToJSON(value?: Name | null): any { }; } - diff --git a/samples/client/petstore/typescript-fetch/builds/default-v3.0/models/NullableClass.ts b/samples/client/petstore/typescript-fetch/builds/default-v3.0/models/NullableClass.ts index bc11269ea10784e48ce7a1b5469fc5293ab1d6e9..d154f41a032be1d2b5c3ebe7f1a4664b5020609e 100644 --- a/samples/client/petstore/typescript-fetch/builds/default-v3.0/models/NullableClass.ts +++ b/samples/client/petstore/typescript-fetch/builds/default-v3.0/models/NullableClass.ts @@ -145,4 +145,3 @@ export function NullableClassToJSON(value?: NullableClass | null): any { }; } - diff --git a/samples/client/petstore/typescript-fetch/builds/default-v3.0/models/NumberOnly.ts b/samples/client/petstore/typescript-fetch/builds/default-v3.0/models/NumberOnly.ts index 84effe757bd074d94d8bc0f0b774e2515b076ef2..06493cb576eb3862e692eaf108062bc96c7d8112 100644 --- a/samples/client/petstore/typescript-fetch/builds/default-v3.0/models/NumberOnly.ts +++ b/samples/client/petstore/typescript-fetch/builds/default-v3.0/models/NumberOnly.ts @@ -54,4 +54,3 @@ export function NumberOnlyToJSON(value?: NumberOnly | null): any { }; } - diff --git a/samples/client/petstore/typescript-fetch/builds/default-v3.0/models/ObjectWithDeprecatedFields.ts b/samples/client/petstore/typescript-fetch/builds/default-v3.0/models/ObjectWithDeprecatedFields.ts index 0416aaf9cc01a15400659b2fda3c4c9037f27592..6fa59dbfca807564cca53143eb9f664fe9bb8edc 100644 --- a/samples/client/petstore/typescript-fetch/builds/default-v3.0/models/ObjectWithDeprecatedFields.ts +++ b/samples/client/petstore/typescript-fetch/builds/default-v3.0/models/ObjectWithDeprecatedFields.ts @@ -85,4 +85,3 @@ export function ObjectWithDeprecatedFieldsToJSON(value?: ObjectWithDeprecatedFie }; } - diff --git a/samples/client/petstore/typescript-fetch/builds/default-v3.0/models/Order.ts b/samples/client/petstore/typescript-fetch/builds/default-v3.0/models/Order.ts index 8ba94be0acd62b2da523d7ccfdef18b63b95e4fc..e89a0e0482acd7319cb2909c9deb9c8302e90989 100644 --- a/samples/client/petstore/typescript-fetch/builds/default-v3.0/models/Order.ts +++ b/samples/client/petstore/typescript-fetch/builds/default-v3.0/models/Order.ts @@ -104,4 +104,3 @@ export function OrderToJSON(value?: Order | null): any { }; } - diff --git a/samples/client/petstore/typescript-fetch/builds/default-v3.0/models/OuterComposite.ts b/samples/client/petstore/typescript-fetch/builds/default-v3.0/models/OuterComposite.ts index fa8fc31561a7ef277cb0b252a0d2a93780623f00..ed383644e558bef67ffe739a8f1044eb45546204 100644 --- a/samples/client/petstore/typescript-fetch/builds/default-v3.0/models/OuterComposite.ts +++ b/samples/client/petstore/typescript-fetch/builds/default-v3.0/models/OuterComposite.ts @@ -70,4 +70,3 @@ export function OuterCompositeToJSON(value?: OuterComposite | null): any { }; } - diff --git a/samples/client/petstore/typescript-fetch/builds/default-v3.0/models/OuterObjectWithEnumProperty.ts b/samples/client/petstore/typescript-fetch/builds/default-v3.0/models/OuterObjectWithEnumProperty.ts index 61d78ab5ff5c7104f47c17d7d32fb05c08d6935e..7e638d062923d14b7cdad60bee7adb12f6a16568 100644 --- a/samples/client/petstore/typescript-fetch/builds/default-v3.0/models/OuterObjectWithEnumProperty.ts +++ b/samples/client/petstore/typescript-fetch/builds/default-v3.0/models/OuterObjectWithEnumProperty.ts @@ -61,4 +61,3 @@ export function OuterObjectWithEnumPropertyToJSON(value?: OuterObjectWithEnumPro }; } - diff --git a/samples/client/petstore/typescript-fetch/builds/default-v3.0/models/Pet.ts b/samples/client/petstore/typescript-fetch/builds/default-v3.0/models/Pet.ts index 7318e62574c54ba4f718addabc63a4f939ba3dca..fc8cdac43298e67f6097c627529b67f641d7b067 100644 --- a/samples/client/petstore/typescript-fetch/builds/default-v3.0/models/Pet.ts +++ b/samples/client/petstore/typescript-fetch/builds/default-v3.0/models/Pet.ts @@ -115,4 +115,3 @@ export function PetToJSON(value?: Pet | null): any { }; } - diff --git a/samples/client/petstore/typescript-fetch/builds/default-v3.0/models/ReadOnlyFirst.ts b/samples/client/petstore/typescript-fetch/builds/default-v3.0/models/ReadOnlyFirst.ts index a9edd3cee7b49d93e7c2e247401da21e975e6789..96028e653a7c7f1a1661a0d3610455bfa06e5f09 100644 --- a/samples/client/petstore/typescript-fetch/builds/default-v3.0/models/ReadOnlyFirst.ts +++ b/samples/client/petstore/typescript-fetch/builds/default-v3.0/models/ReadOnlyFirst.ts @@ -61,4 +61,3 @@ export function ReadOnlyFirstToJSON(value?: ReadOnlyFirst | null): any { }; } - diff --git a/samples/client/petstore/typescript-fetch/builds/default-v3.0/models/Return.ts b/samples/client/petstore/typescript-fetch/builds/default-v3.0/models/Return.ts index 1a4de0fbe5b3553f59ae18401ec9ff259bf49bd6..f24902a02fc8bb725ede3d5958df5c2f15cde148 100644 --- a/samples/client/petstore/typescript-fetch/builds/default-v3.0/models/Return.ts +++ b/samples/client/petstore/typescript-fetch/builds/default-v3.0/models/Return.ts @@ -54,4 +54,3 @@ export function ReturnToJSON(value?: Return | null): any { }; } - diff --git a/samples/client/petstore/typescript-fetch/builds/default-v3.0/models/SpecialModelName.ts b/samples/client/petstore/typescript-fetch/builds/default-v3.0/models/SpecialModelName.ts index 1c7bcff4e495121acc62a342ec80fe2e17e3745b..2c5e33760073385d6082a707bf2a19d082eba788 100644 --- a/samples/client/petstore/typescript-fetch/builds/default-v3.0/models/SpecialModelName.ts +++ b/samples/client/petstore/typescript-fetch/builds/default-v3.0/models/SpecialModelName.ts @@ -54,4 +54,3 @@ export function SpecialModelNameToJSON(value?: SpecialModelName | null): any { }; } - diff --git a/samples/client/petstore/typescript-fetch/builds/default-v3.0/models/Tag.ts b/samples/client/petstore/typescript-fetch/builds/default-v3.0/models/Tag.ts index 25294f7c25ca39e37927e62a00bbd7dc43ea177c..54254fc47ff4a75c52354637a1af78052b254de8 100644 --- a/samples/client/petstore/typescript-fetch/builds/default-v3.0/models/Tag.ts +++ b/samples/client/petstore/typescript-fetch/builds/default-v3.0/models/Tag.ts @@ -62,4 +62,3 @@ export function TagToJSON(value?: Tag | null): any { }; } - diff --git a/samples/client/petstore/typescript-fetch/builds/default-v3.0/models/User.ts b/samples/client/petstore/typescript-fetch/builds/default-v3.0/models/User.ts index 704c00f5bba22aabde1396d4b0e3919efe4b07e9..05c0ec7b63871d9e7581588c10b5d175d99c8775 100644 --- a/samples/client/petstore/typescript-fetch/builds/default-v3.0/models/User.ts +++ b/samples/client/petstore/typescript-fetch/builds/default-v3.0/models/User.ts @@ -110,4 +110,3 @@ export function UserToJSON(value?: User | null): any { }; } - diff --git a/samples/client/petstore/typescript-fetch/builds/default/models/Category.ts b/samples/client/petstore/typescript-fetch/builds/default/models/Category.ts index faf9aabb9de13af71a9b5a5a106570b3e53f38e8..fe0e21ffb8bc047037b8469fedfb6ec4ae9feefc 100644 --- a/samples/client/petstore/typescript-fetch/builds/default/models/Category.ts +++ b/samples/client/petstore/typescript-fetch/builds/default/models/Category.ts @@ -62,4 +62,3 @@ export function CategoryToJSON(value?: Category | null): any { }; } - diff --git a/samples/client/petstore/typescript-fetch/builds/default/models/ModelApiResponse.ts b/samples/client/petstore/typescript-fetch/builds/default/models/ModelApiResponse.ts index 63fa57adc0339fe69021c68d357c1ba87c962f8c..6812901c37700936ec50ce551d3c4acc20f7ee27 100644 --- a/samples/client/petstore/typescript-fetch/builds/default/models/ModelApiResponse.ts +++ b/samples/client/petstore/typescript-fetch/builds/default/models/ModelApiResponse.ts @@ -70,4 +70,3 @@ export function ModelApiResponseToJSON(value?: ModelApiResponse | null): any { }; } - diff --git a/samples/client/petstore/typescript-fetch/builds/default/models/Order.ts b/samples/client/petstore/typescript-fetch/builds/default/models/Order.ts index 79b7455a6177c716fbe841d69d44c47240ad9c57..53163db8bc26087a08ba59d4c92e0d63de63a122 100644 --- a/samples/client/petstore/typescript-fetch/builds/default/models/Order.ts +++ b/samples/client/petstore/typescript-fetch/builds/default/models/Order.ts @@ -104,4 +104,3 @@ export function OrderToJSON(value?: Order | null): any { }; } - diff --git a/samples/client/petstore/typescript-fetch/builds/default/models/Pet.ts b/samples/client/petstore/typescript-fetch/builds/default/models/Pet.ts index 4cb69187ee0c296bd2d12041127dcae5bc076a26..9417338414aaf0d29524032af1c379e1f54475ff 100644 --- a/samples/client/petstore/typescript-fetch/builds/default/models/Pet.ts +++ b/samples/client/petstore/typescript-fetch/builds/default/models/Pet.ts @@ -115,4 +115,3 @@ export function PetToJSON(value?: Pet | null): any { }; } - diff --git a/samples/client/petstore/typescript-fetch/builds/default/models/Tag.ts b/samples/client/petstore/typescript-fetch/builds/default/models/Tag.ts index 8ea5895e79be4546a440850adf1c91351085d1b8..0c26039df46a6c87f9d5ac02c32db91d16de10b2 100644 --- a/samples/client/petstore/typescript-fetch/builds/default/models/Tag.ts +++ b/samples/client/petstore/typescript-fetch/builds/default/models/Tag.ts @@ -62,4 +62,3 @@ export function TagToJSON(value?: Tag | null): any { }; } - diff --git a/samples/client/petstore/typescript-fetch/builds/default/models/User.ts b/samples/client/petstore/typescript-fetch/builds/default/models/User.ts index 841b50d0fa2ea82c9efcdd9a98df665f7faaa4bc..89a7de983b018a3586050ec88c154bda996b3982 100644 --- a/samples/client/petstore/typescript-fetch/builds/default/models/User.ts +++ b/samples/client/petstore/typescript-fetch/builds/default/models/User.ts @@ -110,4 +110,3 @@ export function UserToJSON(value?: User | null): any { }; } - diff --git a/samples/client/petstore/typescript-fetch/builds/enum/models/EnumPatternObject.ts b/samples/client/petstore/typescript-fetch/builds/enum/models/EnumPatternObject.ts index a3d75bdfa6496cf4d431105cfa1cfa9a2752984f..e8fc617e08d18ac4c2d71b4109fc47baf8add7b8 100644 --- a/samples/client/petstore/typescript-fetch/builds/enum/models/EnumPatternObject.ts +++ b/samples/client/petstore/typescript-fetch/builds/enum/models/EnumPatternObject.ts @@ -89,4 +89,3 @@ export function EnumPatternObjectToJSON(value?: EnumPatternObject | null): any { }; } - diff --git a/samples/client/petstore/typescript-fetch/builds/enum/models/InlineObject.ts b/samples/client/petstore/typescript-fetch/builds/enum/models/InlineObject.ts index e6592c5be29da998065a0cd054d708a1870d6257..f192b042faec3002492900335311b3eb37e2306e 100644 --- a/samples/client/petstore/typescript-fetch/builds/enum/models/InlineObject.ts +++ b/samples/client/petstore/typescript-fetch/builds/enum/models/InlineObject.ts @@ -96,4 +96,3 @@ export function InlineObjectToJSON(value?: InlineObject | null): any { }; } - diff --git a/samples/client/petstore/typescript-fetch/builds/enum/models/InlineResponse200.ts b/samples/client/petstore/typescript-fetch/builds/enum/models/InlineResponse200.ts index 5b410f1ca9986a85b4cf3a7734856dd338e011f7..1d5c1714d16edec2408da1c02925013fd279aadc 100644 --- a/samples/client/petstore/typescript-fetch/builds/enum/models/InlineResponse200.ts +++ b/samples/client/petstore/typescript-fetch/builds/enum/models/InlineResponse200.ts @@ -96,4 +96,3 @@ export function InlineResponse200ToJSON(value?: InlineResponse200 | null): any { }; } - diff --git a/samples/client/petstore/typescript-fetch/builds/es6-target/src/models/Category.ts b/samples/client/petstore/typescript-fetch/builds/es6-target/src/models/Category.ts index faf9aabb9de13af71a9b5a5a106570b3e53f38e8..fe0e21ffb8bc047037b8469fedfb6ec4ae9feefc 100644 --- a/samples/client/petstore/typescript-fetch/builds/es6-target/src/models/Category.ts +++ b/samples/client/petstore/typescript-fetch/builds/es6-target/src/models/Category.ts @@ -62,4 +62,3 @@ export function CategoryToJSON(value?: Category | null): any { }; } - diff --git a/samples/client/petstore/typescript-fetch/builds/es6-target/src/models/ModelApiResponse.ts b/samples/client/petstore/typescript-fetch/builds/es6-target/src/models/ModelApiResponse.ts index 63fa57adc0339fe69021c68d357c1ba87c962f8c..6812901c37700936ec50ce551d3c4acc20f7ee27 100644 --- a/samples/client/petstore/typescript-fetch/builds/es6-target/src/models/ModelApiResponse.ts +++ b/samples/client/petstore/typescript-fetch/builds/es6-target/src/models/ModelApiResponse.ts @@ -70,4 +70,3 @@ export function ModelApiResponseToJSON(value?: ModelApiResponse | null): any { }; } - diff --git a/samples/client/petstore/typescript-fetch/builds/es6-target/src/models/Order.ts b/samples/client/petstore/typescript-fetch/builds/es6-target/src/models/Order.ts index 79b7455a6177c716fbe841d69d44c47240ad9c57..53163db8bc26087a08ba59d4c92e0d63de63a122 100644 --- a/samples/client/petstore/typescript-fetch/builds/es6-target/src/models/Order.ts +++ b/samples/client/petstore/typescript-fetch/builds/es6-target/src/models/Order.ts @@ -104,4 +104,3 @@ export function OrderToJSON(value?: Order | null): any { }; } - diff --git a/samples/client/petstore/typescript-fetch/builds/es6-target/src/models/Pet.ts b/samples/client/petstore/typescript-fetch/builds/es6-target/src/models/Pet.ts index 4cb69187ee0c296bd2d12041127dcae5bc076a26..9417338414aaf0d29524032af1c379e1f54475ff 100644 --- a/samples/client/petstore/typescript-fetch/builds/es6-target/src/models/Pet.ts +++ b/samples/client/petstore/typescript-fetch/builds/es6-target/src/models/Pet.ts @@ -115,4 +115,3 @@ export function PetToJSON(value?: Pet | null): any { }; } - diff --git a/samples/client/petstore/typescript-fetch/builds/es6-target/src/models/Tag.ts b/samples/client/petstore/typescript-fetch/builds/es6-target/src/models/Tag.ts index 8ea5895e79be4546a440850adf1c91351085d1b8..0c26039df46a6c87f9d5ac02c32db91d16de10b2 100644 --- a/samples/client/petstore/typescript-fetch/builds/es6-target/src/models/Tag.ts +++ b/samples/client/petstore/typescript-fetch/builds/es6-target/src/models/Tag.ts @@ -62,4 +62,3 @@ export function TagToJSON(value?: Tag | null): any { }; } - diff --git a/samples/client/petstore/typescript-fetch/builds/es6-target/src/models/User.ts b/samples/client/petstore/typescript-fetch/builds/es6-target/src/models/User.ts index 841b50d0fa2ea82c9efcdd9a98df665f7faaa4bc..89a7de983b018a3586050ec88c154bda996b3982 100644 --- a/samples/client/petstore/typescript-fetch/builds/es6-target/src/models/User.ts +++ b/samples/client/petstore/typescript-fetch/builds/es6-target/src/models/User.ts @@ -110,4 +110,3 @@ export function UserToJSON(value?: User | null): any { }; } - diff --git a/samples/client/petstore/typescript-fetch/builds/multiple-parameters/models/Category.ts b/samples/client/petstore/typescript-fetch/builds/multiple-parameters/models/Category.ts index faf9aabb9de13af71a9b5a5a106570b3e53f38e8..fe0e21ffb8bc047037b8469fedfb6ec4ae9feefc 100644 --- a/samples/client/petstore/typescript-fetch/builds/multiple-parameters/models/Category.ts +++ b/samples/client/petstore/typescript-fetch/builds/multiple-parameters/models/Category.ts @@ -62,4 +62,3 @@ export function CategoryToJSON(value?: Category | null): any { }; } - diff --git a/samples/client/petstore/typescript-fetch/builds/multiple-parameters/models/ModelApiResponse.ts b/samples/client/petstore/typescript-fetch/builds/multiple-parameters/models/ModelApiResponse.ts index 63fa57adc0339fe69021c68d357c1ba87c962f8c..6812901c37700936ec50ce551d3c4acc20f7ee27 100644 --- a/samples/client/petstore/typescript-fetch/builds/multiple-parameters/models/ModelApiResponse.ts +++ b/samples/client/petstore/typescript-fetch/builds/multiple-parameters/models/ModelApiResponse.ts @@ -70,4 +70,3 @@ export function ModelApiResponseToJSON(value?: ModelApiResponse | null): any { }; } - diff --git a/samples/client/petstore/typescript-fetch/builds/multiple-parameters/models/Order.ts b/samples/client/petstore/typescript-fetch/builds/multiple-parameters/models/Order.ts index 79b7455a6177c716fbe841d69d44c47240ad9c57..53163db8bc26087a08ba59d4c92e0d63de63a122 100644 --- a/samples/client/petstore/typescript-fetch/builds/multiple-parameters/models/Order.ts +++ b/samples/client/petstore/typescript-fetch/builds/multiple-parameters/models/Order.ts @@ -104,4 +104,3 @@ export function OrderToJSON(value?: Order | null): any { }; } - diff --git a/samples/client/petstore/typescript-fetch/builds/multiple-parameters/models/Pet.ts b/samples/client/petstore/typescript-fetch/builds/multiple-parameters/models/Pet.ts index 4cb69187ee0c296bd2d12041127dcae5bc076a26..9417338414aaf0d29524032af1c379e1f54475ff 100644 --- a/samples/client/petstore/typescript-fetch/builds/multiple-parameters/models/Pet.ts +++ b/samples/client/petstore/typescript-fetch/builds/multiple-parameters/models/Pet.ts @@ -115,4 +115,3 @@ export function PetToJSON(value?: Pet | null): any { }; } - diff --git a/samples/client/petstore/typescript-fetch/builds/multiple-parameters/models/Tag.ts b/samples/client/petstore/typescript-fetch/builds/multiple-parameters/models/Tag.ts index 8ea5895e79be4546a440850adf1c91351085d1b8..0c26039df46a6c87f9d5ac02c32db91d16de10b2 100644 --- a/samples/client/petstore/typescript-fetch/builds/multiple-parameters/models/Tag.ts +++ b/samples/client/petstore/typescript-fetch/builds/multiple-parameters/models/Tag.ts @@ -62,4 +62,3 @@ export function TagToJSON(value?: Tag | null): any { }; } - diff --git a/samples/client/petstore/typescript-fetch/builds/multiple-parameters/models/User.ts b/samples/client/petstore/typescript-fetch/builds/multiple-parameters/models/User.ts index 841b50d0fa2ea82c9efcdd9a98df665f7faaa4bc..89a7de983b018a3586050ec88c154bda996b3982 100644 --- a/samples/client/petstore/typescript-fetch/builds/multiple-parameters/models/User.ts +++ b/samples/client/petstore/typescript-fetch/builds/multiple-parameters/models/User.ts @@ -110,4 +110,3 @@ export function UserToJSON(value?: User | null): any { }; } - diff --git a/samples/client/petstore/typescript-fetch/builds/prefix-parameter-interfaces/src/models/Category.ts b/samples/client/petstore/typescript-fetch/builds/prefix-parameter-interfaces/src/models/Category.ts index faf9aabb9de13af71a9b5a5a106570b3e53f38e8..fe0e21ffb8bc047037b8469fedfb6ec4ae9feefc 100644 --- a/samples/client/petstore/typescript-fetch/builds/prefix-parameter-interfaces/src/models/Category.ts +++ b/samples/client/petstore/typescript-fetch/builds/prefix-parameter-interfaces/src/models/Category.ts @@ -62,4 +62,3 @@ export function CategoryToJSON(value?: Category | null): any { }; } - diff --git a/samples/client/petstore/typescript-fetch/builds/prefix-parameter-interfaces/src/models/ModelApiResponse.ts b/samples/client/petstore/typescript-fetch/builds/prefix-parameter-interfaces/src/models/ModelApiResponse.ts index 63fa57adc0339fe69021c68d357c1ba87c962f8c..6812901c37700936ec50ce551d3c4acc20f7ee27 100644 --- a/samples/client/petstore/typescript-fetch/builds/prefix-parameter-interfaces/src/models/ModelApiResponse.ts +++ b/samples/client/petstore/typescript-fetch/builds/prefix-parameter-interfaces/src/models/ModelApiResponse.ts @@ -70,4 +70,3 @@ export function ModelApiResponseToJSON(value?: ModelApiResponse | null): any { }; } - diff --git a/samples/client/petstore/typescript-fetch/builds/prefix-parameter-interfaces/src/models/Order.ts b/samples/client/petstore/typescript-fetch/builds/prefix-parameter-interfaces/src/models/Order.ts index 79b7455a6177c716fbe841d69d44c47240ad9c57..53163db8bc26087a08ba59d4c92e0d63de63a122 100644 --- a/samples/client/petstore/typescript-fetch/builds/prefix-parameter-interfaces/src/models/Order.ts +++ b/samples/client/petstore/typescript-fetch/builds/prefix-parameter-interfaces/src/models/Order.ts @@ -104,4 +104,3 @@ export function OrderToJSON(value?: Order | null): any { }; } - diff --git a/samples/client/petstore/typescript-fetch/builds/prefix-parameter-interfaces/src/models/Pet.ts b/samples/client/petstore/typescript-fetch/builds/prefix-parameter-interfaces/src/models/Pet.ts index 4cb69187ee0c296bd2d12041127dcae5bc076a26..9417338414aaf0d29524032af1c379e1f54475ff 100644 --- a/samples/client/petstore/typescript-fetch/builds/prefix-parameter-interfaces/src/models/Pet.ts +++ b/samples/client/petstore/typescript-fetch/builds/prefix-parameter-interfaces/src/models/Pet.ts @@ -115,4 +115,3 @@ export function PetToJSON(value?: Pet | null): any { }; } - diff --git a/samples/client/petstore/typescript-fetch/builds/prefix-parameter-interfaces/src/models/Tag.ts b/samples/client/petstore/typescript-fetch/builds/prefix-parameter-interfaces/src/models/Tag.ts index 8ea5895e79be4546a440850adf1c91351085d1b8..0c26039df46a6c87f9d5ac02c32db91d16de10b2 100644 --- a/samples/client/petstore/typescript-fetch/builds/prefix-parameter-interfaces/src/models/Tag.ts +++ b/samples/client/petstore/typescript-fetch/builds/prefix-parameter-interfaces/src/models/Tag.ts @@ -62,4 +62,3 @@ export function TagToJSON(value?: Tag | null): any { }; } - diff --git a/samples/client/petstore/typescript-fetch/builds/prefix-parameter-interfaces/src/models/User.ts b/samples/client/petstore/typescript-fetch/builds/prefix-parameter-interfaces/src/models/User.ts index 841b50d0fa2ea82c9efcdd9a98df665f7faaa4bc..89a7de983b018a3586050ec88c154bda996b3982 100644 --- a/samples/client/petstore/typescript-fetch/builds/prefix-parameter-interfaces/src/models/User.ts +++ b/samples/client/petstore/typescript-fetch/builds/prefix-parameter-interfaces/src/models/User.ts @@ -110,4 +110,3 @@ export function UserToJSON(value?: User | null): any { }; } - diff --git a/samples/client/petstore/typescript-fetch/builds/sagas-and-records/src/models/Category.ts b/samples/client/petstore/typescript-fetch/builds/sagas-and-records/src/models/Category.ts index faf9aabb9de13af71a9b5a5a106570b3e53f38e8..fe0e21ffb8bc047037b8469fedfb6ec4ae9feefc 100644 --- a/samples/client/petstore/typescript-fetch/builds/sagas-and-records/src/models/Category.ts +++ b/samples/client/petstore/typescript-fetch/builds/sagas-and-records/src/models/Category.ts @@ -62,4 +62,3 @@ export function CategoryToJSON(value?: Category | null): any { }; } - diff --git a/samples/client/petstore/typescript-fetch/builds/sagas-and-records/src/models/DefaultMetaOnlyResponse.ts b/samples/client/petstore/typescript-fetch/builds/sagas-and-records/src/models/DefaultMetaOnlyResponse.ts index b6ac416539aeadd4228d9ddb61681a4a6839d17c..b7fda0a183e1a0f8ae66050ba3d4f253bd165f6f 100644 --- a/samples/client/petstore/typescript-fetch/builds/sagas-and-records/src/models/DefaultMetaOnlyResponse.ts +++ b/samples/client/petstore/typescript-fetch/builds/sagas-and-records/src/models/DefaultMetaOnlyResponse.ts @@ -61,4 +61,3 @@ export function DefaultMetaOnlyResponseToJSON(value?: DefaultMetaOnlyResponse | }; } - diff --git a/samples/client/petstore/typescript-fetch/builds/sagas-and-records/src/models/FindPetsByStatusResponse.ts b/samples/client/petstore/typescript-fetch/builds/sagas-and-records/src/models/FindPetsByStatusResponse.ts index 6118e070e108b1d5415c6fd5283007e17b476719..9562ca6e87c18b33a28c01cc9e8aa554f61d4119 100644 --- a/samples/client/petstore/typescript-fetch/builds/sagas-and-records/src/models/FindPetsByStatusResponse.ts +++ b/samples/client/petstore/typescript-fetch/builds/sagas-and-records/src/models/FindPetsByStatusResponse.ts @@ -73,4 +73,3 @@ export function FindPetsByStatusResponseToJSON(value?: FindPetsByStatusResponse }; } - diff --git a/samples/client/petstore/typescript-fetch/builds/sagas-and-records/src/models/FindPetsByUserResponse.ts b/samples/client/petstore/typescript-fetch/builds/sagas-and-records/src/models/FindPetsByUserResponse.ts index 9f010d3b32b65a0ea61e1e3f53d91c889633ce74..42c2da380fac79528fa468899fe574cc546ff028 100644 --- a/samples/client/petstore/typescript-fetch/builds/sagas-and-records/src/models/FindPetsByUserResponse.ts +++ b/samples/client/petstore/typescript-fetch/builds/sagas-and-records/src/models/FindPetsByUserResponse.ts @@ -73,4 +73,3 @@ export function FindPetsByUserResponseToJSON(value?: FindPetsByUserResponse | nu }; } - diff --git a/samples/client/petstore/typescript-fetch/builds/sagas-and-records/src/models/GetBehaviorPermissionsResponse.ts b/samples/client/petstore/typescript-fetch/builds/sagas-and-records/src/models/GetBehaviorPermissionsResponse.ts index 98f03260391aaf2ff2395aface58e8cb6ae2ad51..b011c2c69a71ba25b7dba6f0c6776a4408530b49 100644 --- a/samples/client/petstore/typescript-fetch/builds/sagas-and-records/src/models/GetBehaviorPermissionsResponse.ts +++ b/samples/client/petstore/typescript-fetch/builds/sagas-and-records/src/models/GetBehaviorPermissionsResponse.ts @@ -69,4 +69,3 @@ export function GetBehaviorPermissionsResponseToJSON(value?: GetBehaviorPermissi }; } - diff --git a/samples/client/petstore/typescript-fetch/builds/sagas-and-records/src/models/GetBehaviorTypeResponse.ts b/samples/client/petstore/typescript-fetch/builds/sagas-and-records/src/models/GetBehaviorTypeResponse.ts index da5e918c40fc61acc13d2fae63732fea33792b58..924639ae1961e1b796714cfa9e6939bc44b26d49 100644 --- a/samples/client/petstore/typescript-fetch/builds/sagas-and-records/src/models/GetBehaviorTypeResponse.ts +++ b/samples/client/petstore/typescript-fetch/builds/sagas-and-records/src/models/GetBehaviorTypeResponse.ts @@ -73,4 +73,3 @@ export function GetBehaviorTypeResponseToJSON(value?: GetBehaviorTypeResponse | }; } - diff --git a/samples/client/petstore/typescript-fetch/builds/sagas-and-records/src/models/GetMatchingPartsResponse.ts b/samples/client/petstore/typescript-fetch/builds/sagas-and-records/src/models/GetMatchingPartsResponse.ts index ea8f86a0252b706a7c42ec9837c857dfca4be56d..76174ef6fcd81e2027f35d282fb5dc4f12152be0 100644 --- a/samples/client/petstore/typescript-fetch/builds/sagas-and-records/src/models/GetMatchingPartsResponse.ts +++ b/samples/client/petstore/typescript-fetch/builds/sagas-and-records/src/models/GetMatchingPartsResponse.ts @@ -73,4 +73,3 @@ export function GetMatchingPartsResponseToJSON(value?: GetMatchingPartsResponse }; } - diff --git a/samples/client/petstore/typescript-fetch/builds/sagas-and-records/src/models/GetPetPartTypeResponse.ts b/samples/client/petstore/typescript-fetch/builds/sagas-and-records/src/models/GetPetPartTypeResponse.ts index b0b43d1b96b8fc7f7313b1a309218052888e64ea..d7a2811374131a97794ba672fe2d6ea06bb34930 100644 --- a/samples/client/petstore/typescript-fetch/builds/sagas-and-records/src/models/GetPetPartTypeResponse.ts +++ b/samples/client/petstore/typescript-fetch/builds/sagas-and-records/src/models/GetPetPartTypeResponse.ts @@ -73,4 +73,3 @@ export function GetPetPartTypeResponseToJSON(value?: GetPetPartTypeResponse | nu }; } - diff --git a/samples/client/petstore/typescript-fetch/builds/sagas-and-records/src/models/ItemId.ts b/samples/client/petstore/typescript-fetch/builds/sagas-and-records/src/models/ItemId.ts index c158400740c70e1b32879c2f9c41f6c1a405508c..53a7096ca2839b186ca6e962fddbf960799a1ecd 100644 --- a/samples/client/petstore/typescript-fetch/builds/sagas-and-records/src/models/ItemId.ts +++ b/samples/client/petstore/typescript-fetch/builds/sagas-and-records/src/models/ItemId.ts @@ -62,4 +62,3 @@ export function ItemIdToJSON(value?: ItemId | null): any { }; } - diff --git a/samples/client/petstore/typescript-fetch/builds/sagas-and-records/src/models/MatchingParts.ts b/samples/client/petstore/typescript-fetch/builds/sagas-and-records/src/models/MatchingParts.ts index 790f42e9a530854a6020f30f590073d8aaa15cd2..7cd3d6c3352acf83d8ee9f31685f4754889cd590 100644 --- a/samples/client/petstore/typescript-fetch/builds/sagas-and-records/src/models/MatchingParts.ts +++ b/samples/client/petstore/typescript-fetch/builds/sagas-and-records/src/models/MatchingParts.ts @@ -69,4 +69,3 @@ export function MatchingPartsToJSON(value?: MatchingParts | null): any { }; } - diff --git a/samples/client/petstore/typescript-fetch/builds/sagas-and-records/src/models/ModelApiResponse.ts b/samples/client/petstore/typescript-fetch/builds/sagas-and-records/src/models/ModelApiResponse.ts index 63fa57adc0339fe69021c68d357c1ba87c962f8c..6812901c37700936ec50ce551d3c4acc20f7ee27 100644 --- a/samples/client/petstore/typescript-fetch/builds/sagas-and-records/src/models/ModelApiResponse.ts +++ b/samples/client/petstore/typescript-fetch/builds/sagas-and-records/src/models/ModelApiResponse.ts @@ -70,4 +70,3 @@ export function ModelApiResponseToJSON(value?: ModelApiResponse | null): any { }; } - diff --git a/samples/client/petstore/typescript-fetch/builds/sagas-and-records/src/models/ModelError.ts b/samples/client/petstore/typescript-fetch/builds/sagas-and-records/src/models/ModelError.ts index be3cda0de1bd690491eb6b6a91bb05a4e5dc3048..8e509add65c2367eb966304a0455065190ca202a 100644 --- a/samples/client/petstore/typescript-fetch/builds/sagas-and-records/src/models/ModelError.ts +++ b/samples/client/petstore/typescript-fetch/builds/sagas-and-records/src/models/ModelError.ts @@ -85,4 +85,3 @@ export function ModelErrorToJSON(value?: ModelError | null): any { }; } - diff --git a/samples/client/petstore/typescript-fetch/builds/sagas-and-records/src/models/Order.ts b/samples/client/petstore/typescript-fetch/builds/sagas-and-records/src/models/Order.ts index 79b7455a6177c716fbe841d69d44c47240ad9c57..53163db8bc26087a08ba59d4c92e0d63de63a122 100644 --- a/samples/client/petstore/typescript-fetch/builds/sagas-and-records/src/models/Order.ts +++ b/samples/client/petstore/typescript-fetch/builds/sagas-and-records/src/models/Order.ts @@ -104,4 +104,3 @@ export function OrderToJSON(value?: Order | null): any { }; } - diff --git a/samples/client/petstore/typescript-fetch/builds/sagas-and-records/src/models/Part.ts b/samples/client/petstore/typescript-fetch/builds/sagas-and-records/src/models/Part.ts index e5a66755d759e8ff8af81514bb4bbffe40e6bd87..13e324d63cd9f8992d4857dab5a2b5c2767b0376 100644 --- a/samples/client/petstore/typescript-fetch/builds/sagas-and-records/src/models/Part.ts +++ b/samples/client/petstore/typescript-fetch/builds/sagas-and-records/src/models/Part.ts @@ -62,4 +62,3 @@ export function PartToJSON(value?: Part | null): any { }; } - diff --git a/samples/client/petstore/typescript-fetch/builds/sagas-and-records/src/models/Pet.ts b/samples/client/petstore/typescript-fetch/builds/sagas-and-records/src/models/Pet.ts index 4a79974b1ef61c2e997cbc8975c2352506e2379c..52488a844beaac98758275aacfb3eb989f73e0c7 100644 --- a/samples/client/petstore/typescript-fetch/builds/sagas-and-records/src/models/Pet.ts +++ b/samples/client/petstore/typescript-fetch/builds/sagas-and-records/src/models/Pet.ts @@ -235,4 +235,3 @@ export function PetToJSON(value?: Pet | null): any { }; } - diff --git a/samples/client/petstore/typescript-fetch/builds/sagas-and-records/src/models/ResponseMeta.ts b/samples/client/petstore/typescript-fetch/builds/sagas-and-records/src/models/ResponseMeta.ts index 5b63ca5e8c54571502088b03285bbfee096fff75..38fdca904cf57e13dc861e2c3d4eefaab60482ba 100644 --- a/samples/client/petstore/typescript-fetch/builds/sagas-and-records/src/models/ResponseMeta.ts +++ b/samples/client/petstore/typescript-fetch/builds/sagas-and-records/src/models/ResponseMeta.ts @@ -131,4 +131,3 @@ export function ResponseMetaToJSON(value?: ResponseMeta | null): any { }; } - diff --git a/samples/client/petstore/typescript-fetch/builds/sagas-and-records/src/models/Tag.ts b/samples/client/petstore/typescript-fetch/builds/sagas-and-records/src/models/Tag.ts index 8ea5895e79be4546a440850adf1c91351085d1b8..0c26039df46a6c87f9d5ac02c32db91d16de10b2 100644 --- a/samples/client/petstore/typescript-fetch/builds/sagas-and-records/src/models/Tag.ts +++ b/samples/client/petstore/typescript-fetch/builds/sagas-and-records/src/models/Tag.ts @@ -62,4 +62,3 @@ export function TagToJSON(value?: Tag | null): any { }; } - diff --git a/samples/client/petstore/typescript-fetch/builds/sagas-and-records/src/models/User.ts b/samples/client/petstore/typescript-fetch/builds/sagas-and-records/src/models/User.ts index 6219c91e3e46a1ad9d4b2958e3cc123b194b6fb4..5567e888fe02f2eff9a930f4f5219556e76038b9 100644 --- a/samples/client/petstore/typescript-fetch/builds/sagas-and-records/src/models/User.ts +++ b/samples/client/petstore/typescript-fetch/builds/sagas-and-records/src/models/User.ts @@ -126,4 +126,3 @@ export function UserToJSON(value?: User | null): any { }; } - diff --git a/samples/client/petstore/typescript-fetch/builds/typescript-three-plus/src/models/Category.ts b/samples/client/petstore/typescript-fetch/builds/typescript-three-plus/src/models/Category.ts index faf9aabb9de13af71a9b5a5a106570b3e53f38e8..fe0e21ffb8bc047037b8469fedfb6ec4ae9feefc 100644 --- a/samples/client/petstore/typescript-fetch/builds/typescript-three-plus/src/models/Category.ts +++ b/samples/client/petstore/typescript-fetch/builds/typescript-three-plus/src/models/Category.ts @@ -62,4 +62,3 @@ export function CategoryToJSON(value?: Category | null): any { }; } - diff --git a/samples/client/petstore/typescript-fetch/builds/typescript-three-plus/src/models/ModelApiResponse.ts b/samples/client/petstore/typescript-fetch/builds/typescript-three-plus/src/models/ModelApiResponse.ts index 63fa57adc0339fe69021c68d357c1ba87c962f8c..6812901c37700936ec50ce551d3c4acc20f7ee27 100644 --- a/samples/client/petstore/typescript-fetch/builds/typescript-three-plus/src/models/ModelApiResponse.ts +++ b/samples/client/petstore/typescript-fetch/builds/typescript-three-plus/src/models/ModelApiResponse.ts @@ -70,4 +70,3 @@ export function ModelApiResponseToJSON(value?: ModelApiResponse | null): any { }; } - diff --git a/samples/client/petstore/typescript-fetch/builds/typescript-three-plus/src/models/Order.ts b/samples/client/petstore/typescript-fetch/builds/typescript-three-plus/src/models/Order.ts index 79b7455a6177c716fbe841d69d44c47240ad9c57..53163db8bc26087a08ba59d4c92e0d63de63a122 100644 --- a/samples/client/petstore/typescript-fetch/builds/typescript-three-plus/src/models/Order.ts +++ b/samples/client/petstore/typescript-fetch/builds/typescript-three-plus/src/models/Order.ts @@ -104,4 +104,3 @@ export function OrderToJSON(value?: Order | null): any { }; } - diff --git a/samples/client/petstore/typescript-fetch/builds/typescript-three-plus/src/models/Pet.ts b/samples/client/petstore/typescript-fetch/builds/typescript-three-plus/src/models/Pet.ts index 4cb69187ee0c296bd2d12041127dcae5bc076a26..9417338414aaf0d29524032af1c379e1f54475ff 100644 --- a/samples/client/petstore/typescript-fetch/builds/typescript-three-plus/src/models/Pet.ts +++ b/samples/client/petstore/typescript-fetch/builds/typescript-three-plus/src/models/Pet.ts @@ -115,4 +115,3 @@ export function PetToJSON(value?: Pet | null): any { }; } - diff --git a/samples/client/petstore/typescript-fetch/builds/typescript-three-plus/src/models/Tag.ts b/samples/client/petstore/typescript-fetch/builds/typescript-three-plus/src/models/Tag.ts index 8ea5895e79be4546a440850adf1c91351085d1b8..0c26039df46a6c87f9d5ac02c32db91d16de10b2 100644 --- a/samples/client/petstore/typescript-fetch/builds/typescript-three-plus/src/models/Tag.ts +++ b/samples/client/petstore/typescript-fetch/builds/typescript-three-plus/src/models/Tag.ts @@ -62,4 +62,3 @@ export function TagToJSON(value?: Tag | null): any { }; } - diff --git a/samples/client/petstore/typescript-fetch/builds/typescript-three-plus/src/models/User.ts b/samples/client/petstore/typescript-fetch/builds/typescript-three-plus/src/models/User.ts index 841b50d0fa2ea82c9efcdd9a98df665f7faaa4bc..89a7de983b018a3586050ec88c154bda996b3982 100644 --- a/samples/client/petstore/typescript-fetch/builds/typescript-three-plus/src/models/User.ts +++ b/samples/client/petstore/typescript-fetch/builds/typescript-three-plus/src/models/User.ts @@ -110,4 +110,3 @@ export function UserToJSON(value?: User | null): any { }; } - diff --git a/samples/client/petstore/typescript-fetch/builds/with-interfaces/models/Category.ts b/samples/client/petstore/typescript-fetch/builds/with-interfaces/models/Category.ts index faf9aabb9de13af71a9b5a5a106570b3e53f38e8..fe0e21ffb8bc047037b8469fedfb6ec4ae9feefc 100644 --- a/samples/client/petstore/typescript-fetch/builds/with-interfaces/models/Category.ts +++ b/samples/client/petstore/typescript-fetch/builds/with-interfaces/models/Category.ts @@ -62,4 +62,3 @@ export function CategoryToJSON(value?: Category | null): any { }; } - diff --git a/samples/client/petstore/typescript-fetch/builds/with-interfaces/models/ModelApiResponse.ts b/samples/client/petstore/typescript-fetch/builds/with-interfaces/models/ModelApiResponse.ts index 63fa57adc0339fe69021c68d357c1ba87c962f8c..6812901c37700936ec50ce551d3c4acc20f7ee27 100644 --- a/samples/client/petstore/typescript-fetch/builds/with-interfaces/models/ModelApiResponse.ts +++ b/samples/client/petstore/typescript-fetch/builds/with-interfaces/models/ModelApiResponse.ts @@ -70,4 +70,3 @@ export function ModelApiResponseToJSON(value?: ModelApiResponse | null): any { }; } - diff --git a/samples/client/petstore/typescript-fetch/builds/with-interfaces/models/Order.ts b/samples/client/petstore/typescript-fetch/builds/with-interfaces/models/Order.ts index 79b7455a6177c716fbe841d69d44c47240ad9c57..53163db8bc26087a08ba59d4c92e0d63de63a122 100644 --- a/samples/client/petstore/typescript-fetch/builds/with-interfaces/models/Order.ts +++ b/samples/client/petstore/typescript-fetch/builds/with-interfaces/models/Order.ts @@ -104,4 +104,3 @@ export function OrderToJSON(value?: Order | null): any { }; } - diff --git a/samples/client/petstore/typescript-fetch/builds/with-interfaces/models/Pet.ts b/samples/client/petstore/typescript-fetch/builds/with-interfaces/models/Pet.ts index 4cb69187ee0c296bd2d12041127dcae5bc076a26..9417338414aaf0d29524032af1c379e1f54475ff 100644 --- a/samples/client/petstore/typescript-fetch/builds/with-interfaces/models/Pet.ts +++ b/samples/client/petstore/typescript-fetch/builds/with-interfaces/models/Pet.ts @@ -115,4 +115,3 @@ export function PetToJSON(value?: Pet | null): any { }; } - diff --git a/samples/client/petstore/typescript-fetch/builds/with-interfaces/models/Tag.ts b/samples/client/petstore/typescript-fetch/builds/with-interfaces/models/Tag.ts index 8ea5895e79be4546a440850adf1c91351085d1b8..0c26039df46a6c87f9d5ac02c32db91d16de10b2 100644 --- a/samples/client/petstore/typescript-fetch/builds/with-interfaces/models/Tag.ts +++ b/samples/client/petstore/typescript-fetch/builds/with-interfaces/models/Tag.ts @@ -62,4 +62,3 @@ export function TagToJSON(value?: Tag | null): any { }; } - diff --git a/samples/client/petstore/typescript-fetch/builds/with-interfaces/models/User.ts b/samples/client/petstore/typescript-fetch/builds/with-interfaces/models/User.ts index 841b50d0fa2ea82c9efcdd9a98df665f7faaa4bc..89a7de983b018a3586050ec88c154bda996b3982 100644 --- a/samples/client/petstore/typescript-fetch/builds/with-interfaces/models/User.ts +++ b/samples/client/petstore/typescript-fetch/builds/with-interfaces/models/User.ts @@ -110,4 +110,3 @@ export function UserToJSON(value?: User | null): any { }; } - diff --git a/samples/client/petstore/typescript-fetch/builds/with-npm-version/src/models/Category.ts b/samples/client/petstore/typescript-fetch/builds/with-npm-version/src/models/Category.ts index faf9aabb9de13af71a9b5a5a106570b3e53f38e8..fe0e21ffb8bc047037b8469fedfb6ec4ae9feefc 100644 --- a/samples/client/petstore/typescript-fetch/builds/with-npm-version/src/models/Category.ts +++ b/samples/client/petstore/typescript-fetch/builds/with-npm-version/src/models/Category.ts @@ -62,4 +62,3 @@ export function CategoryToJSON(value?: Category | null): any { }; } - diff --git a/samples/client/petstore/typescript-fetch/builds/with-npm-version/src/models/ModelApiResponse.ts b/samples/client/petstore/typescript-fetch/builds/with-npm-version/src/models/ModelApiResponse.ts index 63fa57adc0339fe69021c68d357c1ba87c962f8c..6812901c37700936ec50ce551d3c4acc20f7ee27 100644 --- a/samples/client/petstore/typescript-fetch/builds/with-npm-version/src/models/ModelApiResponse.ts +++ b/samples/client/petstore/typescript-fetch/builds/with-npm-version/src/models/ModelApiResponse.ts @@ -70,4 +70,3 @@ export function ModelApiResponseToJSON(value?: ModelApiResponse | null): any { }; } - diff --git a/samples/client/petstore/typescript-fetch/builds/with-npm-version/src/models/Order.ts b/samples/client/petstore/typescript-fetch/builds/with-npm-version/src/models/Order.ts index 79b7455a6177c716fbe841d69d44c47240ad9c57..53163db8bc26087a08ba59d4c92e0d63de63a122 100644 --- a/samples/client/petstore/typescript-fetch/builds/with-npm-version/src/models/Order.ts +++ b/samples/client/petstore/typescript-fetch/builds/with-npm-version/src/models/Order.ts @@ -104,4 +104,3 @@ export function OrderToJSON(value?: Order | null): any { }; } - diff --git a/samples/client/petstore/typescript-fetch/builds/with-npm-version/src/models/Pet.ts b/samples/client/petstore/typescript-fetch/builds/with-npm-version/src/models/Pet.ts index 4cb69187ee0c296bd2d12041127dcae5bc076a26..9417338414aaf0d29524032af1c379e1f54475ff 100644 --- a/samples/client/petstore/typescript-fetch/builds/with-npm-version/src/models/Pet.ts +++ b/samples/client/petstore/typescript-fetch/builds/with-npm-version/src/models/Pet.ts @@ -115,4 +115,3 @@ export function PetToJSON(value?: Pet | null): any { }; } - diff --git a/samples/client/petstore/typescript-fetch/builds/with-npm-version/src/models/Tag.ts b/samples/client/petstore/typescript-fetch/builds/with-npm-version/src/models/Tag.ts index 8ea5895e79be4546a440850adf1c91351085d1b8..0c26039df46a6c87f9d5ac02c32db91d16de10b2 100644 --- a/samples/client/petstore/typescript-fetch/builds/with-npm-version/src/models/Tag.ts +++ b/samples/client/petstore/typescript-fetch/builds/with-npm-version/src/models/Tag.ts @@ -62,4 +62,3 @@ export function TagToJSON(value?: Tag | null): any { }; } - diff --git a/samples/client/petstore/typescript-fetch/builds/with-npm-version/src/models/User.ts b/samples/client/petstore/typescript-fetch/builds/with-npm-version/src/models/User.ts index 841b50d0fa2ea82c9efcdd9a98df665f7faaa4bc..89a7de983b018a3586050ec88c154bda996b3982 100644 --- a/samples/client/petstore/typescript-fetch/builds/with-npm-version/src/models/User.ts +++ b/samples/client/petstore/typescript-fetch/builds/with-npm-version/src/models/User.ts @@ -110,4 +110,3 @@ export function UserToJSON(value?: User | null): any { }; } - diff --git a/samples/client/petstore/typescript-jquery/default/git_push.sh b/samples/client/petstore/typescript-jquery/default/git_push.sh index ced3be2b0c7b2349ff06d18da19d4b31435c9fa6..9405f72e950cdb8ca24c3cf4d15cee7eac62fde7 100644 --- a/samples/client/petstore/typescript-jquery/default/git_push.sh +++ b/samples/client/petstore/typescript-jquery/default/git_push.sh @@ -55,4 +55,3 @@ 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/typescript-jquery/npm/git_push.sh b/samples/client/petstore/typescript-jquery/npm/git_push.sh index ced3be2b0c7b2349ff06d18da19d4b31435c9fa6..9405f72e950cdb8ca24c3cf4d15cee7eac62fde7 100644 --- a/samples/client/petstore/typescript-jquery/npm/git_push.sh +++ b/samples/client/petstore/typescript-jquery/npm/git_push.sh @@ -55,4 +55,3 @@ 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/typescript-jquery/npm/tsconfig.json b/samples/client/petstore/typescript-jquery/npm/tsconfig.json index 8df90ec7395e793fc494efd6a31fc4b231140725..e15ee4c5762c8925d540ecbc8a05b9ef17d3ecb2 100644 --- a/samples/client/petstore/typescript-jquery/npm/tsconfig.json +++ b/samples/client/petstore/typescript-jquery/npm/tsconfig.json @@ -17,4 +17,3 @@ "index.ts" ] } - diff --git a/samples/client/petstore/typescript-nestjs-v6-provided-in-root/builds/default/README.md b/samples/client/petstore/typescript-nestjs-v6-provided-in-root/builds/default/README.md index b4b5af14e2d86c1c33bb31d0b86fd412a707a040..87ba2bd0f074edfd578b0624bc44d273984a71ba 100644 --- a/samples/client/petstore/typescript-nestjs-v6-provided-in-root/builds/default/README.md +++ b/samples/client/petstore/typescript-nestjs-v6-provided-in-root/builds/default/README.md @@ -82,7 +82,7 @@ export class AppModule { ### Set service base path -If different than the generated base path, during app bootstrap, you can provide the base path to your service. +If different than the generated base path, during app bootstrap, you can provide the base path to your service. ``` import { BASE_PATH } from '@openapitools/typescript-nestjs-petstore'; @@ -127,9 +127,9 @@ import { environment } from '../environments/environment'; ], imports: [ ], providers: [ - { - provide: 'BASE_PATH', - useValue: environment.API_BASE_PATH + { + provide: 'BASE_PATH', + useValue: environment.API_BASE_PATH } ] }) diff --git a/samples/client/petstore/typescript-nestjs-v6-provided-in-root/builds/default/api/pet.service.ts b/samples/client/petstore/typescript-nestjs-v6-provided-in-root/builds/default/api/pet.service.ts index 1abb6e5121c71c0882426829e2828a9d62b12649..904a952268c8d5c7b186b5b2ce667ffa30f1c062 100644 --- a/samples/client/petstore/typescript-nestjs-v6-provided-in-root/builds/default/api/pet.service.ts +++ b/samples/client/petstore/typescript-nestjs-v6-provided-in-root/builds/default/api/pet.service.ts @@ -152,7 +152,7 @@ export class PetService { throw new Error('Required parameter status was null or undefined when calling findPetsByStatus.'); } - let queryParameters = {}; + let queryParameters = {}; if (status !== undefined && status !== null) { queryParameters['status'] = <any>status; } @@ -202,7 +202,7 @@ export class PetService { throw new Error('Required parameter tags was null or undefined when calling findPetsByTags.'); } - let queryParameters = {}; + let queryParameters = {}; if (tags !== undefined && tags !== null) { queryParameters['tags'] = <any>tags; } diff --git a/samples/client/petstore/typescript-nestjs-v6-provided-in-root/builds/default/api/user.service.ts b/samples/client/petstore/typescript-nestjs-v6-provided-in-root/builds/default/api/user.service.ts index 339b02d4650ddf0272040fa9a9988ddec8df9d91..a1eb47d8fd090d9073468961cb284e9914d0a149 100644 --- a/samples/client/petstore/typescript-nestjs-v6-provided-in-root/builds/default/api/user.service.ts +++ b/samples/client/petstore/typescript-nestjs-v6-provided-in-root/builds/default/api/user.service.ts @@ -268,7 +268,7 @@ export class UserService { throw new Error('Required parameter password was null or undefined when calling loginUser.'); } - let queryParameters = {}; + let queryParameters = {}; if (username !== undefined && username !== null) { queryParameters['username'] = <any>username; } diff --git a/samples/client/petstore/typescript-nestjs-v6-provided-in-root/builds/default/git_push.sh b/samples/client/petstore/typescript-nestjs-v6-provided-in-root/builds/default/git_push.sh index ced3be2b0c7b2349ff06d18da19d4b31435c9fa6..9405f72e950cdb8ca24c3cf4d15cee7eac62fde7 100644 --- a/samples/client/petstore/typescript-nestjs-v6-provided-in-root/builds/default/git_push.sh +++ b/samples/client/petstore/typescript-nestjs-v6-provided-in-root/builds/default/git_push.sh @@ -55,4 +55,3 @@ 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/typescript-nestjs-v6-provided-in-root/builds/default/package.json b/samples/client/petstore/typescript-nestjs-v6-provided-in-root/builds/default/package.json index 88bcf553b2892790cba362a4f2b018664d7e1024..daba3da51b86b27c425981bd9aafbe5fc66fda4f 100644 --- a/samples/client/petstore/typescript-nestjs-v6-provided-in-root/builds/default/package.json +++ b/samples/client/petstore/typescript-nestjs-v6-provided-in-root/builds/default/package.json @@ -48,7 +48,7 @@ "tslint": "5.18.0", "typescript": "3.5.3", "wait-on": "^3.2.0" - }, + }, "jest": { "moduleFileExtensions": [ "js", diff --git a/samples/client/petstore/typescript-nestjs-v6-provided-in-root/builds/default/tsconfig.json b/samples/client/petstore/typescript-nestjs-v6-provided-in-root/builds/default/tsconfig.json index e72eb8d52763558c132f736be8a9b8338a44e84d..c71e17c1b8aed3c5124715f24da7e1783c9e673e 100644 --- a/samples/client/petstore/typescript-nestjs-v6-provided-in-root/builds/default/tsconfig.json +++ b/samples/client/petstore/typescript-nestjs-v6-provided-in-root/builds/default/tsconfig.json @@ -6,7 +6,7 @@ "emitDecoratorMetadata": true, "experimentalDecorators": true, "target": "es5", - "sourceMap": true, + "sourceMap": true, "outDir": "./dist", "baseUrl": "./", "incremental": true diff --git a/samples/client/petstore/typescript-node/default/git_push.sh b/samples/client/petstore/typescript-node/default/git_push.sh index ced3be2b0c7b2349ff06d18da19d4b31435c9fa6..9405f72e950cdb8ca24c3cf4d15cee7eac62fde7 100644 --- a/samples/client/petstore/typescript-node/default/git_push.sh +++ b/samples/client/petstore/typescript-node/default/git_push.sh @@ -55,4 +55,3 @@ 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/typescript-node/npm/git_push.sh b/samples/client/petstore/typescript-node/npm/git_push.sh index ced3be2b0c7b2349ff06d18da19d4b31435c9fa6..9405f72e950cdb8ca24c3cf4d15cee7eac62fde7 100644 --- a/samples/client/petstore/typescript-node/npm/git_push.sh +++ b/samples/client/petstore/typescript-node/npm/git_push.sh @@ -55,4 +55,3 @@ 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/typescript-rxjs/builds/default/runtime.ts b/samples/client/petstore/typescript-rxjs/builds/default/runtime.ts index cc22d83bfd91f3ad5ac28ad00cf397d74aef3761..21d1e39ec39ddfec3f608cb6aa77712d6e2d7aed 100644 --- a/samples/client/petstore/typescript-rxjs/builds/default/runtime.ts +++ b/samples/client/petstore/typescript-rxjs/builds/default/runtime.ts @@ -155,7 +155,7 @@ export type HttpBody = Json | FormData; export interface RequestOpts extends AjaxRequest { query?: HttpQuery; // additional prop - // the following props have improved types over AjaxRequest + // the following props have improved types over AjaxRequest method: HttpMethod; headers?: HttpHeaders; body?: HttpBody; @@ -170,7 +170,7 @@ export interface OperationOpts { responseOpts?: ResponseOpts; } -// AjaxResponse with typed response +// AjaxResponse with typed response export interface RawAjaxResponse<T> extends AjaxResponse { response: T; } diff --git a/samples/client/petstore/typescript-rxjs/builds/es6-target/runtime.ts b/samples/client/petstore/typescript-rxjs/builds/es6-target/runtime.ts index cc22d83bfd91f3ad5ac28ad00cf397d74aef3761..21d1e39ec39ddfec3f608cb6aa77712d6e2d7aed 100644 --- a/samples/client/petstore/typescript-rxjs/builds/es6-target/runtime.ts +++ b/samples/client/petstore/typescript-rxjs/builds/es6-target/runtime.ts @@ -155,7 +155,7 @@ export type HttpBody = Json | FormData; export interface RequestOpts extends AjaxRequest { query?: HttpQuery; // additional prop - // the following props have improved types over AjaxRequest + // the following props have improved types over AjaxRequest method: HttpMethod; headers?: HttpHeaders; body?: HttpBody; @@ -170,7 +170,7 @@ export interface OperationOpts { responseOpts?: ResponseOpts; } -// AjaxResponse with typed response +// AjaxResponse with typed response export interface RawAjaxResponse<T> extends AjaxResponse { response: T; } diff --git a/samples/client/petstore/typescript-rxjs/builds/with-npm-version/runtime.ts b/samples/client/petstore/typescript-rxjs/builds/with-npm-version/runtime.ts index cc22d83bfd91f3ad5ac28ad00cf397d74aef3761..21d1e39ec39ddfec3f608cb6aa77712d6e2d7aed 100644 --- a/samples/client/petstore/typescript-rxjs/builds/with-npm-version/runtime.ts +++ b/samples/client/petstore/typescript-rxjs/builds/with-npm-version/runtime.ts @@ -155,7 +155,7 @@ export type HttpBody = Json | FormData; export interface RequestOpts extends AjaxRequest { query?: HttpQuery; // additional prop - // the following props have improved types over AjaxRequest + // the following props have improved types over AjaxRequest method: HttpMethod; headers?: HttpHeaders; body?: HttpBody; @@ -170,7 +170,7 @@ export interface OperationOpts { responseOpts?: ResponseOpts; } -// AjaxResponse with typed response +// AjaxResponse with typed response export interface RawAjaxResponse<T> extends AjaxResponse { response: T; } diff --git a/samples/client/petstore/typescript-rxjs/builds/with-progress-subscriber/runtime.ts b/samples/client/petstore/typescript-rxjs/builds/with-progress-subscriber/runtime.ts index 8705c9e954659c4d84b51d07c028de5458d1a089..e108c94de949b18252876739abed11156c5680d0 100644 --- a/samples/client/petstore/typescript-rxjs/builds/with-progress-subscriber/runtime.ts +++ b/samples/client/petstore/typescript-rxjs/builds/with-progress-subscriber/runtime.ts @@ -156,7 +156,7 @@ export type HttpBody = Json | FormData; export interface RequestOpts extends AjaxRequest { query?: HttpQuery; // additional prop - // the following props have improved types over AjaxRequest + // the following props have improved types over AjaxRequest method: HttpMethod; headers?: HttpHeaders; body?: HttpBody; @@ -173,7 +173,7 @@ export interface OperationOpts { responseOpts?: ResponseOpts; } -// AjaxResponse with typed response +// AjaxResponse with typed response export interface RawAjaxResponse<T> extends AjaxResponse { response: T; } diff --git a/samples/config/petstore/protobuf-schema/README.md b/samples/config/petstore/protobuf-schema/README.md index 5e6b62f76b489b064bfb360f774adbc379d50f55..1d3ea81c472d1cf2ae774fd1f1daca5eb639a63c 100644 --- a/samples/config/petstore/protobuf-schema/README.md +++ b/samples/config/petstore/protobuf-schema/README.md @@ -3,7 +3,7 @@ This is a sample server Petstore server. For this sample, you can use the api key `special-key` to test the authorization filters. ## Overview -These files were generated by the [OpenAPI Generator](https://openapi-generator.tech) project. +These files were generated by the [OpenAPI Generator](https://openapi-generator.tech) project. - API version: 1.0.0 - Package version: diff --git a/samples/config/petstore/protobuf-schema/models/api_response.proto b/samples/config/petstore/protobuf-schema/models/api_response.proto index 90f0042d0c2328c71cd4e14e68d69bb664d57332..9ab4d12e170365617ee610be273a34e1f59d7548 100644 --- a/samples/config/petstore/protobuf-schema/models/api_response.proto +++ b/samples/config/petstore/protobuf-schema/models/api_response.proto @@ -1,8 +1,8 @@ /* 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. - + The version of the OpenAPI document: 1.0.0 Generated by OpenAPI Generator: https://openapi-generator.tech diff --git a/samples/config/petstore/protobuf-schema/models/category.proto b/samples/config/petstore/protobuf-schema/models/category.proto index 6c59ece5ac0238e3cc31fb6caebf80f17bc50c8a..824ce32ac59581cf80d325e6a1d3bf207d8fead5 100644 --- a/samples/config/petstore/protobuf-schema/models/category.proto +++ b/samples/config/petstore/protobuf-schema/models/category.proto @@ -1,8 +1,8 @@ /* 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. - + The version of the OpenAPI document: 1.0.0 Generated by OpenAPI Generator: https://openapi-generator.tech diff --git a/samples/config/petstore/protobuf-schema/models/order.proto b/samples/config/petstore/protobuf-schema/models/order.proto index 341c89f3117fc8c806742065d5dd8748a7b89ce6..5d46dfd9beea71085ccfad84f6eb27165004a19b 100644 --- a/samples/config/petstore/protobuf-schema/models/order.proto +++ b/samples/config/petstore/protobuf-schema/models/order.proto @@ -1,8 +1,8 @@ /* 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. - + The version of the OpenAPI document: 1.0.0 Generated by OpenAPI Generator: https://openapi-generator.tech diff --git a/samples/config/petstore/protobuf-schema/models/pet.proto b/samples/config/petstore/protobuf-schema/models/pet.proto index b18987c1c84c38b574f8ddec5bbd767734a8f104..725dfa0818a6c01f497fe5a30c576b5ee88f3af4 100644 --- a/samples/config/petstore/protobuf-schema/models/pet.proto +++ b/samples/config/petstore/protobuf-schema/models/pet.proto @@ -1,8 +1,8 @@ /* 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. - + The version of the OpenAPI document: 1.0.0 Generated by OpenAPI Generator: https://openapi-generator.tech diff --git a/samples/config/petstore/protobuf-schema/models/tag.proto b/samples/config/petstore/protobuf-schema/models/tag.proto index 32a4bf800da015565f184ef190acfc97d8864669..9f2a6343955e893e9344905c0660b76789d78735 100644 --- a/samples/config/petstore/protobuf-schema/models/tag.proto +++ b/samples/config/petstore/protobuf-schema/models/tag.proto @@ -1,8 +1,8 @@ /* 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. - + The version of the OpenAPI document: 1.0.0 Generated by OpenAPI Generator: https://openapi-generator.tech diff --git a/samples/config/petstore/protobuf-schema/models/user.proto b/samples/config/petstore/protobuf-schema/models/user.proto index ae1e9d1aab5847b67c449b3cefbd27c2bd60597d..5dcba10582f5e6ec45d9ea9aff585f4d5d65b25a 100644 --- a/samples/config/petstore/protobuf-schema/models/user.proto +++ b/samples/config/petstore/protobuf-schema/models/user.proto @@ -1,8 +1,8 @@ /* 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. - + The version of the OpenAPI document: 1.0.0 Generated by OpenAPI Generator: https://openapi-generator.tech diff --git a/samples/config/petstore/protobuf-schema/services/pet_service.proto b/samples/config/petstore/protobuf-schema/services/pet_service.proto index 808f3d2e3cdecfa4bafc549e3167b601e74f0cb1..9c694f6e8388905c3b8bce7fc5d5eae89921c0a6 100644 --- a/samples/config/petstore/protobuf-schema/services/pet_service.proto +++ b/samples/config/petstore/protobuf-schema/services/pet_service.proto @@ -1,8 +1,8 @@ /* 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. - + The version of the OpenAPI document: 1.0.0 Generated by OpenAPI Generator: https://openapi-generator.tech diff --git a/samples/config/petstore/protobuf-schema/services/store_service.proto b/samples/config/petstore/protobuf-schema/services/store_service.proto index cb25b37d6666a896a3360c9c22075b85184ca985..f1b1e90d9092a5ff8153d54a4704f84b7484ff0f 100644 --- a/samples/config/petstore/protobuf-schema/services/store_service.proto +++ b/samples/config/petstore/protobuf-schema/services/store_service.proto @@ -1,8 +1,8 @@ /* 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. - + The version of the OpenAPI document: 1.0.0 Generated by OpenAPI Generator: https://openapi-generator.tech diff --git a/samples/config/petstore/protobuf-schema/services/user_service.proto b/samples/config/petstore/protobuf-schema/services/user_service.proto index 43fd415beaa12459bff096d19306bfc387a5081a..639867b4fe26f70743d86274517bbd523ff6256d 100644 --- a/samples/config/petstore/protobuf-schema/services/user_service.proto +++ b/samples/config/petstore/protobuf-schema/services/user_service.proto @@ -1,8 +1,8 @@ /* 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. - + The version of the OpenAPI document: 1.0.0 Generated by OpenAPI Generator: https://openapi-generator.tech diff --git a/samples/meta-codegen/lib/README.md b/samples/meta-codegen/lib/README.md index d0e89786c074d2466d409ff832ab839c577430b3..f411d55c86f6235354716577e3e8af5b67555473 100644 --- a/samples/meta-codegen/lib/README.md +++ b/samples/meta-codegen/lib/README.md @@ -10,7 +10,7 @@ The goal of OpenAPI is to define a standard, language-agnostic interface to REST When properly described with OpenAPI, a consumer can understand and interact with the remote service with a minimal amount of implementation logic. Similar to what interfaces have done for lower-level programming, OpenAPI removes the guesswork in calling the service. -Check out [OpenAPI-Spec](https://github.com/OAI/OpenAPI-Specification) for additional information about the OpenAPI project, including additional libraries with support for other languages and more. +Check out [OpenAPI-Spec](https://github.com/OAI/OpenAPI-Specification) for additional information about the OpenAPI project, including additional libraries with support for other languages and more. ## How do I use this? At this point, you've likely generated a client setup. It will include something along these lines: @@ -65,7 +65,7 @@ for reading the code more, though. See how the `MyclientcodegenGenerator` imple That class has the signature of all values that can be overridden. You can also step through MyclientcodegenGenerator.java in a debugger. Just debug the JUnit -test in DebugCodegenLauncher. That runs the command line tool and lets you inspect what the code is doing. +test in DebugCodegenLauncher. That runs the command line tool and lets you inspect what the code is doing. For the templates themselves, you have a number of values available to you for generation. You can execute the `java` command from above while passing different debug flags to show diff --git a/samples/meta-codegen/lib/pom.xml b/samples/meta-codegen/lib/pom.xml index 87c5bee9003773923c8f441945a80bfa79919f88..06f947fb556d3a336512b00341112cadb18fa430 100644 --- a/samples/meta-codegen/lib/pom.xml +++ b/samples/meta-codegen/lib/pom.xml @@ -117,7 +117,7 @@ <groupId>junit</groupId> <artifactId>junit</artifactId> <version>${junit-version}</version> - </dependency> + </dependency> </dependencies> <properties> <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding> diff --git a/samples/meta-codegen/lib/src/main/java/com/my/company/codegen/MyclientcodegenGenerator.java b/samples/meta-codegen/lib/src/main/java/com/my/company/codegen/MyclientcodegenGenerator.java index f194080a4d64b3cc21c6aab1e9d7ce06f5fa2118..9f3c524b31aa6f58b24d120e6378bec29675a471 100644 --- a/samples/meta-codegen/lib/src/main/java/com/my/company/codegen/MyclientcodegenGenerator.java +++ b/samples/meta-codegen/lib/src/main/java/com/my/company/codegen/MyclientcodegenGenerator.java @@ -14,7 +14,7 @@ public class MyclientcodegenGenerator extends DefaultCodegen implements CodegenC /** * Configures the type of generator. - * + * * @return the CodegenType for this generator * @see org.openapitools.codegen.CodegenType */ @@ -25,7 +25,7 @@ public class MyclientcodegenGenerator extends DefaultCodegen implements CodegenC /** * Configures a friendly name for the generator. This will be used by the generator * to select the library with the -g flag. - * + * * @return the friendly name for the generator */ public String getName() { @@ -60,7 +60,7 @@ public class MyclientcodegenGenerator extends DefaultCodegen implements CodegenC /** * Returns human-friendly help for the generator. Provide the consumer with help * tips, parameters here - * + * * @return A string value for the help message */ public String getHelp() { @@ -147,7 +147,7 @@ public class MyclientcodegenGenerator extends DefaultCodegen implements CodegenC /** * Escapes a reserved word as defined in the `reservedWords` array. Handle escaping * those terms here. This logic is only called if a variable matches the reserved words - * + * * @return the escaped term */ @Override diff --git a/samples/meta-codegen/lib/src/test/java/com/my/company/codegen/MyclientcodegenGeneratorTest.java b/samples/meta-codegen/lib/src/test/java/com/my/company/codegen/MyclientcodegenGeneratorTest.java index cc5c81030107cb8c2f9957c223e14d77cad64e07..e49abd7033f8131eed682a48834aee5b3c4b32e4 100644 --- a/samples/meta-codegen/lib/src/test/java/com/my/company/codegen/MyclientcodegenGeneratorTest.java +++ b/samples/meta-codegen/lib/src/test/java/com/my/company/codegen/MyclientcodegenGeneratorTest.java @@ -7,8 +7,8 @@ import org.openapitools.codegen.config.CodegenConfigurator; /*** * This test allows you to easily launch your code generation software under a debugger. - * Then run this test under debug mode. You will be able to step through your java code - * and then see the results in the out directory. + * Then run this test under debug mode. You will be able to step through your java code + * and then see the results in the out directory. * * To experiment with debugging your code generator: * 1) Set a break point in MyclientcodegenGenerator.java in the postProcessOperationsWithModels() method. @@ -22,7 +22,7 @@ public class MyclientcodegenGeneratorTest { @Test public void launchCodeGenerator() { // to understand how the 'openapi-generator-cli' module is using 'CodegenConfigurator', have a look at the 'Generate' class: - // https://github.com/OpenAPITools/openapi-generator/blob/master/modules/openapi-generator-cli/src/main/java/org/openapitools/codegen/cmd/Generate.java + // https://github.com/OpenAPITools/openapi-generator/blob/master/modules/openapi-generator-cli/src/main/java/org/openapitools/codegen/cmd/Generate.java final CodegenConfigurator configurator = new CodegenConfigurator() .setGeneratorName("myClientCodegen") // use this codegen library .setInputSpec("../../../modules/openapi-generator/src/test/resources/2_0/petstore.yaml") // sample OpenAPI file diff --git a/samples/openapi3/client/extensions/x-auth-id-alias/go-experimental/git_push.sh b/samples/openapi3/client/extensions/x-auth-id-alias/go-experimental/git_push.sh index ced3be2b0c7b2349ff06d18da19d4b31435c9fa6..9405f72e950cdb8ca24c3cf4d15cee7eac62fde7 100644 --- a/samples/openapi3/client/extensions/x-auth-id-alias/go-experimental/git_push.sh +++ b/samples/openapi3/client/extensions/x-auth-id-alias/go-experimental/git_push.sh @@ -55,4 +55,3 @@ 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/openapi3/client/extensions/x-auth-id-alias/java/jersey2-java8/git_push.sh b/samples/openapi3/client/extensions/x-auth-id-alias/java/jersey2-java8/git_push.sh index ced3be2b0c7b2349ff06d18da19d4b31435c9fa6..9405f72e950cdb8ca24c3cf4d15cee7eac62fde7 100644 --- a/samples/openapi3/client/extensions/x-auth-id-alias/java/jersey2-java8/git_push.sh +++ b/samples/openapi3/client/extensions/x-auth-id-alias/java/jersey2-java8/git_push.sh @@ -55,4 +55,3 @@ 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/openapi3/client/extensions/x-auth-id-alias/python/git_push.sh b/samples/openapi3/client/extensions/x-auth-id-alias/python/git_push.sh index ced3be2b0c7b2349ff06d18da19d4b31435c9fa6..9405f72e950cdb8ca24c3cf4d15cee7eac62fde7 100644 --- a/samples/openapi3/client/extensions/x-auth-id-alias/python/git_push.sh +++ b/samples/openapi3/client/extensions/x-auth-id-alias/python/git_push.sh @@ -55,4 +55,3 @@ 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/openapi3/client/extensions/x-auth-id-alias/python/x_auth_id_alias/configuration.py b/samples/openapi3/client/extensions/x-auth-id-alias/python/x_auth_id_alias/configuration.py index c71b06a8aa2408cbb02bd33306c525c2d8468691..e5e2f7d53e3236c80183f045bc8a494ed166cadd 100644 --- a/samples/openapi3/client/extensions/x-auth-id-alias/python/x_auth_id_alias/configuration.py +++ b/samples/openapi3/client/extensions/x-auth-id-alias/python/x_auth_id_alias/configuration.py @@ -73,7 +73,7 @@ class Configuration(object): :param server_operation_variables: Mapping from operation ID to a mapping with string values to replace variables in templated server configuration. The validation of enums is performed for variables with defined enum values before. - :param ssl_ca_cert: str - the path to a file of concatenated CA certificates + :param ssl_ca_cert: str - the path to a file of concatenated CA certificates in PEM format :Example: diff --git a/samples/openapi3/client/extensions/x-auth-id-alias/ruby-client/git_push.sh b/samples/openapi3/client/extensions/x-auth-id-alias/ruby-client/git_push.sh index ced3be2b0c7b2349ff06d18da19d4b31435c9fa6..9405f72e950cdb8ca24c3cf4d15cee7eac62fde7 100644 --- a/samples/openapi3/client/extensions/x-auth-id-alias/ruby-client/git_push.sh +++ b/samples/openapi3/client/extensions/x-auth-id-alias/ruby-client/git_push.sh @@ -55,4 +55,3 @@ 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/openapi3/client/features/dynamic-servers/python/dynamic_servers/configuration.py b/samples/openapi3/client/features/dynamic-servers/python/dynamic_servers/configuration.py index d826515c081bc4d0ae929abb509f5530d46bad93..e90b08da2666331d17df8bcd276c0f6f33d9c065 100644 --- a/samples/openapi3/client/features/dynamic-servers/python/dynamic_servers/configuration.py +++ b/samples/openapi3/client/features/dynamic-servers/python/dynamic_servers/configuration.py @@ -73,7 +73,7 @@ class Configuration(object): :param server_operation_variables: Mapping from operation ID to a mapping with string values to replace variables in templated server configuration. The validation of enums is performed for variables with defined enum values before. - :param ssl_ca_cert: str - the path to a file of concatenated CA certificates + :param ssl_ca_cert: str - the path to a file of concatenated CA certificates in PEM format """ diff --git a/samples/openapi3/client/features/dynamic-servers/python/git_push.sh b/samples/openapi3/client/features/dynamic-servers/python/git_push.sh index ced3be2b0c7b2349ff06d18da19d4b31435c9fa6..9405f72e950cdb8ca24c3cf4d15cee7eac62fde7 100644 --- a/samples/openapi3/client/features/dynamic-servers/python/git_push.sh +++ b/samples/openapi3/client/features/dynamic-servers/python/git_push.sh @@ -55,4 +55,3 @@ 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/openapi3/client/features/dynamic-servers/ruby/git_push.sh b/samples/openapi3/client/features/dynamic-servers/ruby/git_push.sh index ced3be2b0c7b2349ff06d18da19d4b31435c9fa6..9405f72e950cdb8ca24c3cf4d15cee7eac62fde7 100644 --- a/samples/openapi3/client/features/dynamic-servers/ruby/git_push.sh +++ b/samples/openapi3/client/features/dynamic-servers/ruby/git_push.sh @@ -55,4 +55,3 @@ 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/openapi3/client/features/generate-alias-as-model/ruby-client/git_push.sh b/samples/openapi3/client/features/generate-alias-as-model/ruby-client/git_push.sh index ced3be2b0c7b2349ff06d18da19d4b31435c9fa6..9405f72e950cdb8ca24c3cf4d15cee7eac62fde7 100644 --- a/samples/openapi3/client/features/generate-alias-as-model/ruby-client/git_push.sh +++ b/samples/openapi3/client/features/generate-alias-as-model/ruby-client/git_push.sh @@ -55,4 +55,3 @@ 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/openapi3/client/petstore/dart-dio-next/petstore_client_lib_fake/.gitignore b/samples/openapi3/client/petstore/dart-dio-next/petstore_client_lib_fake/.gitignore index 6d2ac22c0b41764110b373e78b89df314e77397e..4298cdcbd1a24268bccd159b376ff8a9c4722868 100644 --- a/samples/openapi3/client/petstore/dart-dio-next/petstore_client_lib_fake/.gitignore +++ b/samples/openapi3/client/petstore/dart-dio-next/petstore_client_lib_fake/.gitignore @@ -10,7 +10,7 @@ build/ **/packages/ # Files created by dart2js -# (Most Dart developers will use pub build to compile Dart, use/modify these +# (Most Dart developers will use pub build to compile Dart, use/modify these # rules if you intend to use dart2js directly # Convention is to use extension '.dart.js' for Dart compiled to Javascript to # differentiate from explicit Javascript files) @@ -23,7 +23,7 @@ build/ # Directory created by dartdoc doc/api/ -# Don't commit pubspec lock file +# Don't commit pubspec lock file # (Library packages only! Remove pattern if developing an application package) pubspec.lock diff --git a/samples/openapi3/client/petstore/dart-dio-next/petstore_client_lib_fake/README.md b/samples/openapi3/client/petstore/dart-dio-next/petstore_client_lib_fake/README.md index eccd5d8ef38eefb1bf327366844ce58007fd0ae1..cb1aea6da2d4822a394a491a554d63451bba3182 100644 --- a/samples/openapi3/client/petstore/dart-dio-next/petstore_client_lib_fake/README.md +++ b/samples/openapi3/client/petstore/dart-dio-next/petstore_client_lib_fake/README.md @@ -198,4 +198,3 @@ Class | Method | HTTP request | Description - diff --git a/samples/openapi3/client/petstore/dart-dio-next/petstore_client_lib_fake/doc/AnotherFakeApi.md b/samples/openapi3/client/petstore/dart-dio-next/petstore_client_lib_fake/doc/AnotherFakeApi.md index 9416627d74d6afb8af28855def62f0cba450cd02..df89b0eb12a8e3dbbf994385155f86c2508282bd 100644 --- a/samples/openapi3/client/petstore/dart-dio-next/petstore_client_lib_fake/doc/AnotherFakeApi.md +++ b/samples/openapi3/client/petstore/dart-dio-next/petstore_client_lib_fake/doc/AnotherFakeApi.md @@ -19,14 +19,14 @@ To test special tags To test special tags and operation ID starting with number -### Example +### Example ```dart import 'package:openapi/api.dart'; final api = Openapi().getAnotherFakeApi(); final ModelClient modelClient = ; // ModelClient | client model -try { +try { final response = api.call123testSpecialTags(modelClient); print(response); } catch on DioError (e) { diff --git a/samples/openapi3/client/petstore/dart-dio-next/petstore_client_lib_fake/doc/DefaultApi.md b/samples/openapi3/client/petstore/dart-dio-next/petstore_client_lib_fake/doc/DefaultApi.md index 5b5a2cdead656b4da8d6f4829a400d53df3a99ff..f1753b62ee84adc8ab22e74ff532b007fbd3432a 100644 --- a/samples/openapi3/client/petstore/dart-dio-next/petstore_client_lib_fake/doc/DefaultApi.md +++ b/samples/openapi3/client/petstore/dart-dio-next/petstore_client_lib_fake/doc/DefaultApi.md @@ -17,13 +17,13 @@ Method | HTTP request | Description -### Example +### Example ```dart import 'package:openapi/api.dart'; final api = Openapi().getDefaultApi(); -try { +try { final response = api.fooGet(); print(response); } catch on DioError (e) { diff --git a/samples/openapi3/client/petstore/dart-dio-next/petstore_client_lib_fake/doc/FakeApi.md b/samples/openapi3/client/petstore/dart-dio-next/petstore_client_lib_fake/doc/FakeApi.md index b8e90ea60748a53e3324d769622aa7d40ee4de9e..90760dc066b74f71313d279e63964208e0d2adca 100644 --- a/samples/openapi3/client/petstore/dart-dio-next/petstore_client_lib_fake/doc/FakeApi.md +++ b/samples/openapi3/client/petstore/dart-dio-next/petstore_client_lib_fake/doc/FakeApi.md @@ -33,13 +33,13 @@ Method | HTTP request | Description Health check endpoint -### Example +### Example ```dart import 'package:openapi/api.dart'; final api = Openapi().getFakeApi(); -try { +try { final response = api.fakeHealthGet(); print(response); } catch on DioError (e) { @@ -70,7 +70,7 @@ No authorization required test http signature authentication -### Example +### Example ```dart import 'package:openapi/api.dart'; // TODO Configure HTTP basic authorization: http_signature_test @@ -82,7 +82,7 @@ final Pet pet = ; // Pet | Pet object that needs to be added to the store final String query1 = query1_example; // String | query parameter final String header1 = header1_example; // String | header parameter -try { +try { api.fakeHttpSignatureTest(pet, query1, header1); } catch on DioError (e) { print('Exception when calling FakeApi->fakeHttpSignatureTest: $e\n'); @@ -119,14 +119,14 @@ void (empty response body) Test serialization of outer boolean types -### Example +### Example ```dart import 'package:openapi/api.dart'; final api = Openapi().getFakeApi(); final bool body = true; // bool | Input boolean as post body -try { +try { final response = api.fakeOuterBooleanSerialize(body); print(response); } catch on DioError (e) { @@ -162,14 +162,14 @@ No authorization required Test serialization of object with outer number type -### Example +### Example ```dart import 'package:openapi/api.dart'; final api = Openapi().getFakeApi(); final OuterComposite outerComposite = ; // OuterComposite | Input composite as post body -try { +try { final response = api.fakeOuterCompositeSerialize(outerComposite); print(response); } catch on DioError (e) { @@ -205,14 +205,14 @@ No authorization required Test serialization of outer number types -### Example +### Example ```dart import 'package:openapi/api.dart'; final api = Openapi().getFakeApi(); final num body = 8.14; // num | Input number as post body -try { +try { final response = api.fakeOuterNumberSerialize(body); print(response); } catch on DioError (e) { @@ -248,14 +248,14 @@ No authorization required Test serialization of outer string types -### Example +### Example ```dart import 'package:openapi/api.dart'; final api = Openapi().getFakeApi(); final String body = body_example; // String | Input string as post body -try { +try { final response = api.fakeOuterStringSerialize(body); print(response); } catch on DioError (e) { @@ -291,14 +291,14 @@ No authorization required Test serialization of enum (int) properties with examples -### Example +### Example ```dart import 'package:openapi/api.dart'; final api = Openapi().getFakeApi(); final OuterObjectWithEnumProperty outerObjectWithEnumProperty = ; // OuterObjectWithEnumProperty | Input enum (int) as post body -try { +try { final response = api.fakePropertyEnumIntegerSerialize(outerObjectWithEnumProperty); print(response); } catch on DioError (e) { @@ -334,14 +334,14 @@ No authorization required For this test, the body has to be a binary file. -### Example +### Example ```dart import 'package:openapi/api.dart'; final api = Openapi().getFakeApi(); final MultipartFile body = BINARY_DATA_HERE; // MultipartFile | image to upload -try { +try { api.testBodyWithBinary(body); } catch on DioError (e) { print('Exception when calling FakeApi->testBodyWithBinary: $e\n'); @@ -376,14 +376,14 @@ No authorization required For this test, the body for this request must reference a schema named `File`. -### Example +### Example ```dart import 'package:openapi/api.dart'; final api = Openapi().getFakeApi(); final FileSchemaTestClass fileSchemaTestClass = ; // FileSchemaTestClass | -try { +try { api.testBodyWithFileSchema(fileSchemaTestClass); } catch on DioError (e) { print('Exception when calling FakeApi->testBodyWithFileSchema: $e\n'); @@ -416,7 +416,7 @@ No authorization required -### Example +### Example ```dart import 'package:openapi/api.dart'; @@ -424,7 +424,7 @@ final api = Openapi().getFakeApi(); final String query = query_example; // String | final User user = ; // User | -try { +try { api.testBodyWithQueryParams(query, user); } catch on DioError (e) { print('Exception when calling FakeApi->testBodyWithQueryParams: $e\n'); @@ -460,14 +460,14 @@ To test \"client\" model To test \"client\" model -### Example +### Example ```dart import 'package:openapi/api.dart'; final api = Openapi().getFakeApi(); final ModelClient modelClient = ; // ModelClient | client model -try { +try { final response = api.testClientModel(modelClient); print(response); } catch on DioError (e) { @@ -503,7 +503,7 @@ Fake endpoint for testing various parameters å‡ç«¯é»ž å½ã®ã‚¨ãƒ³ãƒ‰ãƒã‚¤ãƒ³ Fake endpoint for testing various parameters å‡ç«¯é»ž å½ã®ã‚¨ãƒ³ãƒ‰ãƒã‚¤ãƒ³ãƒˆ 가짜 엔드 í¬ì¸íЏ -### Example +### Example ```dart import 'package:openapi/api.dart'; // TODO Configure HTTP basic authorization: http_basic_test @@ -526,7 +526,7 @@ final DateTime dateTime = 2013-10-20T19:20:30+01:00; // DateTime | None final String password = password_example; // String | None final String callback = callback_example; // String | None -try { +try { api.testEndpointParameters(number, double_, patternWithoutDelimiter, byte, integer, int32, int64, float, string, binary, date, dateTime, password, callback); } catch on DioError (e) { print('Exception when calling FakeApi->testEndpointParameters: $e\n'); @@ -574,7 +574,7 @@ To test enum parameters To test enum parameters -### Example +### Example ```dart import 'package:openapi/api.dart'; @@ -588,7 +588,7 @@ final double enumQueryDouble = 1.2; // double | Query parameter enum test (doubl final BuiltList<String> enumFormStringArray = enumFormStringArray_example; // BuiltList<String> | Form parameter enum test (string array) final String enumFormString = enumFormString_example; // String | Form parameter enum test (string) -try { +try { api.testEnumParameters(enumHeaderStringArray, enumHeaderString, enumQueryStringArray, enumQueryString, enumQueryInteger, enumQueryDouble, enumFormStringArray, enumFormString); } catch on DioError (e) { print('Exception when calling FakeApi->testEnumParameters: $e\n'); @@ -630,7 +630,7 @@ Fake endpoint to test group parameters (optional) Fake endpoint to test group parameters (optional) -### Example +### Example ```dart import 'package:openapi/api.dart'; // TODO Configure HTTP basic authorization: bearer_test @@ -645,7 +645,7 @@ final int stringGroup = 56; // int | String in group parameters final bool booleanGroup = true; // bool | Boolean in group parameters final int int64Group = 789; // int | Integer in group parameters -try { +try { api.testGroupParameters(requiredStringGroup, requiredBooleanGroup, requiredInt64Group, stringGroup, booleanGroup, int64Group); } catch on DioError (e) { print('Exception when calling FakeApi->testGroupParameters: $e\n'); @@ -683,14 +683,14 @@ void (empty response body) test inline additionalProperties -### Example +### Example ```dart import 'package:openapi/api.dart'; final api = Openapi().getFakeApi(); final BuiltMap<String, String> requestBody = ; // BuiltMap<String, String> | request body -try { +try { api.testInlineAdditionalProperties(requestBody); } catch on DioError (e) { print('Exception when calling FakeApi->testInlineAdditionalProperties: $e\n'); @@ -723,7 +723,7 @@ No authorization required test json serialization of form data -### Example +### Example ```dart import 'package:openapi/api.dart'; @@ -731,7 +731,7 @@ final api = Openapi().getFakeApi(); final String param = param_example; // String | field1 final String param2 = param2_example; // String | field2 -try { +try { api.testJsonFormData(param, param2); } catch on DioError (e) { print('Exception when calling FakeApi->testJsonFormData: $e\n'); @@ -767,7 +767,7 @@ No authorization required To test the collection format in query parameters -### Example +### Example ```dart import 'package:openapi/api.dart'; @@ -778,7 +778,7 @@ final BuiltList<String> http = ; // BuiltList<String> | final BuiltList<String> url = ; // BuiltList<String> | final BuiltList<String> context = ; // BuiltList<String> | -try { +try { api.testQueryParameterCollectionFormat(pipe, ioutil, http, url, context); } catch on DioError (e) { print('Exception when calling FakeApi->testQueryParameterCollectionFormat: $e\n'); diff --git a/samples/openapi3/client/petstore/dart-dio-next/petstore_client_lib_fake/doc/FakeClassnameTags123Api.md b/samples/openapi3/client/petstore/dart-dio-next/petstore_client_lib_fake/doc/FakeClassnameTags123Api.md index cabd6fe0a99b47f9203c9659dbcfcef291c9f97c..35e244fbf21ec33dedf6fa1c316224496babcac0 100644 --- a/samples/openapi3/client/petstore/dart-dio-next/petstore_client_lib_fake/doc/FakeClassnameTags123Api.md +++ b/samples/openapi3/client/petstore/dart-dio-next/petstore_client_lib_fake/doc/FakeClassnameTags123Api.md @@ -19,7 +19,7 @@ To test class name in snake case To test class name in snake case -### Example +### Example ```dart import 'package:openapi/api.dart'; // TODO Configure API key authorization: api_key_query @@ -30,7 +30,7 @@ import 'package:openapi/api.dart'; final api = Openapi().getFakeClassnameTags123Api(); final ModelClient modelClient = ; // ModelClient | client model -try { +try { final response = api.testClassname(modelClient); print(response); } catch on DioError (e) { diff --git a/samples/openapi3/client/petstore/dart-dio-next/petstore_client_lib_fake/doc/PetApi.md b/samples/openapi3/client/petstore/dart-dio-next/petstore_client_lib_fake/doc/PetApi.md index 70f5342d771d3850806a88e600cdc9bd6a0c8bfd..6afc643ea56ad9b0f6f8a5779cdbd322ffbf5c63 100644 --- a/samples/openapi3/client/petstore/dart-dio-next/petstore_client_lib_fake/doc/PetApi.md +++ b/samples/openapi3/client/petstore/dart-dio-next/petstore_client_lib_fake/doc/PetApi.md @@ -25,7 +25,7 @@ Method | HTTP request | Description Add a new pet to the store -### Example +### Example ```dart import 'package:openapi/api.dart'; // TODO Configure OAuth2 access token for authorization: petstore_auth @@ -34,7 +34,7 @@ import 'package:openapi/api.dart'; final api = Openapi().getPetApi(); final Pet pet = ; // Pet | Pet object that needs to be added to the store -try { +try { api.addPet(pet); } catch on DioError (e) { print('Exception when calling PetApi->addPet: $e\n'); @@ -67,7 +67,7 @@ void (empty response body) Deletes a pet -### Example +### Example ```dart import 'package:openapi/api.dart'; // TODO Configure OAuth2 access token for authorization: petstore_auth @@ -77,7 +77,7 @@ final api = Openapi().getPetApi(); final int petId = 789; // int | Pet id to delete final String apiKey = apiKey_example; // String | -try { +try { api.deletePet(petId, apiKey); } catch on DioError (e) { print('Exception when calling PetApi->deletePet: $e\n'); @@ -113,7 +113,7 @@ Finds Pets by status Multiple status values can be provided with comma separated strings -### Example +### Example ```dart import 'package:openapi/api.dart'; // TODO Configure OAuth2 access token for authorization: petstore_auth @@ -122,7 +122,7 @@ import 'package:openapi/api.dart'; final api = Openapi().getPetApi(); final BuiltList<String> status = ; // BuiltList<String> | Status values that need to be considered for filter -try { +try { final response = api.findPetsByStatus(status); print(response); } catch on DioError (e) { @@ -158,7 +158,7 @@ Finds Pets by tags Multiple tags can be provided with comma separated strings. Use tag1, tag2, tag3 for testing. -### Example +### Example ```dart import 'package:openapi/api.dart'; // TODO Configure OAuth2 access token for authorization: petstore_auth @@ -167,7 +167,7 @@ import 'package:openapi/api.dart'; final api = Openapi().getPetApi(); final BuiltSet<String> tags = ; // BuiltSet<String> | Tags to filter by -try { +try { final response = api.findPetsByTags(tags); print(response); } catch on DioError (e) { @@ -203,7 +203,7 @@ Find pet by ID Returns a single pet -### Example +### Example ```dart import 'package:openapi/api.dart'; // TODO Configure API key authorization: api_key @@ -214,7 +214,7 @@ import 'package:openapi/api.dart'; final api = Openapi().getPetApi(); final int petId = 789; // int | ID of pet to return -try { +try { final response = api.getPetById(petId); print(response); } catch on DioError (e) { @@ -248,7 +248,7 @@ Name | Type | Description | Notes Update an existing pet -### Example +### Example ```dart import 'package:openapi/api.dart'; // TODO Configure OAuth2 access token for authorization: petstore_auth @@ -257,7 +257,7 @@ import 'package:openapi/api.dart'; final api = Openapi().getPetApi(); final Pet pet = ; // Pet | Pet object that needs to be added to the store -try { +try { api.updatePet(pet); } catch on DioError (e) { print('Exception when calling PetApi->updatePet: $e\n'); @@ -290,7 +290,7 @@ void (empty response body) Updates a pet in the store with form data -### Example +### Example ```dart import 'package:openapi/api.dart'; // TODO Configure OAuth2 access token for authorization: petstore_auth @@ -301,7 +301,7 @@ final int petId = 789; // int | ID of pet that needs to be updated final String name = name_example; // String | Updated name of the pet final String status = status_example; // String | Updated status of the pet -try { +try { api.updatePetWithForm(petId, name, status); } catch on DioError (e) { print('Exception when calling PetApi->updatePetWithForm: $e\n'); @@ -336,7 +336,7 @@ void (empty response body) uploads an image -### Example +### Example ```dart import 'package:openapi/api.dart'; // TODO Configure OAuth2 access token for authorization: petstore_auth @@ -347,7 +347,7 @@ final int petId = 789; // int | ID of pet to update final String additionalMetadata = additionalMetadata_example; // String | Additional data to pass to server final MultipartFile file = BINARY_DATA_HERE; // MultipartFile | file to upload -try { +try { final response = api.uploadFile(petId, additionalMetadata, file); print(response); } catch on DioError (e) { @@ -383,7 +383,7 @@ Name | Type | Description | Notes uploads an image (required) -### Example +### Example ```dart import 'package:openapi/api.dart'; // TODO Configure OAuth2 access token for authorization: petstore_auth @@ -394,7 +394,7 @@ final int petId = 789; // int | ID of pet to update final MultipartFile requiredFile = BINARY_DATA_HERE; // MultipartFile | file to upload final String additionalMetadata = additionalMetadata_example; // String | Additional data to pass to server -try { +try { final response = api.uploadFileWithRequiredFile(petId, requiredFile, additionalMetadata); print(response); } catch on DioError (e) { diff --git a/samples/openapi3/client/petstore/dart-dio-next/petstore_client_lib_fake/doc/StoreApi.md b/samples/openapi3/client/petstore/dart-dio-next/petstore_client_lib_fake/doc/StoreApi.md index e955785ca95ef4e478b45c4b7ea0323bf0d2d453..5c8a683579e2c60271ee17819e851b0562a7a2e0 100644 --- a/samples/openapi3/client/petstore/dart-dio-next/petstore_client_lib_fake/doc/StoreApi.md +++ b/samples/openapi3/client/petstore/dart-dio-next/petstore_client_lib_fake/doc/StoreApi.md @@ -22,14 +22,14 @@ Delete purchase order by ID For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors -### Example +### Example ```dart import 'package:openapi/api.dart'; final api = Openapi().getStoreApi(); final String orderId = orderId_example; // String | ID of the order that needs to be deleted -try { +try { api.deleteOrder(orderId); } catch on DioError (e) { print('Exception when calling StoreApi->deleteOrder: $e\n'); @@ -64,7 +64,7 @@ Returns pet inventories by status Returns a map of status codes to quantities -### Example +### Example ```dart import 'package:openapi/api.dart'; // TODO Configure API key authorization: api_key @@ -74,7 +74,7 @@ import 'package:openapi/api.dart'; final api = Openapi().getStoreApi(); -try { +try { final response = api.getInventory(); print(response); } catch on DioError (e) { @@ -107,14 +107,14 @@ Find purchase order by ID For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions -### Example +### Example ```dart import 'package:openapi/api.dart'; final api = Openapi().getStoreApi(); final int orderId = 789; // int | ID of pet that needs to be fetched -try { +try { final response = api.getOrderById(orderId); print(response); } catch on DioError (e) { @@ -148,14 +148,14 @@ No authorization required Place an order for a pet -### Example +### Example ```dart import 'package:openapi/api.dart'; final api = Openapi().getStoreApi(); final Order order = ; // Order | order placed for purchasing the pet -try { +try { final response = api.placeOrder(order); print(response); } catch on DioError (e) { diff --git a/samples/openapi3/client/petstore/dart-dio-next/petstore_client_lib_fake/doc/UserApi.md b/samples/openapi3/client/petstore/dart-dio-next/petstore_client_lib_fake/doc/UserApi.md index 5e96b548e3b0cb6f86779d5023916eb4dc17f069..e3af05ffb08737332e2497c11c41db2283fba87c 100644 --- a/samples/openapi3/client/petstore/dart-dio-next/petstore_client_lib_fake/doc/UserApi.md +++ b/samples/openapi3/client/petstore/dart-dio-next/petstore_client_lib_fake/doc/UserApi.md @@ -26,14 +26,14 @@ Create user This can only be done by the logged in user. -### Example +### Example ```dart import 'package:openapi/api.dart'; final api = Openapi().getUserApi(); final User user = ; // User | Created user object -try { +try { api.createUser(user); } catch on DioError (e) { print('Exception when calling UserApi->createUser: $e\n'); @@ -66,14 +66,14 @@ No authorization required Creates list of users with given input array -### Example +### Example ```dart import 'package:openapi/api.dart'; final api = Openapi().getUserApi(); final BuiltList<User> user = ; // BuiltList<User> | List of user object -try { +try { api.createUsersWithArrayInput(user); } catch on DioError (e) { print('Exception when calling UserApi->createUsersWithArrayInput: $e\n'); @@ -106,14 +106,14 @@ No authorization required Creates list of users with given input array -### Example +### Example ```dart import 'package:openapi/api.dart'; final api = Openapi().getUserApi(); final BuiltList<User> user = ; // BuiltList<User> | List of user object -try { +try { api.createUsersWithListInput(user); } catch on DioError (e) { print('Exception when calling UserApi->createUsersWithListInput: $e\n'); @@ -148,14 +148,14 @@ Delete user This can only be done by the logged in user. -### Example +### Example ```dart import 'package:openapi/api.dart'; final api = Openapi().getUserApi(); final String username = username_example; // String | The name that needs to be deleted -try { +try { api.deleteUser(username); } catch on DioError (e) { print('Exception when calling UserApi->deleteUser: $e\n'); @@ -188,14 +188,14 @@ No authorization required Get user by user name -### Example +### Example ```dart import 'package:openapi/api.dart'; final api = Openapi().getUserApi(); final String username = username_example; // String | The name that needs to be fetched. Use user1 for testing. -try { +try { final response = api.getUserByName(username); print(response); } catch on DioError (e) { @@ -229,7 +229,7 @@ No authorization required Logs user into the system -### Example +### Example ```dart import 'package:openapi/api.dart'; @@ -237,7 +237,7 @@ final api = Openapi().getUserApi(); final String username = username_example; // String | The user name for login final String password = password_example; // String | The password for login in clear text -try { +try { final response = api.loginUser(username, password); print(response); } catch on DioError (e) { @@ -272,13 +272,13 @@ No authorization required Logs out current logged in user session -### Example +### Example ```dart import 'package:openapi/api.dart'; final api = Openapi().getUserApi(); -try { +try { api.logoutUser(); } catch on DioError (e) { print('Exception when calling UserApi->logoutUser: $e\n'); @@ -310,7 +310,7 @@ Updated user This can only be done by the logged in user. -### Example +### Example ```dart import 'package:openapi/api.dart'; @@ -318,7 +318,7 @@ final api = Openapi().getUserApi(); final String username = username_example; // String | name that need to be deleted final User user = ; // User | Updated user object -try { +try { api.updateUser(username, user); } catch on DioError (e) { print('Exception when calling UserApi->updateUser: $e\n'); diff --git a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib/.gitignore b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib/.gitignore index 6d2ac22c0b41764110b373e78b89df314e77397e..4298cdcbd1a24268bccd159b376ff8a9c4722868 100644 --- a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib/.gitignore +++ b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib/.gitignore @@ -10,7 +10,7 @@ build/ **/packages/ # Files created by dart2js -# (Most Dart developers will use pub build to compile Dart, use/modify these +# (Most Dart developers will use pub build to compile Dart, use/modify these # rules if you intend to use dart2js directly # Convention is to use extension '.dart.js' for Dart compiled to Javascript to # differentiate from explicit Javascript files) @@ -23,7 +23,7 @@ build/ # Directory created by dartdoc doc/api/ -# Don't commit pubspec lock file +# Don't commit pubspec lock file # (Library packages only! Remove pattern if developing an application package) pubspec.lock diff --git a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib/README.md b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib/README.md index ac04fa9f72b067918d9fd2f263070ec1dea5e890..aee38c63bb475e1a6298d6651c8bc434d41b0f99 100644 --- a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib/README.md +++ b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib/README.md @@ -113,4 +113,3 @@ Class | Method | HTTP request | Description - diff --git a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib/doc/PetApi.md b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib/doc/PetApi.md index 74c87b72acc61ada07bc019c97c1cc80eabc90a6..a93f8fe393b304072e8a9b626e230774ce48a71f 100644 --- a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib/doc/PetApi.md +++ b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib/doc/PetApi.md @@ -24,7 +24,7 @@ Method | HTTP request | Description Add a new pet to the store -### Example +### Example ```dart import 'package:openapi/api.dart'; // TODO Configure OAuth2 access token for authorization: petstore_auth @@ -33,7 +33,7 @@ import 'package:openapi/api.dart'; var api_instance = new PetApi(); var pet = new Pet(); // Pet | Pet object that needs to be added to the store -try { +try { var result = api_instance.addPet(pet); print(result); } catch (e) { @@ -67,7 +67,7 @@ Name | Type | Description | Notes Deletes a pet -### Example +### Example ```dart import 'package:openapi/api.dart'; // TODO Configure OAuth2 access token for authorization: petstore_auth @@ -77,7 +77,7 @@ var api_instance = new PetApi(); var petId = 789; // int | Pet id to delete var apiKey = apiKey_example; // String | -try { +try { api_instance.deletePet(petId, apiKey); } catch (e) { print('Exception when calling PetApi->deletePet: $e\n'); @@ -113,7 +113,7 @@ Finds Pets by status Multiple status values can be provided with comma separated strings -### Example +### Example ```dart import 'package:openapi/api.dart'; // TODO Configure OAuth2 access token for authorization: petstore_auth @@ -122,7 +122,7 @@ import 'package:openapi/api.dart'; var api_instance = new PetApi(); var status = []; // BuiltList<String> | Status values that need to be considered for filter -try { +try { var result = api_instance.findPetsByStatus(status); print(result); } catch (e) { @@ -158,7 +158,7 @@ Finds Pets by tags Multiple tags can be provided with comma separated strings. Use tag1, tag2, tag3 for testing. -### Example +### Example ```dart import 'package:openapi/api.dart'; // TODO Configure OAuth2 access token for authorization: petstore_auth @@ -167,7 +167,7 @@ import 'package:openapi/api.dart'; var api_instance = new PetApi(); var tags = []; // BuiltList<String> | Tags to filter by -try { +try { var result = api_instance.findPetsByTags(tags); print(result); } catch (e) { @@ -203,7 +203,7 @@ Find pet by ID Returns a single pet -### Example +### Example ```dart import 'package:openapi/api.dart'; // TODO Configure API key authorization: api_key @@ -214,7 +214,7 @@ import 'package:openapi/api.dart'; var api_instance = new PetApi(); var petId = 789; // int | ID of pet to return -try { +try { var result = api_instance.getPetById(petId); print(result); } catch (e) { @@ -248,7 +248,7 @@ Name | Type | Description | Notes Update an existing pet -### Example +### Example ```dart import 'package:openapi/api.dart'; // TODO Configure OAuth2 access token for authorization: petstore_auth @@ -257,7 +257,7 @@ import 'package:openapi/api.dart'; var api_instance = new PetApi(); var pet = new Pet(); // Pet | Pet object that needs to be added to the store -try { +try { var result = api_instance.updatePet(pet); print(result); } catch (e) { @@ -291,7 +291,7 @@ Name | Type | Description | Notes Updates a pet in the store with form data -### Example +### Example ```dart import 'package:openapi/api.dart'; // TODO Configure OAuth2 access token for authorization: petstore_auth @@ -302,7 +302,7 @@ 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 { +try { api_instance.updatePetWithForm(petId, name, status); } catch (e) { print('Exception when calling PetApi->updatePetWithForm: $e\n'); @@ -337,7 +337,7 @@ void (empty response body) uploads an image -### Example +### Example ```dart import 'package:openapi/api.dart'; // TODO Configure OAuth2 access token for authorization: petstore_auth @@ -348,7 +348,7 @@ 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; // Uint8List | file to upload -try { +try { var result = api_instance.uploadFile(petId, additionalMetadata, file); print(result); } catch (e) { diff --git a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib/doc/StoreApi.md b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib/doc/StoreApi.md index 6075223c741257dfddaeac499d30cb5b22cbcf77..fb3dddd9fb3cabb88f64891cdcaf525c1abb8fdf 100644 --- a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib/doc/StoreApi.md +++ b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib/doc/StoreApi.md @@ -22,14 +22,14 @@ Delete purchase order by ID For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors -### Example +### Example ```dart import 'package:openapi/api.dart'; var api_instance = new StoreApi(); var orderId = orderId_example; // String | ID of the order that needs to be deleted -try { +try { api_instance.deleteOrder(orderId); } catch (e) { print('Exception when calling StoreApi->deleteOrder: $e\n'); @@ -64,7 +64,7 @@ Returns pet inventories by status Returns a map of status codes to quantities -### Example +### Example ```dart import 'package:openapi/api.dart'; // TODO Configure API key authorization: api_key @@ -74,7 +74,7 @@ import 'package:openapi/api.dart'; var api_instance = new StoreApi(); -try { +try { var result = api_instance.getInventory(); print(result); } catch (e) { @@ -107,14 +107,14 @@ Find purchase order by ID For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions -### Example +### Example ```dart import 'package:openapi/api.dart'; var api_instance = new StoreApi(); var orderId = 789; // int | ID of pet that needs to be fetched -try { +try { var result = api_instance.getOrderById(orderId); print(result); } catch (e) { @@ -148,14 +148,14 @@ No authorization required Place an order for a pet -### Example +### Example ```dart import 'package:openapi/api.dart'; var api_instance = new StoreApi(); var order = new Order(); // Order | order placed for purchasing the pet -try { +try { var result = api_instance.placeOrder(order); print(result); } catch (e) { diff --git a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib/doc/UserApi.md b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib/doc/UserApi.md index b3b11fe67485e9e7dc43a8607e7e5fad941eb855..efb3cf578df7254fae0464ed5544fe3bc9f70a44 100644 --- a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib/doc/UserApi.md +++ b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib/doc/UserApi.md @@ -26,7 +26,7 @@ Create user This can only be done by the logged in user. -### Example +### Example ```dart import 'package:openapi/api.dart'; // TODO Configure API key authorization: api_key @@ -37,7 +37,7 @@ import 'package:openapi/api.dart'; var api_instance = new UserApi(); var user = new User(); // User | Created user object -try { +try { api_instance.createUser(user); } catch (e) { print('Exception when calling UserApi->createUser: $e\n'); @@ -70,7 +70,7 @@ void (empty response body) Creates list of users with given input array -### Example +### Example ```dart import 'package:openapi/api.dart'; // TODO Configure API key authorization: api_key @@ -81,7 +81,7 @@ import 'package:openapi/api.dart'; var api_instance = new UserApi(); var user = [new BuiltList<User>()]; // BuiltList<User> | List of user object -try { +try { api_instance.createUsersWithArrayInput(user); } catch (e) { print('Exception when calling UserApi->createUsersWithArrayInput: $e\n'); @@ -114,7 +114,7 @@ void (empty response body) Creates list of users with given input array -### Example +### Example ```dart import 'package:openapi/api.dart'; // TODO Configure API key authorization: api_key @@ -125,7 +125,7 @@ import 'package:openapi/api.dart'; var api_instance = new UserApi(); var user = [new BuiltList<User>()]; // BuiltList<User> | List of user object -try { +try { api_instance.createUsersWithListInput(user); } catch (e) { print('Exception when calling UserApi->createUsersWithListInput: $e\n'); @@ -160,7 +160,7 @@ Delete user This can only be done by the logged in user. -### Example +### Example ```dart import 'package:openapi/api.dart'; // TODO Configure API key authorization: api_key @@ -171,7 +171,7 @@ import 'package:openapi/api.dart'; var api_instance = new UserApi(); var username = username_example; // String | The name that needs to be deleted -try { +try { api_instance.deleteUser(username); } catch (e) { print('Exception when calling UserApi->deleteUser: $e\n'); @@ -204,14 +204,14 @@ void (empty response body) Get user by user name -### Example +### Example ```dart import 'package:openapi/api.dart'; var api_instance = new UserApi(); var username = username_example; // String | The name that needs to be fetched. Use user1 for testing. -try { +try { var result = api_instance.getUserByName(username); print(result); } catch (e) { @@ -245,7 +245,7 @@ No authorization required Logs user into the system -### Example +### Example ```dart import 'package:openapi/api.dart'; @@ -253,7 +253,7 @@ var api_instance = new UserApi(); var username = username_example; // String | The user name for login var password = password_example; // String | The password for login in clear text -try { +try { var result = api_instance.loginUser(username, password); print(result); } catch (e) { @@ -288,7 +288,7 @@ No authorization required Logs out current logged in user session -### Example +### Example ```dart import 'package:openapi/api.dart'; // TODO Configure API key authorization: api_key @@ -298,7 +298,7 @@ import 'package:openapi/api.dart'; var api_instance = new UserApi(); -try { +try { api_instance.logoutUser(); } catch (e) { print('Exception when calling UserApi->logoutUser: $e\n'); @@ -330,7 +330,7 @@ Updated user This can only be done by the logged in user. -### Example +### Example ```dart import 'package:openapi/api.dart'; // TODO Configure API key authorization: api_key @@ -342,7 +342,7 @@ var api_instance = new UserApi(); var username = username_example; // String | name that need to be deleted var user = new User(); // User | Updated user object -try { +try { api_instance.updateUser(username, user); } catch (e) { print('Exception when calling UserApi->updateUser: $e\n'); diff --git a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/.gitignore b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/.gitignore index 6d2ac22c0b41764110b373e78b89df314e77397e..4298cdcbd1a24268bccd159b376ff8a9c4722868 100644 --- a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/.gitignore +++ b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/.gitignore @@ -10,7 +10,7 @@ build/ **/packages/ # Files created by dart2js -# (Most Dart developers will use pub build to compile Dart, use/modify these +# (Most Dart developers will use pub build to compile Dart, use/modify these # rules if you intend to use dart2js directly # Convention is to use extension '.dart.js' for Dart compiled to Javascript to # differentiate from explicit Javascript files) @@ -23,7 +23,7 @@ build/ # Directory created by dartdoc doc/api/ -# Don't commit pubspec lock file +# Don't commit pubspec lock file # (Library packages only! Remove pattern if developing an application package) pubspec.lock diff --git a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/README.md b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/README.md index 53a71efdb0273eebc17e118ed9b05243652e54ed..825eff0da8f7c7d5135394e07c403344789e3e33 100644 --- a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/README.md +++ b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/README.md @@ -192,4 +192,3 @@ Class | Method | HTTP request | Description - diff --git a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/doc/AnotherFakeApi.md b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/doc/AnotherFakeApi.md index bb401f7c20cbfe5cdb3f1bac631f5296c9b13fc3..100154d9b56556322b2deec1716de5cfd0158947 100644 --- a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/doc/AnotherFakeApi.md +++ b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/doc/AnotherFakeApi.md @@ -19,14 +19,14 @@ To test special tags To test special tags and operation ID starting with number -### Example +### Example ```dart import 'package:openapi/api.dart'; var api_instance = new AnotherFakeApi(); var modelClient = new ModelClient(); // ModelClient | client model -try { +try { var result = api_instance.call123testSpecialTags(modelClient); print(result); } catch (e) { diff --git a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/doc/DefaultApi.md b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/doc/DefaultApi.md index 5c305ecaa71f04b65806214dc520272623aab496..29d7690fb6e1f1b8c77f7fdab3394789c027a13b 100644 --- a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/doc/DefaultApi.md +++ b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/doc/DefaultApi.md @@ -17,13 +17,13 @@ Method | HTTP request | Description -### Example +### Example ```dart import 'package:openapi/api.dart'; var api_instance = new DefaultApi(); -try { +try { var result = api_instance.fooGet(); print(result); } catch (e) { diff --git a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/doc/FakeApi.md b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/doc/FakeApi.md index da4601dbec5fb3920bdb4f19a71881ed3f0ed7d7..9fe8fef9785039a3175eb5fe04f1881f921c0e02 100644 --- a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/doc/FakeApi.md +++ b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/doc/FakeApi.md @@ -33,13 +33,13 @@ Method | HTTP request | Description Health check endpoint -### Example +### Example ```dart import 'package:openapi/api.dart'; var api_instance = new FakeApi(); -try { +try { var result = api_instance.fakeHealthGet(); print(result); } catch (e) { @@ -70,7 +70,7 @@ No authorization required test http signature authentication -### Example +### Example ```dart import 'package:openapi/api.dart'; // TODO Configure HTTP basic authorization: http_signature_test @@ -82,7 +82,7 @@ var pet = new Pet(); // Pet | Pet object that needs to be added to the store var query1 = query1_example; // String | query parameter var header1 = header1_example; // String | header parameter -try { +try { api_instance.fakeHttpSignatureTest(pet, query1, header1); } catch (e) { print('Exception when calling FakeApi->fakeHttpSignatureTest: $e\n'); @@ -119,14 +119,14 @@ void (empty response body) Test serialization of outer boolean types -### Example +### Example ```dart import 'package:openapi/api.dart'; var api_instance = new FakeApi(); var body = new bool(); // bool | Input boolean as post body -try { +try { var result = api_instance.fakeOuterBooleanSerialize(body); print(result); } catch (e) { @@ -162,14 +162,14 @@ No authorization required Test serialization of object with outer number type -### Example +### Example ```dart import 'package:openapi/api.dart'; var api_instance = new FakeApi(); var outerComposite = new OuterComposite(); // OuterComposite | Input composite as post body -try { +try { var result = api_instance.fakeOuterCompositeSerialize(outerComposite); print(result); } catch (e) { @@ -205,14 +205,14 @@ No authorization required Test serialization of outer number types -### Example +### Example ```dart import 'package:openapi/api.dart'; var api_instance = new FakeApi(); var body = new num(); // num | Input number as post body -try { +try { var result = api_instance.fakeOuterNumberSerialize(body); print(result); } catch (e) { @@ -248,14 +248,14 @@ No authorization required Test serialization of outer string types -### Example +### Example ```dart import 'package:openapi/api.dart'; var api_instance = new FakeApi(); var body = new String(); // String | Input string as post body -try { +try { var result = api_instance.fakeOuterStringSerialize(body); print(result); } catch (e) { @@ -291,14 +291,14 @@ No authorization required Test serialization of enum (int) properties with examples -### Example +### Example ```dart import 'package:openapi/api.dart'; var api_instance = new FakeApi(); var outerObjectWithEnumProperty = new OuterObjectWithEnumProperty(); // OuterObjectWithEnumProperty | Input enum (int) as post body -try { +try { var result = api_instance.fakePropertyEnumIntegerSerialize(outerObjectWithEnumProperty); print(result); } catch (e) { @@ -334,14 +334,14 @@ No authorization required For this test, the body has to be a binary file. -### Example +### Example ```dart import 'package:openapi/api.dart'; var api_instance = new FakeApi(); var body = new Uint8List(); // Uint8List | image to upload -try { +try { api_instance.testBodyWithBinary(body); } catch (e) { print('Exception when calling FakeApi->testBodyWithBinary: $e\n'); @@ -376,14 +376,14 @@ No authorization required For this test, the body for this request must reference a schema named `File`. -### Example +### Example ```dart import 'package:openapi/api.dart'; var api_instance = new FakeApi(); var fileSchemaTestClass = new FileSchemaTestClass(); // FileSchemaTestClass | -try { +try { api_instance.testBodyWithFileSchema(fileSchemaTestClass); } catch (e) { print('Exception when calling FakeApi->testBodyWithFileSchema: $e\n'); @@ -416,7 +416,7 @@ No authorization required -### Example +### Example ```dart import 'package:openapi/api.dart'; @@ -424,7 +424,7 @@ var api_instance = new FakeApi(); var query = query_example; // String | var user = new User(); // User | -try { +try { api_instance.testBodyWithQueryParams(query, user); } catch (e) { print('Exception when calling FakeApi->testBodyWithQueryParams: $e\n'); @@ -460,14 +460,14 @@ To test \"client\" model To test \"client\" model -### Example +### Example ```dart import 'package:openapi/api.dart'; var api_instance = new FakeApi(); var modelClient = new ModelClient(); // ModelClient | client model -try { +try { var result = api_instance.testClientModel(modelClient); print(result); } catch (e) { @@ -503,7 +503,7 @@ Fake endpoint for testing various parameters å‡ç«¯é»ž å½ã®ã‚¨ãƒ³ãƒ‰ãƒã‚¤ãƒ³ Fake endpoint for testing various parameters å‡ç«¯é»ž å½ã®ã‚¨ãƒ³ãƒ‰ãƒã‚¤ãƒ³ãƒˆ 가짜 엔드 í¬ì¸íЏ -### Example +### Example ```dart import 'package:openapi/api.dart'; // TODO Configure HTTP basic authorization: http_basic_test @@ -526,7 +526,7 @@ var dateTime = 2013-10-20T19:20:30+01:00; // DateTime | None var password = password_example; // String | None var callback = callback_example; // String | None -try { +try { api_instance.testEndpointParameters(number, double_, patternWithoutDelimiter, byte, integer, int32, int64, float, string, binary, date, dateTime, password, callback); } catch (e) { print('Exception when calling FakeApi->testEndpointParameters: $e\n'); @@ -574,7 +574,7 @@ To test enum parameters To test enum parameters -### Example +### Example ```dart import 'package:openapi/api.dart'; @@ -588,7 +588,7 @@ var enumQueryDouble = 1.2; // double | Query parameter enum test (double) var enumFormStringArray = [enumFormStringArray_example]; // BuiltList<String> | Form parameter enum test (string array) var enumFormString = enumFormString_example; // String | Form parameter enum test (string) -try { +try { api_instance.testEnumParameters(enumHeaderStringArray, enumHeaderString, enumQueryStringArray, enumQueryString, enumQueryInteger, enumQueryDouble, enumFormStringArray, enumFormString); } catch (e) { print('Exception when calling FakeApi->testEnumParameters: $e\n'); @@ -630,7 +630,7 @@ Fake endpoint to test group parameters (optional) Fake endpoint to test group parameters (optional) -### Example +### Example ```dart import 'package:openapi/api.dart'; // TODO Configure HTTP basic authorization: bearer_test @@ -645,7 +645,7 @@ var stringGroup = 56; // int | String in group parameters var booleanGroup = true; // bool | Boolean in group parameters var int64Group = 789; // int | Integer in group parameters -try { +try { api_instance.testGroupParameters(requiredStringGroup, requiredBooleanGroup, requiredInt64Group, stringGroup, booleanGroup, int64Group); } catch (e) { print('Exception when calling FakeApi->testGroupParameters: $e\n'); @@ -683,14 +683,14 @@ void (empty response body) test inline additionalProperties -### Example +### Example ```dart import 'package:openapi/api.dart'; var api_instance = new FakeApi(); var requestBody = new BuiltMap<String, String>(); // BuiltMap<String, String> | request body -try { +try { api_instance.testInlineAdditionalProperties(requestBody); } catch (e) { print('Exception when calling FakeApi->testInlineAdditionalProperties: $e\n'); @@ -723,7 +723,7 @@ No authorization required test json serialization of form data -### Example +### Example ```dart import 'package:openapi/api.dart'; @@ -731,7 +731,7 @@ var api_instance = new FakeApi(); var param = param_example; // String | field1 var param2 = param2_example; // String | field2 -try { +try { api_instance.testJsonFormData(param, param2); } catch (e) { print('Exception when calling FakeApi->testJsonFormData: $e\n'); @@ -767,7 +767,7 @@ No authorization required To test the collection format in query parameters -### Example +### Example ```dart import 'package:openapi/api.dart'; @@ -778,7 +778,7 @@ var http = []; // BuiltList<String> | var url = []; // BuiltList<String> | var context = []; // BuiltList<String> | -try { +try { api_instance.testQueryParameterCollectionFormat(pipe, ioutil, http, url, context); } catch (e) { print('Exception when calling FakeApi->testQueryParameterCollectionFormat: $e\n'); diff --git a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/doc/FakeClassnameTags123Api.md b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/doc/FakeClassnameTags123Api.md index 98fe0b47358bc85f5b9b056a474b05f1a3e8302f..fe60618817a01b6de50fd1cdd13ad9d3ba5553bb 100644 --- a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/doc/FakeClassnameTags123Api.md +++ b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/doc/FakeClassnameTags123Api.md @@ -19,7 +19,7 @@ To test class name in snake case To test class name in snake case -### Example +### Example ```dart import 'package:openapi/api.dart'; // TODO Configure API key authorization: api_key_query @@ -30,7 +30,7 @@ import 'package:openapi/api.dart'; var api_instance = new FakeClassnameTags123Api(); var modelClient = new ModelClient(); // ModelClient | client model -try { +try { var result = api_instance.testClassname(modelClient); print(result); } catch (e) { diff --git a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/doc/PetApi.md b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/doc/PetApi.md index 841eed63291659f45175f931703392e712fe71e2..1a13704db1885861215e3a47461cbba9fec90d2a 100644 --- a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/doc/PetApi.md +++ b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/doc/PetApi.md @@ -25,7 +25,7 @@ Method | HTTP request | Description Add a new pet to the store -### Example +### Example ```dart import 'package:openapi/api.dart'; // TODO Configure OAuth2 access token for authorization: petstore_auth @@ -34,7 +34,7 @@ import 'package:openapi/api.dart'; var api_instance = new PetApi(); var pet = new Pet(); // Pet | Pet object that needs to be added to the store -try { +try { api_instance.addPet(pet); } catch (e) { print('Exception when calling PetApi->addPet: $e\n'); @@ -67,7 +67,7 @@ void (empty response body) Deletes a pet -### Example +### Example ```dart import 'package:openapi/api.dart'; // TODO Configure OAuth2 access token for authorization: petstore_auth @@ -77,7 +77,7 @@ var api_instance = new PetApi(); var petId = 789; // int | Pet id to delete var apiKey = apiKey_example; // String | -try { +try { api_instance.deletePet(petId, apiKey); } catch (e) { print('Exception when calling PetApi->deletePet: $e\n'); @@ -113,7 +113,7 @@ Finds Pets by status Multiple status values can be provided with comma separated strings -### Example +### Example ```dart import 'package:openapi/api.dart'; // TODO Configure OAuth2 access token for authorization: petstore_auth @@ -122,7 +122,7 @@ import 'package:openapi/api.dart'; var api_instance = new PetApi(); var status = []; // BuiltList<String> | Status values that need to be considered for filter -try { +try { var result = api_instance.findPetsByStatus(status); print(result); } catch (e) { @@ -158,7 +158,7 @@ Finds Pets by tags Multiple tags can be provided with comma separated strings. Use tag1, tag2, tag3 for testing. -### Example +### Example ```dart import 'package:openapi/api.dart'; // TODO Configure OAuth2 access token for authorization: petstore_auth @@ -167,7 +167,7 @@ import 'package:openapi/api.dart'; var api_instance = new PetApi(); var tags = []; // BuiltSet<String> | Tags to filter by -try { +try { var result = api_instance.findPetsByTags(tags); print(result); } catch (e) { @@ -203,7 +203,7 @@ Find pet by ID Returns a single pet -### Example +### Example ```dart import 'package:openapi/api.dart'; // TODO Configure API key authorization: api_key @@ -214,7 +214,7 @@ import 'package:openapi/api.dart'; var api_instance = new PetApi(); var petId = 789; // int | ID of pet to return -try { +try { var result = api_instance.getPetById(petId); print(result); } catch (e) { @@ -248,7 +248,7 @@ Name | Type | Description | Notes Update an existing pet -### Example +### Example ```dart import 'package:openapi/api.dart'; // TODO Configure OAuth2 access token for authorization: petstore_auth @@ -257,7 +257,7 @@ import 'package:openapi/api.dart'; var api_instance = new PetApi(); var pet = new Pet(); // Pet | Pet object that needs to be added to the store -try { +try { api_instance.updatePet(pet); } catch (e) { print('Exception when calling PetApi->updatePet: $e\n'); @@ -290,7 +290,7 @@ void (empty response body) Updates a pet in the store with form data -### Example +### Example ```dart import 'package:openapi/api.dart'; // TODO Configure OAuth2 access token for authorization: petstore_auth @@ -301,7 +301,7 @@ 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 { +try { api_instance.updatePetWithForm(petId, name, status); } catch (e) { print('Exception when calling PetApi->updatePetWithForm: $e\n'); @@ -336,7 +336,7 @@ void (empty response body) uploads an image -### Example +### Example ```dart import 'package:openapi/api.dart'; // TODO Configure OAuth2 access token for authorization: petstore_auth @@ -347,7 +347,7 @@ 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; // Uint8List | file to upload -try { +try { var result = api_instance.uploadFile(petId, additionalMetadata, file); print(result); } catch (e) { @@ -383,7 +383,7 @@ Name | Type | Description | Notes uploads an image (required) -### Example +### Example ```dart import 'package:openapi/api.dart'; // TODO Configure OAuth2 access token for authorization: petstore_auth @@ -394,7 +394,7 @@ var petId = 789; // int | ID of pet to update var requiredFile = BINARY_DATA_HERE; // Uint8List | file to upload var additionalMetadata = additionalMetadata_example; // String | Additional data to pass to server -try { +try { var result = api_instance.uploadFileWithRequiredFile(petId, requiredFile, additionalMetadata); print(result); } catch (e) { diff --git a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/doc/StoreApi.md b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/doc/StoreApi.md index a7dbf9ad019778f3463f20b69a0228db8ee7c7a0..d1cc77910a9e35fd614a650d6b127c2228cde8ee 100644 --- a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/doc/StoreApi.md +++ b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/doc/StoreApi.md @@ -22,14 +22,14 @@ Delete purchase order by ID For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors -### Example +### Example ```dart import 'package:openapi/api.dart'; var api_instance = new StoreApi(); var orderId = orderId_example; // String | ID of the order that needs to be deleted -try { +try { api_instance.deleteOrder(orderId); } catch (e) { print('Exception when calling StoreApi->deleteOrder: $e\n'); @@ -64,7 +64,7 @@ Returns pet inventories by status Returns a map of status codes to quantities -### Example +### Example ```dart import 'package:openapi/api.dart'; // TODO Configure API key authorization: api_key @@ -74,7 +74,7 @@ import 'package:openapi/api.dart'; var api_instance = new StoreApi(); -try { +try { var result = api_instance.getInventory(); print(result); } catch (e) { @@ -107,14 +107,14 @@ Find purchase order by ID For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions -### Example +### Example ```dart import 'package:openapi/api.dart'; var api_instance = new StoreApi(); var orderId = 789; // int | ID of pet that needs to be fetched -try { +try { var result = api_instance.getOrderById(orderId); print(result); } catch (e) { @@ -148,14 +148,14 @@ No authorization required Place an order for a pet -### Example +### Example ```dart import 'package:openapi/api.dart'; var api_instance = new StoreApi(); var order = new Order(); // Order | order placed for purchasing the pet -try { +try { var result = api_instance.placeOrder(order); print(result); } catch (e) { diff --git a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/doc/UserApi.md b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/doc/UserApi.md index 32bc2e675da9c9fcb564894974f4c6e909e9573b..0ef486c0809f77499a8ac18d8e80259e46d35778 100644 --- a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/doc/UserApi.md +++ b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/doc/UserApi.md @@ -26,14 +26,14 @@ Create user This can only be done by the logged in user. -### Example +### Example ```dart import 'package:openapi/api.dart'; var api_instance = new UserApi(); var user = new User(); // User | Created user object -try { +try { api_instance.createUser(user); } catch (e) { print('Exception when calling UserApi->createUser: $e\n'); @@ -66,14 +66,14 @@ No authorization required Creates list of users with given input array -### Example +### Example ```dart import 'package:openapi/api.dart'; var api_instance = new UserApi(); var user = [new BuiltList<User>()]; // BuiltList<User> | List of user object -try { +try { api_instance.createUsersWithArrayInput(user); } catch (e) { print('Exception when calling UserApi->createUsersWithArrayInput: $e\n'); @@ -106,14 +106,14 @@ No authorization required Creates list of users with given input array -### Example +### Example ```dart import 'package:openapi/api.dart'; var api_instance = new UserApi(); var user = [new BuiltList<User>()]; // BuiltList<User> | List of user object -try { +try { api_instance.createUsersWithListInput(user); } catch (e) { print('Exception when calling UserApi->createUsersWithListInput: $e\n'); @@ -148,14 +148,14 @@ Delete user This can only be done by the logged in user. -### Example +### Example ```dart import 'package:openapi/api.dart'; var api_instance = new UserApi(); var username = username_example; // String | The name that needs to be deleted -try { +try { api_instance.deleteUser(username); } catch (e) { print('Exception when calling UserApi->deleteUser: $e\n'); @@ -188,14 +188,14 @@ No authorization required Get user by user name -### Example +### Example ```dart import 'package:openapi/api.dart'; var api_instance = new UserApi(); var username = username_example; // String | The name that needs to be fetched. Use user1 for testing. -try { +try { var result = api_instance.getUserByName(username); print(result); } catch (e) { @@ -229,7 +229,7 @@ No authorization required Logs user into the system -### Example +### Example ```dart import 'package:openapi/api.dart'; @@ -237,7 +237,7 @@ var api_instance = new UserApi(); var username = username_example; // String | The user name for login var password = password_example; // String | The password for login in clear text -try { +try { var result = api_instance.loginUser(username, password); print(result); } catch (e) { @@ -272,13 +272,13 @@ No authorization required Logs out current logged in user session -### Example +### Example ```dart import 'package:openapi/api.dart'; var api_instance = new UserApi(); -try { +try { api_instance.logoutUser(); } catch (e) { print('Exception when calling UserApi->logoutUser: $e\n'); @@ -310,7 +310,7 @@ Updated user This can only be done by the logged in user. -### Example +### Example ```dart import 'package:openapi/api.dart'; @@ -318,7 +318,7 @@ var api_instance = new UserApi(); var username = username_example; // String | name that need to be deleted var user = new User(); // User | Updated user object -try { +try { api_instance.updateUser(username, user); } catch (e) { print('Exception when calling UserApi->updateUser: $e\n'); diff --git a/samples/openapi3/client/petstore/dart2/petstore_client_lib/.gitignore b/samples/openapi3/client/petstore/dart2/petstore_client_lib/.gitignore index 7c280441649860d99e9df07c398b32012ea8fffd..8b7331fd822c517d1df2cce63114175ef8005879 100644 --- a/samples/openapi3/client/petstore/dart2/petstore_client_lib/.gitignore +++ b/samples/openapi3/client/petstore/dart2/petstore_client_lib/.gitignore @@ -9,7 +9,7 @@ build/ **/packages/ # Files created by dart2js -# (Most Dart developers will use pub build to compile Dart, use/modify these +# (Most Dart developers will use pub build to compile Dart, use/modify these # rules if you intend to use dart2js directly # Convention is to use extension '.dart.js' for Dart compiled to Javascript to # differentiate from explicit Javascript files) @@ -22,6 +22,6 @@ build/ # Directory created by dartdoc doc/api/ -# Don't commit pubspec lock file +# Don't commit pubspec lock file # (Library packages only! Remove pattern if developing an application package) pubspec.lock diff --git a/samples/openapi3/client/petstore/dart2/petstore_client_lib/README.md b/samples/openapi3/client/petstore/dart2/petstore_client_lib/README.md index 99bd229f3c502d2b95ad7d00553e4a2c15f68afb..b41b8970d0c232b4b285191770f79924d7c48d20 100644 --- a/samples/openapi3/client/petstore/dart2/petstore_client_lib/README.md +++ b/samples/openapi3/client/petstore/dart2/petstore_client_lib/README.md @@ -115,4 +115,3 @@ Class | Method | HTTP request | Description - diff --git a/samples/openapi3/client/petstore/dart2/petstore_client_lib/doc/PetApi.md b/samples/openapi3/client/petstore/dart2/petstore_client_lib/doc/PetApi.md index cd49e1878023ac0778bb82fa7da876b50b8b2418..3100f670bc78545447c3a542c04b1c9759880f01 100644 --- a/samples/openapi3/client/petstore/dart2/petstore_client_lib/doc/PetApi.md +++ b/samples/openapi3/client/petstore/dart2/petstore_client_lib/doc/PetApi.md @@ -24,7 +24,7 @@ Method | HTTP request | Description Add a new pet to the store -### Example +### Example ```dart import 'package:openapi/api.dart'; // TODO Configure OAuth2 access token for authorization: petstore_auth @@ -33,7 +33,7 @@ import 'package:openapi/api.dart'; final api_instance = PetApi(); final pet = Pet(); // Pet | Pet object that needs to be added to the store -try { +try { final result = api_instance.addPet(pet); print(result); } catch (e) { @@ -67,7 +67,7 @@ Name | Type | Description | Notes Deletes a pet -### Example +### Example ```dart import 'package:openapi/api.dart'; // TODO Configure OAuth2 access token for authorization: petstore_auth @@ -77,7 +77,7 @@ final api_instance = PetApi(); final petId = 789; // int | Pet id to delete final apiKey = apiKey_example; // String | -try { +try { api_instance.deletePet(petId, apiKey); } catch (e) { print('Exception when calling PetApi->deletePet: $e\n'); @@ -113,7 +113,7 @@ Finds Pets by status Multiple status values can be provided with comma separated strings -### Example +### Example ```dart import 'package:openapi/api.dart'; // TODO Configure OAuth2 access token for authorization: petstore_auth @@ -122,7 +122,7 @@ import 'package:openapi/api.dart'; final api_instance = PetApi(); final status = []; // List<String> | Status values that need to be considered for filter -try { +try { final result = api_instance.findPetsByStatus(status); print(result); } catch (e) { @@ -158,7 +158,7 @@ Finds Pets by tags Multiple tags can be provided with comma separated strings. Use tag1, tag2, tag3 for testing. -### Example +### Example ```dart import 'package:openapi/api.dart'; // TODO Configure OAuth2 access token for authorization: petstore_auth @@ -167,7 +167,7 @@ import 'package:openapi/api.dart'; final api_instance = PetApi(); final tags = []; // List<String> | Tags to filter by -try { +try { final result = api_instance.findPetsByTags(tags); print(result); } catch (e) { @@ -203,7 +203,7 @@ Find pet by ID Returns a single pet -### Example +### Example ```dart import 'package:openapi/api.dart'; // TODO Configure API key authorization: api_key @@ -214,7 +214,7 @@ import 'package:openapi/api.dart'; final api_instance = PetApi(); final petId = 789; // int | ID of pet to return -try { +try { final result = api_instance.getPetById(petId); print(result); } catch (e) { @@ -248,7 +248,7 @@ Name | Type | Description | Notes Update an existing pet -### Example +### Example ```dart import 'package:openapi/api.dart'; // TODO Configure OAuth2 access token for authorization: petstore_auth @@ -257,7 +257,7 @@ import 'package:openapi/api.dart'; final api_instance = PetApi(); final pet = Pet(); // Pet | Pet object that needs to be added to the store -try { +try { final result = api_instance.updatePet(pet); print(result); } catch (e) { @@ -291,7 +291,7 @@ Name | Type | Description | Notes Updates a pet in the store with form data -### Example +### Example ```dart import 'package:openapi/api.dart'; // TODO Configure OAuth2 access token for authorization: petstore_auth @@ -302,7 +302,7 @@ final petId = 789; // int | ID of pet that needs to be updated final name = name_example; // String | Updated name of the pet final status = status_example; // String | Updated status of the pet -try { +try { api_instance.updatePetWithForm(petId, name, status); } catch (e) { print('Exception when calling PetApi->updatePetWithForm: $e\n'); @@ -337,7 +337,7 @@ void (empty response body) uploads an image -### Example +### Example ```dart import 'package:openapi/api.dart'; // TODO Configure OAuth2 access token for authorization: petstore_auth @@ -348,7 +348,7 @@ final petId = 789; // int | ID of pet to update final additionalMetadata = additionalMetadata_example; // String | Additional data to pass to server final file = BINARY_DATA_HERE; // MultipartFile | file to upload -try { +try { final result = api_instance.uploadFile(petId, additionalMetadata, file); print(result); } catch (e) { diff --git a/samples/openapi3/client/petstore/dart2/petstore_client_lib/doc/StoreApi.md b/samples/openapi3/client/petstore/dart2/petstore_client_lib/doc/StoreApi.md index eac035a7f5577079c336728ee763c3fff3a63e94..1f07909857944a55470784d8a310147c87391dd2 100644 --- a/samples/openapi3/client/petstore/dart2/petstore_client_lib/doc/StoreApi.md +++ b/samples/openapi3/client/petstore/dart2/petstore_client_lib/doc/StoreApi.md @@ -22,14 +22,14 @@ Delete purchase order by ID For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors -### Example +### Example ```dart import 'package:openapi/api.dart'; final api_instance = StoreApi(); final orderId = orderId_example; // String | ID of the order that needs to be deleted -try { +try { api_instance.deleteOrder(orderId); } catch (e) { print('Exception when calling StoreApi->deleteOrder: $e\n'); @@ -64,7 +64,7 @@ Returns pet inventories by status Returns a map of status codes to quantities -### Example +### Example ```dart import 'package:openapi/api.dart'; // TODO Configure API key authorization: api_key @@ -74,7 +74,7 @@ import 'package:openapi/api.dart'; final api_instance = StoreApi(); -try { +try { final result = api_instance.getInventory(); print(result); } catch (e) { @@ -107,14 +107,14 @@ Find purchase order by ID For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions -### Example +### Example ```dart import 'package:openapi/api.dart'; final api_instance = StoreApi(); final orderId = 789; // int | ID of pet that needs to be fetched -try { +try { final result = api_instance.getOrderById(orderId); print(result); } catch (e) { @@ -148,14 +148,14 @@ No authorization required Place an order for a pet -### Example +### Example ```dart import 'package:openapi/api.dart'; final api_instance = StoreApi(); final order = Order(); // Order | order placed for purchasing the pet -try { +try { final result = api_instance.placeOrder(order); print(result); } catch (e) { diff --git a/samples/openapi3/client/petstore/dart2/petstore_client_lib/doc/UserApi.md b/samples/openapi3/client/petstore/dart2/petstore_client_lib/doc/UserApi.md index 05beed9950666e91edd13b0ada088857c80efb8f..7907143ecaa6844abcf2512a5a625851a29dd6fa 100644 --- a/samples/openapi3/client/petstore/dart2/petstore_client_lib/doc/UserApi.md +++ b/samples/openapi3/client/petstore/dart2/petstore_client_lib/doc/UserApi.md @@ -26,7 +26,7 @@ Create user This can only be done by the logged in user. -### Example +### Example ```dart import 'package:openapi/api.dart'; // TODO Configure API key authorization: api_key @@ -37,7 +37,7 @@ import 'package:openapi/api.dart'; final api_instance = UserApi(); final user = User(); // User | Created user object -try { +try { api_instance.createUser(user); } catch (e) { print('Exception when calling UserApi->createUser: $e\n'); @@ -70,7 +70,7 @@ void (empty response body) Creates list of users with given input array -### Example +### Example ```dart import 'package:openapi/api.dart'; // TODO Configure API key authorization: api_key @@ -81,7 +81,7 @@ import 'package:openapi/api.dart'; final api_instance = UserApi(); final user = [List<User>()]; // List<User> | List of user object -try { +try { api_instance.createUsersWithArrayInput(user); } catch (e) { print('Exception when calling UserApi->createUsersWithArrayInput: $e\n'); @@ -114,7 +114,7 @@ void (empty response body) Creates list of users with given input array -### Example +### Example ```dart import 'package:openapi/api.dart'; // TODO Configure API key authorization: api_key @@ -125,7 +125,7 @@ import 'package:openapi/api.dart'; final api_instance = UserApi(); final user = [List<User>()]; // List<User> | List of user object -try { +try { api_instance.createUsersWithListInput(user); } catch (e) { print('Exception when calling UserApi->createUsersWithListInput: $e\n'); @@ -160,7 +160,7 @@ Delete user This can only be done by the logged in user. -### Example +### Example ```dart import 'package:openapi/api.dart'; // TODO Configure API key authorization: api_key @@ -171,7 +171,7 @@ import 'package:openapi/api.dart'; final api_instance = UserApi(); final username = username_example; // String | The name that needs to be deleted -try { +try { api_instance.deleteUser(username); } catch (e) { print('Exception when calling UserApi->deleteUser: $e\n'); @@ -204,14 +204,14 @@ void (empty response body) Get user by user name -### Example +### Example ```dart import 'package:openapi/api.dart'; final api_instance = UserApi(); final username = username_example; // String | The name that needs to be fetched. Use user1 for testing. -try { +try { final result = api_instance.getUserByName(username); print(result); } catch (e) { @@ -245,7 +245,7 @@ No authorization required Logs user into the system -### Example +### Example ```dart import 'package:openapi/api.dart'; @@ -253,7 +253,7 @@ final api_instance = UserApi(); final username = username_example; // String | The user name for login final password = password_example; // String | The password for login in clear text -try { +try { final result = api_instance.loginUser(username, password); print(result); } catch (e) { @@ -288,7 +288,7 @@ No authorization required Logs out current logged in user session -### Example +### Example ```dart import 'package:openapi/api.dart'; // TODO Configure API key authorization: api_key @@ -298,7 +298,7 @@ import 'package:openapi/api.dart'; final api_instance = UserApi(); -try { +try { api_instance.logoutUser(); } catch (e) { print('Exception when calling UserApi->logoutUser: $e\n'); @@ -330,7 +330,7 @@ Updated user This can only be done by the logged in user. -### Example +### Example ```dart import 'package:openapi/api.dart'; // TODO Configure API key authorization: api_key @@ -342,7 +342,7 @@ final api_instance = UserApi(); final username = username_example; // String | name that need to be deleted final user = User(); // User | Updated user object -try { +try { api_instance.updateUser(username, user); } catch (e) { print('Exception when calling UserApi->updateUser: $e\n'); diff --git a/samples/openapi3/client/petstore/dart2/petstore_client_lib/git_push.sh b/samples/openapi3/client/petstore/dart2/petstore_client_lib/git_push.sh index ced3be2b0c7b2349ff06d18da19d4b31435c9fa6..9405f72e950cdb8ca24c3cf4d15cee7eac62fde7 100644 --- a/samples/openapi3/client/petstore/dart2/petstore_client_lib/git_push.sh +++ b/samples/openapi3/client/petstore/dart2/petstore_client_lib/git_push.sh @@ -55,4 +55,3 @@ 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/openapi3/client/petstore/dart2/petstore_client_lib_fake/.gitignore b/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/.gitignore index 7c280441649860d99e9df07c398b32012ea8fffd..8b7331fd822c517d1df2cce63114175ef8005879 100644 --- a/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/.gitignore +++ b/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/.gitignore @@ -9,7 +9,7 @@ build/ **/packages/ # Files created by dart2js -# (Most Dart developers will use pub build to compile Dart, use/modify these +# (Most Dart developers will use pub build to compile Dart, use/modify these # rules if you intend to use dart2js directly # Convention is to use extension '.dart.js' for Dart compiled to Javascript to # differentiate from explicit Javascript files) @@ -22,6 +22,6 @@ build/ # Directory created by dartdoc doc/api/ -# Don't commit pubspec lock file +# Don't commit pubspec lock file # (Library packages only! Remove pattern if developing an application package) pubspec.lock diff --git a/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/README.md b/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/README.md index 1d6fe591dd174e9bd699a0def07243b6f65e6633..632231a59b137ef9d333954d4b86440176ef0c8b 100644 --- a/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/README.md +++ b/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/README.md @@ -191,4 +191,3 @@ Class | Method | HTTP request | Description - diff --git a/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/doc/AnotherFakeApi.md b/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/doc/AnotherFakeApi.md index 377ad777a2edfcb14dcd00d22f9935aca8a413ae..241c82e575d4a2a1026604bc817412faf3a1f7a7 100644 --- a/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/doc/AnotherFakeApi.md +++ b/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/doc/AnotherFakeApi.md @@ -19,14 +19,14 @@ To test special tags To test special tags and operation ID starting with number -### Example +### Example ```dart import 'package:openapi/api.dart'; final api_instance = AnotherFakeApi(); final modelClient = ModelClient(); // ModelClient | client model -try { +try { final result = api_instance.call123testSpecialTags(modelClient); print(result); } catch (e) { diff --git a/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/doc/DefaultApi.md b/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/doc/DefaultApi.md index 68516124419b004669f2366dbfddafffd6461c1f..d7b1c748f14ee87c3068ff061c26508b626ee3cc 100644 --- a/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/doc/DefaultApi.md +++ b/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/doc/DefaultApi.md @@ -17,13 +17,13 @@ Method | HTTP request | Description -### Example +### Example ```dart import 'package:openapi/api.dart'; final api_instance = DefaultApi(); -try { +try { final result = api_instance.fooGet(); print(result); } catch (e) { diff --git a/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/doc/FakeApi.md b/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/doc/FakeApi.md index 6d613003880f977d200ae838e744fa28eb4c1d36..d2823b115f284af5d91d22c37e61a6dc3794fd39 100644 --- a/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/doc/FakeApi.md +++ b/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/doc/FakeApi.md @@ -33,13 +33,13 @@ Method | HTTP request | Description Health check endpoint -### Example +### Example ```dart import 'package:openapi/api.dart'; final api_instance = FakeApi(); -try { +try { final result = api_instance.fakeHealthGet(); print(result); } catch (e) { @@ -70,7 +70,7 @@ No authorization required test http signature authentication -### Example +### Example ```dart import 'package:openapi/api.dart'; @@ -79,7 +79,7 @@ final pet = Pet(); // Pet | Pet object that needs to be added to the store final query1 = query1_example; // String | query parameter final header1 = header1_example; // String | header parameter -try { +try { api_instance.fakeHttpSignatureTest(pet, query1, header1); } catch (e) { print('Exception when calling FakeApi->fakeHttpSignatureTest: $e\n'); @@ -116,14 +116,14 @@ void (empty response body) Test serialization of outer boolean types -### Example +### Example ```dart import 'package:openapi/api.dart'; final api_instance = FakeApi(); final body = bool(); // bool | Input boolean as post body -try { +try { final result = api_instance.fakeOuterBooleanSerialize(body); print(result); } catch (e) { @@ -159,14 +159,14 @@ No authorization required Test serialization of object with outer number type -### Example +### Example ```dart import 'package:openapi/api.dart'; final api_instance = FakeApi(); final outerComposite = OuterComposite(); // OuterComposite | Input composite as post body -try { +try { final result = api_instance.fakeOuterCompositeSerialize(outerComposite); print(result); } catch (e) { @@ -202,14 +202,14 @@ No authorization required Test serialization of outer number types -### Example +### Example ```dart import 'package:openapi/api.dart'; final api_instance = FakeApi(); final body = num(); // num | Input number as post body -try { +try { final result = api_instance.fakeOuterNumberSerialize(body); print(result); } catch (e) { @@ -245,14 +245,14 @@ No authorization required Test serialization of outer string types -### Example +### Example ```dart import 'package:openapi/api.dart'; final api_instance = FakeApi(); final body = String(); // String | Input string as post body -try { +try { final result = api_instance.fakeOuterStringSerialize(body); print(result); } catch (e) { @@ -288,14 +288,14 @@ No authorization required Test serialization of enum (int) properties with examples -### Example +### Example ```dart import 'package:openapi/api.dart'; final api_instance = FakeApi(); final outerObjectWithEnumProperty = OuterObjectWithEnumProperty(); // OuterObjectWithEnumProperty | Input enum (int) as post body -try { +try { final result = api_instance.fakePropertyEnumIntegerSerialize(outerObjectWithEnumProperty); print(result); } catch (e) { @@ -331,14 +331,14 @@ No authorization required For this test, the body has to be a binary file. -### Example +### Example ```dart import 'package:openapi/api.dart'; final api_instance = FakeApi(); final body = MultipartFile(); // MultipartFile | image to upload -try { +try { api_instance.testBodyWithBinary(body); } catch (e) { print('Exception when calling FakeApi->testBodyWithBinary: $e\n'); @@ -373,14 +373,14 @@ No authorization required For this test, the body for this request must reference a schema named `File`. -### Example +### Example ```dart import 'package:openapi/api.dart'; final api_instance = FakeApi(); final fileSchemaTestClass = FileSchemaTestClass(); // FileSchemaTestClass | -try { +try { api_instance.testBodyWithFileSchema(fileSchemaTestClass); } catch (e) { print('Exception when calling FakeApi->testBodyWithFileSchema: $e\n'); @@ -413,7 +413,7 @@ No authorization required -### Example +### Example ```dart import 'package:openapi/api.dart'; @@ -421,7 +421,7 @@ final api_instance = FakeApi(); final query = query_example; // String | final user = User(); // User | -try { +try { api_instance.testBodyWithQueryParams(query, user); } catch (e) { print('Exception when calling FakeApi->testBodyWithQueryParams: $e\n'); @@ -457,14 +457,14 @@ To test \"client\" model To test \"client\" model -### Example +### Example ```dart import 'package:openapi/api.dart'; final api_instance = FakeApi(); final modelClient = ModelClient(); // ModelClient | client model -try { +try { final result = api_instance.testClientModel(modelClient); print(result); } catch (e) { @@ -500,7 +500,7 @@ Fake endpoint for testing various parameters å‡ç«¯é»ž å½ã®ã‚¨ãƒ³ãƒ‰ãƒã‚¤ãƒ³ Fake endpoint for testing various parameters å‡ç«¯é»ž å½ã®ã‚¨ãƒ³ãƒ‰ãƒã‚¤ãƒ³ãƒˆ 가짜 엔드 í¬ì¸íЏ -### Example +### Example ```dart import 'package:openapi/api.dart'; // TODO Configure HTTP basic authorization: http_basic_test @@ -523,7 +523,7 @@ final dateTime = 2013-10-20T19:20:30+01:00; // DateTime | None final password = password_example; // String | None final callback = callback_example; // String | None -try { +try { api_instance.testEndpointParameters(number, double_, patternWithoutDelimiter, byte, integer, int32, int64, float, string, binary, date, dateTime, password, callback); } catch (e) { print('Exception when calling FakeApi->testEndpointParameters: $e\n'); @@ -571,7 +571,7 @@ To test enum parameters To test enum parameters -### Example +### Example ```dart import 'package:openapi/api.dart'; @@ -585,7 +585,7 @@ final enumQueryDouble = 1.2; // double | Query parameter enum test (double) final enumFormStringArray = [enumFormStringArray_example]; // List<String> | Form parameter enum test (string array) final enumFormString = enumFormString_example; // String | Form parameter enum test (string) -try { +try { api_instance.testEnumParameters(enumHeaderStringArray, enumHeaderString, enumQueryStringArray, enumQueryString, enumQueryInteger, enumQueryDouble, enumFormStringArray, enumFormString); } catch (e) { print('Exception when calling FakeApi->testEnumParameters: $e\n'); @@ -627,7 +627,7 @@ Fake endpoint to test group parameters (optional) Fake endpoint to test group parameters (optional) -### Example +### Example ```dart import 'package:openapi/api.dart'; // TODO Configure HTTP Bearer authorization: bearer_test @@ -645,7 +645,7 @@ final stringGroup = 56; // int | String in group parameters final booleanGroup = true; // bool | Boolean in group parameters final int64Group = 789; // int | Integer in group parameters -try { +try { api_instance.testGroupParameters(requiredStringGroup, requiredBooleanGroup, requiredInt64Group, stringGroup, booleanGroup, int64Group); } catch (e) { print('Exception when calling FakeApi->testGroupParameters: $e\n'); @@ -683,14 +683,14 @@ void (empty response body) test inline additionalProperties -### Example +### Example ```dart import 'package:openapi/api.dart'; final api_instance = FakeApi(); final requestBody = Map<String, String>(); // Map<String, String> | request body -try { +try { api_instance.testInlineAdditionalProperties(requestBody); } catch (e) { print('Exception when calling FakeApi->testInlineAdditionalProperties: $e\n'); @@ -723,7 +723,7 @@ No authorization required test json serialization of form data -### Example +### Example ```dart import 'package:openapi/api.dart'; @@ -731,7 +731,7 @@ final api_instance = FakeApi(); final param = param_example; // String | field1 final param2 = param2_example; // String | field2 -try { +try { api_instance.testJsonFormData(param, param2); } catch (e) { print('Exception when calling FakeApi->testJsonFormData: $e\n'); @@ -767,7 +767,7 @@ No authorization required To test the collection format in query parameters -### Example +### Example ```dart import 'package:openapi/api.dart'; @@ -778,7 +778,7 @@ final http = []; // List<String> | final url = []; // List<String> | final context = []; // List<String> | -try { +try { api_instance.testQueryParameterCollectionFormat(pipe, ioutil, http, url, context); } catch (e) { print('Exception when calling FakeApi->testQueryParameterCollectionFormat: $e\n'); diff --git a/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/doc/FakeClassnameTags123Api.md b/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/doc/FakeClassnameTags123Api.md index 243ce4e57736935fe6ce64f7d9b72a6dc558882a..5518c67403ff8a7227036186cdf77be63382ce24 100644 --- a/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/doc/FakeClassnameTags123Api.md +++ b/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/doc/FakeClassnameTags123Api.md @@ -19,7 +19,7 @@ To test class name in snake case To test class name in snake case -### Example +### Example ```dart import 'package:openapi/api.dart'; // TODO Configure API key authorization: api_key_query @@ -30,7 +30,7 @@ import 'package:openapi/api.dart'; final api_instance = FakeClassnameTags123Api(); final modelClient = ModelClient(); // ModelClient | client model -try { +try { final result = api_instance.testClassname(modelClient); print(result); } catch (e) { diff --git a/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/doc/PetApi.md b/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/doc/PetApi.md index 725de36a431f7183836e82d2f531be4f80ec8453..387717e3f917fffca439f432cacda8c048e8d8f4 100644 --- a/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/doc/PetApi.md +++ b/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/doc/PetApi.md @@ -25,7 +25,7 @@ Method | HTTP request | Description Add a new pet to the store -### Example +### Example ```dart import 'package:openapi/api.dart'; // TODO Configure OAuth2 access token for authorization: petstore_auth @@ -34,7 +34,7 @@ import 'package:openapi/api.dart'; final api_instance = PetApi(); final pet = Pet(); // Pet | Pet object that needs to be added to the store -try { +try { api_instance.addPet(pet); } catch (e) { print('Exception when calling PetApi->addPet: $e\n'); @@ -67,7 +67,7 @@ void (empty response body) Deletes a pet -### Example +### Example ```dart import 'package:openapi/api.dart'; // TODO Configure OAuth2 access token for authorization: petstore_auth @@ -77,7 +77,7 @@ final api_instance = PetApi(); final petId = 789; // int | Pet id to delete final apiKey = apiKey_example; // String | -try { +try { api_instance.deletePet(petId, apiKey); } catch (e) { print('Exception when calling PetApi->deletePet: $e\n'); @@ -113,7 +113,7 @@ Finds Pets by status Multiple status values can be provided with comma separated strings -### Example +### Example ```dart import 'package:openapi/api.dart'; // TODO Configure OAuth2 access token for authorization: petstore_auth @@ -122,7 +122,7 @@ import 'package:openapi/api.dart'; final api_instance = PetApi(); final status = []; // List<String> | Status values that need to be considered for filter -try { +try { final result = api_instance.findPetsByStatus(status); print(result); } catch (e) { @@ -158,7 +158,7 @@ Finds Pets by tags Multiple tags can be provided with comma separated strings. Use tag1, tag2, tag3 for testing. -### Example +### Example ```dart import 'package:openapi/api.dart'; // TODO Configure OAuth2 access token for authorization: petstore_auth @@ -167,7 +167,7 @@ import 'package:openapi/api.dart'; final api_instance = PetApi(); final tags = []; // Set<String> | Tags to filter by -try { +try { final result = api_instance.findPetsByTags(tags); print(result); } catch (e) { @@ -203,7 +203,7 @@ Find pet by ID Returns a single pet -### Example +### Example ```dart import 'package:openapi/api.dart'; // TODO Configure API key authorization: api_key @@ -214,7 +214,7 @@ import 'package:openapi/api.dart'; final api_instance = PetApi(); final petId = 789; // int | ID of pet to return -try { +try { final result = api_instance.getPetById(petId); print(result); } catch (e) { @@ -248,7 +248,7 @@ Name | Type | Description | Notes Update an existing pet -### Example +### Example ```dart import 'package:openapi/api.dart'; // TODO Configure OAuth2 access token for authorization: petstore_auth @@ -257,7 +257,7 @@ import 'package:openapi/api.dart'; final api_instance = PetApi(); final pet = Pet(); // Pet | Pet object that needs to be added to the store -try { +try { api_instance.updatePet(pet); } catch (e) { print('Exception when calling PetApi->updatePet: $e\n'); @@ -290,7 +290,7 @@ void (empty response body) Updates a pet in the store with form data -### Example +### Example ```dart import 'package:openapi/api.dart'; // TODO Configure OAuth2 access token for authorization: petstore_auth @@ -301,7 +301,7 @@ final petId = 789; // int | ID of pet that needs to be updated final name = name_example; // String | Updated name of the pet final status = status_example; // String | Updated status of the pet -try { +try { api_instance.updatePetWithForm(petId, name, status); } catch (e) { print('Exception when calling PetApi->updatePetWithForm: $e\n'); @@ -336,7 +336,7 @@ void (empty response body) uploads an image -### Example +### Example ```dart import 'package:openapi/api.dart'; // TODO Configure OAuth2 access token for authorization: petstore_auth @@ -347,7 +347,7 @@ final petId = 789; // int | ID of pet to update final additionalMetadata = additionalMetadata_example; // String | Additional data to pass to server final file = BINARY_DATA_HERE; // MultipartFile | file to upload -try { +try { final result = api_instance.uploadFile(petId, additionalMetadata, file); print(result); } catch (e) { @@ -383,7 +383,7 @@ Name | Type | Description | Notes uploads an image (required) -### Example +### Example ```dart import 'package:openapi/api.dart'; // TODO Configure OAuth2 access token for authorization: petstore_auth @@ -394,7 +394,7 @@ final petId = 789; // int | ID of pet to update final requiredFile = BINARY_DATA_HERE; // MultipartFile | file to upload final additionalMetadata = additionalMetadata_example; // String | Additional data to pass to server -try { +try { final result = api_instance.uploadFileWithRequiredFile(petId, requiredFile, additionalMetadata); print(result); } catch (e) { diff --git a/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/doc/StoreApi.md b/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/doc/StoreApi.md index 6823f67617797db6770435605b24e1b24fb36fa2..f43230375e7b89f519ef27cfd53236f49365d5a3 100644 --- a/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/doc/StoreApi.md +++ b/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/doc/StoreApi.md @@ -22,14 +22,14 @@ Delete purchase order by ID For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors -### Example +### Example ```dart import 'package:openapi/api.dart'; final api_instance = StoreApi(); final orderId = orderId_example; // String | ID of the order that needs to be deleted -try { +try { api_instance.deleteOrder(orderId); } catch (e) { print('Exception when calling StoreApi->deleteOrder: $e\n'); @@ -64,7 +64,7 @@ Returns pet inventories by status Returns a map of status codes to quantities -### Example +### Example ```dart import 'package:openapi/api.dart'; // TODO Configure API key authorization: api_key @@ -74,7 +74,7 @@ import 'package:openapi/api.dart'; final api_instance = StoreApi(); -try { +try { final result = api_instance.getInventory(); print(result); } catch (e) { @@ -107,14 +107,14 @@ Find purchase order by ID For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions -### Example +### Example ```dart import 'package:openapi/api.dart'; final api_instance = StoreApi(); final orderId = 789; // int | ID of pet that needs to be fetched -try { +try { final result = api_instance.getOrderById(orderId); print(result); } catch (e) { @@ -148,14 +148,14 @@ No authorization required Place an order for a pet -### Example +### Example ```dart import 'package:openapi/api.dart'; final api_instance = StoreApi(); final order = Order(); // Order | order placed for purchasing the pet -try { +try { final result = api_instance.placeOrder(order); print(result); } catch (e) { diff --git a/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/doc/UserApi.md b/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/doc/UserApi.md index c624e6d5536d75be8c3a978c11532a0e7c535f0c..f318f92ccefdebfb7fc69fcc5b1c5f45850850c9 100644 --- a/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/doc/UserApi.md +++ b/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/doc/UserApi.md @@ -26,14 +26,14 @@ Create user This can only be done by the logged in user. -### Example +### Example ```dart import 'package:openapi/api.dart'; final api_instance = UserApi(); final user = User(); // User | Created user object -try { +try { api_instance.createUser(user); } catch (e) { print('Exception when calling UserApi->createUser: $e\n'); @@ -66,14 +66,14 @@ No authorization required Creates list of users with given input array -### Example +### Example ```dart import 'package:openapi/api.dart'; final api_instance = UserApi(); final user = [List<User>()]; // List<User> | List of user object -try { +try { api_instance.createUsersWithArrayInput(user); } catch (e) { print('Exception when calling UserApi->createUsersWithArrayInput: $e\n'); @@ -106,14 +106,14 @@ No authorization required Creates list of users with given input array -### Example +### Example ```dart import 'package:openapi/api.dart'; final api_instance = UserApi(); final user = [List<User>()]; // List<User> | List of user object -try { +try { api_instance.createUsersWithListInput(user); } catch (e) { print('Exception when calling UserApi->createUsersWithListInput: $e\n'); @@ -148,14 +148,14 @@ Delete user This can only be done by the logged in user. -### Example +### Example ```dart import 'package:openapi/api.dart'; final api_instance = UserApi(); final username = username_example; // String | The name that needs to be deleted -try { +try { api_instance.deleteUser(username); } catch (e) { print('Exception when calling UserApi->deleteUser: $e\n'); @@ -188,14 +188,14 @@ No authorization required Get user by user name -### Example +### Example ```dart import 'package:openapi/api.dart'; final api_instance = UserApi(); final username = username_example; // String | The name that needs to be fetched. Use user1 for testing. -try { +try { final result = api_instance.getUserByName(username); print(result); } catch (e) { @@ -229,7 +229,7 @@ No authorization required Logs user into the system -### Example +### Example ```dart import 'package:openapi/api.dart'; @@ -237,7 +237,7 @@ final api_instance = UserApi(); final username = username_example; // String | The user name for login final password = password_example; // String | The password for login in clear text -try { +try { final result = api_instance.loginUser(username, password); print(result); } catch (e) { @@ -272,13 +272,13 @@ No authorization required Logs out current logged in user session -### Example +### Example ```dart import 'package:openapi/api.dart'; final api_instance = UserApi(); -try { +try { api_instance.logoutUser(); } catch (e) { print('Exception when calling UserApi->logoutUser: $e\n'); @@ -310,7 +310,7 @@ Updated user This can only be done by the logged in user. -### Example +### Example ```dart import 'package:openapi/api.dart'; @@ -318,7 +318,7 @@ final api_instance = UserApi(); final username = username_example; // String | name that need to be deleted final user = User(); // User | Updated user object -try { +try { api_instance.updateUser(username, user); } catch (e) { print('Exception when calling UserApi->updateUser: $e\n'); diff --git a/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/git_push.sh b/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/git_push.sh index ced3be2b0c7b2349ff06d18da19d4b31435c9fa6..9405f72e950cdb8ca24c3cf4d15cee7eac62fde7 100644 --- a/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/git_push.sh +++ b/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/git_push.sh @@ -55,4 +55,3 @@ 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/openapi3/client/petstore/dart2/petstore_json_serializable_client_lib_fake/.gitignore b/samples/openapi3/client/petstore/dart2/petstore_json_serializable_client_lib_fake/.gitignore index 7c280441649860d99e9df07c398b32012ea8fffd..8b7331fd822c517d1df2cce63114175ef8005879 100644 --- a/samples/openapi3/client/petstore/dart2/petstore_json_serializable_client_lib_fake/.gitignore +++ b/samples/openapi3/client/petstore/dart2/petstore_json_serializable_client_lib_fake/.gitignore @@ -9,7 +9,7 @@ build/ **/packages/ # Files created by dart2js -# (Most Dart developers will use pub build to compile Dart, use/modify these +# (Most Dart developers will use pub build to compile Dart, use/modify these # rules if you intend to use dart2js directly # Convention is to use extension '.dart.js' for Dart compiled to Javascript to # differentiate from explicit Javascript files) @@ -22,6 +22,6 @@ build/ # Directory created by dartdoc doc/api/ -# Don't commit pubspec lock file +# Don't commit pubspec lock file # (Library packages only! Remove pattern if developing an application package) pubspec.lock diff --git a/samples/openapi3/client/petstore/dart2/petstore_json_serializable_client_lib_fake/README.md b/samples/openapi3/client/petstore/dart2/petstore_json_serializable_client_lib_fake/README.md index 1d6fe591dd174e9bd699a0def07243b6f65e6633..632231a59b137ef9d333954d4b86440176ef0c8b 100644 --- a/samples/openapi3/client/petstore/dart2/petstore_json_serializable_client_lib_fake/README.md +++ b/samples/openapi3/client/petstore/dart2/petstore_json_serializable_client_lib_fake/README.md @@ -191,4 +191,3 @@ Class | Method | HTTP request | Description - diff --git a/samples/openapi3/client/petstore/dart2/petstore_json_serializable_client_lib_fake/doc/AnotherFakeApi.md b/samples/openapi3/client/petstore/dart2/petstore_json_serializable_client_lib_fake/doc/AnotherFakeApi.md index 377ad777a2edfcb14dcd00d22f9935aca8a413ae..241c82e575d4a2a1026604bc817412faf3a1f7a7 100644 --- a/samples/openapi3/client/petstore/dart2/petstore_json_serializable_client_lib_fake/doc/AnotherFakeApi.md +++ b/samples/openapi3/client/petstore/dart2/petstore_json_serializable_client_lib_fake/doc/AnotherFakeApi.md @@ -19,14 +19,14 @@ To test special tags To test special tags and operation ID starting with number -### Example +### Example ```dart import 'package:openapi/api.dart'; final api_instance = AnotherFakeApi(); final modelClient = ModelClient(); // ModelClient | client model -try { +try { final result = api_instance.call123testSpecialTags(modelClient); print(result); } catch (e) { diff --git a/samples/openapi3/client/petstore/dart2/petstore_json_serializable_client_lib_fake/doc/DefaultApi.md b/samples/openapi3/client/petstore/dart2/petstore_json_serializable_client_lib_fake/doc/DefaultApi.md index 68516124419b004669f2366dbfddafffd6461c1f..d7b1c748f14ee87c3068ff061c26508b626ee3cc 100644 --- a/samples/openapi3/client/petstore/dart2/petstore_json_serializable_client_lib_fake/doc/DefaultApi.md +++ b/samples/openapi3/client/petstore/dart2/petstore_json_serializable_client_lib_fake/doc/DefaultApi.md @@ -17,13 +17,13 @@ Method | HTTP request | Description -### Example +### Example ```dart import 'package:openapi/api.dart'; final api_instance = DefaultApi(); -try { +try { final result = api_instance.fooGet(); print(result); } catch (e) { diff --git a/samples/openapi3/client/petstore/dart2/petstore_json_serializable_client_lib_fake/doc/FakeApi.md b/samples/openapi3/client/petstore/dart2/petstore_json_serializable_client_lib_fake/doc/FakeApi.md index 6d613003880f977d200ae838e744fa28eb4c1d36..d2823b115f284af5d91d22c37e61a6dc3794fd39 100644 --- a/samples/openapi3/client/petstore/dart2/petstore_json_serializable_client_lib_fake/doc/FakeApi.md +++ b/samples/openapi3/client/petstore/dart2/petstore_json_serializable_client_lib_fake/doc/FakeApi.md @@ -33,13 +33,13 @@ Method | HTTP request | Description Health check endpoint -### Example +### Example ```dart import 'package:openapi/api.dart'; final api_instance = FakeApi(); -try { +try { final result = api_instance.fakeHealthGet(); print(result); } catch (e) { @@ -70,7 +70,7 @@ No authorization required test http signature authentication -### Example +### Example ```dart import 'package:openapi/api.dart'; @@ -79,7 +79,7 @@ final pet = Pet(); // Pet | Pet object that needs to be added to the store final query1 = query1_example; // String | query parameter final header1 = header1_example; // String | header parameter -try { +try { api_instance.fakeHttpSignatureTest(pet, query1, header1); } catch (e) { print('Exception when calling FakeApi->fakeHttpSignatureTest: $e\n'); @@ -116,14 +116,14 @@ void (empty response body) Test serialization of outer boolean types -### Example +### Example ```dart import 'package:openapi/api.dart'; final api_instance = FakeApi(); final body = bool(); // bool | Input boolean as post body -try { +try { final result = api_instance.fakeOuterBooleanSerialize(body); print(result); } catch (e) { @@ -159,14 +159,14 @@ No authorization required Test serialization of object with outer number type -### Example +### Example ```dart import 'package:openapi/api.dart'; final api_instance = FakeApi(); final outerComposite = OuterComposite(); // OuterComposite | Input composite as post body -try { +try { final result = api_instance.fakeOuterCompositeSerialize(outerComposite); print(result); } catch (e) { @@ -202,14 +202,14 @@ No authorization required Test serialization of outer number types -### Example +### Example ```dart import 'package:openapi/api.dart'; final api_instance = FakeApi(); final body = num(); // num | Input number as post body -try { +try { final result = api_instance.fakeOuterNumberSerialize(body); print(result); } catch (e) { @@ -245,14 +245,14 @@ No authorization required Test serialization of outer string types -### Example +### Example ```dart import 'package:openapi/api.dart'; final api_instance = FakeApi(); final body = String(); // String | Input string as post body -try { +try { final result = api_instance.fakeOuterStringSerialize(body); print(result); } catch (e) { @@ -288,14 +288,14 @@ No authorization required Test serialization of enum (int) properties with examples -### Example +### Example ```dart import 'package:openapi/api.dart'; final api_instance = FakeApi(); final outerObjectWithEnumProperty = OuterObjectWithEnumProperty(); // OuterObjectWithEnumProperty | Input enum (int) as post body -try { +try { final result = api_instance.fakePropertyEnumIntegerSerialize(outerObjectWithEnumProperty); print(result); } catch (e) { @@ -331,14 +331,14 @@ No authorization required For this test, the body has to be a binary file. -### Example +### Example ```dart import 'package:openapi/api.dart'; final api_instance = FakeApi(); final body = MultipartFile(); // MultipartFile | image to upload -try { +try { api_instance.testBodyWithBinary(body); } catch (e) { print('Exception when calling FakeApi->testBodyWithBinary: $e\n'); @@ -373,14 +373,14 @@ No authorization required For this test, the body for this request must reference a schema named `File`. -### Example +### Example ```dart import 'package:openapi/api.dart'; final api_instance = FakeApi(); final fileSchemaTestClass = FileSchemaTestClass(); // FileSchemaTestClass | -try { +try { api_instance.testBodyWithFileSchema(fileSchemaTestClass); } catch (e) { print('Exception when calling FakeApi->testBodyWithFileSchema: $e\n'); @@ -413,7 +413,7 @@ No authorization required -### Example +### Example ```dart import 'package:openapi/api.dart'; @@ -421,7 +421,7 @@ final api_instance = FakeApi(); final query = query_example; // String | final user = User(); // User | -try { +try { api_instance.testBodyWithQueryParams(query, user); } catch (e) { print('Exception when calling FakeApi->testBodyWithQueryParams: $e\n'); @@ -457,14 +457,14 @@ To test \"client\" model To test \"client\" model -### Example +### Example ```dart import 'package:openapi/api.dart'; final api_instance = FakeApi(); final modelClient = ModelClient(); // ModelClient | client model -try { +try { final result = api_instance.testClientModel(modelClient); print(result); } catch (e) { @@ -500,7 +500,7 @@ Fake endpoint for testing various parameters å‡ç«¯é»ž å½ã®ã‚¨ãƒ³ãƒ‰ãƒã‚¤ãƒ³ Fake endpoint for testing various parameters å‡ç«¯é»ž å½ã®ã‚¨ãƒ³ãƒ‰ãƒã‚¤ãƒ³ãƒˆ 가짜 엔드 í¬ì¸íЏ -### Example +### Example ```dart import 'package:openapi/api.dart'; // TODO Configure HTTP basic authorization: http_basic_test @@ -523,7 +523,7 @@ final dateTime = 2013-10-20T19:20:30+01:00; // DateTime | None final password = password_example; // String | None final callback = callback_example; // String | None -try { +try { api_instance.testEndpointParameters(number, double_, patternWithoutDelimiter, byte, integer, int32, int64, float, string, binary, date, dateTime, password, callback); } catch (e) { print('Exception when calling FakeApi->testEndpointParameters: $e\n'); @@ -571,7 +571,7 @@ To test enum parameters To test enum parameters -### Example +### Example ```dart import 'package:openapi/api.dart'; @@ -585,7 +585,7 @@ final enumQueryDouble = 1.2; // double | Query parameter enum test (double) final enumFormStringArray = [enumFormStringArray_example]; // List<String> | Form parameter enum test (string array) final enumFormString = enumFormString_example; // String | Form parameter enum test (string) -try { +try { api_instance.testEnumParameters(enumHeaderStringArray, enumHeaderString, enumQueryStringArray, enumQueryString, enumQueryInteger, enumQueryDouble, enumFormStringArray, enumFormString); } catch (e) { print('Exception when calling FakeApi->testEnumParameters: $e\n'); @@ -627,7 +627,7 @@ Fake endpoint to test group parameters (optional) Fake endpoint to test group parameters (optional) -### Example +### Example ```dart import 'package:openapi/api.dart'; // TODO Configure HTTP Bearer authorization: bearer_test @@ -645,7 +645,7 @@ final stringGroup = 56; // int | String in group parameters final booleanGroup = true; // bool | Boolean in group parameters final int64Group = 789; // int | Integer in group parameters -try { +try { api_instance.testGroupParameters(requiredStringGroup, requiredBooleanGroup, requiredInt64Group, stringGroup, booleanGroup, int64Group); } catch (e) { print('Exception when calling FakeApi->testGroupParameters: $e\n'); @@ -683,14 +683,14 @@ void (empty response body) test inline additionalProperties -### Example +### Example ```dart import 'package:openapi/api.dart'; final api_instance = FakeApi(); final requestBody = Map<String, String>(); // Map<String, String> | request body -try { +try { api_instance.testInlineAdditionalProperties(requestBody); } catch (e) { print('Exception when calling FakeApi->testInlineAdditionalProperties: $e\n'); @@ -723,7 +723,7 @@ No authorization required test json serialization of form data -### Example +### Example ```dart import 'package:openapi/api.dart'; @@ -731,7 +731,7 @@ final api_instance = FakeApi(); final param = param_example; // String | field1 final param2 = param2_example; // String | field2 -try { +try { api_instance.testJsonFormData(param, param2); } catch (e) { print('Exception when calling FakeApi->testJsonFormData: $e\n'); @@ -767,7 +767,7 @@ No authorization required To test the collection format in query parameters -### Example +### Example ```dart import 'package:openapi/api.dart'; @@ -778,7 +778,7 @@ final http = []; // List<String> | final url = []; // List<String> | final context = []; // List<String> | -try { +try { api_instance.testQueryParameterCollectionFormat(pipe, ioutil, http, url, context); } catch (e) { print('Exception when calling FakeApi->testQueryParameterCollectionFormat: $e\n'); diff --git a/samples/openapi3/client/petstore/dart2/petstore_json_serializable_client_lib_fake/doc/FakeClassnameTags123Api.md b/samples/openapi3/client/petstore/dart2/petstore_json_serializable_client_lib_fake/doc/FakeClassnameTags123Api.md index 243ce4e57736935fe6ce64f7d9b72a6dc558882a..5518c67403ff8a7227036186cdf77be63382ce24 100644 --- a/samples/openapi3/client/petstore/dart2/petstore_json_serializable_client_lib_fake/doc/FakeClassnameTags123Api.md +++ b/samples/openapi3/client/petstore/dart2/petstore_json_serializable_client_lib_fake/doc/FakeClassnameTags123Api.md @@ -19,7 +19,7 @@ To test class name in snake case To test class name in snake case -### Example +### Example ```dart import 'package:openapi/api.dart'; // TODO Configure API key authorization: api_key_query @@ -30,7 +30,7 @@ import 'package:openapi/api.dart'; final api_instance = FakeClassnameTags123Api(); final modelClient = ModelClient(); // ModelClient | client model -try { +try { final result = api_instance.testClassname(modelClient); print(result); } catch (e) { diff --git a/samples/openapi3/client/petstore/dart2/petstore_json_serializable_client_lib_fake/doc/PetApi.md b/samples/openapi3/client/petstore/dart2/petstore_json_serializable_client_lib_fake/doc/PetApi.md index 725de36a431f7183836e82d2f531be4f80ec8453..387717e3f917fffca439f432cacda8c048e8d8f4 100644 --- a/samples/openapi3/client/petstore/dart2/petstore_json_serializable_client_lib_fake/doc/PetApi.md +++ b/samples/openapi3/client/petstore/dart2/petstore_json_serializable_client_lib_fake/doc/PetApi.md @@ -25,7 +25,7 @@ Method | HTTP request | Description Add a new pet to the store -### Example +### Example ```dart import 'package:openapi/api.dart'; // TODO Configure OAuth2 access token for authorization: petstore_auth @@ -34,7 +34,7 @@ import 'package:openapi/api.dart'; final api_instance = PetApi(); final pet = Pet(); // Pet | Pet object that needs to be added to the store -try { +try { api_instance.addPet(pet); } catch (e) { print('Exception when calling PetApi->addPet: $e\n'); @@ -67,7 +67,7 @@ void (empty response body) Deletes a pet -### Example +### Example ```dart import 'package:openapi/api.dart'; // TODO Configure OAuth2 access token for authorization: petstore_auth @@ -77,7 +77,7 @@ final api_instance = PetApi(); final petId = 789; // int | Pet id to delete final apiKey = apiKey_example; // String | -try { +try { api_instance.deletePet(petId, apiKey); } catch (e) { print('Exception when calling PetApi->deletePet: $e\n'); @@ -113,7 +113,7 @@ Finds Pets by status Multiple status values can be provided with comma separated strings -### Example +### Example ```dart import 'package:openapi/api.dart'; // TODO Configure OAuth2 access token for authorization: petstore_auth @@ -122,7 +122,7 @@ import 'package:openapi/api.dart'; final api_instance = PetApi(); final status = []; // List<String> | Status values that need to be considered for filter -try { +try { final result = api_instance.findPetsByStatus(status); print(result); } catch (e) { @@ -158,7 +158,7 @@ Finds Pets by tags Multiple tags can be provided with comma separated strings. Use tag1, tag2, tag3 for testing. -### Example +### Example ```dart import 'package:openapi/api.dart'; // TODO Configure OAuth2 access token for authorization: petstore_auth @@ -167,7 +167,7 @@ import 'package:openapi/api.dart'; final api_instance = PetApi(); final tags = []; // Set<String> | Tags to filter by -try { +try { final result = api_instance.findPetsByTags(tags); print(result); } catch (e) { @@ -203,7 +203,7 @@ Find pet by ID Returns a single pet -### Example +### Example ```dart import 'package:openapi/api.dart'; // TODO Configure API key authorization: api_key @@ -214,7 +214,7 @@ import 'package:openapi/api.dart'; final api_instance = PetApi(); final petId = 789; // int | ID of pet to return -try { +try { final result = api_instance.getPetById(petId); print(result); } catch (e) { @@ -248,7 +248,7 @@ Name | Type | Description | Notes Update an existing pet -### Example +### Example ```dart import 'package:openapi/api.dart'; // TODO Configure OAuth2 access token for authorization: petstore_auth @@ -257,7 +257,7 @@ import 'package:openapi/api.dart'; final api_instance = PetApi(); final pet = Pet(); // Pet | Pet object that needs to be added to the store -try { +try { api_instance.updatePet(pet); } catch (e) { print('Exception when calling PetApi->updatePet: $e\n'); @@ -290,7 +290,7 @@ void (empty response body) Updates a pet in the store with form data -### Example +### Example ```dart import 'package:openapi/api.dart'; // TODO Configure OAuth2 access token for authorization: petstore_auth @@ -301,7 +301,7 @@ final petId = 789; // int | ID of pet that needs to be updated final name = name_example; // String | Updated name of the pet final status = status_example; // String | Updated status of the pet -try { +try { api_instance.updatePetWithForm(petId, name, status); } catch (e) { print('Exception when calling PetApi->updatePetWithForm: $e\n'); @@ -336,7 +336,7 @@ void (empty response body) uploads an image -### Example +### Example ```dart import 'package:openapi/api.dart'; // TODO Configure OAuth2 access token for authorization: petstore_auth @@ -347,7 +347,7 @@ final petId = 789; // int | ID of pet to update final additionalMetadata = additionalMetadata_example; // String | Additional data to pass to server final file = BINARY_DATA_HERE; // MultipartFile | file to upload -try { +try { final result = api_instance.uploadFile(petId, additionalMetadata, file); print(result); } catch (e) { @@ -383,7 +383,7 @@ Name | Type | Description | Notes uploads an image (required) -### Example +### Example ```dart import 'package:openapi/api.dart'; // TODO Configure OAuth2 access token for authorization: petstore_auth @@ -394,7 +394,7 @@ final petId = 789; // int | ID of pet to update final requiredFile = BINARY_DATA_HERE; // MultipartFile | file to upload final additionalMetadata = additionalMetadata_example; // String | Additional data to pass to server -try { +try { final result = api_instance.uploadFileWithRequiredFile(petId, requiredFile, additionalMetadata); print(result); } catch (e) { diff --git a/samples/openapi3/client/petstore/dart2/petstore_json_serializable_client_lib_fake/doc/StoreApi.md b/samples/openapi3/client/petstore/dart2/petstore_json_serializable_client_lib_fake/doc/StoreApi.md index 6823f67617797db6770435605b24e1b24fb36fa2..f43230375e7b89f519ef27cfd53236f49365d5a3 100644 --- a/samples/openapi3/client/petstore/dart2/petstore_json_serializable_client_lib_fake/doc/StoreApi.md +++ b/samples/openapi3/client/petstore/dart2/petstore_json_serializable_client_lib_fake/doc/StoreApi.md @@ -22,14 +22,14 @@ Delete purchase order by ID For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors -### Example +### Example ```dart import 'package:openapi/api.dart'; final api_instance = StoreApi(); final orderId = orderId_example; // String | ID of the order that needs to be deleted -try { +try { api_instance.deleteOrder(orderId); } catch (e) { print('Exception when calling StoreApi->deleteOrder: $e\n'); @@ -64,7 +64,7 @@ Returns pet inventories by status Returns a map of status codes to quantities -### Example +### Example ```dart import 'package:openapi/api.dart'; // TODO Configure API key authorization: api_key @@ -74,7 +74,7 @@ import 'package:openapi/api.dart'; final api_instance = StoreApi(); -try { +try { final result = api_instance.getInventory(); print(result); } catch (e) { @@ -107,14 +107,14 @@ Find purchase order by ID For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions -### Example +### Example ```dart import 'package:openapi/api.dart'; final api_instance = StoreApi(); final orderId = 789; // int | ID of pet that needs to be fetched -try { +try { final result = api_instance.getOrderById(orderId); print(result); } catch (e) { @@ -148,14 +148,14 @@ No authorization required Place an order for a pet -### Example +### Example ```dart import 'package:openapi/api.dart'; final api_instance = StoreApi(); final order = Order(); // Order | order placed for purchasing the pet -try { +try { final result = api_instance.placeOrder(order); print(result); } catch (e) { diff --git a/samples/openapi3/client/petstore/dart2/petstore_json_serializable_client_lib_fake/doc/UserApi.md b/samples/openapi3/client/petstore/dart2/petstore_json_serializable_client_lib_fake/doc/UserApi.md index c624e6d5536d75be8c3a978c11532a0e7c535f0c..f318f92ccefdebfb7fc69fcc5b1c5f45850850c9 100644 --- a/samples/openapi3/client/petstore/dart2/petstore_json_serializable_client_lib_fake/doc/UserApi.md +++ b/samples/openapi3/client/petstore/dart2/petstore_json_serializable_client_lib_fake/doc/UserApi.md @@ -26,14 +26,14 @@ Create user This can only be done by the logged in user. -### Example +### Example ```dart import 'package:openapi/api.dart'; final api_instance = UserApi(); final user = User(); // User | Created user object -try { +try { api_instance.createUser(user); } catch (e) { print('Exception when calling UserApi->createUser: $e\n'); @@ -66,14 +66,14 @@ No authorization required Creates list of users with given input array -### Example +### Example ```dart import 'package:openapi/api.dart'; final api_instance = UserApi(); final user = [List<User>()]; // List<User> | List of user object -try { +try { api_instance.createUsersWithArrayInput(user); } catch (e) { print('Exception when calling UserApi->createUsersWithArrayInput: $e\n'); @@ -106,14 +106,14 @@ No authorization required Creates list of users with given input array -### Example +### Example ```dart import 'package:openapi/api.dart'; final api_instance = UserApi(); final user = [List<User>()]; // List<User> | List of user object -try { +try { api_instance.createUsersWithListInput(user); } catch (e) { print('Exception when calling UserApi->createUsersWithListInput: $e\n'); @@ -148,14 +148,14 @@ Delete user This can only be done by the logged in user. -### Example +### Example ```dart import 'package:openapi/api.dart'; final api_instance = UserApi(); final username = username_example; // String | The name that needs to be deleted -try { +try { api_instance.deleteUser(username); } catch (e) { print('Exception when calling UserApi->deleteUser: $e\n'); @@ -188,14 +188,14 @@ No authorization required Get user by user name -### Example +### Example ```dart import 'package:openapi/api.dart'; final api_instance = UserApi(); final username = username_example; // String | The name that needs to be fetched. Use user1 for testing. -try { +try { final result = api_instance.getUserByName(username); print(result); } catch (e) { @@ -229,7 +229,7 @@ No authorization required Logs user into the system -### Example +### Example ```dart import 'package:openapi/api.dart'; @@ -237,7 +237,7 @@ final api_instance = UserApi(); final username = username_example; // String | The user name for login final password = password_example; // String | The password for login in clear text -try { +try { final result = api_instance.loginUser(username, password); print(result); } catch (e) { @@ -272,13 +272,13 @@ No authorization required Logs out current logged in user session -### Example +### Example ```dart import 'package:openapi/api.dart'; final api_instance = UserApi(); -try { +try { api_instance.logoutUser(); } catch (e) { print('Exception when calling UserApi->logoutUser: $e\n'); @@ -310,7 +310,7 @@ Updated user This can only be done by the logged in user. -### Example +### Example ```dart import 'package:openapi/api.dart'; @@ -318,7 +318,7 @@ final api_instance = UserApi(); final username = username_example; // String | name that need to be deleted final user = User(); // User | Updated user object -try { +try { api_instance.updateUser(username, user); } catch (e) { print('Exception when calling UserApi->updateUser: $e\n'); diff --git a/samples/openapi3/client/petstore/dart2/petstore_json_serializable_client_lib_fake/git_push.sh b/samples/openapi3/client/petstore/dart2/petstore_json_serializable_client_lib_fake/git_push.sh index ced3be2b0c7b2349ff06d18da19d4b31435c9fa6..9405f72e950cdb8ca24c3cf4d15cee7eac62fde7 100644 --- a/samples/openapi3/client/petstore/dart2/petstore_json_serializable_client_lib_fake/git_push.sh +++ b/samples/openapi3/client/petstore/dart2/petstore_json_serializable_client_lib_fake/git_push.sh @@ -55,4 +55,3 @@ 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/openapi3/client/petstore/go/go-petstore/git_push.sh b/samples/openapi3/client/petstore/go/go-petstore/git_push.sh index ced3be2b0c7b2349ff06d18da19d4b31435c9fa6..9405f72e950cdb8ca24c3cf4d15cee7eac62fde7 100644 --- a/samples/openapi3/client/petstore/go/go-petstore/git_push.sh +++ b/samples/openapi3/client/petstore/go/go-petstore/git_push.sh @@ -55,4 +55,3 @@ 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/openapi3/client/petstore/java/jersey2-java8-special-characters/git_push.sh b/samples/openapi3/client/petstore/java/jersey2-java8-special-characters/git_push.sh index ced3be2b0c7b2349ff06d18da19d4b31435c9fa6..9405f72e950cdb8ca24c3cf4d15cee7eac62fde7 100644 --- a/samples/openapi3/client/petstore/java/jersey2-java8-special-characters/git_push.sh +++ b/samples/openapi3/client/petstore/java/jersey2-java8-special-characters/git_push.sh @@ -55,4 +55,3 @@ 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/openapi3/client/petstore/java/jersey2-java8/git_push.sh b/samples/openapi3/client/petstore/java/jersey2-java8/git_push.sh index ced3be2b0c7b2349ff06d18da19d4b31435c9fa6..9405f72e950cdb8ca24c3cf4d15cee7eac62fde7 100644 --- a/samples/openapi3/client/petstore/java/jersey2-java8/git_push.sh +++ b/samples/openapi3/client/petstore/java/jersey2-java8/git_push.sh @@ -55,4 +55,3 @@ 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/openapi3/client/petstore/python-legacy/git_push.sh b/samples/openapi3/client/petstore/python-legacy/git_push.sh index ced3be2b0c7b2349ff06d18da19d4b31435c9fa6..9405f72e950cdb8ca24c3cf4d15cee7eac62fde7 100755 --- a/samples/openapi3/client/petstore/python-legacy/git_push.sh +++ b/samples/openapi3/client/petstore/python-legacy/git_push.sh @@ -55,4 +55,3 @@ 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/openapi3/client/petstore/python-legacy/petstore_api/api/another_fake_api.py b/samples/openapi3/client/petstore/python-legacy/petstore_api/api/another_fake_api.py index af8d8fd0f25ed4ebc5f494ca210da1371bc4d839..7dad5ca84ae74b24141eccb288a019569afc071e 100755 --- a/samples/openapi3/client/petstore/python-legacy/petstore_api/api/another_fake_api.py +++ b/samples/openapi3/client/petstore/python-legacy/petstore_api/api/another_fake_api.py @@ -153,7 +153,7 @@ class AnotherFakeApi(object): # Authentication setting auth_settings = [] # noqa: E501 - + response_types_map = { 200: "Client", } diff --git a/samples/openapi3/client/petstore/python-legacy/petstore_api/api/default_api.py b/samples/openapi3/client/petstore/python-legacy/petstore_api/api/default_api.py index 98554918aaecfa0fb3a10e60966709f8b3692371..7f2691f7cf54600a5aa2c3a5828dc1ed046b5eb8 100755 --- a/samples/openapi3/client/petstore/python-legacy/petstore_api/api/default_api.py +++ b/samples/openapi3/client/petstore/python-legacy/petstore_api/api/default_api.py @@ -136,7 +136,7 @@ class DefaultApi(object): # Authentication setting auth_settings = [] # noqa: E501 - + response_types_map = { } diff --git a/samples/openapi3/client/petstore/python-legacy/petstore_api/api/fake_api.py b/samples/openapi3/client/petstore/python-legacy/petstore_api/api/fake_api.py index f2bf00824f907a243de5273b377ac1568a36a0f9..11a97c9efb39f209d2851d683ff1d5fd46171488 100755 --- a/samples/openapi3/client/petstore/python-legacy/petstore_api/api/fake_api.py +++ b/samples/openapi3/client/petstore/python-legacy/petstore_api/api/fake_api.py @@ -136,7 +136,7 @@ class FakeApi(object): # Authentication setting auth_settings = [] # noqa: E501 - + response_types_map = { 200: "HealthCheckResult", } @@ -283,7 +283,7 @@ class FakeApi(object): # Authentication setting auth_settings = ['http_signature_test'] # noqa: E501 - + response_types_map = {} return self.api_client.call_api( @@ -416,7 +416,7 @@ class FakeApi(object): # Authentication setting auth_settings = [] # noqa: E501 - + response_types_map = { 200: "bool", } @@ -551,7 +551,7 @@ class FakeApi(object): # Authentication setting auth_settings = [] # noqa: E501 - + response_types_map = { 200: "OuterComposite", } @@ -686,7 +686,7 @@ class FakeApi(object): # Authentication setting auth_settings = [] # noqa: E501 - + response_types_map = { 200: "float", } @@ -821,7 +821,7 @@ class FakeApi(object): # Authentication setting auth_settings = [] # noqa: E501 - + response_types_map = { 200: "str", } @@ -960,7 +960,7 @@ class FakeApi(object): # Authentication setting auth_settings = [] # noqa: E501 - + response_types_map = { 200: "OuterObjectWithEnumProperty", } @@ -1091,7 +1091,7 @@ class FakeApi(object): # Authentication setting auth_settings = [] # noqa: E501 - + response_types_map = {} return self.api_client.call_api( @@ -1224,7 +1224,7 @@ class FakeApi(object): # Authentication setting auth_settings = [] # noqa: E501 - + response_types_map = {} return self.api_client.call_api( @@ -1366,7 +1366,7 @@ class FakeApi(object): # Authentication setting auth_settings = [] # noqa: E501 - + response_types_map = {} return self.api_client.call_api( @@ -1503,7 +1503,7 @@ class FakeApi(object): # Authentication setting auth_settings = [] # noqa: E501 - + response_types_map = { 200: "Client", } @@ -1769,7 +1769,7 @@ class FakeApi(object): # Authentication setting auth_settings = ['http_basic_test'] # noqa: E501 - + response_types_map = {} return self.api_client.call_api( @@ -1950,7 +1950,7 @@ class FakeApi(object): # Authentication setting auth_settings = [] # noqa: E501 - + response_types_map = {} return self.api_client.call_api( @@ -2122,7 +2122,7 @@ class FakeApi(object): body_params = None # Authentication setting auth_settings = ['bearer_test'] # noqa: E501 - + response_types_map = {} return self.api_client.call_api( @@ -2253,7 +2253,7 @@ class FakeApi(object): # Authentication setting auth_settings = [] # noqa: E501 - + response_types_map = {} return self.api_client.call_api( @@ -2395,7 +2395,7 @@ class FakeApi(object): # Authentication setting auth_settings = [] # noqa: E501 - + response_types_map = {} return self.api_client.call_api( @@ -2573,7 +2573,7 @@ class FakeApi(object): body_params = None # Authentication setting auth_settings = [] # noqa: E501 - + response_types_map = {} return self.api_client.call_api( diff --git a/samples/openapi3/client/petstore/python-legacy/petstore_api/api/fake_classname_tags_123_api.py b/samples/openapi3/client/petstore/python-legacy/petstore_api/api/fake_classname_tags_123_api.py index 533f8b80d894fe5b2635aa2ba64626595c87d76f..dffc78620e9e03188f5abe241896732c6dc3c7b7 100755 --- a/samples/openapi3/client/petstore/python-legacy/petstore_api/api/fake_classname_tags_123_api.py +++ b/samples/openapi3/client/petstore/python-legacy/petstore_api/api/fake_classname_tags_123_api.py @@ -153,7 +153,7 @@ class FakeClassnameTags123Api(object): # Authentication setting auth_settings = ['api_key_query'] # noqa: E501 - + response_types_map = { 200: "Client", } diff --git a/samples/openapi3/client/petstore/python-legacy/petstore_api/api/pet_api.py b/samples/openapi3/client/petstore/python-legacy/petstore_api/api/pet_api.py index 6a9d01e4649848ef3001d0cc6a516e2461fdc07d..a4195ecad3e1d782559bfa8b33971bc9430fc18a 100755 --- a/samples/openapi3/client/petstore/python-legacy/petstore_api/api/pet_api.py +++ b/samples/openapi3/client/petstore/python-legacy/petstore_api/api/pet_api.py @@ -160,7 +160,7 @@ class PetApi(object): # Authentication setting auth_settings = ['petstore_auth'] # noqa: E501 - + response_types_map = {} return self.api_client.call_api( @@ -295,7 +295,7 @@ class PetApi(object): body_params = None # Authentication setting auth_settings = ['petstore_auth'] # noqa: E501 - + response_types_map = {} return self.api_client.call_api( @@ -429,7 +429,7 @@ class PetApi(object): # Authentication setting auth_settings = ['petstore_auth'] # noqa: E501 - + response_types_map = { 200: "list[Pet]", 400: None, @@ -566,7 +566,7 @@ class PetApi(object): # Authentication setting auth_settings = ['petstore_auth'] # noqa: E501 - + response_types_map = { 200: "list[Pet]", 400: None, @@ -702,7 +702,7 @@ class PetApi(object): # Authentication setting auth_settings = ['api_key'] # noqa: E501 - + response_types_map = { 200: "Pet", 400: None, @@ -850,7 +850,7 @@ class PetApi(object): # Authentication setting auth_settings = ['petstore_auth'] # noqa: E501 - + response_types_map = {} return self.api_client.call_api( @@ -996,7 +996,7 @@ class PetApi(object): # Authentication setting auth_settings = ['petstore_auth'] # noqa: E501 - + response_types_map = {} return self.api_client.call_api( @@ -1145,7 +1145,7 @@ class PetApi(object): # Authentication setting auth_settings = ['petstore_auth'] # noqa: E501 - + response_types_map = { 200: "ApiResponse", } @@ -1300,7 +1300,7 @@ class PetApi(object): # Authentication setting auth_settings = ['petstore_auth'] # noqa: E501 - + response_types_map = { 200: "ApiResponse", } diff --git a/samples/openapi3/client/petstore/python-legacy/petstore_api/api/store_api.py b/samples/openapi3/client/petstore/python-legacy/petstore_api/api/store_api.py index 2b22e1371860e324280f487f7c3ac056a7152c1d..0d6c2fdf6b7dfa3791202c55468b54977d08db41 100755 --- a/samples/openapi3/client/petstore/python-legacy/petstore_api/api/store_api.py +++ b/samples/openapi3/client/petstore/python-legacy/petstore_api/api/store_api.py @@ -145,7 +145,7 @@ class StoreApi(object): body_params = None # Authentication setting auth_settings = [] # noqa: E501 - + response_types_map = {} return self.api_client.call_api( @@ -267,7 +267,7 @@ class StoreApi(object): # Authentication setting auth_settings = ['api_key'] # noqa: E501 - + response_types_map = { 200: "dict(str, int)", } @@ -406,7 +406,7 @@ class StoreApi(object): # Authentication setting auth_settings = [] # noqa: E501 - + response_types_map = { 200: "Order", 400: None, @@ -545,7 +545,7 @@ class StoreApi(object): # Authentication setting auth_settings = [] # noqa: E501 - + response_types_map = { 200: "Order", 400: None, diff --git a/samples/openapi3/client/petstore/python-legacy/petstore_api/api/user_api.py b/samples/openapi3/client/petstore/python-legacy/petstore_api/api/user_api.py index a0a25e7bcbcf32c8299166f9e281e669225bc7b5..8e4f70e6c7ad41db8fb16415bb492ecbabe571b8 100755 --- a/samples/openapi3/client/petstore/python-legacy/petstore_api/api/user_api.py +++ b/samples/openapi3/client/petstore/python-legacy/petstore_api/api/user_api.py @@ -149,7 +149,7 @@ class UserApi(object): # Authentication setting auth_settings = [] # noqa: E501 - + response_types_map = {} return self.api_client.call_api( @@ -280,7 +280,7 @@ class UserApi(object): # Authentication setting auth_settings = [] # noqa: E501 - + response_types_map = {} return self.api_client.call_api( @@ -411,7 +411,7 @@ class UserApi(object): # Authentication setting auth_settings = [] # noqa: E501 - + response_types_map = {} return self.api_client.call_api( @@ -540,7 +540,7 @@ class UserApi(object): body_params = None # Authentication setting auth_settings = [] # noqa: E501 - + response_types_map = {} return self.api_client.call_api( @@ -671,7 +671,7 @@ class UserApi(object): # Authentication setting auth_settings = [] # noqa: E501 - + response_types_map = { 200: "User", 400: None, @@ -817,7 +817,7 @@ class UserApi(object): # Authentication setting auth_settings = [] # noqa: E501 - + response_types_map = { 200: "str", 400: None, @@ -936,7 +936,7 @@ class UserApi(object): body_params = None # Authentication setting auth_settings = [] # noqa: E501 - + response_types_map = {} return self.api_client.call_api( @@ -1080,7 +1080,7 @@ class UserApi(object): # Authentication setting auth_settings = [] # noqa: E501 - + response_types_map = {} return self.api_client.call_api( diff --git a/samples/openapi3/client/petstore/python-legacy/petstore_api/api_client.py b/samples/openapi3/client/petstore/python-legacy/petstore_api/api_client.py index 52c58e68a08f8950b40fc08b1774efcaf4669942..035e1e374ba561339808b1b3156c54278412dfd9 100755 --- a/samples/openapi3/client/petstore/python-legacy/petstore_api/api_client.py +++ b/samples/openapi3/client/petstore/python-legacy/petstore_api/api_client.py @@ -196,7 +196,7 @@ class ApiClient(object): if not _preload_content: return return_data - + response_type = response_types_map.get(response_data.status, None) if six.PY3 and response_type not in ["file", "bytes"]: @@ -208,7 +208,7 @@ class ApiClient(object): response_data.data = response_data.data.decode(encoding) # deserialize response data - + if response_type: return_data = self.deserialize(response_data, response_type) else: diff --git a/samples/openapi3/client/petstore/python-legacy/petstore_api/configuration.py b/samples/openapi3/client/petstore/python-legacy/petstore_api/configuration.py index 3af9592b674c5161187d7a2fd38c7c1aaefc149c..9b0e3026f6f619a02763c34a3db23bf112db5cc1 100755 --- a/samples/openapi3/client/petstore/python-legacy/petstore_api/configuration.py +++ b/samples/openapi3/client/petstore/python-legacy/petstore_api/configuration.py @@ -80,8 +80,8 @@ class Configuration(object): :param server_operation_variables: Mapping from operation ID to a mapping with string values to replace variables in templated server configuration. The validation of enums is performed for variables with defined enum values before. - :param ssl_ca_cert: str - the path to a file of concatenated CA certificates - in PEM format + :param ssl_ca_cert: str - the path to a file of concatenated CA certificates + in PEM format :Example: diff --git a/samples/openapi3/client/petstore/python/git_push.sh b/samples/openapi3/client/petstore/python/git_push.sh index ced3be2b0c7b2349ff06d18da19d4b31435c9fa6..9405f72e950cdb8ca24c3cf4d15cee7eac62fde7 100644 --- a/samples/openapi3/client/petstore/python/git_push.sh +++ b/samples/openapi3/client/petstore/python/git_push.sh @@ -55,4 +55,3 @@ 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/openapi3/client/petstore/python/petstore_api/configuration.py b/samples/openapi3/client/petstore/python/petstore_api/configuration.py index 99b40326211a5178f2a63d1faf31ffb921d096bf..172a366b26ca63f471476c0221d25764d85b49fa 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/configuration.py +++ b/samples/openapi3/client/petstore/python/petstore_api/configuration.py @@ -75,7 +75,7 @@ class Configuration(object): :param server_operation_variables: Mapping from operation ID to a mapping with string values to replace variables in templated server configuration. The validation of enums is performed for variables with defined enum values before. - :param ssl_ca_cert: str - the path to a file of concatenated CA certificates + :param ssl_ca_cert: str - the path to a file of concatenated CA certificates in PEM format :Example: diff --git a/samples/openapi3/client/petstore/typescript/builds/composed-schemas/README.md b/samples/openapi3/client/petstore/typescript/builds/composed-schemas/README.md index 80b1ac5cc98bdf1979ab742258754c4e1579ad3b..24e614547f625e7eea795d2d36ffc73e9bf35f6d 100644 --- a/samples/openapi3/client/petstore/typescript/builds/composed-schemas/README.md +++ b/samples/openapi3/client/petstore/typescript/builds/composed-schemas/README.md @@ -1,6 +1,6 @@ ## ts-petstore-client@1.0.0 -This generator creates TypeScript/JavaScript client that utilizes fetch-api. +This generator creates TypeScript/JavaScript client that utilizes fetch-api. ### Building diff --git a/samples/openapi3/client/petstore/typescript/builds/composed-schemas/apis/baseapi.ts b/samples/openapi3/client/petstore/typescript/builds/composed-schemas/apis/baseapi.ts index fe7ee3d151180b546088ac7a006afe68103f1ae4..4c9d37940341e218f351519dab6d8e8de03876cb 100644 --- a/samples/openapi3/client/petstore/typescript/builds/composed-schemas/apis/baseapi.ts +++ b/samples/openapi3/client/petstore/typescript/builds/composed-schemas/apis/baseapi.ts @@ -13,7 +13,7 @@ export const COLLECTION_FORMATS = { /** - * + * * @export * @class BaseAPI */ @@ -24,7 +24,7 @@ export class BaseAPIRequestFactory { }; /** - * + * * @export * @class RequiredError * @extends {Error} diff --git a/samples/openapi3/client/petstore/typescript/builds/composed-schemas/apis/exception.ts b/samples/openapi3/client/petstore/typescript/builds/composed-schemas/apis/exception.ts index fb8d314eb41dc52851a5d06469954fa7e0cb0c4d..ca5a926c5969a2fa664e5b4ff493666c64c6e1ab 100644 --- a/samples/openapi3/client/petstore/typescript/builds/composed-schemas/apis/exception.ts +++ b/samples/openapi3/client/petstore/typescript/builds/composed-schemas/apis/exception.ts @@ -1,5 +1,5 @@ /** - * Represents an error caused by an api call i.e. it has attributes for a HTTP status code + * Represents an error caused by an api call i.e. it has attributes for a HTTP status code * and the returned body object. * * Example @@ -9,6 +9,6 @@ */ export class ApiException<T> extends Error { public constructor(public code: number, public body: T) { - super("HTTP-Code: " + code + "\nMessage: " + JSON.stringify(body)) + super("HTTP-Code: " + code + "\nMessage: " + JSON.stringify(body)) } } diff --git a/samples/openapi3/client/petstore/typescript/builds/composed-schemas/git_push.sh b/samples/openapi3/client/petstore/typescript/builds/composed-schemas/git_push.sh index 8442b80bb4456c20d67f6442dbbeacd991a066d2..0f406ef78782d9eef523896c734f8a1432af4a54 100644 --- a/samples/openapi3/client/petstore/typescript/builds/composed-schemas/git_push.sh +++ b/samples/openapi3/client/petstore/typescript/builds/composed-schemas/git_push.sh @@ -28,7 +28,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 @@ -49,4 +49,3 @@ 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" git push origin master 2>&1 | grep -v 'To https' - diff --git a/samples/openapi3/client/petstore/typescript/builds/composed-schemas/http/http.ts b/samples/openapi3/client/petstore/typescript/builds/composed-schemas/http/http.ts index 8b8219e910ff3439e253a5561d8df89047476bda..c4976d7b152c389b52de84c5de4505b950358b84 100644 --- a/samples/openapi3/client/petstore/typescript/builds/composed-schemas/http/http.ts +++ b/samples/openapi3/client/petstore/typescript/builds/composed-schemas/http/http.ts @@ -1,5 +1,5 @@ // typings of url-parse are incorrect... -// @ts-ignore +// @ts-ignore import * as URLParse from "url-parse"; import { Observable, from } from '../rxjsStub'; @@ -113,7 +113,7 @@ export class RequestContext { this.headers["Cookie"] += name + "=" + value + "; "; } - public setHeaderParam(key: string, value: string): void { + public setHeaderParam(key: string, value: string): void { this.headers[key] = value; } } diff --git a/samples/openapi3/client/petstore/typescript/builds/composed-schemas/middleware.ts b/samples/openapi3/client/petstore/typescript/builds/composed-schemas/middleware.ts index e900713818909113b23aa8beebdefc5763065beb..524f93f016b2f67bba2067b7961001b9347332d5 100644 --- a/samples/openapi3/client/petstore/typescript/builds/composed-schemas/middleware.ts +++ b/samples/openapi3/client/petstore/typescript/builds/composed-schemas/middleware.ts @@ -34,7 +34,7 @@ export class PromiseMiddlewareWrapper implements Middleware { pre(context: RequestContext): Observable<RequestContext> { return from(this.middleware.pre(context)); } - + post(context: ResponseContext): Observable<ResponseContext> { return from(this.middleware.post(context)); } diff --git a/samples/openapi3/client/petstore/typescript/builds/composed-schemas/models/Cat.ts b/samples/openapi3/client/petstore/typescript/builds/composed-schemas/models/Cat.ts index eb878d1537e411065cc123045920a9d4d8e765d2..02b1f0b58279c47632c82bd3d0c6f74efb2804df 100644 --- a/samples/openapi3/client/petstore/typescript/builds/composed-schemas/models/Cat.ts +++ b/samples/openapi3/client/petstore/typescript/builds/composed-schemas/models/Cat.ts @@ -36,7 +36,7 @@ export class Cat { static getAttributeTypeMap() { return Cat.attributeTypeMap; } - + public constructor() { } } diff --git a/samples/openapi3/client/petstore/typescript/builds/composed-schemas/models/CatAllOf.ts b/samples/openapi3/client/petstore/typescript/builds/composed-schemas/models/CatAllOf.ts index f492b8a9474dfd0aebf074cfd7628fbd8bfd0440..049c937cadbccfe7aaddde4913172bf1798129fc 100644 --- a/samples/openapi3/client/petstore/typescript/builds/composed-schemas/models/CatAllOf.ts +++ b/samples/openapi3/client/petstore/typescript/builds/composed-schemas/models/CatAllOf.ts @@ -35,7 +35,7 @@ export class CatAllOf { static getAttributeTypeMap() { return CatAllOf.attributeTypeMap; } - + public constructor() { } } diff --git a/samples/openapi3/client/petstore/typescript/builds/composed-schemas/models/Dog.ts b/samples/openapi3/client/petstore/typescript/builds/composed-schemas/models/Dog.ts index 456b63bd03881a6fbeab44ee0f45a493a45380c9..04aeaefaef5b00cbdc22a2b648a3f252120fb59c 100644 --- a/samples/openapi3/client/petstore/typescript/builds/composed-schemas/models/Dog.ts +++ b/samples/openapi3/client/petstore/typescript/builds/composed-schemas/models/Dog.ts @@ -36,7 +36,7 @@ export class Dog { static getAttributeTypeMap() { return Dog.attributeTypeMap; } - + public constructor() { } } diff --git a/samples/openapi3/client/petstore/typescript/builds/composed-schemas/models/DogAllOf.ts b/samples/openapi3/client/petstore/typescript/builds/composed-schemas/models/DogAllOf.ts index 75fb0ac2faea63c06e48b1125b9ec6884a4c05ca..5bc68d7888910db2de0252673109e722dd251adb 100644 --- a/samples/openapi3/client/petstore/typescript/builds/composed-schemas/models/DogAllOf.ts +++ b/samples/openapi3/client/petstore/typescript/builds/composed-schemas/models/DogAllOf.ts @@ -35,7 +35,7 @@ export class DogAllOf { static getAttributeTypeMap() { return DogAllOf.attributeTypeMap; } - + public constructor() { } } diff --git a/samples/openapi3/client/petstore/typescript/builds/composed-schemas/models/InlineObject.ts b/samples/openapi3/client/petstore/typescript/builds/composed-schemas/models/InlineObject.ts index d6ffd66e692936700c7d72ac85cfcd58e832b6ef..9840c292a57bd229973eb5d496a3131bdfab649b 100644 --- a/samples/openapi3/client/petstore/typescript/builds/composed-schemas/models/InlineObject.ts +++ b/samples/openapi3/client/petstore/typescript/builds/composed-schemas/models/InlineObject.ts @@ -28,7 +28,7 @@ export class InlineObject { static getAttributeTypeMap() { return InlineObject.attributeTypeMap; } - + public constructor() { } } diff --git a/samples/openapi3/client/petstore/typescript/builds/composed-schemas/models/ObjectSerializer.ts b/samples/openapi3/client/petstore/typescript/builds/composed-schemas/models/ObjectSerializer.ts index 70178da770e58c40df6624a1f17d8a5aa6e8f6a6..d456c2379e1028e16da9fc72b72683f1e06039ce 100644 --- a/samples/openapi3/client/petstore/typescript/builds/composed-schemas/models/ObjectSerializer.ts +++ b/samples/openapi3/client/petstore/typescript/builds/composed-schemas/models/ObjectSerializer.ts @@ -31,7 +31,7 @@ const supportedMediaTypes: { [mediaType: string]: number } = { "application/octet-stream": 0 } - + let enumsMap: Set<string> = new Set<string>([ "DogBreedEnum", "DogAllOfBreedEnum", @@ -116,7 +116,7 @@ export class ObjectSerializer { if (!typeMap[type]) { // in case we dont know the type return data; } - + // Get the actual type of this object type = this.findCorrectType(data, type); diff --git a/samples/openapi3/client/petstore/typescript/builds/composed-schemas/models/PetByAge.ts b/samples/openapi3/client/petstore/typescript/builds/composed-schemas/models/PetByAge.ts index bbd8a86a2666aa58de6a882d8b085390c50ce2ba..6c7e3c20f0f4f306276eeb5784e210a5f46436db 100644 --- a/samples/openapi3/client/petstore/typescript/builds/composed-schemas/models/PetByAge.ts +++ b/samples/openapi3/client/petstore/typescript/builds/composed-schemas/models/PetByAge.ts @@ -35,7 +35,7 @@ export class PetByAge { static getAttributeTypeMap() { return PetByAge.attributeTypeMap; } - + public constructor() { } } diff --git a/samples/openapi3/client/petstore/typescript/builds/composed-schemas/models/PetByType.ts b/samples/openapi3/client/petstore/typescript/builds/composed-schemas/models/PetByType.ts index 2c8713e565af14b4395c72c39508d59d6f94f093..aef39d9d6018a606a34a6e6e688e6d3aff69b9f0 100644 --- a/samples/openapi3/client/petstore/typescript/builds/composed-schemas/models/PetByType.ts +++ b/samples/openapi3/client/petstore/typescript/builds/composed-schemas/models/PetByType.ts @@ -35,7 +35,7 @@ export class PetByType { static getAttributeTypeMap() { return PetByType.attributeTypeMap; } - + public constructor() { } } diff --git a/samples/openapi3/client/petstore/typescript/builds/composed-schemas/tsconfig.json b/samples/openapi3/client/petstore/typescript/builds/composed-schemas/tsconfig.json index ce51978eb8664806aba7cbbdda18bc8f3270b497..6576215ef877ef214e48b572df00d57810b95678 100644 --- a/samples/openapi3/client/petstore/typescript/builds/composed-schemas/tsconfig.json +++ b/samples/openapi3/client/petstore/typescript/builds/composed-schemas/tsconfig.json @@ -6,7 +6,7 @@ "module": "commonjs", "moduleResolution": "node", "declaration": true, - + /* Additional Checks */ "noUnusedLocals": false, /* Report errors on unused locals. */ // TODO: reenable (unused imports!) "noUnusedParameters": false, /* Report errors on unused parameters. */ // TODO: set to true again diff --git a/samples/openapi3/client/petstore/typescript/builds/composed-schemas/types/ObservableAPI.ts b/samples/openapi3/client/petstore/typescript/builds/composed-schemas/types/ObservableAPI.ts index f9dd96c51981f6156a9ce72041e0a66872e35727..ef56e3758b8ac1b0c1be0b8008f10b42bdc8d378 100644 --- a/samples/openapi3/client/petstore/typescript/builds/composed-schemas/types/ObservableAPI.ts +++ b/samples/openapi3/client/petstore/typescript/builds/composed-schemas/types/ObservableAPI.ts @@ -48,7 +48,7 @@ export class ObservableDefaultApi { return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.filePost(rsp))); })); } - + /** * @param petByAgePetByType */ @@ -70,7 +70,7 @@ export class ObservableDefaultApi { return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.petsFilteredPatch(rsp))); })); } - + /** * @param catDog */ @@ -92,5 +92,5 @@ export class ObservableDefaultApi { return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.petsPatch(rsp))); })); } - + } diff --git a/samples/openapi3/client/petstore/typescript/builds/composed-schemas/util.ts b/samples/openapi3/client/petstore/typescript/builds/composed-schemas/util.ts index 07317f5828bca21fb4082107e7c4c228d23dce5f..484e07cdffaa1515941a2b6db37c12bf19a844b9 100644 --- a/samples/openapi3/client/petstore/typescript/builds/composed-schemas/util.ts +++ b/samples/openapi3/client/petstore/typescript/builds/composed-schemas/util.ts @@ -1,6 +1,6 @@ /** * Returns if a specific http code is in a given code range - * where the code range is defined as a combination of digits + * where the code range is defined as a combination of digits * and "X" (the letter X) with a length of 3 * * @param codeRange string with length 3 consisting of digits and "X" (the letter X) diff --git a/samples/openapi3/client/petstore/typescript/builds/default/README.md b/samples/openapi3/client/petstore/typescript/builds/default/README.md index 80b1ac5cc98bdf1979ab742258754c4e1579ad3b..24e614547f625e7eea795d2d36ffc73e9bf35f6d 100644 --- a/samples/openapi3/client/petstore/typescript/builds/default/README.md +++ b/samples/openapi3/client/petstore/typescript/builds/default/README.md @@ -1,6 +1,6 @@ ## ts-petstore-client@1.0.0 -This generator creates TypeScript/JavaScript client that utilizes fetch-api. +This generator creates TypeScript/JavaScript client that utilizes fetch-api. ### Building diff --git a/samples/openapi3/client/petstore/typescript/builds/default/apis/baseapi.ts b/samples/openapi3/client/petstore/typescript/builds/default/apis/baseapi.ts index fe7ee3d151180b546088ac7a006afe68103f1ae4..4c9d37940341e218f351519dab6d8e8de03876cb 100644 --- a/samples/openapi3/client/petstore/typescript/builds/default/apis/baseapi.ts +++ b/samples/openapi3/client/petstore/typescript/builds/default/apis/baseapi.ts @@ -13,7 +13,7 @@ export const COLLECTION_FORMATS = { /** - * + * * @export * @class BaseAPI */ @@ -24,7 +24,7 @@ export class BaseAPIRequestFactory { }; /** - * + * * @export * @class RequiredError * @extends {Error} diff --git a/samples/openapi3/client/petstore/typescript/builds/default/apis/exception.ts b/samples/openapi3/client/petstore/typescript/builds/default/apis/exception.ts index fb8d314eb41dc52851a5d06469954fa7e0cb0c4d..ca5a926c5969a2fa664e5b4ff493666c64c6e1ab 100644 --- a/samples/openapi3/client/petstore/typescript/builds/default/apis/exception.ts +++ b/samples/openapi3/client/petstore/typescript/builds/default/apis/exception.ts @@ -1,5 +1,5 @@ /** - * Represents an error caused by an api call i.e. it has attributes for a HTTP status code + * Represents an error caused by an api call i.e. it has attributes for a HTTP status code * and the returned body object. * * Example @@ -9,6 +9,6 @@ */ export class ApiException<T> extends Error { public constructor(public code: number, public body: T) { - super("HTTP-Code: " + code + "\nMessage: " + JSON.stringify(body)) + super("HTTP-Code: " + code + "\nMessage: " + JSON.stringify(body)) } } diff --git a/samples/openapi3/client/petstore/typescript/builds/default/git_push.sh b/samples/openapi3/client/petstore/typescript/builds/default/git_push.sh index 8442b80bb4456c20d67f6442dbbeacd991a066d2..0f406ef78782d9eef523896c734f8a1432af4a54 100644 --- a/samples/openapi3/client/petstore/typescript/builds/default/git_push.sh +++ b/samples/openapi3/client/petstore/typescript/builds/default/git_push.sh @@ -28,7 +28,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 @@ -49,4 +49,3 @@ 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" git push origin master 2>&1 | grep -v 'To https' - diff --git a/samples/openapi3/client/petstore/typescript/builds/default/http/http.ts b/samples/openapi3/client/petstore/typescript/builds/default/http/http.ts index 034ff003a56bf4369ce8b8e5155e7ca6bc4f1276..4befd50bc1d7b543eacd85c664213f51c6ae9dba 100644 --- a/samples/openapi3/client/petstore/typescript/builds/default/http/http.ts +++ b/samples/openapi3/client/petstore/typescript/builds/default/http/http.ts @@ -1,7 +1,7 @@ // TODO: evaluate if we can easily get rid of this library import * as FormData from "form-data"; // typings of url-parse are incorrect... -// @ts-ignore +// @ts-ignore import * as URLParse from "url-parse"; import { Observable, from } from '../rxjsStub'; @@ -118,7 +118,7 @@ export class RequestContext { this.headers["Cookie"] += name + "=" + value + "; "; } - public setHeaderParam(key: string, value: string): void { + public setHeaderParam(key: string, value: string): void { this.headers[key] = value; } } diff --git a/samples/openapi3/client/petstore/typescript/builds/default/middleware.ts b/samples/openapi3/client/petstore/typescript/builds/default/middleware.ts index e900713818909113b23aa8beebdefc5763065beb..524f93f016b2f67bba2067b7961001b9347332d5 100644 --- a/samples/openapi3/client/petstore/typescript/builds/default/middleware.ts +++ b/samples/openapi3/client/petstore/typescript/builds/default/middleware.ts @@ -34,7 +34,7 @@ export class PromiseMiddlewareWrapper implements Middleware { pre(context: RequestContext): Observable<RequestContext> { return from(this.middleware.pre(context)); } - + post(context: ResponseContext): Observable<ResponseContext> { return from(this.middleware.post(context)); } diff --git a/samples/openapi3/client/petstore/typescript/builds/default/models/ApiResponse.ts b/samples/openapi3/client/petstore/typescript/builds/default/models/ApiResponse.ts index 300b2de4d9a93951ae71d4678907a19129f5e5df..f4b2d010fb711e316886467975f22da85fef11a1 100644 --- a/samples/openapi3/client/petstore/typescript/builds/default/models/ApiResponse.ts +++ b/samples/openapi3/client/petstore/typescript/builds/default/models/ApiResponse.ts @@ -45,7 +45,7 @@ export class ApiResponse { static getAttributeTypeMap() { return ApiResponse.attributeTypeMap; } - + public constructor() { } } diff --git a/samples/openapi3/client/petstore/typescript/builds/default/models/Category.ts b/samples/openapi3/client/petstore/typescript/builds/default/models/Category.ts index 9b210d5d501d51986c8db7b23db9ac159734f396..5d63fc87a9989f98639ecaacc5c8e3db7470a1ec 100644 --- a/samples/openapi3/client/petstore/typescript/builds/default/models/Category.ts +++ b/samples/openapi3/client/petstore/typescript/builds/default/models/Category.ts @@ -38,7 +38,7 @@ export class Category { static getAttributeTypeMap() { return Category.attributeTypeMap; } - + public constructor() { } } diff --git a/samples/openapi3/client/petstore/typescript/builds/default/models/ObjectSerializer.ts b/samples/openapi3/client/petstore/typescript/builds/default/models/ObjectSerializer.ts index 57201945fc82ab76a2efe5213bdf2765e9926fab..a1bdc64ae8eab6017d102d6a188f2c106dd57fb2 100644 --- a/samples/openapi3/client/petstore/typescript/builds/default/models/ObjectSerializer.ts +++ b/samples/openapi3/client/petstore/typescript/builds/default/models/ObjectSerializer.ts @@ -29,7 +29,7 @@ const supportedMediaTypes: { [mediaType: string]: number } = { "application/octet-stream": 0 } - + let enumsMap: Set<string> = new Set<string>([ "OrderStatusEnum", "PetStatusEnum", @@ -112,7 +112,7 @@ export class ObjectSerializer { if (!typeMap[type]) { // in case we dont know the type return data; } - + // Get the actual type of this object type = this.findCorrectType(data, type); diff --git a/samples/openapi3/client/petstore/typescript/builds/default/models/Order.ts b/samples/openapi3/client/petstore/typescript/builds/default/models/Order.ts index 291018b9e06563b040685658af17629e07d4262a..a2f84555ff1e4ce41215fe3c3eac97d7d4dc0e52 100644 --- a/samples/openapi3/client/petstore/typescript/builds/default/models/Order.ts +++ b/samples/openapi3/client/petstore/typescript/builds/default/models/Order.ts @@ -69,7 +69,7 @@ export class Order { static getAttributeTypeMap() { return Order.attributeTypeMap; } - + public constructor() { } } diff --git a/samples/openapi3/client/petstore/typescript/builds/default/models/Pet.ts b/samples/openapi3/client/petstore/typescript/builds/default/models/Pet.ts index 77a3490297db9ae17d8e5aaf1da01f646a33461b..6b191ad8d707e93d24f224c9d32f0ad55f6b95cf 100644 --- a/samples/openapi3/client/petstore/typescript/builds/default/models/Pet.ts +++ b/samples/openapi3/client/petstore/typescript/builds/default/models/Pet.ts @@ -71,7 +71,7 @@ export class Pet { static getAttributeTypeMap() { return Pet.attributeTypeMap; } - + public constructor() { } } diff --git a/samples/openapi3/client/petstore/typescript/builds/default/models/Tag.ts b/samples/openapi3/client/petstore/typescript/builds/default/models/Tag.ts index ce2a0e6d2a8095b193b7d95f2dee702097d97b62..8c4f6967b9a12cfebf599da81f738a08ea536dad 100644 --- a/samples/openapi3/client/petstore/typescript/builds/default/models/Tag.ts +++ b/samples/openapi3/client/petstore/typescript/builds/default/models/Tag.ts @@ -38,7 +38,7 @@ export class Tag { static getAttributeTypeMap() { return Tag.attributeTypeMap; } - + public constructor() { } } diff --git a/samples/openapi3/client/petstore/typescript/builds/default/models/User.ts b/samples/openapi3/client/petstore/typescript/builds/default/models/User.ts index 049af95de37011711309f5fb6bbc88e642b9f308..68528ad3c9e08414c25983ba8b35324408ac609a 100644 --- a/samples/openapi3/client/petstore/typescript/builds/default/models/User.ts +++ b/samples/openapi3/client/petstore/typescript/builds/default/models/User.ts @@ -83,7 +83,7 @@ export class User { static getAttributeTypeMap() { return User.attributeTypeMap; } - + public constructor() { } } diff --git a/samples/openapi3/client/petstore/typescript/builds/default/tsconfig.json b/samples/openapi3/client/petstore/typescript/builds/default/tsconfig.json index 091137b0e376e0daad4bced388f27342e48f0981..3ada5c62a9f295876ac024d0ca094a08459d6aab 100644 --- a/samples/openapi3/client/petstore/typescript/builds/default/tsconfig.json +++ b/samples/openapi3/client/petstore/typescript/builds/default/tsconfig.json @@ -6,7 +6,7 @@ "module": "commonjs", "moduleResolution": "node", "declaration": true, - + /* Additional Checks */ "noUnusedLocals": false, /* Report errors on unused locals. */ // TODO: reenable (unused imports!) "noUnusedParameters": false, /* Report errors on unused parameters. */ // TODO: set to true again diff --git a/samples/openapi3/client/petstore/typescript/builds/default/types/ObservableAPI.ts b/samples/openapi3/client/petstore/typescript/builds/default/types/ObservableAPI.ts index 488915f871ba4ce55760aac83ecf50039bd1253b..4207fd5102dc2f031b0f11060bc35e19c98ee6ba 100644 --- a/samples/openapi3/client/petstore/typescript/builds/default/types/ObservableAPI.ts +++ b/samples/openapi3/client/petstore/typescript/builds/default/types/ObservableAPI.ts @@ -48,7 +48,7 @@ export class ObservablePetApi { return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.addPet(rsp))); })); } - + /** * Deletes a pet * @param petId Pet id to delete @@ -72,7 +72,7 @@ export class ObservablePetApi { return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.deletePet(rsp))); })); } - + /** * Multiple status values can be provided with comma separated strings * Finds Pets by status @@ -96,7 +96,7 @@ export class ObservablePetApi { return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.findPetsByStatus(rsp))); })); } - + /** * Multiple tags can be provided with comma separated strings. Use tag1, tag2, tag3 for testing. * Finds Pets by tags @@ -120,7 +120,7 @@ export class ObservablePetApi { return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.findPetsByTags(rsp))); })); } - + /** * Returns a single pet * Find pet by ID @@ -144,7 +144,7 @@ export class ObservablePetApi { return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.getPetById(rsp))); })); } - + /** * Update an existing pet * @param pet Pet object that needs to be added to the store @@ -167,7 +167,7 @@ export class ObservablePetApi { return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.updatePet(rsp))); })); } - + /** * Updates a pet in the store with form data * @param petId ID of pet that needs to be updated @@ -192,7 +192,7 @@ export class ObservablePetApi { return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.updatePetWithForm(rsp))); })); } - + /** * uploads an image * @param petId ID of pet to update @@ -217,7 +217,7 @@ export class ObservablePetApi { return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.uploadFile(rsp))); })); } - + } import { StoreApiRequestFactory, StoreApiResponseProcessor} from "../apis/StoreApi"; @@ -259,7 +259,7 @@ export class ObservableStoreApi { return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.deleteOrder(rsp))); })); } - + /** * Returns a map of status codes to quantities * Returns pet inventories by status @@ -282,7 +282,7 @@ export class ObservableStoreApi { return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.getInventory(rsp))); })); } - + /** * For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions * Find purchase order by ID @@ -306,7 +306,7 @@ export class ObservableStoreApi { return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.getOrderById(rsp))); })); } - + /** * Place an order for a pet * @param order order placed for purchasing the pet @@ -329,7 +329,7 @@ export class ObservableStoreApi { return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.placeOrder(rsp))); })); } - + } import { UserApiRequestFactory, UserApiResponseProcessor} from "../apis/UserApi"; @@ -371,7 +371,7 @@ export class ObservableUserApi { return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.createUser(rsp))); })); } - + /** * Creates list of users with given input array * @param user List of user object @@ -394,7 +394,7 @@ export class ObservableUserApi { return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.createUsersWithArrayInput(rsp))); })); } - + /** * Creates list of users with given input array * @param user List of user object @@ -417,7 +417,7 @@ export class ObservableUserApi { return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.createUsersWithListInput(rsp))); })); } - + /** * This can only be done by the logged in user. * Delete user @@ -441,7 +441,7 @@ export class ObservableUserApi { return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.deleteUser(rsp))); })); } - + /** * Get user by user name * @param username The name that needs to be fetched. Use user1 for testing. @@ -464,7 +464,7 @@ export class ObservableUserApi { return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.getUserByName(rsp))); })); } - + /** * Logs user into the system * @param username The user name for login @@ -488,7 +488,7 @@ export class ObservableUserApi { return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.loginUser(rsp))); })); } - + /** * Logs out current logged in user session */ @@ -510,7 +510,7 @@ export class ObservableUserApi { return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.logoutUser(rsp))); })); } - + /** * This can only be done by the logged in user. * Updated user @@ -535,5 +535,5 @@ export class ObservableUserApi { return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.updateUser(rsp))); })); } - + } diff --git a/samples/openapi3/client/petstore/typescript/builds/default/util.ts b/samples/openapi3/client/petstore/typescript/builds/default/util.ts index 07317f5828bca21fb4082107e7c4c228d23dce5f..484e07cdffaa1515941a2b6db37c12bf19a844b9 100644 --- a/samples/openapi3/client/petstore/typescript/builds/default/util.ts +++ b/samples/openapi3/client/petstore/typescript/builds/default/util.ts @@ -1,6 +1,6 @@ /** * Returns if a specific http code is in a given code range - * where the code range is defined as a combination of digits + * where the code range is defined as a combination of digits * and "X" (the letter X) with a length of 3 * * @param codeRange string with length 3 consisting of digits and "X" (the letter X) diff --git a/samples/openapi3/client/petstore/typescript/builds/deno/apis/baseapi.ts b/samples/openapi3/client/petstore/typescript/builds/deno/apis/baseapi.ts index a9f232827dfa53e33cbfb18552e9237702650df8..757500b1e0a62f630f66828acf78be778f59081e 100644 --- a/samples/openapi3/client/petstore/typescript/builds/deno/apis/baseapi.ts +++ b/samples/openapi3/client/petstore/typescript/builds/deno/apis/baseapi.ts @@ -13,7 +13,7 @@ export const COLLECTION_FORMATS = { /** - * + * * @export * @class BaseAPI */ @@ -24,7 +24,7 @@ export class BaseAPIRequestFactory { }; /** - * + * * @export * @class RequiredError * @extends {Error} diff --git a/samples/openapi3/client/petstore/typescript/builds/deno/apis/exception.ts b/samples/openapi3/client/petstore/typescript/builds/deno/apis/exception.ts index fb8d314eb41dc52851a5d06469954fa7e0cb0c4d..ca5a926c5969a2fa664e5b4ff493666c64c6e1ab 100644 --- a/samples/openapi3/client/petstore/typescript/builds/deno/apis/exception.ts +++ b/samples/openapi3/client/petstore/typescript/builds/deno/apis/exception.ts @@ -1,5 +1,5 @@ /** - * Represents an error caused by an api call i.e. it has attributes for a HTTP status code + * Represents an error caused by an api call i.e. it has attributes for a HTTP status code * and the returned body object. * * Example @@ -9,6 +9,6 @@ */ export class ApiException<T> extends Error { public constructor(public code: number, public body: T) { - super("HTTP-Code: " + code + "\nMessage: " + JSON.stringify(body)) + super("HTTP-Code: " + code + "\nMessage: " + JSON.stringify(body)) } } diff --git a/samples/openapi3/client/petstore/typescript/builds/deno/git_push.sh b/samples/openapi3/client/petstore/typescript/builds/deno/git_push.sh index 8442b80bb4456c20d67f6442dbbeacd991a066d2..0f406ef78782d9eef523896c734f8a1432af4a54 100644 --- a/samples/openapi3/client/petstore/typescript/builds/deno/git_push.sh +++ b/samples/openapi3/client/petstore/typescript/builds/deno/git_push.sh @@ -28,7 +28,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 @@ -49,4 +49,3 @@ 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" git push origin master 2>&1 | grep -v 'To https' - diff --git a/samples/openapi3/client/petstore/typescript/builds/deno/http/http.ts b/samples/openapi3/client/petstore/typescript/builds/deno/http/http.ts index f92a6086240a961733c98561622aad049418e31a..41395d10489bc184e4271621aed4cedefafbb5a8 100644 --- a/samples/openapi3/client/petstore/typescript/builds/deno/http/http.ts +++ b/samples/openapi3/client/petstore/typescript/builds/deno/http/http.ts @@ -142,7 +142,7 @@ export class RequestContext { this.headers["Cookie"] += name + "=" + value + "; "; } - public setHeaderParam(key: string, value: string): void { + public setHeaderParam(key: string, value: string): void { this.headers[key] = value; } } diff --git a/samples/openapi3/client/petstore/typescript/builds/deno/middleware.ts b/samples/openapi3/client/petstore/typescript/builds/deno/middleware.ts index 8faae449f1756d1f8f169a0966f985d3283748fe..ae36e6c3d7da7e2ede71533757a6ec01196fef66 100644 --- a/samples/openapi3/client/petstore/typescript/builds/deno/middleware.ts +++ b/samples/openapi3/client/petstore/typescript/builds/deno/middleware.ts @@ -34,7 +34,7 @@ export class PromiseMiddlewareWrapper implements Middleware { pre(context: RequestContext): Observable<RequestContext> { return from(this.middleware.pre(context)); } - + post(context: ResponseContext): Observable<ResponseContext> { return from(this.middleware.post(context)); } diff --git a/samples/openapi3/client/petstore/typescript/builds/deno/models/ApiResponse.ts b/samples/openapi3/client/petstore/typescript/builds/deno/models/ApiResponse.ts index 7c0afc4eb5470257a4b1f5a65890d7e0cc50accf..b5cfa4948a07ba9508a854bf79dbd64b9c7c44f6 100644 --- a/samples/openapi3/client/petstore/typescript/builds/deno/models/ApiResponse.ts +++ b/samples/openapi3/client/petstore/typescript/builds/deno/models/ApiResponse.ts @@ -45,7 +45,7 @@ export class ApiResponse { static getAttributeTypeMap() { return ApiResponse.attributeTypeMap; } - + public constructor() { } } diff --git a/samples/openapi3/client/petstore/typescript/builds/deno/models/Category.ts b/samples/openapi3/client/petstore/typescript/builds/deno/models/Category.ts index 8257545297b434ed63ca5a6c1bc1a86203f2bf68..9c1bdd236145facf9e3f091c235f50e265a64af6 100644 --- a/samples/openapi3/client/petstore/typescript/builds/deno/models/Category.ts +++ b/samples/openapi3/client/petstore/typescript/builds/deno/models/Category.ts @@ -38,7 +38,7 @@ export class Category { static getAttributeTypeMap() { return Category.attributeTypeMap; } - + public constructor() { } } diff --git a/samples/openapi3/client/petstore/typescript/builds/deno/models/ObjectSerializer.ts b/samples/openapi3/client/petstore/typescript/builds/deno/models/ObjectSerializer.ts index 858a4b6e0dcefdd78951bce1d2bfe4815b9a6bf6..1cf20279e2bf874bc68a06c9f94638cd5d37d171 100644 --- a/samples/openapi3/client/petstore/typescript/builds/deno/models/ObjectSerializer.ts +++ b/samples/openapi3/client/petstore/typescript/builds/deno/models/ObjectSerializer.ts @@ -29,7 +29,7 @@ const supportedMediaTypes: { [mediaType: string]: number } = { "application/octet-stream": 0 } - + let enumsMap: Set<string> = new Set<string>([ "OrderStatusEnum", "PetStatusEnum", @@ -112,7 +112,7 @@ export class ObjectSerializer { if (!typeMap[type]) { // in case we dont know the type return data; } - + // Get the actual type of this object type = this.findCorrectType(data, type); diff --git a/samples/openapi3/client/petstore/typescript/builds/deno/models/Order.ts b/samples/openapi3/client/petstore/typescript/builds/deno/models/Order.ts index 704d6950aee9f07281b77a067176b2cba0822d01..644657299f36ac6d7fcd70a4a765e7e17a75bd25 100644 --- a/samples/openapi3/client/petstore/typescript/builds/deno/models/Order.ts +++ b/samples/openapi3/client/petstore/typescript/builds/deno/models/Order.ts @@ -69,7 +69,7 @@ export class Order { static getAttributeTypeMap() { return Order.attributeTypeMap; } - + public constructor() { } } diff --git a/samples/openapi3/client/petstore/typescript/builds/deno/models/Pet.ts b/samples/openapi3/client/petstore/typescript/builds/deno/models/Pet.ts index 9ff2f9da286af50d2a824f30a6ea7cf31994d05c..111ac11c7df3b41436a6caa8039de2f9ed1ebe51 100644 --- a/samples/openapi3/client/petstore/typescript/builds/deno/models/Pet.ts +++ b/samples/openapi3/client/petstore/typescript/builds/deno/models/Pet.ts @@ -71,7 +71,7 @@ export class Pet { static getAttributeTypeMap() { return Pet.attributeTypeMap; } - + public constructor() { } } diff --git a/samples/openapi3/client/petstore/typescript/builds/deno/models/Tag.ts b/samples/openapi3/client/petstore/typescript/builds/deno/models/Tag.ts index da5eec221798154306130a20753af2b727980edf..dc2c98212c34fb3d4692d273aa8c992cf71d17a6 100644 --- a/samples/openapi3/client/petstore/typescript/builds/deno/models/Tag.ts +++ b/samples/openapi3/client/petstore/typescript/builds/deno/models/Tag.ts @@ -38,7 +38,7 @@ export class Tag { static getAttributeTypeMap() { return Tag.attributeTypeMap; } - + public constructor() { } } diff --git a/samples/openapi3/client/petstore/typescript/builds/deno/models/User.ts b/samples/openapi3/client/petstore/typescript/builds/deno/models/User.ts index e52f4e4c56b6cb0e9f0889d4f3466b31ea8a0b39..76c6a9ae86922b44b7a99a23450df491d81971a5 100644 --- a/samples/openapi3/client/petstore/typescript/builds/deno/models/User.ts +++ b/samples/openapi3/client/petstore/typescript/builds/deno/models/User.ts @@ -83,7 +83,7 @@ export class User { static getAttributeTypeMap() { return User.attributeTypeMap; } - + public constructor() { } } diff --git a/samples/openapi3/client/petstore/typescript/builds/deno/types/ObservableAPI.ts b/samples/openapi3/client/petstore/typescript/builds/deno/types/ObservableAPI.ts index cde73c04cc082cbc369e31ecdd2e3ea8ca133d8a..ff6f2d0869bbfd14e7babecf0ee129dca9dd08f1 100644 --- a/samples/openapi3/client/petstore/typescript/builds/deno/types/ObservableAPI.ts +++ b/samples/openapi3/client/petstore/typescript/builds/deno/types/ObservableAPI.ts @@ -48,7 +48,7 @@ export class ObservablePetApi { return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.addPet(rsp))); })); } - + /** * Deletes a pet * @param petId Pet id to delete @@ -72,7 +72,7 @@ export class ObservablePetApi { return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.deletePet(rsp))); })); } - + /** * Multiple status values can be provided with comma separated strings * Finds Pets by status @@ -96,7 +96,7 @@ export class ObservablePetApi { return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.findPetsByStatus(rsp))); })); } - + /** * Multiple tags can be provided with comma separated strings. Use tag1, tag2, tag3 for testing. * Finds Pets by tags @@ -120,7 +120,7 @@ export class ObservablePetApi { return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.findPetsByTags(rsp))); })); } - + /** * Returns a single pet * Find pet by ID @@ -144,7 +144,7 @@ export class ObservablePetApi { return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.getPetById(rsp))); })); } - + /** * Update an existing pet * @param pet Pet object that needs to be added to the store @@ -167,7 +167,7 @@ export class ObservablePetApi { return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.updatePet(rsp))); })); } - + /** * Updates a pet in the store with form data * @param petId ID of pet that needs to be updated @@ -192,7 +192,7 @@ export class ObservablePetApi { return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.updatePetWithForm(rsp))); })); } - + /** * uploads an image * @param petId ID of pet to update @@ -217,7 +217,7 @@ export class ObservablePetApi { return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.uploadFile(rsp))); })); } - + } import { StoreApiRequestFactory, StoreApiResponseProcessor} from "../apis/StoreApi.ts"; @@ -259,7 +259,7 @@ export class ObservableStoreApi { return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.deleteOrder(rsp))); })); } - + /** * Returns a map of status codes to quantities * Returns pet inventories by status @@ -282,7 +282,7 @@ export class ObservableStoreApi { return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.getInventory(rsp))); })); } - + /** * For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions * Find purchase order by ID @@ -306,7 +306,7 @@ export class ObservableStoreApi { return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.getOrderById(rsp))); })); } - + /** * Place an order for a pet * @param order order placed for purchasing the pet @@ -329,7 +329,7 @@ export class ObservableStoreApi { return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.placeOrder(rsp))); })); } - + } import { UserApiRequestFactory, UserApiResponseProcessor} from "../apis/UserApi.ts"; @@ -371,7 +371,7 @@ export class ObservableUserApi { return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.createUser(rsp))); })); } - + /** * Creates list of users with given input array * @param user List of user object @@ -394,7 +394,7 @@ export class ObservableUserApi { return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.createUsersWithArrayInput(rsp))); })); } - + /** * Creates list of users with given input array * @param user List of user object @@ -417,7 +417,7 @@ export class ObservableUserApi { return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.createUsersWithListInput(rsp))); })); } - + /** * This can only be done by the logged in user. * Delete user @@ -441,7 +441,7 @@ export class ObservableUserApi { return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.deleteUser(rsp))); })); } - + /** * Get user by user name * @param username The name that needs to be fetched. Use user1 for testing. @@ -464,7 +464,7 @@ export class ObservableUserApi { return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.getUserByName(rsp))); })); } - + /** * Logs user into the system * @param username The user name for login @@ -488,7 +488,7 @@ export class ObservableUserApi { return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.loginUser(rsp))); })); } - + /** * Logs out current logged in user session */ @@ -510,7 +510,7 @@ export class ObservableUserApi { return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.logoutUser(rsp))); })); } - + /** * This can only be done by the logged in user. * Updated user @@ -535,5 +535,5 @@ export class ObservableUserApi { return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.updateUser(rsp))); })); } - + } diff --git a/samples/openapi3/client/petstore/typescript/builds/deno/util.ts b/samples/openapi3/client/petstore/typescript/builds/deno/util.ts index 07317f5828bca21fb4082107e7c4c228d23dce5f..484e07cdffaa1515941a2b6db37c12bf19a844b9 100644 --- a/samples/openapi3/client/petstore/typescript/builds/deno/util.ts +++ b/samples/openapi3/client/petstore/typescript/builds/deno/util.ts @@ -1,6 +1,6 @@ /** * Returns if a specific http code is in a given code range - * where the code range is defined as a combination of digits + * where the code range is defined as a combination of digits * and "X" (the letter X) with a length of 3 * * @param codeRange string with length 3 consisting of digits and "X" (the letter X) diff --git a/samples/openapi3/client/petstore/typescript/builds/inversify/README.md b/samples/openapi3/client/petstore/typescript/builds/inversify/README.md index 80b1ac5cc98bdf1979ab742258754c4e1579ad3b..24e614547f625e7eea795d2d36ffc73e9bf35f6d 100644 --- a/samples/openapi3/client/petstore/typescript/builds/inversify/README.md +++ b/samples/openapi3/client/petstore/typescript/builds/inversify/README.md @@ -1,6 +1,6 @@ ## ts-petstore-client@1.0.0 -This generator creates TypeScript/JavaScript client that utilizes fetch-api. +This generator creates TypeScript/JavaScript client that utilizes fetch-api. ### Building diff --git a/samples/openapi3/client/petstore/typescript/builds/inversify/apis/baseapi.ts b/samples/openapi3/client/petstore/typescript/builds/inversify/apis/baseapi.ts index cf8fec079eb37802a6c4fb7e26158e062a23040b..ba19cb13c43658919c598163411051bab09cddca 100644 --- a/samples/openapi3/client/petstore/typescript/builds/inversify/apis/baseapi.ts +++ b/samples/openapi3/client/petstore/typescript/builds/inversify/apis/baseapi.ts @@ -15,7 +15,7 @@ export const COLLECTION_FORMATS = { /** - * + * * @export * @class BaseAPI */ @@ -27,7 +27,7 @@ export class BaseAPIRequestFactory { }; /** - * + * * @export * @class RequiredError * @extends {Error} diff --git a/samples/openapi3/client/petstore/typescript/builds/inversify/apis/exception.ts b/samples/openapi3/client/petstore/typescript/builds/inversify/apis/exception.ts index fb8d314eb41dc52851a5d06469954fa7e0cb0c4d..ca5a926c5969a2fa664e5b4ff493666c64c6e1ab 100644 --- a/samples/openapi3/client/petstore/typescript/builds/inversify/apis/exception.ts +++ b/samples/openapi3/client/petstore/typescript/builds/inversify/apis/exception.ts @@ -1,5 +1,5 @@ /** - * Represents an error caused by an api call i.e. it has attributes for a HTTP status code + * Represents an error caused by an api call i.e. it has attributes for a HTTP status code * and the returned body object. * * Example @@ -9,6 +9,6 @@ */ export class ApiException<T> extends Error { public constructor(public code: number, public body: T) { - super("HTTP-Code: " + code + "\nMessage: " + JSON.stringify(body)) + super("HTTP-Code: " + code + "\nMessage: " + JSON.stringify(body)) } } diff --git a/samples/openapi3/client/petstore/typescript/builds/inversify/git_push.sh b/samples/openapi3/client/petstore/typescript/builds/inversify/git_push.sh index 8442b80bb4456c20d67f6442dbbeacd991a066d2..0f406ef78782d9eef523896c734f8a1432af4a54 100644 --- a/samples/openapi3/client/petstore/typescript/builds/inversify/git_push.sh +++ b/samples/openapi3/client/petstore/typescript/builds/inversify/git_push.sh @@ -28,7 +28,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 @@ -49,4 +49,3 @@ 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" git push origin master 2>&1 | grep -v 'To https' - diff --git a/samples/openapi3/client/petstore/typescript/builds/inversify/http/http.ts b/samples/openapi3/client/petstore/typescript/builds/inversify/http/http.ts index 034ff003a56bf4369ce8b8e5155e7ca6bc4f1276..4befd50bc1d7b543eacd85c664213f51c6ae9dba 100644 --- a/samples/openapi3/client/petstore/typescript/builds/inversify/http/http.ts +++ b/samples/openapi3/client/petstore/typescript/builds/inversify/http/http.ts @@ -1,7 +1,7 @@ // TODO: evaluate if we can easily get rid of this library import * as FormData from "form-data"; // typings of url-parse are incorrect... -// @ts-ignore +// @ts-ignore import * as URLParse from "url-parse"; import { Observable, from } from '../rxjsStub'; @@ -118,7 +118,7 @@ export class RequestContext { this.headers["Cookie"] += name + "=" + value + "; "; } - public setHeaderParam(key: string, value: string): void { + public setHeaderParam(key: string, value: string): void { this.headers[key] = value; } } diff --git a/samples/openapi3/client/petstore/typescript/builds/inversify/middleware.ts b/samples/openapi3/client/petstore/typescript/builds/inversify/middleware.ts index e900713818909113b23aa8beebdefc5763065beb..524f93f016b2f67bba2067b7961001b9347332d5 100644 --- a/samples/openapi3/client/petstore/typescript/builds/inversify/middleware.ts +++ b/samples/openapi3/client/petstore/typescript/builds/inversify/middleware.ts @@ -34,7 +34,7 @@ export class PromiseMiddlewareWrapper implements Middleware { pre(context: RequestContext): Observable<RequestContext> { return from(this.middleware.pre(context)); } - + post(context: ResponseContext): Observable<ResponseContext> { return from(this.middleware.post(context)); } diff --git a/samples/openapi3/client/petstore/typescript/builds/inversify/models/ApiResponse.ts b/samples/openapi3/client/petstore/typescript/builds/inversify/models/ApiResponse.ts index 300b2de4d9a93951ae71d4678907a19129f5e5df..f4b2d010fb711e316886467975f22da85fef11a1 100644 --- a/samples/openapi3/client/petstore/typescript/builds/inversify/models/ApiResponse.ts +++ b/samples/openapi3/client/petstore/typescript/builds/inversify/models/ApiResponse.ts @@ -45,7 +45,7 @@ export class ApiResponse { static getAttributeTypeMap() { return ApiResponse.attributeTypeMap; } - + public constructor() { } } diff --git a/samples/openapi3/client/petstore/typescript/builds/inversify/models/Category.ts b/samples/openapi3/client/petstore/typescript/builds/inversify/models/Category.ts index 9b210d5d501d51986c8db7b23db9ac159734f396..5d63fc87a9989f98639ecaacc5c8e3db7470a1ec 100644 --- a/samples/openapi3/client/petstore/typescript/builds/inversify/models/Category.ts +++ b/samples/openapi3/client/petstore/typescript/builds/inversify/models/Category.ts @@ -38,7 +38,7 @@ export class Category { static getAttributeTypeMap() { return Category.attributeTypeMap; } - + public constructor() { } } diff --git a/samples/openapi3/client/petstore/typescript/builds/inversify/models/ObjectSerializer.ts b/samples/openapi3/client/petstore/typescript/builds/inversify/models/ObjectSerializer.ts index 57201945fc82ab76a2efe5213bdf2765e9926fab..a1bdc64ae8eab6017d102d6a188f2c106dd57fb2 100644 --- a/samples/openapi3/client/petstore/typescript/builds/inversify/models/ObjectSerializer.ts +++ b/samples/openapi3/client/petstore/typescript/builds/inversify/models/ObjectSerializer.ts @@ -29,7 +29,7 @@ const supportedMediaTypes: { [mediaType: string]: number } = { "application/octet-stream": 0 } - + let enumsMap: Set<string> = new Set<string>([ "OrderStatusEnum", "PetStatusEnum", @@ -112,7 +112,7 @@ export class ObjectSerializer { if (!typeMap[type]) { // in case we dont know the type return data; } - + // Get the actual type of this object type = this.findCorrectType(data, type); diff --git a/samples/openapi3/client/petstore/typescript/builds/inversify/models/Order.ts b/samples/openapi3/client/petstore/typescript/builds/inversify/models/Order.ts index 291018b9e06563b040685658af17629e07d4262a..a2f84555ff1e4ce41215fe3c3eac97d7d4dc0e52 100644 --- a/samples/openapi3/client/petstore/typescript/builds/inversify/models/Order.ts +++ b/samples/openapi3/client/petstore/typescript/builds/inversify/models/Order.ts @@ -69,7 +69,7 @@ export class Order { static getAttributeTypeMap() { return Order.attributeTypeMap; } - + public constructor() { } } diff --git a/samples/openapi3/client/petstore/typescript/builds/inversify/models/Pet.ts b/samples/openapi3/client/petstore/typescript/builds/inversify/models/Pet.ts index 77a3490297db9ae17d8e5aaf1da01f646a33461b..6b191ad8d707e93d24f224c9d32f0ad55f6b95cf 100644 --- a/samples/openapi3/client/petstore/typescript/builds/inversify/models/Pet.ts +++ b/samples/openapi3/client/petstore/typescript/builds/inversify/models/Pet.ts @@ -71,7 +71,7 @@ export class Pet { static getAttributeTypeMap() { return Pet.attributeTypeMap; } - + public constructor() { } } diff --git a/samples/openapi3/client/petstore/typescript/builds/inversify/models/Tag.ts b/samples/openapi3/client/petstore/typescript/builds/inversify/models/Tag.ts index ce2a0e6d2a8095b193b7d95f2dee702097d97b62..8c4f6967b9a12cfebf599da81f738a08ea536dad 100644 --- a/samples/openapi3/client/petstore/typescript/builds/inversify/models/Tag.ts +++ b/samples/openapi3/client/petstore/typescript/builds/inversify/models/Tag.ts @@ -38,7 +38,7 @@ export class Tag { static getAttributeTypeMap() { return Tag.attributeTypeMap; } - + public constructor() { } } diff --git a/samples/openapi3/client/petstore/typescript/builds/inversify/models/User.ts b/samples/openapi3/client/petstore/typescript/builds/inversify/models/User.ts index 049af95de37011711309f5fb6bbc88e642b9f308..68528ad3c9e08414c25983ba8b35324408ac609a 100644 --- a/samples/openapi3/client/petstore/typescript/builds/inversify/models/User.ts +++ b/samples/openapi3/client/petstore/typescript/builds/inversify/models/User.ts @@ -83,7 +83,7 @@ export class User { static getAttributeTypeMap() { return User.attributeTypeMap; } - + public constructor() { } } diff --git a/samples/openapi3/client/petstore/typescript/builds/inversify/services/http.ts b/samples/openapi3/client/petstore/typescript/builds/inversify/services/http.ts index a84fc3f5dec16fbad3c297e39941013d6073e154..18c3713ace0bd74a30d9c07981a55faffd0cc21c 100644 --- a/samples/openapi3/client/petstore/typescript/builds/inversify/services/http.ts +++ b/samples/openapi3/client/petstore/typescript/builds/inversify/services/http.ts @@ -14,4 +14,3 @@ export abstract class AbstractMiddleware implements PromiseMiddleware { export abstract class AbstractServerConfiguration implements BaseServerConfiguration { public abstract makeRequestContext(endpoint: string, httpMethod: HttpMethod): RequestContext; }; - diff --git a/samples/openapi3/client/petstore/typescript/builds/inversify/tsconfig.json b/samples/openapi3/client/petstore/typescript/builds/inversify/tsconfig.json index 7a131bcd53da205d4022558aede9346bc37aab5a..c09901ad10fbdcb16dc2d6ea4678210425c2fc1c 100644 --- a/samples/openapi3/client/petstore/typescript/builds/inversify/tsconfig.json +++ b/samples/openapi3/client/petstore/typescript/builds/inversify/tsconfig.json @@ -6,7 +6,7 @@ "module": "commonjs", "moduleResolution": "node", "declaration": true, - + /* Additional Checks */ "noUnusedLocals": false, /* Report errors on unused locals. */ // TODO: reenable (unused imports!) "noUnusedParameters": false, /* Report errors on unused parameters. */ // TODO: set to true again diff --git a/samples/openapi3/client/petstore/typescript/builds/inversify/types/ObservableAPI.ts b/samples/openapi3/client/petstore/typescript/builds/inversify/types/ObservableAPI.ts index 6ed7a67b5cbbc92a510a69c2724b18956acf99f5..98cbc9f374029a51f10c880bdea1df36ac2f880d 100644 --- a/samples/openapi3/client/petstore/typescript/builds/inversify/types/ObservableAPI.ts +++ b/samples/openapi3/client/petstore/typescript/builds/inversify/types/ObservableAPI.ts @@ -53,7 +53,7 @@ export class ObservablePetApi { return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.addPet(rsp))); })); } - + /** * Deletes a pet * @param petId Pet id to delete @@ -77,7 +77,7 @@ export class ObservablePetApi { return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.deletePet(rsp))); })); } - + /** * Multiple status values can be provided with comma separated strings * Finds Pets by status @@ -101,7 +101,7 @@ export class ObservablePetApi { return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.findPetsByStatus(rsp))); })); } - + /** * Multiple tags can be provided with comma separated strings. Use tag1, tag2, tag3 for testing. * Finds Pets by tags @@ -125,7 +125,7 @@ export class ObservablePetApi { return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.findPetsByTags(rsp))); })); } - + /** * Returns a single pet * Find pet by ID @@ -149,7 +149,7 @@ export class ObservablePetApi { return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.getPetById(rsp))); })); } - + /** * Update an existing pet * @param pet Pet object that needs to be added to the store @@ -172,7 +172,7 @@ export class ObservablePetApi { return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.updatePet(rsp))); })); } - + /** * Updates a pet in the store with form data * @param petId ID of pet that needs to be updated @@ -197,7 +197,7 @@ export class ObservablePetApi { return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.updatePetWithForm(rsp))); })); } - + /** * uploads an image * @param petId ID of pet to update @@ -222,7 +222,7 @@ export class ObservablePetApi { return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.uploadFile(rsp))); })); } - + } import { StoreApiRequestFactory, StoreApiResponseProcessor} from "../apis/StoreApi"; @@ -267,7 +267,7 @@ export class ObservableStoreApi { return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.deleteOrder(rsp))); })); } - + /** * Returns a map of status codes to quantities * Returns pet inventories by status @@ -290,7 +290,7 @@ export class ObservableStoreApi { return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.getInventory(rsp))); })); } - + /** * For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions * Find purchase order by ID @@ -314,7 +314,7 @@ export class ObservableStoreApi { return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.getOrderById(rsp))); })); } - + /** * Place an order for a pet * @param order order placed for purchasing the pet @@ -337,7 +337,7 @@ export class ObservableStoreApi { return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.placeOrder(rsp))); })); } - + } import { UserApiRequestFactory, UserApiResponseProcessor} from "../apis/UserApi"; @@ -382,7 +382,7 @@ export class ObservableUserApi { return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.createUser(rsp))); })); } - + /** * Creates list of users with given input array * @param user List of user object @@ -405,7 +405,7 @@ export class ObservableUserApi { return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.createUsersWithArrayInput(rsp))); })); } - + /** * Creates list of users with given input array * @param user List of user object @@ -428,7 +428,7 @@ export class ObservableUserApi { return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.createUsersWithListInput(rsp))); })); } - + /** * This can only be done by the logged in user. * Delete user @@ -452,7 +452,7 @@ export class ObservableUserApi { return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.deleteUser(rsp))); })); } - + /** * Get user by user name * @param username The name that needs to be fetched. Use user1 for testing. @@ -475,7 +475,7 @@ export class ObservableUserApi { return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.getUserByName(rsp))); })); } - + /** * Logs user into the system * @param username The user name for login @@ -499,7 +499,7 @@ export class ObservableUserApi { return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.loginUser(rsp))); })); } - + /** * Logs out current logged in user session */ @@ -521,7 +521,7 @@ export class ObservableUserApi { return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.logoutUser(rsp))); })); } - + /** * This can only be done by the logged in user. * Updated user @@ -546,5 +546,5 @@ export class ObservableUserApi { return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.updateUser(rsp))); })); } - + } diff --git a/samples/openapi3/client/petstore/typescript/builds/inversify/util.ts b/samples/openapi3/client/petstore/typescript/builds/inversify/util.ts index 07317f5828bca21fb4082107e7c4c228d23dce5f..484e07cdffaa1515941a2b6db37c12bf19a844b9 100644 --- a/samples/openapi3/client/petstore/typescript/builds/inversify/util.ts +++ b/samples/openapi3/client/petstore/typescript/builds/inversify/util.ts @@ -1,6 +1,6 @@ /** * Returns if a specific http code is in a given code range - * where the code range is defined as a combination of digits + * where the code range is defined as a combination of digits * and "X" (the letter X) with a length of 3 * * @param codeRange string with length 3 consisting of digits and "X" (the letter X) diff --git a/samples/openapi3/client/petstore/typescript/builds/jquery/README.md b/samples/openapi3/client/petstore/typescript/builds/jquery/README.md index 9cccd82f833895fe8db73e9273e434b7c968b4a3..96e9a0dbe48ed8d9a229f0dda855206142ae8024 100644 --- a/samples/openapi3/client/petstore/typescript/builds/jquery/README.md +++ b/samples/openapi3/client/petstore/typescript/builds/jquery/README.md @@ -1,6 +1,6 @@ ## ts-petstore-client@1.0.0 -This generator creates TypeScript/JavaScript client that utilizes jquery. +This generator creates TypeScript/JavaScript client that utilizes jquery. ### Building diff --git a/samples/openapi3/client/petstore/typescript/builds/jquery/apis/baseapi.ts b/samples/openapi3/client/petstore/typescript/builds/jquery/apis/baseapi.ts index fe7ee3d151180b546088ac7a006afe68103f1ae4..4c9d37940341e218f351519dab6d8e8de03876cb 100644 --- a/samples/openapi3/client/petstore/typescript/builds/jquery/apis/baseapi.ts +++ b/samples/openapi3/client/petstore/typescript/builds/jquery/apis/baseapi.ts @@ -13,7 +13,7 @@ export const COLLECTION_FORMATS = { /** - * + * * @export * @class BaseAPI */ @@ -24,7 +24,7 @@ export class BaseAPIRequestFactory { }; /** - * + * * @export * @class RequiredError * @extends {Error} diff --git a/samples/openapi3/client/petstore/typescript/builds/jquery/apis/exception.ts b/samples/openapi3/client/petstore/typescript/builds/jquery/apis/exception.ts index fb8d314eb41dc52851a5d06469954fa7e0cb0c4d..ca5a926c5969a2fa664e5b4ff493666c64c6e1ab 100644 --- a/samples/openapi3/client/petstore/typescript/builds/jquery/apis/exception.ts +++ b/samples/openapi3/client/petstore/typescript/builds/jquery/apis/exception.ts @@ -1,5 +1,5 @@ /** - * Represents an error caused by an api call i.e. it has attributes for a HTTP status code + * Represents an error caused by an api call i.e. it has attributes for a HTTP status code * and the returned body object. * * Example @@ -9,6 +9,6 @@ */ export class ApiException<T> extends Error { public constructor(public code: number, public body: T) { - super("HTTP-Code: " + code + "\nMessage: " + JSON.stringify(body)) + super("HTTP-Code: " + code + "\nMessage: " + JSON.stringify(body)) } } diff --git a/samples/openapi3/client/petstore/typescript/builds/jquery/git_push.sh b/samples/openapi3/client/petstore/typescript/builds/jquery/git_push.sh index 8442b80bb4456c20d67f6442dbbeacd991a066d2..0f406ef78782d9eef523896c734f8a1432af4a54 100644 --- a/samples/openapi3/client/petstore/typescript/builds/jquery/git_push.sh +++ b/samples/openapi3/client/petstore/typescript/builds/jquery/git_push.sh @@ -28,7 +28,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 @@ -49,4 +49,3 @@ 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" git push origin master 2>&1 | grep -v 'To https' - diff --git a/samples/openapi3/client/petstore/typescript/builds/jquery/http/http.ts b/samples/openapi3/client/petstore/typescript/builds/jquery/http/http.ts index bf8d116d351b7c914906fc024174dfdec3bc2f0f..beedd8c92e38c078747934cf945df1a08595ff27 100644 --- a/samples/openapi3/client/petstore/typescript/builds/jquery/http/http.ts +++ b/samples/openapi3/client/petstore/typescript/builds/jquery/http/http.ts @@ -1,5 +1,5 @@ // typings of url-parse are incorrect... -// @ts-ignore +// @ts-ignore import * as URLParse from "url-parse"; import { Observable, from } from '../rxjsStub'; @@ -113,7 +113,7 @@ export class RequestContext { this.headers["Cookie"] += name + "=" + value + "; "; } - public setHeaderParam(key: string, value: string): void { + public setHeaderParam(key: string, value: string): void { this.headers[key] = value; } } diff --git a/samples/openapi3/client/petstore/typescript/builds/jquery/http/jquery.ts b/samples/openapi3/client/petstore/typescript/builds/jquery/http/jquery.ts index 038b08a6d7ebd969ec0335ee0bbc25d625696c71..3120116074c79186341f9b85173e3c092b2fc8a8 100644 --- a/samples/openapi3/client/petstore/typescript/builds/jquery/http/jquery.ts +++ b/samples/openapi3/client/petstore/typescript/builds/jquery/http/jquery.ts @@ -24,7 +24,7 @@ export class JQueryHttpLibrary implements HttpLibrary { // If we want a blob, we have to set the xhrFields' responseType AND add a // custom converter to overwrite the default deserialization of JQuery... requestOptions["xhrFields"] = { responseType: 'blob' }; - requestOptions["converters"] = {} + requestOptions["converters"] = {} requestOptions["converters"]["* blob"] = (result:any) => result; requestOptions["dataType"] = "blob"; diff --git a/samples/openapi3/client/petstore/typescript/builds/jquery/middleware.ts b/samples/openapi3/client/petstore/typescript/builds/jquery/middleware.ts index e900713818909113b23aa8beebdefc5763065beb..524f93f016b2f67bba2067b7961001b9347332d5 100644 --- a/samples/openapi3/client/petstore/typescript/builds/jquery/middleware.ts +++ b/samples/openapi3/client/petstore/typescript/builds/jquery/middleware.ts @@ -34,7 +34,7 @@ export class PromiseMiddlewareWrapper implements Middleware { pre(context: RequestContext): Observable<RequestContext> { return from(this.middleware.pre(context)); } - + post(context: ResponseContext): Observable<ResponseContext> { return from(this.middleware.post(context)); } diff --git a/samples/openapi3/client/petstore/typescript/builds/jquery/models/ApiResponse.ts b/samples/openapi3/client/petstore/typescript/builds/jquery/models/ApiResponse.ts index 300b2de4d9a93951ae71d4678907a19129f5e5df..f4b2d010fb711e316886467975f22da85fef11a1 100644 --- a/samples/openapi3/client/petstore/typescript/builds/jquery/models/ApiResponse.ts +++ b/samples/openapi3/client/petstore/typescript/builds/jquery/models/ApiResponse.ts @@ -45,7 +45,7 @@ export class ApiResponse { static getAttributeTypeMap() { return ApiResponse.attributeTypeMap; } - + public constructor() { } } diff --git a/samples/openapi3/client/petstore/typescript/builds/jquery/models/Category.ts b/samples/openapi3/client/petstore/typescript/builds/jquery/models/Category.ts index 9b210d5d501d51986c8db7b23db9ac159734f396..5d63fc87a9989f98639ecaacc5c8e3db7470a1ec 100644 --- a/samples/openapi3/client/petstore/typescript/builds/jquery/models/Category.ts +++ b/samples/openapi3/client/petstore/typescript/builds/jquery/models/Category.ts @@ -38,7 +38,7 @@ export class Category { static getAttributeTypeMap() { return Category.attributeTypeMap; } - + public constructor() { } } diff --git a/samples/openapi3/client/petstore/typescript/builds/jquery/models/ObjectSerializer.ts b/samples/openapi3/client/petstore/typescript/builds/jquery/models/ObjectSerializer.ts index 57201945fc82ab76a2efe5213bdf2765e9926fab..a1bdc64ae8eab6017d102d6a188f2c106dd57fb2 100644 --- a/samples/openapi3/client/petstore/typescript/builds/jquery/models/ObjectSerializer.ts +++ b/samples/openapi3/client/petstore/typescript/builds/jquery/models/ObjectSerializer.ts @@ -29,7 +29,7 @@ const supportedMediaTypes: { [mediaType: string]: number } = { "application/octet-stream": 0 } - + let enumsMap: Set<string> = new Set<string>([ "OrderStatusEnum", "PetStatusEnum", @@ -112,7 +112,7 @@ export class ObjectSerializer { if (!typeMap[type]) { // in case we dont know the type return data; } - + // Get the actual type of this object type = this.findCorrectType(data, type); diff --git a/samples/openapi3/client/petstore/typescript/builds/jquery/models/Order.ts b/samples/openapi3/client/petstore/typescript/builds/jquery/models/Order.ts index 291018b9e06563b040685658af17629e07d4262a..a2f84555ff1e4ce41215fe3c3eac97d7d4dc0e52 100644 --- a/samples/openapi3/client/petstore/typescript/builds/jquery/models/Order.ts +++ b/samples/openapi3/client/petstore/typescript/builds/jquery/models/Order.ts @@ -69,7 +69,7 @@ export class Order { static getAttributeTypeMap() { return Order.attributeTypeMap; } - + public constructor() { } } diff --git a/samples/openapi3/client/petstore/typescript/builds/jquery/models/Pet.ts b/samples/openapi3/client/petstore/typescript/builds/jquery/models/Pet.ts index 77a3490297db9ae17d8e5aaf1da01f646a33461b..6b191ad8d707e93d24f224c9d32f0ad55f6b95cf 100644 --- a/samples/openapi3/client/petstore/typescript/builds/jquery/models/Pet.ts +++ b/samples/openapi3/client/petstore/typescript/builds/jquery/models/Pet.ts @@ -71,7 +71,7 @@ export class Pet { static getAttributeTypeMap() { return Pet.attributeTypeMap; } - + public constructor() { } } diff --git a/samples/openapi3/client/petstore/typescript/builds/jquery/models/Tag.ts b/samples/openapi3/client/petstore/typescript/builds/jquery/models/Tag.ts index ce2a0e6d2a8095b193b7d95f2dee702097d97b62..8c4f6967b9a12cfebf599da81f738a08ea536dad 100644 --- a/samples/openapi3/client/petstore/typescript/builds/jquery/models/Tag.ts +++ b/samples/openapi3/client/petstore/typescript/builds/jquery/models/Tag.ts @@ -38,7 +38,7 @@ export class Tag { static getAttributeTypeMap() { return Tag.attributeTypeMap; } - + public constructor() { } } diff --git a/samples/openapi3/client/petstore/typescript/builds/jquery/models/User.ts b/samples/openapi3/client/petstore/typescript/builds/jquery/models/User.ts index 049af95de37011711309f5fb6bbc88e642b9f308..68528ad3c9e08414c25983ba8b35324408ac609a 100644 --- a/samples/openapi3/client/petstore/typescript/builds/jquery/models/User.ts +++ b/samples/openapi3/client/petstore/typescript/builds/jquery/models/User.ts @@ -83,7 +83,7 @@ export class User { static getAttributeTypeMap() { return User.attributeTypeMap; } - + public constructor() { } } diff --git a/samples/openapi3/client/petstore/typescript/builds/jquery/tsconfig.json b/samples/openapi3/client/petstore/typescript/builds/jquery/tsconfig.json index ce51978eb8664806aba7cbbdda18bc8f3270b497..6576215ef877ef214e48b572df00d57810b95678 100644 --- a/samples/openapi3/client/petstore/typescript/builds/jquery/tsconfig.json +++ b/samples/openapi3/client/petstore/typescript/builds/jquery/tsconfig.json @@ -6,7 +6,7 @@ "module": "commonjs", "moduleResolution": "node", "declaration": true, - + /* Additional Checks */ "noUnusedLocals": false, /* Report errors on unused locals. */ // TODO: reenable (unused imports!) "noUnusedParameters": false, /* Report errors on unused parameters. */ // TODO: set to true again diff --git a/samples/openapi3/client/petstore/typescript/builds/jquery/types/ObservableAPI.ts b/samples/openapi3/client/petstore/typescript/builds/jquery/types/ObservableAPI.ts index 488915f871ba4ce55760aac83ecf50039bd1253b..4207fd5102dc2f031b0f11060bc35e19c98ee6ba 100644 --- a/samples/openapi3/client/petstore/typescript/builds/jquery/types/ObservableAPI.ts +++ b/samples/openapi3/client/petstore/typescript/builds/jquery/types/ObservableAPI.ts @@ -48,7 +48,7 @@ export class ObservablePetApi { return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.addPet(rsp))); })); } - + /** * Deletes a pet * @param petId Pet id to delete @@ -72,7 +72,7 @@ export class ObservablePetApi { return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.deletePet(rsp))); })); } - + /** * Multiple status values can be provided with comma separated strings * Finds Pets by status @@ -96,7 +96,7 @@ export class ObservablePetApi { return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.findPetsByStatus(rsp))); })); } - + /** * Multiple tags can be provided with comma separated strings. Use tag1, tag2, tag3 for testing. * Finds Pets by tags @@ -120,7 +120,7 @@ export class ObservablePetApi { return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.findPetsByTags(rsp))); })); } - + /** * Returns a single pet * Find pet by ID @@ -144,7 +144,7 @@ export class ObservablePetApi { return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.getPetById(rsp))); })); } - + /** * Update an existing pet * @param pet Pet object that needs to be added to the store @@ -167,7 +167,7 @@ export class ObservablePetApi { return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.updatePet(rsp))); })); } - + /** * Updates a pet in the store with form data * @param petId ID of pet that needs to be updated @@ -192,7 +192,7 @@ export class ObservablePetApi { return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.updatePetWithForm(rsp))); })); } - + /** * uploads an image * @param petId ID of pet to update @@ -217,7 +217,7 @@ export class ObservablePetApi { return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.uploadFile(rsp))); })); } - + } import { StoreApiRequestFactory, StoreApiResponseProcessor} from "../apis/StoreApi"; @@ -259,7 +259,7 @@ export class ObservableStoreApi { return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.deleteOrder(rsp))); })); } - + /** * Returns a map of status codes to quantities * Returns pet inventories by status @@ -282,7 +282,7 @@ export class ObservableStoreApi { return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.getInventory(rsp))); })); } - + /** * For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions * Find purchase order by ID @@ -306,7 +306,7 @@ export class ObservableStoreApi { return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.getOrderById(rsp))); })); } - + /** * Place an order for a pet * @param order order placed for purchasing the pet @@ -329,7 +329,7 @@ export class ObservableStoreApi { return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.placeOrder(rsp))); })); } - + } import { UserApiRequestFactory, UserApiResponseProcessor} from "../apis/UserApi"; @@ -371,7 +371,7 @@ export class ObservableUserApi { return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.createUser(rsp))); })); } - + /** * Creates list of users with given input array * @param user List of user object @@ -394,7 +394,7 @@ export class ObservableUserApi { return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.createUsersWithArrayInput(rsp))); })); } - + /** * Creates list of users with given input array * @param user List of user object @@ -417,7 +417,7 @@ export class ObservableUserApi { return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.createUsersWithListInput(rsp))); })); } - + /** * This can only be done by the logged in user. * Delete user @@ -441,7 +441,7 @@ export class ObservableUserApi { return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.deleteUser(rsp))); })); } - + /** * Get user by user name * @param username The name that needs to be fetched. Use user1 for testing. @@ -464,7 +464,7 @@ export class ObservableUserApi { return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.getUserByName(rsp))); })); } - + /** * Logs user into the system * @param username The user name for login @@ -488,7 +488,7 @@ export class ObservableUserApi { return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.loginUser(rsp))); })); } - + /** * Logs out current logged in user session */ @@ -510,7 +510,7 @@ export class ObservableUserApi { return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.logoutUser(rsp))); })); } - + /** * This can only be done by the logged in user. * Updated user @@ -535,5 +535,5 @@ export class ObservableUserApi { return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.updateUser(rsp))); })); } - + } diff --git a/samples/openapi3/client/petstore/typescript/builds/jquery/util.ts b/samples/openapi3/client/petstore/typescript/builds/jquery/util.ts index 07317f5828bca21fb4082107e7c4c228d23dce5f..484e07cdffaa1515941a2b6db37c12bf19a844b9 100644 --- a/samples/openapi3/client/petstore/typescript/builds/jquery/util.ts +++ b/samples/openapi3/client/petstore/typescript/builds/jquery/util.ts @@ -1,6 +1,6 @@ /** * Returns if a specific http code is in a given code range - * where the code range is defined as a combination of digits + * where the code range is defined as a combination of digits * and "X" (the letter X) with a length of 3 * * @param codeRange string with length 3 consisting of digits and "X" (the letter X) diff --git a/samples/openapi3/client/petstore/typescript/builds/object_params/README.md b/samples/openapi3/client/petstore/typescript/builds/object_params/README.md index 80b1ac5cc98bdf1979ab742258754c4e1579ad3b..24e614547f625e7eea795d2d36ffc73e9bf35f6d 100644 --- a/samples/openapi3/client/petstore/typescript/builds/object_params/README.md +++ b/samples/openapi3/client/petstore/typescript/builds/object_params/README.md @@ -1,6 +1,6 @@ ## ts-petstore-client@1.0.0 -This generator creates TypeScript/JavaScript client that utilizes fetch-api. +This generator creates TypeScript/JavaScript client that utilizes fetch-api. ### Building diff --git a/samples/openapi3/client/petstore/typescript/builds/object_params/apis/baseapi.ts b/samples/openapi3/client/petstore/typescript/builds/object_params/apis/baseapi.ts index fe7ee3d151180b546088ac7a006afe68103f1ae4..4c9d37940341e218f351519dab6d8e8de03876cb 100644 --- a/samples/openapi3/client/petstore/typescript/builds/object_params/apis/baseapi.ts +++ b/samples/openapi3/client/petstore/typescript/builds/object_params/apis/baseapi.ts @@ -13,7 +13,7 @@ export const COLLECTION_FORMATS = { /** - * + * * @export * @class BaseAPI */ @@ -24,7 +24,7 @@ export class BaseAPIRequestFactory { }; /** - * + * * @export * @class RequiredError * @extends {Error} diff --git a/samples/openapi3/client/petstore/typescript/builds/object_params/apis/exception.ts b/samples/openapi3/client/petstore/typescript/builds/object_params/apis/exception.ts index fb8d314eb41dc52851a5d06469954fa7e0cb0c4d..ca5a926c5969a2fa664e5b4ff493666c64c6e1ab 100644 --- a/samples/openapi3/client/petstore/typescript/builds/object_params/apis/exception.ts +++ b/samples/openapi3/client/petstore/typescript/builds/object_params/apis/exception.ts @@ -1,5 +1,5 @@ /** - * Represents an error caused by an api call i.e. it has attributes for a HTTP status code + * Represents an error caused by an api call i.e. it has attributes for a HTTP status code * and the returned body object. * * Example @@ -9,6 +9,6 @@ */ export class ApiException<T> extends Error { public constructor(public code: number, public body: T) { - super("HTTP-Code: " + code + "\nMessage: " + JSON.stringify(body)) + super("HTTP-Code: " + code + "\nMessage: " + JSON.stringify(body)) } } diff --git a/samples/openapi3/client/petstore/typescript/builds/object_params/git_push.sh b/samples/openapi3/client/petstore/typescript/builds/object_params/git_push.sh index 8442b80bb4456c20d67f6442dbbeacd991a066d2..0f406ef78782d9eef523896c734f8a1432af4a54 100644 --- a/samples/openapi3/client/petstore/typescript/builds/object_params/git_push.sh +++ b/samples/openapi3/client/petstore/typescript/builds/object_params/git_push.sh @@ -28,7 +28,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 @@ -49,4 +49,3 @@ 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" git push origin master 2>&1 | grep -v 'To https' - diff --git a/samples/openapi3/client/petstore/typescript/builds/object_params/http/http.ts b/samples/openapi3/client/petstore/typescript/builds/object_params/http/http.ts index 034ff003a56bf4369ce8b8e5155e7ca6bc4f1276..4befd50bc1d7b543eacd85c664213f51c6ae9dba 100644 --- a/samples/openapi3/client/petstore/typescript/builds/object_params/http/http.ts +++ b/samples/openapi3/client/petstore/typescript/builds/object_params/http/http.ts @@ -1,7 +1,7 @@ // TODO: evaluate if we can easily get rid of this library import * as FormData from "form-data"; // typings of url-parse are incorrect... -// @ts-ignore +// @ts-ignore import * as URLParse from "url-parse"; import { Observable, from } from '../rxjsStub'; @@ -118,7 +118,7 @@ export class RequestContext { this.headers["Cookie"] += name + "=" + value + "; "; } - public setHeaderParam(key: string, value: string): void { + public setHeaderParam(key: string, value: string): void { this.headers[key] = value; } } diff --git a/samples/openapi3/client/petstore/typescript/builds/object_params/middleware.ts b/samples/openapi3/client/petstore/typescript/builds/object_params/middleware.ts index e900713818909113b23aa8beebdefc5763065beb..524f93f016b2f67bba2067b7961001b9347332d5 100644 --- a/samples/openapi3/client/petstore/typescript/builds/object_params/middleware.ts +++ b/samples/openapi3/client/petstore/typescript/builds/object_params/middleware.ts @@ -34,7 +34,7 @@ export class PromiseMiddlewareWrapper implements Middleware { pre(context: RequestContext): Observable<RequestContext> { return from(this.middleware.pre(context)); } - + post(context: ResponseContext): Observable<ResponseContext> { return from(this.middleware.post(context)); } diff --git a/samples/openapi3/client/petstore/typescript/builds/object_params/models/ApiResponse.ts b/samples/openapi3/client/petstore/typescript/builds/object_params/models/ApiResponse.ts index 300b2de4d9a93951ae71d4678907a19129f5e5df..f4b2d010fb711e316886467975f22da85fef11a1 100644 --- a/samples/openapi3/client/petstore/typescript/builds/object_params/models/ApiResponse.ts +++ b/samples/openapi3/client/petstore/typescript/builds/object_params/models/ApiResponse.ts @@ -45,7 +45,7 @@ export class ApiResponse { static getAttributeTypeMap() { return ApiResponse.attributeTypeMap; } - + public constructor() { } } diff --git a/samples/openapi3/client/petstore/typescript/builds/object_params/models/Category.ts b/samples/openapi3/client/petstore/typescript/builds/object_params/models/Category.ts index 9b210d5d501d51986c8db7b23db9ac159734f396..5d63fc87a9989f98639ecaacc5c8e3db7470a1ec 100644 --- a/samples/openapi3/client/petstore/typescript/builds/object_params/models/Category.ts +++ b/samples/openapi3/client/petstore/typescript/builds/object_params/models/Category.ts @@ -38,7 +38,7 @@ export class Category { static getAttributeTypeMap() { return Category.attributeTypeMap; } - + public constructor() { } } diff --git a/samples/openapi3/client/petstore/typescript/builds/object_params/models/ObjectSerializer.ts b/samples/openapi3/client/petstore/typescript/builds/object_params/models/ObjectSerializer.ts index 57201945fc82ab76a2efe5213bdf2765e9926fab..a1bdc64ae8eab6017d102d6a188f2c106dd57fb2 100644 --- a/samples/openapi3/client/petstore/typescript/builds/object_params/models/ObjectSerializer.ts +++ b/samples/openapi3/client/petstore/typescript/builds/object_params/models/ObjectSerializer.ts @@ -29,7 +29,7 @@ const supportedMediaTypes: { [mediaType: string]: number } = { "application/octet-stream": 0 } - + let enumsMap: Set<string> = new Set<string>([ "OrderStatusEnum", "PetStatusEnum", @@ -112,7 +112,7 @@ export class ObjectSerializer { if (!typeMap[type]) { // in case we dont know the type return data; } - + // Get the actual type of this object type = this.findCorrectType(data, type); diff --git a/samples/openapi3/client/petstore/typescript/builds/object_params/models/Order.ts b/samples/openapi3/client/petstore/typescript/builds/object_params/models/Order.ts index 291018b9e06563b040685658af17629e07d4262a..a2f84555ff1e4ce41215fe3c3eac97d7d4dc0e52 100644 --- a/samples/openapi3/client/petstore/typescript/builds/object_params/models/Order.ts +++ b/samples/openapi3/client/petstore/typescript/builds/object_params/models/Order.ts @@ -69,7 +69,7 @@ export class Order { static getAttributeTypeMap() { return Order.attributeTypeMap; } - + public constructor() { } } diff --git a/samples/openapi3/client/petstore/typescript/builds/object_params/models/Pet.ts b/samples/openapi3/client/petstore/typescript/builds/object_params/models/Pet.ts index 77a3490297db9ae17d8e5aaf1da01f646a33461b..6b191ad8d707e93d24f224c9d32f0ad55f6b95cf 100644 --- a/samples/openapi3/client/petstore/typescript/builds/object_params/models/Pet.ts +++ b/samples/openapi3/client/petstore/typescript/builds/object_params/models/Pet.ts @@ -71,7 +71,7 @@ export class Pet { static getAttributeTypeMap() { return Pet.attributeTypeMap; } - + public constructor() { } } diff --git a/samples/openapi3/client/petstore/typescript/builds/object_params/models/Tag.ts b/samples/openapi3/client/petstore/typescript/builds/object_params/models/Tag.ts index ce2a0e6d2a8095b193b7d95f2dee702097d97b62..8c4f6967b9a12cfebf599da81f738a08ea536dad 100644 --- a/samples/openapi3/client/petstore/typescript/builds/object_params/models/Tag.ts +++ b/samples/openapi3/client/petstore/typescript/builds/object_params/models/Tag.ts @@ -38,7 +38,7 @@ export class Tag { static getAttributeTypeMap() { return Tag.attributeTypeMap; } - + public constructor() { } } diff --git a/samples/openapi3/client/petstore/typescript/builds/object_params/models/User.ts b/samples/openapi3/client/petstore/typescript/builds/object_params/models/User.ts index 049af95de37011711309f5fb6bbc88e642b9f308..68528ad3c9e08414c25983ba8b35324408ac609a 100644 --- a/samples/openapi3/client/petstore/typescript/builds/object_params/models/User.ts +++ b/samples/openapi3/client/petstore/typescript/builds/object_params/models/User.ts @@ -83,7 +83,7 @@ export class User { static getAttributeTypeMap() { return User.attributeTypeMap; } - + public constructor() { } } diff --git a/samples/openapi3/client/petstore/typescript/builds/object_params/tsconfig.json b/samples/openapi3/client/petstore/typescript/builds/object_params/tsconfig.json index 091137b0e376e0daad4bced388f27342e48f0981..3ada5c62a9f295876ac024d0ca094a08459d6aab 100644 --- a/samples/openapi3/client/petstore/typescript/builds/object_params/tsconfig.json +++ b/samples/openapi3/client/petstore/typescript/builds/object_params/tsconfig.json @@ -6,7 +6,7 @@ "module": "commonjs", "moduleResolution": "node", "declaration": true, - + /* Additional Checks */ "noUnusedLocals": false, /* Report errors on unused locals. */ // TODO: reenable (unused imports!) "noUnusedParameters": false, /* Report errors on unused parameters. */ // TODO: set to true again diff --git a/samples/openapi3/client/petstore/typescript/builds/object_params/types/ObservableAPI.ts b/samples/openapi3/client/petstore/typescript/builds/object_params/types/ObservableAPI.ts index 488915f871ba4ce55760aac83ecf50039bd1253b..4207fd5102dc2f031b0f11060bc35e19c98ee6ba 100644 --- a/samples/openapi3/client/petstore/typescript/builds/object_params/types/ObservableAPI.ts +++ b/samples/openapi3/client/petstore/typescript/builds/object_params/types/ObservableAPI.ts @@ -48,7 +48,7 @@ export class ObservablePetApi { return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.addPet(rsp))); })); } - + /** * Deletes a pet * @param petId Pet id to delete @@ -72,7 +72,7 @@ export class ObservablePetApi { return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.deletePet(rsp))); })); } - + /** * Multiple status values can be provided with comma separated strings * Finds Pets by status @@ -96,7 +96,7 @@ export class ObservablePetApi { return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.findPetsByStatus(rsp))); })); } - + /** * Multiple tags can be provided with comma separated strings. Use tag1, tag2, tag3 for testing. * Finds Pets by tags @@ -120,7 +120,7 @@ export class ObservablePetApi { return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.findPetsByTags(rsp))); })); } - + /** * Returns a single pet * Find pet by ID @@ -144,7 +144,7 @@ export class ObservablePetApi { return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.getPetById(rsp))); })); } - + /** * Update an existing pet * @param pet Pet object that needs to be added to the store @@ -167,7 +167,7 @@ export class ObservablePetApi { return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.updatePet(rsp))); })); } - + /** * Updates a pet in the store with form data * @param petId ID of pet that needs to be updated @@ -192,7 +192,7 @@ export class ObservablePetApi { return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.updatePetWithForm(rsp))); })); } - + /** * uploads an image * @param petId ID of pet to update @@ -217,7 +217,7 @@ export class ObservablePetApi { return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.uploadFile(rsp))); })); } - + } import { StoreApiRequestFactory, StoreApiResponseProcessor} from "../apis/StoreApi"; @@ -259,7 +259,7 @@ export class ObservableStoreApi { return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.deleteOrder(rsp))); })); } - + /** * Returns a map of status codes to quantities * Returns pet inventories by status @@ -282,7 +282,7 @@ export class ObservableStoreApi { return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.getInventory(rsp))); })); } - + /** * For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions * Find purchase order by ID @@ -306,7 +306,7 @@ export class ObservableStoreApi { return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.getOrderById(rsp))); })); } - + /** * Place an order for a pet * @param order order placed for purchasing the pet @@ -329,7 +329,7 @@ export class ObservableStoreApi { return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.placeOrder(rsp))); })); } - + } import { UserApiRequestFactory, UserApiResponseProcessor} from "../apis/UserApi"; @@ -371,7 +371,7 @@ export class ObservableUserApi { return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.createUser(rsp))); })); } - + /** * Creates list of users with given input array * @param user List of user object @@ -394,7 +394,7 @@ export class ObservableUserApi { return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.createUsersWithArrayInput(rsp))); })); } - + /** * Creates list of users with given input array * @param user List of user object @@ -417,7 +417,7 @@ export class ObservableUserApi { return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.createUsersWithListInput(rsp))); })); } - + /** * This can only be done by the logged in user. * Delete user @@ -441,7 +441,7 @@ export class ObservableUserApi { return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.deleteUser(rsp))); })); } - + /** * Get user by user name * @param username The name that needs to be fetched. Use user1 for testing. @@ -464,7 +464,7 @@ export class ObservableUserApi { return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.getUserByName(rsp))); })); } - + /** * Logs user into the system * @param username The user name for login @@ -488,7 +488,7 @@ export class ObservableUserApi { return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.loginUser(rsp))); })); } - + /** * Logs out current logged in user session */ @@ -510,7 +510,7 @@ export class ObservableUserApi { return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.logoutUser(rsp))); })); } - + /** * This can only be done by the logged in user. * Updated user @@ -535,5 +535,5 @@ export class ObservableUserApi { return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.updateUser(rsp))); })); } - + } diff --git a/samples/openapi3/client/petstore/typescript/builds/object_params/util.ts b/samples/openapi3/client/petstore/typescript/builds/object_params/util.ts index 07317f5828bca21fb4082107e7c4c228d23dce5f..484e07cdffaa1515941a2b6db37c12bf19a844b9 100644 --- a/samples/openapi3/client/petstore/typescript/builds/object_params/util.ts +++ b/samples/openapi3/client/petstore/typescript/builds/object_params/util.ts @@ -1,6 +1,6 @@ /** * Returns if a specific http code is in a given code range - * where the code range is defined as a combination of digits + * where the code range is defined as a combination of digits * and "X" (the letter X) with a length of 3 * * @param codeRange string with length 3 consisting of digits and "X" (the letter X) diff --git a/samples/schema/petstore/ktorm/docs/ApiResponse.md b/samples/schema/petstore/ktorm/docs/ApiResponse.md index c928cf6529cc2f8bd3cce9776928deef82809e81..33b451cae906f22ffa9b29bed68c6fef2a903e61 100644 --- a/samples/schema/petstore/ktorm/docs/ApiResponse.md +++ b/samples/schema/petstore/ktorm/docs/ApiResponse.md @@ -1,5 +1,5 @@ -# Table `ApiResponse` +# Table `ApiResponse` (mapped from: ApiResponse) ## Properties diff --git a/samples/schema/petstore/ktorm/docs/Category.md b/samples/schema/petstore/ktorm/docs/Category.md index 99d06e8a4680c577ad4b85e94a6651fea1e4a2bb..2e83eb88012f0d6798f0409adc283461208d843e 100644 --- a/samples/schema/petstore/ktorm/docs/Category.md +++ b/samples/schema/petstore/ktorm/docs/Category.md @@ -1,5 +1,5 @@ -# Table `Category` +# Table `Category` (mapped from: Category) ## Properties diff --git a/samples/schema/petstore/ktorm/docs/Order.md b/samples/schema/petstore/ktorm/docs/Order.md index 8811e4b881436d77a03c9612d67011b75db5ee26..543c400247459115476a4a21ab1f1fb4374eebf0 100644 --- a/samples/schema/petstore/ktorm/docs/Order.md +++ b/samples/schema/petstore/ktorm/docs/Order.md @@ -1,5 +1,5 @@ -# Table `Order` +# Table `Order` (mapped from: Order) ## Properties diff --git a/samples/schema/petstore/ktorm/docs/Pet.md b/samples/schema/petstore/ktorm/docs/Pet.md index ce3effd4afa8c67a728b868d9887fb1d685a4865..28a16b88cc82bfb0ef3d93e778ef4b6df5591c1f 100644 --- a/samples/schema/petstore/ktorm/docs/Pet.md +++ b/samples/schema/petstore/ktorm/docs/Pet.md @@ -1,5 +1,5 @@ -# Table `Pet` +# Table `Pet` (mapped from: Pet) ## Properties diff --git a/samples/schema/petstore/ktorm/docs/Tag.md b/samples/schema/petstore/ktorm/docs/Tag.md index ec4d5b8d24dd135ba789562e2bf8c4a6968c9745..51a1da4a143442fe42bf94472d9787180e3beade 100644 --- a/samples/schema/petstore/ktorm/docs/Tag.md +++ b/samples/schema/petstore/ktorm/docs/Tag.md @@ -1,5 +1,5 @@ -# Table `Tag` +# Table `Tag` (mapped from: Tag) ## Properties diff --git a/samples/schema/petstore/ktorm/docs/User.md b/samples/schema/petstore/ktorm/docs/User.md index e1844a245d0211bc2547656e24b33761aaf7d00d..943792b9657ffedb94fb2ed00c129ced5673bcb0 100644 --- a/samples/schema/petstore/ktorm/docs/User.md +++ b/samples/schema/petstore/ktorm/docs/User.md @@ -1,5 +1,5 @@ -# Table `User` +# Table `User` (mapped from: User) ## Properties diff --git a/samples/schema/petstore/wsdl-schema/jaxb-customization.xml b/samples/schema/petstore/wsdl-schema/jaxb-customization.xml index 0ae533ccb5f40afcb9d2dfde2b567461fadedf29..55c9a393ccc4d668b5cd542411a8ad27fc925d82 100644 --- a/samples/schema/petstore/wsdl-schema/jaxb-customization.xml +++ b/samples/schema/petstore/wsdl-schema/jaxb-customization.xml @@ -8,7 +8,7 @@ <enableWrapperStyle>true</enableWrapperStyle> <enableAsyncMapping>false</enableAsyncMapping> - + <jaxws:bindings node="xsd:simpleType[@name='Status']"> <jaxb:typesafeEnumClass> <jaxb:typesafeEnumMember value="placed" name="PLACED" /> @@ -23,6 +23,6 @@ <jaxb:typesafeEnumMember value="sold" name="SOLD" /> </jaxb:typesafeEnumClass> </jaxws:bindings> - - + + </jaxws:bindings> diff --git a/samples/schema/petstore/wsdl-schema/service.wsdl b/samples/schema/petstore/wsdl-schema/service.wsdl index 68ce9752d7241a4afeb7b0fcea383c4636d79268..10545307a016dcbf5338d8881dc9b31df12adfab 100644 --- a/samples/schema/petstore/wsdl-schema/service.wsdl +++ b/samples/schema/petstore/wsdl-schema/service.wsdl @@ -570,7 +570,7 @@ </xs:element> </xs:sequence> </xs:complexType> - </xs:schema> + </xs:schema> </types> <message name="PostPet_RequestMessage"> <part name="PostPet_RequestMessage" element="schemas:PostPet_RequestMessage" /> diff --git a/samples/server/petstore/aspnetcore-3.0/src/Org.OpenAPITools/Attributes/ValidateModelStateAttribute.cs b/samples/server/petstore/aspnetcore-3.0/src/Org.OpenAPITools/Attributes/ValidateModelStateAttribute.cs index f388cfdf983143450f89668001b602b790bf41ec..3ed1bc5b5ab922eae1244da76b971c92a088b530 100644 --- a/samples/server/petstore/aspnetcore-3.0/src/Org.OpenAPITools/Attributes/ValidateModelStateAttribute.cs +++ b/samples/server/petstore/aspnetcore-3.0/src/Org.OpenAPITools/Attributes/ValidateModelStateAttribute.cs @@ -26,7 +26,7 @@ namespace Org.OpenAPITools.Attributes { object args = null; if (context.ActionArguments.ContainsKey(parameter.Name)) - { + { args = context.ActionArguments[parameter.Name]; } diff --git a/samples/server/petstore/aspnetcore-3.0/src/Org.OpenAPITools/Authentication/ApiAuthentication.cs b/samples/server/petstore/aspnetcore-3.0/src/Org.OpenAPITools/Authentication/ApiAuthentication.cs index 92b2512e441dcc8a1ac031e91918653dd5f8f84a..85be8593fce76353b85300ad3327945e36d4b526 100644 --- a/samples/server/petstore/aspnetcore-3.0/src/Org.OpenAPITools/Authentication/ApiAuthentication.cs +++ b/samples/server/petstore/aspnetcore-3.0/src/Org.OpenAPITools/Authentication/ApiAuthentication.cs @@ -60,4 +60,3 @@ namespace Org.OpenAPITools.Authentication } } } - diff --git a/samples/server/petstore/aspnetcore-3.0/src/Org.OpenAPITools/Controllers/PetApi.cs b/samples/server/petstore/aspnetcore-3.0/src/Org.OpenAPITools/Controllers/PetApi.cs index e23c800b82b3f94ee6778152593a0a78a3d392fb..bb9dd57afda444fe9f1bb312ba3b920f4e8bd42f 100644 --- a/samples/server/petstore/aspnetcore-3.0/src/Org.OpenAPITools/Controllers/PetApi.cs +++ b/samples/server/petstore/aspnetcore-3.0/src/Org.OpenAPITools/Controllers/PetApi.cs @@ -39,7 +39,7 @@ namespace Org.OpenAPITools.Controllers [ValidateModelState] [SwaggerOperation("AddPet")] public virtual IActionResult AddPet([FromBody]Pet body) - { + { //TODO: Uncomment the next line to return response 405 or use other options such as return this.NotFound(), return this.BadRequest(..), ... // return StatusCode(405); @@ -58,7 +58,7 @@ namespace Org.OpenAPITools.Controllers [ValidateModelState] [SwaggerOperation("DeletePet")] public virtual IActionResult DeletePet([FromRoute (Name = "petId")][Required]long petId, [FromHeader]string apiKey) - { + { //TODO: Uncomment the next line to return response 400 or use other options such as return this.NotFound(), return this.BadRequest(..), ... // return StatusCode(400); @@ -79,7 +79,7 @@ namespace Org.OpenAPITools.Controllers [SwaggerOperation("FindPetsByStatus")] [SwaggerResponse(statusCode: 200, type: typeof(List<Pet>), description: "successful operation")] public virtual IActionResult FindPetsByStatus([FromQuery (Name = "status")][Required()]List<string> status) - { + { //TODO: Uncomment the next line to return response 200 or use other options such as return this.NotFound(), return this.BadRequest(..), ... // return StatusCode(200, default(List<Pet>)); @@ -110,7 +110,7 @@ namespace Org.OpenAPITools.Controllers [SwaggerResponse(statusCode: 200, type: typeof(List<Pet>), description: "successful operation")] [Obsolete] public virtual IActionResult FindPetsByTags([FromQuery (Name = "tags")][Required()]List<string> tags) - { + { //TODO: Uncomment the next line to return response 200 or use other options such as return this.NotFound(), return this.BadRequest(..), ... // return StatusCode(200, default(List<Pet>)); @@ -142,7 +142,7 @@ namespace Org.OpenAPITools.Controllers [SwaggerOperation("GetPetById")] [SwaggerResponse(statusCode: 200, type: typeof(Pet), description: "successful operation")] public virtual IActionResult GetPetById([FromRoute (Name = "petId")][Required]long petId) - { + { //TODO: Uncomment the next line to return response 200 or use other options such as return this.NotFound(), return this.BadRequest(..), ... // return StatusCode(200, default(Pet)); @@ -174,7 +174,7 @@ namespace Org.OpenAPITools.Controllers [ValidateModelState] [SwaggerOperation("UpdatePet")] public virtual IActionResult UpdatePet([FromBody]Pet body) - { + { //TODO: Uncomment the next line to return response 400 or use other options such as return this.NotFound(), return this.BadRequest(..), ... // return StatusCode(400); @@ -199,7 +199,7 @@ namespace Org.OpenAPITools.Controllers [ValidateModelState] [SwaggerOperation("UpdatePetWithForm")] public virtual IActionResult UpdatePetWithForm([FromRoute (Name = "petId")][Required]long petId, [FromForm (Name = "name")]string name, [FromForm (Name = "status")]string status) - { + { //TODO: Uncomment the next line to return response 405 or use other options such as return this.NotFound(), return this.BadRequest(..), ... // return StatusCode(405); @@ -221,7 +221,7 @@ namespace Org.OpenAPITools.Controllers [SwaggerOperation("UploadFile")] [SwaggerResponse(statusCode: 200, type: typeof(ApiResponse), description: "successful operation")] public virtual IActionResult UploadFile([FromRoute (Name = "petId")][Required]long petId, [FromForm (Name = "additionalMetadata")]string additionalMetadata, IFormFile file) - { + { //TODO: Uncomment the next line to return response 200 or use other options such as return this.NotFound(), return this.BadRequest(..), ... // return StatusCode(200, default(ApiResponse)); diff --git a/samples/server/petstore/aspnetcore-3.0/src/Org.OpenAPITools/Controllers/StoreApi.cs b/samples/server/petstore/aspnetcore-3.0/src/Org.OpenAPITools/Controllers/StoreApi.cs index 79c62f5c672d584b57dacec422546ef44e7f82e7..bbb05474e15e5c6de107dd00d2ea0ef8abb98be9 100644 --- a/samples/server/petstore/aspnetcore-3.0/src/Org.OpenAPITools/Controllers/StoreApi.cs +++ b/samples/server/petstore/aspnetcore-3.0/src/Org.OpenAPITools/Controllers/StoreApi.cs @@ -40,7 +40,7 @@ namespace Org.OpenAPITools.Controllers [ValidateModelState] [SwaggerOperation("DeleteOrder")] public virtual IActionResult DeleteOrder([FromRoute (Name = "orderId")][Required]string orderId) - { + { //TODO: Uncomment the next line to return response 400 or use other options such as return this.NotFound(), return this.BadRequest(..), ... // return StatusCode(400); @@ -62,7 +62,7 @@ namespace Org.OpenAPITools.Controllers [SwaggerOperation("GetInventory")] [SwaggerResponse(statusCode: 200, type: typeof(Dictionary<string, int>), description: "successful operation")] public virtual IActionResult GetInventory() - { + { //TODO: Uncomment the next line to return response 200 or use other options such as return this.NotFound(), return this.BadRequest(..), ... // return StatusCode(200, default(Dictionary<string, int>)); @@ -89,7 +89,7 @@ namespace Org.OpenAPITools.Controllers [SwaggerOperation("GetOrderById")] [SwaggerResponse(statusCode: 200, type: typeof(Order), description: "successful operation")] public virtual IActionResult GetOrderById([FromRoute (Name = "orderId")][Required][Range(1, 5)]long orderId) - { + { //TODO: Uncomment the next line to return response 200 or use other options such as return this.NotFound(), return this.BadRequest(..), ... // return StatusCode(200, default(Order)); @@ -120,7 +120,7 @@ namespace Org.OpenAPITools.Controllers [SwaggerOperation("PlaceOrder")] [SwaggerResponse(statusCode: 200, type: typeof(Order), description: "successful operation")] public virtual IActionResult PlaceOrder([FromBody]Order body) - { + { //TODO: Uncomment the next line to return response 200 or use other options such as return this.NotFound(), return this.BadRequest(..), ... // return StatusCode(200, default(Order)); diff --git a/samples/server/petstore/aspnetcore-3.0/src/Org.OpenAPITools/Controllers/UserApi.cs b/samples/server/petstore/aspnetcore-3.0/src/Org.OpenAPITools/Controllers/UserApi.cs index 17fdac817ad8db9a8770dc62490295c9b3cb14da..6e4c255f4a1f439633bda2bc18e7f4155b3f5720 100644 --- a/samples/server/petstore/aspnetcore-3.0/src/Org.OpenAPITools/Controllers/UserApi.cs +++ b/samples/server/petstore/aspnetcore-3.0/src/Org.OpenAPITools/Controllers/UserApi.cs @@ -39,7 +39,7 @@ namespace Org.OpenAPITools.Controllers [ValidateModelState] [SwaggerOperation("CreateUser")] public virtual IActionResult CreateUser([FromBody]User body) - { + { //TODO: Uncomment the next line to return response 0 or use other options such as return this.NotFound(), return this.BadRequest(..), ... // return StatusCode(0); @@ -57,7 +57,7 @@ namespace Org.OpenAPITools.Controllers [ValidateModelState] [SwaggerOperation("CreateUsersWithArrayInput")] public virtual IActionResult CreateUsersWithArrayInput([FromBody]List<User> body) - { + { //TODO: Uncomment the next line to return response 0 or use other options such as return this.NotFound(), return this.BadRequest(..), ... // return StatusCode(0); @@ -75,7 +75,7 @@ namespace Org.OpenAPITools.Controllers [ValidateModelState] [SwaggerOperation("CreateUsersWithListInput")] public virtual IActionResult CreateUsersWithListInput([FromBody]List<User> body) - { + { //TODO: Uncomment the next line to return response 0 or use other options such as return this.NotFound(), return this.BadRequest(..), ... // return StatusCode(0); @@ -95,7 +95,7 @@ namespace Org.OpenAPITools.Controllers [ValidateModelState] [SwaggerOperation("DeleteUser")] public virtual IActionResult DeleteUser([FromRoute (Name = "username")][Required]string username) - { + { //TODO: Uncomment the next line to return response 400 or use other options such as return this.NotFound(), return this.BadRequest(..), ... // return StatusCode(400); @@ -118,7 +118,7 @@ namespace Org.OpenAPITools.Controllers [SwaggerOperation("GetUserByName")] [SwaggerResponse(statusCode: 200, type: typeof(User), description: "successful operation")] public virtual IActionResult GetUserByName([FromRoute (Name = "username")][Required]string username) - { + { //TODO: Uncomment the next line to return response 200 or use other options such as return this.NotFound(), return this.BadRequest(..), ... // return StatusCode(200, default(User)); @@ -150,7 +150,7 @@ namespace Org.OpenAPITools.Controllers [SwaggerOperation("LoginUser")] [SwaggerResponse(statusCode: 200, type: typeof(string), description: "successful operation")] public virtual IActionResult LoginUser([FromQuery (Name = "username")][Required()]string username, [FromQuery (Name = "password")][Required()]string password) - { + { //TODO: Uncomment the next line to return response 200 or use other options such as return this.NotFound(), return this.BadRequest(..), ... // return StatusCode(200, default(string)); @@ -174,7 +174,7 @@ namespace Org.OpenAPITools.Controllers [ValidateModelState] [SwaggerOperation("LogoutUser")] public virtual IActionResult LogoutUser() - { + { //TODO: Uncomment the next line to return response 0 or use other options such as return this.NotFound(), return this.BadRequest(..), ... // return StatusCode(0); @@ -195,7 +195,7 @@ namespace Org.OpenAPITools.Controllers [ValidateModelState] [SwaggerOperation("UpdateUser")] public virtual IActionResult UpdateUser([FromRoute (Name = "username")][Required]string username, [FromBody]User body) - { + { //TODO: Uncomment the next line to return response 400 or use other options such as return this.NotFound(), return this.BadRequest(..), ... // return StatusCode(400); diff --git a/samples/server/petstore/aspnetcore-3.0/src/Org.OpenAPITools/Filters/GeneratePathParamsValidationFilter.cs b/samples/server/petstore/aspnetcore-3.0/src/Org.OpenAPITools/Filters/GeneratePathParamsValidationFilter.cs index 5c43aa69751dd6c3505c3107659f3327183ac399..65d9d4695208b86d5d6eaea1c4d61ac548420b57 100644 --- a/samples/server/petstore/aspnetcore-3.0/src/Org.OpenAPITools/Filters/GeneratePathParamsValidationFilter.cs +++ b/samples/server/petstore/aspnetcore-3.0/src/Org.OpenAPITools/Filters/GeneratePathParamsValidationFilter.cs @@ -95,4 +95,3 @@ namespace Org.OpenAPITools.Filters } } } - diff --git a/samples/server/petstore/aspnetcore-3.0/src/Org.OpenAPITools/Formatters/InputFormatterStream.cs b/samples/server/petstore/aspnetcore-3.0/src/Org.OpenAPITools/Formatters/InputFormatterStream.cs index d810926aa9e7ebed6da7909b0fb5811c82a94fd3..9c437b1919a62660f7ed7e764fb3449ab9f1a04f 100644 --- a/samples/server/petstore/aspnetcore-3.0/src/Org.OpenAPITools/Formatters/InputFormatterStream.cs +++ b/samples/server/petstore/aspnetcore-3.0/src/Org.OpenAPITools/Formatters/InputFormatterStream.cs @@ -13,7 +13,7 @@ namespace Org.OpenAPITools.Formatters SupportedMediaTypes.Add("application/octet-stream"); SupportedMediaTypes.Add("image/jpeg"); } - + protected override bool CanReadType(Type type) { if (type == typeof(Stream)) diff --git a/samples/server/petstore/aspnetcore-3.1/src/Org.OpenAPITools/Attributes/ValidateModelStateAttribute.cs b/samples/server/petstore/aspnetcore-3.1/src/Org.OpenAPITools/Attributes/ValidateModelStateAttribute.cs index f388cfdf983143450f89668001b602b790bf41ec..3ed1bc5b5ab922eae1244da76b971c92a088b530 100644 --- a/samples/server/petstore/aspnetcore-3.1/src/Org.OpenAPITools/Attributes/ValidateModelStateAttribute.cs +++ b/samples/server/petstore/aspnetcore-3.1/src/Org.OpenAPITools/Attributes/ValidateModelStateAttribute.cs @@ -26,7 +26,7 @@ namespace Org.OpenAPITools.Attributes { object args = null; if (context.ActionArguments.ContainsKey(parameter.Name)) - { + { args = context.ActionArguments[parameter.Name]; } diff --git a/samples/server/petstore/aspnetcore-3.1/src/Org.OpenAPITools/Authentication/ApiAuthentication.cs b/samples/server/petstore/aspnetcore-3.1/src/Org.OpenAPITools/Authentication/ApiAuthentication.cs index 92b2512e441dcc8a1ac031e91918653dd5f8f84a..85be8593fce76353b85300ad3327945e36d4b526 100644 --- a/samples/server/petstore/aspnetcore-3.1/src/Org.OpenAPITools/Authentication/ApiAuthentication.cs +++ b/samples/server/petstore/aspnetcore-3.1/src/Org.OpenAPITools/Authentication/ApiAuthentication.cs @@ -60,4 +60,3 @@ namespace Org.OpenAPITools.Authentication } } } - diff --git a/samples/server/petstore/aspnetcore-3.1/src/Org.OpenAPITools/Controllers/PetApi.cs b/samples/server/petstore/aspnetcore-3.1/src/Org.OpenAPITools/Controllers/PetApi.cs index e23c800b82b3f94ee6778152593a0a78a3d392fb..bb9dd57afda444fe9f1bb312ba3b920f4e8bd42f 100644 --- a/samples/server/petstore/aspnetcore-3.1/src/Org.OpenAPITools/Controllers/PetApi.cs +++ b/samples/server/petstore/aspnetcore-3.1/src/Org.OpenAPITools/Controllers/PetApi.cs @@ -39,7 +39,7 @@ namespace Org.OpenAPITools.Controllers [ValidateModelState] [SwaggerOperation("AddPet")] public virtual IActionResult AddPet([FromBody]Pet body) - { + { //TODO: Uncomment the next line to return response 405 or use other options such as return this.NotFound(), return this.BadRequest(..), ... // return StatusCode(405); @@ -58,7 +58,7 @@ namespace Org.OpenAPITools.Controllers [ValidateModelState] [SwaggerOperation("DeletePet")] public virtual IActionResult DeletePet([FromRoute (Name = "petId")][Required]long petId, [FromHeader]string apiKey) - { + { //TODO: Uncomment the next line to return response 400 or use other options such as return this.NotFound(), return this.BadRequest(..), ... // return StatusCode(400); @@ -79,7 +79,7 @@ namespace Org.OpenAPITools.Controllers [SwaggerOperation("FindPetsByStatus")] [SwaggerResponse(statusCode: 200, type: typeof(List<Pet>), description: "successful operation")] public virtual IActionResult FindPetsByStatus([FromQuery (Name = "status")][Required()]List<string> status) - { + { //TODO: Uncomment the next line to return response 200 or use other options such as return this.NotFound(), return this.BadRequest(..), ... // return StatusCode(200, default(List<Pet>)); @@ -110,7 +110,7 @@ namespace Org.OpenAPITools.Controllers [SwaggerResponse(statusCode: 200, type: typeof(List<Pet>), description: "successful operation")] [Obsolete] public virtual IActionResult FindPetsByTags([FromQuery (Name = "tags")][Required()]List<string> tags) - { + { //TODO: Uncomment the next line to return response 200 or use other options such as return this.NotFound(), return this.BadRequest(..), ... // return StatusCode(200, default(List<Pet>)); @@ -142,7 +142,7 @@ namespace Org.OpenAPITools.Controllers [SwaggerOperation("GetPetById")] [SwaggerResponse(statusCode: 200, type: typeof(Pet), description: "successful operation")] public virtual IActionResult GetPetById([FromRoute (Name = "petId")][Required]long petId) - { + { //TODO: Uncomment the next line to return response 200 or use other options such as return this.NotFound(), return this.BadRequest(..), ... // return StatusCode(200, default(Pet)); @@ -174,7 +174,7 @@ namespace Org.OpenAPITools.Controllers [ValidateModelState] [SwaggerOperation("UpdatePet")] public virtual IActionResult UpdatePet([FromBody]Pet body) - { + { //TODO: Uncomment the next line to return response 400 or use other options such as return this.NotFound(), return this.BadRequest(..), ... // return StatusCode(400); @@ -199,7 +199,7 @@ namespace Org.OpenAPITools.Controllers [ValidateModelState] [SwaggerOperation("UpdatePetWithForm")] public virtual IActionResult UpdatePetWithForm([FromRoute (Name = "petId")][Required]long petId, [FromForm (Name = "name")]string name, [FromForm (Name = "status")]string status) - { + { //TODO: Uncomment the next line to return response 405 or use other options such as return this.NotFound(), return this.BadRequest(..), ... // return StatusCode(405); @@ -221,7 +221,7 @@ namespace Org.OpenAPITools.Controllers [SwaggerOperation("UploadFile")] [SwaggerResponse(statusCode: 200, type: typeof(ApiResponse), description: "successful operation")] public virtual IActionResult UploadFile([FromRoute (Name = "petId")][Required]long petId, [FromForm (Name = "additionalMetadata")]string additionalMetadata, IFormFile file) - { + { //TODO: Uncomment the next line to return response 200 or use other options such as return this.NotFound(), return this.BadRequest(..), ... // return StatusCode(200, default(ApiResponse)); diff --git a/samples/server/petstore/aspnetcore-3.1/src/Org.OpenAPITools/Controllers/StoreApi.cs b/samples/server/petstore/aspnetcore-3.1/src/Org.OpenAPITools/Controllers/StoreApi.cs index 79c62f5c672d584b57dacec422546ef44e7f82e7..bbb05474e15e5c6de107dd00d2ea0ef8abb98be9 100644 --- a/samples/server/petstore/aspnetcore-3.1/src/Org.OpenAPITools/Controllers/StoreApi.cs +++ b/samples/server/petstore/aspnetcore-3.1/src/Org.OpenAPITools/Controllers/StoreApi.cs @@ -40,7 +40,7 @@ namespace Org.OpenAPITools.Controllers [ValidateModelState] [SwaggerOperation("DeleteOrder")] public virtual IActionResult DeleteOrder([FromRoute (Name = "orderId")][Required]string orderId) - { + { //TODO: Uncomment the next line to return response 400 or use other options such as return this.NotFound(), return this.BadRequest(..), ... // return StatusCode(400); @@ -62,7 +62,7 @@ namespace Org.OpenAPITools.Controllers [SwaggerOperation("GetInventory")] [SwaggerResponse(statusCode: 200, type: typeof(Dictionary<string, int>), description: "successful operation")] public virtual IActionResult GetInventory() - { + { //TODO: Uncomment the next line to return response 200 or use other options such as return this.NotFound(), return this.BadRequest(..), ... // return StatusCode(200, default(Dictionary<string, int>)); @@ -89,7 +89,7 @@ namespace Org.OpenAPITools.Controllers [SwaggerOperation("GetOrderById")] [SwaggerResponse(statusCode: 200, type: typeof(Order), description: "successful operation")] public virtual IActionResult GetOrderById([FromRoute (Name = "orderId")][Required][Range(1, 5)]long orderId) - { + { //TODO: Uncomment the next line to return response 200 or use other options such as return this.NotFound(), return this.BadRequest(..), ... // return StatusCode(200, default(Order)); @@ -120,7 +120,7 @@ namespace Org.OpenAPITools.Controllers [SwaggerOperation("PlaceOrder")] [SwaggerResponse(statusCode: 200, type: typeof(Order), description: "successful operation")] public virtual IActionResult PlaceOrder([FromBody]Order body) - { + { //TODO: Uncomment the next line to return response 200 or use other options such as return this.NotFound(), return this.BadRequest(..), ... // return StatusCode(200, default(Order)); diff --git a/samples/server/petstore/aspnetcore-3.1/src/Org.OpenAPITools/Controllers/UserApi.cs b/samples/server/petstore/aspnetcore-3.1/src/Org.OpenAPITools/Controllers/UserApi.cs index 17fdac817ad8db9a8770dc62490295c9b3cb14da..6e4c255f4a1f439633bda2bc18e7f4155b3f5720 100644 --- a/samples/server/petstore/aspnetcore-3.1/src/Org.OpenAPITools/Controllers/UserApi.cs +++ b/samples/server/petstore/aspnetcore-3.1/src/Org.OpenAPITools/Controllers/UserApi.cs @@ -39,7 +39,7 @@ namespace Org.OpenAPITools.Controllers [ValidateModelState] [SwaggerOperation("CreateUser")] public virtual IActionResult CreateUser([FromBody]User body) - { + { //TODO: Uncomment the next line to return response 0 or use other options such as return this.NotFound(), return this.BadRequest(..), ... // return StatusCode(0); @@ -57,7 +57,7 @@ namespace Org.OpenAPITools.Controllers [ValidateModelState] [SwaggerOperation("CreateUsersWithArrayInput")] public virtual IActionResult CreateUsersWithArrayInput([FromBody]List<User> body) - { + { //TODO: Uncomment the next line to return response 0 or use other options such as return this.NotFound(), return this.BadRequest(..), ... // return StatusCode(0); @@ -75,7 +75,7 @@ namespace Org.OpenAPITools.Controllers [ValidateModelState] [SwaggerOperation("CreateUsersWithListInput")] public virtual IActionResult CreateUsersWithListInput([FromBody]List<User> body) - { + { //TODO: Uncomment the next line to return response 0 or use other options such as return this.NotFound(), return this.BadRequest(..), ... // return StatusCode(0); @@ -95,7 +95,7 @@ namespace Org.OpenAPITools.Controllers [ValidateModelState] [SwaggerOperation("DeleteUser")] public virtual IActionResult DeleteUser([FromRoute (Name = "username")][Required]string username) - { + { //TODO: Uncomment the next line to return response 400 or use other options such as return this.NotFound(), return this.BadRequest(..), ... // return StatusCode(400); @@ -118,7 +118,7 @@ namespace Org.OpenAPITools.Controllers [SwaggerOperation("GetUserByName")] [SwaggerResponse(statusCode: 200, type: typeof(User), description: "successful operation")] public virtual IActionResult GetUserByName([FromRoute (Name = "username")][Required]string username) - { + { //TODO: Uncomment the next line to return response 200 or use other options such as return this.NotFound(), return this.BadRequest(..), ... // return StatusCode(200, default(User)); @@ -150,7 +150,7 @@ namespace Org.OpenAPITools.Controllers [SwaggerOperation("LoginUser")] [SwaggerResponse(statusCode: 200, type: typeof(string), description: "successful operation")] public virtual IActionResult LoginUser([FromQuery (Name = "username")][Required()]string username, [FromQuery (Name = "password")][Required()]string password) - { + { //TODO: Uncomment the next line to return response 200 or use other options such as return this.NotFound(), return this.BadRequest(..), ... // return StatusCode(200, default(string)); @@ -174,7 +174,7 @@ namespace Org.OpenAPITools.Controllers [ValidateModelState] [SwaggerOperation("LogoutUser")] public virtual IActionResult LogoutUser() - { + { //TODO: Uncomment the next line to return response 0 or use other options such as return this.NotFound(), return this.BadRequest(..), ... // return StatusCode(0); @@ -195,7 +195,7 @@ namespace Org.OpenAPITools.Controllers [ValidateModelState] [SwaggerOperation("UpdateUser")] public virtual IActionResult UpdateUser([FromRoute (Name = "username")][Required]string username, [FromBody]User body) - { + { //TODO: Uncomment the next line to return response 400 or use other options such as return this.NotFound(), return this.BadRequest(..), ... // return StatusCode(400); diff --git a/samples/server/petstore/aspnetcore-3.1/src/Org.OpenAPITools/Filters/GeneratePathParamsValidationFilter.cs b/samples/server/petstore/aspnetcore-3.1/src/Org.OpenAPITools/Filters/GeneratePathParamsValidationFilter.cs index 5c43aa69751dd6c3505c3107659f3327183ac399..65d9d4695208b86d5d6eaea1c4d61ac548420b57 100644 --- a/samples/server/petstore/aspnetcore-3.1/src/Org.OpenAPITools/Filters/GeneratePathParamsValidationFilter.cs +++ b/samples/server/petstore/aspnetcore-3.1/src/Org.OpenAPITools/Filters/GeneratePathParamsValidationFilter.cs @@ -95,4 +95,3 @@ namespace Org.OpenAPITools.Filters } } } - diff --git a/samples/server/petstore/aspnetcore-3.1/src/Org.OpenAPITools/Formatters/InputFormatterStream.cs b/samples/server/petstore/aspnetcore-3.1/src/Org.OpenAPITools/Formatters/InputFormatterStream.cs index d810926aa9e7ebed6da7909b0fb5811c82a94fd3..9c437b1919a62660f7ed7e764fb3449ab9f1a04f 100644 --- a/samples/server/petstore/aspnetcore-3.1/src/Org.OpenAPITools/Formatters/InputFormatterStream.cs +++ b/samples/server/petstore/aspnetcore-3.1/src/Org.OpenAPITools/Formatters/InputFormatterStream.cs @@ -13,7 +13,7 @@ namespace Org.OpenAPITools.Formatters SupportedMediaTypes.Add("application/octet-stream"); SupportedMediaTypes.Add("image/jpeg"); } - + protected override bool CanReadType(Type type) { if (type == typeof(Stream)) diff --git a/samples/server/petstore/aspnetcore-5.0/src/Org.OpenAPITools/Attributes/ValidateModelStateAttribute.cs b/samples/server/petstore/aspnetcore-5.0/src/Org.OpenAPITools/Attributes/ValidateModelStateAttribute.cs index f388cfdf983143450f89668001b602b790bf41ec..3ed1bc5b5ab922eae1244da76b971c92a088b530 100644 --- a/samples/server/petstore/aspnetcore-5.0/src/Org.OpenAPITools/Attributes/ValidateModelStateAttribute.cs +++ b/samples/server/petstore/aspnetcore-5.0/src/Org.OpenAPITools/Attributes/ValidateModelStateAttribute.cs @@ -26,7 +26,7 @@ namespace Org.OpenAPITools.Attributes { object args = null; if (context.ActionArguments.ContainsKey(parameter.Name)) - { + { args = context.ActionArguments[parameter.Name]; } diff --git a/samples/server/petstore/aspnetcore-5.0/src/Org.OpenAPITools/Authentication/ApiAuthentication.cs b/samples/server/petstore/aspnetcore-5.0/src/Org.OpenAPITools/Authentication/ApiAuthentication.cs index 92b2512e441dcc8a1ac031e91918653dd5f8f84a..85be8593fce76353b85300ad3327945e36d4b526 100644 --- a/samples/server/petstore/aspnetcore-5.0/src/Org.OpenAPITools/Authentication/ApiAuthentication.cs +++ b/samples/server/petstore/aspnetcore-5.0/src/Org.OpenAPITools/Authentication/ApiAuthentication.cs @@ -60,4 +60,3 @@ namespace Org.OpenAPITools.Authentication } } } - diff --git a/samples/server/petstore/aspnetcore-5.0/src/Org.OpenAPITools/Controllers/PetApi.cs b/samples/server/petstore/aspnetcore-5.0/src/Org.OpenAPITools/Controllers/PetApi.cs index 68541eb890f450510e455d60335bf12093d53aff..982c1a6011dff9aaebf2bd75d606a8d197779963 100644 --- a/samples/server/petstore/aspnetcore-5.0/src/Org.OpenAPITools/Controllers/PetApi.cs +++ b/samples/server/petstore/aspnetcore-5.0/src/Org.OpenAPITools/Controllers/PetApi.cs @@ -41,7 +41,7 @@ namespace Org.OpenAPITools.Controllers [SwaggerOperation("AddPet")] [SwaggerResponse(statusCode: 200, type: typeof(Pet), description: "successful operation")] public virtual IActionResult AddPet([FromBody]Pet pet) - { + { //TODO: Uncomment the next line to return response 200 or use other options such as return this.NotFound(), return this.BadRequest(..), ... // return StatusCode(200, default(Pet)); @@ -69,7 +69,7 @@ namespace Org.OpenAPITools.Controllers [ValidateModelState] [SwaggerOperation("DeletePet")] public virtual IActionResult DeletePet([FromRoute (Name = "petId")][Required]long petId, [FromHeader]string apiKey) - { + { //TODO: Uncomment the next line to return response 400 or use other options such as return this.NotFound(), return this.BadRequest(..), ... // return StatusCode(400); @@ -90,7 +90,7 @@ namespace Org.OpenAPITools.Controllers [SwaggerOperation("FindPetsByStatus")] [SwaggerResponse(statusCode: 200, type: typeof(List<Pet>), description: "successful operation")] public virtual IActionResult FindPetsByStatus([FromQuery (Name = "status")][Required()]List<string> status) - { + { //TODO: Uncomment the next line to return response 200 or use other options such as return this.NotFound(), return this.BadRequest(..), ... // return StatusCode(200, default(List<Pet>)); @@ -121,7 +121,7 @@ namespace Org.OpenAPITools.Controllers [SwaggerResponse(statusCode: 200, type: typeof(List<Pet>), description: "successful operation")] [Obsolete] public virtual IActionResult FindPetsByTags([FromQuery (Name = "tags")][Required()]List<string> tags) - { + { //TODO: Uncomment the next line to return response 200 or use other options such as return this.NotFound(), return this.BadRequest(..), ... // return StatusCode(200, default(List<Pet>)); @@ -153,7 +153,7 @@ namespace Org.OpenAPITools.Controllers [SwaggerOperation("GetPetById")] [SwaggerResponse(statusCode: 200, type: typeof(Pet), description: "successful operation")] public virtual IActionResult GetPetById([FromRoute (Name = "petId")][Required]long petId) - { + { //TODO: Uncomment the next line to return response 200 or use other options such as return this.NotFound(), return this.BadRequest(..), ... // return StatusCode(200, default(Pet)); @@ -187,7 +187,7 @@ namespace Org.OpenAPITools.Controllers [SwaggerOperation("UpdatePet")] [SwaggerResponse(statusCode: 200, type: typeof(Pet), description: "successful operation")] public virtual IActionResult UpdatePet([FromBody]Pet pet) - { + { //TODO: Uncomment the next line to return response 200 or use other options such as return this.NotFound(), return this.BadRequest(..), ... // return StatusCode(200, default(Pet)); @@ -221,7 +221,7 @@ namespace Org.OpenAPITools.Controllers [ValidateModelState] [SwaggerOperation("UpdatePetWithForm")] public virtual IActionResult UpdatePetWithForm([FromRoute (Name = "petId")][Required]long petId, [FromForm (Name = "name")]string name, [FromForm (Name = "status")]string status) - { + { //TODO: Uncomment the next line to return response 405 or use other options such as return this.NotFound(), return this.BadRequest(..), ... // return StatusCode(405); @@ -243,7 +243,7 @@ namespace Org.OpenAPITools.Controllers [SwaggerOperation("UploadFile")] [SwaggerResponse(statusCode: 200, type: typeof(ApiResponse), description: "successful operation")] public virtual IActionResult UploadFile([FromRoute (Name = "petId")][Required]long petId, [FromForm (Name = "additionalMetadata")]string additionalMetadata, IFormFile file) - { + { //TODO: Uncomment the next line to return response 200 or use other options such as return this.NotFound(), return this.BadRequest(..), ... // return StatusCode(200, default(ApiResponse)); diff --git a/samples/server/petstore/aspnetcore-5.0/src/Org.OpenAPITools/Controllers/StoreApi.cs b/samples/server/petstore/aspnetcore-5.0/src/Org.OpenAPITools/Controllers/StoreApi.cs index 431fccf190573e23a1fdc901b39955766fb5fb77..2077313f7dda9286d3f11691af5827bc8cf1c01c 100644 --- a/samples/server/petstore/aspnetcore-5.0/src/Org.OpenAPITools/Controllers/StoreApi.cs +++ b/samples/server/petstore/aspnetcore-5.0/src/Org.OpenAPITools/Controllers/StoreApi.cs @@ -40,7 +40,7 @@ namespace Org.OpenAPITools.Controllers [ValidateModelState] [SwaggerOperation("DeleteOrder")] public virtual IActionResult DeleteOrder([FromRoute (Name = "orderId")][Required]string orderId) - { + { //TODO: Uncomment the next line to return response 400 or use other options such as return this.NotFound(), return this.BadRequest(..), ... // return StatusCode(400); @@ -62,7 +62,7 @@ namespace Org.OpenAPITools.Controllers [SwaggerOperation("GetInventory")] [SwaggerResponse(statusCode: 200, type: typeof(Dictionary<string, int>), description: "successful operation")] public virtual IActionResult GetInventory() - { + { //TODO: Uncomment the next line to return response 200 or use other options such as return this.NotFound(), return this.BadRequest(..), ... // return StatusCode(200, default(Dictionary<string, int>)); @@ -89,7 +89,7 @@ namespace Org.OpenAPITools.Controllers [SwaggerOperation("GetOrderById")] [SwaggerResponse(statusCode: 200, type: typeof(Order), description: "successful operation")] public virtual IActionResult GetOrderById([FromRoute (Name = "orderId")][Required][Range(1, 5)]long orderId) - { + { //TODO: Uncomment the next line to return response 200 or use other options such as return this.NotFound(), return this.BadRequest(..), ... // return StatusCode(200, default(Order)); @@ -121,7 +121,7 @@ namespace Org.OpenAPITools.Controllers [SwaggerOperation("PlaceOrder")] [SwaggerResponse(statusCode: 200, type: typeof(Order), description: "successful operation")] public virtual IActionResult PlaceOrder([FromBody]Order order) - { + { //TODO: Uncomment the next line to return response 200 or use other options such as return this.NotFound(), return this.BadRequest(..), ... // return StatusCode(200, default(Order)); diff --git a/samples/server/petstore/aspnetcore-5.0/src/Org.OpenAPITools/Controllers/UserApi.cs b/samples/server/petstore/aspnetcore-5.0/src/Org.OpenAPITools/Controllers/UserApi.cs index 406c969ffb2441d493df4269d2c99883119650d4..6d7094c81a9d2868dd1450be5b71f34f82e8cb29 100644 --- a/samples/server/petstore/aspnetcore-5.0/src/Org.OpenAPITools/Controllers/UserApi.cs +++ b/samples/server/petstore/aspnetcore-5.0/src/Org.OpenAPITools/Controllers/UserApi.cs @@ -41,7 +41,7 @@ namespace Org.OpenAPITools.Controllers [ValidateModelState] [SwaggerOperation("CreateUser")] public virtual IActionResult CreateUser([FromBody]User user) - { + { //TODO: Uncomment the next line to return response 0 or use other options such as return this.NotFound(), return this.BadRequest(..), ... // return StatusCode(0); @@ -61,7 +61,7 @@ namespace Org.OpenAPITools.Controllers [ValidateModelState] [SwaggerOperation("CreateUsersWithArrayInput")] public virtual IActionResult CreateUsersWithArrayInput([FromBody]List<User> user) - { + { //TODO: Uncomment the next line to return response 0 or use other options such as return this.NotFound(), return this.BadRequest(..), ... // return StatusCode(0); @@ -81,7 +81,7 @@ namespace Org.OpenAPITools.Controllers [ValidateModelState] [SwaggerOperation("CreateUsersWithListInput")] public virtual IActionResult CreateUsersWithListInput([FromBody]List<User> user) - { + { //TODO: Uncomment the next line to return response 0 or use other options such as return this.NotFound(), return this.BadRequest(..), ... // return StatusCode(0); @@ -102,7 +102,7 @@ namespace Org.OpenAPITools.Controllers [ValidateModelState] [SwaggerOperation("DeleteUser")] public virtual IActionResult DeleteUser([FromRoute (Name = "username")][Required]string username) - { + { //TODO: Uncomment the next line to return response 400 or use other options such as return this.NotFound(), return this.BadRequest(..), ... // return StatusCode(400); @@ -125,7 +125,7 @@ namespace Org.OpenAPITools.Controllers [SwaggerOperation("GetUserByName")] [SwaggerResponse(statusCode: 200, type: typeof(User), description: "successful operation")] public virtual IActionResult GetUserByName([FromRoute (Name = "username")][Required]string username) - { + { //TODO: Uncomment the next line to return response 200 or use other options such as return this.NotFound(), return this.BadRequest(..), ... // return StatusCode(200, default(User)); @@ -157,7 +157,7 @@ namespace Org.OpenAPITools.Controllers [SwaggerOperation("LoginUser")] [SwaggerResponse(statusCode: 200, type: typeof(string), description: "successful operation")] public virtual IActionResult LoginUser([FromQuery (Name = "username")][Required()][RegularExpression("^[a-zA-Z0-9]+[a-zA-Z0-9\\.\\-_]*[a-zA-Z0-9]+$")]string username, [FromQuery (Name = "password")][Required()]string password) - { + { //TODO: Uncomment the next line to return response 200 or use other options such as return this.NotFound(), return this.BadRequest(..), ... // return StatusCode(200, default(string)); @@ -182,7 +182,7 @@ namespace Org.OpenAPITools.Controllers [ValidateModelState] [SwaggerOperation("LogoutUser")] public virtual IActionResult LogoutUser() - { + { //TODO: Uncomment the next line to return response 0 or use other options such as return this.NotFound(), return this.BadRequest(..), ... // return StatusCode(0); @@ -205,7 +205,7 @@ namespace Org.OpenAPITools.Controllers [ValidateModelState] [SwaggerOperation("UpdateUser")] public virtual IActionResult UpdateUser([FromRoute (Name = "username")][Required]string username, [FromBody]User user) - { + { //TODO: Uncomment the next line to return response 400 or use other options such as return this.NotFound(), return this.BadRequest(..), ... // return StatusCode(400); diff --git a/samples/server/petstore/aspnetcore-5.0/src/Org.OpenAPITools/Filters/GeneratePathParamsValidationFilter.cs b/samples/server/petstore/aspnetcore-5.0/src/Org.OpenAPITools/Filters/GeneratePathParamsValidationFilter.cs index 5c43aa69751dd6c3505c3107659f3327183ac399..65d9d4695208b86d5d6eaea1c4d61ac548420b57 100644 --- a/samples/server/petstore/aspnetcore-5.0/src/Org.OpenAPITools/Filters/GeneratePathParamsValidationFilter.cs +++ b/samples/server/petstore/aspnetcore-5.0/src/Org.OpenAPITools/Filters/GeneratePathParamsValidationFilter.cs @@ -95,4 +95,3 @@ namespace Org.OpenAPITools.Filters } } } - diff --git a/samples/server/petstore/aspnetcore-5.0/src/Org.OpenAPITools/Formatters/InputFormatterStream.cs b/samples/server/petstore/aspnetcore-5.0/src/Org.OpenAPITools/Formatters/InputFormatterStream.cs index d810926aa9e7ebed6da7909b0fb5811c82a94fd3..9c437b1919a62660f7ed7e764fb3449ab9f1a04f 100644 --- a/samples/server/petstore/aspnetcore-5.0/src/Org.OpenAPITools/Formatters/InputFormatterStream.cs +++ b/samples/server/petstore/aspnetcore-5.0/src/Org.OpenAPITools/Formatters/InputFormatterStream.cs @@ -13,7 +13,7 @@ namespace Org.OpenAPITools.Formatters SupportedMediaTypes.Add("application/octet-stream"); SupportedMediaTypes.Add("image/jpeg"); } - + protected override bool CanReadType(Type type) { if (type == typeof(Stream)) diff --git a/samples/server/petstore/aspnetcore/src/Org.OpenAPITools/Attributes/ValidateModelStateAttribute.cs b/samples/server/petstore/aspnetcore/src/Org.OpenAPITools/Attributes/ValidateModelStateAttribute.cs index f388cfdf983143450f89668001b602b790bf41ec..3ed1bc5b5ab922eae1244da76b971c92a088b530 100644 --- a/samples/server/petstore/aspnetcore/src/Org.OpenAPITools/Attributes/ValidateModelStateAttribute.cs +++ b/samples/server/petstore/aspnetcore/src/Org.OpenAPITools/Attributes/ValidateModelStateAttribute.cs @@ -26,7 +26,7 @@ namespace Org.OpenAPITools.Attributes { object args = null; if (context.ActionArguments.ContainsKey(parameter.Name)) - { + { args = context.ActionArguments[parameter.Name]; } diff --git a/samples/server/petstore/aspnetcore/src/Org.OpenAPITools/Authentication/ApiAuthentication.cs b/samples/server/petstore/aspnetcore/src/Org.OpenAPITools/Authentication/ApiAuthentication.cs index 605abe35f6bb264dd4b96d16e63cb74420beaffd..eabb6bf586d8c6223bb4cb94b938ed1cd8300700 100644 --- a/samples/server/petstore/aspnetcore/src/Org.OpenAPITools/Authentication/ApiAuthentication.cs +++ b/samples/server/petstore/aspnetcore/src/Org.OpenAPITools/Authentication/ApiAuthentication.cs @@ -61,4 +61,3 @@ namespace Org.OpenAPITools.Authentication } } } - diff --git a/samples/server/petstore/aspnetcore/src/Org.OpenAPITools/Controllers/PetApi.cs b/samples/server/petstore/aspnetcore/src/Org.OpenAPITools/Controllers/PetApi.cs index 733404e0bdc9518cc3c1370ddb469a4566229c75..a97f11089446bf1ce69631041bda15236acc2928 100644 --- a/samples/server/petstore/aspnetcore/src/Org.OpenAPITools/Controllers/PetApi.cs +++ b/samples/server/petstore/aspnetcore/src/Org.OpenAPITools/Controllers/PetApi.cs @@ -39,7 +39,7 @@ namespace Org.OpenAPITools.Controllers [ValidateModelState] [SwaggerOperation("AddPet")] public virtual IActionResult AddPet([FromBody]Pet body) - { + { //TODO: Uncomment the next line to return response 405 or use other options such as return this.NotFound(), return this.BadRequest(..), ... // return StatusCode(405); @@ -58,7 +58,7 @@ namespace Org.OpenAPITools.Controllers [ValidateModelState] [SwaggerOperation("DeletePet")] public virtual IActionResult DeletePet([FromRoute (Name = "petId")][Required]long petId, [FromHeader]string apiKey) - { + { //TODO: Uncomment the next line to return response 400 or use other options such as return this.NotFound(), return this.BadRequest(..), ... // return StatusCode(400); @@ -79,7 +79,7 @@ namespace Org.OpenAPITools.Controllers [SwaggerOperation("FindPetsByStatus")] [SwaggerResponse(statusCode: 200, type: typeof(List<Pet>), description: "successful operation")] public virtual IActionResult FindPetsByStatus([FromQuery (Name = "status")][Required()]List<string> status) - { + { //TODO: Uncomment the next line to return response 200 or use other options such as return this.NotFound(), return this.BadRequest(..), ... // return StatusCode(200, default(List<Pet>)); @@ -110,7 +110,7 @@ namespace Org.OpenAPITools.Controllers [SwaggerResponse(statusCode: 200, type: typeof(List<Pet>), description: "successful operation")] [Obsolete] public virtual IActionResult FindPetsByTags([FromQuery (Name = "tags")][Required()]List<string> tags) - { + { //TODO: Uncomment the next line to return response 200 or use other options such as return this.NotFound(), return this.BadRequest(..), ... // return StatusCode(200, default(List<Pet>)); @@ -142,7 +142,7 @@ namespace Org.OpenAPITools.Controllers [SwaggerOperation("GetPetById")] [SwaggerResponse(statusCode: 200, type: typeof(Pet), description: "successful operation")] public virtual IActionResult GetPetById([FromRoute (Name = "petId")][Required]long petId) - { + { //TODO: Uncomment the next line to return response 200 or use other options such as return this.NotFound(), return this.BadRequest(..), ... // return StatusCode(200, default(Pet)); @@ -174,7 +174,7 @@ namespace Org.OpenAPITools.Controllers [ValidateModelState] [SwaggerOperation("UpdatePet")] public virtual IActionResult UpdatePet([FromBody]Pet body) - { + { //TODO: Uncomment the next line to return response 400 or use other options such as return this.NotFound(), return this.BadRequest(..), ... // return StatusCode(400); @@ -199,7 +199,7 @@ namespace Org.OpenAPITools.Controllers [ValidateModelState] [SwaggerOperation("UpdatePetWithForm")] public virtual IActionResult UpdatePetWithForm([FromRoute (Name = "petId")][Required]long petId, [FromForm (Name = "name")]string name, [FromForm (Name = "status")]string status) - { + { //TODO: Uncomment the next line to return response 405 or use other options such as return this.NotFound(), return this.BadRequest(..), ... // return StatusCode(405); @@ -221,7 +221,7 @@ namespace Org.OpenAPITools.Controllers [SwaggerOperation("UploadFile")] [SwaggerResponse(statusCode: 200, type: typeof(ApiResponse), description: "successful operation")] public virtual IActionResult UploadFile([FromRoute (Name = "petId")][Required]long petId, [FromForm (Name = "additionalMetadata")]string additionalMetadata, IFormFile file) - { + { //TODO: Uncomment the next line to return response 200 or use other options such as return this.NotFound(), return this.BadRequest(..), ... // return StatusCode(200, default(ApiResponse)); diff --git a/samples/server/petstore/aspnetcore/src/Org.OpenAPITools/Controllers/StoreApi.cs b/samples/server/petstore/aspnetcore/src/Org.OpenAPITools/Controllers/StoreApi.cs index 4503e177b9c9f8a577627f73f9f44b852a605b0a..9ce84426e2925ccb0c4889c8acd4d8c1a589a56c 100644 --- a/samples/server/petstore/aspnetcore/src/Org.OpenAPITools/Controllers/StoreApi.cs +++ b/samples/server/petstore/aspnetcore/src/Org.OpenAPITools/Controllers/StoreApi.cs @@ -40,7 +40,7 @@ namespace Org.OpenAPITools.Controllers [ValidateModelState] [SwaggerOperation("DeleteOrder")] public virtual IActionResult DeleteOrder([FromRoute (Name = "orderId")][Required]string orderId) - { + { //TODO: Uncomment the next line to return response 400 or use other options such as return this.NotFound(), return this.BadRequest(..), ... // return StatusCode(400); @@ -62,7 +62,7 @@ namespace Org.OpenAPITools.Controllers [SwaggerOperation("GetInventory")] [SwaggerResponse(statusCode: 200, type: typeof(Dictionary<string, int>), description: "successful operation")] public virtual IActionResult GetInventory() - { + { //TODO: Uncomment the next line to return response 200 or use other options such as return this.NotFound(), return this.BadRequest(..), ... // return StatusCode(200, default(Dictionary<string, int>)); @@ -89,7 +89,7 @@ namespace Org.OpenAPITools.Controllers [SwaggerOperation("GetOrderById")] [SwaggerResponse(statusCode: 200, type: typeof(Order), description: "successful operation")] public virtual IActionResult GetOrderById([FromRoute (Name = "orderId")][Required][Range(1, 5)]long orderId) - { + { //TODO: Uncomment the next line to return response 200 or use other options such as return this.NotFound(), return this.BadRequest(..), ... // return StatusCode(200, default(Order)); @@ -120,7 +120,7 @@ namespace Org.OpenAPITools.Controllers [SwaggerOperation("PlaceOrder")] [SwaggerResponse(statusCode: 200, type: typeof(Order), description: "successful operation")] public virtual IActionResult PlaceOrder([FromBody]Order body) - { + { //TODO: Uncomment the next line to return response 200 or use other options such as return this.NotFound(), return this.BadRequest(..), ... // return StatusCode(200, default(Order)); diff --git a/samples/server/petstore/aspnetcore/src/Org.OpenAPITools/Controllers/UserApi.cs b/samples/server/petstore/aspnetcore/src/Org.OpenAPITools/Controllers/UserApi.cs index 06ca8107d072084685405861592669be3d1e36e5..6669f0418ceec9f0299df7e4d3cb20a301a2fe50 100644 --- a/samples/server/petstore/aspnetcore/src/Org.OpenAPITools/Controllers/UserApi.cs +++ b/samples/server/petstore/aspnetcore/src/Org.OpenAPITools/Controllers/UserApi.cs @@ -39,7 +39,7 @@ namespace Org.OpenAPITools.Controllers [ValidateModelState] [SwaggerOperation("CreateUser")] public virtual IActionResult CreateUser([FromBody]User body) - { + { //TODO: Uncomment the next line to return response 0 or use other options such as return this.NotFound(), return this.BadRequest(..), ... // return StatusCode(0); @@ -57,7 +57,7 @@ namespace Org.OpenAPITools.Controllers [ValidateModelState] [SwaggerOperation("CreateUsersWithArrayInput")] public virtual IActionResult CreateUsersWithArrayInput([FromBody]List<User> body) - { + { //TODO: Uncomment the next line to return response 0 or use other options such as return this.NotFound(), return this.BadRequest(..), ... // return StatusCode(0); @@ -75,7 +75,7 @@ namespace Org.OpenAPITools.Controllers [ValidateModelState] [SwaggerOperation("CreateUsersWithListInput")] public virtual IActionResult CreateUsersWithListInput([FromBody]List<User> body) - { + { //TODO: Uncomment the next line to return response 0 or use other options such as return this.NotFound(), return this.BadRequest(..), ... // return StatusCode(0); @@ -95,7 +95,7 @@ namespace Org.OpenAPITools.Controllers [ValidateModelState] [SwaggerOperation("DeleteUser")] public virtual IActionResult DeleteUser([FromRoute (Name = "username")][Required]string username) - { + { //TODO: Uncomment the next line to return response 400 or use other options such as return this.NotFound(), return this.BadRequest(..), ... // return StatusCode(400); @@ -118,7 +118,7 @@ namespace Org.OpenAPITools.Controllers [SwaggerOperation("GetUserByName")] [SwaggerResponse(statusCode: 200, type: typeof(User), description: "successful operation")] public virtual IActionResult GetUserByName([FromRoute (Name = "username")][Required]string username) - { + { //TODO: Uncomment the next line to return response 200 or use other options such as return this.NotFound(), return this.BadRequest(..), ... // return StatusCode(200, default(User)); @@ -150,7 +150,7 @@ namespace Org.OpenAPITools.Controllers [SwaggerOperation("LoginUser")] [SwaggerResponse(statusCode: 200, type: typeof(string), description: "successful operation")] public virtual IActionResult LoginUser([FromQuery (Name = "username")][Required()]string username, [FromQuery (Name = "password")][Required()]string password) - { + { //TODO: Uncomment the next line to return response 200 or use other options such as return this.NotFound(), return this.BadRequest(..), ... // return StatusCode(200, default(string)); @@ -174,7 +174,7 @@ namespace Org.OpenAPITools.Controllers [ValidateModelState] [SwaggerOperation("LogoutUser")] public virtual IActionResult LogoutUser() - { + { //TODO: Uncomment the next line to return response 0 or use other options such as return this.NotFound(), return this.BadRequest(..), ... // return StatusCode(0); @@ -195,7 +195,7 @@ namespace Org.OpenAPITools.Controllers [ValidateModelState] [SwaggerOperation("UpdateUser")] public virtual IActionResult UpdateUser([FromRoute (Name = "username")][Required]string username, [FromBody]User body) - { + { //TODO: Uncomment the next line to return response 400 or use other options such as return this.NotFound(), return this.BadRequest(..), ... // return StatusCode(400); diff --git a/samples/server/petstore/aspnetcore/src/Org.OpenAPITools/Filters/GeneratePathParamsValidationFilter.cs b/samples/server/petstore/aspnetcore/src/Org.OpenAPITools/Filters/GeneratePathParamsValidationFilter.cs index fc3811ea0573c731910a5a1a646c07e1cf0b52ad..d358fd6523e611f9a0626c11a0459a88eca1873f 100644 --- a/samples/server/petstore/aspnetcore/src/Org.OpenAPITools/Filters/GeneratePathParamsValidationFilter.cs +++ b/samples/server/petstore/aspnetcore/src/Org.OpenAPITools/Filters/GeneratePathParamsValidationFilter.cs @@ -94,4 +94,3 @@ namespace Org.OpenAPITools.Filters } } } - diff --git a/samples/server/petstore/aspnetcore/src/Org.OpenAPITools/Formatters/InputFormatterStream.cs b/samples/server/petstore/aspnetcore/src/Org.OpenAPITools/Formatters/InputFormatterStream.cs index d810926aa9e7ebed6da7909b0fb5811c82a94fd3..9c437b1919a62660f7ed7e764fb3449ab9f1a04f 100644 --- a/samples/server/petstore/aspnetcore/src/Org.OpenAPITools/Formatters/InputFormatterStream.cs +++ b/samples/server/petstore/aspnetcore/src/Org.OpenAPITools/Formatters/InputFormatterStream.cs @@ -13,7 +13,7 @@ namespace Org.OpenAPITools.Formatters SupportedMediaTypes.Add("application/octet-stream"); SupportedMediaTypes.Add("image/jpeg"); } - + protected override bool CanReadType(Type type) { if (type == typeof(Stream)) diff --git a/samples/server/petstore/cpp-pistache/main-api-server.cpp b/samples/server/petstore/cpp-pistache/main-api-server.cpp index 00799608e73de9077ae42d607aae60199705153b..214a459fd250619e3784ff2e192af4601a3322cb 100644 --- a/samples/server/petstore/cpp-pistache/main-api-server.cpp +++ b/samples/server/petstore/cpp-pistache/main-api-server.cpp @@ -92,4 +92,3 @@ int main() { httpEndpoint->shutdown(); } - diff --git a/samples/server/petstore/cpp-pistache/model/Helpers.cpp b/samples/server/petstore/cpp-pistache/model/Helpers.cpp index cfac2d78986a03c6b8f7a9217f3af618dc3a5998..fd8b17b0d7edcd3709c3640a22977261f99bf5db 100644 --- a/samples/server/petstore/cpp-pistache/model/Helpers.cpp +++ b/samples/server/petstore/cpp-pistache/model/Helpers.cpp @@ -21,7 +21,7 @@ const std::regex regexRfc3339_date_time( ); -namespace +namespace { // Determine if given year is a leap year // See RFC 3339, Appendix C https://tools.ietf.org/html/rfc3339#appendix-C diff --git a/samples/server/petstore/cpp-qt-qhttpengine-server/server/src/handlers/OAIApiRouter.h b/samples/server/petstore/cpp-qt-qhttpengine-server/server/src/handlers/OAIApiRouter.h index fbfe6d9e916ccb50ccc585141a2d53667bf46b80..5b8133a7b76a6d1d757d8df0ef101965ee9be448 100644 --- a/samples/server/petstore/cpp-qt-qhttpengine-server/server/src/handlers/OAIApiRouter.h +++ b/samples/server/petstore/cpp-qt-qhttpengine-server/server/src/handlers/OAIApiRouter.h @@ -103,7 +103,7 @@ private : } return QStringLiteral(""); } - + inline QRegularExpressionMatch getRequestMatch(QString serverTemplatePath, QString requestPath){ QRegularExpression parExpr( R"(\{([^\/\\s]+)\})" ); serverTemplatePath.replace( parExpr, R"((?<\1>[^\/\s]+))" ); diff --git a/samples/server/petstore/cpp-qt-qhttpengine-server/server/src/handlers/OAIPetApiHandler.cpp b/samples/server/petstore/cpp-qt-qhttpengine-server/server/src/handlers/OAIPetApiHandler.cpp index ff42a83e79bb88fdaea1d2d976ac4bf6d111fd4e..f2442d871c0fb3e938d6802aa96bae823ae5141b 100644 --- a/samples/server/petstore/cpp-qt-qhttpengine-server/server/src/handlers/OAIPetApiHandler.cpp +++ b/samples/server/petstore/cpp-qt-qhttpengine-server/server/src/handlers/OAIPetApiHandler.cpp @@ -31,79 +31,79 @@ OAIPetApiHandler::~OAIPetApiHandler(){ void OAIPetApiHandler::addPet(OAIPet body) { Q_UNUSED(body); auto reqObj = qobject_cast<OAIPetApiRequest*>(sender()); - if( reqObj != nullptr ) - { + if( reqObj != nullptr ) + { reqObj->addPetResponse(); - } + } } void OAIPetApiHandler::deletePet(qint64 pet_id, QString api_key) { Q_UNUSED(pet_id); Q_UNUSED(api_key); auto reqObj = qobject_cast<OAIPetApiRequest*>(sender()); - if( reqObj != nullptr ) - { + if( reqObj != nullptr ) + { reqObj->deletePetResponse(); - } + } } void OAIPetApiHandler::findPetsByStatus(QList<QString> status) { Q_UNUSED(status); auto reqObj = qobject_cast<OAIPetApiRequest*>(sender()); - if( reqObj != nullptr ) - { + if( reqObj != nullptr ) + { QList<OAIPet> res; reqObj->findPetsByStatusResponse(res); - } + } } void OAIPetApiHandler::findPetsByTags(QList<QString> tags) { Q_UNUSED(tags); auto reqObj = qobject_cast<OAIPetApiRequest*>(sender()); - if( reqObj != nullptr ) - { + if( reqObj != nullptr ) + { QList<OAIPet> res; reqObj->findPetsByTagsResponse(res); - } + } } void OAIPetApiHandler::getPetById(qint64 pet_id) { Q_UNUSED(pet_id); auto reqObj = qobject_cast<OAIPetApiRequest*>(sender()); - if( reqObj != nullptr ) - { + if( reqObj != nullptr ) + { OAIPet res; reqObj->getPetByIdResponse(res); - } + } } void OAIPetApiHandler::updatePet(OAIPet body) { Q_UNUSED(body); auto reqObj = qobject_cast<OAIPetApiRequest*>(sender()); - if( reqObj != nullptr ) - { + if( reqObj != nullptr ) + { reqObj->updatePetResponse(); - } + } } void OAIPetApiHandler::updatePetWithForm(qint64 pet_id, QString name, QString status) { Q_UNUSED(pet_id); Q_UNUSED(name); Q_UNUSED(status); auto reqObj = qobject_cast<OAIPetApiRequest*>(sender()); - if( reqObj != nullptr ) - { + if( reqObj != nullptr ) + { reqObj->updatePetWithFormResponse(); - } + } } void OAIPetApiHandler::uploadFile(qint64 pet_id, QString additional_metadata, OAIHttpFileElement file) { Q_UNUSED(pet_id); Q_UNUSED(additional_metadata); Q_UNUSED(file); auto reqObj = qobject_cast<OAIPetApiRequest*>(sender()); - if( reqObj != nullptr ) - { + if( reqObj != nullptr ) + { OAIApiResponse res; reqObj->uploadFileResponse(res); - } + } } diff --git a/samples/server/petstore/cpp-qt-qhttpengine-server/server/src/handlers/OAIPetApiHandler.h b/samples/server/petstore/cpp-qt-qhttpengine-server/server/src/handlers/OAIPetApiHandler.h index 4bc371414335af8edcfe3227f1f6bfe77a2051f5..df992c4c99bb9b885319025ab98c32f6a1af4de2 100644 --- a/samples/server/petstore/cpp-qt-qhttpengine-server/server/src/handlers/OAIPetApiHandler.h +++ b/samples/server/petstore/cpp-qt-qhttpengine-server/server/src/handlers/OAIPetApiHandler.h @@ -24,7 +24,7 @@ namespace OpenAPI { class OAIPetApiHandler : public QObject { Q_OBJECT - + public: OAIPetApiHandler(); virtual ~OAIPetApiHandler(); diff --git a/samples/server/petstore/cpp-qt-qhttpengine-server/server/src/handlers/OAIStoreApiHandler.cpp b/samples/server/petstore/cpp-qt-qhttpengine-server/server/src/handlers/OAIStoreApiHandler.cpp index 05c12c4fdbce2b9d033953d84b9f7f45190f1e00..c2e800bf7dfe2b8eef1338384949c0691ed2d86d 100644 --- a/samples/server/petstore/cpp-qt-qhttpengine-server/server/src/handlers/OAIStoreApiHandler.cpp +++ b/samples/server/petstore/cpp-qt-qhttpengine-server/server/src/handlers/OAIStoreApiHandler.cpp @@ -31,37 +31,37 @@ OAIStoreApiHandler::~OAIStoreApiHandler(){ void OAIStoreApiHandler::deleteOrder(QString order_id) { Q_UNUSED(order_id); auto reqObj = qobject_cast<OAIStoreApiRequest*>(sender()); - if( reqObj != nullptr ) - { + if( reqObj != nullptr ) + { reqObj->deleteOrderResponse(); - } + } } void OAIStoreApiHandler::getInventory() { auto reqObj = qobject_cast<OAIStoreApiRequest*>(sender()); - if( reqObj != nullptr ) - { + if( reqObj != nullptr ) + { QMap<QString, qint32> res; reqObj->getInventoryResponse(res); - } + } } void OAIStoreApiHandler::getOrderById(qint64 order_id) { Q_UNUSED(order_id); auto reqObj = qobject_cast<OAIStoreApiRequest*>(sender()); - if( reqObj != nullptr ) - { + if( reqObj != nullptr ) + { OAIOrder res; reqObj->getOrderByIdResponse(res); - } + } } void OAIStoreApiHandler::placeOrder(OAIOrder body) { Q_UNUSED(body); auto reqObj = qobject_cast<OAIStoreApiRequest*>(sender()); - if( reqObj != nullptr ) - { + if( reqObj != nullptr ) + { OAIOrder res; reqObj->placeOrderResponse(res); - } + } } diff --git a/samples/server/petstore/cpp-qt-qhttpengine-server/server/src/handlers/OAIStoreApiHandler.h b/samples/server/petstore/cpp-qt-qhttpengine-server/server/src/handlers/OAIStoreApiHandler.h index d6ffe1da900b8b7f56cfe8c56f514e72b18ed6cd..084028eae63d01f1627d05e92591fe547b0c582b 100644 --- a/samples/server/petstore/cpp-qt-qhttpengine-server/server/src/handlers/OAIStoreApiHandler.h +++ b/samples/server/petstore/cpp-qt-qhttpengine-server/server/src/handlers/OAIStoreApiHandler.h @@ -23,7 +23,7 @@ namespace OpenAPI { class OAIStoreApiHandler : public QObject { Q_OBJECT - + public: OAIStoreApiHandler(); virtual ~OAIStoreApiHandler(); diff --git a/samples/server/petstore/cpp-qt-qhttpengine-server/server/src/handlers/OAIUserApiHandler.cpp b/samples/server/petstore/cpp-qt-qhttpengine-server/server/src/handlers/OAIUserApiHandler.cpp index 77594058ccdda8fad3a121b48b922f5433ba0433..e32dacf936d6a853235928f3d4e82da5ebf0815d 100644 --- a/samples/server/petstore/cpp-qt-qhttpengine-server/server/src/handlers/OAIUserApiHandler.cpp +++ b/samples/server/petstore/cpp-qt-qhttpengine-server/server/src/handlers/OAIUserApiHandler.cpp @@ -31,75 +31,75 @@ OAIUserApiHandler::~OAIUserApiHandler(){ void OAIUserApiHandler::createUser(OAIUser body) { Q_UNUSED(body); auto reqObj = qobject_cast<OAIUserApiRequest*>(sender()); - if( reqObj != nullptr ) - { + if( reqObj != nullptr ) + { reqObj->createUserResponse(); - } + } } void OAIUserApiHandler::createUsersWithArrayInput(QList<OAIUser> body) { Q_UNUSED(body); auto reqObj = qobject_cast<OAIUserApiRequest*>(sender()); - if( reqObj != nullptr ) - { + if( reqObj != nullptr ) + { reqObj->createUsersWithArrayInputResponse(); - } + } } void OAIUserApiHandler::createUsersWithListInput(QList<OAIUser> body) { Q_UNUSED(body); auto reqObj = qobject_cast<OAIUserApiRequest*>(sender()); - if( reqObj != nullptr ) - { + if( reqObj != nullptr ) + { reqObj->createUsersWithListInputResponse(); - } + } } void OAIUserApiHandler::deleteUser(QString username) { Q_UNUSED(username); auto reqObj = qobject_cast<OAIUserApiRequest*>(sender()); - if( reqObj != nullptr ) - { + if( reqObj != nullptr ) + { reqObj->deleteUserResponse(); - } + } } void OAIUserApiHandler::getUserByName(QString username) { Q_UNUSED(username); auto reqObj = qobject_cast<OAIUserApiRequest*>(sender()); - if( reqObj != nullptr ) - { + if( reqObj != nullptr ) + { OAIUser res; reqObj->getUserByNameResponse(res); - } + } } void OAIUserApiHandler::loginUser(QString username, QString password) { Q_UNUSED(username); Q_UNUSED(password); auto reqObj = qobject_cast<OAIUserApiRequest*>(sender()); - if( reqObj != nullptr ) - { + if( reqObj != nullptr ) + { QString res; reqObj->loginUserResponse(res); - } + } } void OAIUserApiHandler::logoutUser() { auto reqObj = qobject_cast<OAIUserApiRequest*>(sender()); - if( reqObj != nullptr ) - { + if( reqObj != nullptr ) + { reqObj->logoutUserResponse(); - } + } } void OAIUserApiHandler::updateUser(QString username, OAIUser body) { Q_UNUSED(username); Q_UNUSED(body); auto reqObj = qobject_cast<OAIUserApiRequest*>(sender()); - if( reqObj != nullptr ) - { + if( reqObj != nullptr ) + { reqObj->updateUserResponse(); - } + } } diff --git a/samples/server/petstore/cpp-qt-qhttpengine-server/server/src/handlers/OAIUserApiHandler.h b/samples/server/petstore/cpp-qt-qhttpengine-server/server/src/handlers/OAIUserApiHandler.h index 50423749ed52b3565dfb801f044a46137efa5f6a..a8bfc48c4fe2a837624b3a5f2370b5ea6fdebf92 100644 --- a/samples/server/petstore/cpp-qt-qhttpengine-server/server/src/handlers/OAIUserApiHandler.h +++ b/samples/server/petstore/cpp-qt-qhttpengine-server/server/src/handlers/OAIUserApiHandler.h @@ -23,7 +23,7 @@ namespace OpenAPI { class OAIUserApiHandler : public QObject { Q_OBJECT - + public: OAIUserApiHandler(); virtual ~OAIUserApiHandler(); diff --git a/samples/server/petstore/cpp-qt-qhttpengine-server/server/src/requests/OAIPetApiRequest.cpp b/samples/server/petstore/cpp-qt-qhttpengine-server/server/src/requests/OAIPetApiRequest.cpp index 05a516383d3828cb2b2d5b934fb64826d4970a34..5bb418382d7a8e94c2e43456352f964f9bcda7a9 100644 --- a/samples/server/petstore/cpp-qt-qhttpengine-server/server/src/requests/OAIPetApiRequest.cpp +++ b/samples/server/petstore/cpp-qt-qhttpengine-server/server/src/requests/OAIPetApiRequest.cpp @@ -342,7 +342,7 @@ void OAIPetApiRequest::sendCustomResponse(QByteArray & res, QNetworkReply::Netwo socket->write(res); if(socket->isOpen()){ socket->close(); - } + } } void OAIPetApiRequest::sendCustomResponse(QIODevice *res, QNetworkReply::NetworkError error_type){ diff --git a/samples/server/petstore/cpp-qt-qhttpengine-server/server/src/requests/OAIStoreApiRequest.cpp b/samples/server/petstore/cpp-qt-qhttpengine-server/server/src/requests/OAIStoreApiRequest.cpp index eacd27cddbf99592c2cebb6942cb89a1220c4bf6..1d8d5d7ee38b392d1dccec246cf7ae1e62302e51 100644 --- a/samples/server/petstore/cpp-qt-qhttpengine-server/server/src/requests/OAIStoreApiRequest.cpp +++ b/samples/server/petstore/cpp-qt-qhttpengine-server/server/src/requests/OAIStoreApiRequest.cpp @@ -191,7 +191,7 @@ void OAIStoreApiRequest::sendCustomResponse(QByteArray & res, QNetworkReply::Net socket->write(res); if(socket->isOpen()){ socket->close(); - } + } } void OAIStoreApiRequest::sendCustomResponse(QIODevice *res, QNetworkReply::NetworkError error_type){ diff --git a/samples/server/petstore/cpp-qt-qhttpengine-server/server/src/requests/OAIUserApiRequest.cpp b/samples/server/petstore/cpp-qt-qhttpengine-server/server/src/requests/OAIUserApiRequest.cpp index 8e5bdba5ed8f592a1531da2067e21036db28b30c..95f05a39e0d0bb53adad48b2fd74b584f3d50005 100644 --- a/samples/server/petstore/cpp-qt-qhttpengine-server/server/src/requests/OAIUserApiRequest.cpp +++ b/samples/server/petstore/cpp-qt-qhttpengine-server/server/src/requests/OAIUserApiRequest.cpp @@ -349,7 +349,7 @@ void OAIUserApiRequest::sendCustomResponse(QByteArray & res, QNetworkReply::Netw socket->write(res); if(socket->isOpen()){ socket->close(); - } + } } void OAIUserApiRequest::sendCustomResponse(QIODevice *res, QNetworkReply::NetworkError error_type){ diff --git a/samples/server/petstore/erlang-server/README.md b/samples/server/petstore/erlang-server/README.md index 9593d7162a8553b6df184f279d8031d8d29bffc2..5d36ca07576b6d8db867ffc68c3ec09a97db4ed5 100644 --- a/samples/server/petstore/erlang-server/README.md +++ b/samples/server/petstore/erlang-server/README.md @@ -55,4 +55,3 @@ Use erlang-server with erlang.mk $erl -pa ./deps/cowboy/ebin -pa ./deps/cowlib/ebin -pa ./deps/ranch/ebin -pa ./deps/jsx/ebin -pa ./deps/jesse/ebin -pa ./deps/rfc3339/ebin -pa ./ebin 4, Start project application:ensure_all_started(http_server). - diff --git a/samples/server/petstore/erlang-server/src/openapi_api.erl b/samples/server/petstore/erlang-server/src/openapi_api.erl index 19e8f7b542cd97fa983650daf8dea37c3c4a52f0..8b9cb84eaa49c0d5cacf9905ad5264cb8f1bb2e6 100644 --- a/samples/server/petstore/erlang-server/src/openapi_api.erl +++ b/samples/server/petstore/erlang-server/src/openapi_api.erl @@ -690,7 +690,7 @@ validation_error(ViolatedRule, Name, Info) -> throw({wrong_param, Name, ViolatedRule, Info}). -spec get_value(body | qs_val | header | binding, Name :: any(), Req0 :: cowboy_req:req()) -> - {Value :: any(), Req :: cowboy_req:req()} | + {Value :: any(), Req :: cowboy_req:req()} | {error, Reason :: any(), Req :: cowboy_req:req()}. get_value(body, _Name, Req0) -> {ok, Body, Req} = cowboy_req:read_body(Req0), @@ -720,7 +720,7 @@ prepare_body(Body) -> <<"">> -> <<"">>; _ -> try - jsx:decode(Body, [return_maps]) + jsx:decode(Body, [return_maps]) catch error:_ -> {error, {invalid_body, not_json, Body}} diff --git a/samples/server/petstore/erlang-server/src/openapi_auth.erl b/samples/server/petstore/erlang-server/src/openapi_auth.erl index 06f1f163953b45d554988b1af9d894681742ea87..b84a4f98dc893634097795563f8c3bfb7c77df78 100644 --- a/samples/server/petstore/erlang-server/src/openapi_auth.erl +++ b/samples/server/petstore/erlang-server/src/openapi_auth.erl @@ -46,6 +46,3 @@ get_api_key(header, KeyParam, Req) -> get_api_key(qs_val, KeyParam, Req) -> QS = cowboy_req:parse_qs(Req), { openapi_utils:get_opt(KeyParam, QS), Req}. - - - diff --git a/samples/server/petstore/erlang-server/src/openapi_router.erl b/samples/server/petstore/erlang-server/src/openapi_router.erl index 96f60f5d986abd345ba00aaf35c346e5434f6bd3..c32f2e5ba1d649f3d9cddfbad8a08b2617345e27 100644 --- a/samples/server/petstore/erlang-server/src/openapi_router.erl +++ b/samples/server/petstore/erlang-server/src/openapi_router.erl @@ -171,5 +171,3 @@ prepare_validator() -> get_openapi_path() -> {ok, AppName} = application:get_application(?MODULE), filename:join(openapi_utils:priv_dir(AppName), "openapi.json"). - - diff --git a/samples/server/petstore/go-api-server/README.md b/samples/server/petstore/go-api-server/README.md index fbcf4ae661b0780a5aebc6b10ee9152d9a237d44..7a0c3bb1119aeada7b0ebea5ee37cb2a0e2a708e 100644 --- a/samples/server/petstore/go-api-server/README.md +++ b/samples/server/petstore/go-api-server/README.md @@ -5,7 +5,7 @@ This is a sample server Petstore server. For this sample, you can use the api ke ## 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. +By using the [OpenAPI-Spec](https://github.com/OAI/OpenAPI-Specification) from a remote server, you can easily generate a server stub. - To see how to make this your own, look here: @@ -29,7 +29,5 @@ docker build --network=host -t petstoreserver . Once image is built use ``` -docker run --rm -it petstoreserver +docker run --rm -it petstoreserver ``` - - diff --git a/samples/server/petstore/go-api-server/go/api.go b/samples/server/petstore/go-api-server/go/api.go index 5556474295ebe13b12583461e4493cd555112c2e..c936f0b5efeb9f274f8a9e6e6d893b9620e91820 100644 --- a/samples/server/petstore/go-api-server/go/api.go +++ b/samples/server/petstore/go-api-server/go/api.go @@ -18,7 +18,7 @@ import ( // PetApiRouter defines the required methods for binding the api requests to a responses for the PetApi -// The PetApiRouter implementation should parse necessary information from the http request, +// The PetApiRouter implementation should parse necessary information from the http request, // pass the data to a PetApiServicer to perform the required actions, then write the service results to the http response. type PetApiRouter interface { AddPet(http.ResponseWriter, *http.Request) @@ -32,7 +32,7 @@ type PetApiRouter interface { UploadFile(http.ResponseWriter, *http.Request) } // StoreApiRouter defines the required methods for binding the api requests to a responses for the StoreApi -// The StoreApiRouter implementation should parse necessary information from the http request, +// The StoreApiRouter implementation should parse necessary information from the http request, // pass the data to a StoreApiServicer to perform the required actions, then write the service results to the http response. type StoreApiRouter interface { DeleteOrder(http.ResponseWriter, *http.Request) @@ -41,7 +41,7 @@ type StoreApiRouter interface { PlaceOrder(http.ResponseWriter, *http.Request) } // UserApiRouter defines the required methods for binding the api requests to a responses for the UserApi -// The UserApiRouter implementation should parse necessary information from the http request, +// The UserApiRouter implementation should parse necessary information from the http request, // pass the data to a UserApiServicer to perform the required actions, then write the service results to the http response. type UserApiRouter interface { CreateUser(http.ResponseWriter, *http.Request) @@ -56,8 +56,8 @@ type UserApiRouter interface { // PetApiServicer defines the api actions for the PetApi service -// This interface intended to stay up to date with the openapi yaml used to generate it, -// while the service implementation can ignored with the .openapi-generator-ignore file +// This interface intended to stay up to date with the openapi yaml used to generate it, +// while the service implementation can ignored with the .openapi-generator-ignore file // and updated with the logic required for the API. type PetApiServicer interface { AddPet(context.Context, Pet) (ImplResponse, error) @@ -73,8 +73,8 @@ type PetApiServicer interface { // StoreApiServicer defines the api actions for the StoreApi service -// This interface intended to stay up to date with the openapi yaml used to generate it, -// while the service implementation can ignored with the .openapi-generator-ignore file +// This interface intended to stay up to date with the openapi yaml used to generate it, +// while the service implementation can ignored with the .openapi-generator-ignore file // and updated with the logic required for the API. type StoreApiServicer interface { DeleteOrder(context.Context, string) (ImplResponse, error) @@ -85,8 +85,8 @@ type StoreApiServicer interface { // UserApiServicer defines the api actions for the UserApi service -// This interface intended to stay up to date with the openapi yaml used to generate it, -// while the service implementation can ignored with the .openapi-generator-ignore file +// This interface intended to stay up to date with the openapi yaml used to generate it, +// while the service implementation can ignored with the .openapi-generator-ignore file // and updated with the logic required for the API. type UserApiServicer interface { CreateUser(context.Context, User) (ImplResponse, error) diff --git a/samples/server/petstore/go-api-server/go/api_pet_service.go b/samples/server/petstore/go-api-server/go/api_pet_service.go index c612d222a875e28da29ab8c362910aa18837a68e..3f682e9fd466f67149e8c09aba5dacbddef0d101 100644 --- a/samples/server/petstore/go-api-server/go/api_pet_service.go +++ b/samples/server/petstore/go-api-server/go/api_pet_service.go @@ -17,7 +17,7 @@ import ( ) // PetApiService is a service that implents the logic for the PetApiServicer -// This service should implement the business logic for every endpoint for the PetApi API. +// This service should implement the business logic for every endpoint for the PetApi API. // Include any external packages or services that will be required by this service. type PetApiService struct { } @@ -139,4 +139,3 @@ func (s *PetApiService) UploadFile(ctx context.Context, petId int64, additionalM return Response(http.StatusNotImplemented, nil), errors.New("UploadFile method not implemented") } - diff --git a/samples/server/petstore/go-api-server/go/api_store_service.go b/samples/server/petstore/go-api-server/go/api_store_service.go index 27da55939a355229251b58b34e5a696bf890b7ad..0fc75e126f39e1aa3de47d9e1cd622df0b2ff051 100644 --- a/samples/server/petstore/go-api-server/go/api_store_service.go +++ b/samples/server/petstore/go-api-server/go/api_store_service.go @@ -16,7 +16,7 @@ import ( ) // StoreApiService is a service that implents the logic for the StoreApiServicer -// This service should implement the business logic for every endpoint for the StoreApi API. +// This service should implement the business logic for every endpoint for the StoreApi API. // Include any external packages or services that will be required by this service. type StoreApiService struct { } @@ -81,4 +81,3 @@ func (s *StoreApiService) PlaceOrder(ctx context.Context, order Order) (ImplResp return Response(http.StatusNotImplemented, nil), errors.New("PlaceOrder method not implemented") } - diff --git a/samples/server/petstore/go-api-server/go/api_user_service.go b/samples/server/petstore/go-api-server/go/api_user_service.go index c14d96ab36821d4051d83c6b026a322f6b6e1b70..b00a49cfd63b310476e4d8f055e00dc4a267487e 100644 --- a/samples/server/petstore/go-api-server/go/api_user_service.go +++ b/samples/server/petstore/go-api-server/go/api_user_service.go @@ -16,7 +16,7 @@ import ( ) // UserApiService is a service that implents the logic for the UserApiServicer -// This service should implement the business logic for every endpoint for the UserApi API. +// This service should implement the business logic for every endpoint for the UserApi API. // Include any external packages or services that will be required by this service. type UserApiService struct { } @@ -128,4 +128,3 @@ func (s *UserApiService) UpdateUser(ctx context.Context, username string, user U return Response(http.StatusNotImplemented, nil), errors.New("UpdateUser method not implemented") } - diff --git a/samples/server/petstore/go-chi-server/README.md b/samples/server/petstore/go-chi-server/README.md index fbcf4ae661b0780a5aebc6b10ee9152d9a237d44..7a0c3bb1119aeada7b0ebea5ee37cb2a0e2a708e 100644 --- a/samples/server/petstore/go-chi-server/README.md +++ b/samples/server/petstore/go-chi-server/README.md @@ -5,7 +5,7 @@ This is a sample server Petstore server. For this sample, you can use the api ke ## 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. +By using the [OpenAPI-Spec](https://github.com/OAI/OpenAPI-Specification) from a remote server, you can easily generate a server stub. - To see how to make this your own, look here: @@ -29,7 +29,5 @@ docker build --network=host -t petstoreserver . Once image is built use ``` -docker run --rm -it petstoreserver +docker run --rm -it petstoreserver ``` - - diff --git a/samples/server/petstore/go-chi-server/go/api.go b/samples/server/petstore/go-chi-server/go/api.go index 5556474295ebe13b12583461e4493cd555112c2e..c936f0b5efeb9f274f8a9e6e6d893b9620e91820 100644 --- a/samples/server/petstore/go-chi-server/go/api.go +++ b/samples/server/petstore/go-chi-server/go/api.go @@ -18,7 +18,7 @@ import ( // PetApiRouter defines the required methods for binding the api requests to a responses for the PetApi -// The PetApiRouter implementation should parse necessary information from the http request, +// The PetApiRouter implementation should parse necessary information from the http request, // pass the data to a PetApiServicer to perform the required actions, then write the service results to the http response. type PetApiRouter interface { AddPet(http.ResponseWriter, *http.Request) @@ -32,7 +32,7 @@ type PetApiRouter interface { UploadFile(http.ResponseWriter, *http.Request) } // StoreApiRouter defines the required methods for binding the api requests to a responses for the StoreApi -// The StoreApiRouter implementation should parse necessary information from the http request, +// The StoreApiRouter implementation should parse necessary information from the http request, // pass the data to a StoreApiServicer to perform the required actions, then write the service results to the http response. type StoreApiRouter interface { DeleteOrder(http.ResponseWriter, *http.Request) @@ -41,7 +41,7 @@ type StoreApiRouter interface { PlaceOrder(http.ResponseWriter, *http.Request) } // UserApiRouter defines the required methods for binding the api requests to a responses for the UserApi -// The UserApiRouter implementation should parse necessary information from the http request, +// The UserApiRouter implementation should parse necessary information from the http request, // pass the data to a UserApiServicer to perform the required actions, then write the service results to the http response. type UserApiRouter interface { CreateUser(http.ResponseWriter, *http.Request) @@ -56,8 +56,8 @@ type UserApiRouter interface { // PetApiServicer defines the api actions for the PetApi service -// This interface intended to stay up to date with the openapi yaml used to generate it, -// while the service implementation can ignored with the .openapi-generator-ignore file +// This interface intended to stay up to date with the openapi yaml used to generate it, +// while the service implementation can ignored with the .openapi-generator-ignore file // and updated with the logic required for the API. type PetApiServicer interface { AddPet(context.Context, Pet) (ImplResponse, error) @@ -73,8 +73,8 @@ type PetApiServicer interface { // StoreApiServicer defines the api actions for the StoreApi service -// This interface intended to stay up to date with the openapi yaml used to generate it, -// while the service implementation can ignored with the .openapi-generator-ignore file +// This interface intended to stay up to date with the openapi yaml used to generate it, +// while the service implementation can ignored with the .openapi-generator-ignore file // and updated with the logic required for the API. type StoreApiServicer interface { DeleteOrder(context.Context, string) (ImplResponse, error) @@ -85,8 +85,8 @@ type StoreApiServicer interface { // UserApiServicer defines the api actions for the UserApi service -// This interface intended to stay up to date with the openapi yaml used to generate it, -// while the service implementation can ignored with the .openapi-generator-ignore file +// This interface intended to stay up to date with the openapi yaml used to generate it, +// while the service implementation can ignored with the .openapi-generator-ignore file // and updated with the logic required for the API. type UserApiServicer interface { CreateUser(context.Context, User) (ImplResponse, error) diff --git a/samples/server/petstore/go-chi-server/go/api_pet_service.go b/samples/server/petstore/go-chi-server/go/api_pet_service.go index c612d222a875e28da29ab8c362910aa18837a68e..3f682e9fd466f67149e8c09aba5dacbddef0d101 100644 --- a/samples/server/petstore/go-chi-server/go/api_pet_service.go +++ b/samples/server/petstore/go-chi-server/go/api_pet_service.go @@ -17,7 +17,7 @@ import ( ) // PetApiService is a service that implents the logic for the PetApiServicer -// This service should implement the business logic for every endpoint for the PetApi API. +// This service should implement the business logic for every endpoint for the PetApi API. // Include any external packages or services that will be required by this service. type PetApiService struct { } @@ -139,4 +139,3 @@ func (s *PetApiService) UploadFile(ctx context.Context, petId int64, additionalM return Response(http.StatusNotImplemented, nil), errors.New("UploadFile method not implemented") } - diff --git a/samples/server/petstore/go-chi-server/go/api_store_service.go b/samples/server/petstore/go-chi-server/go/api_store_service.go index 27da55939a355229251b58b34e5a696bf890b7ad..0fc75e126f39e1aa3de47d9e1cd622df0b2ff051 100644 --- a/samples/server/petstore/go-chi-server/go/api_store_service.go +++ b/samples/server/petstore/go-chi-server/go/api_store_service.go @@ -16,7 +16,7 @@ import ( ) // StoreApiService is a service that implents the logic for the StoreApiServicer -// This service should implement the business logic for every endpoint for the StoreApi API. +// This service should implement the business logic for every endpoint for the StoreApi API. // Include any external packages or services that will be required by this service. type StoreApiService struct { } @@ -81,4 +81,3 @@ func (s *StoreApiService) PlaceOrder(ctx context.Context, order Order) (ImplResp return Response(http.StatusNotImplemented, nil), errors.New("PlaceOrder method not implemented") } - diff --git a/samples/server/petstore/go-chi-server/go/api_user_service.go b/samples/server/petstore/go-chi-server/go/api_user_service.go index c14d96ab36821d4051d83c6b026a322f6b6e1b70..b00a49cfd63b310476e4d8f055e00dc4a267487e 100644 --- a/samples/server/petstore/go-chi-server/go/api_user_service.go +++ b/samples/server/petstore/go-chi-server/go/api_user_service.go @@ -16,7 +16,7 @@ import ( ) // UserApiService is a service that implents the logic for the UserApiServicer -// This service should implement the business logic for every endpoint for the UserApi API. +// This service should implement the business logic for every endpoint for the UserApi API. // Include any external packages or services that will be required by this service. type UserApiService struct { } @@ -128,4 +128,3 @@ func (s *UserApiService) UpdateUser(ctx context.Context, username string, user U return Response(http.StatusNotImplemented, nil), errors.New("UpdateUser method not implemented") } - diff --git a/samples/server/petstore/go-echo-server/README.md b/samples/server/petstore/go-echo-server/README.md index d0c7ad18aceea7ad3a49abf8c68aa7eaa41c5984..c5c8c0f7c6ec9749197224d3bcfe43766a588b79 100644 --- a/samples/server/petstore/go-echo-server/README.md +++ b/samples/server/petstore/go-echo-server/README.md @@ -5,7 +5,7 @@ This is a sample server Petstore server. For this sample, you can use the api ke ## 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. +By using the [OpenAPI-Spec](https://github.com/OAI/OpenAPI-Specification) from a remote server, you can easily generate a server stub. - To see how to make this your own, look here: @@ -30,7 +30,7 @@ docker build --network=host -t openapi . Once the image is built, just run ``` -docker run --rm -it openapi +docker run --rm -it openapi ``` ### Known Issue diff --git a/samples/server/petstore/go-echo-server/main.go b/samples/server/petstore/go-echo-server/main.go index badc9f0fcb886dd54fd80401ec069ce0d75f6bf6..5a428d4bbf05b4ab33bd3a319c2e77a5634665eb 100644 --- a/samples/server/petstore/go-echo-server/main.go +++ b/samples/server/petstore/go-echo-server/main.go @@ -15,7 +15,7 @@ func main() { // Middleware e.Use(middleware.Logger()) e.Use(middleware.Recover()) - + // AddPet - Add a new pet to the store e.POST("/v2/pet", c.AddPet) diff --git a/samples/server/petstore/go-gin-api-server/go/README.md b/samples/server/petstore/go-gin-api-server/go/README.md index e88bc984b8c5df6e6c8c792986a3a565d6286758..4f16ed4562fad2fdfd598c1703d832909bf9fccc 100644 --- a/samples/server/petstore/go-gin-api-server/go/README.md +++ b/samples/server/petstore/go-gin-api-server/go/README.md @@ -5,7 +5,7 @@ This is a sample server Petstore server. For this sample, you can use the api ke ## 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. +By using the [OpenAPI-Spec](https://github.com/OAI/OpenAPI-Specification) from a remote server, you can easily generate a server stub. - To see how to make this your own, look here: @@ -29,7 +29,7 @@ docker build --network=host -t petstoreserver . Once the image is built, just run ``` -docker run --rm -it petstoreserver +docker run --rm -it petstoreserver ``` ### Known Issue @@ -37,4 +37,3 @@ docker run --rm -it petstoreserver Endpoints sharing a common path may result in issues. For example, `/v2/pet/findByTags` and `/v2/pet/:petId` will result in an issue with the Gin framework. For more information about this known limitation, please refer to [gin-gonic/gin#388](https://github.com/gin-gonic/gin/issues/388) for more information. A workaround is to manually update the path and handler. Please refer to [gin-gonic/gin/issues/205#issuecomment-296155497](https://github.com/gin-gonic/gin/issues/205#issuecomment-296155497) for more information. - diff --git a/samples/server/petstore/go-server-required/README.md b/samples/server/petstore/go-server-required/README.md index fbcf4ae661b0780a5aebc6b10ee9152d9a237d44..7a0c3bb1119aeada7b0ebea5ee37cb2a0e2a708e 100644 --- a/samples/server/petstore/go-server-required/README.md +++ b/samples/server/petstore/go-server-required/README.md @@ -5,7 +5,7 @@ This is a sample server Petstore server. For this sample, you can use the api ke ## 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. +By using the [OpenAPI-Spec](https://github.com/OAI/OpenAPI-Specification) from a remote server, you can easily generate a server stub. - To see how to make this your own, look here: @@ -29,7 +29,5 @@ docker build --network=host -t petstoreserver . Once image is built use ``` -docker run --rm -it petstoreserver +docker run --rm -it petstoreserver ``` - - diff --git a/samples/server/petstore/go-server-required/go/api.go b/samples/server/petstore/go-server-required/go/api.go index 5556474295ebe13b12583461e4493cd555112c2e..c936f0b5efeb9f274f8a9e6e6d893b9620e91820 100644 --- a/samples/server/petstore/go-server-required/go/api.go +++ b/samples/server/petstore/go-server-required/go/api.go @@ -18,7 +18,7 @@ import ( // PetApiRouter defines the required methods for binding the api requests to a responses for the PetApi -// The PetApiRouter implementation should parse necessary information from the http request, +// The PetApiRouter implementation should parse necessary information from the http request, // pass the data to a PetApiServicer to perform the required actions, then write the service results to the http response. type PetApiRouter interface { AddPet(http.ResponseWriter, *http.Request) @@ -32,7 +32,7 @@ type PetApiRouter interface { UploadFile(http.ResponseWriter, *http.Request) } // StoreApiRouter defines the required methods for binding the api requests to a responses for the StoreApi -// The StoreApiRouter implementation should parse necessary information from the http request, +// The StoreApiRouter implementation should parse necessary information from the http request, // pass the data to a StoreApiServicer to perform the required actions, then write the service results to the http response. type StoreApiRouter interface { DeleteOrder(http.ResponseWriter, *http.Request) @@ -41,7 +41,7 @@ type StoreApiRouter interface { PlaceOrder(http.ResponseWriter, *http.Request) } // UserApiRouter defines the required methods for binding the api requests to a responses for the UserApi -// The UserApiRouter implementation should parse necessary information from the http request, +// The UserApiRouter implementation should parse necessary information from the http request, // pass the data to a UserApiServicer to perform the required actions, then write the service results to the http response. type UserApiRouter interface { CreateUser(http.ResponseWriter, *http.Request) @@ -56,8 +56,8 @@ type UserApiRouter interface { // PetApiServicer defines the api actions for the PetApi service -// This interface intended to stay up to date with the openapi yaml used to generate it, -// while the service implementation can ignored with the .openapi-generator-ignore file +// This interface intended to stay up to date with the openapi yaml used to generate it, +// while the service implementation can ignored with the .openapi-generator-ignore file // and updated with the logic required for the API. type PetApiServicer interface { AddPet(context.Context, Pet) (ImplResponse, error) @@ -73,8 +73,8 @@ type PetApiServicer interface { // StoreApiServicer defines the api actions for the StoreApi service -// This interface intended to stay up to date with the openapi yaml used to generate it, -// while the service implementation can ignored with the .openapi-generator-ignore file +// This interface intended to stay up to date with the openapi yaml used to generate it, +// while the service implementation can ignored with the .openapi-generator-ignore file // and updated with the logic required for the API. type StoreApiServicer interface { DeleteOrder(context.Context, string) (ImplResponse, error) @@ -85,8 +85,8 @@ type StoreApiServicer interface { // UserApiServicer defines the api actions for the UserApi service -// This interface intended to stay up to date with the openapi yaml used to generate it, -// while the service implementation can ignored with the .openapi-generator-ignore file +// This interface intended to stay up to date with the openapi yaml used to generate it, +// while the service implementation can ignored with the .openapi-generator-ignore file // and updated with the logic required for the API. type UserApiServicer interface { CreateUser(context.Context, User) (ImplResponse, error) diff --git a/samples/server/petstore/go-server-required/go/api_pet_service.go b/samples/server/petstore/go-server-required/go/api_pet_service.go index c612d222a875e28da29ab8c362910aa18837a68e..3f682e9fd466f67149e8c09aba5dacbddef0d101 100644 --- a/samples/server/petstore/go-server-required/go/api_pet_service.go +++ b/samples/server/petstore/go-server-required/go/api_pet_service.go @@ -17,7 +17,7 @@ import ( ) // PetApiService is a service that implents the logic for the PetApiServicer -// This service should implement the business logic for every endpoint for the PetApi API. +// This service should implement the business logic for every endpoint for the PetApi API. // Include any external packages or services that will be required by this service. type PetApiService struct { } @@ -139,4 +139,3 @@ func (s *PetApiService) UploadFile(ctx context.Context, petId int64, additionalM return Response(http.StatusNotImplemented, nil), errors.New("UploadFile method not implemented") } - diff --git a/samples/server/petstore/go-server-required/go/api_store_service.go b/samples/server/petstore/go-server-required/go/api_store_service.go index 27da55939a355229251b58b34e5a696bf890b7ad..0fc75e126f39e1aa3de47d9e1cd622df0b2ff051 100644 --- a/samples/server/petstore/go-server-required/go/api_store_service.go +++ b/samples/server/petstore/go-server-required/go/api_store_service.go @@ -16,7 +16,7 @@ import ( ) // StoreApiService is a service that implents the logic for the StoreApiServicer -// This service should implement the business logic for every endpoint for the StoreApi API. +// This service should implement the business logic for every endpoint for the StoreApi API. // Include any external packages or services that will be required by this service. type StoreApiService struct { } @@ -81,4 +81,3 @@ func (s *StoreApiService) PlaceOrder(ctx context.Context, order Order) (ImplResp return Response(http.StatusNotImplemented, nil), errors.New("PlaceOrder method not implemented") } - diff --git a/samples/server/petstore/go-server-required/go/api_user_service.go b/samples/server/petstore/go-server-required/go/api_user_service.go index c14d96ab36821d4051d83c6b026a322f6b6e1b70..b00a49cfd63b310476e4d8f055e00dc4a267487e 100644 --- a/samples/server/petstore/go-server-required/go/api_user_service.go +++ b/samples/server/petstore/go-server-required/go/api_user_service.go @@ -16,7 +16,7 @@ import ( ) // UserApiService is a service that implents the logic for the UserApiServicer -// This service should implement the business logic for every endpoint for the UserApi API. +// This service should implement the business logic for every endpoint for the UserApi API. // Include any external packages or services that will be required by this service. type UserApiService struct { } @@ -128,4 +128,3 @@ func (s *UserApiService) UpdateUser(ctx context.Context, username string, user U return Response(http.StatusNotImplemented, nil), errors.New("UpdateUser method not implemented") } - diff --git a/samples/server/petstore/java-msf4j/README.md b/samples/server/petstore/java-msf4j/README.md index f3662b2e83a3c11bf06d6657cec2511755904b88..fe59f7f5df9aa20bbe2e3ebc5b106365ebb77471 100644 --- a/samples/server/petstore/java-msf4j/README.md +++ b/samples/server/petstore/java-msf4j/README.md @@ -11,12 +11,12 @@ Before you build/run service replace .deploy(new PetApi()) with your actual serv .start(); ``` -To Use-it : in the generated folder try +To Use-it : in the generated folder try ``` -mvn package +mvn package ``` -for build jar, then start your server: +for build jar, then start your server: ``` java -jar target/java-msf4j-server-1.0.0.jar ``` diff --git a/samples/server/petstore/java-msf4j/pom.xml b/samples/server/petstore/java-msf4j/pom.xml index 43c747ad0620479dc0b9689de6751dee2b4acc5f..638d1a5fb56edd5db1d625cabf4d687286db94a9 100644 --- a/samples/server/petstore/java-msf4j/pom.xml +++ b/samples/server/petstore/java-msf4j/pom.xml @@ -3,7 +3,7 @@ <groupId>org.wso2.msf4j</groupId> <artifactId>msf4j-service</artifactId> <version>2.6.4</version> - </parent> + </parent> <modelVersion>4.0.0</modelVersion> <groupId>org.openapitools</groupId> <artifactId>java-msf4j-server</artifactId> diff --git a/samples/server/petstore/java-msf4j/src/gen/java/org/openapitools/model/EnumArrays.java b/samples/server/petstore/java-msf4j/src/gen/java/org/openapitools/model/EnumArrays.java index 08a29d10aec393485a75a3fd90c6213a1b5f1120..439dd9615b359f0c9a105bdbd1f1ffa8bd8c6948 100644 --- a/samples/server/petstore/java-msf4j/src/gen/java/org/openapitools/model/EnumArrays.java +++ b/samples/server/petstore/java-msf4j/src/gen/java/org/openapitools/model/EnumArrays.java @@ -78,7 +78,7 @@ public class EnumArrays { throw new IllegalArgumentException("Unexpected value '" + text + "'"); } } - + @JsonProperty("array_enum") private List<ArrayEnumEnum> arrayEnum = null; diff --git a/samples/server/petstore/java-msf4j/src/gen/java/org/openapitools/model/MapTest.java b/samples/server/petstore/java-msf4j/src/gen/java/org/openapitools/model/MapTest.java index f93af7b0d3594021423d56eb75cbeb9ff662981a..a47e2954a976658a1d6a0dc6ac684a98c345bbda 100644 --- a/samples/server/petstore/java-msf4j/src/gen/java/org/openapitools/model/MapTest.java +++ b/samples/server/petstore/java-msf4j/src/gen/java/org/openapitools/model/MapTest.java @@ -48,7 +48,7 @@ public class MapTest { throw new IllegalArgumentException("Unexpected value '" + text + "'"); } } - + @JsonProperty("map_of_enum_string") private Map<String, InnerEnum> mapOfEnumString = null; diff --git a/samples/server/petstore/java-play-framework-fake-endpoints/app/apimodels/EnumArrays.java b/samples/server/petstore/java-play-framework-fake-endpoints/app/apimodels/EnumArrays.java index 022ba7cea9171983a3b4a0a322d39bdd309efa33..149ca53994d4fba37fe3d97214156e9b1f6ae53d 100644 --- a/samples/server/petstore/java-play-framework-fake-endpoints/app/apimodels/EnumArrays.java +++ b/samples/server/petstore/java-play-framework-fake-endpoints/app/apimodels/EnumArrays.java @@ -78,7 +78,7 @@ public class EnumArrays { throw new IllegalArgumentException("Unexpected value '" + value + "'"); } } - + @JsonProperty("array_enum") private List<ArrayEnumEnum> arrayEnum = null; diff --git a/samples/server/petstore/java-play-framework-fake-endpoints/app/apimodels/MapTest.java b/samples/server/petstore/java-play-framework-fake-endpoints/app/apimodels/MapTest.java index 39fc7c4eeb74a1e41fdaee823c36230b390aa395..22cfd61d15b6833ccd701679c8ab736d1816be38 100644 --- a/samples/server/petstore/java-play-framework-fake-endpoints/app/apimodels/MapTest.java +++ b/samples/server/petstore/java-play-framework-fake-endpoints/app/apimodels/MapTest.java @@ -49,7 +49,7 @@ public class MapTest { throw new IllegalArgumentException("Unexpected value '" + value + "'"); } } - + @JsonProperty("map_of_enum_string") private Map<String, InnerEnum> mapOfEnumString = null; diff --git a/samples/server/petstore/java-vertx-web/src/main/java/org/openapitools/vertxweb/server/ApiResponse.java b/samples/server/petstore/java-vertx-web/src/main/java/org/openapitools/vertxweb/server/ApiResponse.java index a64f1838f522b013b17ad5021cfe249334a06f42..6e43aa3d74cd9cb1177fbeca66894d3dedc9fd07 100644 --- a/samples/server/petstore/java-vertx-web/src/main/java/org/openapitools/vertxweb/server/ApiResponse.java +++ b/samples/server/petstore/java-vertx-web/src/main/java/org/openapitools/vertxweb/server/ApiResponse.java @@ -33,5 +33,3 @@ public class ApiResponse<T> { return statusCode; } } - - 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 6e3398ecdf85272e3c021b7f6d800a0e3d645df8..fdf67835380bcff38c3dda92427f50a4bbeff0fc 100644 --- a/samples/server/petstore/jaxrs-cxf-annotated-base-path/pom.xml +++ b/samples/server/petstore/jaxrs-cxf-annotated-base-path/pom.xml @@ -84,7 +84,7 @@ </execution> </executions> </plugin> - + <!-- build WAR file --> <plugin> <artifactId>maven-war-plugin</artifactId> @@ -134,7 +134,7 @@ <version>${cxf-version}</version> <scope>test</scope> </dependency> - + <!-- CXF server --> <dependency> <groupId>org.apache.cxf</groupId> diff --git a/samples/server/petstore/jaxrs-cxf-annotated-base-path/src/gen/java/org/openapitools/api/PetApi.java b/samples/server/petstore/jaxrs-cxf-annotated-base-path/src/gen/java/org/openapitools/api/PetApi.java index 73f2f46c8b46aa889f8b4117962b17e54cad76e2..2b7d9285c690ff7d03de4d9edf4d17065be1e570 100644 --- a/samples/server/petstore/jaxrs-cxf-annotated-base-path/src/gen/java/org/openapitools/api/PetApi.java +++ b/samples/server/petstore/jaxrs-cxf-annotated-base-path/src/gen/java/org/openapitools/api/PetApi.java @@ -52,7 +52,7 @@ public interface PetApi { @ApiOperation(value = "Deletes a pet", tags={ "pet" }) @ApiResponses(value = { @ApiResponse(code = 400, message = "Invalid pet value") }) - public void deletePet(@PathParam("petId") Long petId, @HeaderParam("api_key") String apiKey); + public void deletePet(@PathParam("petId") Long petId, @HeaderParam("api_key") String apiKey); /** * Finds Pets by status @@ -67,7 +67,7 @@ public interface PetApi { @ApiResponses(value = { @ApiResponse(code = 200, message = "successful operation", response = Pet.class, responseContainer = "List"), @ApiResponse(code = 400, message = "Invalid status value") }) - public List<Pet> findPetsByStatus(@QueryParam("status") @NotNull List<String> status); + public List<Pet> findPetsByStatus(@QueryParam("status") @NotNull List<String> status); /** * Finds Pets by tags @@ -82,7 +82,7 @@ public interface PetApi { @ApiResponses(value = { @ApiResponse(code = 200, message = "successful operation", response = Pet.class, responseContainer = "List"), @ApiResponse(code = 400, message = "Invalid tag value") }) - public List<Pet> findPetsByTags(@QueryParam("tags") @NotNull List<String> tags); + public List<Pet> findPetsByTags(@QueryParam("tags") @NotNull List<String> tags); /** * Find pet by ID @@ -139,4 +139,3 @@ public interface PetApi { @ApiResponse(code = 200, message = "successful operation", response = ModelApiResponse.class) }) public ModelApiResponse uploadFile(@PathParam("petId") Long petId, @Multipart(value = "additionalMetadata", required = false) String additionalMetadata, @Multipart(value = "file" , required = false) Attachment fileDetail); } - diff --git a/samples/server/petstore/jaxrs-cxf-annotated-base-path/src/gen/java/org/openapitools/api/StoreApi.java b/samples/server/petstore/jaxrs-cxf-annotated-base-path/src/gen/java/org/openapitools/api/StoreApi.java index 66b921282eb6f5ed010aba4b1295740eed219829..07e1505d06d7a79e110007b786b4a4ce7906a024 100644 --- a/samples/server/petstore/jaxrs-cxf-annotated-base-path/src/gen/java/org/openapitools/api/StoreApi.java +++ b/samples/server/petstore/jaxrs-cxf-annotated-base-path/src/gen/java/org/openapitools/api/StoreApi.java @@ -87,4 +87,3 @@ public interface StoreApi { @ApiResponse(code = 400, message = "Invalid Order") }) public Order placeOrder(@Valid @NotNull Order body); } - diff --git a/samples/server/petstore/jaxrs-cxf-annotated-base-path/src/gen/java/org/openapitools/api/UserApi.java b/samples/server/petstore/jaxrs-cxf-annotated-base-path/src/gen/java/org/openapitools/api/UserApi.java index 1fb2e4a236c0d2172b4990dfa05909498c312a92..a621c7a6229167d4bcceb767d7ca60c4f5323ffc 100644 --- a/samples/server/petstore/jaxrs-cxf-annotated-base-path/src/gen/java/org/openapitools/api/UserApi.java +++ b/samples/server/petstore/jaxrs-cxf-annotated-base-path/src/gen/java/org/openapitools/api/UserApi.java @@ -104,7 +104,7 @@ public interface UserApi { @ApiResponses(value = { @ApiResponse(code = 200, message = "successful operation", response = String.class), @ApiResponse(code = 400, message = "Invalid username/password supplied") }) - public String loginUser(@QueryParam("username") @NotNull String username, @QueryParam("password") @NotNull String password); + public String loginUser(@QueryParam("username") @NotNull String username, @QueryParam("password") @NotNull String password); /** * Logs out current logged in user session @@ -131,4 +131,3 @@ public interface UserApi { @ApiResponse(code = 404, message = "User not found") }) public void updateUser(@PathParam("username") String username, @Valid @NotNull User body); } - diff --git a/samples/server/petstore/jaxrs-cxf-cdi-default-value/pom.xml b/samples/server/petstore/jaxrs-cxf-cdi-default-value/pom.xml index 115ee04020573fcc3d40b5b14602fe34b175ad14..bbaaa6ee50bd232b33cde9fc38f51497630f38e0 100644 --- a/samples/server/petstore/jaxrs-cxf-cdi-default-value/pom.xml +++ b/samples/server/petstore/jaxrs-cxf-cdi-default-value/pom.xml @@ -76,14 +76,14 @@ <artifactId>swagger-annotations</artifactId> <version>[1.5.3,1.5.16]</version> </dependency> - + <!-- @Nullable annotation --> <dependency> <groupId>com.google.code.findbugs</groupId> <artifactId>jsr305</artifactId> <version>3.0.2</version> </dependency> - + <!-- Bean Validation API support --> <dependency> <groupId>javax.validation</groupId> diff --git a/samples/server/petstore/jaxrs-cxf-cdi/pom.xml b/samples/server/petstore/jaxrs-cxf-cdi/pom.xml index ef2d8a6d268c28751f66ee73872eee28ecf29f19..b0301c7d56571dd8447dd4dfce4d1cd8b4d8090a 100644 --- a/samples/server/petstore/jaxrs-cxf-cdi/pom.xml +++ b/samples/server/petstore/jaxrs-cxf-cdi/pom.xml @@ -76,14 +76,14 @@ <artifactId>swagger-annotations</artifactId> <version>[1.5.3,1.5.16]</version> </dependency> - + <!-- @Nullable annotation --> <dependency> <groupId>com.google.code.findbugs</groupId> <artifactId>jsr305</artifactId> <version>3.0.2</version> </dependency> - + <!-- Bean Validation API support --> <dependency> <groupId>javax.validation</groupId> 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 cf1b6b222181d4371912d23d97d726135c2ad7a4..b9dac41ac45accbb1b9e1a078ba9cbe30d0ad237 100644 --- a/samples/server/petstore/jaxrs-cxf-non-spring-app/pom.xml +++ b/samples/server/petstore/jaxrs-cxf-non-spring-app/pom.xml @@ -84,7 +84,7 @@ </execution> </executions> </plugin> - + <!-- build WAR file --> <plugin> <artifactId>maven-war-plugin</artifactId> @@ -134,7 +134,7 @@ <version>${cxf-version}</version> <scope>test</scope> </dependency> - + <!-- CXF server --> <dependency> <groupId>org.apache.cxf</groupId> diff --git a/samples/server/petstore/jaxrs-cxf-non-spring-app/src/gen/java/org/openapitools/api/PetApi.java b/samples/server/petstore/jaxrs-cxf-non-spring-app/src/gen/java/org/openapitools/api/PetApi.java index c65ecc210c9741d76d9832615bdbf618d9b0091f..30f67a8ca9579d70972d6b19f17028d0df43be57 100644 --- a/samples/server/petstore/jaxrs-cxf-non-spring-app/src/gen/java/org/openapitools/api/PetApi.java +++ b/samples/server/petstore/jaxrs-cxf-non-spring-app/src/gen/java/org/openapitools/api/PetApi.java @@ -52,7 +52,7 @@ public interface PetApi { @ApiOperation(value = "Deletes a pet", tags={ "pet" }) @ApiResponses(value = { @ApiResponse(code = 400, message = "Invalid pet value") }) - public void deletePet(@PathParam("petId") Long petId, @HeaderParam("api_key") String apiKey); + public void deletePet(@PathParam("petId") Long petId, @HeaderParam("api_key") String apiKey); /** * Finds Pets by status @@ -67,7 +67,7 @@ public interface PetApi { @ApiResponses(value = { @ApiResponse(code = 200, message = "successful operation", response = Pet.class, responseContainer = "List"), @ApiResponse(code = 400, message = "Invalid status value") }) - public List<Pet> findPetsByStatus(@QueryParam("status") @NotNull List<String> status); + public List<Pet> findPetsByStatus(@QueryParam("status") @NotNull List<String> status); /** * Finds Pets by tags @@ -82,7 +82,7 @@ public interface PetApi { @ApiResponses(value = { @ApiResponse(code = 200, message = "successful operation", response = Pet.class, responseContainer = "List"), @ApiResponse(code = 400, message = "Invalid tag value") }) - public List<Pet> findPetsByTags(@QueryParam("tags") @NotNull List<String> tags); + public List<Pet> findPetsByTags(@QueryParam("tags") @NotNull List<String> tags); /** * Find pet by ID @@ -139,4 +139,3 @@ public interface PetApi { @ApiResponse(code = 200, message = "successful operation", response = ModelApiResponse.class) }) public ModelApiResponse uploadFile(@PathParam("petId") Long petId, @Multipart(value = "additionalMetadata", required = false) String additionalMetadata, @Multipart(value = "file" , required = false) Attachment fileDetail); } - diff --git a/samples/server/petstore/jaxrs-cxf-non-spring-app/src/gen/java/org/openapitools/api/StoreApi.java b/samples/server/petstore/jaxrs-cxf-non-spring-app/src/gen/java/org/openapitools/api/StoreApi.java index a6f1d64bf1d0f40f09ce76a67ad4977b8432cb4b..8cf7a8471557136417262ea5ca51f15fbf024ee4 100644 --- a/samples/server/petstore/jaxrs-cxf-non-spring-app/src/gen/java/org/openapitools/api/StoreApi.java +++ b/samples/server/petstore/jaxrs-cxf-non-spring-app/src/gen/java/org/openapitools/api/StoreApi.java @@ -87,4 +87,3 @@ public interface StoreApi { @ApiResponse(code = 400, message = "Invalid Order") }) public Order placeOrder(@Valid @NotNull Order body); } - diff --git a/samples/server/petstore/jaxrs-cxf-non-spring-app/src/gen/java/org/openapitools/api/UserApi.java b/samples/server/petstore/jaxrs-cxf-non-spring-app/src/gen/java/org/openapitools/api/UserApi.java index d8611b21153ac07370dab9186ea591320030606c..280ad5696667dff90957c1547799cb32b77737cb 100644 --- a/samples/server/petstore/jaxrs-cxf-non-spring-app/src/gen/java/org/openapitools/api/UserApi.java +++ b/samples/server/petstore/jaxrs-cxf-non-spring-app/src/gen/java/org/openapitools/api/UserApi.java @@ -104,7 +104,7 @@ public interface UserApi { @ApiResponses(value = { @ApiResponse(code = 200, message = "successful operation", response = String.class), @ApiResponse(code = 400, message = "Invalid username/password supplied") }) - public String loginUser(@QueryParam("username") @NotNull String username, @QueryParam("password") @NotNull String password); + public String loginUser(@QueryParam("username") @NotNull String username, @QueryParam("password") @NotNull String password); /** * Logs out current logged in user session @@ -131,4 +131,3 @@ public interface UserApi { @ApiResponse(code = 404, message = "User not found") }) public void updateUser(@PathParam("username") String username, @Valid @NotNull User body); } - diff --git a/samples/server/petstore/jaxrs-cxf/pom.xml b/samples/server/petstore/jaxrs-cxf/pom.xml index 9403958f983f9f3bd938c2f18f43aa4f0f3854ce..176ad140ef9201f924d6a233ce780cecfc494691 100644 --- a/samples/server/petstore/jaxrs-cxf/pom.xml +++ b/samples/server/petstore/jaxrs-cxf/pom.xml @@ -84,7 +84,7 @@ </execution> </executions> </plugin> - + <!-- build WAR file --> <plugin> <artifactId>maven-war-plugin</artifactId> @@ -134,7 +134,7 @@ <version>${cxf-version}</version> <scope>test</scope> </dependency> - + <!-- CXF server --> <dependency> <groupId>org.apache.cxf</groupId> diff --git a/samples/server/petstore/jaxrs-cxf/src/gen/java/org/openapitools/api/AnotherFakeApi.java b/samples/server/petstore/jaxrs-cxf/src/gen/java/org/openapitools/api/AnotherFakeApi.java index da4024aa5e73cba93312bec1549972e5101d9af4..8fabf5ac50d80bd69cf71f91d4319a610c130e9e 100644 --- a/samples/server/petstore/jaxrs-cxf/src/gen/java/org/openapitools/api/AnotherFakeApi.java +++ b/samples/server/petstore/jaxrs-cxf/src/gen/java/org/openapitools/api/AnotherFakeApi.java @@ -44,4 +44,3 @@ public interface AnotherFakeApi { @ApiResponse(code = 200, message = "successful operation", response = Client.class) }) public Client call123testSpecialTags(@Valid @NotNull Client body); } - 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 7617659eb97ccef2ea1b15c40d24fc60dd9c6aca..57b44d3b82ba9e61d8a181d4327b9101edf43739 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 @@ -98,7 +98,7 @@ public interface FakeApi { @ApiOperation(value = "", tags={ "fake" }) @ApiResponses(value = { @ApiResponse(code = 200, message = "Success") }) - public void testBodyWithQueryParams(@QueryParam("query") @NotNull String query, @Valid @NotNull User body); + public void testBodyWithQueryParams(@QueryParam("query") @NotNull String query, @Valid @NotNull User body); /** * To test \"client\" model @@ -143,7 +143,7 @@ public interface FakeApi { @ApiResponses(value = { @ApiResponse(code = 400, message = "Invalid request"), @ApiResponse(code = 404, message = "Not found") }) - public void testEnumParameters(@HeaderParam("enum_header_string_array") List<String> enumHeaderStringArray, @HeaderParam("enum_header_string") String enumHeaderString, @QueryParam("enum_query_string_array") List<String> enumQueryStringArray, @QueryParam("enum_query_string") @DefaultValue("-efg")String enumQueryString, @QueryParam("enum_query_integer") Integer enumQueryInteger, @QueryParam("enum_query_double") Double enumQueryDouble, @Multipart(value = "enum_form_string_array", required = false) List<String> enumFormStringArray, @Multipart(value = "enum_form_string", required = false) String enumFormString); + public void testEnumParameters(@HeaderParam("enum_header_string_array") List<String> enumHeaderStringArray, @HeaderParam("enum_header_string") String enumHeaderString, @QueryParam("enum_query_string_array") List<String> enumQueryStringArray, @QueryParam("enum_query_string") @DefaultValue("-efg")String enumQueryString, @QueryParam("enum_query_integer") Integer enumQueryInteger, @QueryParam("enum_query_double") Double enumQueryDouble, @Multipart(value = "enum_form_string_array", required = false) List<String> enumFormStringArray, @Multipart(value = "enum_form_string", required = false) String enumFormString); /** * Fake endpoint to test group parameters (optional) @@ -156,7 +156,7 @@ public interface FakeApi { @ApiOperation(value = "Fake endpoint to test group parameters (optional)", tags={ "fake" }) @ApiResponses(value = { @ApiResponse(code = 400, message = "Someting wrong") }) - public void testGroupParameters(@QueryParam("required_string_group") @NotNull Integer requiredStringGroup, @HeaderParam("required_boolean_group") @NotNull Boolean requiredBooleanGroup, @QueryParam("required_int64_group") @NotNull Long requiredInt64Group, @QueryParam("string_group") Integer stringGroup, @HeaderParam("boolean_group") Boolean booleanGroup, @QueryParam("int64_group") Long int64Group); + public void testGroupParameters(@QueryParam("required_string_group") @NotNull Integer requiredStringGroup, @HeaderParam("required_boolean_group") @NotNull Boolean requiredBooleanGroup, @QueryParam("required_int64_group") @NotNull Long requiredInt64Group, @QueryParam("string_group") Integer stringGroup, @HeaderParam("boolean_group") Boolean booleanGroup, @QueryParam("int64_group") Long int64Group); /** * test inline additionalProperties @@ -187,6 +187,5 @@ public interface FakeApi { @ApiOperation(value = "", tags={ "fake" }) @ApiResponses(value = { @ApiResponse(code = 200, message = "Success") }) - public void testQueryParameterCollectionFormat(@QueryParam("pipe") @NotNull List<String> pipe, @QueryParam("ioutil") @NotNull List<String> ioutil, @QueryParam("http") @NotNull List<String> http, @QueryParam("url") @NotNull List<String> url, @QueryParam("context") @NotNull List<String> context); + public void testQueryParameterCollectionFormat(@QueryParam("pipe") @NotNull List<String> pipe, @QueryParam("ioutil") @NotNull List<String> ioutil, @QueryParam("http") @NotNull List<String> http, @QueryParam("url") @NotNull List<String> url, @QueryParam("context") @NotNull List<String> context); } - diff --git a/samples/server/petstore/jaxrs-cxf/src/gen/java/org/openapitools/api/FakeClassnameTags123Api.java b/samples/server/petstore/jaxrs-cxf/src/gen/java/org/openapitools/api/FakeClassnameTags123Api.java index e54bc36b87837a3b500912960d8d373a58666f57..9b593bee6ad219dab6ac113ad326a97fbcd86ce9 100644 --- a/samples/server/petstore/jaxrs-cxf/src/gen/java/org/openapitools/api/FakeClassnameTags123Api.java +++ b/samples/server/petstore/jaxrs-cxf/src/gen/java/org/openapitools/api/FakeClassnameTags123Api.java @@ -44,4 +44,3 @@ public interface FakeClassnameTags123Api { @ApiResponse(code = 200, message = "successful operation", response = Client.class) }) public Client testClassname(@Valid @NotNull Client body); } - diff --git a/samples/server/petstore/jaxrs-cxf/src/gen/java/org/openapitools/api/PetApi.java b/samples/server/petstore/jaxrs-cxf/src/gen/java/org/openapitools/api/PetApi.java index 178eb293d055d7babd63023f27f9de0a6a32eef1..347d635a02cd0d9a2fe7c5ce0f8c05d6003f25fc 100644 --- a/samples/server/petstore/jaxrs-cxf/src/gen/java/org/openapitools/api/PetApi.java +++ b/samples/server/petstore/jaxrs-cxf/src/gen/java/org/openapitools/api/PetApi.java @@ -55,7 +55,7 @@ public interface PetApi { @ApiResponses(value = { @ApiResponse(code = 200, message = "successful operation"), @ApiResponse(code = 400, message = "Invalid pet value") }) - public void deletePet(@PathParam("petId") Long petId, @HeaderParam("api_key") String apiKey); + public void deletePet(@PathParam("petId") Long petId, @HeaderParam("api_key") String apiKey); /** * Finds Pets by status @@ -70,7 +70,7 @@ public interface PetApi { @ApiResponses(value = { @ApiResponse(code = 200, message = "successful operation", response = Pet.class, responseContainer = "List"), @ApiResponse(code = 400, message = "Invalid status value") }) - public List<Pet> findPetsByStatus(@QueryParam("status") @NotNull List<String> status); + public List<Pet> findPetsByStatus(@QueryParam("status") @NotNull List<String> status); /** * Finds Pets by tags @@ -85,7 +85,7 @@ public interface PetApi { @ApiResponses(value = { @ApiResponse(code = 200, message = "successful operation", response = Pet.class, responseContainer = "Set"), @ApiResponse(code = 400, message = "Invalid tag value") }) - public Set<Pet> findPetsByTags(@QueryParam("tags") @NotNull Set<String> tags); + public Set<Pet> findPetsByTags(@QueryParam("tags") @NotNull Set<String> tags); /** * Find pet by ID @@ -156,4 +156,3 @@ public interface PetApi { @ApiResponse(code = 200, message = "successful operation", response = ModelApiResponse.class) }) public ModelApiResponse uploadFileWithRequiredFile(@PathParam("petId") Long petId, @Multipart(value = "requiredFile" ) Attachment requiredFileDetail, @Multipart(value = "additionalMetadata", required = false) String additionalMetadata); } - diff --git a/samples/server/petstore/jaxrs-cxf/src/gen/java/org/openapitools/api/StoreApi.java b/samples/server/petstore/jaxrs-cxf/src/gen/java/org/openapitools/api/StoreApi.java index a859518bffb0d8355c19d361f0e932013159aeba..6b23b7c95a974cfce582790d6210e549aaa1242b 100644 --- a/samples/server/petstore/jaxrs-cxf/src/gen/java/org/openapitools/api/StoreApi.java +++ b/samples/server/petstore/jaxrs-cxf/src/gen/java/org/openapitools/api/StoreApi.java @@ -87,4 +87,3 @@ public interface StoreApi { @ApiResponse(code = 400, message = "Invalid Order") }) public Order placeOrder(@Valid @NotNull Order body); } - diff --git a/samples/server/petstore/jaxrs-cxf/src/gen/java/org/openapitools/api/UserApi.java b/samples/server/petstore/jaxrs-cxf/src/gen/java/org/openapitools/api/UserApi.java index 1162feb466e90a3854feb314c8761154e3f05ce1..40ad9d927032cd35d5f7e9a0446c52e20861ba85 100644 --- a/samples/server/petstore/jaxrs-cxf/src/gen/java/org/openapitools/api/UserApi.java +++ b/samples/server/petstore/jaxrs-cxf/src/gen/java/org/openapitools/api/UserApi.java @@ -104,7 +104,7 @@ public interface UserApi { @ApiResponses(value = { @ApiResponse(code = 200, message = "successful operation", response = String.class), @ApiResponse(code = 400, message = "Invalid username/password supplied") }) - public String loginUser(@QueryParam("username") @NotNull String username, @QueryParam("password") @NotNull String password); + public String loginUser(@QueryParam("username") @NotNull String username, @QueryParam("password") @NotNull String password); /** * Logs out current logged in user session @@ -131,4 +131,3 @@ public interface UserApi { @ApiResponse(code = 404, message = "User not found") }) public void updateUser(@PathParam("username") String username, @Valid @NotNull User body); } - diff --git a/samples/server/petstore/jaxrs-cxf/src/gen/java/org/openapitools/model/EnumClass.java b/samples/server/petstore/jaxrs-cxf/src/gen/java/org/openapitools/model/EnumClass.java index 3c9c8ea8409b5493b924cb4cdfdcff899d6f479b..aac72d0202020734d6eb28f85d768d19882684f8 100644 --- a/samples/server/petstore/jaxrs-cxf/src/gen/java/org/openapitools/model/EnumClass.java +++ b/samples/server/petstore/jaxrs-cxf/src/gen/java/org/openapitools/model/EnumClass.java @@ -38,6 +38,6 @@ public enum EnumClass { } throw new IllegalArgumentException("Unexpected value '" + value + "'"); } - + } diff --git a/samples/server/petstore/jaxrs-cxf/src/gen/java/org/openapitools/model/OuterEnum.java b/samples/server/petstore/jaxrs-cxf/src/gen/java/org/openapitools/model/OuterEnum.java index b6870dca1e7b047667c5ed8a3ff7a18eb3253446..e745ca76055c68e8e0719403ae856584af01ac6e 100644 --- a/samples/server/petstore/jaxrs-cxf/src/gen/java/org/openapitools/model/OuterEnum.java +++ b/samples/server/petstore/jaxrs-cxf/src/gen/java/org/openapitools/model/OuterEnum.java @@ -38,6 +38,6 @@ public enum OuterEnum { } throw new IllegalArgumentException("Unexpected value '" + value + "'"); } - + } diff --git a/samples/server/petstore/jaxrs-datelib-j8/pom.xml b/samples/server/petstore/jaxrs-datelib-j8/pom.xml index 56dda9ce81e59144f9be7a404f5d9a8350469d16..ad23b7368dce5f794cd4683df85d71479b842729 100644 --- a/samples/server/petstore/jaxrs-datelib-j8/pom.xml +++ b/samples/server/petstore/jaxrs-datelib-j8/pom.xml @@ -13,7 +13,7 @@ <distribution>repo</distribution> </license> </licenses> - + <build> <sourceDirectory>src/main/java</sourceDirectory> <plugins> @@ -157,7 +157,7 @@ <version>2.2</version> </dependency> - + <!-- Bean Validation API support --> <dependency> <groupId>javax.validation</groupId> diff --git a/samples/server/petstore/jaxrs-datelib-j8/src/gen/java/org/openapitools/api/AnotherFakeApi.java b/samples/server/petstore/jaxrs-datelib-j8/src/gen/java/org/openapitools/api/AnotherFakeApi.java index 8f7d9a631ce16eb2c4eed84928a5e2d42faaafd2..7243aca1894fb25604a9fcd46c68952b9612fad6 100644 --- a/samples/server/petstore/jaxrs-datelib-j8/src/gen/java/org/openapitools/api/AnotherFakeApi.java +++ b/samples/server/petstore/jaxrs-datelib-j8/src/gen/java/org/openapitools/api/AnotherFakeApi.java @@ -45,7 +45,7 @@ public class AnotherFakeApi { } catch (Exception e) { throw new RuntimeException(e); } - } + } } if (delegate == null) { 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 9fed962abf02691dc74dda3595c244a585b0c35e..5da901bb1060c63e7986db2be2cc3c03d21d0823 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 @@ -55,7 +55,7 @@ public class FakeApi { } catch (Exception e) { throw new RuntimeException(e); } - } + } } if (delegate == null) { diff --git a/samples/server/petstore/jaxrs-datelib-j8/src/gen/java/org/openapitools/api/FakeClassnameTestApi.java b/samples/server/petstore/jaxrs-datelib-j8/src/gen/java/org/openapitools/api/FakeClassnameTestApi.java index cb2aa18bb8044a2cdca5599d082ec5e49a8eef0e..73c97f612555d1f721bd3a01c0800be67f292075 100644 --- a/samples/server/petstore/jaxrs-datelib-j8/src/gen/java/org/openapitools/api/FakeClassnameTestApi.java +++ b/samples/server/petstore/jaxrs-datelib-j8/src/gen/java/org/openapitools/api/FakeClassnameTestApi.java @@ -45,7 +45,7 @@ public class FakeClassnameTestApi { } catch (Exception e) { throw new RuntimeException(e); } - } + } } if (delegate == null) { diff --git a/samples/server/petstore/jaxrs-datelib-j8/src/gen/java/org/openapitools/api/PetApi.java b/samples/server/petstore/jaxrs-datelib-j8/src/gen/java/org/openapitools/api/PetApi.java index a31dd8b4083ca74fa64648148251a75ebf59111b..f404694759ddc50cf6220264f119c3fdfbdbb24d 100644 --- a/samples/server/petstore/jaxrs-datelib-j8/src/gen/java/org/openapitools/api/PetApi.java +++ b/samples/server/petstore/jaxrs-datelib-j8/src/gen/java/org/openapitools/api/PetApi.java @@ -48,7 +48,7 @@ public class PetApi { } catch (Exception e) { throw new RuntimeException(e); } - } + } } if (delegate == null) { diff --git a/samples/server/petstore/jaxrs-datelib-j8/src/gen/java/org/openapitools/api/StoreApi.java b/samples/server/petstore/jaxrs-datelib-j8/src/gen/java/org/openapitools/api/StoreApi.java index 39fbe7fb8749c33db0ed161526201434e92f613e..0a853c97eabfc98fdb05a18b882de6fbb4b120df 100644 --- a/samples/server/petstore/jaxrs-datelib-j8/src/gen/java/org/openapitools/api/StoreApi.java +++ b/samples/server/petstore/jaxrs-datelib-j8/src/gen/java/org/openapitools/api/StoreApi.java @@ -46,7 +46,7 @@ public class StoreApi { } catch (Exception e) { throw new RuntimeException(e); } - } + } } if (delegate == null) { diff --git a/samples/server/petstore/jaxrs-datelib-j8/src/gen/java/org/openapitools/api/UserApi.java b/samples/server/petstore/jaxrs-datelib-j8/src/gen/java/org/openapitools/api/UserApi.java index 36cc9df40f16aeac4507204a5208b5019d438c1e..05b3b1e61cce4c9ad5524eb01d6e1474e13dd15e 100644 --- a/samples/server/petstore/jaxrs-datelib-j8/src/gen/java/org/openapitools/api/UserApi.java +++ b/samples/server/petstore/jaxrs-datelib-j8/src/gen/java/org/openapitools/api/UserApi.java @@ -46,7 +46,7 @@ public class UserApi { } catch (Exception e) { throw new RuntimeException(e); } - } + } } if (delegate == null) { diff --git a/samples/server/petstore/jaxrs-jersey/pom.xml b/samples/server/petstore/jaxrs-jersey/pom.xml index 242055058d7becfbf7f4e223227f7ddbecf4af7b..2dff253568189077e5239e20a8f3316266931d8d 100644 --- a/samples/server/petstore/jaxrs-jersey/pom.xml +++ b/samples/server/petstore/jaxrs-jersey/pom.xml @@ -13,7 +13,7 @@ <distribution>repo</distribution> </license> </licenses> - + <build> <sourceDirectory>src/main/java</sourceDirectory> <plugins> @@ -157,7 +157,7 @@ <version>2.2</version> </dependency> - + <!-- Bean Validation API support --> <dependency> <groupId>javax.validation</groupId> diff --git a/samples/server/petstore/jaxrs-jersey/src/gen/java/org/openapitools/api/AnotherFakeApi.java b/samples/server/petstore/jaxrs-jersey/src/gen/java/org/openapitools/api/AnotherFakeApi.java index 107c2ff4dabe15fc6078262ba207478ef2bd9228..1ea9958f5fdae5985e47a8bd829b51ecabab9527 100644 --- a/samples/server/petstore/jaxrs-jersey/src/gen/java/org/openapitools/api/AnotherFakeApi.java +++ b/samples/server/petstore/jaxrs-jersey/src/gen/java/org/openapitools/api/AnotherFakeApi.java @@ -45,7 +45,7 @@ public class AnotherFakeApi { } catch (Exception e) { throw new RuntimeException(e); } - } + } } if (delegate == null) { diff --git a/samples/server/petstore/jaxrs-jersey/src/gen/java/org/openapitools/api/FakeApi.java b/samples/server/petstore/jaxrs-jersey/src/gen/java/org/openapitools/api/FakeApi.java index 9cfd7cd8869ee694b658aad3024e732aff1d9619..33df9fd68e3c1c62c7dad0621cadd46920d984f0 100644 --- a/samples/server/petstore/jaxrs-jersey/src/gen/java/org/openapitools/api/FakeApi.java +++ b/samples/server/petstore/jaxrs-jersey/src/gen/java/org/openapitools/api/FakeApi.java @@ -56,7 +56,7 @@ public class FakeApi { } catch (Exception e) { throw new RuntimeException(e); } - } + } } if (delegate == null) { diff --git a/samples/server/petstore/jaxrs-jersey/src/gen/java/org/openapitools/api/FakeClassnameTestApi.java b/samples/server/petstore/jaxrs-jersey/src/gen/java/org/openapitools/api/FakeClassnameTestApi.java index 610cdf10541889a6fff88aabb2150946fdc4aa83..1877908e3f0fb9657278b531a2d173c09fca8128 100644 --- a/samples/server/petstore/jaxrs-jersey/src/gen/java/org/openapitools/api/FakeClassnameTestApi.java +++ b/samples/server/petstore/jaxrs-jersey/src/gen/java/org/openapitools/api/FakeClassnameTestApi.java @@ -45,7 +45,7 @@ public class FakeClassnameTestApi { } catch (Exception e) { throw new RuntimeException(e); } - } + } } if (delegate == null) { diff --git a/samples/server/petstore/jaxrs-jersey/src/gen/java/org/openapitools/api/FooApi.java b/samples/server/petstore/jaxrs-jersey/src/gen/java/org/openapitools/api/FooApi.java index c03c94e18f244fc6f4933507337e582fafab2585..41da9a8d09dac2c9e06e94d6cf31571c94f47f3e 100644 --- a/samples/server/petstore/jaxrs-jersey/src/gen/java/org/openapitools/api/FooApi.java +++ b/samples/server/petstore/jaxrs-jersey/src/gen/java/org/openapitools/api/FooApi.java @@ -45,7 +45,7 @@ public class FooApi { } catch (Exception e) { throw new RuntimeException(e); } - } + } } if (delegate == null) { diff --git a/samples/server/petstore/jaxrs-jersey/src/gen/java/org/openapitools/api/PetApi.java b/samples/server/petstore/jaxrs-jersey/src/gen/java/org/openapitools/api/PetApi.java index 7bd7f41f1203a9953afb7b5f9f6430cd6d4e1532..4c09a881ef754cb2936576745b7627fc4c68d29a 100644 --- a/samples/server/petstore/jaxrs-jersey/src/gen/java/org/openapitools/api/PetApi.java +++ b/samples/server/petstore/jaxrs-jersey/src/gen/java/org/openapitools/api/PetApi.java @@ -48,7 +48,7 @@ public class PetApi { } catch (Exception e) { throw new RuntimeException(e); } - } + } } if (delegate == null) { diff --git a/samples/server/petstore/jaxrs-jersey/src/gen/java/org/openapitools/api/StoreApi.java b/samples/server/petstore/jaxrs-jersey/src/gen/java/org/openapitools/api/StoreApi.java index 59e5838348c31cc8b475f7919e9bd59181fa95ab..4a4f1c23080fd0e669d305f0d896690dd2b157e8 100644 --- a/samples/server/petstore/jaxrs-jersey/src/gen/java/org/openapitools/api/StoreApi.java +++ b/samples/server/petstore/jaxrs-jersey/src/gen/java/org/openapitools/api/StoreApi.java @@ -46,7 +46,7 @@ public class StoreApi { } catch (Exception e) { throw new RuntimeException(e); } - } + } } if (delegate == null) { diff --git a/samples/server/petstore/jaxrs-jersey/src/gen/java/org/openapitools/api/UserApi.java b/samples/server/petstore/jaxrs-jersey/src/gen/java/org/openapitools/api/UserApi.java index e394533a2522441106051c3414cf0e46c2a32b80..6d96f196c9e52673d47026d447c8632c6677428b 100644 --- a/samples/server/petstore/jaxrs-jersey/src/gen/java/org/openapitools/api/UserApi.java +++ b/samples/server/petstore/jaxrs-jersey/src/gen/java/org/openapitools/api/UserApi.java @@ -46,7 +46,7 @@ public class UserApi { } catch (Exception e) { throw new RuntimeException(e); } - } + } } if (delegate == null) { diff --git a/samples/server/petstore/jaxrs-resteasy/default-value/pom.xml b/samples/server/petstore/jaxrs-resteasy/default-value/pom.xml index ec4d3e12eb80a07c6a7dafb06e80c041cee29dc6..d819f54c5b05c6341f43380ad345b72f90055288 100644 --- a/samples/server/petstore/jaxrs-resteasy/default-value/pom.xml +++ b/samples/server/petstore/jaxrs-resteasy/default-value/pom.xml @@ -174,7 +174,7 @@ <version>1.1.0.Final</version> <scope>provided</scope> </dependency> - + </dependencies> <repositories> <repository> diff --git a/samples/server/petstore/jaxrs-resteasy/default-value/src/gen/java/org/openapitools/api/ApiResponseMessage.java b/samples/server/petstore/jaxrs-resteasy/default-value/src/gen/java/org/openapitools/api/ApiResponseMessage.java index 35fc693af013b4a75850d255d403fe3316c98241..9e071aa75fdd7cb36b297d9a54a96c36436b50fb 100644 --- a/samples/server/petstore/jaxrs-resteasy/default-value/src/gen/java/org/openapitools/api/ApiResponseMessage.java +++ b/samples/server/petstore/jaxrs-resteasy/default-value/src/gen/java/org/openapitools/api/ApiResponseMessage.java @@ -14,9 +14,9 @@ public class ApiResponseMessage { int code; String type; String message; - + public ApiResponseMessage(){} - + public ApiResponseMessage(int code, String message){ this.code = code; switch(code){ diff --git a/samples/server/petstore/jaxrs-resteasy/default-value/src/gen/java/org/openapitools/api/TestHeadersApi.java b/samples/server/petstore/jaxrs-resteasy/default-value/src/gen/java/org/openapitools/api/TestHeadersApi.java index fdd40e2a86405c21f5b32de7ec63ae3bcd6c330d..d8e7c529b10ab36939a74ca2307f3ea45c30afa0 100644 --- a/samples/server/petstore/jaxrs-resteasy/default-value/src/gen/java/org/openapitools/api/TestHeadersApi.java +++ b/samples/server/petstore/jaxrs-resteasy/default-value/src/gen/java/org/openapitools/api/TestHeadersApi.java @@ -40,7 +40,7 @@ public class TestHeadersApi { @io.swagger.annotations.ApiOperation(value = "test headers", notes = "desc", response = TestResponse.class, tags={ "verify-default-value", }) @io.swagger.annotations.ApiResponses(value = { @io.swagger.annotations.ApiResponse(code = 200, message = "default response", response = TestResponse.class) }) - public Response headersTest( @ApiParam(value = "" , defaultValue="11.2") @HeaderParam("headerNumber") BigDecimal headerNumber, @ApiParam(value = "" , defaultValue="qwerty") @HeaderParam("headerString") String headerString, @ApiParam(value = "" , defaultValue="qwerty") @HeaderParam("headerStringWrapped") String headerStringWrapped, @ApiParam(value = "" , defaultValue="qwerty\"with quotes\" test") @HeaderParam("headerStringQuotes") String headerStringQuotes, @ApiParam(value = "" , defaultValue="qwerty\"with quotes\" test") @HeaderParam("headerStringQuotesWrapped") String headerStringQuotesWrapped, @ApiParam(value = "" , defaultValue="true") @HeaderParam("headerBoolean") Boolean headerBoolean,@Context SecurityContext securityContext) + public Response headersTest( @ApiParam(value = "" , defaultValue="11.2") @HeaderParam("headerNumber") BigDecimal headerNumber, @ApiParam(value = "" , defaultValue="qwerty") @HeaderParam("headerString") String headerString, @ApiParam(value = "" , defaultValue="qwerty") @HeaderParam("headerStringWrapped") String headerStringWrapped, @ApiParam(value = "" , defaultValue="qwerty\"with quotes\" test") @HeaderParam("headerStringQuotes") String headerStringQuotes, @ApiParam(value = "" , defaultValue="qwerty\"with quotes\" test") @HeaderParam("headerStringQuotesWrapped") String headerStringQuotesWrapped, @ApiParam(value = "" , defaultValue="true") @HeaderParam("headerBoolean") Boolean headerBoolean,@Context SecurityContext securityContext) throws NotFoundException { return service.headersTest(headerNumber,headerString,headerStringWrapped,headerStringQuotes,headerStringQuotesWrapped,headerBoolean,securityContext); } diff --git a/samples/server/petstore/jaxrs-resteasy/default-value/src/gen/java/org/openapitools/api/TestQueryParamsApi.java b/samples/server/petstore/jaxrs-resteasy/default-value/src/gen/java/org/openapitools/api/TestQueryParamsApi.java index d2d873ef5910b4b071c1bd677490ebce6154e5f6..ec0099e1813ec67f3a09f7f7ed8ec9ecf961e209 100644 --- a/samples/server/petstore/jaxrs-resteasy/default-value/src/gen/java/org/openapitools/api/TestQueryParamsApi.java +++ b/samples/server/petstore/jaxrs-resteasy/default-value/src/gen/java/org/openapitools/api/TestQueryParamsApi.java @@ -40,7 +40,7 @@ public class TestQueryParamsApi { @io.swagger.annotations.ApiOperation(value = "test query params", notes = "desc", response = TestResponse.class, tags={ "verify-default-value", }) @io.swagger.annotations.ApiResponses(value = { @io.swagger.annotations.ApiResponse(code = 200, message = "default response", response = TestResponse.class) }) - public Response queryParamsTest( @DefaultValue("11.2") @QueryParam("queryNumber") BigDecimal queryNumber, @DefaultValue("qwerty") @QueryParam("queryString") String queryString, @DefaultValue("qwerty") @QueryParam("queryStringWrapped") String queryStringWrapped, @DefaultValue("qwerty\"with quotes\" test") @QueryParam("queryStringQuotes") String queryStringQuotes, @DefaultValue("qwerty\"with quotes\" test") @QueryParam("queryStringQuotesWrapped") String queryStringQuotesWrapped, @DefaultValue("true") @QueryParam("queryBoolean") Boolean queryBoolean,@Context SecurityContext securityContext) + public Response queryParamsTest( @DefaultValue("11.2") @QueryParam("queryNumber") BigDecimal queryNumber, @DefaultValue("qwerty") @QueryParam("queryString") String queryString, @DefaultValue("qwerty") @QueryParam("queryStringWrapped") String queryStringWrapped, @DefaultValue("qwerty\"with quotes\" test") @QueryParam("queryStringQuotes") String queryStringQuotes, @DefaultValue("qwerty\"with quotes\" test") @QueryParam("queryStringQuotesWrapped") String queryStringQuotesWrapped, @DefaultValue("true") @QueryParam("queryBoolean") Boolean queryBoolean,@Context SecurityContext securityContext) throws NotFoundException { return service.queryParamsTest(queryNumber,queryString,queryStringWrapped,queryStringQuotes,queryStringQuotesWrapped,queryBoolean,securityContext); } diff --git a/samples/server/petstore/jaxrs-resteasy/default/pom.xml b/samples/server/petstore/jaxrs-resteasy/default/pom.xml index 06b45bb1e6acc9235d672e9a84007cf2511e66e7..d8a441c6292251578c16989ee8ab05260926b2e3 100644 --- a/samples/server/petstore/jaxrs-resteasy/default/pom.xml +++ b/samples/server/petstore/jaxrs-resteasy/default/pom.xml @@ -174,7 +174,7 @@ <version>1.1.0.Final</version> <scope>provided</scope> </dependency> - + </dependencies> <repositories> <repository> diff --git a/samples/server/petstore/jaxrs-resteasy/default/src/gen/java/org/openapitools/api/ApiResponseMessage.java b/samples/server/petstore/jaxrs-resteasy/default/src/gen/java/org/openapitools/api/ApiResponseMessage.java index 35fc693af013b4a75850d255d403fe3316c98241..9e071aa75fdd7cb36b297d9a54a96c36436b50fb 100644 --- a/samples/server/petstore/jaxrs-resteasy/default/src/gen/java/org/openapitools/api/ApiResponseMessage.java +++ b/samples/server/petstore/jaxrs-resteasy/default/src/gen/java/org/openapitools/api/ApiResponseMessage.java @@ -14,9 +14,9 @@ public class ApiResponseMessage { int code; String type; String message; - + public ApiResponseMessage(){} - + public ApiResponseMessage(int code, String message){ this.code = code; switch(code){ diff --git a/samples/server/petstore/jaxrs-resteasy/default/src/gen/java/org/openapitools/api/PetApi.java b/samples/server/petstore/jaxrs-resteasy/default/src/gen/java/org/openapitools/api/PetApi.java index 327b00e46c7368037e6f68855d0dce1f62c98d0d..e7e6850d9799733e6c23977e162c6682d29b7792 100644 --- a/samples/server/petstore/jaxrs-resteasy/default/src/gen/java/org/openapitools/api/PetApi.java +++ b/samples/server/petstore/jaxrs-resteasy/default/src/gen/java/org/openapitools/api/PetApi.java @@ -63,7 +63,7 @@ public class PetApi { }, tags={ "pet", }) @io.swagger.annotations.ApiResponses(value = { @io.swagger.annotations.ApiResponse(code = 400, message = "Invalid pet value", response = Void.class) }) - public Response deletePet( @PathParam("petId") Long petId, @ApiParam(value = "" ) @HeaderParam("api_key") String apiKey,@Context SecurityContext securityContext) + public Response deletePet( @PathParam("petId") Long petId, @ApiParam(value = "" ) @HeaderParam("api_key") String apiKey,@Context SecurityContext securityContext) throws NotFoundException { return service.deletePet(petId,apiKey,securityContext); } @@ -81,7 +81,7 @@ public class PetApi { @io.swagger.annotations.ApiResponse(code = 200, message = "successful operation", response = Pet.class, responseContainer = "List"), @io.swagger.annotations.ApiResponse(code = 400, message = "Invalid status value", response = Void.class) }) - public Response findPetsByStatus( @NotNull @QueryParam("status") List<String> status,@Context SecurityContext securityContext) + public Response findPetsByStatus( @NotNull @QueryParam("status") List<String> status,@Context SecurityContext securityContext) throws NotFoundException { return service.findPetsByStatus(status,securityContext); } @@ -99,7 +99,7 @@ public class PetApi { @io.swagger.annotations.ApiResponse(code = 200, message = "successful operation", response = Pet.class, responseContainer = "List"), @io.swagger.annotations.ApiResponse(code = 400, message = "Invalid tag value", response = Void.class) }) - public Response findPetsByTags( @NotNull @QueryParam("tags") List<String> tags,@Context SecurityContext securityContext) + public Response findPetsByTags( @NotNull @QueryParam("tags") List<String> tags,@Context SecurityContext securityContext) throws NotFoundException { return service.findPetsByTags(tags,securityContext); } diff --git a/samples/server/petstore/jaxrs-resteasy/default/src/gen/java/org/openapitools/api/UserApi.java b/samples/server/petstore/jaxrs-resteasy/default/src/gen/java/org/openapitools/api/UserApi.java index d325a05a54f1ba28418b06ad216792dc610cfe8c..d9780d5234b61154b0572d62f2a1f1aedda0cb71 100644 --- a/samples/server/petstore/jaxrs-resteasy/default/src/gen/java/org/openapitools/api/UserApi.java +++ b/samples/server/petstore/jaxrs-resteasy/default/src/gen/java/org/openapitools/api/UserApi.java @@ -103,7 +103,7 @@ public class UserApi { @io.swagger.annotations.ApiResponse(code = 200, message = "successful operation", response = String.class), @io.swagger.annotations.ApiResponse(code = 400, message = "Invalid username/password supplied", response = Void.class) }) - public Response loginUser( @NotNull @QueryParam("username") String username, @NotNull @QueryParam("password") String password,@Context SecurityContext securityContext) + public Response loginUser( @NotNull @QueryParam("username") String username, @NotNull @QueryParam("password") String password,@Context SecurityContext securityContext) throws NotFoundException { return service.loginUser(username,password,securityContext); } diff --git a/samples/server/petstore/jaxrs-resteasy/eap-java8/pom.xml b/samples/server/petstore/jaxrs-resteasy/eap-java8/pom.xml index 199948771613451859a1f81dd3a8f9733d21e065..13d16f18958355dd6a5f498425e4f165b51c90e8 100644 --- a/samples/server/petstore/jaxrs-resteasy/eap-java8/pom.xml +++ b/samples/server/petstore/jaxrs-resteasy/eap-java8/pom.xml @@ -150,7 +150,7 @@ <artifactId>jackson-datatype-jsr310</artifactId> <version>2.9.9</version> </dependency> - + </dependencies> <repositories> <repository> diff --git a/samples/server/petstore/jaxrs-resteasy/eap-java8/src/gen/java/org/openapitools/api/PetApi.java b/samples/server/petstore/jaxrs-resteasy/eap-java8/src/gen/java/org/openapitools/api/PetApi.java index 5b44c238acb19d8387b0bd3be68a46511e3b942a..1e2e42d17aaf3e548b56c54567fbfe6dc3a8edc4 100644 --- a/samples/server/petstore/jaxrs-resteasy/eap-java8/src/gen/java/org/openapitools/api/PetApi.java +++ b/samples/server/petstore/jaxrs-resteasy/eap-java8/src/gen/java/org/openapitools/api/PetApi.java @@ -28,7 +28,7 @@ import org.jboss.resteasy.plugins.providers.multipart.MultipartFormDataInput; @io.swagger.annotations.Api(description = "the pet API") @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaResteasyEapServerCodegen") public interface PetApi { - + @POST @Consumes({ "application/json", "application/xml" }) @@ -54,7 +54,7 @@ public interface PetApi { }, tags={ "pet", }) @io.swagger.annotations.ApiResponses(value = { @io.swagger.annotations.ApiResponse(code = 400, message = "Invalid pet value", response = Void.class) }) - public Response deletePet( @PathParam("petId") Long petId, @ApiParam(value = "" ) @HeaderParam("api_key") String apiKey,@Context SecurityContext securityContext); + public Response deletePet( @PathParam("petId") Long petId, @ApiParam(value = "" ) @HeaderParam("api_key") String apiKey,@Context SecurityContext securityContext); @GET @Path("/findByStatus") @@ -69,7 +69,7 @@ public interface PetApi { @io.swagger.annotations.ApiResponse(code = 200, message = "successful operation", response = Pet.class, responseContainer = "List"), @io.swagger.annotations.ApiResponse(code = 400, message = "Invalid status value", response = Void.class) }) - public Response findPetsByStatus( @NotNull @QueryParam("status") List<String> status,@Context SecurityContext securityContext); + public Response findPetsByStatus( @NotNull @QueryParam("status") List<String> status,@Context SecurityContext securityContext); @GET @Path("/findByTags") @@ -84,7 +84,7 @@ public interface PetApi { @io.swagger.annotations.ApiResponse(code = 200, message = "successful operation", response = Pet.class, responseContainer = "List"), @io.swagger.annotations.ApiResponse(code = 400, message = "Invalid tag value", response = Void.class) }) - public Response findPetsByTags( @NotNull @QueryParam("tags") List<String> tags,@Context SecurityContext securityContext); + public Response findPetsByTags( @NotNull @QueryParam("tags") List<String> tags,@Context SecurityContext securityContext); @GET @Path("/{petId}") diff --git a/samples/server/petstore/jaxrs-resteasy/eap-java8/src/gen/java/org/openapitools/api/StoreApi.java b/samples/server/petstore/jaxrs-resteasy/eap-java8/src/gen/java/org/openapitools/api/StoreApi.java index 8408fb1d4c9729f8a99dfeaa754bf3f9c677d6c5..11213b47e314a0d12982924297200df574bcd5ce 100644 --- a/samples/server/petstore/jaxrs-resteasy/eap-java8/src/gen/java/org/openapitools/api/StoreApi.java +++ b/samples/server/petstore/jaxrs-resteasy/eap-java8/src/gen/java/org/openapitools/api/StoreApi.java @@ -26,7 +26,7 @@ import javax.validation.Valid; @io.swagger.annotations.Api(description = "the store API") @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaResteasyEapServerCodegen") public interface StoreApi { - + @DELETE @Path("/order/{orderId}") diff --git a/samples/server/petstore/jaxrs-resteasy/eap-java8/src/gen/java/org/openapitools/api/UserApi.java b/samples/server/petstore/jaxrs-resteasy/eap-java8/src/gen/java/org/openapitools/api/UserApi.java index 2edd72e2304b2dc46200c3d51b916b5fd2b6b92a..22506d0ee4dad9e118ace2d42e60f1f77b2fd7fc 100644 --- a/samples/server/petstore/jaxrs-resteasy/eap-java8/src/gen/java/org/openapitools/api/UserApi.java +++ b/samples/server/petstore/jaxrs-resteasy/eap-java8/src/gen/java/org/openapitools/api/UserApi.java @@ -26,7 +26,7 @@ import javax.validation.Valid; @io.swagger.annotations.Api(description = "the user API") @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaResteasyEapServerCodegen") public interface UserApi { - + @POST @@ -82,7 +82,7 @@ public interface UserApi { @io.swagger.annotations.ApiResponse(code = 200, message = "successful operation", response = String.class), @io.swagger.annotations.ApiResponse(code = 400, message = "Invalid username/password supplied", response = Void.class) }) - public Response loginUser( @NotNull @QueryParam("username") String username, @NotNull @QueryParam("password") String password,@Context SecurityContext securityContext); + public Response loginUser( @NotNull @QueryParam("username") String username, @NotNull @QueryParam("password") String password,@Context SecurityContext securityContext); @GET @Path("/logout") diff --git a/samples/server/petstore/jaxrs-resteasy/eap-java8/src/main/java/org/openapitools/api/JacksonConfig.java b/samples/server/petstore/jaxrs-resteasy/eap-java8/src/main/java/org/openapitools/api/JacksonConfig.java index a24dbe0c5bf7cbb8b808af3bc97889fe617aea4f..0f868bc9aea86c55eb09ed996200300a71d0911d 100644 --- a/samples/server/petstore/jaxrs-resteasy/eap-java8/src/main/java/org/openapitools/api/JacksonConfig.java +++ b/samples/server/petstore/jaxrs-resteasy/eap-java8/src/main/java/org/openapitools/api/JacksonConfig.java @@ -21,13 +21,13 @@ public class JacksonConfig implements ContextResolver<ObjectMapper> { public JacksonConfig() throws Exception { this.objectMapper = new ObjectMapper(); - + this.objectMapper.registerModule(new JavaTimeModule()); // sample to convert any DateTime to readable timestamps //this.objectMapper.configure(SerializationFeature.WRITE_DATES_AS_TIMESTAMPS, true); } - + public ObjectMapper getContext(Class<?> objectType) { return objectMapper; } diff --git a/samples/server/petstore/jaxrs-resteasy/eap-java8/src/main/webapp/WEB-INF/web.xml b/samples/server/petstore/jaxrs-resteasy/eap-java8/src/main/webapp/WEB-INF/web.xml index 9b5e1a6d583575f7306e38da4681e813f9692be5..75d84c051fdcf61488eea54876dec01a31b84b28 100644 --- a/samples/server/petstore/jaxrs-resteasy/eap-java8/src/main/webapp/WEB-INF/web.xml +++ b/samples/server/petstore/jaxrs-resteasy/eap-java8/src/main/webapp/WEB-INF/web.xml @@ -2,8 +2,8 @@ <web-app version="2.4" xmlns="http://java.sun.com/xml/ns/j2ee" xmlns:j2ee="http://java.sun.com/xml/ns/j2ee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd"> - <context-param> - <param-name>resteasy.providers</param-name> + <context-param> + <param-name>resteasy.providers</param-name> <param-value>org.openapitools.api.JacksonConfig</param-value> </context-param> </web-app> diff --git a/samples/server/petstore/jaxrs-resteasy/eap-joda/pom.xml b/samples/server/petstore/jaxrs-resteasy/eap-joda/pom.xml index 8e47b072dc21636007e5c14068146115b8ee7bd6..a3d73b7a27283dfa3b525f89af12f104e63cd4f2 100644 --- a/samples/server/petstore/jaxrs-resteasy/eap-joda/pom.xml +++ b/samples/server/petstore/jaxrs-resteasy/eap-joda/pom.xml @@ -155,7 +155,7 @@ <artifactId>jackson-datatype-joda</artifactId> <version>2.9.9</version> </dependency> - + </dependencies> <repositories> <repository> diff --git a/samples/server/petstore/jaxrs-resteasy/eap-joda/src/gen/java/org/openapitools/api/PetApi.java b/samples/server/petstore/jaxrs-resteasy/eap-joda/src/gen/java/org/openapitools/api/PetApi.java index 5b44c238acb19d8387b0bd3be68a46511e3b942a..1e2e42d17aaf3e548b56c54567fbfe6dc3a8edc4 100644 --- a/samples/server/petstore/jaxrs-resteasy/eap-joda/src/gen/java/org/openapitools/api/PetApi.java +++ b/samples/server/petstore/jaxrs-resteasy/eap-joda/src/gen/java/org/openapitools/api/PetApi.java @@ -28,7 +28,7 @@ import org.jboss.resteasy.plugins.providers.multipart.MultipartFormDataInput; @io.swagger.annotations.Api(description = "the pet API") @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaResteasyEapServerCodegen") public interface PetApi { - + @POST @Consumes({ "application/json", "application/xml" }) @@ -54,7 +54,7 @@ public interface PetApi { }, tags={ "pet", }) @io.swagger.annotations.ApiResponses(value = { @io.swagger.annotations.ApiResponse(code = 400, message = "Invalid pet value", response = Void.class) }) - public Response deletePet( @PathParam("petId") Long petId, @ApiParam(value = "" ) @HeaderParam("api_key") String apiKey,@Context SecurityContext securityContext); + public Response deletePet( @PathParam("petId") Long petId, @ApiParam(value = "" ) @HeaderParam("api_key") String apiKey,@Context SecurityContext securityContext); @GET @Path("/findByStatus") @@ -69,7 +69,7 @@ public interface PetApi { @io.swagger.annotations.ApiResponse(code = 200, message = "successful operation", response = Pet.class, responseContainer = "List"), @io.swagger.annotations.ApiResponse(code = 400, message = "Invalid status value", response = Void.class) }) - public Response findPetsByStatus( @NotNull @QueryParam("status") List<String> status,@Context SecurityContext securityContext); + public Response findPetsByStatus( @NotNull @QueryParam("status") List<String> status,@Context SecurityContext securityContext); @GET @Path("/findByTags") @@ -84,7 +84,7 @@ public interface PetApi { @io.swagger.annotations.ApiResponse(code = 200, message = "successful operation", response = Pet.class, responseContainer = "List"), @io.swagger.annotations.ApiResponse(code = 400, message = "Invalid tag value", response = Void.class) }) - public Response findPetsByTags( @NotNull @QueryParam("tags") List<String> tags,@Context SecurityContext securityContext); + public Response findPetsByTags( @NotNull @QueryParam("tags") List<String> tags,@Context SecurityContext securityContext); @GET @Path("/{petId}") diff --git a/samples/server/petstore/jaxrs-resteasy/eap-joda/src/gen/java/org/openapitools/api/StoreApi.java b/samples/server/petstore/jaxrs-resteasy/eap-joda/src/gen/java/org/openapitools/api/StoreApi.java index 8408fb1d4c9729f8a99dfeaa754bf3f9c677d6c5..11213b47e314a0d12982924297200df574bcd5ce 100644 --- a/samples/server/petstore/jaxrs-resteasy/eap-joda/src/gen/java/org/openapitools/api/StoreApi.java +++ b/samples/server/petstore/jaxrs-resteasy/eap-joda/src/gen/java/org/openapitools/api/StoreApi.java @@ -26,7 +26,7 @@ import javax.validation.Valid; @io.swagger.annotations.Api(description = "the store API") @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaResteasyEapServerCodegen") public interface StoreApi { - + @DELETE @Path("/order/{orderId}") diff --git a/samples/server/petstore/jaxrs-resteasy/eap-joda/src/gen/java/org/openapitools/api/UserApi.java b/samples/server/petstore/jaxrs-resteasy/eap-joda/src/gen/java/org/openapitools/api/UserApi.java index 2edd72e2304b2dc46200c3d51b916b5fd2b6b92a..22506d0ee4dad9e118ace2d42e60f1f77b2fd7fc 100644 --- a/samples/server/petstore/jaxrs-resteasy/eap-joda/src/gen/java/org/openapitools/api/UserApi.java +++ b/samples/server/petstore/jaxrs-resteasy/eap-joda/src/gen/java/org/openapitools/api/UserApi.java @@ -26,7 +26,7 @@ import javax.validation.Valid; @io.swagger.annotations.Api(description = "the user API") @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaResteasyEapServerCodegen") public interface UserApi { - + @POST @@ -82,7 +82,7 @@ public interface UserApi { @io.swagger.annotations.ApiResponse(code = 200, message = "successful operation", response = String.class), @io.swagger.annotations.ApiResponse(code = 400, message = "Invalid username/password supplied", response = Void.class) }) - public Response loginUser( @NotNull @QueryParam("username") String username, @NotNull @QueryParam("password") String password,@Context SecurityContext securityContext); + public Response loginUser( @NotNull @QueryParam("username") String username, @NotNull @QueryParam("password") String password,@Context SecurityContext securityContext); @GET @Path("/logout") diff --git a/samples/server/petstore/jaxrs-resteasy/eap-joda/src/main/java/org/openapitools/api/JacksonConfig.java b/samples/server/petstore/jaxrs-resteasy/eap-joda/src/main/java/org/openapitools/api/JacksonConfig.java index 666f5aedc4320d41687821e102eb008da7b156e4..447694d6310166eca8c40e8c36685684e98fd8b3 100644 --- a/samples/server/petstore/jaxrs-resteasy/eap-joda/src/main/java/org/openapitools/api/JacksonConfig.java +++ b/samples/server/petstore/jaxrs-resteasy/eap-joda/src/main/java/org/openapitools/api/JacksonConfig.java @@ -21,13 +21,13 @@ public class JacksonConfig implements ContextResolver<ObjectMapper> { public JacksonConfig() throws Exception { this.objectMapper = new ObjectMapper(); - + this.objectMapper.registerModule(new JodaModule()); // sample to convert any DateTime to readable timestamps //this.objectMapper.configure(SerializationFeature.WRITE_DATES_AS_TIMESTAMPS, true); } - + public ObjectMapper getContext(Class<?> objectType) { return objectMapper; } diff --git a/samples/server/petstore/jaxrs-resteasy/eap-joda/src/main/webapp/WEB-INF/web.xml b/samples/server/petstore/jaxrs-resteasy/eap-joda/src/main/webapp/WEB-INF/web.xml index 9b5e1a6d583575f7306e38da4681e813f9692be5..75d84c051fdcf61488eea54876dec01a31b84b28 100644 --- a/samples/server/petstore/jaxrs-resteasy/eap-joda/src/main/webapp/WEB-INF/web.xml +++ b/samples/server/petstore/jaxrs-resteasy/eap-joda/src/main/webapp/WEB-INF/web.xml @@ -2,8 +2,8 @@ <web-app version="2.4" xmlns="http://java.sun.com/xml/ns/j2ee" xmlns:j2ee="http://java.sun.com/xml/ns/j2ee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd"> - <context-param> - <param-name>resteasy.providers</param-name> + <context-param> + <param-name>resteasy.providers</param-name> <param-value>org.openapitools.api.JacksonConfig</param-value> </context-param> </web-app> diff --git a/samples/server/petstore/jaxrs-resteasy/eap/pom.xml b/samples/server/petstore/jaxrs-resteasy/eap/pom.xml index 11a3ceddfc0513608f9d6628e8a197458ec89922..8d1f2fcd4e813591eccaca45740e300228bb65a4 100644 --- a/samples/server/petstore/jaxrs-resteasy/eap/pom.xml +++ b/samples/server/petstore/jaxrs-resteasy/eap/pom.xml @@ -155,7 +155,7 @@ <artifactId>jackson-datatype-joda</artifactId> <version>2.9.9</version> </dependency> - + </dependencies> <repositories> <repository> diff --git a/samples/server/petstore/jaxrs-resteasy/eap/src/gen/java/org/openapitools/api/PetApi.java b/samples/server/petstore/jaxrs-resteasy/eap/src/gen/java/org/openapitools/api/PetApi.java index 5b44c238acb19d8387b0bd3be68a46511e3b942a..1e2e42d17aaf3e548b56c54567fbfe6dc3a8edc4 100644 --- a/samples/server/petstore/jaxrs-resteasy/eap/src/gen/java/org/openapitools/api/PetApi.java +++ b/samples/server/petstore/jaxrs-resteasy/eap/src/gen/java/org/openapitools/api/PetApi.java @@ -28,7 +28,7 @@ import org.jboss.resteasy.plugins.providers.multipart.MultipartFormDataInput; @io.swagger.annotations.Api(description = "the pet API") @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaResteasyEapServerCodegen") public interface PetApi { - + @POST @Consumes({ "application/json", "application/xml" }) @@ -54,7 +54,7 @@ public interface PetApi { }, tags={ "pet", }) @io.swagger.annotations.ApiResponses(value = { @io.swagger.annotations.ApiResponse(code = 400, message = "Invalid pet value", response = Void.class) }) - public Response deletePet( @PathParam("petId") Long petId, @ApiParam(value = "" ) @HeaderParam("api_key") String apiKey,@Context SecurityContext securityContext); + public Response deletePet( @PathParam("petId") Long petId, @ApiParam(value = "" ) @HeaderParam("api_key") String apiKey,@Context SecurityContext securityContext); @GET @Path("/findByStatus") @@ -69,7 +69,7 @@ public interface PetApi { @io.swagger.annotations.ApiResponse(code = 200, message = "successful operation", response = Pet.class, responseContainer = "List"), @io.swagger.annotations.ApiResponse(code = 400, message = "Invalid status value", response = Void.class) }) - public Response findPetsByStatus( @NotNull @QueryParam("status") List<String> status,@Context SecurityContext securityContext); + public Response findPetsByStatus( @NotNull @QueryParam("status") List<String> status,@Context SecurityContext securityContext); @GET @Path("/findByTags") @@ -84,7 +84,7 @@ public interface PetApi { @io.swagger.annotations.ApiResponse(code = 200, message = "successful operation", response = Pet.class, responseContainer = "List"), @io.swagger.annotations.ApiResponse(code = 400, message = "Invalid tag value", response = Void.class) }) - public Response findPetsByTags( @NotNull @QueryParam("tags") List<String> tags,@Context SecurityContext securityContext); + public Response findPetsByTags( @NotNull @QueryParam("tags") List<String> tags,@Context SecurityContext securityContext); @GET @Path("/{petId}") diff --git a/samples/server/petstore/jaxrs-resteasy/eap/src/gen/java/org/openapitools/api/StoreApi.java b/samples/server/petstore/jaxrs-resteasy/eap/src/gen/java/org/openapitools/api/StoreApi.java index 8408fb1d4c9729f8a99dfeaa754bf3f9c677d6c5..11213b47e314a0d12982924297200df574bcd5ce 100644 --- a/samples/server/petstore/jaxrs-resteasy/eap/src/gen/java/org/openapitools/api/StoreApi.java +++ b/samples/server/petstore/jaxrs-resteasy/eap/src/gen/java/org/openapitools/api/StoreApi.java @@ -26,7 +26,7 @@ import javax.validation.Valid; @io.swagger.annotations.Api(description = "the store API") @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaResteasyEapServerCodegen") public interface StoreApi { - + @DELETE @Path("/order/{orderId}") diff --git a/samples/server/petstore/jaxrs-resteasy/eap/src/gen/java/org/openapitools/api/UserApi.java b/samples/server/petstore/jaxrs-resteasy/eap/src/gen/java/org/openapitools/api/UserApi.java index 2edd72e2304b2dc46200c3d51b916b5fd2b6b92a..22506d0ee4dad9e118ace2d42e60f1f77b2fd7fc 100644 --- a/samples/server/petstore/jaxrs-resteasy/eap/src/gen/java/org/openapitools/api/UserApi.java +++ b/samples/server/petstore/jaxrs-resteasy/eap/src/gen/java/org/openapitools/api/UserApi.java @@ -26,7 +26,7 @@ import javax.validation.Valid; @io.swagger.annotations.Api(description = "the user API") @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaResteasyEapServerCodegen") public interface UserApi { - + @POST @@ -82,7 +82,7 @@ public interface UserApi { @io.swagger.annotations.ApiResponse(code = 200, message = "successful operation", response = String.class), @io.swagger.annotations.ApiResponse(code = 400, message = "Invalid username/password supplied", response = Void.class) }) - public Response loginUser( @NotNull @QueryParam("username") String username, @NotNull @QueryParam("password") String password,@Context SecurityContext securityContext); + public Response loginUser( @NotNull @QueryParam("username") String username, @NotNull @QueryParam("password") String password,@Context SecurityContext securityContext); @GET @Path("/logout") diff --git a/samples/server/petstore/jaxrs-resteasy/eap/src/main/java/org/openapitools/api/JacksonConfig.java b/samples/server/petstore/jaxrs-resteasy/eap/src/main/java/org/openapitools/api/JacksonConfig.java index 666f5aedc4320d41687821e102eb008da7b156e4..447694d6310166eca8c40e8c36685684e98fd8b3 100644 --- a/samples/server/petstore/jaxrs-resteasy/eap/src/main/java/org/openapitools/api/JacksonConfig.java +++ b/samples/server/petstore/jaxrs-resteasy/eap/src/main/java/org/openapitools/api/JacksonConfig.java @@ -21,13 +21,13 @@ public class JacksonConfig implements ContextResolver<ObjectMapper> { public JacksonConfig() throws Exception { this.objectMapper = new ObjectMapper(); - + this.objectMapper.registerModule(new JodaModule()); // sample to convert any DateTime to readable timestamps //this.objectMapper.configure(SerializationFeature.WRITE_DATES_AS_TIMESTAMPS, true); } - + public ObjectMapper getContext(Class<?> objectType) { return objectMapper; } diff --git a/samples/server/petstore/jaxrs-resteasy/eap/src/main/webapp/WEB-INF/web.xml b/samples/server/petstore/jaxrs-resteasy/eap/src/main/webapp/WEB-INF/web.xml index 9b5e1a6d583575f7306e38da4681e813f9692be5..75d84c051fdcf61488eea54876dec01a31b84b28 100644 --- a/samples/server/petstore/jaxrs-resteasy/eap/src/main/webapp/WEB-INF/web.xml +++ b/samples/server/petstore/jaxrs-resteasy/eap/src/main/webapp/WEB-INF/web.xml @@ -2,8 +2,8 @@ <web-app version="2.4" xmlns="http://java.sun.com/xml/ns/j2ee" xmlns:j2ee="http://java.sun.com/xml/ns/j2ee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd"> - <context-param> - <param-name>resteasy.providers</param-name> + <context-param> + <param-name>resteasy.providers</param-name> <param-value>org.openapitools.api.JacksonConfig</param-value> </context-param> </web-app> diff --git a/samples/server/petstore/jaxrs-resteasy/java8/pom.xml b/samples/server/petstore/jaxrs-resteasy/java8/pom.xml index 925aad942238cee41364a19427a17558d63710ce..593e8e8df205c8c9ca211820c49db5173b24753c 100644 --- a/samples/server/petstore/jaxrs-resteasy/java8/pom.xml +++ b/samples/server/petstore/jaxrs-resteasy/java8/pom.xml @@ -169,7 +169,7 @@ <version>1.1.0.Final</version> <scope>provided</scope> </dependency> - + </dependencies> <repositories> <repository> diff --git a/samples/server/petstore/jaxrs-resteasy/java8/src/gen/java/org/openapitools/api/ApiResponseMessage.java b/samples/server/petstore/jaxrs-resteasy/java8/src/gen/java/org/openapitools/api/ApiResponseMessage.java index 35fc693af013b4a75850d255d403fe3316c98241..9e071aa75fdd7cb36b297d9a54a96c36436b50fb 100644 --- a/samples/server/petstore/jaxrs-resteasy/java8/src/gen/java/org/openapitools/api/ApiResponseMessage.java +++ b/samples/server/petstore/jaxrs-resteasy/java8/src/gen/java/org/openapitools/api/ApiResponseMessage.java @@ -14,9 +14,9 @@ public class ApiResponseMessage { int code; String type; String message; - + public ApiResponseMessage(){} - + public ApiResponseMessage(int code, String message){ this.code = code; switch(code){ diff --git a/samples/server/petstore/jaxrs-resteasy/java8/src/gen/java/org/openapitools/api/PetApi.java b/samples/server/petstore/jaxrs-resteasy/java8/src/gen/java/org/openapitools/api/PetApi.java index 327b00e46c7368037e6f68855d0dce1f62c98d0d..e7e6850d9799733e6c23977e162c6682d29b7792 100644 --- a/samples/server/petstore/jaxrs-resteasy/java8/src/gen/java/org/openapitools/api/PetApi.java +++ b/samples/server/petstore/jaxrs-resteasy/java8/src/gen/java/org/openapitools/api/PetApi.java @@ -63,7 +63,7 @@ public class PetApi { }, tags={ "pet", }) @io.swagger.annotations.ApiResponses(value = { @io.swagger.annotations.ApiResponse(code = 400, message = "Invalid pet value", response = Void.class) }) - public Response deletePet( @PathParam("petId") Long petId, @ApiParam(value = "" ) @HeaderParam("api_key") String apiKey,@Context SecurityContext securityContext) + public Response deletePet( @PathParam("petId") Long petId, @ApiParam(value = "" ) @HeaderParam("api_key") String apiKey,@Context SecurityContext securityContext) throws NotFoundException { return service.deletePet(petId,apiKey,securityContext); } @@ -81,7 +81,7 @@ public class PetApi { @io.swagger.annotations.ApiResponse(code = 200, message = "successful operation", response = Pet.class, responseContainer = "List"), @io.swagger.annotations.ApiResponse(code = 400, message = "Invalid status value", response = Void.class) }) - public Response findPetsByStatus( @NotNull @QueryParam("status") List<String> status,@Context SecurityContext securityContext) + public Response findPetsByStatus( @NotNull @QueryParam("status") List<String> status,@Context SecurityContext securityContext) throws NotFoundException { return service.findPetsByStatus(status,securityContext); } @@ -99,7 +99,7 @@ public class PetApi { @io.swagger.annotations.ApiResponse(code = 200, message = "successful operation", response = Pet.class, responseContainer = "List"), @io.swagger.annotations.ApiResponse(code = 400, message = "Invalid tag value", response = Void.class) }) - public Response findPetsByTags( @NotNull @QueryParam("tags") List<String> tags,@Context SecurityContext securityContext) + public Response findPetsByTags( @NotNull @QueryParam("tags") List<String> tags,@Context SecurityContext securityContext) throws NotFoundException { return service.findPetsByTags(tags,securityContext); } diff --git a/samples/server/petstore/jaxrs-resteasy/java8/src/gen/java/org/openapitools/api/UserApi.java b/samples/server/petstore/jaxrs-resteasy/java8/src/gen/java/org/openapitools/api/UserApi.java index d325a05a54f1ba28418b06ad216792dc610cfe8c..d9780d5234b61154b0572d62f2a1f1aedda0cb71 100644 --- a/samples/server/petstore/jaxrs-resteasy/java8/src/gen/java/org/openapitools/api/UserApi.java +++ b/samples/server/petstore/jaxrs-resteasy/java8/src/gen/java/org/openapitools/api/UserApi.java @@ -103,7 +103,7 @@ public class UserApi { @io.swagger.annotations.ApiResponse(code = 200, message = "successful operation", response = String.class), @io.swagger.annotations.ApiResponse(code = 400, message = "Invalid username/password supplied", response = Void.class) }) - public Response loginUser( @NotNull @QueryParam("username") String username, @NotNull @QueryParam("password") String password,@Context SecurityContext securityContext) + public Response loginUser( @NotNull @QueryParam("username") String username, @NotNull @QueryParam("password") String password,@Context SecurityContext securityContext) throws NotFoundException { return service.loginUser(username,password,securityContext); } diff --git a/samples/server/petstore/jaxrs-resteasy/joda/pom.xml b/samples/server/petstore/jaxrs-resteasy/joda/pom.xml index 0825ab39dc389ef7849017a920888b57abcf8de8..f64abc28a0ba001ee6f1253d066f2c6caf5fe8fc 100644 --- a/samples/server/petstore/jaxrs-resteasy/joda/pom.xml +++ b/samples/server/petstore/jaxrs-resteasy/joda/pom.xml @@ -174,7 +174,7 @@ <version>1.1.0.Final</version> <scope>provided</scope> </dependency> - + </dependencies> <repositories> <repository> diff --git a/samples/server/petstore/jaxrs-resteasy/joda/src/gen/java/org/openapitools/api/ApiResponseMessage.java b/samples/server/petstore/jaxrs-resteasy/joda/src/gen/java/org/openapitools/api/ApiResponseMessage.java index 35fc693af013b4a75850d255d403fe3316c98241..9e071aa75fdd7cb36b297d9a54a96c36436b50fb 100644 --- a/samples/server/petstore/jaxrs-resteasy/joda/src/gen/java/org/openapitools/api/ApiResponseMessage.java +++ b/samples/server/petstore/jaxrs-resteasy/joda/src/gen/java/org/openapitools/api/ApiResponseMessage.java @@ -14,9 +14,9 @@ public class ApiResponseMessage { int code; String type; String message; - + public ApiResponseMessage(){} - + public ApiResponseMessage(int code, String message){ this.code = code; switch(code){ diff --git a/samples/server/petstore/jaxrs-resteasy/joda/src/gen/java/org/openapitools/api/PetApi.java b/samples/server/petstore/jaxrs-resteasy/joda/src/gen/java/org/openapitools/api/PetApi.java index 327b00e46c7368037e6f68855d0dce1f62c98d0d..e7e6850d9799733e6c23977e162c6682d29b7792 100644 --- a/samples/server/petstore/jaxrs-resteasy/joda/src/gen/java/org/openapitools/api/PetApi.java +++ b/samples/server/petstore/jaxrs-resteasy/joda/src/gen/java/org/openapitools/api/PetApi.java @@ -63,7 +63,7 @@ public class PetApi { }, tags={ "pet", }) @io.swagger.annotations.ApiResponses(value = { @io.swagger.annotations.ApiResponse(code = 400, message = "Invalid pet value", response = Void.class) }) - public Response deletePet( @PathParam("petId") Long petId, @ApiParam(value = "" ) @HeaderParam("api_key") String apiKey,@Context SecurityContext securityContext) + public Response deletePet( @PathParam("petId") Long petId, @ApiParam(value = "" ) @HeaderParam("api_key") String apiKey,@Context SecurityContext securityContext) throws NotFoundException { return service.deletePet(petId,apiKey,securityContext); } @@ -81,7 +81,7 @@ public class PetApi { @io.swagger.annotations.ApiResponse(code = 200, message = "successful operation", response = Pet.class, responseContainer = "List"), @io.swagger.annotations.ApiResponse(code = 400, message = "Invalid status value", response = Void.class) }) - public Response findPetsByStatus( @NotNull @QueryParam("status") List<String> status,@Context SecurityContext securityContext) + public Response findPetsByStatus( @NotNull @QueryParam("status") List<String> status,@Context SecurityContext securityContext) throws NotFoundException { return service.findPetsByStatus(status,securityContext); } @@ -99,7 +99,7 @@ public class PetApi { @io.swagger.annotations.ApiResponse(code = 200, message = "successful operation", response = Pet.class, responseContainer = "List"), @io.swagger.annotations.ApiResponse(code = 400, message = "Invalid tag value", response = Void.class) }) - public Response findPetsByTags( @NotNull @QueryParam("tags") List<String> tags,@Context SecurityContext securityContext) + public Response findPetsByTags( @NotNull @QueryParam("tags") List<String> tags,@Context SecurityContext securityContext) throws NotFoundException { return service.findPetsByTags(tags,securityContext); } diff --git a/samples/server/petstore/jaxrs-resteasy/joda/src/gen/java/org/openapitools/api/UserApi.java b/samples/server/petstore/jaxrs-resteasy/joda/src/gen/java/org/openapitools/api/UserApi.java index d325a05a54f1ba28418b06ad216792dc610cfe8c..d9780d5234b61154b0572d62f2a1f1aedda0cb71 100644 --- a/samples/server/petstore/jaxrs-resteasy/joda/src/gen/java/org/openapitools/api/UserApi.java +++ b/samples/server/petstore/jaxrs-resteasy/joda/src/gen/java/org/openapitools/api/UserApi.java @@ -103,7 +103,7 @@ public class UserApi { @io.swagger.annotations.ApiResponse(code = 200, message = "successful operation", response = String.class), @io.swagger.annotations.ApiResponse(code = 400, message = "Invalid username/password supplied", response = Void.class) }) - public Response loginUser( @NotNull @QueryParam("username") String username, @NotNull @QueryParam("password") String password,@Context SecurityContext securityContext) + public Response loginUser( @NotNull @QueryParam("username") String username, @NotNull @QueryParam("password") String password,@Context SecurityContext securityContext) throws NotFoundException { return service.loginUser(username,password,securityContext); } 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 6a1269115ed96553d30db7f92a66fc85f7c72859..cc3618e0929369bd982c36e174bfc6d911fbe8bf 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 @@ -81,7 +81,7 @@ import javax.validation.Valid; @ApiOperation(value = "", notes = "", tags={ "fake" }) @ApiResponses(value = { @ApiResponse(code = 200, message = "Success", response = Void.class) }) - void testBodyWithQueryParams(@QueryParam("query") @NotNull String query,@Valid @NotNull User body); + void testBodyWithQueryParams(@QueryParam("query") @NotNull String query,@Valid @NotNull User body); @PATCH @Consumes({ "application/json" }) @@ -108,13 +108,13 @@ import javax.validation.Valid; @ApiResponses(value = { @ApiResponse(code = 400, message = "Invalid request", response = Void.class), @ApiResponse(code = 404, message = "Not found", response = Void.class) }) - void testEnumParameters(@HeaderParam("enum_header_string_array") @ApiParam("Header parameter enum test (string array)") List<String> enumHeaderStringArray,@HeaderParam("enum_header_string") @DefaultValue("-efg") @ApiParam("Header parameter enum test (string)") String enumHeaderString,@QueryParam("enum_query_string_array") @ApiParam("Query parameter enum test (string array)") List<String> enumQueryStringArray,@QueryParam("enum_query_string") @DefaultValue("-efg") @ApiParam("Query parameter enum test (string)") String enumQueryString,@QueryParam("enum_query_integer") @ApiParam("Query parameter enum test (double)") Integer enumQueryInteger,@QueryParam("enum_query_double") @ApiParam("Query parameter enum test (double)") Double enumQueryDouble,@FormParam(value = "enum_form_string_array") List<String> enumFormStringArray,@FormParam(value = "enum_form_string") String enumFormString); + void testEnumParameters(@HeaderParam("enum_header_string_array") @ApiParam("Header parameter enum test (string array)") List<String> enumHeaderStringArray,@HeaderParam("enum_header_string") @DefaultValue("-efg") @ApiParam("Header parameter enum test (string)") String enumHeaderString,@QueryParam("enum_query_string_array") @ApiParam("Query parameter enum test (string array)") List<String> enumQueryStringArray,@QueryParam("enum_query_string") @DefaultValue("-efg") @ApiParam("Query parameter enum test (string)") String enumQueryString,@QueryParam("enum_query_integer") @ApiParam("Query parameter enum test (double)") Integer enumQueryInteger,@QueryParam("enum_query_double") @ApiParam("Query parameter enum test (double)") Double enumQueryDouble,@FormParam(value = "enum_form_string_array") List<String> enumFormStringArray,@FormParam(value = "enum_form_string") String enumFormString); @DELETE @ApiOperation(value = "Fake endpoint to test group parameters (optional)", notes = "Fake endpoint to test group parameters (optional)", tags={ "fake" }) @ApiResponses(value = { @ApiResponse(code = 400, message = "Someting wrong", response = Void.class) }) - void testGroupParameters(@QueryParam("required_string_group") @NotNull @ApiParam("Required String in group parameters") Integer requiredStringGroup,@HeaderParam("required_boolean_group") @NotNull @ApiParam("Required Boolean in group parameters") Boolean requiredBooleanGroup,@QueryParam("required_int64_group") @NotNull @ApiParam("Required Integer in group parameters") Long requiredInt64Group,@QueryParam("string_group") @ApiParam("String in group parameters") Integer stringGroup,@HeaderParam("boolean_group") @ApiParam("Boolean in group parameters") Boolean booleanGroup,@QueryParam("int64_group") @ApiParam("Integer in group parameters") Long int64Group); + void testGroupParameters(@QueryParam("required_string_group") @NotNull @ApiParam("Required String in group parameters") Integer requiredStringGroup,@HeaderParam("required_boolean_group") @NotNull @ApiParam("Required Boolean in group parameters") Boolean requiredBooleanGroup,@QueryParam("required_int64_group") @NotNull @ApiParam("Required Integer in group parameters") Long requiredInt64Group,@QueryParam("string_group") @ApiParam("String in group parameters") Integer stringGroup,@HeaderParam("boolean_group") @ApiParam("Boolean in group parameters") Boolean booleanGroup,@QueryParam("int64_group") @ApiParam("Integer in group parameters") Long int64Group); @POST @Path("/inline-additionalProperties") @@ -137,7 +137,7 @@ import javax.validation.Valid; @ApiOperation(value = "", notes = "To test the collection format in query parameters", tags={ "fake" }) @ApiResponses(value = { @ApiResponse(code = 200, message = "Success", response = Void.class) }) - void testQueryParameterCollectionFormat(@QueryParam("pipe") @NotNull List<String> pipe,@QueryParam("ioutil") @NotNull List<String> ioutil,@QueryParam("http") @NotNull List<String> http,@QueryParam("url") @NotNull List<String> url,@QueryParam("context") @NotNull List<String> context); + void testQueryParameterCollectionFormat(@QueryParam("pipe") @NotNull List<String> pipe,@QueryParam("ioutil") @NotNull List<String> ioutil,@QueryParam("http") @NotNull List<String> http,@QueryParam("url") @NotNull List<String> url,@QueryParam("context") @NotNull List<String> context); @POST @Path("/{petId}/uploadImageWithRequiredFile") diff --git a/samples/server/petstore/jaxrs-spec-interface/src/gen/java/org/openapitools/api/PetApi.java b/samples/server/petstore/jaxrs-spec-interface/src/gen/java/org/openapitools/api/PetApi.java index 5af8c98bc1f7b4221410ff3461965c6761996029..d8d6ac710781489cf32bb899ffffd322c8252d8e 100644 --- a/samples/server/petstore/jaxrs-spec-interface/src/gen/java/org/openapitools/api/PetApi.java +++ b/samples/server/petstore/jaxrs-spec-interface/src/gen/java/org/openapitools/api/PetApi.java @@ -42,7 +42,7 @@ import javax.validation.Valid; @ApiResponses(value = { @ApiResponse(code = 200, message = "successful operation", response = Void.class), @ApiResponse(code = 400, message = "Invalid pet value", response = Void.class) }) - void deletePet(@PathParam("petId") @ApiParam("Pet id to delete") Long petId,@HeaderParam("api_key") String apiKey); + void deletePet(@PathParam("petId") @ApiParam("Pet id to delete") Long petId,@HeaderParam("api_key") String apiKey); @GET @Path("/findByStatus") @@ -55,7 +55,7 @@ import javax.validation.Valid; @ApiResponses(value = { @ApiResponse(code = 200, message = "successful operation", response = Pet.class, responseContainer = "List"), @ApiResponse(code = 400, message = "Invalid status value", response = Void.class, responseContainer = "List") }) - List<Pet> findPetsByStatus(@QueryParam("status") @NotNull @ApiParam("Status values that need to be considered for filter") List<String> status); + List<Pet> findPetsByStatus(@QueryParam("status") @NotNull @ApiParam("Status values that need to be considered for filter") List<String> status); @GET @Path("/findByTags") @@ -68,7 +68,7 @@ import javax.validation.Valid; @ApiResponses(value = { @ApiResponse(code = 200, message = "successful operation", response = Pet.class, responseContainer = "Set"), @ApiResponse(code = 400, message = "Invalid tag value", response = Void.class, responseContainer = "Set") }) - Set<Pet> findPetsByTags(@QueryParam("tags") @NotNull @ApiParam("Tags to filter by") Set<String> tags); + Set<Pet> findPetsByTags(@QueryParam("tags") @NotNull @ApiParam("Tags to filter by") Set<String> tags); @GET @Path("/{petId}") diff --git a/samples/server/petstore/jaxrs-spec-interface/src/gen/java/org/openapitools/api/UserApi.java b/samples/server/petstore/jaxrs-spec-interface/src/gen/java/org/openapitools/api/UserApi.java index 560e64acdfb5118c39cb98ba70c671d85b4db8e1..a1fb4ed1b0f5cc3988604b04009fa8d73be9fca0 100644 --- a/samples/server/petstore/jaxrs-spec-interface/src/gen/java/org/openapitools/api/UserApi.java +++ b/samples/server/petstore/jaxrs-spec-interface/src/gen/java/org/openapitools/api/UserApi.java @@ -63,7 +63,7 @@ import javax.validation.Valid; @ApiResponses(value = { @ApiResponse(code = 200, message = "successful operation", response = String.class), @ApiResponse(code = 400, message = "Invalid username/password supplied", response = Void.class) }) - String loginUser(@QueryParam("username") @NotNull @ApiParam("The user name for login") String username,@QueryParam("password") @NotNull @ApiParam("The password for login in clear text") String password); + String loginUser(@QueryParam("username") @NotNull @ApiParam("The user name for login") String username,@QueryParam("password") @NotNull @ApiParam("The password for login in clear text") String password); @GET @Path("/logout") diff --git a/samples/server/petstore/jaxrs-spec-interface/src/gen/java/org/openapitools/model/EnumArrays.java b/samples/server/petstore/jaxrs-spec-interface/src/gen/java/org/openapitools/model/EnumArrays.java index fc7770afa09602e87e96a0c0f05964109b1baf9a..1db1429ce2eb990c20ab5defc1e0b9ee3fdd5799 100644 --- a/samples/server/petstore/jaxrs-spec-interface/src/gen/java/org/openapitools/model/EnumArrays.java +++ b/samples/server/petstore/jaxrs-spec-interface/src/gen/java/org/openapitools/model/EnumArrays.java @@ -52,7 +52,7 @@ public enum JustSymbolEnum { } private @Valid JustSymbolEnum justSymbol; - + public enum ArrayEnumEnum { FISH(String.valueOf("fish")), CRAB(String.valueOf("crab")); diff --git a/samples/server/petstore/jaxrs-spec-interface/src/gen/java/org/openapitools/model/MapTest.java b/samples/server/petstore/jaxrs-spec-interface/src/gen/java/org/openapitools/model/MapTest.java index a8eff4c21b24b526d1c3c573c623df8afdcbedcf..c8ddd42ac860f4f45bfe430c54d617aa5524b512 100644 --- a/samples/server/petstore/jaxrs-spec-interface/src/gen/java/org/openapitools/model/MapTest.java +++ b/samples/server/petstore/jaxrs-spec-interface/src/gen/java/org/openapitools/model/MapTest.java @@ -20,7 +20,7 @@ import com.fasterxml.jackson.annotation.JsonValue; @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaJAXRSSpecServerCodegen")public class MapTest implements Serializable { private @Valid Map<String, Map<String, String>> mapMapOfString = new HashMap<String, Map<String, String>>(); - + public enum InnerEnum { UPPER(String.valueOf("UPPER")), LOWER(String.valueOf("lower")); 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 43829c3d05a415df1186f891472f828a5cb45f14..b7029f7a3b7d70b9920350ba9f5330d77f20bdad 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 @@ -100,7 +100,7 @@ import javax.validation.Valid; @ApiResponses(value = { @ApiResponse(code = 200, message = "Success", response = Void.class) }) - public Response testBodyWithQueryParams(@QueryParam("query") @NotNull String query,@Valid @NotNull User body) { + public Response testBodyWithQueryParams(@QueryParam("query") @NotNull String query,@Valid @NotNull User body) { return Response.ok().entity("magic!").build(); } @@ -136,7 +136,7 @@ import javax.validation.Valid; @ApiResponse(code = 400, message = "Invalid request", response = Void.class), @ApiResponse(code = 404, message = "Not found", response = Void.class) }) - public Response testEnumParameters(@HeaderParam("enum_header_string_array") @ApiParam("Header parameter enum test (string array)") List<String> enumHeaderStringArray,@HeaderParam("enum_header_string") @DefaultValue("-efg") @ApiParam("Header parameter enum test (string)") String enumHeaderString,@QueryParam("enum_query_string_array") @ApiParam("Query parameter enum test (string array)") List<String> enumQueryStringArray,@QueryParam("enum_query_string") @DefaultValue("-efg") @ApiParam("Query parameter enum test (string)") String enumQueryString,@QueryParam("enum_query_integer") @ApiParam("Query parameter enum test (double)") Integer enumQueryInteger,@QueryParam("enum_query_double") @ApiParam("Query parameter enum test (double)") Double enumQueryDouble,@FormParam(value = "enum_form_string_array") List<String> enumFormStringArray,@FormParam(value = "enum_form_string") String enumFormString) { + public Response testEnumParameters(@HeaderParam("enum_header_string_array") @ApiParam("Header parameter enum test (string array)") List<String> enumHeaderStringArray,@HeaderParam("enum_header_string") @DefaultValue("-efg") @ApiParam("Header parameter enum test (string)") String enumHeaderString,@QueryParam("enum_query_string_array") @ApiParam("Query parameter enum test (string array)") List<String> enumQueryStringArray,@QueryParam("enum_query_string") @DefaultValue("-efg") @ApiParam("Query parameter enum test (string)") String enumQueryString,@QueryParam("enum_query_integer") @ApiParam("Query parameter enum test (double)") Integer enumQueryInteger,@QueryParam("enum_query_double") @ApiParam("Query parameter enum test (double)") Double enumQueryDouble,@FormParam(value = "enum_form_string_array") List<String> enumFormStringArray,@FormParam(value = "enum_form_string") String enumFormString) { return Response.ok().entity("magic!").build(); } @@ -145,7 +145,7 @@ import javax.validation.Valid; @ApiResponses(value = { @ApiResponse(code = 400, message = "Someting wrong", response = Void.class) }) - public Response testGroupParameters(@QueryParam("required_string_group") @NotNull @ApiParam("Required String in group parameters") Integer requiredStringGroup,@HeaderParam("required_boolean_group") @NotNull @ApiParam("Required Boolean in group parameters") Boolean requiredBooleanGroup,@QueryParam("required_int64_group") @NotNull @ApiParam("Required Integer in group parameters") Long requiredInt64Group,@QueryParam("string_group") @ApiParam("String in group parameters") Integer stringGroup,@HeaderParam("boolean_group") @ApiParam("Boolean in group parameters") Boolean booleanGroup,@QueryParam("int64_group") @ApiParam("Integer in group parameters") Long int64Group) { + public Response testGroupParameters(@QueryParam("required_string_group") @NotNull @ApiParam("Required String in group parameters") Integer requiredStringGroup,@HeaderParam("required_boolean_group") @NotNull @ApiParam("Required Boolean in group parameters") Boolean requiredBooleanGroup,@QueryParam("required_int64_group") @NotNull @ApiParam("Required Integer in group parameters") Long requiredInt64Group,@QueryParam("string_group") @ApiParam("String in group parameters") Integer stringGroup,@HeaderParam("boolean_group") @ApiParam("Boolean in group parameters") Boolean booleanGroup,@QueryParam("int64_group") @ApiParam("Integer in group parameters") Long int64Group) { return Response.ok().entity("magic!").build(); } @@ -177,7 +177,7 @@ import javax.validation.Valid; @ApiResponses(value = { @ApiResponse(code = 200, message = "Success", response = Void.class) }) - public Response testQueryParameterCollectionFormat(@QueryParam("pipe") @NotNull List<String> pipe,@QueryParam("ioutil") @NotNull List<String> ioutil,@QueryParam("http") @NotNull List<String> http,@QueryParam("url") @NotNull List<String> url,@QueryParam("context") @NotNull List<String> context) { + public Response testQueryParameterCollectionFormat(@QueryParam("pipe") @NotNull List<String> pipe,@QueryParam("ioutil") @NotNull List<String> ioutil,@QueryParam("http") @NotNull List<String> http,@QueryParam("url") @NotNull List<String> url,@QueryParam("context") @NotNull List<String> context) { return Response.ok().entity("magic!").build(); } diff --git a/samples/server/petstore/jaxrs-spec/src/gen/java/org/openapitools/api/PetApi.java b/samples/server/petstore/jaxrs-spec/src/gen/java/org/openapitools/api/PetApi.java index 13a90a372bfbb8b4e744ee06e7f39e99f9835b42..6ecab90d461112a44a5d8ebb1110879e84a37172 100644 --- a/samples/server/petstore/jaxrs-spec/src/gen/java/org/openapitools/api/PetApi.java +++ b/samples/server/petstore/jaxrs-spec/src/gen/java/org/openapitools/api/PetApi.java @@ -46,7 +46,7 @@ import javax.validation.Valid; @ApiResponse(code = 200, message = "successful operation", response = Void.class), @ApiResponse(code = 400, message = "Invalid pet value", response = Void.class) }) - public Response deletePet(@PathParam("petId") @ApiParam("Pet id to delete") Long petId,@HeaderParam("api_key") String apiKey) { + public Response deletePet(@PathParam("petId") @ApiParam("Pet id to delete") Long petId,@HeaderParam("api_key") String apiKey) { return Response.ok().entity("magic!").build(); } @@ -62,7 +62,7 @@ import javax.validation.Valid; @ApiResponse(code = 200, message = "successful operation", response = Pet.class, responseContainer = "List"), @ApiResponse(code = 400, message = "Invalid status value", response = Void.class) }) - public Response findPetsByStatus(@QueryParam("status") @NotNull @ApiParam("Status values that need to be considered for filter") List<String> status) { + public Response findPetsByStatus(@QueryParam("status") @NotNull @ApiParam("Status values that need to be considered for filter") List<String> status) { return Response.ok().entity("magic!").build(); } @@ -78,7 +78,7 @@ import javax.validation.Valid; @ApiResponse(code = 200, message = "successful operation", response = Pet.class, responseContainer = "Set"), @ApiResponse(code = 400, message = "Invalid tag value", response = Void.class) }) - public Response findPetsByTags(@QueryParam("tags") @NotNull @ApiParam("Tags to filter by") Set<String> tags) { + public Response findPetsByTags(@QueryParam("tags") @NotNull @ApiParam("Tags to filter by") Set<String> tags) { return Response.ok().entity("magic!").build(); } diff --git a/samples/server/petstore/jaxrs-spec/src/gen/java/org/openapitools/api/UserApi.java b/samples/server/petstore/jaxrs-spec/src/gen/java/org/openapitools/api/UserApi.java index 9ceacb763fefa2d60dcc663a747facb635635af3..a72c9431305b5679b234becac36d1a15d1016d33 100644 --- a/samples/server/petstore/jaxrs-spec/src/gen/java/org/openapitools/api/UserApi.java +++ b/samples/server/petstore/jaxrs-spec/src/gen/java/org/openapitools/api/UserApi.java @@ -79,7 +79,7 @@ import javax.validation.Valid; @ApiResponse(code = 200, message = "successful operation", response = String.class), @ApiResponse(code = 400, message = "Invalid username/password supplied", response = Void.class) }) - public Response loginUser(@QueryParam("username") @NotNull @ApiParam("The user name for login") String username,@QueryParam("password") @NotNull @ApiParam("The password for login in clear text") String password) { + public Response loginUser(@QueryParam("username") @NotNull @ApiParam("The user name for login") String username,@QueryParam("password") @NotNull @ApiParam("The password for login in clear text") String password) { return Response.ok().entity("magic!").build(); } diff --git a/samples/server/petstore/jaxrs-spec/src/gen/java/org/openapitools/model/EnumArrays.java b/samples/server/petstore/jaxrs-spec/src/gen/java/org/openapitools/model/EnumArrays.java index fc7770afa09602e87e96a0c0f05964109b1baf9a..1db1429ce2eb990c20ab5defc1e0b9ee3fdd5799 100644 --- a/samples/server/petstore/jaxrs-spec/src/gen/java/org/openapitools/model/EnumArrays.java +++ b/samples/server/petstore/jaxrs-spec/src/gen/java/org/openapitools/model/EnumArrays.java @@ -52,7 +52,7 @@ public enum JustSymbolEnum { } private @Valid JustSymbolEnum justSymbol; - + public enum ArrayEnumEnum { FISH(String.valueOf("fish")), CRAB(String.valueOf("crab")); diff --git a/samples/server/petstore/jaxrs-spec/src/gen/java/org/openapitools/model/MapTest.java b/samples/server/petstore/jaxrs-spec/src/gen/java/org/openapitools/model/MapTest.java index a8eff4c21b24b526d1c3c573c623df8afdcbedcf..c8ddd42ac860f4f45bfe430c54d617aa5524b512 100644 --- a/samples/server/petstore/jaxrs-spec/src/gen/java/org/openapitools/model/MapTest.java +++ b/samples/server/petstore/jaxrs-spec/src/gen/java/org/openapitools/model/MapTest.java @@ -20,7 +20,7 @@ import com.fasterxml.jackson.annotation.JsonValue; @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaJAXRSSpecServerCodegen")public class MapTest implements Serializable { private @Valid Map<String, Map<String, String>> mapMapOfString = new HashMap<String, Map<String, String>>(); - + public enum InnerEnum { UPPER(String.valueOf("UPPER")), LOWER(String.valueOf("lower")); diff --git a/samples/server/petstore/jaxrs/jersey2-useTags/pom.xml b/samples/server/petstore/jaxrs/jersey2-useTags/pom.xml index 68907b27d0d0fc3bbd1088418cd1a77e5eec5af3..bae73967144159f5b6868225182451dde0d0991c 100644 --- a/samples/server/petstore/jaxrs/jersey2-useTags/pom.xml +++ b/samples/server/petstore/jaxrs/jersey2-useTags/pom.xml @@ -13,7 +13,7 @@ <distribution>repo</distribution> </license> </licenses> - + <build> <sourceDirectory>src/main/java</sourceDirectory> <plugins> @@ -157,7 +157,7 @@ <version>2.2</version> </dependency> - + <!-- Bean Validation API support --> <dependency> <groupId>javax.validation</groupId> diff --git a/samples/server/petstore/jaxrs/jersey2-useTags/src/gen/java/org/openapitools/api/AnotherFakeApi.java b/samples/server/petstore/jaxrs/jersey2-useTags/src/gen/java/org/openapitools/api/AnotherFakeApi.java index e2e969716b3b2cfdb18181a0f8079f2c7519003c..d5f7a8c7e316062def575440eec7a8db2c224a3b 100644 --- a/samples/server/petstore/jaxrs/jersey2-useTags/src/gen/java/org/openapitools/api/AnotherFakeApi.java +++ b/samples/server/petstore/jaxrs/jersey2-useTags/src/gen/java/org/openapitools/api/AnotherFakeApi.java @@ -45,7 +45,7 @@ public class AnotherFakeApi { } catch (Exception e) { throw new RuntimeException(e); } - } + } } if (delegate == null) { 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 418a54ee6f504d2a4f82832509de86b53fc7f551..49fa9e3552062b5f9f2250ae246351559483cdc1 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 @@ -53,7 +53,7 @@ public class FakeApi { } catch (Exception e) { throw new RuntimeException(e); } - } + } } if (delegate == null) { diff --git a/samples/server/petstore/jaxrs/jersey2-useTags/src/gen/java/org/openapitools/api/FakeClassnameTags123Api.java b/samples/server/petstore/jaxrs/jersey2-useTags/src/gen/java/org/openapitools/api/FakeClassnameTags123Api.java index a7cb2eb4f9cd6c5ae334a74feac67f55f8f28f61..2a4bb99d95125accbe71582d3161353b32005909 100644 --- a/samples/server/petstore/jaxrs/jersey2-useTags/src/gen/java/org/openapitools/api/FakeClassnameTags123Api.java +++ b/samples/server/petstore/jaxrs/jersey2-useTags/src/gen/java/org/openapitools/api/FakeClassnameTags123Api.java @@ -45,7 +45,7 @@ public class FakeClassnameTags123Api { } catch (Exception e) { throw new RuntimeException(e); } - } + } } if (delegate == null) { diff --git a/samples/server/petstore/jaxrs/jersey2-useTags/src/gen/java/org/openapitools/api/PetApi.java b/samples/server/petstore/jaxrs/jersey2-useTags/src/gen/java/org/openapitools/api/PetApi.java index 34a10fd75957f609a845d115b2bcf25328e694ac..a06c5f332a03112649f098cd61598d1984d5f240 100644 --- a/samples/server/petstore/jaxrs/jersey2-useTags/src/gen/java/org/openapitools/api/PetApi.java +++ b/samples/server/petstore/jaxrs/jersey2-useTags/src/gen/java/org/openapitools/api/PetApi.java @@ -48,7 +48,7 @@ public class PetApi { } catch (Exception e) { throw new RuntimeException(e); } - } + } } if (delegate == null) { diff --git a/samples/server/petstore/jaxrs/jersey2-useTags/src/gen/java/org/openapitools/api/StoreApi.java b/samples/server/petstore/jaxrs/jersey2-useTags/src/gen/java/org/openapitools/api/StoreApi.java index 717f813e51fac976a43c395a68bbc03958d90b0a..dc710ad0921eb804ecf89c4732db3c5f84934110 100644 --- a/samples/server/petstore/jaxrs/jersey2-useTags/src/gen/java/org/openapitools/api/StoreApi.java +++ b/samples/server/petstore/jaxrs/jersey2-useTags/src/gen/java/org/openapitools/api/StoreApi.java @@ -46,7 +46,7 @@ public class StoreApi { } catch (Exception e) { throw new RuntimeException(e); } - } + } } if (delegate == null) { diff --git a/samples/server/petstore/jaxrs/jersey2-useTags/src/gen/java/org/openapitools/api/UserApi.java b/samples/server/petstore/jaxrs/jersey2-useTags/src/gen/java/org/openapitools/api/UserApi.java index 18cbe2d5c3b4db537cddcd9205912b2d77c7bca8..2d90f2523525457338f1cf6b1e898956a20b823a 100644 --- a/samples/server/petstore/jaxrs/jersey2-useTags/src/gen/java/org/openapitools/api/UserApi.java +++ b/samples/server/petstore/jaxrs/jersey2-useTags/src/gen/java/org/openapitools/api/UserApi.java @@ -46,7 +46,7 @@ public class UserApi { } catch (Exception e) { throw new RuntimeException(e); } - } + } } if (delegate == null) { diff --git a/samples/server/petstore/jaxrs/jersey2/pom.xml b/samples/server/petstore/jaxrs/jersey2/pom.xml index 9f547514d9221676e360292cf945151448c93e78..5aa8697f3a142f0f76e59e9a01183965b091c4e8 100644 --- a/samples/server/petstore/jaxrs/jersey2/pom.xml +++ b/samples/server/petstore/jaxrs/jersey2/pom.xml @@ -13,7 +13,7 @@ <distribution>repo</distribution> </license> </licenses> - + <build> <sourceDirectory>src/main/java</sourceDirectory> <plugins> @@ -157,7 +157,7 @@ <version>2.2</version> </dependency> - + <!-- Bean Validation API support --> <dependency> <groupId>javax.validation</groupId> diff --git a/samples/server/petstore/jaxrs/jersey2/src/gen/java/org/openapitools/api/AnotherFakeApi.java b/samples/server/petstore/jaxrs/jersey2/src/gen/java/org/openapitools/api/AnotherFakeApi.java index 8f7d9a631ce16eb2c4eed84928a5e2d42faaafd2..7243aca1894fb25604a9fcd46c68952b9612fad6 100644 --- a/samples/server/petstore/jaxrs/jersey2/src/gen/java/org/openapitools/api/AnotherFakeApi.java +++ b/samples/server/petstore/jaxrs/jersey2/src/gen/java/org/openapitools/api/AnotherFakeApi.java @@ -45,7 +45,7 @@ public class AnotherFakeApi { } catch (Exception e) { throw new RuntimeException(e); } - } + } } if (delegate == null) { 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 ef253e8fe5b3f9fd79f064ee523e6f6fa9920e20..42c59eb6c0a8a627780ba45209bc769d261629b2 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 @@ -54,7 +54,7 @@ public class FakeApi { } catch (Exception e) { throw new RuntimeException(e); } - } + } } if (delegate == null) { diff --git a/samples/server/petstore/jaxrs/jersey2/src/gen/java/org/openapitools/api/FakeClassnameTestApi.java b/samples/server/petstore/jaxrs/jersey2/src/gen/java/org/openapitools/api/FakeClassnameTestApi.java index cb2aa18bb8044a2cdca5599d082ec5e49a8eef0e..73c97f612555d1f721bd3a01c0800be67f292075 100644 --- a/samples/server/petstore/jaxrs/jersey2/src/gen/java/org/openapitools/api/FakeClassnameTestApi.java +++ b/samples/server/petstore/jaxrs/jersey2/src/gen/java/org/openapitools/api/FakeClassnameTestApi.java @@ -45,7 +45,7 @@ public class FakeClassnameTestApi { } catch (Exception e) { throw new RuntimeException(e); } - } + } } if (delegate == null) { diff --git a/samples/server/petstore/jaxrs/jersey2/src/gen/java/org/openapitools/api/PetApi.java b/samples/server/petstore/jaxrs/jersey2/src/gen/java/org/openapitools/api/PetApi.java index a31dd8b4083ca74fa64648148251a75ebf59111b..f404694759ddc50cf6220264f119c3fdfbdbb24d 100644 --- a/samples/server/petstore/jaxrs/jersey2/src/gen/java/org/openapitools/api/PetApi.java +++ b/samples/server/petstore/jaxrs/jersey2/src/gen/java/org/openapitools/api/PetApi.java @@ -48,7 +48,7 @@ public class PetApi { } catch (Exception e) { throw new RuntimeException(e); } - } + } } if (delegate == null) { diff --git a/samples/server/petstore/jaxrs/jersey2/src/gen/java/org/openapitools/api/StoreApi.java b/samples/server/petstore/jaxrs/jersey2/src/gen/java/org/openapitools/api/StoreApi.java index 39fbe7fb8749c33db0ed161526201434e92f613e..0a853c97eabfc98fdb05a18b882de6fbb4b120df 100644 --- a/samples/server/petstore/jaxrs/jersey2/src/gen/java/org/openapitools/api/StoreApi.java +++ b/samples/server/petstore/jaxrs/jersey2/src/gen/java/org/openapitools/api/StoreApi.java @@ -46,7 +46,7 @@ public class StoreApi { } catch (Exception e) { throw new RuntimeException(e); } - } + } } if (delegate == null) { diff --git a/samples/server/petstore/jaxrs/jersey2/src/gen/java/org/openapitools/api/UserApi.java b/samples/server/petstore/jaxrs/jersey2/src/gen/java/org/openapitools/api/UserApi.java index 36cc9df40f16aeac4507204a5208b5019d438c1e..05b3b1e61cce4c9ad5524eb01d6e1474e13dd15e 100644 --- a/samples/server/petstore/jaxrs/jersey2/src/gen/java/org/openapitools/api/UserApi.java +++ b/samples/server/petstore/jaxrs/jersey2/src/gen/java/org/openapitools/api/UserApi.java @@ -46,7 +46,7 @@ public class UserApi { } catch (Exception e) { throw new RuntimeException(e); } - } + } } if (delegate == null) { diff --git a/samples/server/petstore/php-symfony/SymfonyBundle-php/Controller/Controller.php b/samples/server/petstore/php-symfony/SymfonyBundle-php/Controller/Controller.php index f68f34969092c906d4f9a72183ede56de6de2a92..73389fb56ef3f95e8942418c95b8011d970e212f 100644 --- a/samples/server/petstore/php-symfony/SymfonyBundle-php/Controller/Controller.php +++ b/samples/server/petstore/php-symfony/SymfonyBundle-php/Controller/Controller.php @@ -165,7 +165,7 @@ class Controller extends AbstractController { // Figure out what the client accepts $accept = preg_split("/[\s,]+/", $accept); - + if (in_array('*/*', $accept) || in_array('application/*', $accept)) { // Prefer JSON if the client has no preference if (in_array('application/json', $produced)) { diff --git a/samples/server/petstore/php-symfony/SymfonyBundle-php/Controller/PetController.php b/samples/server/petstore/php-symfony/SymfonyBundle-php/Controller/PetController.php index 9ca6496280fc8adb550ba58e8427635280433152..ebc007a2284ce6bfbdf51b99d102e88269272dd6 100644 --- a/samples/server/petstore/php-symfony/SymfonyBundle-php/Controller/PetController.php +++ b/samples/server/petstore/php-symfony/SymfonyBundle-php/Controller/PetController.php @@ -110,7 +110,7 @@ class PetController extends Controller // Set authentication method 'petstore_auth' $handler->setpetstore_auth($securitypetstore_auth); - + // Make the call to the business logic $responseCode = 200; $responseHeaders = []; @@ -194,7 +194,7 @@ class PetController extends Controller // Set authentication method 'petstore_auth' $handler->setpetstore_auth($securitypetstore_auth); - + // Make the call to the business logic $responseCode = 204; $responseHeaders = []; @@ -282,7 +282,7 @@ class PetController extends Controller // Set authentication method 'petstore_auth' $handler->setpetstore_auth($securitypetstore_auth); - + // Make the call to the business logic $responseCode = 200; $responseHeaders = []; @@ -372,7 +372,7 @@ class PetController extends Controller // Set authentication method 'petstore_auth' $handler->setpetstore_auth($securitypetstore_auth); - + // Make the call to the business logic $responseCode = 200; $responseHeaders = []; @@ -457,7 +457,7 @@ class PetController extends Controller // Set authentication method 'api_key' $handler->setapi_key($securityapi_key); - + // Make the call to the business logic $responseCode = 200; $responseHeaders = []; @@ -555,7 +555,7 @@ class PetController extends Controller // Set authentication method 'petstore_auth' $handler->setpetstore_auth($securitypetstore_auth); - + // Make the call to the business logic $responseCode = 200; $responseHeaders = []; @@ -653,7 +653,7 @@ class PetController extends Controller // Set authentication method 'petstore_auth' $handler->setpetstore_auth($securitypetstore_auth); - + // Make the call to the business logic $responseCode = 204; $responseHeaders = []; @@ -749,7 +749,7 @@ class PetController extends Controller // Set authentication method 'petstore_auth' $handler->setpetstore_auth($securitypetstore_auth); - + // Make the call to the business logic $responseCode = 200; $responseHeaders = []; diff --git a/samples/server/petstore/php-symfony/SymfonyBundle-php/Controller/StoreController.php b/samples/server/petstore/php-symfony/SymfonyBundle-php/Controller/StoreController.php index b0bc06eafa6ada4901c85bfb13dc41d304d17188..d8e44da67929b330d265582e3854a1953eec4d68 100644 --- a/samples/server/petstore/php-symfony/SymfonyBundle-php/Controller/StoreController.php +++ b/samples/server/petstore/php-symfony/SymfonyBundle-php/Controller/StoreController.php @@ -85,7 +85,7 @@ class StoreController extends Controller try { $handler = $this->getApiHandler(); - + // Make the call to the business logic $responseCode = 204; $responseHeaders = []; @@ -155,7 +155,7 @@ class StoreController extends Controller // Set authentication method 'api_key' $handler->setapi_key($securityapi_key); - + // Make the call to the business logic $responseCode = 200; $responseHeaders = []; @@ -234,7 +234,7 @@ class StoreController extends Controller try { $handler = $this->getApiHandler(); - + // Make the call to the business logic $responseCode = 200; $responseHeaders = []; @@ -327,7 +327,7 @@ class StoreController extends Controller try { $handler = $this->getApiHandler(); - + // Make the call to the business logic $responseCode = 200; $responseHeaders = []; diff --git a/samples/server/petstore/php-symfony/SymfonyBundle-php/Controller/UserController.php b/samples/server/petstore/php-symfony/SymfonyBundle-php/Controller/UserController.php index b285ae5c23db0667c9c6d069fa61cf4e7f0be8d4..e4603dd9bd64aa35c5a5649953eb28dd6585d4c1 100644 --- a/samples/server/petstore/php-symfony/SymfonyBundle-php/Controller/UserController.php +++ b/samples/server/petstore/php-symfony/SymfonyBundle-php/Controller/UserController.php @@ -100,7 +100,7 @@ class UserController extends Controller // Set authentication method 'api_key' $handler->setapi_key($securityapi_key); - + // Make the call to the business logic $responseCode = 204; $responseHeaders = []; @@ -184,7 +184,7 @@ class UserController extends Controller // Set authentication method 'api_key' $handler->setapi_key($securityapi_key); - + // Make the call to the business logic $responseCode = 204; $responseHeaders = []; @@ -268,7 +268,7 @@ class UserController extends Controller // Set authentication method 'api_key' $handler->setapi_key($securityapi_key); - + // Make the call to the business logic $responseCode = 204; $responseHeaders = []; @@ -340,7 +340,7 @@ class UserController extends Controller // Set authentication method 'api_key' $handler->setapi_key($securityapi_key); - + // Make the call to the business logic $responseCode = 204; $responseHeaders = []; @@ -419,7 +419,7 @@ class UserController extends Controller try { $handler = $this->getApiHandler(); - + // Make the call to the business logic $responseCode = 200; $responseHeaders = []; @@ -513,7 +513,7 @@ class UserController extends Controller try { $handler = $this->getApiHandler(); - + // Make the call to the business logic $responseCode = 200; $responseHeaders = []; @@ -575,7 +575,7 @@ class UserController extends Controller // Set authentication method 'api_key' $handler->setapi_key($securityapi_key); - + // Make the call to the business logic $responseCode = 204; $responseHeaders = []; @@ -665,7 +665,7 @@ class UserController extends Controller // Set authentication method 'api_key' $handler->setapi_key($securityapi_key); - + // Make the call to the business logic $responseCode = 204; $responseHeaders = []; diff --git a/samples/server/petstore/php-symfony/SymfonyBundle-php/README.md b/samples/server/petstore/php-symfony/SymfonyBundle-php/README.md index b1aab117e18541eb60246332f300a56680cf39c1..0e5ac7c2d21268f06f5586854aa2fb307e08cfcd 100644 --- a/samples/server/petstore/php-symfony/SymfonyBundle-php/README.md +++ b/samples/server/petstore/php-symfony/SymfonyBundle-php/README.md @@ -179,4 +179,3 @@ Class | Method | HTTP request | Description - diff --git a/samples/server/petstore/php-symfony/SymfonyBundle-php/Service/JmsSerializer.php b/samples/server/petstore/php-symfony/SymfonyBundle-php/Service/JmsSerializer.php index b84223a828868afb2e258c15d035fd68ac38184e..7c8c1e1339a9086049d7d67d72a577b3d9951780 100644 --- a/samples/server/petstore/php-symfony/SymfonyBundle-php/Service/JmsSerializer.php +++ b/samples/server/petstore/php-symfony/SymfonyBundle-php/Service/JmsSerializer.php @@ -28,7 +28,7 @@ class JmsSerializer implements SerializerInterface public function deserialize($data, $type, $format) { if ($format == 'string') { - return $this->deserializeString($data, $type); + return $this->deserializeString($data, $type); } // If we end up here, let JMS serializer handle the deserialization diff --git a/samples/server/petstore/php-symfony/SymfonyBundle-php/git_push.sh b/samples/server/petstore/php-symfony/SymfonyBundle-php/git_push.sh index ced3be2b0c7b2349ff06d18da19d4b31435c9fa6..9405f72e950cdb8ca24c3cf4d15cee7eac62fde7 100644 --- a/samples/server/petstore/php-symfony/SymfonyBundle-php/git_push.sh +++ b/samples/server/petstore/php-symfony/SymfonyBundle-php/git_push.sh @@ -55,4 +55,3 @@ 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/server/petstore/python-aiohttp-srclayout/src/openapi_server/controllers/security_controller_.py b/samples/server/petstore/python-aiohttp-srclayout/src/openapi_server/controllers/security_controller_.py index 90ce5c351a1ebf566accb0ec378032f3aa286aae..b9a824bd55884569a5d02fd6577a5ef27b0c7234 100644 --- a/samples/server/petstore/python-aiohttp-srclayout/src/openapi_server/controllers/security_controller_.py +++ b/samples/server/petstore/python-aiohttp-srclayout/src/openapi_server/controllers/security_controller_.py @@ -26,4 +26,3 @@ def validate_scope_petstore_auth(required_scopes: List[str], token_scopes: List[ """ Validate required scopes are included in token scope """ return set(required_scopes).issubset(set(token_scopes)) - diff --git a/samples/server/petstore/python-aiohttp/openapi_server/controllers/security_controller_.py b/samples/server/petstore/python-aiohttp/openapi_server/controllers/security_controller_.py index 90ce5c351a1ebf566accb0ec378032f3aa286aae..b9a824bd55884569a5d02fd6577a5ef27b0c7234 100644 --- a/samples/server/petstore/python-aiohttp/openapi_server/controllers/security_controller_.py +++ b/samples/server/petstore/python-aiohttp/openapi_server/controllers/security_controller_.py @@ -26,4 +26,3 @@ def validate_scope_petstore_auth(required_scopes: List[str], token_scopes: List[ """ Validate required scopes are included in token scope """ return set(required_scopes).issubset(set(token_scopes)) - diff --git a/samples/server/petstore/python-flask/git_push.sh b/samples/server/petstore/python-flask/git_push.sh index ced3be2b0c7b2349ff06d18da19d4b31435c9fa6..9405f72e950cdb8ca24c3cf4d15cee7eac62fde7 100644 --- a/samples/server/petstore/python-flask/git_push.sh +++ b/samples/server/petstore/python-flask/git_push.sh @@ -55,4 +55,3 @@ 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/server/petstore/python-flask/openapi_server/controllers/security_controller_.py b/samples/server/petstore/python-flask/openapi_server/controllers/security_controller_.py index 1db7a68f466531e077bdb27c51c3dda71961f21b..085d0180bc575436e713f15da011925b4a06ece9 100644 --- a/samples/server/petstore/python-flask/openapi_server/controllers/security_controller_.py +++ b/samples/server/petstore/python-flask/openapi_server/controllers/security_controller_.py @@ -45,4 +45,3 @@ def validate_scope_petstore_auth(required_scopes, token_scopes): """ return set(required_scopes).issubset(set(token_scopes)) - 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 e7f83fbe38c6d42e06bbe9300783879c8b93b695..6ba03e0bd36f03c99c2fc39bb4aad8c39e97881e 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 @@ -203,13 +203,13 @@ Method | HTTP request | Description ## Documentation For Authorization ## api_key -- **Type**: API key +- **Type**: API key Example ``` ``` ## api_key_query -- **Type**: API key +- **Type**: API key Example ``` diff --git a/samples/server/petstore/spring-mvc-default-value/README.md b/samples/server/petstore/spring-mvc-default-value/README.md index 764a5ccde2a715a110740b689769bc031e97d7fe..1ff91b81b2ec705bcec84262c8f7d16b0f2ed7e4 100644 --- a/samples/server/petstore/spring-mvc-default-value/README.md +++ b/samples/server/petstore/spring-mvc-default-value/README.md @@ -1,9 +1,9 @@ # OpenAPI generated server -Spring Boot Server +Spring Boot Server -## Overview +## Overview This server was generated by the [OpenAPI Generator](https://openapi-generator.tech) project. By using the [OpenAPI-Spec](https://openapis.org), you can easily generate a server stub. This is an example of building a OpenAPI-enabled server in Java using the SpringBoot framework. @@ -12,7 +12,7 @@ The underlying library integrating OpenAPI to SpringBoot is [springfox](https:// Start your server as a simple java application -You can view the api documentation in swagger-ui by pointing to +You can view the api documentation in swagger-ui by pointing to http://localhost:8080/ Change default port value in application.properties \ No newline at end of file diff --git a/samples/server/petstore/springboot-beanvalidation-no-nullable/README.md b/samples/server/petstore/springboot-beanvalidation-no-nullable/README.md index 3ea6a97db1b79e085ece3d0b1843d448554756eb..8b9e02180fecc1191480519bf717bc76a34ce06a 100644 --- a/samples/server/petstore/springboot-beanvalidation-no-nullable/README.md +++ b/samples/server/petstore/springboot-beanvalidation-no-nullable/README.md @@ -1,9 +1,9 @@ # OpenAPI generated server -Spring Boot Server +Spring Boot Server -## Overview +## Overview This server was generated by the [OpenAPI Generator](https://openapi-generator.tech) project. By using the [OpenAPI-Spec](https://openapis.org), you can easily generate a server stub. This is an example of building a OpenAPI-enabled server in Java using the SpringBoot framework. @@ -12,7 +12,7 @@ The underlying library integrating OpenAPI to SpringBoot is [springfox](https:// Start your server as a simple java application -You can view the api documentation in swagger-ui by pointing to +You can view the api documentation in swagger-ui by pointing to http://localhost:80/ Change default port value in application.properties \ No newline at end of file diff --git a/samples/server/petstore/springboot-beanvalidation/README.md b/samples/server/petstore/springboot-beanvalidation/README.md index 3ea6a97db1b79e085ece3d0b1843d448554756eb..8b9e02180fecc1191480519bf717bc76a34ce06a 100644 --- a/samples/server/petstore/springboot-beanvalidation/README.md +++ b/samples/server/petstore/springboot-beanvalidation/README.md @@ -1,9 +1,9 @@ # OpenAPI generated server -Spring Boot Server +Spring Boot Server -## Overview +## Overview This server was generated by the [OpenAPI Generator](https://openapi-generator.tech) project. By using the [OpenAPI-Spec](https://openapis.org), you can easily generate a server stub. This is an example of building a OpenAPI-enabled server in Java using the SpringBoot framework. @@ -12,7 +12,7 @@ The underlying library integrating OpenAPI to SpringBoot is [springfox](https:// Start your server as a simple java application -You can view the api documentation in swagger-ui by pointing to +You can view the api documentation in swagger-ui by pointing to http://localhost:80/ Change default port value in application.properties \ No newline at end of file diff --git a/samples/server/petstore/springboot-delegate-j8/README.md b/samples/server/petstore/springboot-delegate-j8/README.md index 3ea6a97db1b79e085ece3d0b1843d448554756eb..8b9e02180fecc1191480519bf717bc76a34ce06a 100644 --- a/samples/server/petstore/springboot-delegate-j8/README.md +++ b/samples/server/petstore/springboot-delegate-j8/README.md @@ -1,9 +1,9 @@ # OpenAPI generated server -Spring Boot Server +Spring Boot Server -## Overview +## Overview This server was generated by the [OpenAPI Generator](https://openapi-generator.tech) project. By using the [OpenAPI-Spec](https://openapis.org), you can easily generate a server stub. This is an example of building a OpenAPI-enabled server in Java using the SpringBoot framework. @@ -12,7 +12,7 @@ The underlying library integrating OpenAPI to SpringBoot is [springfox](https:// Start your server as a simple java application -You can view the api documentation in swagger-ui by pointing to +You can view the api documentation in swagger-ui by pointing to http://localhost:80/ Change default port value in application.properties \ No newline at end of file diff --git a/samples/server/petstore/springboot-delegate/README.md b/samples/server/petstore/springboot-delegate/README.md index 3ea6a97db1b79e085ece3d0b1843d448554756eb..8b9e02180fecc1191480519bf717bc76a34ce06a 100644 --- a/samples/server/petstore/springboot-delegate/README.md +++ b/samples/server/petstore/springboot-delegate/README.md @@ -1,9 +1,9 @@ # OpenAPI generated server -Spring Boot Server +Spring Boot Server -## Overview +## Overview This server was generated by the [OpenAPI Generator](https://openapi-generator.tech) project. By using the [OpenAPI-Spec](https://openapis.org), you can easily generate a server stub. This is an example of building a OpenAPI-enabled server in Java using the SpringBoot framework. @@ -12,7 +12,7 @@ The underlying library integrating OpenAPI to SpringBoot is [springfox](https:// Start your server as a simple java application -You can view the api documentation in swagger-ui by pointing to +You can view the api documentation in swagger-ui by pointing to http://localhost:80/ Change default port value in application.properties \ No newline at end of file diff --git a/samples/server/petstore/springboot-implicitHeaders/README.md b/samples/server/petstore/springboot-implicitHeaders/README.md index 3ea6a97db1b79e085ece3d0b1843d448554756eb..8b9e02180fecc1191480519bf717bc76a34ce06a 100644 --- a/samples/server/petstore/springboot-implicitHeaders/README.md +++ b/samples/server/petstore/springboot-implicitHeaders/README.md @@ -1,9 +1,9 @@ # OpenAPI generated server -Spring Boot Server +Spring Boot Server -## Overview +## Overview This server was generated by the [OpenAPI Generator](https://openapi-generator.tech) project. By using the [OpenAPI-Spec](https://openapis.org), you can easily generate a server stub. This is an example of building a OpenAPI-enabled server in Java using the SpringBoot framework. @@ -12,7 +12,7 @@ The underlying library integrating OpenAPI to SpringBoot is [springfox](https:// Start your server as a simple java application -You can view the api documentation in swagger-ui by pointing to +You can view the api documentation in swagger-ui by pointing to http://localhost:80/ Change default port value in application.properties \ No newline at end of file diff --git a/samples/server/petstore/springboot-reactive/README.md b/samples/server/petstore/springboot-reactive/README.md index 04666708ae53ca08959e6a7e965c0133303fe71a..55dc732c1b0047ece4f84c95e78eb8ab4c5466db 100644 --- a/samples/server/petstore/springboot-reactive/README.md +++ b/samples/server/petstore/springboot-reactive/README.md @@ -1,9 +1,9 @@ # OpenAPI generated server -Spring Boot Server +Spring Boot Server -## Overview +## Overview This server was generated by the [OpenAPI Generator](https://openapi-generator.tech) project. By using the [OpenAPI-Spec](https://openapis.org), you can easily generate a server stub. This is an example of building a OpenAPI-enabled server in Java using the SpringBoot framework. diff --git a/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/README.md b/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/README.md index 3ea6a97db1b79e085ece3d0b1843d448554756eb..8b9e02180fecc1191480519bf717bc76a34ce06a 100644 --- a/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/README.md +++ b/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/README.md @@ -1,9 +1,9 @@ # OpenAPI generated server -Spring Boot Server +Spring Boot Server -## Overview +## Overview This server was generated by the [OpenAPI Generator](https://openapi-generator.tech) project. By using the [OpenAPI-Spec](https://openapis.org), you can easily generate a server stub. This is an example of building a OpenAPI-enabled server in Java using the SpringBoot framework. @@ -12,7 +12,7 @@ The underlying library integrating OpenAPI to SpringBoot is [springfox](https:// Start your server as a simple java application -You can view the api documentation in swagger-ui by pointing to +You can view the api documentation in swagger-ui by pointing to http://localhost:80/ Change default port value in application.properties \ No newline at end of file diff --git a/samples/server/petstore/springboot-spring-pageable-delegatePattern/README.md b/samples/server/petstore/springboot-spring-pageable-delegatePattern/README.md index 3ea6a97db1b79e085ece3d0b1843d448554756eb..8b9e02180fecc1191480519bf717bc76a34ce06a 100644 --- a/samples/server/petstore/springboot-spring-pageable-delegatePattern/README.md +++ b/samples/server/petstore/springboot-spring-pageable-delegatePattern/README.md @@ -1,9 +1,9 @@ # OpenAPI generated server -Spring Boot Server +Spring Boot Server -## Overview +## Overview This server was generated by the [OpenAPI Generator](https://openapi-generator.tech) project. By using the [OpenAPI-Spec](https://openapis.org), you can easily generate a server stub. This is an example of building a OpenAPI-enabled server in Java using the SpringBoot framework. @@ -12,7 +12,7 @@ The underlying library integrating OpenAPI to SpringBoot is [springfox](https:// Start your server as a simple java application -You can view the api documentation in swagger-ui by pointing to +You can view the api documentation in swagger-ui by pointing to http://localhost:80/ Change default port value in application.properties \ No newline at end of file diff --git a/samples/server/petstore/springboot-spring-pageable-without-j8/README.md b/samples/server/petstore/springboot-spring-pageable-without-j8/README.md index 3ea6a97db1b79e085ece3d0b1843d448554756eb..8b9e02180fecc1191480519bf717bc76a34ce06a 100644 --- a/samples/server/petstore/springboot-spring-pageable-without-j8/README.md +++ b/samples/server/petstore/springboot-spring-pageable-without-j8/README.md @@ -1,9 +1,9 @@ # OpenAPI generated server -Spring Boot Server +Spring Boot Server -## Overview +## Overview This server was generated by the [OpenAPI Generator](https://openapi-generator.tech) project. By using the [OpenAPI-Spec](https://openapis.org), you can easily generate a server stub. This is an example of building a OpenAPI-enabled server in Java using the SpringBoot framework. @@ -12,7 +12,7 @@ The underlying library integrating OpenAPI to SpringBoot is [springfox](https:// Start your server as a simple java application -You can view the api documentation in swagger-ui by pointing to +You can view the api documentation in swagger-ui by pointing to http://localhost:80/ Change default port value in application.properties \ No newline at end of file diff --git a/samples/server/petstore/springboot-spring-pageable/README.md b/samples/server/petstore/springboot-spring-pageable/README.md index 3ea6a97db1b79e085ece3d0b1843d448554756eb..8b9e02180fecc1191480519bf717bc76a34ce06a 100644 --- a/samples/server/petstore/springboot-spring-pageable/README.md +++ b/samples/server/petstore/springboot-spring-pageable/README.md @@ -1,9 +1,9 @@ # OpenAPI generated server -Spring Boot Server +Spring Boot Server -## Overview +## Overview This server was generated by the [OpenAPI Generator](https://openapi-generator.tech) project. By using the [OpenAPI-Spec](https://openapis.org), you can easily generate a server stub. This is an example of building a OpenAPI-enabled server in Java using the SpringBoot framework. @@ -12,7 +12,7 @@ The underlying library integrating OpenAPI to SpringBoot is [springfox](https:// Start your server as a simple java application -You can view the api documentation in swagger-ui by pointing to +You can view the api documentation in swagger-ui by pointing to http://localhost:80/ Change default port value in application.properties \ No newline at end of file diff --git a/samples/server/petstore/springboot-useoptional/README.md b/samples/server/petstore/springboot-useoptional/README.md index 3ea6a97db1b79e085ece3d0b1843d448554756eb..8b9e02180fecc1191480519bf717bc76a34ce06a 100644 --- a/samples/server/petstore/springboot-useoptional/README.md +++ b/samples/server/petstore/springboot-useoptional/README.md @@ -1,9 +1,9 @@ # OpenAPI generated server -Spring Boot Server +Spring Boot Server -## Overview +## Overview This server was generated by the [OpenAPI Generator](https://openapi-generator.tech) project. By using the [OpenAPI-Spec](https://openapis.org), you can easily generate a server stub. This is an example of building a OpenAPI-enabled server in Java using the SpringBoot framework. @@ -12,7 +12,7 @@ The underlying library integrating OpenAPI to SpringBoot is [springfox](https:// Start your server as a simple java application -You can view the api documentation in swagger-ui by pointing to +You can view the api documentation in swagger-ui by pointing to http://localhost:80/ Change default port value in application.properties \ No newline at end of file diff --git a/samples/server/petstore/springboot-virtualan/README.md b/samples/server/petstore/springboot-virtualan/README.md index ad53827c8b83038f4ff0754332a941069a197035..0fb4c3ae6dd03f4ff39936867c22b0f967ee03c4 100644 --- a/samples/server/petstore/springboot-virtualan/README.md +++ b/samples/server/petstore/springboot-virtualan/README.md @@ -1,9 +1,9 @@ # OpenAPI generated server -Spring Boot Server +Spring Boot Server -## Overview +## Overview This server was generated by the [OpenAPI Generator](https://openapi-generator.tech) project. By using the [OpenAPI-Spec](https://openapis.org), you can easily generate a server stub. This is an example of building a OpenAPI-enabled server in Java using the SpringBoot framework. @@ -12,15 +12,15 @@ The underlying library integrating OpenAPI to SpringBoot is [springfox](https:// Start your server as a simple java application -You can view the api documentation in swagger-ui by pointing to +You can view the api documentation in swagger-ui by pointing to http://localhost:80/ Change default port value in application.properties ## Virtualan : -You can view Virtualan UI by pointing to +You can view Virtualan UI by pointing to http://localhost:8080//virtualan-ui.html -How to use guide available in the Virtualan wiki +How to use guide available in the Virtualan wiki https://github.com/virtualansoftware/virtualan/wiki diff --git a/samples/server/petstore/springboot/README.md b/samples/server/petstore/springboot/README.md index 3ea6a97db1b79e085ece3d0b1843d448554756eb..8b9e02180fecc1191480519bf717bc76a34ce06a 100644 --- a/samples/server/petstore/springboot/README.md +++ b/samples/server/petstore/springboot/README.md @@ -1,9 +1,9 @@ # OpenAPI generated server -Spring Boot Server +Spring Boot Server -## Overview +## Overview This server was generated by the [OpenAPI Generator](https://openapi-generator.tech) project. By using the [OpenAPI-Spec](https://openapis.org), you can easily generate a server stub. This is an example of building a OpenAPI-enabled server in Java using the SpringBoot framework. @@ -12,7 +12,7 @@ The underlying library integrating OpenAPI to SpringBoot is [springfox](https:// Start your server as a simple java application -You can view the api documentation in swagger-ui by pointing to +You can view the api documentation in swagger-ui by pointing to http://localhost:80/ Change default port value in application.properties \ No newline at end of file