Skip to content
This repository was archived by the owner on Mar 18, 2026. It is now read-only.
This repository was archived by the owner on Mar 18, 2026. It is now read-only.

Override type generation #12

Description

@Psvensso

When sending data from a backend service to the client the data is in many cases converted to JSON. Complex data types such as DateTime is serialized into strings.

Therefor it would be a much needed feature to be able to override the output type in the generator, so that in this example the DateTime becomes strings. Otherwise the TS interfaces would need a concrete class implementation to be useful (someone that creates a new Date() from the JSON).

One way to solve this, and this is indeed how we solves it now in my project, is to simple let the date times be strings on the C# end as well and then we parse them manually. But this could be done all by magic by the JSON serializer.

Suggestion:
Imlement a overide feature that take From>To type by config that is valid for all types in folder.
Or a To type in a data annotation.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

enhancementNew feature or requesthelp wantedExtra attention is needed

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions