You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
We want to generate two types, one is snake_case_key and another is camelCaseKey because our React app wants camelCaseKey for internal use, but also Rails API outputs snake_case_key.
Currently we transform types with TypeScript, but it is difficult to understand, so it's better to let Typelizer do that.
Details
Currently we can modify keys with something like config.properties_transformer = ->(properties) { properties.map{ _1.name = _1.name.to_s.camelize and _1 } } but this makes all keys camelCase. Basically we want to do generation twice.
We have Generator class and Writer class. Should we have multiple generators, or writers?
Additional info
It's more like a discussion rather than an issue. I'd love to implement this feature if we reach some conclusion.
The text was updated successfully, but these errors were encountered:
Hey @okuramasafumi, thanks for the feature request! Yes, I think multiple outputs make sense for generating input/output types with different configurations. null_strategy might be another option one might want to modify. I can't comment on implementation details right away, but I like the idea.
Motivation
We want to generate two types, one is
snake_case_key
and another iscamelCaseKey
because our React app wantscamelCaseKey
for internal use, but also Rails API outputssnake_case_key
.Currently we transform types with TypeScript, but it is difficult to understand, so it's better to let Typelizer do that.
Details
Currently we can modify keys with something like
config.properties_transformer = ->(properties) { properties.map{ _1.name = _1.name.to_s.camelize and _1 } }
but this makes all keys camelCase. Basically we want to do generation twice.We have
Generator
class andWriter
class. Should we have multiple generators, or writers?Additional info
It's more like a discussion rather than an issue. I'd love to implement this feature if we reach some conclusion.
The text was updated successfully, but these errors were encountered: