add camelcase option to schema type generation #215
Closed
+112
−20
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This pr is regarding the implementation of the feature request in this issue: #213
This pr adds the following features:
useCamelCasedProps
The new config param
useCamelCasedProps
has the following effect on the schema:This pr is still in DRAFT because:
With the current state of this pr the fetchers will fail to get parse the received json correctly, as the received data will be in
snake_case
and the types to cast to would be incamelCase
. A solution to make this work, would be a configurable adjustment to the fetcher template (./plugins/typescript/src/core/templates/fetcher.ts
) that appliescamelCase
to incoming request data and that appliessnake_case
to outgoing data. (exact implementation is still to be figured out)@fabien0102 Please let me know whether you would be interested in having this feature added, and if so i can try to spend the additional time needed to make this work. Any tips/comments/improvements are very welcome!