Squashed commit of the following:

commit c5a0d0f7394aa742fa336fff7e7c1d3049761868
Merge: 8c4991ba3ed f8ff8c87609
Author: William Cheng <wing328hk@gmail.com>
Date:   Tue Aug 17 18:28:12 2021 +0800

    Merge branch 'mustache-linting' of https://github.com/NathanBaulch/openapi-generator into NathanBaulch-mustache-linting

commit f8ff8c87609b1ca36fa26fb8474806999638195e
Author: Nathan Baulch <nathan.baulch@gmail.com>
Date:   Thu Aug 5 14:12:47 2021 +1000

    Reorder tags that handle missing values

commit f5d8a33709d6a3f846a9fe4520b78c3d637051d9
Author: Nathan Baulch <nathan.baulch@gmail.com>
Date:   Thu Aug 5 14:08:59 2021 +1000

    Use dot notation where possible

commit 493d14921e2333f3ae19ef6fc89318b7e263a80c
Author: Nathan Baulch <nathan.baulch@gmail.com>
Date:   Thu Aug 5 14:10:49 2021 +1000

    Remove empty tags

commit 32480dc53f48227d55531b94e307d72671373737
Author: Nathan Baulch <nathan.baulch@gmail.com>
Date:   Thu Aug 5 10:41:58 2021 +1000

    Remove redundant sections

commit a8edabd722c34aa094b4aeb11c22664529c3a219
Author: Nathan Baulch <nathan.baulch@gmail.com>
Date:   Wed Aug 4 22:02:22 2021 +1000

    Trim extra EOF new lines

commit e89bd7458e3594bf0d30e580bc9408e45b018a57
Author: Nathan Baulch <nathan.baulch@gmail.com>
Date:   Wed Aug 4 21:59:26 2021 +1000

    Trim trailing whitespace
This commit is contained in:
William Cheng 2021-08-17 18:37:51 +08:00
parent 7edddb6531
commit 0204bf4ae2
2184 changed files with 6677 additions and 7219 deletions

View File

@ -74,7 +74,7 @@ All URIs are relative to *{{basePath}}*
Method | HTTP request | Description 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}} {{/operation}}{{/operations}}{{/apis}}{{/apiInfo}}
### Models ### Models

View File

