Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -147,7 +147,6 @@ public static Payment buildPayment(){
paymentSource.setAddress(buildAddress());

payment.setSource(paymentSource);

return payment;
}

Expand Down
70 changes: 31 additions & 39 deletions src/main/resources/petstore.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ paths:
$ref: '#/components/responses/ForbiddenErrorResponse'
'404':
$ref: '#/components/responses/DogNotFoundErrorResponse'
'412':
'422':
$ref: '#/components/responses/DogPreconditionFailedErrorResponse'
/cats:
post:
Expand Down Expand Up @@ -151,7 +151,7 @@ paths:
$ref: '#/components/responses/ForbiddenErrorResponse'
'404':
$ref: '#/components/responses/CatNotFoundErrorResponse'
'412':
'422':
$ref: '#/components/responses/CatPreconditionFailedErrorResponse'
'/pets/{pet_id}/status':
put:
Expand All @@ -174,7 +174,7 @@ paths:
$ref: '#/components/responses/UnauthorizedErrorResponse'
'403':
$ref: '#/components/responses/ForbiddenErrorResponse'
'412':
'422':
$ref: '#/components/responses/PetPreconditionFailedErrorResponse'
/pets:
get:
Expand Down Expand Up @@ -241,7 +241,7 @@ paths:
$ref: '#/components/responses/ForbiddenErrorResponse'
'404':
$ref: '#/components/responses/PetNotFoundErrorResponse'
'409':
'422':
$ref: '#/components/responses/AdoptionConflictErrorResponse'
get:
tags:
Expand Down Expand Up @@ -331,10 +331,8 @@ paths:
$ref: '#/components/responses/ForbiddenErrorResponse'
'404':
$ref: '#/components/responses/AdoptionNotFoundErrorResponse'
'409':
$ref: '#/components/responses/AdoptionConflictModifyErrorResponse'
'412':
$ref: '#/components/responses/AdoptionPreconditionFailedErrorResponse'
'422':
$ref: '#/components/responses/AdoptionModifyErrorResponse'
delete:
tags:
- Adoptions
Expand Down Expand Up @@ -436,7 +434,7 @@ paths:
$ref: '#/components/responses/ForbiddenErrorResponse'
'404':
$ref: '#/components/responses/EmployeeNotFoundErrorResponse'
'412':
'422':
$ref: '#/components/responses/EmployeePreconditionFailedErrorResponse'
delete:
tags:
Expand Down Expand Up @@ -1596,7 +1594,7 @@ components:
examples:
ConflictExample:
$ref: '#/components/examples/AdoptionConflictExample'
AdoptionConflictModifyErrorResponse:
AdoptionModifyErrorResponse:
description: The resource seems to exist already.
content:
application/json:
Expand All @@ -1605,6 +1603,8 @@ components:
examples:
ConflictExample:
$ref: '#/components/examples/AdoptionConflictModifyExample'
PreconditionFailedExample:
$ref: '#/components/examples/AdoptionPreconditionExample'
DogPreconditionFailedErrorResponse:
description: The target resource has been modified.
content:
Expand Down Expand Up @@ -1632,15 +1632,6 @@ components:
examples:
PreconditionExample:
$ref: '#/components/examples/PetPreconditionExample'
AdoptionPreconditionFailedErrorResponse:
description: The target resource has been modified.
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorWrapper'
examples:
PreconditionExample:
$ref: '#/components/examples/AdoptionPreconditionExample'
EmployeePreconditionFailedErrorResponse:
description: The target resource has been modified.
content:
Expand Down Expand Up @@ -1754,17 +1745,18 @@ components:
Errors:
Error:
- Source: PETSTORE_API
ReasonCode: CONFLICT
Description: This pet has already been adopted.
ReasonCode: Unprocessable Entity
Description: Resource already exists.
Recoverable: false
Details: This adoption information already exists.
Details: This pet has already been adopted.
AdoptionConflictModifyExample:
value:
Errors:
Error:
- Source: PETSTORE_API
ReasonCode: CONFLICT
Description: >-
ReasonCode: Unprocessable Entity
Description: Resource already exists.
Details: >-
You cannot modify the pet in an existing adoption record.
To adopt another pet use POST /adoptions.
To rectify an incorrectly entered pet identifier, use DELETE /adoptions/{adoptions_id} for this adoption record,
Expand All @@ -1774,46 +1766,46 @@ components:
Errors:
Error:
- Source: PETSTORE_API
ReasonCode: PRECONDITION_FAILED
Description: The target resource has already been modified.
ReasonCode: Unprocessable Entity
Description: The target resource has been modified.
Recoverable: false
Details: This Dog resource has already been modified.
Details: This Dog resource has been modified.
CatPreconditionExample:
value:
Errors:
Error:
- Source: PETSTORE_API
ReasonCode: PRECONDITION_FAILED
Description: The target resource has already been modified.
ReasonCode: Unprocessable Entity
Description: The target resource has been modified.
Recoverable: false
Details: This Cat resource has already been modified.
Details: This Cat resource has been modified.
PetPreconditionExample:
value:
Errors:
Error:
- Source: PETSTORE_API
ReasonCode: PRECONDITION_FAILED
Description: The target resource has already been modified.
ReasonCode: Unprocessable Entity
Description: The target resource has been modified.
Recoverable: false
Details: This Pet resource has already been modified.
Details: This Pet resource has been modified.
AdoptionPreconditionExample:
value:
Errors:
Error:
- Source: PETSTORE_API
ReasonCode: PRECONDITION_FAILED
Description: The target resource has already been modified.
ReasonCode: Unprocessable Entity
Description: The target resource has been modified.
Recoverable: false
Details: This Adoption resource has already been modified.
Details: This Adoption record has been modified.
EmployeePreconditionExample:
value:
Errors:
Error:
- Source: PETSTORE_API
ReasonCode: PRECONDITION_FAILED
ReasonCode: Unprocessable Entity
Description: The target resource has been modified.
Recoverable: false
Details: This Employee has already been modified.
Details: This Employee has been modified.
AddBellaExample:
description: Bella is a dog ready to be adopted.
value:
Expand Down Expand Up @@ -2149,4 +2141,4 @@ components:
firstName: Hayden
lastName: Smith
phoneNumber: '+7509287096053'
ssn: '987-45-1234'
ssn: '987-45-1234'