forked from loafle/openapi-generator-original
* 1st commit of lua generator * add petstore sample * various fixes based on feedback * better return handling * check status code 1st letter * add support for query parameters, auth, body param * more fixes based on daurnimator feedback * more fixes based on daurnimator feedback * fix a few more issues found by luac -p * use lower case for http header key name * more fixes based on feedback * update lua sample * skip auto-generated readme, doc, test files * use tab instead of 2-space * fix container return type * fix cast method call * fix cast function call
51 lines
3.0 KiB
Plaintext
51 lines
3.0 KiB
Plaintext
# {{invokerPackage}}\{{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}}
|
|
# **{{{operationId}}}**
|
|
> {{#returnType}}{{{returnType}}} {{/returnType}}{{{operationId}}}({{#authMethods}}ctx, {{/authMethods}}{{#allParams}}{{#required}}{{paramName}}{{#hasMore}}, {{/hasMore}}{{/required}}{{/allParams}}{{#hasOptionalParams}}optional{{/hasOptionalParams}})
|
|
{{{summary}}}{{#notes}}
|
|
|
|
{{{notes}}}{{/notes}}
|
|
|
|
### Required Parameters
|
|
{{^allParams}}This endpoint does not need any parameter.{{/allParams}}{{#allParams}}{{#-last}}
|
|
Name | Type | Description | Notes
|
|
------------- | ------------- | ------------- | -------------{{#authMethods}}
|
|
**ctx** | **context.Context** | context containing the authentication | nil if no authentication{{/authMethods}}{{/-last}}{{/allParams}}{{#allParams}}{{#required}}
|
|
**{{paramName}}** | {{#isFile}}**{{dataType}}**{{/isFile}}{{#isPrimitiveType}}**{{dataType}}**{{/isPrimitiveType}}{{^isPrimitiveType}}{{^isFile}}[**{{dataType}}**]({{baseType}}.md){{/isFile}}{{/isPrimitiveType}}| {{description}} | {{#defaultValue}}[default to {{defaultValue}}]{{/defaultValue}}{{/required}}{{/allParams}}{{#hasOptionalParams}}
|
|
**optional** | **map[string]interface{}** | optional parameters | nil if no parameters
|
|
|
|
### Optional Parameters
|
|
Optional parameters are passed through a map[string]interface{}.
|
|
{{#allParams}}{{#-last}}
|
|
Name | Type | Description | Notes
|
|
------------- | ------------- | ------------- | -------------{{/-last}}{{/allParams}}{{#allParams}}
|
|
**{{paramName}}** | {{#isFile}}**{{dataType}}**{{/isFile}}{{#isPrimitiveType}}**{{dataType}}**{{/isPrimitiveType}}{{^isPrimitiveType}}{{^isFile}}[**{{dataType}}**]({{baseType}}.md){{/isFile}}{{/isPrimitiveType}}| {{description}} | {{#defaultValue}}[default to {{defaultValue}}]{{/defaultValue}}{{/allParams}}{{/hasOptionalParams}}
|
|
|
|
### Return type
|
|
|
|
{{#returnType}}{{#returnTypeIsPrimitive}}**{{{returnType}}}**{{/returnTypeIsPrimitive}}{{^returnTypeIsPrimitive}}[**{{{returnType}}}**]({{returnBaseType}}.md){{/returnTypeIsPrimitive}}{{/returnType}}{{^returnType}} (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}}
|
|
|
|
[[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}}
|