Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
D
DAAExample
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Commits
Open sidebar
Miguel Ferreiro Díaz
DAAExample
Commits
06627278
Commit
06627278
authored
Mar 06, 2019
by
miferreiro
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix comments in PetsResource
Corrects comments where talk about people or users rather than pets.
parent
ff240d8d
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
8 deletions
+9
-8
PetsResource.java
src/main/java/es/uvigo/esei/daa/rest/PetsResource.java
+9
-8
No files found.
src/main/java/es/uvigo/esei/daa/rest/PetsResource.java
View file @
06627278
...
@@ -47,9 +47,9 @@ public class PetsResource {
...
@@ -47,9 +47,9 @@ public class PetsResource {
/**
/**
* Returns a person with the provided identifier.
* Returns a person with the provided identifier.
*
*
* @param id the identifier of the pe
rson
to retrieve.
* @param id the identifier of the pe
t
to retrieve.
* @return a 200 OK response with a pe
rson
that has the provided identifier.
* @return a 200 OK response with a pe
t
that has the provided identifier.
* If the identifier does not corresponds with any
user
, a 400 Bad Request
* If the identifier does not corresponds with any
pet
, a 400 Bad Request
* response with an error message will be returned. If an error happens
* response with an error message will be returned. If an error happens
* while retrieving the list, a 500 Internal Server Error response with an
* while retrieving the list, a 500 Internal Server Error response with an
* error message will be returned.
* error message will be returned.
...
@@ -64,7 +64,7 @@ public class PetsResource {
...
@@ -64,7 +64,7 @@ public class PetsResource {
return
Response
.
ok
(
pet
).
build
();
return
Response
.
ok
(
pet
).
build
();
}
catch
(
IllegalArgumentException
iae
)
{
}
catch
(
IllegalArgumentException
iae
)
{
LOG
.
log
(
Level
.
FINE
,
"Invalid pe
rson
id in get method"
,
iae
);
LOG
.
log
(
Level
.
FINE
,
"Invalid pe
t
id in get method"
,
iae
);
return
Response
.
status
(
Response
.
Status
.
BAD_REQUEST
)
return
Response
.
status
(
Response
.
Status
.
BAD_REQUEST
)
.
entity
(
iae
.
getMessage
())
.
entity
(
iae
.
getMessage
())
...
@@ -145,10 +145,11 @@ public class PetsResource {
...
@@ -145,10 +145,11 @@ public class PetsResource {
* Modifies the data of a pet.
* Modifies the data of a pet.
*
*
* @param id identifier of the person to modify.
* @param id identifier of the person to modify.
* @param name the new name of the person.
* @param name the new name of the pet.
* @param surname the new surname of the person.
* @param specie the new specie of the pet.
* @return a 200 OK response with a person that has been modified. If the
* @param idOwner the new idOwner of the pet.
* identifier does not corresponds with any user or the name or surname are
* @return a 200 OK response with a pet that has been modified. If the
* identifier does not corresponds with any pet or the name, specie and idOwner are
* not provided, a 400 Bad Request response with an error message will be
* not provided, a 400 Bad Request response with an error message will be
* returned. If an error happens while retrieving the list, a 500 Internal
* returned. If an error happens while retrieving the list, a 500 Internal
* Server Error response with an error message will be returned.
* Server Error response with an error message will be returned.
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment