Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add code generion for TS client-side #4

Open
TonEnfer opened this issue Dec 25, 2024 · 0 comments
Open

Add code generion for TS client-side #4

TonEnfer opened this issue Dec 25, 2024 · 0 comments
Labels
enhancement New feature or request

Comments

@TonEnfer
Copy link
Owner

TonEnfer commented Dec 25, 2024

Add a protobuf compiler plugin that generates client-side code for TS clients.

It is necessary to implement support for generating a "proxy" client, as well as models. The target protocols at this stage are Json and MessagePack.

In the case of generating models for json, it should be possible to specify an additional parameter on how the field names should be formatted, as well as whether to generate code that converts field names from PascalCase to CamelCase and back.
For example, it may look like this:

static fromDto(dto: any): Model
{
    let result = new Model();

    result.field1 = dto["Field1"];

    return result;
}

toDto(): any
{
    var result : any = {};

    result["Field1"] = this.field1;

    return result;
}
@TonEnfer TonEnfer changed the title Add code generion for JS client-side Add code generion for TS client-side Dec 25, 2024
@TonEnfer TonEnfer added the enhancement New feature or request label Dec 26, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant