-
Notifications
You must be signed in to change notification settings - Fork 25
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
Change the return type of CatalogObjectController methods #99
Conversation
262afe0
to
522779b
Compare
…fix issues with the swagger model
522779b
to
5bb6ec9
Compare
@@ -242,7 +240,7 @@ public CatalogObjectMetadataList create( | |||
} catch (IOException ioe) { | |||
throw new RuntimeException(ioe); | |||
} | |||
return ResponseEntity.status(status).build(); | |||
return new ResponseEntity<>(status); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I prefer to use the builder .... ResponseEntity.status(status).build();
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ResponseEntity.status(status).build(); return a Response which doesn't compile due to the return Response<List>
@@ -302,7 +300,7 @@ public CatalogObjectMetadataList create( | |||
commitTimeRaw); | |||
return ResponseEntity.ok(catalogObjectMetadata); | |||
} catch (RevisionNotFoundException e) { | |||
return ResponseEntity.notFound().build(); | |||
return new ResponseEntity(HttpStatus.NOT_FOUND); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
better with the builder no?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
same as upper response
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Works locally, pass unit tests and integration tests.
Change the return type of CatalogObjectController method in order to fix issues with the swagger model. It fix issues that prevent the generation of a usable catalog client.
It solves the swagger model issue "Not a valid ...File definition"