Skip to content
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

Extend REST API by endpoint to get a specific function definition #1149

Merged
merged 2 commits into from Jan 25, 2023

Conversation

bossenti
Copy link
Contributor

Purpose

Extend the REST API by the endpoint /v2/functions/<functionId> that returns the definition of the given function.

Remarks

PR introduces (a) breaking change(s): no

PR introduces (a) deprecation(s): no

@bossenti bossenti added enhancement New feature or request java Pull requests that update Java code backend Everything that is related to the StreamPipes backend labels Jan 23, 2023
@bossenti bossenti added this to the 1.0.0 milestone Jan 23, 2023
Copy link
Contributor

@tenthe tenthe left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The PR looks good.
I will take a look at the e2e tests as they seem to fail on all PRs.

@bossenti
Copy link
Contributor Author

What would happen if I query by an unknown id? Would this result in an internal exception or does the framework catch the exception and return a proper API response?

@tenthe
Copy link
Contributor

tenthe commented Jan 24, 2023

That is a good point. How could we test it properly?
I guess the best way would be to mock FunctionRegistrationService.INSTANCE but since it is an enum I am not sure if it is easily possible. One option would be to change the implementation and inject an instance of FunctionRegistrationService into the FunctionsResource, then it would be easier to mock and test the REST interface.

@bossenti bossenti merged commit ede2fff into dev Jan 25, 2023
@tenthe tenthe deleted the feature/add-function-get-endpoint branch January 27, 2023 05:39
@bossenti bossenti modified the milestones: 1.0.0, 0.91.0 Jan 30, 2023
@bossenti bossenti self-assigned this Feb 19, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backend Everything that is related to the StreamPipes backend enhancement New feature or request java Pull requests that update Java code
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants