Skip to content

Commit

Permalink
Merge branch 'main' into assetlinks-fix
Browse files Browse the repository at this point in the history
  • Loading branch information
teolemon authored May 29, 2023
2 parents cb65cc7 + 819df0c commit e2af1a6
Show file tree
Hide file tree
Showing 196 changed files with 14,071 additions and 9,516 deletions.
508 changes: 246 additions & 262 deletions .eslintrc.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion .github/workflows/generate-doc.yml
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ jobs:
- name: Deploy API documentation to Github Pages
uses: JamesIves/github-pages-deploy-action@v4.4.1
uses: JamesIves/github-pages-deploy-action@v4.4.2
# we only deploy on push to main
if: |
github.event_name == 'push' && github.event.ref == 'refs/heads/main'
Expand Down
2 changes: 1 addition & 1 deletion Dockerfile.frontend
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ ENV PATH /opt/product-opener/node_modules/.bin:$PATH
COPY --chown=node:node html /opt/product-opener/html
COPY --chown=node:node icons /opt/product-opener/icons
COPY --chown=node:node scss /opt/product-opener/scss
COPY --chown=node:node gulpfile.js /opt/product-opener/
COPY --chown=node:node gulpfile.ts /opt/product-opener/
COPY --chown=node:node .snyk /opt/product-opener/
# https://github.com/openfoodfacts/openfoodfacts-server/pull/5544#issuecomment-914221199
RUN find . -xtype l | xargs -I {} sh -c "origin=\$(readlink {} | tr '\\\\\\\\' '/') && ln -sf \$origin {}"
Expand Down
4 changes: 2 additions & 2 deletions docker/dev.yml
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ services:
- ./html:/opt/product-opener/html
- ./icons:/opt/product-opener/icons
- ./scss:/opt/product-opener/scss
- ./gulpfile.js:/opt/product-opener/gulpfile.js
- ./gulpfile.ts:/opt/product-opener/gulpfile.ts
frontend:
image: openfoodfacts-server/frontend:dev
build:
Expand All @@ -75,7 +75,7 @@ services:
- ./html:/opt/product-opener/html/
- ./icons:/opt/product-opener/icons
- ./scss:/opt/product-opener/scss
- ./gulpfile.js:/opt/product-opener/
- ./gulpfile.ts:/opt/product-opener/
- ./snyk:/opt/product-opener/
networks:
default:
Expand Down
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

0 comments on commit e2af1a6

Please sign in to comment.