Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

docs: fix OpenAPI Product schema file, extract agribalyze.yaml #8450

Merged
merged 2 commits into from
May 25, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 5 additions & 6 deletions docs/api/ref/requestBodies/crop_a_photo.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,13 @@ properties:
code:
type: string
description: Barcode of the product.
example: '04963406'
example: "04963406"
required: true
imgid:
type: integer
description: identifier of the image to select, it should be a number
example: 2
required: true
id:
type: string
description: |
Expand All @@ -23,6 +25,7 @@ properties:
displayed on Product Opener for all languages (ex: on
`https://fr.openfoodfacts.org`, unless `ingredients_fr` exists).
example: front_en
required: true
x1:
type: integer
example: 0
Expand Down Expand Up @@ -60,8 +63,4 @@ properties:
ImageMagick.
enum:
- "true"
- "false"
required:
- code
- imgid
- id
- "false"
2 changes: 1 addition & 1 deletion docs/api/ref/responses/get_product_by_barcode.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ allOf:
product:
type: object
allOf:
- $ref: ../schemas/product.yaml#/Product
- $ref: ../schemas/product.yaml
x-examples:
example-1:
code: '3017620422003'
Expand Down
47 changes: 47 additions & 0 deletions docs/api/ref/schemas/agribalyse.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
type: object
properties:
agribalyse_food_code:
type: string
co2_agriculture:
type: number
co2_consumption:
type: integer
co2_distribution:
type: number
co2_packaging:
type: number
co2_processing:
type: number
co2_total:
type: number
co2_transportation:
type: number
code:
type: string
dqr:
type: string
ef_agriculture:
type: number
ef_consumption:
type: integer
ef_distribution:
type: number
ef_packaging:
type: number
ef_processing:
type: number
ef_total:
type: number
ef_transportation:
type: number
is_beverage:
type: integer
name_en:
type: string
description: |
This can be returned in many other languages
like name_fr (for french).
score:
type: integer
version:
type: string
Loading