Created
March 12, 2021 11:22
-
-
Save cobusc/74e61d23b7c4e421096cd939e7533425 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
swagger: "2.0" | |
info: | |
title: Catalogue API version 2 | |
description: The new generation Catalogue API | |
version: "1.0.0" | |
host: catalogue-api-v2.master.env | |
schemes: | |
- http | |
produces: | |
- application/json | |
definitions: | |
Attributes: | |
description: Attributes | |
type: object | |
BuyBox: | |
description: BuyBox information | |
type: object | |
properties: | |
winner: | |
type: object | |
required: | |
Product: | |
description: A retail product or seller listing | |
type: object | |
required: | |
- id | |
- is_seller_listing | |
additionalProperties: false | |
properties: | |
id: | |
type: integer | |
is_seller_listing: | |
type: boolean | |
title: | |
type: string | |
attributes: | |
$ref: "#/definitions/Attributes" | |
Tsin: | |
description: A TSIN | |
type: object | |
required: | |
- id | |
- title | |
- attributes | |
- buybox | |
additionalProperties: false | |
properties: | |
id: | |
type: integer | |
title: | |
type: string | |
attributes: | |
$ref: "#/definitions/Attributes" | |
buybox: | |
$ref: "#/definitions/BuyBox" | |
ProductLine: | |
description: A productline | |
type: object | |
required: | |
- id | |
- title | |
- attributes | |
additionalProperties: false | |
properties: | |
id: | |
type: integer | |
title: | |
type: string | |
attributes: | |
$ref: "#/definitions/Attributes" | |
TsinWithProducts: | |
description: A TSIN with its associated products | |
type: object | |
required: | |
- tsin | |
- products | |
additionalProperties: false | |
properties: | |
tsin: | |
$ref: "#/definitions/Tsin" | |
products: | |
type: array | |
items: | |
$ref: "#/definitions/Product" | |
ProductLineWithTsins: | |
description: A productline with its associated TSINs | |
type: object | |
required: | |
- productline | |
- tsins | |
additionalProperties: false | |
properties: | |
productline: | |
$ref: "#/definitions/ProductLine" | |
tsins: | |
type: array | |
items: | |
$ref: "#/definitions/TsinWithProducts" | |
responses: | |
ProductResourceResponse: | |
description: A product resource lookup response | |
schema: | |
$ref: "#/definitions/Product" | |
TsinResourceResponse: | |
description: A TSIN resource lookup response | |
schema: | |
$ref: "#/definitions/TsinWithProducts" | |
ProductLineResourceResponse: | |
description: A productline resource lookup response | |
schema: | |
$ref: "#/definitions/ProductLineWithTsins" | |
ProductLineLineageResponse: | |
description: A productline lineage lookup response (Exactly the same response as ProductLineResource response. Added for completeness.) | |
schema: | |
$ref: "#/definitions/ProductLineWithTsins" | |
TsinLineageResponse: | |
description: A TSIN lineage lookup response | |
schema: | |
type: object | |
required: | |
- productline | |
- tsins | |
properties: | |
productline: | |
$ref: "#/definitions/ProductLine" | |
tsins: | |
type: array | |
items: | |
$ref: "#/definitions/TsinWithProducts" | |
ProductLineageResponse: | |
description: A product lineage lookup response | |
schema: | |
type: object | |
required: | |
- productline | |
- tsin | |
- product | |
properties: | |
productline: | |
$ref: "#/definitions/ProductLine" | |
tsin: | |
$ref: "#/definitions/Tsin" | |
product: | |
$ref: "#/definitions/Product" | |
parameters: | |
productline_id: | |
name: productline_id | |
in: path | |
type: integer | |
required: true | |
tsin_id: | |
name: tsin_id | |
in: path | |
type: integer | |
required: true | |
product_id: | |
name: product_id | |
in: path | |
type: integer | |
required: true | |
paths: | |
/full/productlines/{productline_id}: | |
get: | |
operationId: get_productline_resource_by_id | |
parameters: | |
- $ref: "#/parameters/productline_id" | |
responses: | |
200: | |
$ref: "#/responses/ProductLineResourceResponse" | |
/full/productlines/by_tsin/{tsin_id}: | |
get: | |
operationId: get_productline_resource_by_tsin_id | |
parameters: | |
- $ref: "#/parameters/tsin_id" | |
responses: | |
200: | |
$ref: "#/responses/ProductLineResourceResponse" | |
/full/productlines/by_product/{product_id}: | |
get: | |
operationId: get_productline_resource_by_product_id | |
parameters: | |
- $ref: "#/parameters/product_id" | |
responses: | |
200: | |
$ref: "#/responses/ProductLineResourceResponse" | |
/full/tsins/{tsin_id}: | |
get: | |
operationId: get_tsin_resource_by_tsin_id | |
parameters: | |
- $ref: "#/parameters/tsin_id" | |
responses: | |
200: | |
$ref: "#/responses/TsinResourceResponse" | |
/full/tsins/by_product/{product_id}: | |
get: | |
operationId: get_tsin_resource_by_product_id | |
parameters: | |
- $ref: "#/parameters/product_id" | |
responses: | |
200: | |
$ref: "#/responses/TsinResourceResponse" | |
/full/products/{product_id}: | |
get: | |
operationId: get_product_resource_by_product_id | |
parameters: | |
- $ref: "#/parameters/product_id" | |
responses: | |
200: | |
$ref: "#/responses/ProductResourceResponse" | |
/lineage/productlines/{productline_id}: | |
get: | |
operationId: get_productline_lineage | |
parameters: | |
- $ref : "#/parameters/productline_id" | |
responses: | |
200: | |
$ref: "#/responses/ProductLineLineageResponse" | |
/lineage/tsins/{tsin_id}: | |
get: | |
operationId: get_tsin_lineage | |
parameters: | |
- $ref : "#/parameters/tsin_id" | |
responses: | |
200: | |
$ref: "#/responses/TsinLineageResponse" | |
/lineage/products/{product_id}: | |
get: | |
operationId: get_product_lineage | |
parameters: | |
- $ref : "#/parameters/product_id" | |
responses: | |
200: | |
$ref: "#/responses/ProductLineageResponse" | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment