65 lines
1.7 KiB
YAML
65 lines
1.7 KiB
YAML
|
|
openapi: 3.0.0
|
||
|
|
info:
|
||
|
|
title: existingApis
|
||
|
|
version: '1.0'
|
||
|
|
servers:
|
||
|
|
- url: 'http://localhost:3001'
|
||
|
|
paths:
|
||
|
|
'/product/{productId}/similarids':
|
||
|
|
parameters:
|
||
|
|
- schema:
|
||
|
|
type: string
|
||
|
|
name: productId
|
||
|
|
in: path
|
||
|
|
required: true
|
||
|
|
get:
|
||
|
|
operationId: get-product-similarids
|
||
|
|
summary: Gets the ids of the similar products
|
||
|
|
description: Returns the similar products to a given one ordered by similarity
|
||
|
|
responses:
|
||
|
|
'200':
|
||
|
|
description: OK
|
||
|
|
content:
|
||
|
|
application/json:
|
||
|
|
schema:
|
||
|
|
type: array
|
||
|
|
description: List of productIds similar to a given one ordered by similarity
|
||
|
|
minItems: 0
|
||
|
|
uniqueItems: true
|
||
|
|
items:
|
||
|
|
type: integer
|
||
|
|
'/product/{productId}':
|
||
|
|
parameters:
|
||
|
|
- schema:
|
||
|
|
type: string
|
||
|
|
name: productId
|
||
|
|
in: path
|
||
|
|
required: true
|
||
|
|
get:
|
||
|
|
operationId: get-product-productId
|
||
|
|
summary: Gets a product detail
|
||
|
|
description: Returns the product detail for a given productId
|
||
|
|
responses:
|
||
|
|
'200':
|
||
|
|
description: OK
|
||
|
|
content:
|
||
|
|
application/json:
|
||
|
|
schema:
|
||
|
|
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
|