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

Slashes in entity field names break the generation #32

Closed
ramondebeijer opened this issue Jun 15, 2022 · 4 comments
Closed

Slashes in entity field names break the generation #32

ramondebeijer opened this issue Jun 15, 2022 · 4 comments
Assignees
Labels
bug Something isn't working

Comments

@ramondebeijer
Copy link

Hi @mrbandler,

We have some entities generated from SAP tables that contain slashes in the name (I know why on earth....),
so for example:

entity Test { ![FIELD1] : String(10); ![/PART1/PART2] : String(23); };

This is currently breaking the cds2types, is there a way to fix this

kind regards
Ramon

@HeneryHawk
Copy link
Collaborator

HeneryHawk commented Jun 15, 2022

Hi @ramondebeijer

i just released beta version 2.7.4-beta.0 which should solve the problem. Can you please test this and give feedback if this solves the problem? If so, I'll release version 2.7.4.

CDS definition

entity EntityWithSlashes {
    field1: String(10);
    ![/part1/part2]: String(23);
}

results in

export interface IEntityWithSlashes {
    field1: string;
    "/part1/part2": string;
}

Resolved in commit: c9c61c0

Regards
Simon

@HeneryHawk HeneryHawk added the bug Something isn't working label Jun 15, 2022
@ramondebeijer
Copy link
Author

ramondebeijer commented Jun 15, 2022

wow. this is mega fast thanks @HeneryHawk , I can confirm that it works!!!

@HeneryHawk HeneryHawk self-assigned this Jun 15, 2022
@HeneryHawk
Copy link
Collaborator

Hi @ramondebeijer

i just released version 2.7.4.

Regards
Simon

@ramondebeijer
Copy link
Author

thanks!!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants