forked from loafle/openapi-generator-original
Add externalDocs support (#6255)
This commit is contained in:
parent
fca8d81b2b
commit
53f9ae277b
@ -55,6 +55,10 @@ public class {{classname}} {
|
|||||||
{{#isDeprecated}}
|
{{#isDeprecated}}
|
||||||
* @Deprecated
|
* @Deprecated
|
||||||
{{/isDeprecated}}
|
{{/isDeprecated}}
|
||||||
|
{{#externalDocs}}
|
||||||
|
* {{description}}
|
||||||
|
* @see {{url}}
|
||||||
|
{{/externalDocs}}
|
||||||
*/
|
*/
|
||||||
public {{#returnType}}{{{returnType}}} {{/returnType}}{{^returnType}}void {{/returnType}}{{operationId}}({{#allParams}}{{{dataType}}} {{paramName}}{{#hasMore}}, {{/hasMore}}{{/allParams}}) throws ApiException {
|
public {{#returnType}}{{{returnType}}} {{/returnType}}{{^returnType}}void {{/returnType}}{{operationId}}({{#allParams}}{{{dataType}}} {{paramName}}{{#hasMore}}, {{/hasMore}}{{/allParams}}) throws ApiException {
|
||||||
Object {{localVariablePrefix}}localVarPostBody = {{#bodyParam}}{{paramName}}{{/bodyParam}}{{^bodyParam}}null{{/bodyParam}};
|
Object {{localVariablePrefix}}localVarPostBody = {{#bodyParam}}{{paramName}}{{/bodyParam}}{{^bodyParam}}null{{/bodyParam}};
|
||||||
|
@ -30,6 +30,10 @@ public interface {{classname}} extends ApiClient.Api {
|
|||||||
{{#returnType}}
|
{{#returnType}}
|
||||||
* @return {{returnType}}
|
* @return {{returnType}}
|
||||||
{{/returnType}}
|
{{/returnType}}
|
||||||
|
{{#externalDocs}}
|
||||||
|
* {{description}}
|
||||||
|
* @see {{url}}
|
||||||
|
{{/externalDocs}}
|
||||||
*/
|
*/
|
||||||
@RequestLine("{{httpMethod}} {{{path}}}{{#hasQueryParams}}?{{/hasQueryParams}}{{#queryParams}}{{baseName}}={{=<% %>=}}{<%paramName%>}<%={{ }}=%>{{#hasMore}}&{{/hasMore}}{{/queryParams}}")
|
@RequestLine("{{httpMethod}} {{{path}}}{{#hasQueryParams}}?{{/hasQueryParams}}{{#queryParams}}{{baseName}}={{=<% %>=}}{<%paramName%>}<%={{ }}=%>{{#hasMore}}&{{/hasMore}}{{/queryParams}}")
|
||||||
@Headers({
|
@Headers({
|
||||||
@ -64,6 +68,10 @@ public interface {{classname}} extends ApiClient.Api {
|
|||||||
{{#returnType}}
|
{{#returnType}}
|
||||||
* @return {{returnType}}
|
* @return {{returnType}}
|
||||||
{{/returnType}}
|
{{/returnType}}
|
||||||
|
{{#externalDocs}}
|
||||||
|
* {{description}}
|
||||||
|
* @see {{url}}
|
||||||
|
{{/externalDocs}}
|
||||||
*/
|
*/
|
||||||
@RequestLine("{{httpMethod}} {{{path}}}?{{#queryParams}}{{baseName}}={{=<% %>=}}{<%paramName%>}<%={{ }}=%>{{#hasMore}}&{{/hasMore}}{{/queryParams}}")
|
@RequestLine("{{httpMethod}} {{{path}}}?{{#queryParams}}{{baseName}}={{=<% %>=}}{<%paramName%>}<%={{ }}=%>{{#hasMore}}&{{/hasMore}}{{/queryParams}}")
|
||||||
@Headers({
|
@Headers({
|
||||||
|
@ -52,6 +52,10 @@ public class {{classname}} {
|
|||||||
{{#isDeprecated}}
|
{{#isDeprecated}}
|
||||||
* @Deprecated
|
* @Deprecated
|
||||||
{{/isDeprecated}}
|
{{/isDeprecated}}
|
||||||
|
{{#externalDocs}}
|
||||||
|
* {{description}}
|
||||||
|
* @see {{url}}
|
||||||
|
{{/externalDocs}}
|
||||||
*/
|
*/
|
||||||
public {{#returnType}}{{{returnType}}} {{/returnType}}{{^returnType}}void {{/returnType}}{{operationId}}({{#allParams}}{{{dataType}}} {{paramName}}{{#hasMore}}, {{/hasMore}}{{/allParams}}) throws ApiException {
|
public {{#returnType}}{{{returnType}}} {{/returnType}}{{^returnType}}void {{/returnType}}{{operationId}}({{#allParams}}{{{dataType}}} {{paramName}}{{#hasMore}}, {{/hasMore}}{{/allParams}}) throws ApiException {
|
||||||
Object {{localVariablePrefix}}localVarPostBody = {{#bodyParam}}{{paramName}}{{/bodyParam}}{{^bodyParam}}null{{/bodyParam}};
|
Object {{localVariablePrefix}}localVarPostBody = {{#bodyParam}}{{paramName}}{{/bodyParam}}{{^bodyParam}}null{{/bodyParam}};
|
||||||
|
@ -70,6 +70,10 @@ public class {{classname}} {
|
|||||||
* @param progressRequestListener Progress request listener
|
* @param progressRequestListener Progress request listener
|
||||||
* @return Call to execute
|
* @return Call to execute
|
||||||
* @throws ApiException If fail to serialize the request body object
|
* @throws ApiException If fail to serialize the request body object
|
||||||
|
{{#externalDocs}}
|
||||||
|
* {{description}}
|
||||||
|
* @see {{url}}
|
||||||
|
{{/externalDocs}}
|
||||||
*/
|
*/
|
||||||
public com.squareup.okhttp.Call {{operationId}}Call({{#allParams}}{{{dataType}}} {{paramName}}, {{/allParams}}final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException {
|
public com.squareup.okhttp.Call {{operationId}}Call({{#allParams}}{{{dataType}}} {{paramName}}, {{/allParams}}final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException {
|
||||||
Object {{localVariablePrefix}}localVarPostBody = {{#bodyParam}}{{paramName}}{{/bodyParam}}{{^bodyParam}}null{{/bodyParam}};
|
Object {{localVariablePrefix}}localVarPostBody = {{#bodyParam}}{{paramName}}{{/bodyParam}}{{^bodyParam}}null{{/bodyParam}};
|
||||||
@ -171,6 +175,10 @@ public class {{classname}} {
|
|||||||
* @param {{paramName}} {{description}}{{#required}} (required){{/required}}{{^required}} (optional{{#defaultValue}}, default to {{{.}}}{{/defaultValue}}){{/required}}{{/allParams}}{{#returnType}}
|
* @param {{paramName}} {{description}}{{#required}} (required){{/required}}{{^required}} (optional{{#defaultValue}}, default to {{{.}}}{{/defaultValue}}){{/required}}{{/allParams}}{{#returnType}}
|
||||||
* @return {{returnType}}{{/returnType}}
|
* @return {{returnType}}{{/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
|
||||||
|
{{#externalDocs}}
|
||||||
|
* {{description}}
|
||||||
|
* @see {{url}}
|
||||||
|
{{/externalDocs}}
|
||||||
*/
|
*/
|
||||||
public {{#returnType}}{{{returnType}}} {{/returnType}}{{^returnType}}void {{/returnType}}{{operationId}}({{#allParams}}{{{dataType}}} {{paramName}}{{#hasMore}}, {{/hasMore}}{{/allParams}}) throws ApiException {
|
public {{#returnType}}{{{returnType}}} {{/returnType}}{{^returnType}}void {{/returnType}}{{operationId}}({{#allParams}}{{{dataType}}} {{paramName}}{{#hasMore}}, {{/hasMore}}{{/allParams}}) throws ApiException {
|
||||||
{{#returnType}}ApiResponse<{{{returnType}}}> {{localVariablePrefix}}resp = {{/returnType}}{{operationId}}WithHttpInfo({{#allParams}}{{paramName}}{{#hasMore}}, {{/hasMore}}{{/allParams}});{{#returnType}}
|
{{#returnType}}ApiResponse<{{{returnType}}}> {{localVariablePrefix}}resp = {{/returnType}}{{operationId}}WithHttpInfo({{#allParams}}{{paramName}}{{#hasMore}}, {{/hasMore}}{{/allParams}});{{#returnType}}
|
||||||
@ -183,6 +191,10 @@ public class {{classname}} {
|
|||||||
* @param {{paramName}} {{description}}{{#required}} (required){{/required}}{{^required}} (optional{{#defaultValue}}, default to {{{.}}}{{/defaultValue}}){{/required}}{{/allParams}}
|
* @param {{paramName}} {{description}}{{#required}} (required){{/required}}{{^required}} (optional{{#defaultValue}}, default to {{{.}}}{{/defaultValue}}){{/required}}{{/allParams}}
|
||||||
* @return ApiResponse<{{#returnType}}{{returnType}}{{/returnType}}{{^returnType}}Void{{/returnType}}>
|
* @return ApiResponse<{{#returnType}}{{returnType}}{{/returnType}}{{^returnType}}Void{{/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
|
||||||
|
{{#externalDocs}}
|
||||||
|
* {{description}}
|
||||||
|
* @see {{url}}
|
||||||
|
{{/externalDocs}}
|
||||||
*/
|
*/
|
||||||
public ApiResponse<{{#returnType}}{{{returnType}}}{{/returnType}}{{^returnType}}Void{{/returnType}}> {{operationId}}WithHttpInfo({{#allParams}}{{#useBeanValidation}}{{>beanValidationQueryParams}}{{/useBeanValidation}}{{{dataType}}} {{paramName}}{{#hasMore}}, {{/hasMore}}{{/allParams}}) throws ApiException {
|
public ApiResponse<{{#returnType}}{{{returnType}}}{{/returnType}}{{^returnType}}Void{{/returnType}}> {{operationId}}WithHttpInfo({{#allParams}}{{#useBeanValidation}}{{>beanValidationQueryParams}}{{/useBeanValidation}}{{{dataType}}} {{paramName}}{{#hasMore}}, {{/hasMore}}{{/allParams}}) throws ApiException {
|
||||||
com.squareup.okhttp.Call {{localVariablePrefix}}call = {{operationId}}ValidateBeforeCall({{#allParams}}{{paramName}}, {{/allParams}}null, null);
|
com.squareup.okhttp.Call {{localVariablePrefix}}call = {{operationId}}ValidateBeforeCall({{#allParams}}{{paramName}}, {{/allParams}}null, null);
|
||||||
@ -197,6 +209,10 @@ public class {{classname}} {
|
|||||||
* @param callback The callback to be executed when the API call finishes
|
* @param callback The callback to be executed when the API call finishes
|
||||||
* @return The request call
|
* @return The request call
|
||||||
* @throws ApiException If fail to process the API call, e.g. serializing the request body object
|
* @throws ApiException If fail to process the API call, e.g. serializing the request body object
|
||||||
|
{{#externalDocs}}
|
||||||
|
* {{description}}
|
||||||
|
* @see {{url}}
|
||||||
|
{{/externalDocs}}
|
||||||
*/
|
*/
|
||||||
public com.squareup.okhttp.Call {{operationId}}Async({{#allParams}}{{{dataType}}} {{paramName}}, {{/allParams}}final ApiCallback<{{#returnType}}{{{returnType}}}{{/returnType}}{{^returnType}}Void{{/returnType}}> {{localVariablePrefix}}callback) throws ApiException {
|
public com.squareup.okhttp.Call {{operationId}}Async({{#allParams}}{{{dataType}}} {{paramName}}, {{/allParams}}final ApiCallback<{{#returnType}}{{{returnType}}}{{/returnType}}{{^returnType}}Void{{/returnType}}> {{localVariablePrefix}}callback) throws ApiException {
|
||||||
|
|
||||||
|
@ -48,6 +48,10 @@ public class {{classname}} {
|
|||||||
{{#isDeprecated}}
|
{{#isDeprecated}}
|
||||||
* @Deprecated
|
* @Deprecated
|
||||||
{{/isDeprecated}}
|
{{/isDeprecated}}
|
||||||
|
{{#externalDocs}}
|
||||||
|
* {{description}}
|
||||||
|
* @see {{url}}
|
||||||
|
{{/externalDocs}}
|
||||||
*/
|
*/
|
||||||
public {{#returnType}}{{{returnType}}} {{/returnType}}{{^returnType}}void {{/returnType}}{{operationId}}({{#allParams}}{{{dataType}}} {{paramName}}{{#hasMore}}, {{/hasMore}}{{/allParams}}) throws ApiException {
|
public {{#returnType}}{{{returnType}}} {{/returnType}}{{^returnType}}void {{/returnType}}{{operationId}}({{#allParams}}{{{dataType}}} {{paramName}}{{#hasMore}}, {{/hasMore}}{{/allParams}}) throws ApiException {
|
||||||
Object {{localVariablePrefix}}localVarPostBody = {{#bodyParam}}{{paramName}}{{/bodyParam}}{{^bodyParam}}null{{/bodyParam}};
|
Object {{localVariablePrefix}}localVarPostBody = {{#bodyParam}}{{paramName}}{{/bodyParam}}{{^bodyParam}}null{{/bodyParam}};
|
||||||
|
@ -55,6 +55,10 @@ public class {{classname}} {
|
|||||||
{{/responses}}{{#allParams}} * @param {{paramName}} {{description}}{{^description}}The {{paramName}} parameter{{/description}}
|
{{/responses}}{{#allParams}} * @param {{paramName}} {{description}}{{^description}}The {{paramName}} parameter{{/description}}
|
||||||
{{/allParams}}{{#returnType}} * @return {{returnType}}
|
{{/allParams}}{{#returnType}} * @return {{returnType}}
|
||||||
{{/returnType}} * @throws RestClientException if an error occurs while attempting to invoke the API
|
{{/returnType}} * @throws RestClientException if an error occurs while attempting to invoke the API
|
||||||
|
{{#externalDocs}}
|
||||||
|
* {{description}}
|
||||||
|
* @see {{url}}
|
||||||
|
{{/externalDocs}}
|
||||||
*/
|
*/
|
||||||
public {{#returnType}}{{{returnType}}} {{/returnType}}{{^returnType}}void {{/returnType}}{{operationId}}({{#allParams}}{{{dataType}}} {{paramName}}{{#hasMore}}, {{/hasMore}}{{/allParams}}) throws RestClientException {
|
public {{#returnType}}{{{returnType}}} {{/returnType}}{{^returnType}}void {{/returnType}}{{operationId}}({{#allParams}}{{{dataType}}} {{paramName}}{{#hasMore}}, {{/hasMore}}{{/allParams}}) throws RestClientException {
|
||||||
Object {{localVariablePrefix}}postBody = {{#bodyParam}}{{paramName}}{{/bodyParam}}{{^bodyParam}}null{{/bodyParam}};
|
Object {{localVariablePrefix}}postBody = {{#bodyParam}}{{paramName}}{{/bodyParam}}{{^bodyParam}}null{{/bodyParam}};
|
||||||
|
@ -29,6 +29,10 @@ public interface {{classname}} {
|
|||||||
{{#returnType}}
|
{{#returnType}}
|
||||||
* @return {{returnType}}
|
* @return {{returnType}}
|
||||||
{{/returnType}}
|
{{/returnType}}
|
||||||
|
{{#externalDocs}}
|
||||||
|
* {{description}}
|
||||||
|
* @see {{url}}
|
||||||
|
{{/externalDocs}}
|
||||||
*/
|
*/
|
||||||
{{#formParams}}{{#-first}}
|
{{#formParams}}{{#-first}}
|
||||||
{{#isMultipart}}@retrofit.http.Multipart{{/isMultipart}}{{^isMultipart}}@retrofit.http.FormUrlEncoded{{/isMultipart}}{{/-first}}{{/formParams}}
|
{{#isMultipart}}@retrofit.http.Multipart{{/isMultipart}}{{^isMultipart}}@retrofit.http.FormUrlEncoded{{/isMultipart}}{{/-first}}{{/formParams}}
|
||||||
@ -44,6 +48,10 @@ public interface {{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}}
|
||||||
* @param cb callback method
|
* @param cb callback method
|
||||||
|
{{#externalDocs}}
|
||||||
|
* {{description}}
|
||||||
|
* @see {{url}}
|
||||||
|
{{/externalDocs}}
|
||||||
*/
|
*/
|
||||||
{{#formParams}}{{#-first}}
|
{{#formParams}}{{#-first}}
|
||||||
{{#isMultipart}}@retrofit.http.Multipart{{/isMultipart}}{{^isMultipart}}@retrofit.http.FormUrlEncoded{{/isMultipart}}{{/-first}}{{/formParams}}
|
{{#isMultipart}}@retrofit.http.Multipart{{/isMultipart}}{{^isMultipart}}@retrofit.http.FormUrlEncoded{{/isMultipart}}{{/-first}}{{/formParams}}
|
||||||
|
@ -40,6 +40,10 @@ public interface {{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}}
|
||||||
* @return Call<{{#returnType}}{{returnType}}{{/returnType}}{{^returnType}}Object{{/returnType}}>
|
* @return Call<{{#returnType}}{{returnType}}{{/returnType}}{{^returnType}}Object{{/returnType}}>
|
||||||
|
{{#externalDocs}}
|
||||||
|
* {{description}}
|
||||||
|
* @see {{url}}
|
||||||
|
{{/externalDocs}}
|
||||||
*/
|
*/
|
||||||
{{#formParams}}
|
{{#formParams}}
|
||||||
{{#-first}}
|
{{#-first}}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user