forked from dalogax/backendDevTest
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathsimilarProducts.yaml
More file actions
54 lines (54 loc) · 1.19 KB
/
similarProducts.yaml
File metadata and controls
54 lines (54 loc) · 1.19 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
openapi: 3.0.0
info:
title: SimilarProducts
version: '1.0'
servers:
- url: 'http://localhost:5000'
paths:
'/product/{productId}/similar':
parameters:
- schema:
type: string
name: productId
in: path
required: true
get:
operationId: get-product-similar
summary: Similar products
responses:
'200':
description: OK
content:
application/json:
schema:
$ref: '#/components/schemas/SimilarProducts'
'404':
description: Product Not found
components:
schemas:
SimilarProducts:
type: array
description: 'List of similar products to a given one ordered by similarity'
minItems: 0
uniqueItems: true
items:
$ref: '#/components/schemas/ProductDetail'
ProductDetail:
description: 'Product detail'
type: object
properties:
id:
type: string
minLength: 1
name:
type: string
minLength: 1
price:
type: number
availability:
type: boolean
required:
- id
- name
- price
- availability