Skip to content

Releases: trebol-ecommerce/api

v3.0.0

16 Aug 03:51
Compare
Choose a tag to compare

Since v1.7.3

Added

  • Generic error response and response body schema, named Error and AppError respectively

Changed

  • [BREAKING CHANGE] All error responses were replaced in favor of the new generic error schema
  • [BREAKING CHANGE] In newly-named Order, Customer and Salesperson now reference a Person element instead
  • [BREAKING CHANGE] Rename all instances of Sell to Order
    • 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
  • [BREAKING CHANGE] Standard status codes in replacement of vague 200
    • All /data/ POST endpoints will return 201
      • Excepting the three subroutes within /data/orders which will return 204:
        • /confirmation
        • /rejection
        • /completion
    • All /data/ PUT, PATCH, DELETE and OPTIONS endpoints will return 204

Removed

  • [BREAKING CHANGE] Error response schemas
    • Forbidden
    • NotFound
    • BadRequestBody
  • [BREAKING CHANGE] Elements that constitute the concepts of Customer and Salesperson
    • Endpoints /data/customers and /data/salespeople
    • Schemas Customer and Salesperson
    • Tags customers and salespeople
  • [BREAKING CHANGE] Auth-related resources
    • Paths
      • /public/guest
      • /public/register
      • /public/login
      • /access
      • /access/{resource}
    • Unusedd tags
      • authorization
      • session

v1.7.3

12 Mar 00:22
be07117
Compare
Choose a tag to compare

Changed

  • 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

Also change notes for v1.7.0 were updated in the CHANGELOG.md file and reflected in its Releases page.

v1.7.2

26 May 04:53
19c27ef
Compare
Choose a tag to compare

Fixed

  • Bad $ref

v1.7.1

26 May 04:42
Compare
Choose a tag to compare

Fixed

  • Joined specification documents back into one

v1.7.0

25 May 02:11
39a514d
Compare
Choose a tag to compare

Added

  • 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

Changed

  • 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 each PUT/POST still makes use of the original schema.

Fixed

  • SuperLinter badge url

v1.6.1

11 Apr 02:50
521b308
Compare
Choose a tag to compare

Added

  • SuperLinter GitHub Action

v1.6.0

11 Apr 02:00
abdf8ea
Compare
Choose a tag to compare

Changed

  • 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

v1.5.4

27 Mar 18:48
ce52fd9
Compare
Choose a tag to compare
  • Add servers array to document root object, containing a single parameterizable object.
  • Remove unused schemas & responses
  • Inlined some refs to elements that were only used once in the spec

v1.5.0

03 May 19:18
Compare
Choose a tag to compare

Added

  • Query parameters specification for GET /data/product_lists
    • ProductList specific query params are code, name, codeLike and nameLike
  • Three resources to interact with processing of sales
    • POST /data/sales/confirmation - Should confirm a given sell that is in a Paid or similar state
    • POST /data/sales/rejection - Should reject a given sell that is in a Paid or similar state
    • POST /data/sales/completion - Should mark a sell as Completed or Delivered, given that it is in a Confirmed or similar state
  • New query parameters for GET /data/sales - afterDate, beforeDate and statusCode

Changed

  • Removed some empty security schema specs

Fixed

  • Added missing data type ref to path parameter in /access/{resource} path
  • Moved date query parameter for /data/sales to be used only in its GET method

Removed

  • Deprecated resource paths
    • /public/categories - Since v1.1.0
    • /public/products - Since v1.2.1
    • /public/products/{barcode} - Since v1.2.0

v1.2.2

07 Jan 04:31
371eddc
Compare
Choose a tag to compare

Changed

  • Means to use /data/product_list_contents
    • POST accepts a single Product entity at a time
    • Remove most query parameters from PUT and POST
      • Only keep listCode as globally supported
      • GET and DELETE do support them all
    • Update descriptions