REST contract compatibility — openapi.yaml

openapi.yaml at the review base 390f0e0e against the working tree, read by oasdiff 1.30.0 — an independent, open-source differ. It resolves $refs, so an operation is listed here because of any schema it reaches, not only because its own paths entry moved. Every line below carries the rule id that produced it.

INCOMPATIBLE
Not backward compatible
1 change across 1 operation would break a client that is already calling this API.

openapi.yaml at the review base 390f0e0e against the working tree, read by oasdiff 1.30.0 — an independent, open-source differ. It resolves $refs, so an operation is listed here because of any schema it reaches, not only because its own paths entry moved. Every line below carries the rule id that produced it.

What breaks 1
GET/api/owners
  • breaking the response's body type changed from array<object> to object for status 200 response-body-type-changed
The shape a caller sends and gets back
Grey is the contract as it was. Red is added, red struck through is removed. $refs are resolved, so a schema that moved shows up here, at every operation that serves it. Example values are the spec's own.
Requestpath & query parameters, then the body3 changed
lastName (query)stringdefault
page (query)integerformat int32, minimum 0, maximum 21474836, default 0
size (query)integerformat int32, minimum 1, maximum 100, default 10
sort (query)stringpattern (name|city)(,(asc|desc))?, default name,asc
Response200 - the primary success body27 changed
bodyOwnerDto[] OwnerPageDto
One page of owners, with the totals of the whole matching result.
[ ]OwnerDto
addressstringwas requiredminLength 1, maxLength 255e.g. 110 W. Liberty St.
The postal address of the pet owner.
citystringwas requiredminLength 1, maxLength 80e.g. Madison
The city of the pet owner.
firstNamestringwas requiredminLength 1, maxLength 30e.g. George
The first name of the pet owner.
idintegerreadOnlyformat int32, minimum 0e.g. 1
The ID of the pet owner.
lastNamestringwas requiredminLength 1, maxLength 30e.g. Franklin
The last name of the pet owner.
petsPetDto[]was requiredreadOnly
The pets owned by this individual including any booked vet visits.
[ ]PetDto
birthDatestringwas requiredformat datee.g. 2010-09-07
idintegerwas requiredreadOnlyformat int32, minimum 0e.g. 1
The ID of the pet.
namestringwas requiredminLength 0, maxLength 30e.g. Leo
The name of the pet.
ownerIdintegerreadOnlyformat int32, minimum 0e.g. 1
The ID of the pet's owner.
typePetTypeDtowas required
idintegerwas requiredformat int32, minimum 0e.g. 1
The ID of the pet type.
namestringwas requiredminLength 1, maxLength 80e.g. cat
The name of the pet type.
visitsVisitDto[]was requiredreadOnly
Vet visit bookings for this pet.
[ ]VisitDto
datestringformat datee.g. 2013-01-01
The date of the visit.
descriptionstringwas requiredminLength 1, maxLength 255e.g. rabies shot
The description for the visit.
idintegerwas requiredreadOnlyformat int32, minimum 0e.g. 1
The ID of the visit.
ownerFirstNamestringreadOnly
First name of the owner (server-populated).
ownerIdintegerreadOnlyformat int32
ID of the owner of the pet (server-populated).
ownerLastNamestringreadOnly
Last name of the owner (server-populated).
petIdintegerwas requiredformat int32, minimum 0e.g. 1
The ID of the pet.
petNamestringreadOnly
Name of the pet (server-populated).
telephonestringwas requiredminLength 1, maxLength 20, pattern ^[0-9]*$e.g. 6085551023
The telephone number of the pet owner.
Compatible movement 1
GET/api/owners8 compatible changes besides the break above
  • added the new optional query request parameter page new-optional-request-parameter
  • added the new optional query request parameter size new-optional-request-parameter
  • added the new optional query request parameter sort new-optional-request-parameter
  • added the required property content to the response with the 200 status response-required-property-added
  • added the required property number to the response with the 200 status response-required-property-added
  • added the required property size to the response with the 200 status response-required-property-added
  • added the required property totalElements to the response with the 200 status response-required-property-added
  • added the required property totalPages to the response with the 200 status response-required-property-added
The shape a caller sends and gets back
Grey is the contract as it was. Red is added, red struck through is removed. $refs are resolved, so a schema that moved shows up here, at every operation that serves it. Example values are the spec's own.
Requestpath & query parameters, then the body3 changed
lastName (query)stringdefault
page (query)integerformat int32, minimum 0, maximum 21474836, default 0
size (query)integerformat int32, minimum 1, maximum 100, default 10
sort (query)stringpattern (name|city)(,(asc|desc))?, default name,asc
Response200 - the primary success body27 changed
bodyOwnerDto[] OwnerPageDto
One page of owners, with the totals of the whole matching result.
[ ]OwnerDto
addressstringwas requiredminLength 1, maxLength 255e.g. 110 W. Liberty St.
The postal address of the pet owner.
citystringwas requiredminLength 1, maxLength 80e.g. Madison
The city of the pet owner.
firstNamestringwas requiredminLength 1, maxLength 30e.g. George
The first name of the pet owner.
idintegerreadOnlyformat int32, minimum 0e.g. 1
The ID of the pet owner.
lastNamestringwas requiredminLength 1, maxLength 30e.g. Franklin
The last name of the pet owner.
petsPetDto[]was requiredreadOnly
The pets owned by this individual including any booked vet visits.
[ ]PetDto
birthDatestringwas requiredformat datee.g. 2010-09-07
idintegerwas requiredreadOnlyformat int32, minimum 0e.g. 1
The ID of the pet.
namestringwas requiredminLength 0, maxLength 30e.g. Leo
The name of the pet.
ownerIdintegerreadOnlyformat int32, minimum 0e.g. 1
The ID of the pet's owner.
typePetTypeDtowas required
idintegerwas requiredformat int32, minimum 0e.g. 1
The ID of the pet type.
namestringwas requiredminLength 1, maxLength 80e.g. cat
The name of the pet type.
visitsVisitDto[]was requiredreadOnly
Vet visit bookings for this pet.
[ ]VisitDto
datestringformat datee.g. 2013-01-01
The date of the visit.
descriptionstringwas requiredminLength 1, maxLength 255e.g. rabies shot
The description for the visit.
idintegerwas requiredreadOnlyformat int32, minimum 0e.g. 1
The ID of the visit.
ownerFirstNamestringreadOnly
First name of the owner (server-populated).
ownerIdintegerreadOnlyformat int32
ID of the owner of the pet (server-populated).
ownerLastNamestringreadOnly
Last name of the owner (server-populated).
petIdintegerwas requiredformat int32, minimum 0e.g. 1
The ID of the pet.
petNamestringreadOnly
Name of the pet (server-populated).
telephonestringwas requiredminLength 1, maxLength 20, pattern ^[0-9]*$e.g. 6085551023
The telephone number of the pet owner.