mrdannael / genum-openapi

Generate Typescript enums from the openapi schema
MIT License
3 stars 2 forks source link

Normalize spaces and brackets #1

Closed Altusvdm closed 8 months ago

Altusvdm commented 8 months ago

It would be great if the normalize function also handled spaces and round brackets.

I'd be happy to submit an MR that does this, however it's as simple as changing the replacers too:

const replacers: Replacer[] = [
  { regExp: /[-/ ()]/g, replaceWith: "_" },
  { regExp: /[.]/g, replaceWith: "__" },
];
mrdannael commented 8 months ago

Thanks for submitting an issue. This feature should be now available in version 0.5.0 :smiley: