-
Notifications
You must be signed in to change notification settings - Fork 736
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
Responses with custom HTTP statuses cannot be documented #639
Comments
Hi ,
Did u use the response entity and mention ur status ?
…On Thu, 12 Sep, 2019, 3:02 PM Jérémie Lapert, ***@***.***> wrote:
Hi, everybody !
I actually use the la version of spring-rest-docs 2.0.3.RELEASE.
I have created a custom HttpStatus code (215) in my WebService and when i
want to documentit , I have the following error :
`java.lang.IllegalArgumentException: No matching constant for [215]
at org.springframework.http.HttpStatus.valueOf(HttpStatus.java:532)
at org.springframework.restdocs.mockmvc.MockMvcResponseConverter.convert(MockMvcResponseConverter.java:40)
at org.springframework.restdocs.mockmvc.MockMvcResponseConverter.convert(MockMvcResponseConverter.java:35)
at org.springframework.restdocs.generate.RestDocumentationGenerator.handle(RestDocumentationGenerator.java:196)
at org.springframework.restdocs.mockmvc.RestDocumentationResultHandler.handle(RestDocumentationResultHandler.java:55)
at org.springframework.test.web.servlet.MockMvc.applyDefaultResultActions(MockMvc.java:223)
at org.springframework.test.web.servlet.MockMvc.perform(MockMvc.java:189)`
How to do ? Do you have an idea because I am a little lost.
Thanks,
Jérémie
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
<#639?email_source=notifications&email_token=ACBRNSRXQOVKYSJGFLTQBTDQJIEBJA5CNFSM4IWBPB22YY3PNVWWK3TUL52HS4DFUVEXG43VMWVGG33NNVSW45C7NFSM4HK54QRA>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/ACBRNSQLYHLA2D4HZEEBIHDQJIEBJANCNFSM4IWBPB2Q>
.
|
Hi, effectively i use a response entity. |
@JeremieLapert Unfortunately, custom HTTP statuses are not supported at the moment. |
The |
This fix for this isn't as invasive as I thought it might be so I'm comfortable with fixing it in 2.0.x. |
We can follow up and make an equivalent change for WebFlux once we know which versions of Framework will contain the necessary fix. |
@wilkinsona : Thank you very much for your quick help. |
Hi, everybody !
I actually use the la version of spring-rest-docs 2.0.3.RELEASE.
I have created a custom HttpStatus code (215) in my WebService and when i want to documentit , I have the following error :
`java.lang.IllegalArgumentException: No matching constant for [215]
How to do ? Do you have an idea because I am a little lost.
Thanks,
Jérémie
The text was updated successfully, but these errors were encountered: