Skip to content
GitLab
Projects Groups Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in / Register
  • O openapi-generator
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 3,476
    • Issues 3,476
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 402
    • Merge requests 402
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Packages and registries
    • Packages and registries
    • Package Registry
    • Infrastructure Registry
  • Monitor
    • Monitor
    • Incidents
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Repository
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • OpenAPI Tools
  • openapi-generator
  • Issues
  • #193
Closed
Open
Issue created Jun 01, 2018 by Administrator@rootContributor

[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,

Assignee
Assign to
Time tracking