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

Exception documenting RestControllerEndpoint with PostMapping #1761

Closed
p120ph37 opened this issue Jul 26, 2022 · 1 comment
Closed

Exception documenting RestControllerEndpoint with PostMapping #1761

p120ph37 opened this issue Jul 26, 2022 · 1 comment
Labels
bug Something isn't working

Comments

@p120ph37
Copy link

When a @RestControllerEndpoint bean defines a @PostMapping method and springdoc-openapi tries to introspect it, the following exception is thrown:

java.lang.NullPointerException: Cannot invoke "java.lang.reflect.Field.get(Object)" because "operationFiled" is null
        at org.springdoc.core.customizers.ActuatorOperationCustomizer.customize(ActuatorOperationCustomizer.java:84) ~[springdoc-openapi-common-1.6.9.jar:1.6.9]

This is the line in question: v1.6.9 ActuatorOperationCustomizer.java L84

This seems to have been introduced in this commit: 6ce3b5a

The issue is present in version 1.6.7 and later. Reverting to version 1.6.6 fixes it for me.

@bnasslahsen bnasslahsen added the bug Something isn't working label Jul 31, 2022
bnasslahsen pushed a commit that referenced this issue Jul 31, 2022
@bnasslahsen
Copy link
Contributor

@p120ph37,

I have added a fix, just from coding perspective;
But was not able to reproduce your error. I are able to propose a PR, with the related test case, it would be great.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants