Skip to content

It would be convenient if 'date-time' formatted Strings would be typed as JS Dates #209

Description

@Henning3110

Example: If I want to terminate a Contract, I can schedule the Termination for a specific date. Consider following code:

    client.contract.terminateContract({
        contractId: "some-id",
        data: {
            terminationTargetDate: "10/12/2024",
        }
    })

This example will fail because the terminationTargetDate is not following the ISO 8601, which is used for OpenAPI.

    client.contract.terminateContract({
        contractId: "some-id",
        data: {
            terminationTargetDate: new Date(),
        }
    })

This code is much more convenient for the user. The client could be converting JS Dates to date-time Strings in the background before sending the request.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions