use baseName for request param string names

This commit is contained in:
Ivan Smolin 2022-04-11 14:17:16 +03:00
parent 1fe3368d5f
commit 2aa489edfd
2 changed files with 5 additions and 5 deletions

View File

@ -5,7 +5,7 @@
<artifactId>TINetworking-swagger-codegen</artifactId>
<packaging>jar</packaging>
<name>TINetworking-swagger-codegen</name>
<version>1.1.4</version>
<version>1.1.5</version>
<build>
<plugins>
<plugin>

View File

@ -47,19 +47,19 @@ public extension EndpointRequest {
{{#hasQueryParams}}
queryParameters: [
{{#each queryParams}}
"{{{this.paramName}}}": .init(value: {{{this.paramName}}}, allowEmptyValue: {{#this.required}}false{{/this.required}}{{^this.required}}true{{/this.required}}),
"{{{this.baseName}}}": .init(value: {{{this.paramName}}}, allowEmptyValue: {{#this.required}}false{{/this.required}}{{^this.required}}true{{/this.required}}),
{{/each}}],
{{/hasQueryParams}}
{{#hasPathParams}}
pathParameters: [
{{#each pathParams}}
"{{{this.paramName}}}": .init(value: {{{this.paramName}}}, allowEmptyValue: {{#this.required}}false{{/this.required}}{{^this.required}}true{{/this.required}}),
"{{{this.baseName}}}": .init(value: {{{this.paramName}}}, allowEmptyValue: {{#this.required}}false{{/this.required}}{{^this.required}}true{{/this.required}}),
{{/each}}],
{{/hasPathParams}}
{{#hasHeaderParams}}
headerParameters: [
{{#each headerParams}}
"{{{this.paramName}}}": .init(value: {{{this.paramName}}}, allowEmptyValue: {{#this.required}}false{{/this.required}}{{^this.required}}true{{/this.required}}),
"{{{this.baseName}}}": .init(value: {{{this.paramName}}}, allowEmptyValue: {{#this.required}}false{{/this.required}}{{^this.required}}true{{/this.required}}),
{{/each}}],
{{/hasHeaderParams}}
{{^hasHeaderParams}}
@ -68,7 +68,7 @@ public extension EndpointRequest {
{{#hasCookieParams}}
cookieParameters: [
{{#each cookieParams}}
"{{{this.paramName}}}": .init(value: {{{this.paramName}}}, allowEmptyValue: {{#this.required}}false{{/this.required}}{{^this.required}}true{{/this.required}}),
"{{{this.baseName}}}": .init(value: {{{this.paramName}}}, allowEmptyValue: {{#this.required}}false{{/this.required}}{{^this.required}}true{{/this.required}}),
{{/each}}],
{{/hasCookieParams}}
acceptableStatusCodes: [{{contentExtensions.x-codegen-acceptable-status-codes}}],