question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

ReferenceModelSpecificationToPropertyConverter Error log when missing 200 return code

See original GitHub issue

Hi,

I have upgraded springfox from 2.9.2 to 3.0.0. I’m now using the Spring Boot starter for Springfox. I’ve got a non blocking error log when Swagger UI is loading;

2020-09-09 09:30:16.265 ERROR 42536 — [nio-9090-exec-6] nceModelSpecificationToPropertyConverter : Unable to find a model that matches key ModelKey{qualifiedModelName=ModelName {namespace='java.lang', name='Void'}
, viewDiscriminator=null, validationGroupDiscriminators=[], isResponse=true}

It happens when my PUT API just return a 204 HTTP code:

@ApiResponses(value = { 
        @ApiResponse(code = 204, message = "Resource updated") })

Temporary, I’ve patch my API by adding a code 200:

@ApiResponses(value = { 
        @ApiResponse(code = 200, message = "Fix springfox issue"),
        @ApiResponse(code = 204, message = "Resource updated") })

Could you please help me to qualify this issue?

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Reactions:6
  • Comments:10

github_iconTop GitHub Comments

1reaction
florian-fischer-swarmcommented, Oct 6, 2020

I have the same problem, however the workaround does not help for me. Something like:

`
@ApiResponses(value = { @ApiResponse(code = 204, message = “Expected response to a valid request”), @ApiResponse(code = 500, message = “unexpected error”, response = Error.class) }) @RequestMapping(value = “/path/{id}”, produces = { “application/json” }, method = RequestMethod.DELETE)

ResponseEntity<Void> method( UUID sometId); ` results in ERROR: Unable to find a model that matches key ModelKey{qualifiedModelName=ModelName{namespace=‘java.lang’, name=‘Void’}, viewDiscriminator=null, validationGroupDiscriminators=[], isResponse=true}

0reactions
stale[bot]commented, Jul 23, 2021

This issue has been automatically closed because it has not had recent activity. Please re-open a new issue if this is still an issue.

Read more comments on GitHub >

github_iconTop Results From Across the Web

ReferenceModelSpecificationTo...
ReferenceModelSpecificationToPropertyConverter Error log when missing 200 return code.
Read more >
HTTP response always return response code 200 even ...
"Returning always 200 is the right status code because the server responded and it is alive". This is incorrect. If it is, then...
Read more >
HTTP response status codes - MDN Web Docs - Mozilla
HTTP response status codes indicate whether a specific HTTP request has been successfully completed. Responses are grouped in five classes:
Read more >
A Complete Guide and List of HTTP Status Codes - Kinsta
A complete list of HTTP status codes with explaination of what they are, why they occur and what you can do to fix...
Read more >
Status codes in HTTP - W3C
The values of the numeric status code to HTTP requests are as follows. The data sections of messages Error, Forward and redirection responses...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found