Initial commit

This commit is contained in:
Daniel López García
2021-06-23 12:17:01 +02:00
parent 09036a8016
commit 6815c3816a
10 changed files with 804 additions and 0 deletions
+65
View File
@@ -0,0 +1,65 @@
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