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

Make ProblemContext fields public #311

Merged
merged 3 commits into from
Oct 27, 2023

Conversation

chberger
Copy link
Contributor

This PR fixes #301. Without public access to ProblemContext data it's almost useless to implement custom ProblemPostProcessors. In addition, this PR did some reordering of modifiers as at a first glance it looked like the register and rest methods of PostProcessorsRegistry would also not be public.

@lwitkowski
Copy link
Collaborator

@chberger thank you, I really appreciate your contribution. Before I merge this, let me think about how those processors are registered - I never planned to make it possible to implement custom processors, so ExceptionMapperBase.postProcessorsRegistry.register was kind of okey-ish as internal mechanism, but not very elegant for application developers to interact with.

I'll try to make it work with CDI, so that you can simply create a processor, annotate it with @ApplicationScoped and it would be picked up by the extension automagically.

@chberger
Copy link
Contributor Author

@lwitkowski This sounds great! It's exactly what we're looking for (see #301 (comment)). Please let me know if you need help, because we would need the possibility of custom post-processors urgently.

@lwitkowski
Copy link
Collaborator

@chberger Please address one small comment, then I'll merge it.

I have a working prototype with CDI, nevertheless I will do it in a separate PR with code changes and documentation on how to use it and will ask you for a review. WDYT?

@chberger
Copy link
Contributor Author

@lwitkowski Sure, I'd love to do a review - thank you!

@lwitkowski lwitkowski changed the title Implement getters for ProblemContext Make ProblemContext fields public Oct 27, 2023
@lwitkowski lwitkowski merged commit 1566e89 into quarkiverse:master Oct 27, 2023
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Improve dev experience of creating custom ProblemPostProcessor
2 participants