Skip to content

Commit

Permalink
Minor fixes.
Browse files Browse the repository at this point in the history
  • Loading branch information
jamesbognar committed Sep 13, 2019
1 parent 748b970 commit 2c41f6b
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 31 deletions.
3 changes: 2 additions & 1 deletion juneau-petstore-server/.gitignore
Expand Up @@ -3,4 +3,5 @@
.classpath
.project
/.settings/
/bin/
/bin/
/derby.log
Expand Up @@ -174,13 +174,13 @@ public ResourceDescriptions getTopPage() {
swagger=@MethodSwagger(
tags="pet",
parameters={
Queryable.SWAGGER_PARAMS
Queryable.SWAGGER_PARAMS // Documents searching.
}
),
converters={Queryable.class}
converters={Queryable.class} // Searching support.
)
@BeanConfig(
bpx="Pet: tags,photo"
bpx="Pet: tags,photo" // In this view, don't serialize tags/photos properties.
)
public Collection<Pet> getPets() throws NotAcceptable {
return store.getPets();
Expand All @@ -193,10 +193,7 @@ public Collection<Pet> getPets() throws NotAcceptable {
summary="Find pet by ID",
description="Returns a single pet",
swagger=@MethodSwagger(
tags="pet",
value={
"security:[ { api_key:[] } ]"
}
tags="pet"
)
)
public Pet getPet(long petId) throws IdNotFound, NotAcceptable {
Expand All @@ -209,11 +206,9 @@ public Pet getPet(long petId) throws IdNotFound, NotAcceptable {
path="/pet",
summary="Add a new pet to the store",
swagger=@MethodSwagger(
tags="pet",
value={
"security:[ { petstore_auth:['write:pets','read:pets'] } ]"
}
tags="pet"
)
//roleGuard="ROLE_ADMIN || (ROLE_USER && ROLE_WRITABLE)" // Restrict access to this method.
)
public long createPet(CreatePet pet) throws IdConflict, NotAcceptable, UnsupportedMediaType {
return store.create(pet).getId();
Expand All @@ -225,10 +220,7 @@ public long createPet(CreatePet pet) throws IdConflict, NotAcceptable, Unsupport
path="/pet/{petId}",
summary="Update an existing pet",
swagger=@MethodSwagger(
tags="pet",
value={
"security:[ { petstore_auth: ['write:pets','read:pets'] } ]"
}
tags="pet"
)
)
public Ok updatePet(UpdatePet pet) throws IdNotFound, NotAcceptable, UnsupportedMediaType {
Expand All @@ -243,10 +235,7 @@ public Ok updatePet(UpdatePet pet) throws IdNotFound, NotAcceptable, Unsupported
summary="Finds Pets by status",
description="Multiple status values can be provided with comma separated strings.",
swagger=@MethodSwagger(
tags="pet",
value={
"security:[{petstore_auth:['write:pets','read:pets']}]"
}
tags="pet"
)
)
public Collection<Pet> findPetsByStatus(PetStatus[] status) throws NotAcceptable {
Expand All @@ -260,10 +249,7 @@ public Collection<Pet> findPetsByStatus(PetStatus[] status) throws NotAcceptable
summary="Finds Pets by tags",
description="Multiple tags can be provided with comma separated strings. Use tag1, tag2, tag3 for testing.",
swagger=@MethodSwagger(
tags="pet",
value={
"security:[ { petstore_auth:[ 'write:pets','read:pets' ] } ]"
}
tags="pet"
)
)
@Deprecated
Expand All @@ -277,10 +263,7 @@ public Collection<Pet> findPetsByTags(String[] tags) throws InvalidTag, NotAccep
path="/pet/{petId}",
summary="Deletes a pet",
swagger=@MethodSwagger(
tags="pet",
value={
"security:[ { petstore_auth:[ 'write:pets','read:pets' ] } ]"
}
tags="pet"
)
)
public Ok deletePet(String apiKey, long petId) throws IdNotFound, NotAcceptable {
Expand Down Expand Up @@ -396,9 +379,6 @@ public Ok deleteOrder(long orderId) throws InvalidId, IdNotFound, NotAcceptable
tags="store",
responses={
"200:{ 'x-example':{AVAILABLE:123} }",
},
value={
"security:[ { api_key:[] } ]"
}
)
)
Expand Down

0 comments on commit 2c41f6b

Please sign in to comment.