cds-typer icon indicating copy to clipboard operation
cds-typer copied to clipboard

Enable service names with non-alphanum characters

Open daogrady opened this issue 4 months ago • 0 comments

Allows "proper" naming of service containing non-alphanumeric names:

service "Foo/Bar" {}

would become

class __Foo_Bar {}  // not exported directly
export { __Foo_Bar as "Foo/Bar" }

and users would have to import like so:

import { "Foo_Bar" as FooBar } from ...
//                      ^ any alias

Note that this creates a discrepancy between service that don't contain special characters, as they are exported as default export, and ones that have names containing special characters, that are only exported in named style.

daogrady avatar Oct 08 '24 06:10 daogrady