forked from oracle-quickstart/oci-cloudnative
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
2 changed files
with
188 additions
and
226 deletions.
There are no files selected for viewing
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,188 @@ | ||
openapi: 3.0.3 | ||
info: | ||
version: 1.0.0 | ||
title: Catalogue service | ||
description: 'Provides catalogue/product information stored on Oracle Autonomous Database.' | ||
license: | ||
name: UPL-1.0 | ||
url: https://github.com/oracle/oci-quickstart-cloudnative/blob/master/LICENSE | ||
externalDocs: | ||
description: Find out more about MuShop | ||
url: https://oracle-quickstart.github.io/oci-cloudnative/ | ||
servers: | ||
- url: http://localhost:8080 | ||
- url: https://mushop_basic_lb_host/api | ||
- url: https://mushop.ateam.cloud/api | ||
tags: | ||
- name: Catalogue | ||
description: Catalogue and Products | ||
externalDocs: | ||
description: Find out more | ||
url: https://github.com/oracle-quickstart/oci-cloudnative/tree/master/src/catalogue | ||
paths: | ||
/catalogue: | ||
get: | ||
tags: | ||
- Catalogue | ||
summary: List All Products | ||
description: Returns all products on the catalogue with details | ||
operationId: listProducts | ||
responses: | ||
200: | ||
description: successful operation | ||
content: | ||
application/json: | ||
schema: | ||
type: array | ||
items: | ||
$ref: '#/components/schemas/product' | ||
/catalogue/size: | ||
get: | ||
tags: | ||
- Catalogue | ||
summary: Get the number of products | ||
description: Returns the total number of products in the catalogue | ||
operationId: getTotalNUmberOfProducts | ||
responses: | ||
200: | ||
description: successful operation | ||
content: | ||
application/json: | ||
schema: | ||
$ref: '#/components/schemas/sizeProducts' | ||
/catalogue/{id}: | ||
get: | ||
tags: | ||
- Catalogue | ||
summary: Get a product by ID | ||
description: Returns a single product | ||
operationId: getProduct | ||
parameters: | ||
- name: id | ||
in: path | ||
description: ID of product to return | ||
required: true | ||
schema: | ||
type: string | ||
example: MU-US-001 | ||
responses: | ||
200: | ||
description: successful operation | ||
content: | ||
application/json: | ||
schema: | ||
$ref: '#/components/schemas/product' | ||
400: | ||
description: Invalid ID supplied | ||
content: {} | ||
404: | ||
description: Product not found | ||
content: {} | ||
/categories: | ||
get: | ||
tags: | ||
- Catalogue | ||
summary: Get categories | ||
description: Returns the categories on the catalogue | ||
operationId: getCategories | ||
responses: | ||
200: | ||
description: successful operation | ||
content: | ||
application/json: | ||
schema: | ||
$ref: '#/components/schemas/categories' | ||
|
||
components: | ||
schemas: | ||
product: | ||
type: object | ||
properties: | ||
id: | ||
type: string | ||
maxLength: 20 | ||
pattern: ^[A-Z]{2}-[A-Z]{2}-[0-9]{3,5}$ | ||
brand: | ||
type: string | ||
maxLength: 20 | ||
title: | ||
type: string | ||
maxLength: 40 | ||
description: | ||
type: string | ||
maxLength: 500 | ||
weight: | ||
type: string | ||
maxLength: 10 | ||
product_size: | ||
type: string | ||
maxLength: 25 | ||
colors: | ||
type: string | ||
maxLength: 20 | ||
qty: | ||
type: integer | ||
format: int32 | ||
maxLength: 10 | ||
pattern: ^[0-9]\d*$ | ||
price: | ||
type: number | ||
format: double | ||
maxLength: 20 | ||
pattern: ^\d+(,\d{1,2})?$ | ||
imageUrl: | ||
type: array | ||
items: | ||
type: string | ||
pattern: .+\.(gif|jpe?g|tiff?|png|webp|bmp)$ | ||
category: | ||
type: array | ||
items: | ||
type: string | ||
maxLength: 50 | ||
required: | ||
- id | ||
- brand | ||
- title | ||
- description | ||
- qty | ||
- price | ||
- category | ||
sizeProducts: | ||
type: object | ||
properties: | ||
size: | ||
type: integer | ||
format: int32 | ||
pattern: ^[0-9]\d*$ | ||
example: 40 | ||
err: | ||
type: string | ||
maxLength: 100 | ||
nullable: true | ||
example: null | ||
required: | ||
- size | ||
categories: | ||
type: object | ||
properties: | ||
categories: | ||
type: "array" | ||
items: | ||
type: "string" | ||
example: | ||
- 'Cleaning Supplies' | ||
- 'Deodorizers' | ||
- 'Litter Accessories' | ||
- 'Litter Boxes' | ||
required: | ||
- categories | ||
|
||
securitySchemes: | ||
BasicAuth: | ||
type: http | ||
scheme: basic | ||
|
||
security: | ||
- {} | ||
- BasicAuth: [] |
Oops, something went wrong.