-
Notifications
You must be signed in to change notification settings - Fork 237
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
Implement REST service layer generation technique which unfolds all arguments #792
Comments
@vojtechhabarta What do you think about it? Would it make sense to implement such a feature or do you see any problems if we relay on |
porunov
added a commit
to porunov/typescript-generator
that referenced
this issue
Feb 6, 2022
…rguments Fixes vojtechhabarta#792 Signed-off-by: Oleksandr Porunov <[email protected]>
porunov
added a commit
to porunov/typescript-generator
that referenced
this issue
Feb 6, 2022
…rguments Fixes vojtechhabarta#792 Signed-off-by: Oleksandr Porunov <[email protected]>
porunov
added a commit
to porunov/typescript-generator
that referenced
this issue
Feb 13, 2022
…rguments Fixes vojtechhabarta#792 Signed-off-by: Oleksandr Porunov <[email protected]>
porunov
added a commit
to porunov/typescript-generator
that referenced
this issue
Jun 7, 2022
…rguments Fixes vojtechhabarta#792 Signed-off-by: Oleksandr Porunov <[email protected]>
porunov
added a commit
to porunov/typescript-generator
that referenced
this issue
Jun 7, 2022
…rguments Fixes vojtechhabarta#792 Signed-off-by: Oleksandr Porunov <[email protected]>
porunov
added a commit
to porunov/typescript-generator
that referenced
this issue
Jun 7, 2022
…rguments Fixes vojtechhabarta#792 Signed-off-by: Oleksandr Porunov <[email protected]>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Right now this framework could generate controller methods such as:
This means that the method interface is a simple wrapper around http controller which doesn't provide any abstraction over http controller.
The user who uses such methods should be aware of where parameters should go (it is a request parameter? is it a path variable? is it an entity data?).
I would suggest adding a feature flag which provides a service abstraction layer instead of a simple HttpClient wrapper.
Maybe something like:
serviceLayerInsteadOfWrapperLayer: boolean
.I think (not sure yet), that we could relay on
null
value of an argument as an indicator for a value to not being provided to theHttpClient
.So, maybe, we could generate an implementation like the next one:
The text was updated successfully, but these errors were encountered: