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
  • #11112
Closed
Open
Issue created Dec 13, 2021 by Administrator@rootContributor

[REQ] [typescript-fetch] useSingleRequestParameter should mark parameter optional if all properties are optional

Created by: davidgamero

Is your feature request related to a problem? Please describe.

when useSingleRequestParameter has all optional parameters, an empty object still has to be passed producing myApiCall({})

Describe the solution you'd like

Functions with all optional parameters should include a default empty object parameter to make it optional instead of myApiCall({})

When the default is in place, we can instead use myApiCall()

See #6477 and related #6440 (closed)

Describe alternatives you've considered

Instead of making the parameter object itself optional, we can use the solution employed in the referenced PR to default which will effectively make it optional too

Additional context

Assignee
Assign to
Time tracking