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
  • #6942
Closed
Open
Issue created Jul 14, 2020 by Administrator@rootContributor

[REQ][typescript-redux-query] Allow client to set the base path to be prepended to endpoints in the generated query configs.

Created by: stgraham2000

Description

If you generate a client using the typescript-redux-query generator, there is no way to set the base path for the url in the generated query configs. This means you can't easily make your generated client communicate with your backend API if your client is hosted from a different domain. One option is to override the network interface but that seems wrong considering other generators allow you to update the configuration and set the BASE_PATH.

openapi-generator version

Version: 5.0.0 My working version: commit cef1bec4

Suggest a fix/enhancement

My suggested fix is to create a Configuration object in the runtime.mustache that defaults a variable called basePath to an empty string. My decision for using an empty string is to keep this change backwards compatible. We then update apis.mustache prepend the runtime.Configuration.basePath to the existing value being used for the url in the query config. The below is a diff off of the commit cef1bec4666e7841c39a37eec97b2e81c96ad9f0.

Assignee
Assign to
Time tracking