All notable changes to this project will be documented in this file.
The format is based on Keep a Changelog, and this project adheres to Semantic Versioning.
- Generic error response and response body schema, named
Error
andAppError
respectively
- [BREAKING CHANGE] All error responses were replaced in favor of the new generic error schema
- [BREAKING CHANGE] In newly-named
Order
,Customer
andSalesperson
now reference aPerson
element instead - [BREAKING CHANGE] Rename all instances of
Sell
toOrder
- Tag
sales
->orders
- Endpoint
/data/sales
->/data/orders
- All methods GET, POST, PUT and PATCH
- All subroutes
/confirmation
/rejection
/completion
- Schemas
Sell
->Order
SellProperties
->OrderProperties
SellDetail
->OrderDetail
SellDetailProperties
->OrderDetailProperties
- All uses of the noun in literal descriptions
- Tag
- [BREAKING CHANGE] Standard status codes in replacement of vague
200
- All
/data/
POST endpoints will return201
- Excepting the three subroutes within
/data/orders
which will return204
:/confirmation
/rejection
/completion
- Excepting the three subroutes within
- All
/data/
PUT, PATCH, DELETE and OPTIONS endpoints will return204
- All
- [BREAKING CHANGE] Error response schemas
Forbidden
NotFound
BadRequestBody
- [BREAKING CHANGE] Elements that constitute the concepts of
Customer
andSalesperson
- Endpoints
/data/customers
and/data/salespeople
- Schemas
Customer
andSalesperson
- Tags
customers
andsalespeople
- Endpoints
- [BREAKING CHANGE] Auth-related resources
- Paths
/public/guest
/public/register
/public/login
/access
/access/{resource}
- Unusedd tags
authorization
session
- Paths
- The following schemas were merged into their original ones
ProductRequiredProperties
->Product
SellRequiredProperties
->Sell
UserRequiredProperties
->User
UserRoleRequiredProperties
->UserRole
ImageRequiredProperties
->Image
PersonRequiredProperties
->Person
ProductCategoryRequiredProperties
->ProductCategory
ProductListRequiredProperties
->ProductList
ShipperRequiredProperties
->Shipper
- Bad $ref
- Joined specification documents back into one
PATCH
methods, to partially update data- affected endpoints
/data/products
/data/sales
/data/users
/data/images
/data/product_categories
/data/shippers
/data/product_lists
- all of these are tagged with
partial-update
- affected endpoints
- To support
PATCH
methods, each and every CRUD-related schema was split into three- One schema only has the
properties
array from the original one, and is added the suffix-Properties
- Another, with the
required
array, and is added the suffix-RequiredProperties
- The last one extends from both the others, plus includes the rest of the metaproperties
name
,description
,example
, and retains the original name - All of this is true for these following schemas, resulting in the following new ones:
Product
->ProductProperties
&ProductRequiredProperties
Sell
->SellProperties
&SellRequiredProperties
User
->UserProperties
&UserRequiredProperties
Image
->ImageProperties
&ImageRequiredProperties
ProductCategory
->ProductCategoryProperties
&ProductCategoryRequiredProperties
Shipper
->ShipperProperties
&ShipperRequiredProperties
ProductList
->ProductListProperties
&ProductListRequiredProperties
- This way, each
PATCH
method only needs a-Properties
schema, and eachPUT
/POST
still makes use of the original schema.
- One schema only has the
- SuperLinter badge url
- SuperLinter GitHub Action
- Created a second API document
common.trebol-api.json
for common components- Moved schemas to this document
DataPage
LoginCredentials
UserRegistration
AuthorizedAccess
Person
- Moved responses to this document
PaginatedCollection
Forbidden
AuthorizedAccessToResource
AuthorizedAccessToRoutes
NotFound
Empty
AllowMethodPOST
AllowMethodGET
AllowAllMethods
AllowMethodGET-PUT
BadRequestBody
- Rewritten References (
$ref
) to load all these components from the second document file if it exists in the same directory
- Moved schemas to this document
- Clean up unused resources
- Refactor (inline) schemas only used once
- Incorrect types for
/data/product_lists
(was usingProductCategory
)
- Declare global tags
- Incongruent CRUD operations tags
delete
andremove
are now merged asdelete
fetch-one
andfetch-many
are now calledread-one
andread-many
- Query parameters specification for
GET /data/product_lists
ProductList
specific query params arecode
,name
,codeLike
andnameLike
- Three resources to interact with processing of sales
POST /data/sales/confirmation
- Should confirm a given sell that is in aPaid
or similar statePOST /data/sales/rejection
- Should reject a given sell that is in aPaid
or similar statePOST /data/sales/completion
- Should mark a sell asCompleted
orDelivered
, given that it is in aConfirmed
or similar state
- New query parameters for
GET /data/sales
-afterDate
,beforeDate
andstatusCode
- Removed some empty security schema specs
- Added missing data type ref to path parameter in
/access/{resource}
path - Moved
date
query parameter for/data/sales
to be used only in itsGET
method
- Deprecated resource paths
/public/categories
- Since v1.1.0/public/products
- Since v1.2.1/public/products/{barcode}
- Since v1.2.0
- Means to use
/data/product_list_contents
POST
accepts a singleProduct
entity at a time- Remove most query parameters from
PUT
andPOST
- Only keep
listCode
as globally supported GET
andDELETE
do support them all
- Only keep
- Update descriptions
- Incorrect request body specifications for
/data/product_list_contents
- Added a security schema to all methods
- Entity
ProductList
- made property
name
optional
- made property
- Methods in
/data
are now publicly availableGET /data/billing_types
GET /data/products
GET /data/product_lists
GET /data/product_list_contents
GET /data/product_categories
GET /data/shippers
- Path
/public/products
will be superseded by/data/products
- New entity
ProductList
- with properties
code
,name
andtotalCount
- with properties
- New path
/data/product_lists
- supports methods
GET
,POST
,PUT
andDELETE
- supports methods
- New path
/data/product_list_contents
- supports methods
GET
,POST
,PUT
andDELETE
- requires
listCode
in query parameters
- supports methods
- Outdated response refs in some
OPTIONS
resources
- Replaced all
/access
sub-paths with wildcard/access/*
- Renamed response
AuthorizedAccessToSingleRoute
toAuthorizedAccessToResource
- Renamed category-related query parameters in
/data/products
productCategory
tocategoryCode
productCategoryLike
tocategoryCodeLike
- Paths marked for deprecation:
/data/customers/{idNumber}
/data/images/{code}
/data/product_categories/{parentCode}
/data/products/{barcode}
/data/sales/{buyOrder}
/data/salespeople/{idNumber}
/data/users/{name}
/public/categories/{parentId}
- Path
/public/products/{barcode}
should be superseded with query parameters
- Use ref to predefined response for
/public/register [200 OK]
- Missing examples for some specifications of
sort
as a query parameter
- Several parameter descriptions
- Entity
ProductCategory
and Path/data/product_categories
- property & query parameter
code
changed from typeinteger
tostring
- query parameter
parentCode
changed from typeinteger
tostring
- property & query parameter
- All GET resources within
/data
include pagination parameterspageIndex
,pageSize
,sortBy
,sortOrder
- Entity
Receipt
- introduce properties
token
,taxValue
,transportValue
andtotalItems
- introduce properties
- Entity
Receipt
- rename
amount
property tototalValue
- require properties
token
andtotalItems
in addition to base schema properties
- rename
- Entity
Sell
- include missing property
transportValue
- this was wrongly documented as an addition in v1.1.0; changelog was updated
- include missing property
- Path
/data/product_categories
- include methods
GET
,POST
,PUT
andDELETE
to manage product categories
- include methods
- Path
/data/shippers
- include method
GET
,POST
,PUT
andDELETE
to manage shippers
- include method
- Entity
Sell
- introduce properties
token
,taxValue
,totalValue
andtotalItems
- introduce properties
- Entity
SellDetail
- introduce property
unitValue
- introduce property
- Entity
Person
- [Breaking change] Property
name
split into two,firstName
andlastName
- [Breaking change] Property
- Paths in
/data
without path parameters- updated summary and description
- paging query parameters are now (aptly) named
pageSize
andpageIndex
The following will be removed in the minor version that follows this one. Please follow given advices and use corresponding replacements before that.
- Reduce redundant API resources
/public/categories
- use/data/product_categories
instead/public/categories/{parentId}
- use/data/product_categories?parentCode={}
instead
- Replace parameterized paths with simpler paths and use of query parameters (for all available methods)
/data/customers/{idNumber}
- use/data/customers?idNumber={}
instead/data/images/{code}
- use/data/images?code={}
instead/data/products/{code}
- use/data/products?barcode={}
instead/data/sales/{buyOrder}
- use/data/sales?buyOrder={}
instead/data/salespeople/{idNumber}
- use/data/salespeople?idNumber={}
instead/data/users/{name}
- use/data/users?name={}
instead
- All
500 Internal Server Error
responses, and theUnknownError
predefined response
- Tags
- add entity tags to entity-related resources, such as
products
,customers
andsales
- add entity tags to entity-related resources, such as
- Path
/data/people
- change
operationId
- change
- Tags
- instead of
fetch
,one
,many
andexisting
, only usefetch-one
andfetch-many
- instead of
- Entity
Product
: include propertydescription
asstring
- Entity
Address
- require properties
firstLine
,municipality
andcity
as base schema information
- require properties
- Entity
BillingCompany
- require property
idNumber
as base schema information
- require property
- Entity
Image
- require properties
filename
,url
andcode
as base schema information - set
code
data type tostring
- require properties
- Entity
Product
- require properties
barcode
as base schema information
- require properties
- Entity
ProductCategory
- require property
name
as base schema information - fix example
- require property
- Entity
Receipt
- require properties
amount
,buyOrder
,date
, andstatus
as base schema information - remove
format
metadata frombuyOrder
andamount
- require properties
- Entity
Sell
- add description
- require property
details
in addition to others as base schema information - update description of
billingCompany
property
- Entity
SellDetail
- require properties
product
andunits
as base schema information - add description to both properties
- remove
format
metadata fromunits
property
- require properties
- Entity
SellStatus
- add description
- require properties
code
andname
- add description to both properties
- update data type of
code
tointeger
- Entity
Shipper
- add description
- add description to
name
property
- Entities
ShopOwnerDetails
,User
andUserRole
- update description
- Entities
Customer
andSalesperson
- require property
person
as base schema information - add a description to
person
property
- require property
- Entities
PaymentType
andBillingType
- require property
name
as base schema information
- require property
- Entity
Sell
- include required property
customer
asPerson
- include required property
- Path
/data/product_categories/{parentId}
- parameter
parentId
renamed toparentCode
- parameter
- Entity
ProductCategory
- property
id
renamed tocode
- property
- Entity
User
- require property
name
as base schema information - include property
role
asstring
- require property
First public version.