Skip to content

Commit 07e5980

Browse files
committed
Use plural resources in path where applicable
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 ```
1 parent 75e709e commit 07e5980

File tree

1 file changed

+9
-9
lines changed

1 file changed

+9
-9
lines changed

src/main/resources/openapi.yaml

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ tags:
3333
description: Find out more about our store
3434
url: 'http://swagger.io'
3535
paths:
36-
/pet:
36+
/pets:
3737
post:
3838
tags:
3939
- pet
@@ -108,7 +108,7 @@ paths:
108108
application/x-www-form-urlencoded:
109109
schema:
110110
$ref: '#/components/schemas/Pet'
111-
/pet/findByStatus:
111+
/pets/findByStatus:
112112
get:
113113
tags:
114114
- pet
@@ -148,7 +148,7 @@ paths:
148148
- petstore_auth:
149149
- 'write:pets'
150150
- 'read:pets'
151-
/pet/findByTags:
151+
/pets/findByTags:
152152
get:
153153
tags:
154154
- pet
@@ -187,7 +187,7 @@ paths:
187187
- petstore_auth:
188188
- 'write:pets'
189189
- 'read:pets'
190-
'/pet/{petId}':
190+
'/pets/{petId}':
191191
get:
192192
tags:
193193
- pet
@@ -279,7 +279,7 @@ paths:
279279
- petstore_auth:
280280
- 'write:pets'
281281
- 'read:pets'
282-
'/pet/{petId}/uploadImage':
282+
'/pets/{petId}/uploadImage':
283283
post:
284284
tags:
285285
- pet
@@ -365,7 +365,7 @@ paths:
365365
application/x-www-form-urlencoded:
366366
schema:
367367
$ref: '#/components/schemas/Order'
368-
'/store/order/{orderId}':
368+
'/store/orders/{orderId}':
369369
get:
370370
tags:
371371
- store
@@ -419,7 +419,7 @@ paths:
419419
description: Invalid ID supplied
420420
'404':
421421
description: Order not found
422-
/user:
422+
/users:
423423
post:
424424
tags:
425425
- user
@@ -448,7 +448,7 @@ paths:
448448
schema:
449449
$ref: '#/components/schemas/User'
450450
description: Created user object
451-
/user/createWithList:
451+
/users/createWithList:
452452
post:
453453
tags:
454454
- user
@@ -529,7 +529,7 @@ paths:
529529
responses:
530530
default:
531531
description: successful operation
532-
'/user/{username}':
532+
'/users/{username}':
533533
get:
534534
tags:
535535
- user

0 commit comments

Comments
 (0)