Skip to content

Commit

Permalink
Use plural resources in path where applicable
Browse files Browse the repository at this point in the history
It's common to use a plural name (typically followed by an id) for a path segment that refers to a collection, and a singular name for a specific resource.
For example:
```
            id
             v
/users/steve/profilePhoto
 ^                    ^
plural             singular
```
  • Loading branch information
nrktkt committed Feb 23, 2021
1 parent 75e709e commit c308a9e
Showing 1 changed file with 9 additions and 9 deletions.
18 changes: 9 additions & 9 deletions src/main/resources/openapi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ tags:
description: Find out more about our store
url: 'http://swagger.io'
paths:
/pet:
/pets:
post:
tags:
- pet
Expand Down Expand Up @@ -108,7 +108,7 @@ paths:
application/x-www-form-urlencoded:
schema:
$ref: '#/components/schemas/Pet'
/pet/findByStatus:
/pets/findByStatus:
get:
tags:
- pet
Expand Down Expand Up @@ -148,7 +148,7 @@ paths:
- petstore_auth:
- 'write:pets'
- 'read:pets'
/pet/findByTags:
/pets/findByTags:
get:
tags:
- pet
Expand Down Expand Up @@ -187,7 +187,7 @@ paths:
- petstore_auth:
- 'write:pets'
- 'read:pets'
'/pet/{petId}':
'/pets/{petId}':
get:
tags:
- pet
Expand Down Expand Up @@ -279,7 +279,7 @@ paths:
- petstore_auth:
- 'write:pets'
- 'read:pets'
'/pet/{petId}/uploadImage':
'/pets/{petId}/uploadImage':
post:
tags:
- pet
Expand Down Expand Up @@ -365,7 +365,7 @@ paths:
application/x-www-form-urlencoded:
schema:
$ref: '#/components/schemas/Order'
'/store/order/{orderId}':
'/store/orders/{orderId}':
get:
tags:
- store
Expand Down Expand Up @@ -419,7 +419,7 @@ paths:
description: Invalid ID supplied
'404':
description: Order not found
/user:
/users:
post:
tags:
- user
Expand Down Expand Up @@ -448,7 +448,7 @@ paths:
schema:
$ref: '#/components/schemas/User'
description: Created user object
/user/createWithList:
/users/createWithList:
post:
tags:
- user
Expand Down Expand Up @@ -529,7 +529,7 @@ paths:
responses:
default:
description: successful operation
'/user/{username}':
'/users/{username}':
get:
tags:
- user
Expand Down

0 comments on commit c308a9e

Please sign in to comment.