Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
57 changed files
with
1,086 additions
and
26 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
82 changes: 82 additions & 0 deletions
82
...ger-codegen-template-jaxrs-interfaces/src/main/resources/JaxRsInterfaces/api_doc.mustache
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,82 @@ | ||
# {{classname}}{{#description}} | ||
{{description}}{{/description}} | ||
|
||
All URIs are relative to *{{basePath}}* | ||
|
||
Method | HTTP request | Description | ||
------------- | ------------- | ------------- | ||
{{#operations}}{{#operation}}[**{{operationId}}**]({{classname}}.md#{{operationId}}) | **{{httpMethod}}** {{path}} | {{#summary}}{{summary}}{{/summary}} | ||
{{/operation}}{{/operations}} | ||
|
||
{{#operations}} | ||
{{#operation}} | ||
<a name="{{operationId}}"></a> | ||
# **{{operationId}}** | ||
> {{#returnType}}{{returnType}} {{/returnType}}{{operationId}}({{#allParams}}{{{paramName}}}{{#hasMore}}, {{/hasMore}}{{/allParams}}) | ||
|
||
{{summary}}{{#notes}} | ||
|
||
{{notes}}{{/notes}} | ||
|
||
### Example | ||
```java | ||
// Import classes:{{#hasAuthMethods}} | ||
//import {{{invokerPackage}}}.ApiClient;{{/hasAuthMethods}} | ||
//import {{{invokerPackage}}}.ApiException;{{#hasAuthMethods}} | ||
//import {{{invokerPackage}}}.Configuration; | ||
//import {{{invokerPackage}}}.auth.*;{{/hasAuthMethods}} | ||
//import {{{package}}}.{{{classname}}}; | ||
|
||
{{#hasAuthMethods}} | ||
ApiClient defaultClient = Configuration.getDefaultApiClient(); | ||
{{#authMethods}}{{#isBasic}} | ||
// Configure HTTP basic authorization: {{{name}}} | ||
HttpBasicAuth {{{name}}} = (HttpBasicAuth) defaultClient.getAuthentication("{{{name}}}"); | ||
{{{name}}}.setUsername("YOUR USERNAME"); | ||
{{{name}}}.setPassword("YOUR PASSWORD");{{/isBasic}}{{#isApiKey}} | ||
// Configure API key authorization: {{{name}}} | ||
ApiKeyAuth {{{name}}} = (ApiKeyAuth) defaultClient.getAuthentication("{{{name}}}"); | ||
{{{name}}}.setApiKey("YOUR API KEY"); | ||
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) | ||
//{{{name}}}.setApiKeyPrefix("Token");{{/isApiKey}}{{#isOAuth}} | ||
// Configure OAuth2 access token for authorization: {{{name}}} | ||
OAuth {{{name}}} = (OAuth) defaultClient.getAuthentication("{{{name}}}"); | ||
{{{name}}}.setAccessToken("YOUR ACCESS TOKEN");{{/isOAuth}} | ||
{{/authMethods}} | ||
{{/hasAuthMethods}} | ||
|
||
{{{classname}}} apiInstance = new {{{classname}}}(); | ||
{{#allParams}} | ||
{{{dataType}}} {{{paramName}}} = {{{example}}}; // {{{dataType}}} | {{{description}}} | ||
{{/allParams}} | ||
try { | ||
{{#returnType}}{{{returnType}}} result = {{/returnType}}apiInstance.{{{operationId}}}({{#allParams}}{{{paramName}}}{{#hasMore}}, {{/hasMore}}{{/allParams}});{{#returnType}} | ||
System.out.println(result);{{/returnType}} | ||
} catch (ApiException e) { | ||
System.err.println("Exception when calling {{{classname}}}#{{{operationId}}}"); | ||
e.printStackTrace(); | ||
} | ||
``` | ||
|
||
### Parameters | ||
{{^allParams}}This endpoint does not need any parameter.{{/allParams}}{{#allParams}}{{#-last}} | ||
Name | Type | Description | Notes | ||
------------- | ------------- | ------------- | -------------{{/-last}}{{/allParams}} | ||
{{#allParams}} **{{paramName}}** | {{#isPrimitiveType}}**{{dataType}}**{{/isPrimitiveType}}{{^isPrimitiveType}}{{#isFile}}**{{dataType}}**{{/isFile}}{{^isFile}}[**{{dataType}}**]({{baseType}}.md){{/isFile}}{{/isPrimitiveType}}| {{description}} |{{^required}} [optional]{{/required}}{{#defaultValue}} [default to {{defaultValue}}]{{/defaultValue}}{{#allowableValues}} [enum: {{#values}}{{{.}}}{{^-last}}, {{/-last}}{{/values}}]{{/allowableValues}} | ||
{{/allParams}} | ||
|
||
### Return type | ||
|
||
{{#returnType}}{{#returnTypeIsPrimitive}}**{{returnType}}**{{/returnTypeIsPrimitive}}{{^returnTypeIsPrimitive}}[**{{returnType}}**]({{returnBaseType}}.md){{/returnTypeIsPrimitive}}{{/returnType}}{{^returnType}}null (empty response body){{/returnType}} | ||
|
||
### Authorization | ||
|
||
{{^authMethods}}No authorization required{{/authMethods}}{{#authMethods}}[{{name}}](../README.md#{{name}}){{^-last}}, {{/-last}}{{/authMethods}} | ||
|
||
### HTTP request headers | ||
|
||
- **Content-Type**: {{#consumes}}{{{mediaType}}}{{#hasMore}}, {{/hasMore}}{{/consumes}}{{^consumes}}Not defined{{/consumes}} | ||
- **Accept**: {{#produces}}{{{mediaType}}}{{#hasMore}}, {{/hasMore}}{{/produces}}{{^produces}}Not defined{{/produces}} | ||
|
||
{{/operation}} | ||
{{/operations}} |
Oops, something went wrong.