Skip to content

Commit

Permalink
Merge pull request #63 from trebol-ecommerce/hotfix
Browse files Browse the repository at this point in the history
minor fixes and changes
  • Loading branch information
bglamadrid authored Mar 27, 2023
2 parents 8ef7a48 + 34bf73f commit ce52fd9
Show file tree
Hide file tree
Showing 2 changed files with 74 additions and 178 deletions.
11 changes: 11 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,17 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## [v1.5.4] - 2023-03-27

### Changed

- Clean up unused resources
- Refactor (inline) schemas only used once

### Fixed

- Incorrect types for `/data/product_lists` (was using `ProductCategory`)

## [v1.5.1] - 2023-02-17

### Added
Expand Down
241 changes: 63 additions & 178 deletions trebol-api.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"openapi": "3.0.1",
"info": {
"title": "Trébol eCommerce API",
"version": "1.5.2",
"version": "1.5.4",
"description": "A collection of resources that the Trébol backend exposes to interact with.",
"contact": {
"name": "Benjamin La Madrid",
Expand Down Expand Up @@ -1474,7 +1474,17 @@
],
"responses": {
"200": {
"$ref": "#/components/responses/MultipleUserRoles"
"description": "Normal response containing a list of user roles.",
"content": {
"application/json": {
"schema": {
"type": "array",
"items": {
"$ref": "#/components/schemas/UserRole"
}
}
}
}
},
"403": {
"$ref": "#/components/responses/Forbidden"
Expand Down Expand Up @@ -1677,7 +1687,14 @@
],
"responses": {
"200": {
"$ref": "#/components/responses/SingleReceipt"
"description": "Normal response containing a receipt.",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Receipt"
}
}
}
},
"404": {
"$ref": "#/components/responses/NotFound"
Expand Down Expand Up @@ -1728,7 +1745,17 @@
],
"responses": {
"200": {
"$ref": "#/components/responses/MultipleProductCategories"
"description": "Normal response containing a list of product categories.",
"content": {
"application/json": {
"schema": {
"type": "array",
"items": {
"$ref": "#/components/schemas/ProductCategory"
}
}
}
}
}
},
"security": [
Expand Down Expand Up @@ -1898,7 +1925,14 @@
],
"responses": {
"200": {
"$ref": "#/components/responses/SinglePerson"
"description": "Normal response containing a Person object containing data about the user.",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Person"
}
}
}
},
"403": {
"$ref": "#/components/responses/Forbidden"
Expand Down Expand Up @@ -2122,7 +2156,17 @@
],
"responses": {
"200": {
"$ref": "#/components/responses/MultipleBillingTypes"
"description": "Normal response containing a list of billing types.",
"content": {
"application/json": {
"schema": {
"type": "array",
"items": {
"$ref": "#/components/schemas/BillingType"
}
}
}
}
}
},
"security": [
Expand Down Expand Up @@ -2657,7 +2701,17 @@
],
"responses": {
"200": {
"$ref": "#/components/responses/MultipleProductCategories"
"description": "Normal response containing a list of product lists.",
"content": {
"application/json": {
"schema": {
"type": "array",
"items": {
"$ref": "#/components/schemas/ProductList"
}
}
}
}
}
},
"operationId": "data-product-lists-get",
Expand All @@ -2669,7 +2723,7 @@
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ProductCategory"
"$ref": "#/components/schemas/ProductList"
}
}
},
Expand Down Expand Up @@ -2707,7 +2761,7 @@
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ProductCategory"
"$ref": "#/components/schemas/ProductList"
}
}
},
Expand Down Expand Up @@ -3746,10 +3800,6 @@
"pageSize": 15
}
},
"EmptyObject": {
"description": "An object without properties.",
"type": "object"
},
"Address": {
"title": "Root Type for Address",
"description": "Information about a physical address.",
Expand Down Expand Up @@ -3833,46 +3883,6 @@
"name": "some text"
}
},
"SellStatus": {
"title": "Root Type for SellStatus",
"description": "Representation of a step in the checkout process.",
"required": [
"code",
"name"
],
"type": "object",
"properties": {
"code": {
"description": "Unique identifier. Negative values represent error states, positive values represent steps in the checkout process.",
"type": "integer"
},
"name": {
"description": "The name of the status.",
"type": "string"
}
},
"example": {
"code": 1,
"name": "invalid"
}
},
"PaymentType": {
"title": "Root Type for PaymentType",
"description": "Designates the method that the customer used to pay their bill.",
"required": [
"name"
],
"type": "object",
"properties": {
"name": {
"description": "The name given to this payment type.",
"type": "string"
}
},
"example": {
"name": "Enterprise Invoice"
}
},
"BillingType": {
"title": "Root Type for ProductType",
"description": "Dictates taxes to be applied to a given Sell.",
Expand Down Expand Up @@ -3975,139 +3985,14 @@
"AllowMethodGET": {
"description": "Normal, empty response to some OPTIONS requests. Should include CORS headers and indicate that only the GET method is allowed."
},
"AllowMethodGET-POST": {
"description": "Normal, empty response to some OPTIONS requests. Should include CORS headers and indicate that only the GET and POST methods are allowed."
},
"AllowAllMethods": {
"description": "Normal, empty response to some OPTIONS requests. Should include CORS headers and indicate that the methods GET, POST PUT and DELETE are allowed."
},
"AllowMethodGET-PUT": {
"description": "Normal, empty response to some OPTIONS requests. Should include CORS headers and indicate that only the GET and PUT methods are allowed."
},
"AllowMethodGET-PUT-DELETE": {
"description": "Normal, empty response to some OPTIONS requests. Should include CORS headers and indicate that only the GET, PUT and DELETE methods are allowed."
},
"BadRequestBody": {
"description": "Erroneous response, sent when the request does not meet certain expectations. This probably because required properties were not included in the request body, or because certain data constraints (duplicate code numbers, for example) were not met."
},
"SingleProduct": {
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Product"
}
}
},
"description": "Normal response, sends an object representation of an individual product."
},
"SingleSell": {
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Sell"
}
}
},
"description": "Normal response, sends an object representation of an individual sell."
},
"SingleReceipt": {
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Receipt"
}
}
},
"description": "Normal response, sends an object representation of an individual transaction receipt."
},
"MultipleProductCategories": {
"content": {
"application/json": {
"schema": {
"type": "array",
"items": {
"$ref": "#/components/schemas/ProductCategory"
}
}
}
},
"description": "Normal response, sends an array of product categories."
},
"MultipleUserRoles": {
"content": {
"application/json": {
"schema": {
"type": "array",
"items": {
"$ref": "#/components/schemas/UserRole"
}
}
}
},
"description": "Normal response, sends an array of user roles."
},
"SingleImage": {
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Image"
}
}
},
"description": "Normal response, sends an object representation of an individual image."
},
"SingleCustomer": {
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Customer"
}
}
},
"description": "Normal response, sends an object representation of an individual customer."
},
"SingleSalesperson": {
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Salesperson"
}
}
},
"description": "Normal response, sends an object representation of an individual salesperson."
},
"SingleUser": {
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/User"
}
}
},
"description": "Normal response, sends an object representation of an individual user."
},
"SinglePerson": {
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Person"
}
}
},
"description": "Normal response, sends an object representation of an individual person."
},
"MultipleBillingTypes": {
"content": {
"application/json": {
"schema": {
"type": "array",
"items": {
"$ref": "#/components/schemas/BillingType"
}
}
}
},
"description": "Normal response, sends an array of user roles."
}
},
"securitySchemes": {
Expand Down

0 comments on commit ce52fd9

Please sign in to comment.