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
  • #6423
Closed
Open
Issue created May 25, 2020 by Administrator@rootContributor4 of 5 checklist items completed4/5 checklist items

[BUG] typescript-axios doesn't export models when withSeparateModelsAndApi flag is true

Created by: benwiley4000

Bug Report Checklist

  • Have you provided a full/minimal spec to reproduce the issue?
  • [N/A] Have you validated the input using an OpenAPI validator (example)?
  • What's the version of OpenAPI Generator used? 5.0.0-SNAPSHOT
  • Have you search for related issues/PRs?
  • What's the actual output vs expected output?
  • [Optional] Bounty to sponsor the fix (example)
Description

I'm using the typescript-axios generator with the withSeparateModelsAndApi flag:

withSeparateModelsAndApi: true
apiPackage: 'api'
modelPackage: 'model'

Basically, when using this, the models aren't exported from the root package:

// index.d.ts
export * from "./api";
export * from "./configuration";

However both the API classes and models are correctly included with the default setup which uses a single file for everything. It would be desirable to export the models in all cases. The separate-file structure is much nicer for editors that are slow processing large files.

openapi-generator version

5.0.0-SNAPSHOT

OpenAPI declaration file content or url

See above

Command line used for generation
Steps to reproduce
Related issues/PRs
Suggest a fix

Just export the modelPackage directory as well, don't think it's super complicated.

ETA: Apologies for not editing the description when I first posted this.

ETA Again: withSeparateModelsAndApi: true - I accidentally included false before because that was the config I was debugging with. Sorry for being sloppy today!

Assignee
Assign to
Time tracking