-
Notifications
You must be signed in to change notification settings - Fork 4
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
1 parent
b7ab58c
commit 1d5ba75
Showing
23 changed files
with
317 additions
and
310 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,74 @@ | ||
# {{packageName}}.{{classname}}{{#description}} | ||
{{.}}{{/description}} | ||
|
||
All URIs are relative to *{{basePath}}* | ||
|
||
Method | HTTP request | Description | ||
------------- | ------------- | ------------- | ||
{{#operations}}{{#operation}}[**{{operationId}}**]({{classname}}.md#{{operationId}}) | **{{httpMethod}}** {{path}} | {{summary}} | ||
{{/operation}}{{/operations}} | ||
|
||
{{#operations}} | ||
{{#operation}} | ||
# **{{{operationId}}}** | ||
> {{#returnType}}{{{.}}} {{/returnType}}{{{operationId}}}({{#allParams}}{{#required}}{{{paramName}}}{{/required}}{{^required}}{{{paramName}}}={{{paramName}}}{{/required}}{{^-last}}, {{/-last}}{{/allParams}}) | ||
|
||
{{{summary}}}{{#notes}} | ||
|
||
{{{.}}}{{/notes}} | ||
|
||
### Example | ||
|
||
{{#hasAuthMethods}} | ||
{{#authMethods}} | ||
{{#isBasic}} | ||
{{#isBasicBasic}} | ||
* Basic Authentication ({{name}}): | ||
{{/isBasicBasic}} | ||
{{#isBasicBearer}} | ||
* Bearer{{#bearerFormat}} ({{{.}}}){{/bearerFormat}} Authentication ({{name}}): | ||
{{/isBasicBearer}} | ||
{{/isBasic}} | ||
{{#isApiKey}} | ||
* Api Key Authentication ({{name}}): | ||
{{/isApiKey }} | ||
{{#isOAuth}} | ||
* OAuth Authentication ({{name}}): | ||
{{/isOAuth }} | ||
{{/authMethods}} | ||
{{/hasAuthMethods}} | ||
{{> api_doc_example }} | ||
|
||
### Parameters | ||
{{^allParams}}This endpoint does not need any parameter.{{/allParams}}{{#allParams}}{{#-last}} | ||
Name | Type | Description | Notes | ||
------------- | ------------- | ------------- | -------------{{/-last}}{{/allParams}} | ||
{{#allParams}} **{{paramName}}** | {{#isFile}}**{{dataType}}**{{/isFile}}{{^isFile}}{{#isPrimitiveType}}**{{dataType}}**{{/isPrimitiveType}}{{^isPrimitiveType}}[**{{dataType}}**]({{baseType}}.md){{/isPrimitiveType}}{{/isFile}}| {{description}} | {{^required}}[optional] {{/required}}{{#defaultValue}}[default to {{.}}]{{/defaultValue}} | ||
{{/allParams}} | ||
|
||
### Return type | ||
|
||
{{#returnType}}{{#returnTypeIsPrimitive}}**{{{returnType}}}**{{/returnTypeIsPrimitive}}{{^returnTypeIsPrimitive}}[**{{{returnType}}}**]({{returnBaseType}}.md){{/returnTypeIsPrimitive}}{{/returnType}}{{^returnType}}void (empty response body){{/returnType}} | ||
|
||
### Authorization | ||
|
||
{{^authMethods}}No authorization required{{/authMethods}}{{#authMethods}}[{{{name}}}](../README.md#{{{name}}}){{^-last}}, {{/-last}}{{/authMethods}} | ||
|
||
### HTTP request headers | ||
|
||
- **Content-Type**: {{#consumes}}{{{mediaType}}}{{^-last}}, {{/-last}}{{/consumes}}{{^consumes}}Not defined{{/consumes}} | ||
- **Accept**: {{#produces}}{{{mediaType}}}{{^-last}}, {{/-last}}{{/produces}}{{^produces}}Not defined{{/produces}} | ||
|
||
{{#responses.0}} | ||
### HTTP response details | ||
| Status code | Description | Response headers | | ||
|-------------|-------------|------------------| | ||
{{#responses}} | ||
**{{code}}** | {{message}} | {{#headers}} * {{baseName}} - {{description}} <br> {{/headers}}{{^headers.0}} - {{/headers.0}} | | ||
{{/responses}} | ||
{{/responses.0}} | ||
|
||
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) | ||
|
||
{{/operation}} | ||
{{/operations}} |
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,16 @@ | ||
#!/bin/bash | ||
|
||
set -eETuo pipefail | ||
|
||
failure() { | ||
local lineno="$1" | ||
local msg="$2" | ||
echo "Failed at $lineno: $msg" | ||
} | ||
trap 'failure ${LINENO} "$BASH_COMMAND"' ERR | ||
|
||
# split the README into two, and move one up a level | ||
split_line=$(grep -n START_OF_NESTED_README generate/.output/sdk/README.md | cut -d: -f1) | ||
head -n $(( split_line - 1 )) generate/.output/sdk/README.md > generate/.output/README.md | ||
tail -n +$(( split_line + 1 )) generate/.output/sdk/README.md > generate/.output/sdk/README.md.new | ||
mv generate/.output/sdk/README.md.new generate/.output/sdk/README.md |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,52 @@ | ||
# {{packageName}}.{{classname}}{{#description}} | ||
{{.}}{{/description}} | ||
|
||
All URIs are relative to *{{basePath}}* | ||
|
||
Method | HTTP request | Description | ||
------------- | ------------- | ------------- | ||
{{#operations}}{{#operation}}[**{{operationId}}**]({{classname}}.md#{{operationId}}) | **{{httpMethod}}** {{path}} | {{summary}} | ||
{{/operation}}{{/operations}} | ||
|
||
{{#operations}} | ||
{{#operation}} | ||
# **{{{operationId}}}** | ||
> {{#returnType}}{{{.}}} {{/returnType}}{{{operationId}}}({{#allParams}}{{#required}}{{{paramName}}}{{/required}}{{^required}}{{{paramName}}}={{{paramName}}}{{/required}}{{^-last}}, {{/-last}}{{/allParams}}) | ||
|
||
{{{summary}}}{{#notes}} | ||
|
||
{{{.}}}{{/notes}} | ||
|
||
### Example | ||
|
||
{{> example}} | ||
|
||
### Parameters | ||
{{^allParams}}This endpoint does not need any parameter.{{/allParams}}{{#allParams}}{{#-last}} | ||
Name | Type | Description | Notes | ||
------------- | ------------- | ------------- | -------------{{/-last}}{{/allParams}} | ||
{{#allParams}} **{{paramName}}** | {{#isFile}}**{{dataType}}**{{/isFile}}{{^isFile}}{{#isPrimitiveType}}**{{dataType}}**{{/isPrimitiveType}}{{^isPrimitiveType}}[**{{dataType}}**]({{baseType}}.md){{/isPrimitiveType}}{{/isFile}}| {{description}} | {{^required}}[optional] {{/required}}{{#defaultValue}}[default to {{.}}]{{/defaultValue}} | ||
{{/allParams}} | ||
|
||
### Return type | ||
|
||
{{#returnType}}{{#returnTypeIsPrimitive}}**{{{returnType}}}**{{/returnTypeIsPrimitive}}{{^returnTypeIsPrimitive}}[**{{{returnType}}}**]({{returnBaseType}}.md){{/returnTypeIsPrimitive}}{{/returnType}}{{^returnType}}void (empty response body){{/returnType}} | ||
|
||
### HTTP request headers | ||
|
||
- **Content-Type**: {{#consumes}}{{{mediaType}}}{{^-last}}, {{/-last}}{{/consumes}}{{^consumes}}Not defined{{/consumes}} | ||
- **Accept**: {{#produces}}{{{mediaType}}}{{^-last}}, {{/-last}}{{/produces}}{{^produces}}Not defined{{/produces}} | ||
|
||
{{#responses.0}} | ||
### HTTP response details | ||
| Status code | Description | Response headers | | ||
|-------------|-------------|------------------| | ||
{{#responses}} | ||
**{{code}}** | {{message}} | {{#headers}} * {{baseName}} - {{description}} <br> {{/headers}}{{^headers.0}} - {{/headers.0}} | | ||
{{/responses}} | ||
{{/responses.0}} | ||
|
||
[Back to top](#) • [Back to API list](../README.md#documentation-for-api-endpoints) • [Back to Model list](../README.md#documentation-for-models) • [Back to README](../README.md) | ||
|
||
{{/operation}} | ||
{{/operations}} |
Oops, something went wrong.