Skip to content

Responses with custom HTTP statuses cannot be documented #639

Closed
@JeremieLapert

Description

@JeremieLapert

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions