org.springframework.restdocs.payload.PayloadHandlingException: com.fasterxml.jackson.databind.JsonMappingException: No content to map due to end-of-input at [Source: [B@4a50d04a; line: 1, column: 0]

GitHub | fwilhe | 9 months ago
tip
Click on the to mark the solution that helps you, Samebug will learn from it.
As a community member, you’ll be rewarded for you help.
  1. 0

    Poor diagnostics when attempting to document the fields of a request or response with an empty body

    GitHub | 9 months ago | fwilhe
    org.springframework.restdocs.payload.PayloadHandlingException: com.fasterxml.jackson.databind.JsonMappingException: No content to map due to end-of-input at [Source: [B@4a50d04a; line: 1, column: 0]

    Root Cause Analysis

    1. org.springframework.restdocs.payload.PayloadHandlingException

      com.fasterxml.jackson.databind.JsonMappingException: No content to map due to end-of-input at [Source: [B@4a50d04a; line: 1, column: 0]

      at org.springframework.restdocs.payload.JsonContentHandler.readContent()
    2. org.springframework.restdocs
      AbstractFieldsSnippet.createModel
      1. org.springframework.restdocs.payload.JsonContentHandler.readContent(JsonContentHandler.java:84)
      2. org.springframework.restdocs.payload.JsonContentHandler.findMissingFields(JsonContentHandler.java:49)
      3. org.springframework.restdocs.payload.AbstractFieldsSnippet.validateFieldDocumentation(AbstractFieldsSnippet.java:112)
      4. org.springframework.restdocs.payload.AbstractFieldsSnippet.createModel(AbstractFieldsSnippet.java:73)
      4 frames