@ -13,7 +13,7 @@ package body {{package}}.Clients is
procedure {{operationId}} procedure {{operationId}}
(Client : in out Client_Type{{#hasParams}};{{/hasParams}}{{#allParams}} (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}}; {{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}} URI : Swagger.Clients.URI_Type;{{#hasBodyParam}}
Req : Swagger.Clients.Request_Type;{{/hasBodyParam}}{{#hasFormParams}} Req : Swagger.Clients.Request_Type;{{/hasBodyParam}}{{#hasFormParams}}
Req : Swagger.Clients.Request_Type;{{/hasFormParams}} Req : Swagger.Clients.Request_Type;{{/hasFormParams}}

View File

@ -17,7 +17,7 @@ package {{package}}.Clients is
procedure {{operationId}} procedure {{operationId}}
(Client : in out Client_Type{{#hasParams}};{{/hasParams}}{{#allParams}} (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}}; {{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}} {{/operation}}
{{/operations}} {{/operations}}

View File

@ -1,8 +1,8 @@
-- {{{appName}}} -- {{{appName}}}
-- {{{appDescription}}} -- {{{appDescription}}}
-- --
-- {{#version}}The version of the OpenAPI document: {{{version}}}{{/version}} -- {{#version}}The version of the OpenAPI document: {{{.}}}{{/version}}
--{{#infoEmail}} Contact: {{{infoEmail}}}{{/infoEmail}} --{{#infoEmail}} Contact: {{{.}}}{{/infoEmail}}
-- --
-- NOTE: This package is auto generated by OpenAPI-Generator {{{generatorVersion}}}. -- NOTE: This package is auto generated by OpenAPI-Generator {{{generatorVersion}}}.
-- https://openapi-generator.tech -- https://openapi-generator.tech

View File

@ -23,7 +23,7 @@ package body {{package}}.Servers is
(Server : in out Server_Type{{#hasParams}};{{/hasParams}} (Server : in out Server_Type{{#hasParams}};{{/hasParams}}
{{#allParams}}{{paramName}} : in {{dataType}}{{^-last}}; {{#allParams}}{{paramName}} : in {{dataType}}{{^-last}};
{{/-last}}{{/allParams}}{{#returnType}}; {{/-last}}{{/allParams}}{{#returnType}};
Result : out {{returnType}}{{/returnType}}; Result : out {{.}}{{/returnType}};
Context : in out Swagger.Servers.Context_Type) is Context : in out Swagger.Servers.Context_Type) is
begin begin
null; null;

View File

@ -33,5 +33,3 @@ log4j.logger.Util=DEBUG
log4j.logger.Servlet=DEBUG log4j.logger.Servlet=DEBUG
log4j.logger.Util.Serialize.Mappers=WARN log4j.logger.Util.Serialize.Mappers=WARN
log4j.logger.Util.Serialize.IO=INFO log4j.logger.Util.Serialize.IO=INFO

View File

@ -34,7 +34,7 @@ package body {{package}}.Skeletons is
{{paramName}} : {{dataType}}; {{paramName}} : {{dataType}};
{{/allParams}} {{/allParams}}
{{#returnType}} {{#returnType}}
Result : {{returnType}}; Result : {{.}};
{{/returnType}} {{/returnType}}
begin begin
{{#vendorExtensions.x-auth-scopes}} {{#vendorExtensions.x-auth-scopes}}
@ -130,7 +130,7 @@ package body {{package}}.Skeletons is
{{paramName}} : {{dataType}}; {{paramName}} : {{dataType}};
{{/allParams}} {{/allParams}}
{{#returnType}} {{#returnType}}
Result : {{returnType}}; Result : {{.}};
{{/returnType}} {{/returnType}}
begin begin
{{#vendorExtensions.x-auth-scopes}} {{#vendorExtensions.x-auth-scopes}}
@ -219,7 +219,7 @@ package body {{package}}.Skeletons is
procedure {{operationId}} procedure {{operationId}}
({{#allParams}}{{paramName}} : in {{dataType}}{{^-last}}; ({{#allParams}}{{paramName}} : in {{dataType}}{{^-last}};
{{/-last}}{{/allParams}}{{#returnType}}; {{/-last}}{{/allParams}}{{#returnType}};
Result : out {{returnType}}{{/returnType}}; Result : out {{.}}{{/returnType}};
Context : in out Swagger.Servers.Context_Type) is Context : in out Swagger.Servers.Context_Type) is
begin begin
Impl.{{operationId}} Impl.{{operationId}}

View File

@ -27,7 +27,7 @@ package {{package}}.Skeletons is
(Server : in out Server_Type{{#hasParams}};{{/hasParams}} (Server : in out Server_Type{{#hasParams}};{{/hasParams}}
{{#allParams}}{{paramName}} : in {{dataType}}{{^-last}}; {{#allParams}}{{paramName}} : in {{dataType}}{{^-last}};
{{/-last}}{{/allParams}}{{#returnType}}; {{/-last}}{{/allParams}}{{#returnType}};
Result : out {{returnType}}{{/returnType}}; Result : out {{.}}{{/returnType}};
Context : in out Swagger.Servers.Context_Type) is abstract; Context : in out Swagger.Servers.Context_Type) is abstract;
{{/operation}} {{/operation}}
{{/operations}} {{/operations}}
@ -95,7 +95,7 @@ package {{package}}.Skeletons is
procedure {{operationId}} procedure {{operationId}}
({{#allParams}}{{paramName}} : in {{dataType}}{{^-last}}; ({{#allParams}}{{paramName}} : in {{dataType}}{{^-last}};
{{/-last}}{{/allParams}}{{#returnType}}; {{/-last}}{{/allParams}}{{#returnType}};
Result : out {{returnType}}{{/returnType}}; Result : out {{.}}{{/returnType}};
Context : in out Swagger.Servers.Context_Type); Context : in out Swagger.Servers.Context_Type);
{{/hasParams}} {{/hasParams}}
{{^hasParams}} {{^hasParams}}

View File

@ -31,7 +31,7 @@ package {{package}}.Servers is
(Server : in out Server_Type{{#hasParams}};{{/hasParams}} (Server : in out Server_Type{{#hasParams}};{{/hasParams}}
{{#allParams}}{{paramName}} : in {{dataType}}{{^-last}}; {{#allParams}}{{paramName}} : in {{dataType}}{{^-last}};
{{/-last}}{{/allParams}}{{#returnType}}; {{/-last}}{{/allParams}}{{#returnType}};
Result : out {{returnType}}{{/returnType}}; Result : out {{.}}{{/returnType}};
Context : in out Swagger.Servers.Context_Type); Context : in out Swagger.Servers.Context_Type);
{{/operation}} {{/operation}}
{{/operations}} {{/operations}}

View File

@ -17,7 +17,7 @@ if (OPENSSL_FOUND)
include_directories(${OPENSSL_INCLUDE_DIRS}) include_directories(${OPENSSL_INCLUDE_DIRS})
link_directories(${OPENSSL_LIBRARIES}) link_directories(${OPENSSL_LIBRARIES})
message(STATUS "Using OpenSSL ${OPENSSL_VERSION}") message(STATUS "Using OpenSSL ${OPENSSL_VERSION}")
else() else()
message (STATUS "OpenSSL Not found.") message (STATUS "OpenSSL Not found.")
endif() endif()

View File

@ -70,7 +70,7 @@ All URIs are relative to *{{basePath}}*
Category | Method | HTTP request | Description 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}} {{/operation}}{{/operations}}{{/apis}}{{/apiInfo}}
## Documentation for Models ## Documentation for Models

View File

@ -91,11 +91,11 @@ end:
{{#operations}} {{#operations}}
{{#operation}} {{#operation}}
{{#summary}} {{#summary}}
// {{{summary}}} // {{{.}}}
// //
{{/summary}} {{/summary}}
{{#notes}} {{#notes}}
// {{{notes}}} // {{{.}}}
// //
{{/notes}} {{/notes}}
{{#returnType}}{{#returnTypeIsPrimitive}}{{#returnSimpleType}}{{{.}}}*{{/returnSimpleType}}{{^returnSimpleType}}{{#isArray}}{{{.}}}_t*{{/isArray}}{{#isMap}}{{{.}}}{{/isMap}}{{/returnSimpleType}}{{/returnTypeIsPrimitive}}{{^returnTypeIsPrimitive}}{{{.}}}_t*{{/returnTypeIsPrimitive}}{{/returnType}}{{^returnType}}void{{/returnType}} {{#returnType}}{{#returnTypeIsPrimitive}}{{#returnSimpleType}}{{{.}}}*{{/returnSimpleType}}{{^returnSimpleType}}{{#isArray}}{{{.}}}_t*{{/isArray}}{{#isMap}}{{{.}}}{{/isMap}}{{/returnSimpleType}}{{/returnTypeIsPrimitive}}{{^returnTypeIsPrimitive}}{{{.}}}_t*{{/returnTypeIsPrimitive}}{{/returnType}}{{^returnType}}void{{/returnType}}

View File

@ -25,11 +25,11 @@ typedef enum { {{projectName}}_{{operationId}}_{{enumName}}_NULL = 0{{#enumVars
{{#operations}} {{#operations}}
{{#operation}} {{#operation}}
{{#summary}} {{#summary}}
// {{{summary}}} // {{{.}}}
// //
{{/summary}} {{/summary}}
{{#notes}} {{#notes}}
// {{{notes}}} // {{{.}}}
// //
{{/notes}} {{/notes}}
{{#returnType}}{{#returnTypeIsPrimitive}}{{#returnSimpleType}}{{{.}}}*{{/returnSimpleType}}{{^returnSimpleType}}{{#isArray}}{{{.}}}_t*{{/isArray}}{{#isMap}}{{{.}}}{{/isMap}}{{/returnSimpleType}}{{/returnTypeIsPrimitive}}{{^returnTypeIsPrimitive}}{{{.}}}_t*{{/returnTypeIsPrimitive}}{{/returnType}}{{^returnType}}void{{/returnType}} {{#returnType}}{{#returnTypeIsPrimitive}}{{#returnSimpleType}}{{{.}}}*{{/returnSimpleType}}{{^returnSimpleType}}{{#isArray}}{{{.}}}_t*{{/isArray}}{{#isMap}}{{{.}}}{{/isMap}}{{/returnSimpleType}}{{/returnTypeIsPrimitive}}{{^returnTypeIsPrimitive}}{{{.}}}_t*{{/returnTypeIsPrimitive}}{{/returnType}}{{^returnType}}void{{/returnType}}

View File

@ -1,11 +1,11 @@
# {{classname}}{{#description}} # {{classname}}{{#description}}
{{description}}{{/description}} {{.}}{{/description}}
All URIs are relative to *{{basePath}}* All URIs are relative to *{{basePath}}*
Method | HTTP request | Description 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}} {{/operation}}{{/operations}}
{{#operations}} {{#operations}}
@ -13,11 +13,11 @@ Method | HTTP request | Description
# **{{classname}}_{{{operationId}}}** # **{{classname}}_{{{operationId}}}**
```c ```c
{{#summary}} {{#summary}}
// {{{summary}}} // {{{.}}}
// //
{{/summary}} {{/summary}}
{{#notes}} {{#notes}}
// {{{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}}); {{#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 ### Parameters
Name | Type | Description | Notes Name | Type | Description | Notes
------------- | ------------- | ------------- | ------------- ------------- | ------------- | ------------- | -------------
**apiClient** | **apiClient_t \*** | context containing the client configuration | **apiClient** | **apiClient_t \*** | context containing the client configuration |
{{#allParams}} {{#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}} {{/allParams}}
### Return type ### Return type

View File

@ -27,14 +27,14 @@
{{classname}}_t* {{classname}} = NULL; {{classname}}_t* {{classname}} = NULL;
if (include_optional) { if (include_optional) {
{{classname}} = {{classname}}_create( {{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 {{/isEnum}}{{^isEnum}} // false, not to have infinite recursion
instantiate_{{{dataType}}}(0){{/isEnum}}{{/isModel}}{{^isModel}}0{{/isModel}}{{/example}}{{^-last}},{{/-last}} instantiate_{{{dataType}}}(0){{/isEnum}}{{/isModel}}{{^isModel}}0{{/isModel}}{{/example}}{{^-last}},{{/-last}}
{{/vars}} {{/vars}}
); );
} else { } else {
{{classname}} = {{classname}}_create( {{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}} {{/isEnum}}{{^isEnum}}NULL{{/isEnum}}{{/isModel}}{{^isModel}}0{{/isModel}}{{/example}}{{^-last}},{{/-last}}
{{/vars}} {{/vars}}
); );

View File

@ -1,7 +1,7 @@
# Eiffel API client for {{packageName}} # Eiffel API client for {{packageName}}
{{#appDescriptionWithNewLines}} {{#appDescriptionWithNewLines}}
{{{appDescriptionWithNewLines}}} {{{.}}}
{{/appDescriptionWithNewLines}} {{/appDescriptionWithNewLines}}
## Overview ## Overview
@ -29,7 +29,7 @@ All URIs are relative to *{{basePath}}*
Class | Method | HTTP request | Description 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}} {{/operation}}{{/operations}}{{/apis}}{{/apiInfo}}
## Documentation For Models ## Documentation For Models
@ -43,7 +43,7 @@ Class | Method | HTTP request | Description
{{/authMethods}}{{#authMethods}}{{#last}} Authentication schemes defined for the API:{{/last}}{{/authMethods}} {{/authMethods}}{{#authMethods}}{{#last}} Authentication schemes defined for the API:{{/last}}{{/authMethods}}
{{#authMethods}}## {{{name}}} {{#authMethods}}## {{{name}}}
{{#isApiKey}}- **Type**: API key {{#isApiKey}}- **Type**: API key
- **API key parameter name**: {{{keyParamName}}} - **API key parameter name**: {{{keyParamName}}}
- **Location**: {{#isKeyInQuery}}URL query string{{/isKeyInQuery}}{{#isKeyInHeader}}HTTP header{{/isKeyInHeader}} - **Location**: {{#isKeyInQuery}}URL query string{{/isKeyInQuery}}{{#isKeyInHeader}}HTTP header{{/isKeyInHeader}}
{{/isApiKey}} {{/isApiKey}}

View File

@ -13,25 +13,25 @@ feature -- API Access
{{#operation}} {{#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}} -- {{summary}}
-- {{notes}} -- {{notes}}
-- {{#allParams}} -- {{#allParams}}
-- argument: {{paramName}} {{description}}{{#required}} (required){{/required}}{{^required}} (optional{{#defaultValue}}, default to {{{.}}}{{/defaultValue}}){{/required}} -- argument: {{paramName}} {{description}}{{#required}} (required){{/required}}{{^required}} (optional{{#defaultValue}}, default to {{{.}}}{{/defaultValue}}){{/required}}
-- {{/allParams}} -- {{/allParams}}
-- {{#returnType}} -- {{#returnType}}
-- Result {{returnType}}{{/returnType}} -- Result {{.}}{{/returnType}}
require require
{{#allParams}} {{#allParams}}
{{#hasValidation}} {{#hasValidation}}
{{#maximum}} {{#maximum}}
{{{paramName}}}_is_less_or_equal_than: {{{paramName}}} <= {{{maximum}}} {{{paramName}}}_is_less_or_equal_than: {{{paramName}}} <= {{{maximum}}}
{{/maximum}} {{/maximum}}
{{#minimum}} {{#minimum}}
{{{paramName}}}_is_greater_or_equal_than: {{{paramName}}} >= {{{minimum}}} {{{paramName}}}_is_greater_or_equal_than: {{{paramName}}} >= {{{minimum}}}
{{/minimum}} {{/minimum}}
{{/hasValidation}} {{/hasValidation}}
{{/allParams}} {{/allParams}}
local local
l_path: STRING l_path: STRING
l_request: API_CLIENT_REQUEST l_request: API_CLIENT_REQUEST
@ -45,7 +45,7 @@ feature -- API Access
l_path.replace_substring_all ("{"+"{{baseName}}"+"}", api_client.url_encode ({{{paramName}}}.out)) l_path.replace_substring_all ("{"+"{{baseName}}"+"}", api_client.url_encode ({{{paramName}}}.out))
{{/pathParams}} {{/pathParams}}
{{#queryParams}} {{#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}} {{/queryParams}}
{{#headerParams}} {{#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.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_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}}) 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 if l_response.has_error then
last_error := l_response.error last_error := l_response.error
elseif attached { {{{returnType}}} } l_response.data ({ {{{returnType}}} }) as l_data then elseif attached { {{{returnType}}} } l_response.data ({ {{{returnType}}} }) as l_data then
@ -79,7 +79,7 @@ feature -- API Access
last_error := l_response.error last_error := l_response.error
end end
{{/returnType}} {{/returnType}}
end end
{{/operation}} {{/operation}}

View File

@ -1,4 +1,4 @@
{{>noteinfo}} {{>noteinfo}}
class class
API_CLIENT API_CLIENT
@ -14,13 +14,13 @@ feature {NONE} -- Initialization
set_base_path (default_base_path) set_base_path (default_base_path)
--set default user_agent --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}} 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}} is_basic_auth_configured := True {{/isBasic}}{{#isApiKey}}
authentications.force (create {API_KEY_AUTH}.make ({{#isKeyInHeader}}"header"{{/isKeyInHeader}}{{^isKeyInHeader}}"query"{{/isKeyInHeader}}, "{{keyParamName}}"), "{{name}}") authentications.force (create {API_KEY_AUTH}.make ({{#isKeyInHeader}}"header"{{/isKeyInHeader}}{{^isKeyInHeader}}"query"{{/isKeyInHeader}}, "{{keyParamName}}"), "{{name}}")
is_api_key_configured := True {{/isApiKey}}{{#isOAuth}} is_api_key_configured := True {{/isApiKey}}{{#isOAuth}}
authentications.force (create {OAUTH},"{{name}}") authentications.force (create {OAUTH},"{{name}}")
is_oauth_configured := True {{/isOAuth}}{{/authMethods}} is_oauth_configured := True {{/isOAuth}}{{/authMethods}}
end end
@ -42,7 +42,7 @@ feature -- Status Report
-- is basic auth configured. -- is basic auth configured.
is_api_key_configured: BOOLEAN is_api_key_configured: BOOLEAN
-- is api key auth configured. -- is api key auth configured.
is_oauth_configured: BOOLEAN is_oauth_configured: BOOLEAN
-- is oauth configured. -- is oauth configured.
@ -138,7 +138,7 @@ feature -- Query Parameter Helpers
if attached {LIST [ANY]} a_value as a_list then if attached {LIST [ANY]} a_value as a_list then
-- Collection -- Collection
if a_list.is_empty then 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) create {ARRAYED_LIST [TUPLE [name: STRING; value: STRING]]} Result.make (0)
else else
-- collection format: multi, csv, ssv, tsv, pipes. -- collection format: multi, csv, ssv, tsv, pipes.
@ -312,7 +312,7 @@ feature --Helper: Http Client
-- Url encode `a_val' -- Url encode `a_val'
do do
Result := (create {URL_ENCODER}).encoded_string (a_val) Result := (create {URL_ENCODER}).encoded_string (a_val)
end end
feature -- HTTP client: call api feature -- HTTP client: call api
@ -373,9 +373,9 @@ feature -- HTTP client: call api
then then
-- Serialize an object `a_body' to content-type `l_type' -- Serialize an object `a_body' to content-type `l_type'
-- if not support by default you will need to extend -- 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)) l_context_executor.set_upload_data((create {API_SERIALIZER}).serializer (l_custom_serializer, l_content_type, l_body))
end end
end end
if if
@ -514,7 +514,7 @@ feature {NONE} -- Implementation
sess.set_is_debug (True) sess.set_is_debug (True)
end end
debug ("proxy8888") 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 end
end end

View File

@ -1,29 +1,29 @@
# {{classname}}{{#description}} # {{classname}}{{#description}}
{{description}}{{/description}} {{.}}{{/description}}
All URIs are relative to *{{basePath}}* All URIs are relative to *{{basePath}}*
Feature | HTTP request | Description 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}} {{/operation}}{{/operations}}
{{#operations}} {{#operations}}
{{#operation}} {{#operation}}
# **{{{operationId}}}** # **{{{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}} {{{summary}}}{{#notes}}
{{{notes}}}{{/notes}} {{{.}}}{{/notes}}
### Parameters ### Parameters
{{^allParams}}This endpoint does not need any parameter.{{/allParams}}{{#allParams}}{{#-last}} {{^allParams}}This endpoint does not need any parameter.{{/allParams}}{{#allParams}}{{#-last}}
Name | Type | Description | Notes Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------{{/-last}}{{/allParams}} ------------- | ------------- | ------------- | -------------{{/-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}} {{/allParams}}
### Return type ### Return type

View File

@ -1,5 +1,5 @@
<?xml version="1.0" encoding="ISO-8859-1"?> <?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}}"> <target name="{{libraryTarget}}">
<root all_classes="true"/> <root all_classes="true"/>
<file_rule> <file_rule>
@ -10,7 +10,7 @@
</file_rule> </file_rule>
<option warning="warning" manifest_array_type="mismatch_warning"> <option warning="warning" manifest_array_type="mismatch_warning">
<assertions precondition="true" postcondition="true" check="true" invariant="true" loop="true" supplier_precondition="true"/> <assertions precondition="true" postcondition="true" check="true" invariant="true" loop="true" supplier_precondition="true"/>
</option> </option>
<setting name="console_application" value="true"/> <setting name="console_application" value="true"/>
<library name="base" location="$ISE_LIBRARY/library/base/base.ecf"/> <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"/> <library name="encoder" location="$ISE_LIBRARY\contrib\library\web\framework\ewf\text\encoder\encoder.ecf"/>

View File

@ -52,22 +52,22 @@ feature -- Change Element
-- with `key'. -- with `key'.
do do
header_params.force (new, key) header_params.force (new, key)
end end
add_form (new: ANY; key: READABLE_STRING_GENERAL) add_form (new: ANY; key: READABLE_STRING_GENERAL)
-- Update `form_params' so that `new' will be the item associated -- Update `form_params' so that `new' will be the item associated
-- with `key'. -- with `key'.
do do
form_params.force (new, key) form_params.force (new, key)
end end
set_body (a_body: like body) set_body (a_body: like body)
-- Set 'body' with 'a_body'. -- Set 'body' with 'a_body'.
do do
body := a_body body := a_body
ensure ensure
body_set: body = a_body body_set: body = a_body
end end
set_auth_names (a_auth_names: like auth_names) set_auth_names (a_auth_names: like auth_names)
-- Set 'auth_names' with 'a_auth_names'. -- Set 'auth_names' with 'a_auth_names'.
@ -75,5 +75,5 @@ feature -- Change Element
auth_names := a_auth_names auth_names := a_auth_names
ensure ensure
auth_names_set: auth_names = a_auth_names auth_names_set: auth_names = a_auth_names
end end
end end

View File

@ -84,7 +84,7 @@ feature -- Deserializer
create err create err
err.set_description ("Deserialization is not supported by default you will need to add it by hand.") err.set_description ("Deserialization is not supported by default you will need to add it by hand.")
err.raise err.raise
end end
end end

View File

@ -1,4 +1,4 @@
{{>noteinfo}} {{>noteinfo}}
deferred class deferred class
AUTHENTICATION AUTHENTICATION

View File

@ -15,7 +15,7 @@ feature -- Access
password: detachable STRING_32 password: detachable STRING_32
-- Password. -- Password.
feature -- Element Change feature -- Element Change
set_user_name (a_name: STRING_32) set_user_name (a_name: STRING_32)
-- Set `user_name' with `a_name'. -- Set `user_name' with `a_name'.

View File

@ -2,37 +2,37 @@ note
description: "[ description: "[
Object Helper to deserialize a string in JSON format to an object in the domain model 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 How to write a converter. Suppose we have the following class
PERSON PERSON
id: INTEGER_64 id: INTEGER_64
name: STRING name: STRING
address: ADDRESS address: ADDRESS
hobbies: LIST [STRING] hobbies: LIST [STRING]
photos: LIST [PHOTOS] photos: LIST [PHOTOS]
conversion: conversion:
First go to the feature from_json_to_`model' and then start to set First go to the feature from_json_to_`model' and then start to set
the object attibures as follow. the object attibures as follow.
STRING, INTEGER, etc use the following pattern STRING, INTEGER, etc use the following pattern
Result.set_id (integer_64_value_from_json (a_json, "id")) Result.set_id (integer_64_value_from_json (a_json, "id"))
Result.set_name (string_value_from_json (a_json, "name")) Result.set_name (string_value_from_json (a_json, "name"))
OBJECTS OBJECTS
When you have an attribute that's an object itself (part of the domain) you will need to first 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 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) `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 if attached {JSON_OBJECT} json_value (a_json, "address") as l_address then
Result.set_address(from_json_to_address (l_address)) Result.set_address(from_json_to_address (l_address))
end end
LIST [STRING] or other simple types. 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 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. We will need a local variable to build the lists.
if attached {JSON_ARRAY} json_value (a_json, "hobbies") as l_array then if attached {JSON_ARRAY} json_value (a_json, "hobbies") as l_array then
create {ARRAYED_LIST [STRING]} l_hobbies.make (l_array.count) create {ARRAYED_LIST [STRING]} l_hobbies.make (l_array.count)
across l_array as ic loop across l_array as ic loop
@ -41,13 +41,13 @@ note
end end
end end
Result.set_hobbies (l_hobbies) Result.set_hobbies (l_hobbies)
end end
LIST [PHOTOS] LIST [PHOTOS]
This case is similar to the previous, but in this case the element is 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. 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 if attached {JSON_ARRAY} json_value (a_json, "photos") as l_array then
create {ARRAYED_LIST [PHOTOS]} l_photos.make (l_array.count) create {ARRAYED_LIST [PHOTOS]} l_photos.make (l_array.count)
across across

View File

@ -50,7 +50,7 @@ feature -- Cleaning
fields_infos_by_type_id := Void fields_infos_by_type_id := Void
end 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 reference_from_json_array (a_json: JSON_ARRAY; ctx: JSON_DESERIALIZER_CONTEXT; a_type: detachable TYPE [detachable ANY]): detachable ANY
do do
@ -263,7 +263,7 @@ feature {NONE} -- Helpers : Array
end end
end end
feature {NONE} -- Helpers: Object feature {NONE} -- Helpers: Object
type_name_from_json_object (a_json_object: JSON_OBJECT): detachable READABLE_STRING_32 type_name_from_json_object (a_json_object: JSON_OBJECT): detachable READABLE_STRING_32
do do
@ -364,7 +364,7 @@ feature {NONE} -- Helpers: Object
end end
end end
feature {NONE} -- Helpers: Basic values feature {NONE} -- Helpers: Basic values
boolean_from_json (v: JSON_VALUE): BOOLEAN boolean_from_json (v: JSON_VALUE): BOOLEAN
do do

View File

@ -11,7 +11,7 @@ inherit
JSON_TYPE_UTILITIES JSON_TYPE_UTILITIES
feature -- Factory feature -- Factory
new_special_for_name (a_type_name: READABLE_STRING_GENERAL; count: INTEGER): detachable SPECIAL [detachable ANY] new_special_for_name (a_type_name: READABLE_STRING_GENERAL; count: INTEGER): detachable SPECIAL [detachable ANY]
do do

View File

@ -1,4 +1,4 @@
class {{classname}} class {{classname}}
{{#parent}} {{#parent}}
inherit inherit
@ -7,15 +7,15 @@ inherit
{{#parent}} {{#parent}}
{{{parent}}} {{{parent}}}
{{^isPrimitiveType}} {{^isPrimitiveType}}
{{^isMap}} {{^isMap}}
{{^isArray}} {{^isArray}}
rename rename
output as out_{{{parentSchema}}} output as out_{{{parentSchema}}}
end end
{{/isArray}} {{/isArray}}
{{/isMap}} {{/isMap}}
{{/isPrimitiveType}} {{/isPrimitiveType}}
{{/parent}} {{/parent}}
feature --Access feature --Access
@ -24,31 +24,31 @@ feature --Access
{{^isInherited}} {{^isInherited}}
{{#isPrimitiveType}} {{#isPrimitiveType}}
{{^isContainer}} {{^isContainer}}
{{name}}: {{{dataType}}} {{name}}: {{{dataType}}}
{{#description}}-- {{{description}}}{{/description}} {{#description}}-- {{{.}}}{{/description}}
{{/isContainer}} {{/isContainer}}
{{/isPrimitiveType}} {{/isPrimitiveType}}
{{#isPrimitiveType}} {{#isPrimitiveType}}
{{#isContainer}} {{#isContainer}}
{{name}}: detachable {{{datatypeWithEnum}}} {{name}}: detachable {{{datatypeWithEnum}}}
{{#description}}-- {{{description}}}{{/description}} {{#description}}-- {{{.}}}{{/description}}
{{/isContainer}} {{/isContainer}}
{{/isPrimitiveType}} {{/isPrimitiveType}}
{{^isPrimitiveType}} {{^isPrimitiveType}}
{{#isContainer}} {{#isContainer}}
{{name}}: detachable {{{datatypeWithEnum}}} {{name}}: detachable {{{datatypeWithEnum}}}
{{#description}}-- {{{description}}}{{/description}} {{#description}}-- {{{.}}}{{/description}}
{{/isContainer}} {{/isContainer}}
{{^isContainer}} {{^isContainer}}
{{name}}: detachable {{{dataType}}} {{name}}: detachable {{{dataType}}}
{{#description}}-- {{{description}}}{{/description}} {{#description}}-- {{{.}}}{{/description}}
{{/isContainer}} {{/isContainer}}
{{/isPrimitiveType}} {{/isPrimitiveType}}
{{/isInherited}} {{/isInherited}}
{{/vars}} {{/vars}}
feature -- Change Element feature -- Change Element
{{#vars}} {{#vars}}
{{^isInherited}} {{^isInherited}}
set_{{name}} (a_name: like {{name}}) set_{{name}} (a_name: like {{name}})
@ -56,7 +56,7 @@ feature -- Change Element
do do
{{name}} := a_name {{name}} := a_name
ensure ensure
{{name}}_set: {{name}} = a_name {{name}}_set: {{name}} = a_name
end end
{{/isInherited}} {{/isInherited}}
@ -72,7 +72,7 @@ feature -- Change Element
Result.append(out_{{{parentSchema}}}) Result.append(out_{{{parentSchema}}})
{{/parent}} {{/parent}}
Result.append("%Nclass {{classname}}%N") Result.append("%Nclass {{classname}}%N")
{{#vars}} {{#vars}}
{{^isInherited}} {{^isInherited}}
{{#isArray}} {{#isArray}}
if attached {{name}} as l_{{name}} then if attached {{name}} as l_{{name}} then
@ -81,7 +81,7 @@ feature -- Change Element
Result.append (ic.item.out) Result.append (ic.item.out)
Result.append ("%N") Result.append ("%N")
end end
end end
{{/isArray}} {{/isArray}}
{{#isMap}} {{#isMap}}
if attached {{name}} as l_{{name}} then if attached {{name}} as l_{{name}} then
@ -95,14 +95,14 @@ feature -- Change Element
Result.append (ic.item.out) Result.append (ic.item.out)
Result.append ("%N") Result.append ("%N")
end end
end end
{{/isMap}} {{/isMap}}
{{^isContainer}} {{^isContainer}}
if attached {{name}} as l_{{name}} then if attached {{name}} as l_{{name}} then
Result.append ("%N{{name}}:") Result.append ("%N{{name}}:")
Result.append (l_{{name}}.out) Result.append (l_{{name}}.out)
Result.append ("%N") Result.append ("%N")
end end
{{/isContainer}} {{/isContainer}}
{{/isInherited}} {{/isInherited}}
{{/vars}} {{/vars}}

View File

@ -1,4 +1,4 @@
class {{#datatypeWithEnum}}{{{.}}}{{/datatypeWithEnum}}{{^datatypeWithEnum}}{{classname}}{{/datatypeWithEnum}} class {{{datatypeWithEnum}}}{{^datatypeWithEnum}}{{classname}}{{/datatypeWithEnum}}
feature -- Access feature -- Access

View File

@ -4,4 +4,3 @@
{{#isEnum}}{{>model_enum}}{{/isEnum}}{{^isEnum}}{{>model}}{{/isEnum}} {{#isEnum}}{{>model_enum}}{{/isEnum}}{{^isEnum}}{{>model}}{{/isEnum}}
{{/model}} {{/model}}
{{/models}} {{/models}}

View File

@ -2,8 +2,8 @@ note
description:"[ description:"[
{{{appName}}} {{{appName}}}
{{{appDescription}}} {{{appDescription}}}
{{#version}}The version of the OpenAPI document: {{{version}}}{{/version}} {{#version}}The version of the OpenAPI document: {{{.}}}{{/version}}
{{#infoEmail}}Contact: {{{infoEmail}}}{{/infoEmail}} {{#infoEmail}}Contact: {{{.}}}{{/infoEmail}}
NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).

View File

@ -14,14 +14,14 @@ feature -- Test routines
{{#operations}} {{#operations}}
{{#operation}} {{#operation}}
test_{{operationId}} test_{{operationId}}
-- {{summary}} -- {{summary}}
-- --
-- {{notes}} -- {{notes}}
local local
{{#returnType}} {{#returnType}}
l_response: {{{returnType}}} l_response: {{{.}}}
{{/returnType}} {{/returnType}}
{{#allParams}} {{#allParams}}
l_{{paramName}}: {{{dataType}}} l_{{paramName}}: {{{dataType}}}
@ -37,10 +37,10 @@ feature -- Test routines
{{/isContainer}} {{/isContainer}}
{{^isContainer}} {{^isContainer}}
-- l_{{paramName}} -- l_{{paramName}}
{{/isContainer}} {{/isContainer}}
{{/required}} {{/required}}
{{/allParams}} {{/allParams}}
{{#returnType}} {{#returnType}}
-- l_response := api.{{operationId}}{{#hasParams}}({{#allParams}}l_{{paramName}}{{^-last}}, {{/-last}}{{/allParams}}){{/hasParams}} -- l_response := api.{{operationId}}{{#hasParams}}({{#allParams}}l_{{paramName}}{{^-last}}, {{/-last}}{{/allParams}}){{/hasParams}}
{{/returnType}} {{/returnType}}
@ -56,7 +56,7 @@ feature {NONE} -- Implementation
api: {{classname}} api: {{classname}}
-- Create an object instance of `{{classname}}'. -- Create an object instance of `{{classname}}'.
once once
create { {{classname}} } Result create { {{classname}} } Result
end end

View File

@ -10,7 +10,7 @@
</file_rule> </file_rule>
<option warning="warning" manifest_array_type="mismatch_warning"> <option warning="warning" manifest_array_type="mismatch_warning">
<assertions precondition="true" postcondition="true" check="true" invariant="true" loop="true" supplier_precondition="true"/> <assertions precondition="true" postcondition="true" check="true" invariant="true" loop="true" supplier_precondition="true"/>
</option> </option>
<setting name="console_application" value="true"/> <setting name="console_application" value="true"/>
<library name="base" location="$ISE_LIBRARY/library/base/base.ecf"/> <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"/> <library name="json" location="$ISE_LIBRARY\contrib\library\text\parser\json\library\json.ecf" readonly="false"/>

View File

@ -6,11 +6,10 @@ before_script:
- source ./eiffel.rc - source ./eiffel.rc
- echo `ec -version` - echo `ec -version`
- cd $current_dir - cd $current_dir
# safelist # safelist
branches: branches:
only: only:
- master - master
script: compile_all -ecb -melt -list_failures -clean -options dotnet=false script: compile_all -ecb -melt -list_failures -clean -options dotnet=false

View File

@ -1,14 +1,14 @@
# {{packageName}} # {{packageName}}
{{#appDescriptionWithNewLines}} {{#appDescriptionWithNewLines}}
{{{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: 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}} - API version: {{appVersion}}
{{#artifactVersion}} {{#artifactVersion}}
- Package version: {{artifactVersion}} - Package version: {{.}}
{{/artifactVersion}} {{/artifactVersion}}
{{^hideGenerationTimestamp}} {{^hideGenerationTimestamp}}
- Build date: {{generatedDate}} - Build date: {{generatedDate}}
@ -48,7 +48,7 @@ def apiInstance = new {{classname}}()
apiInstance.{{{operationId}}}({{#allParams}}{{paramName}}{{^-last}}, {{/-last}}{{/allParams}}) apiInstance.{{{operationId}}}({{#allParams}}{{paramName}}{{^-last}}, {{/-last}}{{/allParams}})
{ {
// on success // on success
{{#returnType}}def result = ({{returnType}})it {{#returnType}}def result = ({{.}})it
println result println result
{{/returnType}} {{/returnType}}
{{^returnType}}println it{{/returnType}} {{^returnType}}println it{{/returnType}}

View File

@ -73,7 +73,7 @@ class {{classname}} {
apiUtils.invokeApi(onSuccess, onFailure, basePath, versionPath, resourcePath, queryParams, headerParams, bodyParams, contentType, apiUtils.invokeApi(onSuccess, onFailure, basePath, versionPath, resourcePath, queryParams, headerParams, bodyParams, contentType,
"{{httpMethod}}", "{{returnContainer}}", "{{httpMethod}}", "{{returnContainer}}",
{{#returnBaseType}}{{{returnBaseType}}}.class {{/returnBaseType}}{{^returnBaseType}}null {{/returnBaseType}}) {{#returnBaseType}}{{{.}}}.class {{/returnBaseType}}{{^returnBaseType}}null {{/returnBaseType}})
} }

View File

@ -10,8 +10,8 @@ import {{import}};
@Canonical @Canonical
class {{classname}} { class {{classname}} {
{{#vars}} {{#vars}}
{{#description}}/* {{{description}}} */{{/description}} {{#description}}/* {{{.}}} */{{/description}}
{{{dataType}}} {{name}}{{#defaultValue}} = {{{defaultValue}}}{{/defaultValue}} {{{dataType}}} {{name}}{{#defaultValue}} = {{{.}}}{{/defaultValue}}
{{/vars}} {{/vars}}
} }
{{/model}} {{/model}}

View File

@ -140,7 +140,7 @@ public class ApiClient{{#jsr310}} extends JavaTimeFormatter{{/jsr310}} {
dateFormat = ApiClient.buildDefaultDateFormat(); dateFormat = ApiClient.buildDefaultDateFormat();
// Set default User-Agent. // 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). // Setup authentications (key: authentication name, value: authentication).
authentications = new HashMap<String, Authentication>();{{#authMethods}}{{#isBasic}}{{#isBasicBasic}} authentications = new HashMap<String, Authentication>();{{#authMethods}}{{#isBasic}}{{#isBasicBasic}}

View File

@ -7,7 +7,7 @@ import javax.validation.ValidationException;
public class BeanValidationException extends ValidationException { public class BeanValidationException extends ValidationException {
/** /**
* *
*/ */
private static final long serialVersionUID = -5294733947409491364L; private static final long serialVersionUID = -5294733947409491364L;
Set<ConstraintViolation<Object>> violations; Set<ConstraintViolation<Object>> violations;

View File

@ -8,7 +8,7 @@
- Build date: {{generatedDate}} - Build date: {{generatedDate}}
{{/hideGenerationTimestamp}} {{/hideGenerationTimestamp}}
{{#appDescriptionWithNewLines}}{{{appDescriptionWithNewLines}}}{{/appDescriptionWithNewLines}} {{{appDescriptionWithNewLines}}}
{{#infoUrl}} {{#infoUrl}}
For more information, please visit [{{{infoUrl}}}]({{{infoUrl}}}) For more information, please visit [{{{infoUrl}}}]({{{infoUrl}}})
@ -157,7 +157,7 @@ public class {{{classname}}}Example {
{{{dataType}}} {{{paramName}}} = {{{example}}}; // {{{dataType}}} | {{{description}}} {{{dataType}}} {{{paramName}}} = {{{example}}}; // {{{dataType}}} | {{{description}}}
{{/allParams}} {{/allParams}}
try { 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}} System.out.println(result);{{/returnType}}
} catch (ApiException e) { } catch (ApiException e) {
System.err.println("Exception when calling {{{classname}}}#{{{operationId}}}"); System.err.println("Exception when calling {{{classname}}}#{{{operationId}}}");
@ -177,7 +177,7 @@ All URIs are relative to *{{basePath}}*
Class | Method | HTTP request | Description 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}} {{/operation}}{{/operations}}{{/apis}}{{/apiInfo}}
## Documentation for Models ## Documentation for Models

View File

@ -49,7 +49,7 @@ public class {{classname}} {
* @param {{paramName}} {{description}}{{#required}} (required){{/required}}{{^required}} (optional{{^isContainer}}{{#defaultValue}}, default to {{.}}{{/defaultValue}}){{/isContainer}}{{/required}} * @param {{paramName}} {{description}}{{#required}} (required){{/required}}{{^required}} (optional{{^isContainer}}{{#defaultValue}}, default to {{.}}{{/defaultValue}}){{/isContainer}}{{/required}}
{{/allParams}} {{/allParams}}
{{#returnType}} {{#returnType}}
* @return {{returnType}} * @return {{.}}
{{/returnType}} {{/returnType}}
* @throws ApiException if fails to make API call * @throws ApiException if fails to make API call
{{#isDeprecated}} {{#isDeprecated}}
@ -63,7 +63,7 @@ public class {{classname}} {
{{#isDeprecated}} {{#isDeprecated}}
@Deprecated @Deprecated
{{/isDeprecated}} {{/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}}; Object localVarPostBody = {{#bodyParam}}{{paramName}}{{/bodyParam}}{{^bodyParam}}null{{/bodyParam}};
{{#allParams}}{{#required}} {{#allParams}}{{#required}}
// verify the required parameter '{{paramName}}' is set // verify the required parameter '{{paramName}}' is set
@ -83,7 +83,7 @@ public class {{classname}} {
{{javaUtilPrefix}}Map<String, Object> localVarFormParams = new {{javaUtilPrefix}}HashMap<String, Object>(); {{javaUtilPrefix}}Map<String, Object> localVarFormParams = new {{javaUtilPrefix}}HashMap<String, Object>();
{{#queryParams}} {{#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}} {{/queryParams}}
{{#headerParams}}if ({{paramName}} != null) {{#headerParams}}if ({{paramName}} != null)

View File

@ -1,12 +1,12 @@
# {{classname}}{{#description}} # {{classname}}{{#description}}
{{description}}{{/description}} {{.}}{{/description}}
All URIs are relative to *{{basePath}}* All URIs are relative to *{{basePath}}*
Method | HTTP request | Description 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}} {{/operation}}{{/operations}}
{{#operations}} {{#operations}}
@ -14,11 +14,11 @@ Method | HTTP request | Description
## {{operationId}} ## {{operationId}}
> {{#returnType}}{{returnType}} {{/returnType}}{{operationId}}({{#allParams}}{{{paramName}}}{{^-last}}, {{/-last}}{{/allParams}}) > {{#returnType}}{{.}} {{/returnType}}{{operationId}}({{#allParams}}{{{paramName}}}{{^-last}}, {{/-last}}{{/allParams}})
{{summary}}{{#notes}} {{summary}}{{#notes}}
{{notes}}{{/notes}} {{.}}{{/notes}}
### Example ### Example
@ -60,7 +60,7 @@ public class Example {
{{{dataType}}} {{{paramName}}} = {{{example}}}; // {{{dataType}}} | {{{description}}} {{{dataType}}} {{{paramName}}} = {{{example}}}; // {{{dataType}}} | {{{description}}}
{{/allParams}} {{/allParams}}
try { 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}} System.out.println(result);{{/returnType}}
} catch (ApiException e) { } catch (ApiException e) {
System.err.println("Exception when calling {{{classname}}}#{{{operationId}}}"); 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}} {{^allParams}}This endpoint does not need any parameter.{{/allParams}}{{#allParams}}{{#-last}}
Name | Type | Description | Notes Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------{{/-last}}{{/allParams}} ------------- | ------------- | ------------- | -------------{{/-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}} {{/allParams}}
### Return type ### Return type

View File

@ -27,11 +27,11 @@ public class {{classname}}Test {
{{#operation}} {{#operation}}
/** /**
{{#summary}} {{#summary}}
* {{summary}} * {{.}}
* *
{{/summary}} {{/summary}}
{{#notes}} {{#notes}}
* {{notes}} * {{.}}
* *
{{/notes}} {{/notes}}
* @throws ApiException * @throws ApiException
@ -42,7 +42,7 @@ public class {{classname}}Test {
//{{#allParams}} //{{#allParams}}
//{{{dataType}}} {{paramName}} = null; //{{{dataType}}} {{paramName}} = null;
//{{/allParams}} //{{/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 // TODO: test validations
} }

View File

@ -5,7 +5,7 @@ package {{invokerPackage}}.auth;
{{>generatedAnnotation}} {{>generatedAnnotation}}
public enum OAuthFlow { public enum OAuthFlow {
accessCode, //called authorizationCode in OpenAPI 3.0 accessCode, //called authorizationCode in OpenAPI 3.0
implicit, implicit,
password, password,
application //called clientCredentials in OpenAPI 3.0 application //called clientCredentials in OpenAPI 3.0
} }

View File

@ -4,17 +4,17 @@ minLength && maxLength set
minLength set, maxLength not minLength set, maxLength not
}}{{#minLength}}{{^maxLength}} @Size(min={{minLength}}){{/maxLength}}{{/minLength}}{{! }}{{#minLength}}{{^maxLength}} @Size(min={{minLength}}){{/maxLength}}{{/minLength}}{{!
minLength not set, maxLength set minLength not set, maxLength set
}}{{^minLength}}{{#maxLength}} @Size(max={{maxLength}}){{/maxLength}}{{/minLength}}{{! }}{{^minLength}}{{#maxLength}} @Size(max={{.}}){{/maxLength}}{{/minLength}}{{!
@Size: minItems && maxItems set @Size: minItems && maxItems set
}}{{#minItems}}{{#maxItems}} @Size(min={{minItems}},max={{maxItems}}){{/maxItems}}{{/minItems}}{{! }}{{#minItems}}{{#maxItems}} @Size(min={{minItems}},max={{maxItems}}){{/maxItems}}{{/minItems}}{{!
@Size: minItems set, maxItems not @Size: minItems set, maxItems not
}}{{#minItems}}{{^maxItems}} @Size(min={{minItems}}){{/maxItems}}{{/minItems}}{{! }}{{#minItems}}{{^maxItems}} @Size(min={{minItems}}){{/maxItems}}{{/minItems}}{{!
@Size: minItems not set && maxItems set @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* check for integer or long / all others=decimal type with @Decimal*
isInteger set isInteger set
}}{{#isInteger}}{{#minimum}} @Min({{minimum}}){{/minimum}}{{#maximum}} @Max({{maximum}}){{/maximum}}{{/isInteger}}{{! }}{{#isInteger}}{{#minimum}} @Min({{.}}){{/minimum}}{{#maximum}} @Max({{.}}){{/maximum}}{{/isInteger}}{{!
isLong set 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! 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}} }}{{^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}}

View File

@ -1 +1 @@
{{#required}} @NotNull{{/required}}{{>beanValidationCore}} {{#required}} @NotNull{{/required}}{{>beanValidationCore}}

View File

@ -105,7 +105,7 @@ if(hasProperty('target') && target == 'android') {
main = System.getProperty('mainClass') main = System.getProperty('mainClass')
classpath = sourceSets.main.runtimeClasspath classpath = sourceSets.main.runtimeClasspath
} }
task sourcesJar(type: Jar, dependsOn: classes) { task sourcesJar(type: Jar, dependsOn: classes) {
classifier = 'sources' classifier = 'sources'
from sourceSets.main.allSource from sourceSets.main.allSource
@ -164,4 +164,3 @@ dependencies {
implementation 'javax.annotation:javax.annotation-api:1.3.2' implementation 'javax.annotation:javax.annotation-api:1.3.2'
testImplementation "junit:junit:$junit_version" testImplementation "junit:junit:$junit_version"
} }

View File

@ -55,4 +55,3 @@ git pull origin master
# Pushes (Forces) the changes in the local repository up to the remote repository # 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" echo "Git pushing to https://${git_host}/${git_user_id}/${git_repo_id}.git"
git push origin master 2>&1 | grep -v 'To https' git push origin master 2>&1 | grep -v 'To https'

View File

@ -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}}) @JsonInclude({{#isMap}}{{#items.isNullable}}content = JsonInclude.Include.ALWAYS, {{/items.isNullable}}{{/isMap}}value = JsonInclude.Include.{{#required}}ALWAYS{{/required}}{{^required}}USE_DEFAULTS{{/required}})
{{#withXml}} {{#withXml}}
{{^isContainer}} {{^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}}
{{#isContainer}} {{#isContainer}}
{{#isXmlWrapped}} {{#isXmlWrapped}}
// items.xmlName={{items.xmlName}} // 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}} {{/isXmlWrapped}}
{{/isContainer}} {{/isContainer}}
{{/withXml}} {{/withXml}}

View File

@ -259,7 +259,7 @@ public class ApiClient {
{{#hasOAuthMethods}} {{#hasOAuthMethods}}
/** /**
* Helper method to configure the client credentials for Oauth * Helper method to configure the client credentials for Oauth
* @param username Username * @param username Username
* @param password Password * @param password Password
*/ */

View File

@ -54,7 +54,7 @@ And to use the api you can follow the examples bellow:
ApiClient apiClient = new ApiClient("oauth_password"); ApiClient apiClient = new ApiClient("oauth_password");
apiClient.setBasePath("https://localhost:8243/petstore/1/"); apiClient.setBasePath("https://localhost:8243/petstore/1/");
apiClient.setOauthPassword("username", "password", "client_id", "client_secret"); apiClient.setOauthPassword("username", "password", "client_id", "client_secret");
//Oauth client credentials flow //Oauth client credentials flow
ApiClient apiClient = new ApiClient("oauth_client_credentials"); ApiClient apiClient = new ApiClient("oauth_client_credentials");
apiClient.setBasePath("https://localhost:8243/petstore/1/"); 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); PetApi petApi = apiClient.buildClient(PetApi.class);
Pet petById = petApi.getPetById(12345L); Pet petById = petApi.getPetById(12345L);
System.out.println(petById); System.out.println(petById);
} }
``` ```

View File

@ -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}} * @param {{paramName}} {{description}}{{#required}} (required){{/required}}{{^required}} (optional{{^isContainer}}{{#defaultValue}}, default to {{.}}{{/defaultValue}}{{/isContainer}}){{/required}}
{{/allParams}} {{/allParams}}
{{#returnType}} {{#returnType}}
* @return {{returnType}} * @return {{.}}
{{/returnType}} {{/returnType}}
{{#externalDocs}} {{#externalDocs}}
* {{description}} * {{description}}
@ -48,7 +48,7 @@ public interface {{classname}} extends ApiClient.Api {
"{{baseName}}: {{=<% %>=}}{<%paramName%>}<%={{ }}=%>"{{^-last}}, "{{baseName}}: {{=<% %>=}}{<%paramName%>}<%={{ }}=%>"{{^-last}},
{{/-last}}{{/headerParams}} {{/-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}} {{#hasQueryParams}}
/** /**
@ -72,7 +72,7 @@ public interface {{classname}} extends ApiClient.Api {
{{/queryParams}} {{/queryParams}}
* </ul> * </ul>
{{#returnType}} {{#returnType}}
* @return {{returnType}} * @return {{.}}
{{/returnType}} {{/returnType}}
{{#externalDocs}} {{#externalDocs}}
* {{description}} * {{description}}
@ -92,7 +92,7 @@ public interface {{classname}} extends ApiClient.Api {
"{{baseName}}: {{=<% %>=}}{<%paramName%>}<%={{ }}=%>"{{^-last}}, "{{baseName}}: {{=<% %>=}}{<%paramName%>}<%={{ }}=%>"{{^-last}},
{{/-last}}{{/headerParams}} {{/-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 * A convenience class for generating query parameters for the

View File

@ -36,7 +36,7 @@ class {{classname}}Test {
{{#allParams}} {{#allParams}}
{{{dataType}}} {{paramName}} = null; {{{dataType}}} {{paramName}} = null;
{{/allParams}} {{/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 // TODO: test validations
} }
@ -61,7 +61,7 @@ class {{classname}}Test {
{{#queryParams}} {{#queryParams}}
.{{paramName}}(null){{#-last}};{{/-last}} .{{paramName}}(null){{#-last}};{{/-last}}
{{/queryParams}} {{/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 // TODO: test validations
} }

View File

@ -11,7 +11,7 @@ public class HttpBasicAuth implements RequestInterceptor {
private String username; private String username;
private String password; private String password;
public String getUsername() { public String getUsername() {
return username; return username;
} }

View File

@ -225,7 +225,7 @@
<artifactId>jsr305</artifactId> <artifactId>jsr305</artifactId>
<version>3.0.2</version> <version>3.0.2</version>
</dependency> </dependency>
<!-- HTTP client: Netflix Feign --> <!-- HTTP client: Netflix Feign -->
<dependency> <dependency>
<groupId>io.github.openfeign</groupId> <groupId>io.github.openfeign</groupId>

View File

@ -45,11 +45,11 @@ public class {{classname}} {
{{#operation}} {{#operation}}
/**{{#summary}} /**{{#summary}}
* {{summary}}{{/summary}}{{#notes}} * {{.}}{{/summary}}{{#notes}}
* {{notes}}{{/notes}}{{#responses}} * {{.}}{{/notes}}{{#responses}}
* <p><b>{{code}}</b>{{#message}} - {{message}}{{/message}}{{/responses}}{{#allParams}} * <p><b>{{code}}</b>{{#message}} - {{.}}{{/message}}{{/responses}}{{#allParams}}
* @param {{paramName}} {{description}}{{^description}}The {{paramName}} parameter{{/description}}{{/allParams}}{{#returnType}} * @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}} * @throws IOException if an error occurs while attempting to invoke the API{{#externalDocs}}
* {{description}} * {{description}}
* @see <a href="{{url}}">{{summary}} Documentation</a> * @see <a href="{{url}}">{{summary}} Documentation</a>
@ -61,19 +61,19 @@ public class {{classname}} {
{{#isDeprecated}} {{#isDeprecated}}
@Deprecated @Deprecated
{{/isDeprecated}} {{/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}} {{#returnType}}HttpResponse response = {{/returnType}}{{operationId}}ForHttpResponse({{#allParams}}{{paramName}}{{^-last}}, {{/-last}}{{/allParams}});{{#returnType}}
TypeReference<{{{returnType}}}> typeRef = new TypeReference<{{{returnType}}}>() {}; TypeReference<{{{returnType}}}> typeRef = new TypeReference<{{{returnType}}}>() {};
return apiClient.getObjectMapper().readValue(response.getContent(), typeRef);{{/returnType}} return apiClient.getObjectMapper().readValue(response.getContent(), typeRef);{{/returnType}}
} }
/**{{#summary}} /**{{#summary}}
* {{summary}}{{/summary}}{{#notes}} * {{.}}{{/summary}}{{#notes}}
* {{notes}}{{/notes}}{{#responses}} * {{.}}{{/notes}}{{#responses}}
* <p><b>{{code}}</b>{{#message}} - {{message}}{{/message}}{{/responses}}{{#requiredParams}} * <p><b>{{code}}</b>{{#message}} - {{.}}{{/message}}{{/responses}}{{#requiredParams}}
* @param {{paramName}} {{description}}{{^description}}The {{paramName}} parameter{{/description}}{{/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}} * @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}} * @throws IOException if an error occurs while attempting to invoke the API{{#externalDocs}}
* {{description}} * {{description}}
* @see <a href="{{url}}">{{summary}} Documentation</a> * @see <a href="{{url}}">{{summary}} Documentation</a>
@ -85,7 +85,7 @@ public class {{classname}} {
{{#isDeprecated}} {{#isDeprecated}}
@Deprecated @Deprecated
{{/isDeprecated}} {{/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}} {{#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}}}>() {}; TypeReference<{{{returnType}}}> typeRef = new TypeReference<{{{returnType}}}>() {};
return apiClient.getObjectMapper().readValue(response.getContent(), typeRef);{{/returnType}} return apiClient.getObjectMapper().readValue(response.getContent(), typeRef);{{/returnType}}

View File

@ -37,7 +37,7 @@ public class {{classname}}Test {
{{#allParams}} {{#allParams}}
{{{dataType}}} {{paramName}} = null; {{{dataType}}} {{paramName}} = null;
{{/allParams}} {{/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 // TODO: test validations
} }

View File

@ -24,7 +24,7 @@ if(hasProperty('target') && target == 'android') {
apply plugin: 'com.android.library' apply plugin: 'com.android.library'
apply plugin: 'com.github.dcendents.android-maven' apply plugin: 'com.github.dcendents.android-maven'
android { android {
compileSdkVersion 23 compileSdkVersion 23
buildToolsVersion '23.0.2' buildToolsVersion '23.0.2'
@ -42,7 +42,7 @@ if(hasProperty('target') && target == 'android') {
targetCompatibility JavaVersion.VERSION_1_7 targetCompatibility JavaVersion.VERSION_1_7
{{/java8}} {{/java8}}
} }
// Rename the aar correctly // Rename the aar correctly
libraryVariants.all { variant -> libraryVariants.all { variant ->
variant.outputs.each { output -> variant.outputs.each { output ->
@ -58,7 +58,7 @@ if(hasProperty('target') && target == 'android') {
provided 'javax.annotation:jsr250-api:1.0' provided 'javax.annotation:jsr250-api:1.0'
} }
} }
afterEvaluate { afterEvaluate {
android.libraryVariants.all { variant -> android.libraryVariants.all { variant ->
def task = project.tasks.create "jar${variant.name.capitalize()}", Jar def task = project.tasks.create "jar${variant.name.capitalize()}", Jar
@ -70,12 +70,12 @@ if(hasProperty('target') && target == 'android') {
artifacts.add('archives', task); artifacts.add('archives', task);
} }
} }
task sourcesJar(type: Jar) { task sourcesJar(type: Jar) {
from android.sourceSets.main.java.srcDirs from android.sourceSets.main.java.srcDirs
classifier = 'sources' classifier = 'sources'
} }
artifacts { artifacts {
archives sourcesJar archives sourcesJar
} }
@ -99,7 +99,7 @@ if(hasProperty('target') && target == 'android') {
pom.artifactId = '{{artifactId}}' pom.artifactId = '{{artifactId}}'
} }
} }
task execute(type:JavaExec) { task execute(type:JavaExec) {
main = System.getProperty('mainClass') main = System.getProperty('mainClass')
classpath = sourceSets.main.runtimeClasspath classpath = sourceSets.main.runtimeClasspath

View File

@ -188,7 +188,7 @@ public class ApiClient{{#jsr310}} extends JavaTimeFormatter{{/jsr310}} {
this.dateFormat = new RFC3339DateFormat(); this.dateFormat = new RFC3339DateFormat();
// Set default User-Agent. // 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). // Setup authentications (key: authentication name, value: authentication).
authentications = new HashMap<String, Authentication>(); authentications = new HashMap<String, Authentication>();

View File

@ -58,7 +58,7 @@ public class {{classname}} {
* @param {{paramName}} {{description}}{{#required}} (required){{/required}}{{^required}} (optional{{#defaultValue}}, default to {{.}}{{/defaultValue}}){{/required}} * @param {{paramName}} {{description}}{{#required}} (required){{/required}}{{^required}} (optional{{#defaultValue}}, default to {{.}}{{/defaultValue}}){{/required}}
{{/allParams}} {{/allParams}}
{{#returnType}} {{#returnType}}
* @return {{returnType}} * @return {{.}}
{{/returnType}} {{/returnType}}
* @throws ApiException if fails to make API call * @throws ApiException if fails to make API call
{{#responses.0}} {{#responses.0}}
@ -81,7 +81,7 @@ public class {{classname}} {
{{#isDeprecated}} {{#isDeprecated}}
@Deprecated @Deprecated
{{/isDeprecated}} {{/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}}; {{#returnType}}return {{/returnType}}{{operationId}}WithHttpInfo({{#allParams}}{{paramName}}{{^-last}}, {{/-last}}{{/allParams}}){{#returnType}}.getData(){{/returnType}};
} }
{{/vendorExtensions.x-group-parameters}} {{/vendorExtensions.x-group-parameters}}
@ -93,7 +93,7 @@ public class {{classname}} {
{{#allParams}} {{#allParams}}
* @param {{paramName}} {{description}}{{#required}} (required){{/required}}{{^required}} (optional{{#defaultValue}}, default to {{.}}{{/defaultValue}}){{/required}} * @param {{paramName}} {{description}}{{#required}} (required){{/required}}{{^required}} (optional{{#defaultValue}}, default to {{.}}{{/defaultValue}}){{/required}}
{{/allParams}} {{/allParams}}
* @return ApiResponse&lt;{{#returnType}}{{returnType}}{{/returnType}}{{^returnType}}Void{{/returnType}}&gt; * @return ApiResponse&lt;{{returnType}}{{^returnType}}Void{{/returnType}}&gt;
* @throws ApiException if fails to make API call * @throws ApiException if fails to make API call
{{#responses.0}} {{#responses.0}}
* @http.response.details * @http.response.details
@ -115,7 +115,7 @@ public class {{classname}} {
{{#isDeprecated}} {{#isDeprecated}}
@Deprecated @Deprecated
{{/isDeprecated}} {{/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}}; Object localVarPostBody = {{#bodyParam}}{{paramName}}{{/bodyParam}}{{^bodyParam}}null{{/bodyParam}};
{{#allParams}}{{#required}} {{#allParams}}{{#required}}
// verify the required parameter '{{paramName}}' is set // verify the required parameter '{{paramName}}' is set
@ -134,7 +134,7 @@ public class {{classname}} {
{{javaUtilPrefix}}Map<String, Object> localVarFormParams = new {{javaUtilPrefix}}HashMap<String, Object>(); {{javaUtilPrefix}}Map<String, Object> localVarFormParams = new {{javaUtilPrefix}}HashMap<String, Object>();
{{#queryParams}} {{#queryParams}}
localVarQueryParams.addAll(apiClient.parameterToPairs("{{#collectionFormat}}{{{collectionFormat}}}{{/collectionFormat}}", "{{baseName}}", {{paramName}})); localVarQueryParams.addAll(apiClient.parameterToPairs("{{{collectionFormat}}}", "{{baseName}}", {{paramName}}));
{{/queryParams}} {{/queryParams}}
{{#headerParams}}if ({{paramName}} != null) {{#headerParams}}if ({{paramName}} != null)
@ -212,13 +212,13 @@ public class {{classname}} {
{{#isDeprecated}}* @deprecated{{/isDeprecated}} {{#isDeprecated}}* @deprecated{{/isDeprecated}}
*/ */
{{#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(); {{#returnType}}return {{/returnType}}this.executeWithHttpInfo().getData();
} }
/** /**
* Execute {{operationId}} request with HTTP info returned * Execute {{operationId}} request with HTTP info returned
* @return ApiResponse&lt;{{#returnType}}{{.}}{{/returnType}}{{^returnType}}Void{{/returnType}}&gt; * @return ApiResponse&lt;{{returnType}}{{^returnType}}Void{{/returnType}}&gt;
* @throws ApiException if fails to make API call * @throws ApiException if fails to make API call
{{#responses.0}} {{#responses.0}}
* @http.response.details * @http.response.details
@ -235,7 +235,7 @@ public class {{classname}} {
{{#isDeprecated}} {{#isDeprecated}}
@Deprecated @Deprecated
{{/isDeprecated}} {{/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}}); return {{operationId}}WithHttpInfo({{#allParams}}{{paramName}}{{^-last}}, {{/-last}}{{/allParams}});
} }
} }

View File

@ -1,12 +1,12 @@
# {{classname}}{{#description}} # {{classname}}{{#description}}
{{description}}{{/description}} {{.}}{{/description}}
All URIs are relative to *{{basePath}}* All URIs are relative to *{{basePath}}*
Method | HTTP request | Description 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}} {{/operation}}{{/operations}}
{{#operations}} {{#operations}}
@ -15,10 +15,10 @@ Method | HTTP request | Description
## {{operationId}} ## {{operationId}}
{{^vendorExtensions.x-group-parameters}} {{^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}}
{{#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}} {{/vendorExtensions.x-group-parameters}}
{{summary}}{{#notes}} {{summary}}{{#notes}}
@ -69,10 +69,10 @@ public class Example {
{{/allParams}} {{/allParams}}
try { try {
{{^vendorExtensions.x-group-parameters}} {{^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}}
{{#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}} .{{paramName}}({{paramName}}){{/isPathParam}}{{/allParams}}
.execute(); .execute();
{{/vendorExtensions.x-group-parameters}} {{/vendorExtensions.x-group-parameters}}
@ -95,7 +95,7 @@ public class Example {
{{^allParams}}This endpoint does not need any parameter.{{/allParams}}{{#allParams}}{{#-last}} {{^allParams}}This endpoint does not need any parameter.{{/allParams}}{{#allParams}}{{#-last}}
Name | Type | Description | Notes Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------{{/-last}}{{/allParams}} ------------- | ------------- | ------------- | -------------{{/-last}}{{/allParams}}
{{#allParams}} **{{paramName}}** | {{#isContainer}}{{#isArray}}{{#items}}{{#isModel}}{{^isFile}}[{{/isFile}}{{/isModel}}**List&lt;{{dataType}}&gt;**{{#isModel}}{{^isFile}}]({{^baseType}}{{dataType}}{{/baseType}}{{#baseType}}{{baseType}}{{/baseType}}.md){{/isFile}}{{/isModel}}{{/items}}{{/isArray}}{{#isMap}}{{#items}}{{#isModel}}{{^isFile}}[{{/isFile}}{{/isModel}}**Map&lt;String,{{dataType}}&gt;**{{#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&lt;{{dataType}}&gt;**{{#isModel}}{{^isFile}}]({{^baseType}}{{dataType}}{{/baseType}}{{baseType}}.md){{/isFile}}{{/isModel}}{{/items}}{{/isArray}}{{#isMap}}{{#items}}{{#isModel}}{{^isFile}}[{{/isFile}}{{/isModel}}**Map&lt;String,{{dataType}}&gt;**{{#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}} {{/allParams}}
### Return type ### Return type

View File

@ -41,10 +41,10 @@ public class {{classname}}Test {
//{{{dataType}}} {{paramName}} = null; //{{{dataType}}} {{paramName}} = null;
{{/allParams}} {{/allParams}}
{{^vendorExtensions.x-group-parameters}} {{^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}}
{{#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}} // .{{paramName}}({{paramName}}){{/isPathParam}}{{/allParams}}
// .execute(); // .execute();
{{/vendorExtensions.x-group-parameters}} {{/vendorExtensions.x-group-parameters}}

View File

@ -1,9 +1,9 @@
/** /**
* {{#description}}{{.}}{{/description}}{{^description}}{{classname}}{{/description}}{{#isDeprecated}} * {{description}}{{^description}}{{classname}}{{/description}}{{#isDeprecated}}
* @deprecated{{/isDeprecated}} * @deprecated{{/isDeprecated}}
*/{{#isDeprecated}} */{{#isDeprecated}}
@Deprecated{{/isDeprecated}}{{#description}} @Deprecated{{/isDeprecated}}{{#description}}
@ApiModel(description = "{{{description}}}"){{/description}} @ApiModel(description = "{{{.}}}"){{/description}}
{{#jackson}} {{#jackson}}
@JsonPropertyOrder({ @JsonPropertyOrder({
{{#vars}} {{#vars}}
@ -12,7 +12,7 @@
}) })
{{/jackson}} {{/jackson}}
{{>additionalModelTypeAnnotations}}{{>generatedAnnotation}}{{#discriminator}}{{>typeInfoAnnotation}}{{/discriminator}}{{>xmlAnnotation}} {{>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}} {{#serializableModel}}
private static final long serialVersionUID = 1L; private static final long serialVersionUID = 1L;
@ -38,21 +38,21 @@ public class {{classname}} {{#parent}}extends {{{parent}}} {{/parent}}{{#vendorE
{{/jackson}} {{/jackson}}
{{#withXml}} {{#withXml}}
{{#isXmlAttribute}} {{#isXmlAttribute}}
@XmlAttribute(name = "{{#xmlName}}{{xmlName}}{{/xmlName}}{{^xmlName}}{{baseName}}{{/xmlName}}") @XmlAttribute(name = "{{xmlName}}{{^xmlName}}{{baseName}}{{/xmlName}}")
{{/isXmlAttribute}} {{/isXmlAttribute}}
{{^isXmlAttribute}} {{^isXmlAttribute}}
{{^isContainer}} {{^isContainer}}
@XmlElement({{#xmlNamespace}}namespace="{{xmlNamespace}}", {{/xmlNamespace}}name = "{{#xmlName}}{{xmlName}}{{/xmlName}}{{^xmlName}}{{baseName}}{{/xmlName}}") @XmlElement({{#xmlNamespace}}namespace="{{.}}", {{/xmlNamespace}}name = "{{xmlName}}{{^xmlName}}{{baseName}}{{/xmlName}}")
{{/isContainer}} {{/isContainer}}
{{#isContainer}} {{#isContainer}}
// Is a container wrapped={{isXmlWrapped}} // Is a container wrapped={{isXmlWrapped}}
{{#items}} {{#items}}
// items.name={{name}} items.baseName={{baseName}} items.xmlName={{xmlName}} items.xmlNamespace={{xmlNamespace}} // items.name={{name}} items.baseName={{baseName}} items.xmlName={{xmlName}} items.xmlNamespace={{xmlNamespace}}
// items.example={{example}} items.type={{dataType}} // 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}} {{/items}}
{{#isXmlWrapped}} {{#isXmlWrapped}}
@XmlElementWrapper({{#xmlNamespace}}namespace="{{xmlNamespace}}", {{/xmlNamespace}}name = "{{#xmlName}}{{xmlName}}{{/xmlName}}{{^xmlName}}{{baseName}}{{/xmlName}}") @XmlElementWrapper({{#xmlNamespace}}namespace="{{.}}", {{/xmlNamespace}}name = "{{xmlName}}{{^xmlName}}{{baseName}}{{/xmlName}}")
{{/isXmlWrapped}} {{/isXmlWrapped}}
{{/isContainer}} {{/isContainer}}
{{/isXmlAttribute}} {{/isXmlAttribute}}
@ -177,16 +177,16 @@ public class {{classname}} {{#parent}}extends {{{parent}}} {{/parent}}{{#vendorE
{{/isReadOnly}} {{/isReadOnly}}
/** /**
{{#description}} {{#description}}
* {{description}} * {{.}}
{{/description}} {{/description}}
{{^description}} {{^description}}
* Get {{name}} * Get {{name}}
{{/description}} {{/description}}
{{#minimum}} {{#minimum}}
* minimum: {{minimum}} * minimum: {{.}}
{{/minimum}} {{/minimum}}
{{#maximum}} {{#maximum}}
* maximum: {{maximum}} * maximum: {{.}}
{{/maximum}} {{/maximum}}
* @return {{name}} * @return {{name}}
{{#deprecated}} {{#deprecated}}
@ -207,7 +207,7 @@ public class {{classname}} {{#parent}}extends {{{parent}}} {{/parent}}{{#vendorE
{{^required}} {{^required}}
@javax.annotation.Nullable @javax.annotation.Nullable
{{/required}} {{/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}}} {{{vendorExtensions.x-extra-annotation}}}
{{/vendorExtensions.x-extra-annotation}} {{/vendorExtensions.x-extra-annotation}}

View File

@ -1,7 +1,7 @@
# {{appName}} - MicroProfile Rest Client # {{appName}} - MicroProfile Rest Client
{{#appDescriptionWithNewLines}} {{#appDescriptionWithNewLines}}
{{{appDescriptionWithNewLines}}} {{{.}}}
{{/appDescriptionWithNewLines}} {{/appDescriptionWithNewLines}}
## Overview ## Overview

View File

@ -23,7 +23,7 @@ import org.eclipse.microprofile.rest.client.inject.RegisterRestClient;
* {{{appName}}} * {{{appName}}}
* *
{{#appDescription}} {{#appDescription}}
* <p>{{{appDescription}}} * <p>{{{.}}}
* *
{{/appDescription}} {{/appDescription}}
*/ */
@ -41,7 +41,7 @@ public interface {{classname}} {
* {{summary}} * {{summary}}
* *
{{#notes}} {{#notes}}
* {{notes}} * {{.}}
* *
{{/notes}} {{/notes}}
{{#isDeprecated}} {{#isDeprecated}}
@ -60,8 +60,7 @@ public interface {{classname}} {
{{#hasProduces}} {{#hasProduces}}
@Produces({ {{#produces}}"{{{mediaType}}}"{{^-last}}, {{/-last}}{{/produces}} }) @Produces({ {{#produces}}"{{{mediaType}}}"{{^-last}}, {{/-last}}{{/produces}} })
{{/hasProduces}} {{/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}} {{/operation}}
} }
{{/operations}} {{/operations}}

View File

@ -23,10 +23,10 @@ import java.util.Map;
/** /**
{{#appName}} {{#appName}}
* {{{appName}}} Test * {{{.}}} Test
* *
{{/appName}} {{/appName}}
* API tests for {{classname}} * API tests for {{classname}}
*/ */
{{#generateSpringBootApplication}} {{#generateSpringBootApplication}}
@RunWith(SpringJUnit4ClassRunner.class) @RunWith(SpringJUnit4ClassRunner.class)
@ -38,7 +38,7 @@ public class {{classname}}Test {
private {{classname}} client; private {{classname}} client;
private String baseUrl = "http://localhost:9080"; private String baseUrl = "http://localhost:9080";
@Before @Before
public void setup() throws MalformedURLException { public void setup() throws MalformedURLException {
client = RestClientBuilder.newBuilder() client = RestClientBuilder.newBuilder()
@ -53,7 +53,7 @@ public class {{classname}}Test {
* {{summary}} * {{summary}}
* *
{{#notes}} {{#notes}}
* {{notes}} * {{.}}
* *
{{/notes}} {{/notes}}
{{/summary}} {{/summary}}
@ -66,10 +66,10 @@ public class {{classname}}Test {
{{#allParams}} {{#allParams}}
{{^isFile}}{{{dataType}}} {{paramName}} = null;{{/isFile}}{{#isFile}}org.apache.cxf.jaxrs.ext.multipart.Attachment {{paramName}} = null;{{/isFile}} {{^isFile}}{{{dataType}}} {{paramName}} = null;{{/isFile}}{{#isFile}}org.apache.cxf.jaxrs.ext.multipart.Attachment {{paramName}} = null;{{/isFile}}
{{/allParams}} {{/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}} //{{#returnType}}assertNotNull(response);{{/returnType}}
} }
{{/operation}}{{/operations}} {{/operation}}{{/operations}}
} }

View File

@ -1,20 +1,20 @@
{{#pattern}} @Pattern(regexp="{{{pattern}}}"){{/pattern}}{{! {{#pattern}} @Pattern(regexp="{{{.}}}"){{/pattern}}{{!
minLength && maxLength set minLength && maxLength set
}}{{#minLength}}{{#maxLength}} @Size(min={{minLength}},max={{maxLength}}){{/maxLength}}{{/minLength}}{{! }}{{#minLength}}{{#maxLength}} @Size(min={{minLength}},max={{maxLength}}){{/maxLength}}{{/minLength}}{{!
minLength set, maxLength not minLength set, maxLength not
}}{{#minLength}}{{^maxLength}} @Size(min={{minLength}}){{/maxLength}}{{/minLength}}{{! }}{{#minLength}}{{^maxLength}} @Size(min={{minLength}}){{/maxLength}}{{/minLength}}{{!
minLength not set, maxLength set minLength not set, maxLength set
}}{{^minLength}}{{#maxLength}} @Size(max={{maxLength}}){{/maxLength}}{{/minLength}}{{! }}{{^minLength}}{{#maxLength}} @Size(max={{.}}){{/maxLength}}{{/minLength}}{{!
@Size: minItems && maxItems set @Size: minItems && maxItems set
}}{{#minItems}}{{#maxItems}} @Size(min={{minItems}},max={{maxItems}}){{/maxItems}}{{/minItems}}{{! }}{{#minItems}}{{#maxItems}} @Size(min={{minItems}},max={{maxItems}}){{/maxItems}}{{/minItems}}{{!
@Size: minItems set, maxItems not @Size: minItems set, maxItems not
}}{{#minItems}}{{^maxItems}} @Size(min={{minItems}}){{/maxItems}}{{/minItems}}{{! }}{{#minItems}}{{^maxItems}} @Size(min={{minItems}}){{/maxItems}}{{/minItems}}{{!
@Size: minItems not set && maxItems set @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* check for integer or long / all others=decimal type with @Decimal*
isInteger set isInteger set
}}{{#isInteger}}{{#minimum}} @Min({{minimum}}){{/minimum}}{{#maximum}} @Max({{maximum}}){{/maximum}}{{/isInteger}}{{! }}{{#isInteger}}{{#minimum}} @Min({{.}}){{/minimum}}{{#maximum}} @Max({{.}}){{/maximum}}{{/isInteger}}{{!
isLong set 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! Not Integer, not Long => we have a decimal value!
}}{{^isInteger}}{{^isLong}}{{#minimum}} @DecimalMin("{{minimum}}"){{/minimum}}{{#maximum}} @DecimalMax("{{maximum}}"){{/maximum}}{{/isLong}}{{/isInteger}} }}{{^isInteger}}{{^isLong}}{{#minimum}} @DecimalMin("{{.}}"){{/minimum}}{{#maximum}} @DecimalMax("{{.}}"){{/maximum}}{{/isLong}}{{/isInteger}}

View File

@ -1 +1 @@
{{#required}} @NotNull{{/required}}{{>beanValidationCore}} {{#required}} @NotNull{{/required}}{{>beanValidationCore}}

View File

@ -1 +1 @@
{{#required}} @NotNull{{/required}}{{>beanValidationCore}} {{#required}} @NotNull{{/required}}{{>beanValidationCore}}

View File

@ -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}} {{#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}}
{{^withXml}} {{^withXml}}
{{#enumVars}}{{name}}({{dataType}}.valueOf({{{value}}})){{^-last}}, {{/-last}}{{#-last}};{{/-last}}{{/enumVars}} {{#enumVars}}{{name}}({{dataType}}.valueOf({{{value}}})){{^-last}}, {{/-last}}{{#-last}};{{/-last}}{{/enumVars}}
{{/withXml}} {{/withXml}}
{{/allowableValues}} {{/allowableValues}}
@ -35,7 +35,7 @@
{{#withXml}} {{#withXml}}
public static {{datatypeWithEnum}} fromValue(String v) { 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)) { if (String.valueOf(b.value).equals(v)) {
return b; return b;
} }
@ -47,7 +47,7 @@
public static final class Deserializer implements JsonbDeserializer<{{datatypeWithEnum}}> { public static final class Deserializer implements JsonbDeserializer<{{datatypeWithEnum}}> {
@Override @Override
public {{datatypeWithEnum}} deserialize(JsonParser parser, DeserializationContext ctx, Type rtType) { 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())) { if (String.valueOf(b.value).equals(parser.getString())) {
return b; return b;
} }

View File

@ -4,9 +4,9 @@ import com.fasterxml.jackson.annotation.JsonValue;
{{/jackson}} {{/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}} {{#gson}}
{{#allowableValues}}{{#enumVars}} {{#allowableValues}}{{#enumVars}}
@SerializedName({{#isInteger}}"{{/isInteger}}{{#isDouble}}"{{/isDouble}}{{#isLong}}"{{/isLong}}{{#isFloat}}"{{/isFloat}}{{{value}}}{{#isInteger}}"{{/isInteger}}{{#isDouble}}"{{/isDouble}}{{#isLong}}"{{/isLong}}{{#isFloat}}"{{/isFloat}}) @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; private {{{dataType}}} value;
{{#datatypeWithEnum}}{{{.}}}{{/datatypeWithEnum}}{{^datatypeWithEnum}}{{{classname}}}{{/datatypeWithEnum}}({{{dataType}}} value) { {{{datatypeWithEnum}}}{{^datatypeWithEnum}}{{{classname}}}{{/datatypeWithEnum}}({{{dataType}}} value) {
this.value = value; this.value = value;
} }
@Override @Override
{{#jackson}} {{#jackson}}
@JsonValue @JsonValue
{{/jackson}} {{/jackson}}
public String toString() { public String toString() {
return String.valueOf(value); return String.valueOf(value);
} }
@ -36,13 +36,13 @@ import com.fasterxml.jackson.annotation.JsonValue;
{{#jackson}} {{#jackson}}
@JsonCreator @JsonCreator
{{/jackson}} {{/jackson}}
public static {{#datatypeWithEnum}}{{{.}}}{{/datatypeWithEnum}}{{^datatypeWithEnum}}{{{classname}}}{{/datatypeWithEnum}} fromValue(String text) { public static {{{datatypeWithEnum}}}{{^datatypeWithEnum}}{{{classname}}}{{/datatypeWithEnum}} fromValue(String text) {
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(text)) { if (String.valueOf(b.value).equals(text)) {
return b; return b;
} }
} }
{{#useNullForUnknownEnumValue}}return null;{{/useNullForUnknownEnumValue}}{{^useNullForUnknownEnumValue}}throw new IllegalArgumentException("Unexpected value '" + text + "'");{{/useNullForUnknownEnumValue}} {{#useNullForUnknownEnumValue}}return null;{{/useNullForUnknownEnumValue}}{{^useNullForUnknownEnumValue}}throw new IllegalArgumentException("Unexpected value '" + text + "'");{{/useNullForUnknownEnumValue}}
} }
} }

View File

@ -2,8 +2,8 @@
* {{{appName}}} * {{{appName}}}
* {{{appDescription}}} * {{{appDescription}}}
* *
* {{#version}}The version of the OpenAPI document: {{{version}}}{{/version}} * {{#version}}The version of the OpenAPI document: {{{.}}}{{/version}}
* {{#infoEmail}}Contact: {{{infoEmail}}}{{/infoEmail}} * {{#infoEmail}}Contact: {{{.}}}{{/infoEmail}}
* *
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech * https://openapi-generator.tech

View File

@ -30,11 +30,11 @@ import javax.json.bind.annotation.JsonbProperty;
{{/withXml}} {{/withXml}}
{{#description}} {{#description}}
/** /**
* {{{description}}} * {{{.}}}
**/ **/
{{/description}} {{/description}}
{{>additionalModelTypeAnnotations}} {{>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}} {{#vars}}{{#isEnum}}{{^isContainer}}
{{>enumClass}}{{/isContainer}}{{#isContainer}}{{#mostInnerItems}} {{>enumClass}}{{/isContainer}}{{#isContainer}}{{#mostInnerItems}}
{{>enumClass}}{{/mostInnerItems}}{{/isContainer}}{{/isEnum}} {{>enumClass}}{{/mostInnerItems}}{{/isContainer}}{{/isEnum}}
@ -43,7 +43,7 @@ public class {{classname}} {{#parent}}extends {{{parent}}}{{/parent}}{{#serializ
{{/withXml}} {{/withXml}}
{{#description}} {{#description}}
/** /**
* {{{description}}} * {{{.}}}
**/ **/
{{/description}} {{/description}}
{{^withXml}} {{^withXml}}
@ -56,20 +56,20 @@ public class {{classname}} {{#parent}}extends {{{parent}}}{{/parent}}{{#serializ
private {{{datatypeWithEnum}}} {{name}}{{#defaultValue}} = {{{.}}}{{/defaultValue}}; private {{{datatypeWithEnum}}} {{name}}{{#defaultValue}} = {{{.}}}{{/defaultValue}};
{{/isContainer}} {{/isContainer}}
{{/vars}} {{/vars}}
{{#vars}} {{#vars}}
/** /**
{{#description}} {{#description}}
* {{description}} * {{.}}
{{/description}} {{/description}}
{{^description}} {{^description}}
* Get {{name}} * Get {{name}}
{{/description}} {{/description}}
{{#minimum}} {{#minimum}}
* minimum: {{minimum}} * minimum: {{.}}
{{/minimum}} {{/minimum}}
{{#maximum}} {{#maximum}}
* maximum: {{maximum}} * maximum: {{.}}
{{/maximum}} {{/maximum}}
* @return {{name}} * @return {{name}}
{{#deprecated}} {{#deprecated}}

View File

@ -5,7 +5,7 @@
<packaging>jar</packaging> <packaging>jar</packaging>
<name>{{artifactId}}</name> <name>{{artifactId}}</name>
{{#appDescription}} {{#appDescription}}
<description>{{appDescription}}</description> <description>{{.}}</description>
{{/appDescription}} {{/appDescription}}
<version>{{artifactVersion}}</version> <version>{{artifactVersion}}</version>
<build> <build>
@ -125,7 +125,7 @@
<artifactId>activation</artifactId> <artifactId>activation</artifactId>
<version>1.1.1</version> <version>1.1.1</version>
</dependency> </dependency>
{{#java8}} {{#java8}}
<dependency> <dependency>
<groupId>com.fasterxml.jackson.datatype</groupId> <groupId>com.fasterxml.jackson.datatype</groupId>
@ -140,7 +140,7 @@
<version>${jackson-jaxrs-version}</version> <version>${jackson-jaxrs-version}</version>
</dependency> </dependency>
{{/java8}} {{/java8}}
{{#useBeanValidationFeature}} {{#useBeanValidationFeature}}
<dependency> <dependency>
<groupId>org.hibernate</groupId> <groupId>org.hibernate</groupId>
<artifactId>hibernate-validator</artifactId> <artifactId>hibernate-validator</artifactId>

View File

@ -1 +1 @@
{{#isQueryParam}}@QueryParam("{{baseName}}"){{#useBeanValidation}}{{>beanValidationQueryParams}}{{/useBeanValidation}} {{^isContainer}}{{#defaultValue}}@DefaultValue("{{{defaultValue}}}") {{/defaultValue}}{{/isContainer}}{{{dataType}}} {{paramName}}{{/isQueryParam}} {{#isQueryParam}}@QueryParam("{{baseName}}"){{#useBeanValidation}}{{>beanValidationQueryParams}}{{/useBeanValidation}} {{^isContainer}}{{#defaultValue}}@DefaultValue("{{{.}}}") {{/defaultValue}}{{/isContainer}}{{{dataType}}} {{paramName}}{{/isQueryParam}}

View File

@ -1,4 +1,4 @@
{{#useGenericResponse}}Response{{/useGenericResponse}}{{! non-generic response: {{#useGenericResponse}}Response{{/useGenericResponse}}{{! non-generic response:
}}{{^useGenericResponse}}{{! }}{{^useGenericResponse}}{{!
}}{{{returnType}}}{{! }}{{{returnType}}}{{!
}}{{/useGenericResponse}} }}{{/useGenericResponse}}

View File

@ -375,7 +375,7 @@ public class ApiClient {
this.readTimeout = readTimeout; this.readTimeout = readTimeout;
return this; return this;
} }
/** /**
* Get the read timeout that was set. * Get the read timeout that was set.
* *

View File

@ -5,7 +5,7 @@ package {{invokerPackage}};
import java.util.List; import java.util.List;
import java.util.Map; import java.util.Map;
{{#caseInsensitiveResponseHeaders}} {{#caseInsensitiveResponseHeaders}}
import java.util.Map.Entry; import java.util.Map.Entry;
import java.util.TreeMap; import java.util.TreeMap;
{{/caseInsensitiveResponseHeaders}} {{/caseInsensitiveResponseHeaders}}

View File

@ -8,7 +8,7 @@
- Build date: {{generatedDate}} - Build date: {{generatedDate}}
{{/hideGenerationTimestamp}} {{/hideGenerationTimestamp}}
{{#appDescriptionWithNewLines}}{{{appDescriptionWithNewLines}}}{{/appDescriptionWithNewLines}} {{{appDescriptionWithNewLines}}}
{{#infoUrl}} {{#infoUrl}}
For more information, please visit [{{{infoUrl}}}]({{{infoUrl}}}) For more information, please visit [{{{infoUrl}}}]({{{infoUrl}}})
@ -130,8 +130,8 @@ All URIs are relative to *{{basePath}}*
Class | Method | HTTP request | Description 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}}
*{{classname}}* | [**{{operationId}}WithHttpInfo**]({{apiDocPath}}{{classname}}.md#{{operationId}}WithHttpInfo) | **{{httpMethod}}** {{path}} | {{#summary}}{{summary}}{{/summary}} *{{classname}}* | [**{{operationId}}WithHttpInfo**]({{apiDocPath}}{{classname}}.md#{{operationId}}WithHttpInfo) | **{{httpMethod}}** {{path}} | {{summary}}
{{/operation}}{{/operations}}{{/apis}}{{/apiInfo}} {{/operation}}{{/operations}}{{/apis}}{{/apiInfo}}
## Documentation for Models ## Documentation for Models

View File

@ -111,7 +111,7 @@ public class {{classname}} {
* {{summary}} * {{summary}}
* {{notes}} * {{notes}}
* @param apiRequest {@link API{{operationId}}Request} * @param apiRequest {@link API{{operationId}}Request}
* @return {{#asyncNative}}CompletableFuture&lt;{{/asyncNative}}ApiResponse&lt;{{#returnType}}{{returnType}}{{/returnType}}{{^returnType}}Void{{/returnType}}&gt;{{#asyncNative}}&gt;{{/asyncNative}} * @return {{#asyncNative}}CompletableFuture&lt;{{/asyncNative}}ApiResponse&lt;{{returnType}}{{^returnType}}Void{{/returnType}}&gt;{{#asyncNative}}&gt;{{/asyncNative}}
* @throws ApiException if fails to make API call * @throws ApiException if fails to make API call
{{#isDeprecated}} {{#isDeprecated}}
* @deprecated * @deprecated
@ -124,7 +124,7 @@ public class {{classname}} {
{{#isDeprecated}} {{#isDeprecated}}
@Deprecated @Deprecated
{{/isDeprecated}} {{/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}} {{#allParams}}
{{{dataType}}} {{paramName}} = apiRequest.{{paramName}}(); {{{dataType}}} {{paramName}} = apiRequest.{{paramName}}();
{{/allParams}} {{/allParams}}
@ -156,7 +156,7 @@ public class {{classname}} {
{{/isDeprecated}} {{/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 { 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}} {{^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}} {{#returnType}}
return localVarResponse.getData(); return localVarResponse.getData();
{{/returnType}} {{/returnType}}
@ -196,7 +196,7 @@ public class {{classname}} {
{{#allParams}} {{#allParams}}
* @param {{paramName}} {{description}}{{#required}} (required){{/required}}{{^required}} (optional{{^isContainer}}{{#defaultValue}}, default to {{.}}{{/defaultValue}}){{/isContainer}}{{/required}} * @param {{paramName}} {{description}}{{#required}} (required){{/required}}{{^required}} (optional{{^isContainer}}{{#defaultValue}}, default to {{.}}{{/defaultValue}}){{/isContainer}}{{/required}}
{{/allParams}} {{/allParams}}
* @return {{#asyncNative}}CompletableFuture&lt;{{/asyncNative}}ApiResponse&lt;{{#returnType}}{{returnType}}{{/returnType}}{{^returnType}}Void{{/returnType}}&gt;{{#asyncNative}}&gt;{{/asyncNative}} * @return {{#asyncNative}}CompletableFuture&lt;{{/asyncNative}}ApiResponse&lt;{{returnType}}{{^returnType}}Void{{/returnType}}&gt;{{#asyncNative}}&gt;{{/asyncNative}}
* @throws ApiException if fails to make API call * @throws ApiException if fails to make API call
{{#isDeprecated}} {{#isDeprecated}}
* @deprecated * @deprecated
@ -209,7 +209,7 @@ public class {{classname}} {
{{#isDeprecated}} {{#isDeprecated}}
@Deprecated @Deprecated
{{/isDeprecated}} {{/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}} {{^asyncNative}}
HttpRequest.Builder localVarRequestBuilder = {{operationId}}RequestBuilder({{#allParams}}{{paramName}}{{^-last}}, {{/-last}}{{/allParams}}); HttpRequest.Builder localVarRequestBuilder = {{operationId}}RequestBuilder({{#allParams}}{{paramName}}{{^-last}}, {{/-last}}{{/allParams}});
try { try {
@ -222,7 +222,7 @@ public class {{classname}} {
if (localVarResponse.statusCode()/ 100 != 2) { if (localVarResponse.statusCode()/ 100 != 2) {
throw getApiException("{{operationId}}", localVarResponse); throw getApiException("{{operationId}}", localVarResponse);
} }
return new ApiResponse<{{#returnType}}{{{returnType}}}{{/returnType}}{{^returnType}}Void{{/returnType}}>( return new ApiResponse<{{{returnType}}}{{^returnType}}Void{{/returnType}}>(
localVarResponse.statusCode(), localVarResponse.statusCode(),
localVarResponse.headers().map(), localVarResponse.headers().map(),
{{#returnType}}memberVarObjectMapper.readValue(localVarResponse.body(), new TypeReference<{{{returnType}}}>() {}){{/returnType}}{{^returnType}}null{{/returnType}} {{#returnType}}memberVarObjectMapper.readValue(localVarResponse.body(), new TypeReference<{{{returnType}}}>() {}){{/returnType}}{{^returnType}}null{{/returnType}}

View File

@ -1,13 +1,13 @@
# {{classname}}{{#description}} # {{classname}}{{#description}}
{{description}}{{/description}} {{.}}{{/description}}
All URIs are relative to *{{basePath}}* All URIs are relative to *{{basePath}}*
Method | HTTP request | Description Method | HTTP request | Description
------------- | ------------- | ------------- ------------- | ------------- | -------------
{{#operations}}{{#operation}}[**{{operationId}}**]({{classname}}.md#{{operationId}}) | **{{httpMethod}}** {{path}} | {{#summary}}{{summary}}{{/summary}} {{#operations}}{{#operation}}[**{{operationId}}**]({{classname}}.md#{{operationId}}) | **{{httpMethod}}** {{path}} | {{summary}}
[**{{operationId}}WithHttpInfo**]({{classname}}.md#{{operationId}}WithHttpInfo) | **{{httpMethod}}** {{path}} | {{#summary}}{{summary}}{{/summary}} [**{{operationId}}WithHttpInfo**]({{classname}}.md#{{operationId}}WithHttpInfo) | **{{httpMethod}}** {{path}} | {{summary}}
{{/operation}}{{/operations}} {{/operation}}{{/operations}}
{{#operations}} {{#operations}}
@ -24,7 +24,7 @@ Method | HTTP request | Description
{{summary}}{{#notes}} {{summary}}{{#notes}}
{{notes}}{{/notes}} {{.}}{{/notes}}
### Example ### Example
@ -100,7 +100,7 @@ public class Example {
{{^allParams}}This endpoint does not need any parameter.{{/allParams}}{{^vendorExtensions.x-group-parameters}}{{#allParams}}{{#-last}} {{^allParams}}This endpoint does not need any parameter.{{/allParams}}{{^vendorExtensions.x-group-parameters}}{{#allParams}}{{#-last}}
Name | Type | Description | Notes Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------{{/-last}}{{/allParams}} ------------- | ------------- | ------------- | -------------{{/-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}} {{/allParams}}
{{/vendorExtensions.x-group-parameters}} {{/vendorExtensions.x-group-parameters}}
{{#vendorExtensions.x-group-parameters}} {{#vendorExtensions.x-group-parameters}}
@ -136,15 +136,15 @@ Name | Type | Description | Notes
## {{operationId}}WithHttpInfo ## {{operationId}}WithHttpInfo
{{^vendorExtensions.x-group-parameters}} {{^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}}
{{#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}} {{/vendorExtensions.x-group-parameters}}
{{summary}}{{#notes}} {{summary}}{{#notes}}
{{notes}}{{/notes}} {{.}}{{/notes}}
### Example ### Example
@ -192,7 +192,7 @@ public class Example {
{{/allParams}} {{/allParams}}
try { try {
{{^vendorExtensions.x-group-parameters}} {{^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}}
{{#vendorExtensions.x-group-parameters}} {{#vendorExtensions.x-group-parameters}}
{{#hasParams}} {{#hasParams}}
@ -200,7 +200,7 @@ public class Example {
.{{paramName}}({{paramName}}){{/allParams}} .{{paramName}}({{paramName}}){{/allParams}}
.build(); .build();
{{/hasParams}} {{/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}} {{/vendorExtensions.x-group-parameters}}
System.out.println("Status code: " + response{{#asyncNative}}.get(){{/asyncNative}}.getStatusCode()); System.out.println("Status code: " + response{{#asyncNative}}.get(){{/asyncNative}}.getStatusCode());
System.out.println("Response headers: " + response{{#asyncNative}}.get(){{/asyncNative}}.getHeaders()); 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}} {{^allParams}}This endpoint does not need any parameter.{{/allParams}}{{^vendorExtensions.x-group-parameters}}{{#allParams}}{{#-last}}
Name | Type | Description | Notes Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------{{/-last}}{{/allParams}} ------------- | ------------- | ------------- | -------------{{/-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}} {{/allParams}}
{{/vendorExtensions.x-group-parameters}} {{/vendorExtensions.x-group-parameters}}
{{#vendorExtensions.x-group-parameters}} {{#vendorExtensions.x-group-parameters}}
@ -272,7 +272,7 @@ Name | Type | Description | Notes
{{#allParams}}{{#-last}} {{#allParams}}{{#-last}}
| Name | Type | Description | Notes | | Name | Type | Description | Notes |
| ------------- | ------------- | ------------- | -------------|{{/-last}}{{/allParams}} | ------------- | ------------- | ------------- | -------------|{{/-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}} {{/allParams}}
{{/hasParams}}{{/vendorExtensions.x-group-parameters}} {{/hasParams}}{{/vendorExtensions.x-group-parameters}}

View File

@ -2,11 +2,11 @@
import {{invokerPackage}}.JSON; import {{invokerPackage}}.JSON;
{{/discriminator}} {{/discriminator}}
/** /**
* {{#description}}{{.}}{{/description}}{{^description}}{{classname}}{{/description}}{{#isDeprecated}} * {{description}}{{^description}}{{classname}}{{/description}}{{#isDeprecated}}
* @deprecated{{/isDeprecated}} * @deprecated{{/isDeprecated}}
*/{{#isDeprecated}} */{{#isDeprecated}}
@Deprecated{{/isDeprecated}}{{#description}} @Deprecated{{/isDeprecated}}{{#description}}
@ApiModel(description = "{{{description}}}"){{/description}} @ApiModel(description = "{{{.}}}"){{/description}}
{{#jackson}} {{#jackson}}
@JsonPropertyOrder({ @JsonPropertyOrder({
{{#vars}} {{#vars}}
@ -15,7 +15,7 @@ import {{invokerPackage}}.JSON;
}) })
{{/jackson}} {{/jackson}}
{{>additionalModelTypeAnnotations}}{{>generatedAnnotation}}{{#discriminator}}{{>typeInfoAnnotation}}{{/discriminator}}{{>xmlAnnotation}} {{>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}} {{#serializableModel}}
private static final long serialVersionUID = 1L; private static final long serialVersionUID = 1L;
@ -41,21 +41,21 @@ public class {{classname}} {{#parent}}extends {{{parent}}} {{/parent}}{{#vendorE
{{/jackson}} {{/jackson}}
{{#withXml}} {{#withXml}}
{{#isXmlAttribute}} {{#isXmlAttribute}}
@XmlAttribute(name = "{{#xmlName}}{{xmlName}}{{/xmlName}}{{^xmlName}}{{baseName}}{{/xmlName}}") @XmlAttribute(name = "{{xmlName}}{{^xmlName}}{{baseName}}{{/xmlName}}")
{{/isXmlAttribute}} {{/isXmlAttribute}}
{{^isXmlAttribute}} {{^isXmlAttribute}}
{{^isContainer}} {{^isContainer}}
@XmlElement({{#xmlNamespace}}namespace="{{xmlNamespace}}", {{/xmlNamespace}}name = "{{#xmlName}}{{xmlName}}{{/xmlName}}{{^xmlName}}{{baseName}}{{/xmlName}}") @XmlElement({{#xmlNamespace}}namespace="{{.}}", {{/xmlNamespace}}name = "{{xmlName}}{{^xmlName}}{{baseName}}{{/xmlName}}")
{{/isContainer}} {{/isContainer}}
{{#isContainer}} {{#isContainer}}
// Is a container wrapped={{isXmlWrapped}} // Is a container wrapped={{isXmlWrapped}}
{{#items}} {{#items}}
// items.name={{name}} items.baseName={{baseName}} items.xmlName={{xmlName}} items.xmlNamespace={{xmlNamespace}} // items.name={{name}} items.baseName={{baseName}} items.xmlName={{xmlName}} items.xmlNamespace={{xmlNamespace}}
// items.example={{example}} items.type={{dataType}} // 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}} {{/items}}
{{#isXmlWrapped}} {{#isXmlWrapped}}
@XmlElementWrapper({{#xmlNamespace}}namespace="{{xmlNamespace}}", {{/xmlNamespace}}name = "{{#xmlName}}{{xmlName}}{{/xmlName}}{{^xmlName}}{{baseName}}{{/xmlName}}") @XmlElementWrapper({{#xmlNamespace}}namespace="{{.}}", {{/xmlNamespace}}name = "{{xmlName}}{{^xmlName}}{{baseName}}{{/xmlName}}")
{{/isXmlWrapped}} {{/isXmlWrapped}}
{{/isContainer}} {{/isContainer}}
{{/isXmlAttribute}} {{/isXmlAttribute}}
@ -180,16 +180,16 @@ public class {{classname}} {{#parent}}extends {{{parent}}} {{/parent}}{{#vendorE
{{/isReadOnly}} {{/isReadOnly}}
/** /**
{{#description}} {{#description}}
* {{description}} * {{.}}
{{/description}} {{/description}}
{{^description}} {{^description}}
* Get {{name}} * Get {{name}}
{{/description}} {{/description}}
{{#minimum}} {{#minimum}}
* minimum: {{minimum}} * minimum: {{.}}
{{/minimum}} {{/minimum}}
{{#maximum}} {{#maximum}}
* maximum: {{maximum}} * maximum: {{.}}
{{/maximum}} {{/maximum}}
* @return {{name}} * @return {{name}}
{{#deprecated}} {{#deprecated}}
@ -210,7 +210,7 @@ public class {{classname}} {{#parent}}extends {{{parent}}} {{/parent}}{{#vendorE
{{^required}} {{^required}}
@javax.annotation.Nullable @javax.annotation.Nullable
{{/required}} {{/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}}} {{{vendorExtensions.x-extra-annotation}}}
{{/vendorExtensions.x-extra-annotation}} {{/vendorExtensions.x-extra-annotation}}

View File

@ -12,5 +12,5 @@ script:
- mvn test - mvn test
# uncomment below to test using gradle # uncomment below to test using gradle
# - gradle test # - gradle test
# uncomment below to test using sbt # uncomment below to test using sbt
# - sbt test # - sbt test

View File

@ -220,7 +220,7 @@ public class ApiClient {
json = new JSON(); json = new JSON();
// Set default User-Agent. // 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>(); authentications = new HashMap<String, Authentication>();
{{#dynamicOperations}} {{#dynamicOperations}}

View File

@ -57,5 +57,3 @@ public class ProgressResponseBody extends ResponseBody {
}; };
} }
} }

View File

@ -6,7 +6,7 @@
- Build date: {{generatedDate}} - Build date: {{generatedDate}}
{{/hideGenerationTimestamp}} {{/hideGenerationTimestamp}}
{{#appDescriptionWithNewLines}}{{{appDescriptionWithNewLines}}}{{/appDescriptionWithNewLines}} {{{appDescriptionWithNewLines}}}
{{#infoUrl}} {{#infoUrl}}
For more information, please visit [{{{infoUrl}}}]({{{infoUrl}}}) For more information, please visit [{{{infoUrl}}}]({{{infoUrl}}})
@ -114,7 +114,7 @@ public class Example {
{{{dataType}}} {{{paramName}}} = {{{example}}}; // {{{dataType}}} | {{{description}}} {{{dataType}}} {{{paramName}}} = {{{example}}}; // {{{dataType}}} | {{{description}}}
{{/allParams}} {{/allParams}}
try { 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}} .{{{paramName}}}({{{paramName}}}){{/optionalParams}}
.execute();{{/vendorExtensions.x-group-parameters}}{{#returnType}} .execute();{{/vendorExtensions.x-group-parameters}}{{#returnType}}
System.out.println(result);{{/returnType}} System.out.println(result);{{/returnType}}
@ -136,7 +136,7 @@ All URIs are relative to *{{basePath}}*
Class | Method | HTTP request | Description 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}} {{/operation}}{{/operations}}{{/apis}}{{/apiInfo}}
## Documentation for Models ## Documentation for Models

View File

@ -136,7 +136,7 @@ public class {{classname}} {
{{^dynamicOperations}} {{^dynamicOperations}}
{{#queryParams}} {{#queryParams}}
if ({{paramName}} != null) { 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}} {{/queryParams}}
@ -225,7 +225,7 @@ public class {{classname}} {
* {{summary}} * {{summary}}
* {{notes}}{{#allParams}} * {{notes}}{{#allParams}}
* @param {{paramName}} {{description}}{{#required}} (required){{/required}}{{^required}} (optional{{^isContainer}}{{#defaultValue}}, default to {{.}}{{/defaultValue}}{{/isContainer}}){{/required}}{{/allParams}}{{#returnType}} * @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 * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
{{#responses.0}} {{#responses.0}}
* @http.response.details * @http.response.details
@ -247,8 +247,8 @@ public class {{classname}} {
{{#isDeprecated}} {{#isDeprecated}}
@Deprecated @Deprecated
{{/isDeprecated}} {{/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}}ApiResponse<{{{returnType}}}> localVarResp = {{/returnType}}{{operationId}}WithHttpInfo({{#allParams}}{{paramName}}{{^-last}}, {{/-last}}{{/allParams}});{{#returnType}} {{#returnType}}ApiResponse<{{{.}}}> localVarResp = {{/returnType}}{{operationId}}WithHttpInfo({{#allParams}}{{paramName}}{{^-last}}, {{/-last}}{{/allParams}});{{#returnType}}
return localVarResp.getData();{{/returnType}} return localVarResp.getData();{{/returnType}}
} }
{{/vendorExtensions.x-group-parameters}} {{/vendorExtensions.x-group-parameters}}
@ -257,7 +257,7 @@ public class {{classname}} {
* {{summary}} * {{summary}}
* {{notes}}{{#allParams}} * {{notes}}{{#allParams}}
* @param {{paramName}} {{description}}{{#required}} (required){{/required}}{{^required}} (optional{{^isContainer}}{{#defaultValue}}, default to {{.}}{{/defaultValue}}{{/isContainer}}){{/required}}{{/allParams}} * @param {{paramName}} {{description}}{{#required}} (required){{/required}}{{^required}} (optional{{^isContainer}}{{#defaultValue}}, default to {{.}}{{/defaultValue}}{{/isContainer}}){{/required}}{{/allParams}}
* @return ApiResponse&lt;{{#returnType}}{{returnType}}{{/returnType}}{{^returnType}}Void{{/returnType}}&gt; * @return ApiResponse&lt;{{returnType}}{{^returnType}}Void{{/returnType}}&gt;
* @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
{{#responses.0}} {{#responses.0}}
* @http.response.details * @http.response.details
@ -279,7 +279,7 @@ public class {{classname}} {
{{#isDeprecated}} {{#isDeprecated}}
@Deprecated @Deprecated
{{/isDeprecated}} {{/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); okhttp3.Call localVarCall = {{operationId}}ValidateBeforeCall({{#allParams}}{{paramName}}, {{/allParams}}null);
{{#returnType}}Type localVarReturnType = new TypeToken<{{{returnType}}}>(){}.getType(); {{#returnType}}Type localVarReturnType = new TypeToken<{{{returnType}}}>(){}.getType();
return localVarApiClient.execute(localVarCall, localVarReturnType);{{/returnType}}{{^returnType}}return localVarApiClient.execute(localVarCall);{{/returnType}} return localVarApiClient.execute(localVarCall, localVarReturnType);{{/returnType}}{{^returnType}}return localVarApiClient.execute(localVarCall);{{/returnType}}
@ -312,7 +312,7 @@ public class {{classname}} {
{{#isDeprecated}} {{#isDeprecated}}
@Deprecated @Deprecated
{{/isDeprecated}} {{/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); okhttp3.Call localVarCall = {{operationId}}ValidateBeforeCall({{#allParams}}{{paramName}}, {{/allParams}}_callback);
{{#returnType}}Type localVarReturnType = new TypeToken<{{{returnType}}}>(){}.getType(); {{#returnType}}Type localVarReturnType = new TypeToken<{{{returnType}}}>(){}.getType();
@ -374,7 +374,7 @@ public class {{classname}} {
/** /**
* Execute {{operationId}} request{{#returnType}} * 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 * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
{{#responses.0}} {{#responses.0}}
* @http.response.details * @http.response.details
@ -392,14 +392,14 @@ public class {{classname}} {
{{#isDeprecated}} {{#isDeprecated}}
@Deprecated @Deprecated
{{/isDeprecated}} {{/isDeprecated}}
public {{#returnType}}{{{returnType}}}{{/returnType}}{{^returnType}}void{{/returnType}} execute() throws ApiException { public {{{returnType}}}{{^returnType}}void{{/returnType}} execute() throws ApiException {
{{#returnType}}ApiResponse<{{{returnType}}}> localVarResp = {{/returnType}}{{operationId}}WithHttpInfo({{#allParams}}{{paramName}}{{^-last}}, {{/-last}}{{/allParams}});{{#returnType}} {{#returnType}}ApiResponse<{{{.}}}> localVarResp = {{/returnType}}{{operationId}}WithHttpInfo({{#allParams}}{{paramName}}{{^-last}}, {{/-last}}{{/allParams}});{{#returnType}}
return localVarResp.getData();{{/returnType}} return localVarResp.getData();{{/returnType}}
} }
/** /**
* Execute {{operationId}} request with HTTP info returned * Execute {{operationId}} request with HTTP info returned
* @return ApiResponse&lt;{{#returnType}}{{returnType}}{{/returnType}}{{^returnType}}Void{{/returnType}}&gt; * @return ApiResponse&lt;{{returnType}}{{^returnType}}Void{{/returnType}}&gt;
* @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
{{#responses.0}} {{#responses.0}}
* @http.response.details * @http.response.details
@ -417,7 +417,7 @@ public class {{classname}} {
{{#isDeprecated}} {{#isDeprecated}}
@Deprecated @Deprecated
{{/isDeprecated}} {{/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}}); return {{operationId}}WithHttpInfo({{#allParams}}{{paramName}}{{^-last}}, {{/-last}}{{/allParams}});
} }
@ -442,7 +442,7 @@ public class {{classname}} {
{{#isDeprecated}} {{#isDeprecated}}
@Deprecated @Deprecated
{{/isDeprecated}} {{/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); return {{operationId}}Async({{#allParams}}{{paramName}}, {{/allParams}}_callback);
} }
} }

View File

@ -1,23 +1,23 @@
# {{classname}}{{#description}} # {{classname}}{{#description}}
{{description}}{{/description}} {{.}}{{/description}}
All URIs are relative to *{{basePath}}* All URIs are relative to *{{basePath}}*
Method | HTTP request | Description 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}} {{/operation}}{{/operations}}
{{#operations}} {{#operations}}
{{#operation}} {{#operation}}
<a name="{{operationId}}"></a> <a name="{{operationId}}"></a>
# **{{operationId}}**{{^vendorExtensions.x-group-parameters}} # **{{operationId}}**{{^vendorExtensions.x-group-parameters}}
> {{#returnType}}{{returnType}} {{/returnType}}{{operationId}}({{#allParams}}{{{paramName}}}{{^-last}}, {{/-last}}{{/allParams}}){{/vendorExtensions.x-group-parameters}}{{#vendorExtensions.x-group-parameters}} > {{#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}}({{#requiredParams}}{{paramName}}{{^-last}}, {{/-last}}{{/requiredParams}}){{#optionalParams}}.{{paramName}}({{paramName}}){{/optionalParams}}.execute();{{/vendorExtensions.x-group-parameters}}
{{summary}}{{#notes}} {{summary}}{{#notes}}
{{notes}}{{/notes}} {{.}}{{/notes}}
### Example ### Example
```java ```java
@ -58,7 +58,7 @@ public class Example {
{{{dataType}}} {{{paramName}}} = {{{example}}}; // {{{dataType}}} | {{{description}}} {{{dataType}}} {{{paramName}}} = {{{example}}}; // {{{dataType}}} | {{{description}}}
{{/allParams}} {{/allParams}}
try { 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}} .{{{paramName}}}({{{paramName}}}){{/optionalParams}}
.execute();{{/vendorExtensions.x-group-parameters}}{{#returnType}} .execute();{{/vendorExtensions.x-group-parameters}}{{#returnType}}
System.out.println(result);{{/returnType}} System.out.println(result);{{/returnType}}
@ -77,7 +77,7 @@ public class Example {
{{^allParams}}This endpoint does not need any parameter.{{/allParams}}{{#allParams}}{{#-last}} {{^allParams}}This endpoint does not need any parameter.{{/allParams}}{{#allParams}}{{#-last}}
Name | Type | Description | Notes Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------{{/-last}}{{/allParams}} ------------- | ------------- | ------------- | -------------{{/-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}} {{/allParams}}
### Return type ### Return type

View File

@ -37,7 +37,7 @@ public class {{classname}}Test {
{{#allParams}} {{#allParams}}
{{{dataType}}} {{paramName}} = null; {{{dataType}}} {{paramName}} = null;
{{/allParams}} {{/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}} .{{paramName}}({{paramName}}){{/optionalParams}}
.execute();{{/vendorExtensions.x-group-parameters}} .execute();{{/vendorExtensions.x-group-parameters}}

View File

@ -110,7 +110,7 @@ dependencies {
implementation 'io.gsonfire:gson-fire:1.8.4' implementation 'io.gsonfire:gson-fire:1.8.4'
{{#openApiNullable}} {{#openApiNullable}}
implementation 'org.openapitools:jackson-databind-nullable:0.2.1' implementation 'org.openapitools:jackson-databind-nullable:0.2.1'
{{/openApiNullable}} {{/openApiNullable}}
{{#hasOAuthMethods}} {{#hasOAuthMethods}}
implementation group: 'org.apache.oltu.oauth2', name: 'org.apache.oltu.oauth2.client', version: '1.0.1' implementation group: 'org.apache.oltu.oauth2', name: 'org.apache.oltu.oauth2.client', version: '1.0.1'
{{/hasOAuthMethods}} {{/hasOAuthMethods}}

View File

@ -19,7 +19,7 @@ import static {{invokerPackage}}.{{#gson}}GsonObjectMapper.gson{{/gson}}{{#jacks
public class ApiClient { public class ApiClient {
{{#basePath}} {{#basePath}}
public static final String BASE_URI = "{{basePath}}"; public static final String BASE_URI = "{{.}}";
{{/basePath}} {{/basePath}}
private final Config config; private final Config config;

View File

@ -40,4 +40,3 @@ It's recommended to create an instance of `ApiClient` per thread in a multithrea
{{#apiInfo}}{{#apis}}{{#-last}}{{infoEmail}} {{#apiInfo}}{{#apis}}{{#-last}}{{infoEmail}}
{{/-last}}{{/apis}}{{/apiInfo}} {{/-last}}{{/apis}}{{/apiInfo}}

View File

@ -71,7 +71,7 @@ public class {{classname}} {
@ApiOperation(value = "{{{summary}}}", @ApiOperation(value = "{{{summary}}}",
notes = "{{{notes}}}", notes = "{{{notes}}}",
nickname = "{{{operationId}}}", nickname = "{{{operationId}}}",
tags = { {{#tags}}{{#name}}"{{{name}}}"{{/name}}{{^-last}}, {{/-last}}{{/tags}} }) tags = { {{#tags}}{{#name}}"{{{.}}}"{{/name}}{{^-last}}, {{/-last}}{{/tags}} })
@ApiResponses(value = { {{#responses}} @ApiResponses(value = { {{#responses}}
@ApiResponse(code = {{{code}}}, message = "{{{message}}}") {{^-last}},{{/-last}}{{/responses}} }) @ApiResponse(code = {{{code}}}, message = "{{{message}}}") {{^-last}},{{/-last}}{{/responses}} })
{{#isDeprecated}} {{#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}} * @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}} {{/allParams}}
{{#returnType}} {{#returnType}}
* return {{returnType}} * return {{.}}
{{/returnType}} {{/returnType}}
{{#isDeprecated}} {{#isDeprecated}}
* @deprecated * @deprecated

View File

@ -1,22 +1,22 @@
# {{classname}}{{#description}} # {{classname}}{{#description}}
{{description}}{{/description}} {{.}}{{/description}}
All URIs are relative to *{{basePath}}* All URIs are relative to *{{basePath}}*
Method | HTTP request | Description 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}} {{/operation}}{{/operations}}
{{#operations}} {{#operations}}
{{#operation}} {{#operation}}
<a name="{{operationId}}"></a> <a name="{{operationId}}"></a>
# **{{operationId}}** # **{{operationId}}**
> {{#returnType}}{{returnType}} {{/returnType}}{{operationId}}({{#allParams}}{{{paramName}}}{{^-last}}, {{/-last}}{{/allParams}}) > {{#returnType}}{{.}} {{/returnType}}{{operationId}}({{#allParams}}{{{paramName}}}{{^-last}}, {{/-last}}{{/allParams}})
{{summary}}{{#notes}} {{summary}}{{#notes}}
{{notes}}{{/notes}} {{.}}{{/notes}}
### Example ### Example
```java ```java
@ -42,7 +42,7 @@ api.{{operationId}}(){{#allParams}}{{#required}}{{#isPathParam}}
{{^allParams}}This endpoint does not need any parameter.{{/allParams}}{{#allParams}}{{#-last}} {{^allParams}}This endpoint does not need any parameter.{{/allParams}}{{#allParams}}{{#-last}}
Name | Type | Description | Notes Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------{{/-last}}{{/allParams}} ------------- | ------------- | ------------- | -------------{{/-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}} {{/allParams}}
### Return type ### Return type

View File

@ -24,7 +24,7 @@ if(hasProperty('target') && target == 'android') {
apply plugin: 'com.android.library' apply plugin: 'com.android.library'
apply plugin: 'com.github.dcendents.android-maven' apply plugin: 'com.github.dcendents.android-maven'
android { android {
compileSdkVersion 23 compileSdkVersion 23
buildToolsVersion '23.0.2' buildToolsVersion '23.0.2'
@ -36,7 +36,7 @@ if(hasProperty('target') && target == 'android') {
sourceCompatibility JavaVersion.VERSION_1_8 sourceCompatibility JavaVersion.VERSION_1_8
targetCompatibility JavaVersion.VERSION_1_8 targetCompatibility JavaVersion.VERSION_1_8
} }
// Rename the aar correctly // Rename the aar correctly
libraryVariants.all { variant -> libraryVariants.all { variant ->
variant.outputs.each { output -> variant.outputs.each { output ->
@ -52,7 +52,7 @@ if(hasProperty('target') && target == 'android') {
provided 'javax.annotation:jsr250-api:1.0' provided 'javax.annotation:jsr250-api:1.0'
} }
} }
afterEvaluate { afterEvaluate {
android.libraryVariants.all { variant -> android.libraryVariants.all { variant ->
def task = project.tasks.create "jar${variant.name.capitalize()}", Jar def task = project.tasks.create "jar${variant.name.capitalize()}", Jar
@ -64,12 +64,12 @@ if(hasProperty('target') && target == 'android') {
artifacts.add('archives', task); artifacts.add('archives', task);
} }
} }
task sourcesJar(type: Jar) { task sourcesJar(type: Jar) {
from android.sourceSets.main.java.srcDirs from android.sourceSets.main.java.srcDirs
classifier = 'sources' classifier = 'sources'
} }
artifacts { artifacts {
archives sourcesJar archives sourcesJar
} }
@ -87,7 +87,7 @@ if(hasProperty('target') && target == 'android') {
pom.artifactId = '{{artifactId}}' pom.artifactId = '{{artifactId}}'
} }
} }
task execute(type:JavaExec) { task execute(type:JavaExec) {
main = System.getProperty('mainClass') main = System.getProperty('mainClass')
classpath = sourceSets.main.runtimeClasspath classpath = sourceSets.main.runtimeClasspath

View File

@ -86,7 +86,7 @@ public class ApiClient{{#jsr310}} extends JavaTimeFormatter{{/jsr310}} {
this.json.setDateFormat((DateFormat) dateFormat.clone()); this.json.setDateFormat((DateFormat) dateFormat.clone());
// Set default User-Agent. // 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). // Setup authentications (key: authentication name, value: authentication).
authentications = new HashMap<String, Authentication>();{{#authMethods}}{{#isBasic}}{{#isBasicBasic}} authentications = new HashMap<String, Authentication>();{{#authMethods}}{{#isBasic}}{{#isBasicBasic}}

View File

@ -56,7 +56,7 @@ public class {{classname}} {
{{#isDeprecated}} {{#isDeprecated}}
@Deprecated @Deprecated
{{/isDeprecated}} {{/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}}; Object localVarPostBody = {{#bodyParam}}{{paramName}}{{/bodyParam}}{{^bodyParam}}null{{/bodyParam}};
{{#allParams}}{{#required}} {{#allParams}}{{#required}}
// verify the required parameter '{{paramName}}' is set // verify the required parameter '{{paramName}}' is set
@ -75,7 +75,7 @@ public class {{classname}} {
{{javaUtilPrefix}}Map<String, Object> localVarFormParams = new {{javaUtilPrefix}}HashMap<String, Object>(); {{javaUtilPrefix}}Map<String, Object> localVarFormParams = new {{javaUtilPrefix}}HashMap<String, Object>();
{{#queryParams}} {{#queryParams}}
localVarQueryParams.addAll(apiClient.parameterToPairs("{{#collectionFormat}}{{{collectionFormat}}}{{/collectionFormat}}", "{{baseName}}", {{paramName}})); localVarQueryParams.addAll(apiClient.parameterToPairs("{{{collectionFormat}}}", "{{baseName}}", {{paramName}}));
{{/queryParams}} {{/queryParams}}
{{#headerParams}}if ({{paramName}} != null) {{#headerParams}}if ({{paramName}} != null)

View File

@ -868,4 +868,3 @@ public class ApiClient{{#jsr310}} extends JavaTimeFormatter{{/jsr310}} {
} }
} }
} }

View File

@ -54,13 +54,13 @@ public class {{classname}} {
* {{summary}} * {{summary}}
* {{notes}} * {{notes}}
{{#responses}} {{#responses}}
* <p><b>{{code}}</b>{{#message}} - {{message}}{{/message}} * <p><b>{{code}}</b>{{#message}} - {{.}}{{/message}}
{{/responses}} {{/responses}}
{{#allParams}} {{#allParams}}
* @param {{paramName}} {{description}}{{#required}} (required){{/required}}{{^required}} (optional{{#defaultValue}}, default to {{.}}{{/defaultValue}}){{/required}} * @param {{paramName}} {{description}}{{#required}} (required){{/required}}{{^required}} (optional{{#defaultValue}}, default to {{.}}{{/defaultValue}}){{/required}}
{{/allParams}} {{/allParams}}
{{#returnType}} {{#returnType}}
* @return {{returnType}} * @return {{.}}
{{/returnType}} {{/returnType}}
* @throws RestClientException if an error occurs while attempting to invoke the API * @throws RestClientException if an error occurs while attempting to invoke the API
{{#externalDocs}} {{#externalDocs}}
@ -74,7 +74,7 @@ public class {{classname}} {
{{#isDeprecated}} {{#isDeprecated}}
@Deprecated @Deprecated
{{/isDeprecated}} {{/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}} {{#returnType}}
return {{operationId}}WithHttpInfo({{#allParams}}{{paramName}}{{^-last}}, {{/-last}}{{/allParams}}).getBody(); return {{operationId}}WithHttpInfo({{#allParams}}{{paramName}}{{^-last}}, {{/-last}}{{/allParams}}).getBody();
{{/returnType}} {{/returnType}}
@ -87,12 +87,12 @@ public class {{classname}} {
* {{summary}} * {{summary}}
* {{notes}} * {{notes}}
{{#responses}} {{#responses}}
* <p><b>{{code}}</b>{{#message}} - {{message}}{{/message}} * <p><b>{{code}}</b>{{#message}} - {{.}}{{/message}}
{{/responses}} {{/responses}}
{{#allParams}} {{#allParams}}
* @param {{paramName}} {{description}}{{#required}} (required){{/required}}{{^required}} (optional{{#defaultValue}}, default to {{.}}{{/defaultValue}}){{/required}} * @param {{paramName}} {{description}}{{#required}} (required){{/required}}{{^required}} (optional{{#defaultValue}}, default to {{.}}{{/defaultValue}}){{/required}}
{{/allParams}} {{/allParams}}
* @return ResponseEntity&lt;{{#returnType}}{{returnType}}{{/returnType}}{{^returnType}}Void{{/returnType}}&gt; * @return ResponseEntity&lt;{{returnType}}{{^returnType}}Void{{/returnType}}&gt;
* @throws RestClientException if an error occurs while attempting to invoke the API * @throws RestClientException if an error occurs while attempting to invoke the API
{{#externalDocs}} {{#externalDocs}}
* {{description}} * {{description}}
@ -105,7 +105,7 @@ public class {{classname}} {
{{#isDeprecated}} {{#isDeprecated}}
@Deprecated @Deprecated
{{/isDeprecated}} {{/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}}; Object postBody = {{#bodyParam}}{{paramName}}{{/bodyParam}}{{^bodyParam}}null{{/bodyParam}};
{{#allParams}}{{#required}} {{#allParams}}{{#required}}
// verify the required parameter '{{paramName}}' is set // 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, String> cookieParams = new LinkedMultiValueMap<String, String>();
final MultiValueMap<String, Object> formParams = new LinkedMultiValueMap<String, Object>();{{#hasQueryParams}} 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}} {{/-last}}{{/queryParams}}{{/hasQueryParams}}{{#hasHeaderParams}}
{{#headerParams}}if ({{paramName}} != null) {{#headerParams}}if ({{paramName}} != null)

View File

@ -36,7 +36,7 @@ public class {{classname}}Test {
{{#allParams}} {{#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; {{#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}} {{/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 // TODO: test validations
} }

Some files were not shown because too many files have changed in this diff Show More