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
  • #189
Closed
Open
Issue created May 31, 2018 by Administrator@rootContributor

Extra package prefix created for Typescript AngularJS

Created by: achew22

Description

When OpenAPI generated PetApi.ts at 0373b74a, the output correctly had the signature:

public addPet (pet: models.Pet, extraHttpRequestParams?: any ) : ng.IHttpPromise<{}> {

When the file was regenerated at 059a3efe, it now has the signature of

public addPet (pet: models.models.Pet, extraHttpRequestParams?: any ) : ng.IHttpPromise<{}> {

as you can see in PetApi.ts

openapi-generator version

https://oss.sonatype.org/content/repositories/snapshots/org/openapitools/openapi-generator-cli/3.0.0-SNAPSHOT/openapi-generator-cli-3.0.0-20180529.071922-102.jar

OpenAPI declaration file content or url

This is from the OpenAPI sample declaration.

Command line used for generation

The ones in the .pom file.

Steps to reproduce
  1. Build OpenAPI
  2. Build the samples
  3. Notice that the path is incorrect and that it doesn't compile through the TS compiler.
Related issues/PRs

I looked but didn't see one. If I'm incorrect, please feel free to close this issue.

Suggest a fix/enhancement

I think this could be found by doing a bisection from the two provided commits and then mvn build'ing them and grepping for \.models\.models which would find it.

Additionally you might consider adding a test that regenerates the sample files and does a diff against what is checked in failing if there is a diff. This would ensure that the checked in files reflect the new reality of the generated code. Additionally, this would give you a nice diff every time someone did something that changed the generated code. Just a thought.

PS: Congrats on your progress post fork 🎆 🍾. Things seem to really be coming along! I can't wait for a V3 release!

Assignee
Assign to
Time tracking