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
  • #14707
Closed
Open
Issue created Feb 15, 2023 by Administrator@rootContributor

[REQ] [dart-dio] Support for case insensitive parameter substitution in paths

Created by: andreasmpet

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

Sometimes, the spec I get from the backend team has inconsistencies in naming, where a parameter in the path has different casing than in the parameter definition.

Describe the solution you'd like

An --additional-properties caseInsensitiveParameters=true flag allowing me to have case insensitive replacement of parameters in url paths.

Which would spit out something like this: final _path = r'/api/v1/Employees/{CompanyId}/Transfer/{InvoiceGroupId}'.replaceAll(RegExp('{' r'companyId' '}', caseSensitive: false), companyId.toString()).replaceAll(RegExp('{' r'invoiceGroupId' '}', caseSensitive: false), invoiceGroupId.toString());

Instead of this (current output):

final _path = r'/api/v1/Employees/{CompanyId}/Transfer/{InvoiceGroupId}'.replaceAll('{' r'companyId' '}', companyId.toString()).replaceAll('{' r'invoiceGroupId' '}', invoiceGroupId.toString());

Describe alternatives you've considered

Asking the backend team to be perfect and never do naming mistakes. Alas, it's not possible to safeguard for all future mistakes.

I realise that there are other risks involved when disregarding casing, like two parameters ending up being named the same , but I think the risk of that is far lower than someone getting the casing wrong.

Assignee
Assign to
Time tracking