Skip to content

Commit

Permalink
docs(documentation): docs: add create a price doc
Browse files Browse the repository at this point in the history
  • Loading branch information
Clement-Muth authored and gitbook-bot committed Nov 2, 2024
1 parent 3905ae4 commit e10f452
Show file tree
Hide file tree
Showing 10 changed files with 1,059 additions and 68 deletions.
118 changes: 118 additions & 0 deletions documentation/.gitbook/assets/openapi (1).yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,118 @@
openapi: 3.1.0
info:
title: Price Comparator API
description: An API for comparing prices of foods, cosmetics and more.
version: 1.0.0
servers:
- url: https://pcomparator.vercel.app/api
description: The production server.
paths:
/prices:
post:
operationId: createPrice
summary: Create a new price
description: Creates a new price in the database.
requestBody:
description: The price to create.
content:
application/json:
schema:
$ref: "#/components/schemas/components"
responses:
"201":
description: The burger was created successfully.
content:
application/json:
schema:
type: object
properties:
id:
type: string
format: uuid
barcode:
type: string
minLength: 1
name:
type: string
minLength: 1
description:
type:
- string
- "null"
minLength: 1
categoryId:
type:
- string
- "null"
format: uuid
brandId:
type:
- string
- "null"
format: uuid
nutritionScore:
type: "null"
createdAt:
type: string
updatedAt:
type: string
required:
- id
- barcode
- name
- createdAt
- updatedAt
components:
schemas:
components:
type: object
properties:
barcode:
type: string
example: "2929292929292"
storeName:
type: string
example: Auchan
productName:
type: string
example: Nutella
categoryName:
type: string
example: Pate a tartiner
brandName:
type: string
example: Ferrero
location:
type: string
example: 4 rue du dome, 67000, Strasbourg
amount:
type: number
exclusiveMinimum: 0
example: 9.99
proof:
type: string
example: https://pcomparator/files
currency:
type: string
enum:
- EUR
- USD
- GBP
- CHF
- AUD
- CAD
- CNY
- JPY
- AED
example: EUR
required:
- barcode
- storeName
- productName
- categoryName
- brandName
- location
- amount
- proof
- currency

158 changes: 158 additions & 0 deletions documentation/.gitbook/assets/openapi (2).yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,158 @@
openapi: 3.1.0
info:
title: Price Comparator API
description: An API for comparing prices of foods, cosmetics and more.
version: 1.0.0
servers:
- url: https://pcomparator.vercel.app/api
description: The production server.
paths:
/prices:
post:
operationId: createPrice
summary: Create a new price
description: Creates a new price in the database.
requestBody:
description: The price to create.
content:
application/json:
schema:
type: object
properties:
barcode:
type: string
example: "8690804407383"
storeName:
type: string
example: Auchan
productName:
type: string
example: Nutella
categoryName:
type: string
example: Pate a tartiner
brandName:
type: string
example: Ferrero
location:
type: string
example: 4 rue du dome, 67000, Strasbourg
amount:
type: number
exclusiveMinimum: 0
example: 9.99
proof:
type: string
example: https://pcomparator/files
currency:
type: string
enum:
- EUR
- USD
- GBP
- CHF
- AUD
- CAD
- CNY
- JPY
- AED
example: EUR
required:
- barcode
- storeName
- productName
- categoryName
- brandName
- location
- amount
- proof
- currency
responses:
"201":
description: The burger was created successfully.
content:
application/json:
schema:
type: object
properties:
id:
type: string
format: uuid
barcode:
type: string
minLength: 1
name:
type: string
minLength: 1
description:
type:
- string
- "null"
minLength: 1
categoryId:
type:
- string
- "null"
format: uuid
brandId:
type:
- string
- "null"
format: uuid
nutritionScore:
type: "null"
createdAt:
type: string
updatedAt:
type: string
required:
- id
- barcode
- name
- createdAt
- updatedAt
components:
schemas:
components:
type: object
properties:
barcode:
type: string
storeName:
type: string
productName:
type: string
categoryName:
type: string
brandName:
type: string
location:
type: string
amount:
type: number
exclusiveMinimum: 0
proof:
type: string
currency:
type: string
enum:
- EUR
- USD
- GBP
- CHF
- AUD
- CAD
- CNY
- JPY
- AED
required:
- barcode
- storeName
- productName
- categoryName
- brandName
- location
- amount
- proof
- currency

Loading

0 comments on commit e10f452

Please sign in to comment.