try string in input type

This commit is contained in:
Wolfgang Hottgenroth 2021-11-25 15:44:16 +01:00
parent 39528bc248
commit 7cf092cc9f
Signed by: wn
GPG Key ID: E49AF3B9EF6DD469
3 changed files with 10 additions and 10 deletions

View File

@ -12,6 +12,8 @@ def CsTypeConverter(i):
match (i):
case 'integer':
r = 'int'
case 'string':
r = 'string'
return r
def OpenApiExtractRefType(i):

View File

@ -34,26 +34,23 @@ paths:
# responses:
# 201:
# description: Your items has been inserted
/pdb/v2/test1/specificSelectName/{nr}:
/pdb/v2/test1/specificSelectName/{txt}:
get:
tags: [ "Regular" ]
operationId: Regular.test1specificSelectName
summary: Returns entries from table test1 using a dedicated select statement
description:
STATEMENTBEGIN
select txt
select nr, txt
from test1
where nr = @nr
where txt = @txt
STATEMENTEND
INPUTMAPPINGBEGIN
nr = Nummer
INPUTMAPPINGEND
parameters:
- name: nr
- name: txt
in: path
required: true
schema:
type: integer
type: string
responses:
200:
description: Here are your test1 items
@ -86,3 +83,5 @@ components:
properties:
txt:
type: string
nr:
type: integer

View File

@ -21,7 +21,6 @@ namespace ${env['packagename']}.Implementations
#for $operation in $operations
#if $operation['paramInputTypes']
// $operation['func']
[DataContract]
public class ${operation['func']}InputType
{
@ -30,7 +29,7 @@ namespace ${env['packagename']}.Implementations
[Required]
#end if
[DataMember(Name="$inputType['name']")]
public int $inputType['csName'] { get; set; }
public $inputType['type'] $inputType['csName'] { get; set; }
#end for
}