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
  • #14503
Closed
Open
Issue created Jan 21, 2023 by Administrator@rootContributor

[REQ][python-nextgen] datetime serialization format override

Created by: tnielens

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

The backend I'm requesting only supports a subset of the iso datetime format for query parameters. 2023-01-01T00:00:00.000Z is parsed correctly, but alternatives like 2023-01-01 00:00:00.000+00:00 or 2023-01-01T00:00:00+00:00 fail.

With the former python generators, api functions support both datetime and str arguments for datetime parameters. The default datetime serialization format of the generated api code it overridable by passing the str in the correct format. The python-nextgen generator annotates api call methods with @validate_arguments. This turns str inputs into datetimes which results in the default serialization format of the generated api to be used.

Describe the solution you'd like

Support datetime and date format overrides at different levels: api_client/specific api/api call.

Describe alternatives you've considered

Removing the @validate_arguments and passing strs arguments works. But I'd prefer not modify the generated code.

Additional context

I'd like to move from the python-prior codegen to the new python-nextgen.

Assignee
Assign to
Time tracking