templates/api.mustache in dropbox-sign-1.4.1 vs templates/api.mustache in dropbox-sign-1.5.0
- old
+ new
@@ -20,36 +20,82 @@
# {{{.}}}
{{/summary}}
{{#notes}}
# {{{.}}}
{{/notes}}
-{{#allParams}}{{#required}} # @param {{paramName}} [{{{dataType}}}] {{description}}
-{{/required}}{{/allParams}} # @param [Hash] opts the optional parameters
-{{#allParams}}{{^required}} # @option opts [{{{dataType}}}] :{{paramName}} {{description}}{{#defaultValue}} (default to {{{.}}}){{/defaultValue}}
-{{/required}}{{/allParams}} # @return [{{{returnType}}}{{^returnType}}nil{{/returnType}}]
- def {{operationId}}({{#allParams}}{{#required}}{{paramName}}, {{/required}}{{/allParams}}opts = {})
- {{#returnType}}data, _status_code, _headers = {{/returnType}}{{operationId}}_with_http_info({{#allParams}}{{#required}}{{paramName}}, {{/required}}{{/allParams}}opts)
+{{#vendorExtensions.x-group-parameters}}
+ # @param [Hash] opts the parameters
+{{#allParams}}
+{{#required}}
+ # @option opts [{{{dataType}}}] :{{paramName}} {{description}} (required)
+{{/required}}
+{{/allParams}}
+{{/vendorExtensions.x-group-parameters}}
+{{^vendorExtensions.x-group-parameters}}
+{{#allParams}}
+{{#required}}
+ # @param {{paramName}} [{{{dataType}}}] {{description}}
+{{/required}}
+{{/allParams}}
+ # @param [Hash] opts the optional parameters
+{{/vendorExtensions.x-group-parameters}}
+{{#allParams}}
+{{^required}}
+ # @option opts [{{{dataType}}}] :{{paramName}} {{description}}{{#defaultValue}} (default to {{{.}}}){{/defaultValue}}
+{{/required}}
+{{/allParams}}
+ # @return [{{{returnType}}}{{^returnType}}nil{{/returnType}}]
+ def {{operationId}}({{^vendorExtensions.x-group-parameters}}{{#allParams}}{{#required}}{{paramName}}, {{/required}}{{/allParams}}{{/vendorExtensions.x-group-parameters}}opts = {})
+ {{#returnType}}data, _status_code, _headers = {{/returnType}}{{operationId}}_with_http_info({{^vendorExtensions.x-group-parameters}}{{#allParams}}{{#required}}{{paramName}}, {{/required}}{{/allParams}}{{/vendorExtensions.x-group-parameters}}opts)
{{#returnType}}data{{/returnType}}{{^returnType}}nil{{/returnType}}
end
{{#summary}}
# {{.}}
{{/summary}}
{{#notes}}
# {{.}}
{{/notes}}
-{{#allParams}}{{#required}} # @param {{paramName}} [{{{dataType}}}] {{description}}
-{{/required}}{{/allParams}} # @param [Hash] opts the optional parameters
-{{#allParams}}{{^required}} # @option opts [{{{dataType}}}] :{{paramName}} {{description}}
-{{/required}}{{/allParams}} # @return [Array<({{{returnType}}}{{^returnType}}nil{{/returnType}}, Integer, Hash)>] {{#returnType}}{{{.}}} data{{/returnType}}{{^returnType}}nil{{/returnType}}, response status code and response headers
- def {{operationId}}_with_http_info({{#allParams}}{{#required}}{{paramName}}, {{/required}}{{/allParams}}opts = {})
+{{#vendorExtensions.x-group-parameters}}
+ # @param [Hash] opts the parameters
+{{#allParams}}
+{{#required}}
+ # @option opts [{{{dataType}}}] :{{paramName}} {{description}} (required)
+{{/required}}
+{{/allParams}}
+{{/vendorExtensions.x-group-parameters}}
+{{^vendorExtensions.x-group-parameters}}
+{{#allParams}}
+{{#required}}
+ # @param {{paramName}} [{{{dataType}}}] {{description}}
+{{/required}}
+{{/allParams}}
+ # @param [Hash] opts the optional parameters
+{{/vendorExtensions.x-group-parameters}}
+{{#allParams}}
+{{^required}}
+ # @option opts [{{{dataType}}}] :{{paramName}} {{description}}{{#defaultValue}} (default to {{{.}}}){{/defaultValue}}
+{{/required}}
+{{/allParams}}
+ # @return [Array<({{{returnType}}}{{^returnType}}nil{{/returnType}}, Integer, Hash)>] {{#returnType}}{{{.}}} data{{/returnType}}{{^returnType}}nil{{/returnType}}, response status code and response headers
+ def {{operationId}}_with_http_info({{^vendorExtensions.x-group-parameters}}{{#allParams}}{{#required}}{{paramName}}, {{/required}}{{/allParams}}{{/vendorExtensions.x-group-parameters}}opts = {})
if @api_client.config.debugging
@api_client.config.logger.debug 'Calling API: {{classname}}.{{operationId}} ...'
end
+ {{#vendorExtensions.x-group-parameters}}
+ # unbox the parameters from the hash
{{#allParams}}
{{^isNullable}}
{{#required}}
+ {{{paramName}}} = opts[:'{{{paramName}}}']
+ {{/required}}
+ {{/isNullable}}
+ {{/allParams}}
+ {{/vendorExtensions.x-group-parameters}}
+ {{#allParams}}
+ {{^isNullable}}
+ {{#required}}
# verify the required parameter '{{paramName}}' is set
if @api_client.config.client_side_validation && {{{paramName}}}.nil?
fail ArgumentError, "Missing the required parameter '{{paramName}}' when calling {{classname}}.{{operationId}}"
end
{{#isEnum}}
@@ -159,10 +205,10 @@
header_params[:'{{{baseName}}}'] = {{#collectionFormat}}@api_client.build_collection_param({{{paramName}}}, :{{{collectionFormat}}}){{/collectionFormat}}{{^collectionFormat}}{{{paramName}}}{{/collectionFormat}}
{{/required}}
{{/headerParams}}
{{#headerParams}}
{{^required}}
- header_params[:'{{{baseName}}}'] = {{#collectionFormat}}@api_client.build_collection_param(opts[:'{{{paramName}}}'], :{{{collectionFormat}}}){{/collectionFormat}}{{^collectionFormat}}opts[:'{{{paramName}}}']{{/collectionFormat}} if !opts[:'{{{paramName}}}'].nil?
+ header_params[{{#lambdaFixHeaderKey}}:'{{{baseName}}}'{{/lambdaFixHeaderKey}}] = {{#collectionFormat}}@api_client.build_collection_param(opts[:'{{{paramName}}}'], :{{{collectionFormat}}}){{/collectionFormat}}{{^collectionFormat}}opts[:'{{{paramName}}}']{{/collectionFormat}} if !opts[:'{{{paramName}}}'].nil?
{{/required}}
{{/headerParams}}
post_body = {}
form_params = opts[:form_params] || {}