[Ada] Wrong packages in Ada client
Created by: michelealbano
Description
When creating the *-clients.ads and *.clients.adb files, the parameters of methods are of type: Packagename.Models.Packagename.Models.Typename_Type instead of: Packagename.Models.Typename_Type
openapi-generator version
Master (3.0.0)
OpenAPI declaration file content or url
openapi: 3.0.0
info:
title: problem
servers:
- url: 'https://127.0.0.1:register'
paths:
/remove:
put:
description: Removes services
operationId: remove
requestBody:
content:
'application/x-www-form-urlencoded':
schema:
$ref: '#/components/schemas/serviceRegistryEntryType'
responses:
200:
description: Description of the service instance(s) that were removed
content:
application/json:
schema:
$ref: '#/components/schemas/serviceRegistryEntryType'
204:
description: No content
default:
description: Unexpected error
components:
schemas:
serviceRegistryEntryType:
type: object
properties:
provider:
$ref: '#/components/schemas/arrowheadSystemType'
isUDP:
type: boolean
arrowheadSystemType:
type: object
properties:
systemName:
type: string
Command line used for generation
java -jar modules/openapi-generator-cli/target/openapi-generator-cli.jar generate -o ../ada-openapi/ --model-package Arrowhead2 --additional-properties projectName=Arrowhead1 -i ../AHproblem.yml -g ada
Steps to reproduce
mvn package process the YAML file
Related issues/PRs
N/A
Suggest a fix/enhancement
Either change the following line in client-spec.mustache. ''' {{paramName}} : in {{^isFile}}{{^isString}}{{^isPrimitiveType}}{{^isContainer}}{{package}}.Models.{{/isContainer}}{{/isPrimitiveType}}{{/isString}}{{/isFile}}{{dataType}}{{#hasMore}};{{/hasMore}}{{/allParams}}{{#returnType}}; ''' into ''' {{paramName}} : in {{^isFile}}{{^isString}}{{^isPrimitiveType}}{{^isContainer}}{{/isContainer}}{{/isPrimitiveType}}{{/isString}}{{/isFile}}{{dataType}}{{#hasMore}};{{/hasMore}}{{/allParams}}{{#returnType}}; '''
or change what's inside '''{{dataType]]'''.
Do something similar with file client-body.mustache,