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

📝 API Documentation using OpenAPI (tracker) #7446

Open
32 of 83 tasks
teolemon opened this issue Oct 5, 2022 · 2 comments
Open
32 of 83 tasks

📝 API Documentation using OpenAPI (tracker) #7446

teolemon opened this issue Oct 5, 2022 · 2 comments
Labels
🧽 API - Quality 🔐 API auth The API requires auth in order to perform editing.There is a common mechanism & a Robotoff mechanism API READ All READ APIs include Product, Search… API Refactor API v3 API WRITE WRITE API to allow sending product info and image API Issues related to the Open Food Facts API. More specific labels exist & should be used (API WRITE…) 📚 Documentation Documentation issues improve the project for everyone. 📚 OpenAPI

Comments

@teolemon
Copy link
Member

teolemon commented Oct 5, 2022

What

Tasklist

AUTH Requests

Reusable Data schemas

  1. API Refactor ⏰ Stale 📚 Documentation
  2. API Refactor ⏰ Stale 📚 Documentation
  3. API Refactor ⏰ Stale 📚 Documentation

Read Requests

Already partially documented Read requests

  1. API Refactor OpenAPI ⏰ Stale 📚 Documentation

Improvements to READ requests

READ requests To be documented

  1. API Refactor OpenAPI ⏰ Stale 📚 Documentation
  2. OpenAPI ⏰ Stale 📚 Documentation
  3. API READ API Refactor OpenAPI ⏰ Stale
  4. API Refactor ⏰ Stale 📚 Documentation

Write Requests

Already documented

To be documented

  1. API Refactor ⏰ Stale 📚 Documentation
  2. Roxie-32
  3. API Refactor ⏰ Stale 📚 Documentation
  4. ⏰ Stale ✅ Task 📚 Documentation

Developer journeys

  1. dev journeys documentation ⏰ Stale 📚 Documentation
  2. dev journeys documentation ⏰ Stale 📚 Documentation
  3. dev journeys documentation ⏰ Stale 📚 Documentation
  4. dev journeys documentation ⏰ Stale 📚 Documentation
  5. dev journeys documentation ⏰ Stale 📚 Documentation
  6. dev journeys documentation 🎯 P0 📚 Documentation

Link to other API documentations

  1. Road to Doc good first issue ⏰ Stale 📚 Documentation 🤖 Robotoff
  2. ⭐ top issue Road to Doc good first issue 🎯 P1 📖 Knowledge Panels - For facets 📚 Documentation
  3. good first issue ⏰ Stale 🏷️ Folksonomy Project 📚 Documentation
  4. Road to Doc good first issue openfoodfacts-events ⏰ Stale 📚 Documentation 🕹️ Gamification
  5. Road to Doc 💸 Prices 📚 Documentation
  6. NGINX Road to Doc 🎯 Big Bang for Your Time 🎯 P1 📚 Documentation

Link to other useful documents

Fix bugs

No tasks being tracked yet.

Simplify, clarify and fix the existing documentation

Document new APIs

  1. API Refactor product lists 📚 Documentation
  2. new api to document
  3. 🌱 Eco-Score
  4. new api to document
  5. new api to document
  6. new api to document
  7. API Refactor Checked products 📚 Documentation 📚 OpenAPI
  8. WRITE
  9. WRITE
  10. READ good first issue
  11. WRITE good first issue new api to document
  12. autosuggest good first issue
  13. packaging
  14. WRITE good first issue

Create API use cases

  1. new api to document

Document and valorize the SDKs within the doc

  1. API Refactor 📚 Documentation

Disseminate the doc

  1. P1

Auto-generate SDKs from the OpenAPI documentation

  1. OpenAPI
  2. API Refactor GitHub Actions OpenAPI ⏰ Stale

To be sorted

  1. API Refactor 🌍 Multilingual products 📚 Documentation
  2. WRITE clarification of existing documentation
  3. github_actions
    teolemon

Why

  • The better the documentation, the easier it is to use the API, the better Open Food Facts can fulfill its mission

Part of

@teolemon teolemon added the ♞ Epic An epic groups several tasks/issues. It should have a meaning for users. label Oct 5, 2022
This was referenced Oct 5, 2022
@teolemon teolemon changed the title Documentation (tracker) API Documentation using OpenAPI (tracker) Oct 5, 2022
@teolemon teolemon added the 📚 Documentation Documentation issues improve the project for everyone. label Nov 22, 2022
@teolemon
Copy link
Member Author

cc @stephanegigandet @Roxie-32 @alexgarel Documentation issue tracking

Copy link
Contributor

This issue has been open 90 days with no activity. Can you give it a little love by linking it to a parent issue, adding relevant labels and projets, creating a mockup if applicable, adding code pointers from https://github.com/openfoodfacts/openfoodfacts-server/blob/main/.github/labeler.yml, giving it a priority, editing the original issue to have a more comprehensive description… Thank you very much for your contribution to 🍊 Open Food Facts

@github-actions github-actions bot added the ⏰ Stale This issue hasn't seen activity in a while. You can try documenting more to unblock it. label Dec 31, 2023
@teolemon teolemon added API Issues related to the Open Food Facts API. More specific labels exist & should be used (API WRITE…) API WRITE WRITE API to allow sending product info and image API READ All READ APIs include Product, Search… 🧽 API - Quality 🔐 API auth The API requires auth in order to perform editing.There is a common mechanism & a Robotoff mechanism API v3 📚 OpenAPI labels Apr 26, 2024
@teolemon teolemon added API Refactor and removed ⏰ Stale This issue hasn't seen activity in a while. You can try documenting more to unblock it. ♞ Epic An epic groups several tasks/issues. It should have a meaning for users. labels Oct 11, 2024
stephanegigandet pushed a commit that referenced this issue Oct 24, 2024
…ty to solve openapi linter errors/warnings (#10922)

<!-- IMPORTANT CHECKLIST
Make sure you've done all the following (You can delete the checklist
before submitting)
- [x] PR title is prefixed by one of the following: feat, fix, docs,
style, refactor, test, build, ci, chore, revert, l10n, taxonomy
- [x] Code is well documented
- [x] Include unit tests for new functionality
- [x] Code passes GitHub workflow checks in your branch
- [x] If you have multiple commits please combine them into one commit
by squashing them.
- [x] Read and understood the [contribution
guidelines](https://github.com/openfoodfacts/openfoodfacts-server/blob/main/CONTRIBUTING.md)
-->

### What

This request was born from the desire to fix some validation errors
raised by the most common SDK client generators (openapi, swagger,
redocly). The pull request unifies the 2 definitions of `get by barcode`
and adds `security schemes` and authentication endpoints to the Open
Food Facts API.

- Added security schemes for `cookieAuth` and `userAgentAuth`.
- Added security definitions to existing endpoints.
- Introduced new endpoint `/cgi/session.pl` for login and obtaining a
session cookie.
- Updated components with new schema `AppCredentials`.
- Added security section to specify no authentication required by
default for read requests.
- Updated tags to include `Authentication` for endpoints related to
authentication.
- Unified `get by barcode` and removed path with query string to solve
Redocly and Swagger validation error: "Problem: Don't put query string
items in the path, they belong in parameters with `in: query`."

### Screenshot
```
> @food-alpha/[email protected] build:tsfetch ~/projects/food-alpha/packages/off-clients
> cd ./clients/ts-fetch && pnpm install && pnpm run build

Scope: all 4 workspace projects
../../../pwa                     |  WARN  deprecated [email protected]
 WARN  5 deprecated subdependencies found: @humanwhocodes/[email protected], @humanwhocodes/[email protected], [email protected], [email protected], [email protected]
../../../..                              |   +1 +
../../../..                              | Progress: resolved 1233, reused 1186, downloaded 0, added 1, done
. prepare$ pnpm run build
│ > @food-alpha/[email protected] build ~/projects/food-alpha/packages/off-clients…
│ > tsc
└─ Done in 2.3s
Done in 19.2s

> @food-alpha/[email protected] build ~/projects/food-alpha/packages/off-clients/clients/ts-fetch
> tsc


> @food-alpha/[email protected] gen:api ~/projects/food-alpha/packages/off-clients
> java -jar ../../../../_GH/_java/openapi-generator/modules/openapi-generator-cli/target/openapi-generator-cli.jar generate -i ./fork-shinjigi-4pullrequest-api-ref/api.yml -g openapi-yaml -o openapi/

[main] WARN  o.o.codegen.DefaultCodegen - Generation using 3.1.0 specs is in development and is not officially supported yet. If you would like to expedite development, please consider working on the open issues in the 3.1.0 project: https://github.com/orgs/OpenAPITools/projects/4/views/1 and reach out to our team on Slack at https://join.slack.com/t/openapi-generator/shared_invite/zt-12jxxd7p2-XUeQM~4pzsU9x~eGLQqX2g
[main] INFO  o.o.codegen.DefaultGenerator - Generating with dryRun=false
[main] INFO  o.o.codegen.DefaultGenerator - OpenAPI Generator: openapi-yaml (documentation)
[main] INFO  o.o.codegen.DefaultGenerator - Generator 'openapi-yaml' is considered stable.
[main] INFO  o.o.c.languages.OpenAPIYamlGenerator - Output file [outputFile=openapi/openapi.yaml]
[main] INFO  o.o.codegen.InlineModelResolver - Inline schema created as product_misc_nutrient_levels. To have complete control of the model name, set the `title` field or use the modelNameMapping option (e.g. --model-name-mappings product_misc_nutrient_levels=NewModel,ModelA=NewModelA in CLI) or inlineSchemaNameMapping option (--inline-schema-name-mappings product_misc_nutrient_levels=NewModel,ModelA=NewModelA in CLI).
[main] INFO  o.o.codegen.InlineModelResolver - Inline schema created as Packaging_component_shape. To have complete control of the model name, set the `title` field or use the modelNameMapping option (e.g. --model-name-mappings Packaging_component_shape=NewModel,ModelA=NewModelA in CLI) or inlineSchemaNameMapping option (--inline-schema-name-mappings Packaging_component_shape=NewModel,ModelA=NewModelA in CLI).
[main] INFO  o.o.codegen.InlineModelResolver - Inline schema created as Packaging_component_material. To have complete control of the model name, set the `title` field or use the modelNameMapping option (e.g. --model-name-mappings Packaging_component_material=NewModel,ModelA=NewModelA in CLI) or inlineSchemaNameMapping option (--inline-schema-name-mappings Packaging_component_material=NewModel,ModelA=NewModelA in CLI).
[main] INFO  o.o.codegen.InlineModelResolver - Inline schema created as Packaging_component_recycling_instruction. To have complete control of the model name, set the `title` field or use the modelNameMapping option (e.g. --model-name-mappings Packaging_component_recycling_instruction=NewModel,ModelA=NewModelA in CLI) or inlineSchemaNameMapping option (--inline-schema-name-mappings Packaging_component_recycling_instruction=NewModel,ModelA=NewModelA in CLI).
[main] INFO  o.o.codegen.InlineModelResolver - Inline schema created as Packaging_component__READ_. To have complete control of the model name, set the `title` field or use the modelNameMapping option (e.g. --model-name-mappings Packaging_component__READ_=NewModel,ModelA=NewModelA in CLI) or inlineSchemaNameMapping option (--inline-schema-name-mappings Packaging_component__READ_=NewModel,ModelA=NewModelA in CLI).
[main] INFO  o.o.codegen.InlineModelResolver - Inline schema created as image_sizes. To have complete control of the model name, set the `title` field or use the modelNameMapping option (e.g. --model-name-mappings image_sizes=NewModel,ModelA=NewModelA in CLI) or inlineSchemaNameMapping option (--inline-schema-name-mappings image_sizes=NewModel,ModelA=NewModelA in CLI).
[main] INFO  o.o.codegen.InlineModelResolver - Inline schema created as image_role_sizes. To have complete control of the model name, set the `title` field or use the modelNameMapping option (e.g. --model-name-mappings image_role_sizes=NewModel,ModelA=NewModelA in CLI) or inlineSchemaNameMapping option (--inline-schema-name-mappings image_role_sizes=NewModel,ModelA=NewModelA in CLI).
[main] INFO  o.o.codegen.InlineModelResolver - Inline schema created as product_selected_images_front. To have complete control of the model name, set the `title` field or use the modelNameMapping option (e.g. --model-name-mappings product_selected_images_front=NewModel,ModelA=NewModelA in CLI) or inlineSchemaNameMapping option (--inline-schema-name-mappings product_selected_images_front=NewModel,ModelA=NewModelA in CLI).
[main] INFO  o.o.codegen.InlineModelResolver - Inline schema created as product_ecoscore_data_adjustments_origins_of_ingredients_transportation_scores. To have complete control of the model name, set the `title` field or use the modelNameMapping option (e.g. --model-name-mappings product_ecoscore_data_adjustments_origins_of_ingredients_transportation_scores=NewModel,ModelA=NewModelA in CLI) or inlineSchemaNameMapping option (--inline-schema-name-mappings product_ecoscore_data_adjustments_origins_of_ingredients_transportation_scores=NewModel,ModelA=NewModelA in CLI).
[main] INFO  o.o.codegen.InlineModelResolver - Inline schema created as product_ecoscore_data_adjustments_origins_of_ingredients. To have complete control of the model name, set the `title` field or use the modelNameMapping option (e.g. --model-name-mappings product_ecoscore_data_adjustments_origins_of_ingredients=NewModel,ModelA=NewModelA in CLI) or inlineSchemaNameMapping option (--inline-schema-name-mappings product_ecoscore_data_adjustments_origins_of_ingredients=NewModel,ModelA=NewModelA in CLI).
[main] INFO  o.o.codegen.InlineModelResolver - Inline schema created as product_ecoscore_data_adjustments_packaging. To have complete control of the model name, set the `title` field or use the modelNameMapping option (e.g. --model-name-mappings product_ecoscore_data_adjustments_packaging=NewModel,ModelA=NewModelA in CLI) or inlineSchemaNameMapping option (--inline-schema-name-mappings product_ecoscore_data_adjustments_packaging=NewModel,ModelA=NewModelA in CLI).
[main] INFO  o.o.codegen.InlineModelResolver - Inline schema created as product_ecoscore_data_adjustments_production_system. To have complete control of the model name, set the `title` field or use the modelNameMapping option (e.g. --model-name-mappings product_ecoscore_data_adjustments_production_system=NewModel,ModelA=NewModelA in CLI) or inlineSchemaNameMapping option (--inline-schema-name-mappings product_ecoscore_data_adjustments_production_system=NewModel,ModelA=NewModelA in CLI).
[main] INFO  o.o.codegen.InlineModelResolver - Inline schema created as product_ecoscore_data_adjustments_threatened_species. To have complete control of the model name, set the `title` field or use the modelNameMapping option (e.g. --model-name-mappings product_ecoscore_data_adjustments_threatened_species=NewModel,ModelA=NewModelA in CLI) or inlineSchemaNameMapping option (--inline-schema-name-mappings product_ecoscore_data_adjustments_threatened_species=NewModel,ModelA=NewModelA in CLI).
[main] INFO  o.o.codegen.InlineModelResolver - Inline schema created as product_ecoscore_data_adjustments. To have complete control of the model name, set the `title` field or use the modelNameMapping option (e.g. --model-name-mappings product_ecoscore_data_adjustments=NewModel,ModelA=NewModelA in CLI) or inlineSchemaNameMapping option (--inline-schema-name-mappings product_ecoscore_data_adjustments=NewModel,ModelA=NewModelA in CLI).
[main] INFO  o.o.codegen.InlineModelResolver - Inline schema created as product_ecoscore_data_agribalyse. To have complete control of the model name, set the `title` field or use the modelNameMapping option (e.g. --model-name-mappings product_ecoscore_data_agribalyse=NewModel,ModelA=NewModelA in CLI) or inlineSchemaNameMapping option (--inline-schema-name-mappings product_ecoscore_data_agribalyse=NewModel,ModelA=NewModelA in CLI).
[main] INFO  o.o.codegen.InlineModelResolver - Inline schema created as product_ecoscore_data_missing. To have complete control of the model name, set the `title` field or use the modelNameMapping option (e.g. --model-name-mappings product_ecoscore_data_missing=NewModel,ModelA=NewModelA in CLI) or inlineSchemaNameMapping option (--inline-schema-name-mappings product_ecoscore_data_missing=NewModel,ModelA=NewModelA in CLI).
[main] INFO  o.o.codegen.InlineModelResolver - Inline schema created as product_ecoscore_data_previous_data. To have complete control of the model name, set the `title` field or use the modelNameMapping option (e.g. --model-name-mappings product_ecoscore_data_previous_data=NewModel,ModelA=NewModelA in CLI) or inlineSchemaNameMapping option (--inline-schema-name-mappings product_ecoscore_data_previous_data=NewModel,ModelA=NewModelA in CLI).
[main] INFO  o.o.codegen.InlineModelResolver - Inline schema created as ingredient_percent_max. To have complete control of the model name, set the `title` field or use the modelNameMapping option (e.g. --model-name-mappings ingredient_percent_max=NewModel,ModelA=NewModelA in CLI) or inlineSchemaNameMapping option (--inline-schema-name-mappings ingredient_percent_max=NewModel,ModelA=NewModelA in CLI).
[main] INFO  o.o.codegen.InlineModelResolver - Inline schema created as product_ingredients_ingredients_analysis. To have complete control of the model name, set the `title` field or use the modelNameMapping option (e.g. --model-name-mappings product_ingredients_ingredients_analysis=NewModel,ModelA=NewModelA in CLI) or inlineSchemaNameMapping option (--inline-schema-name-mappings product_ingredients_ingredients_analysis=NewModel,ModelA=NewModelA in CLI).
[main] INFO  o.o.codegen.InlineModelResolver - Inline schema created as product_ingredients_traces_hierarchy_inner. To have complete control of the model name, set the `title` field or use the modelNameMapping option (e.g. --model-name-mappings product_ingredients_traces_hierarchy_inner=NewModel,ModelA=NewModelA in CLI) or inlineSchemaNameMapping option (--inline-schema-name-mappings product_ingredients_traces_hierarchy_inner=NewModel,ModelA=NewModelA in CLI).
[main] INFO  o.o.codegen.InlineModelResolver - Inline schema created as product_nutrition_nutriments. To have complete control of the model name, set the `title` field or use the modelNameMapping option (e.g. --model-name-mappings product_nutrition_nutriments=NewModel,ModelA=NewModelA in CLI) or inlineSchemaNameMapping option (--inline-schema-name-mappings product_nutrition_nutriments=NewModel,ModelA=NewModelA in CLI).
[main] INFO  o.o.codegen.InlineModelResolver - Inline schema created as product_nutrition_nutriscore_data. To have complete control of the model name, set the `title` field or use the modelNameMapping option (e.g. --model-name-mappings product_nutrition_nutriscore_data=NewModel,ModelA=NewModelA in CLI) or inlineSchemaNameMapping option (--inline-schema-name-mappings product_nutrition_nutriscore_data=NewModel,ModelA=NewModelA in CLI).
[main] INFO  o.o.codegen.InlineModelResolver - Inline schema created as product_extended_categories_properties. To have complete control of the model name, set the `title` field or use the modelNameMapping option (e.g. --model-name-mappings product_extended_categories_properties=NewModel,ModelA=NewModelA in CLI) or inlineSchemaNameMapping option (--inline-schema-name-mappings product_extended_categories_properties=NewModel,ModelA=NewModelA in CLI).
[main] INFO  o.o.codegen.InlineModelResolver - Inline schema created as product_extended_owner_fields_additionalProperties. To have complete control of the model name, set the `title` field or use the modelNameMapping option (e.g. --model-name-mappings product_extended_owner_fields_additionalProperties=NewModel,ModelA=NewModelA in CLI) or inlineSchemaNameMapping option (--inline-schema-name-mappings product_extended_owner_fields_additionalProperties=NewModel,ModelA=NewModelA in CLI).
[main] INFO  o.o.codegen.InlineModelResolver - Inline schema created as product_extended_owner_fields. To have complete control of the model name, set the `title` field or use the modelNameMapping option (e.g. --model-name-mappings product_extended_owner_fields=NewModel,ModelA=NewModelA in CLI) or inlineSchemaNameMapping option (--inline-schema-name-mappings product_extended_owner_fields=NewModel,ModelA=NewModelA in CLI).
[main] INFO  o.o.codegen.InlineModelResolver - Inline schema created as product_extended_nova_groups_markers. To have complete control of the model name, set the `title` field or use the modelNameMapping option (e.g. --model-name-mappings product_extended_nova_groups_markers=NewModel,ModelA=NewModelA in CLI) or inlineSchemaNameMapping option (--inline-schema-name-mappings product_extended_nova_groups_markers=NewModel,ModelA=NewModelA in CLI).
[main] INFO  o.o.codegen.InlineModelResolver - Inline schema created as product_meta_source_manufacturer. To have complete control of the model name, set the `title` field or use the modelNameMapping option (e.g. --model-name-mappings product_meta_source_manufacturer=NewModel,ModelA=NewModelA in CLI) or inlineSchemaNameMapping option (--inline-schema-name-mappings product_meta_source_manufacturer=NewModel,ModelA=NewModelA in CLI).
[main] INFO  o.o.codegen.InlineModelResolver - Inline schema created as product_meta_source_fields_org_gs1. To have complete control of the model name, set the `title` field or use the modelNameMapping option (e.g. --model-name-mappings product_meta_source_fields_org_gs1=NewModel,ModelA=NewModelA in CLI) or inlineSchemaNameMapping option (--inline-schema-name-mappings product_meta_source_fields_org_gs1=NewModel,ModelA=NewModelA in CLI).
[main] INFO  o.o.codegen.InlineModelResolver - Inline schema created as get_cgi_product_image_upload_pl_request. To have complete control of the model name, set the `title` field or use the modelNameMapping option (e.g. --model-name-mappings get_cgi_product_image_upload_pl_request=NewModel,ModelA=NewModelA in CLI) or inlineSchemaNameMapping option (--inline-schema-name-mappings get_cgi_product_image_upload_pl_request=NewModel,ModelA=NewModelA in CLI).
[main] INFO  o.o.codegen.InlineModelResolver - Inline schema created as add_photo_to_existing_product_response_files_inner. To have complete control of the model name, set the `title` field or use the modelNameMapping option (e.g. --model-name-mappings add_photo_to_existing_product_response_files_inner=NewModel,ModelA=NewModelA in CLI) or inlineSchemaNameMapping option (--inline-schema-name-mappings add_photo_to_existing_product_response_files_inner=NewModel,ModelA=NewModelA in CLI).
[main] INFO  o.o.codegen.InlineModelResolver - Inline schema created as add_photo_to_existing_product_response_image. To have complete control of the model name, set the `title` field or use the modelNameMapping option (e.g. --model-name-mappings add_photo_to_existing_product_response_image=NewModel,ModelA=NewModelA in CLI) or inlineSchemaNameMapping option (--inline-schema-name-mappings add_photo_to_existing_product_response_image=NewModel,ModelA=NewModelA in CLI).
[main] INFO  o.o.codegen.InlineModelResolver - Inline schema created as rotate_a_photo_response_image. To have complete control of the model name, set the `title` field or use the modelNameMapping option (e.g. --model-name-mappings rotate_a_photo_response_image=NewModel,ModelA=NewModelA in CLI) or inlineSchemaNameMapping option (--inline-schema-name-mappings rotate_a_photo_response_image=NewModel,ModelA=NewModelA in CLI).
[main] INFO  o.o.codegen.InlineModelResolver - Inline schema created as post_cgi_product_image_crop_pl_request. To have complete control of the model name, set the `title` field or use the modelNameMapping option (e.g. --model-name-mappings post_cgi_product_image_crop_pl_request=NewModel,ModelA=NewModelA in CLI) or inlineSchemaNameMapping option (--inline-schema-name-mappings post_cgi_product_image_crop_pl_request=NewModel,ModelA=NewModelA in CLI).
[main] INFO  o.o.codegen.InlineModelResolver - Inline schema created as post_cgi_product_jqm2_pl_request. To have complete control of the model name, set the `title` field or use the modelNameMapping option (e.g. --model-name-mappings post_cgi_product_jqm2_pl_request=NewModel,ModelA=NewModelA in CLI) or inlineSchemaNameMapping option (--inline-schema-name-mappings post_cgi_product_jqm2_pl_request=NewModel,ModelA=NewModelA in CLI).
[main] INFO  o.o.codegen.InlineModelResolver - Inline schema created as get_preferences_200_response_inner. To have complete control of the model name, set the `title` field or use the modelNameMapping option (e.g. --model-name-mappings get_preferences_200_response_inner=NewModel,ModelA=NewModelA in CLI) or inlineSchemaNameMapping option (--inline-schema-name-mappings get_preferences_200_response_inner=NewModel,ModelA=NewModelA in CLI).
[main] INFO  o.o.codegen.InlineModelResolver - Inline schema created as get_cgi_session_pl_request. To have complete control of the model name, set the `title` field or use the modelNameMapping option (e.g. --model-name-mappings get_cgi_session_pl_request=NewModel,ModelA=NewModelA in CLI) or inlineSchemaNameMapping option (--inline-schema-name-mappings get_cgi_session_pl_request=NewModel,ModelA=NewModelA in CLI).
[main] INFO  o.o.codegen.InlineModelResolver - Inline schema created as product_selected_images_1_front_display. To have complete control of the model name, set the `title` field or use the modelNameMapping option (e.g. --model-name-mappings product_selected_images_1_front_display=NewModel,ModelA=NewModelA in CLI) or inlineSchemaNameMapping option (--inline-schema-name-mappings product_selected_images_1_front_display=NewModel,ModelA=NewModelA in CLI).
[main] INFO  o.o.codegen.InlineModelResolver - Inline schema created as product_selected_images_1_front_small. To have complete control of the model name, set the `title` field or use the modelNameMapping option (e.g. --model-name-mappings product_selected_images_1_front_small=NewModel,ModelA=NewModelA in CLI) or inlineSchemaNameMapping option (--inline-schema-name-mappings product_selected_images_1_front_small=NewModel,ModelA=NewModelA in CLI).
[main] INFO  o.o.codegen.InlineModelResolver - Inline schema created as product_selected_images_1_front_thumb. To have complete control of the model name, set the `title` field or use the modelNameMapping option (e.g. --model-name-mappings product_selected_images_1_front_thumb=NewModel,ModelA=NewModelA in CLI) or inlineSchemaNameMapping option (--inline-schema-name-mappings product_selected_images_1_front_thumb=NewModel,ModelA=NewModelA in CLI).
[main] INFO  o.o.codegen.InlineModelResolver - Inline schema created as product_selected_images_1_front. To have complete control of the model name, set the `title` field or use the modelNameMapping option (e.g. --model-name-mappings product_selected_images_1_front=NewModel,ModelA=NewModelA in CLI) or inlineSchemaNameMapping option (--inline-schema-name-mappings product_selected_images_1_front=NewModel,ModelA=NewModelA in CLI).
[main] INFO  o.o.codegen.InlineModelResolver - Inline schema created as product_selected_images_1. To have complete control of the model name, set the `title` field or use the modelNameMapping option (e.g. --model-name-mappings product_selected_images_1=NewModel,ModelA=NewModelA in CLI) or inlineSchemaNameMapping option (--inline-schema-name-mappings product_selected_images_1=NewModel,ModelA=NewModelA in CLI).
[main] INFO  o.o.codegen.InlineModelResolver - Inline schema created as product_ecoscore_data_1_grades. To have complete control of the model name, set the `title` field or use the modelNameMapping option (e.g. --model-name-mappings product_ecoscore_data_1_grades=NewModel,ModelA=NewModelA in CLI) or inlineSchemaNameMapping option (--inline-schema-name-mappings product_ecoscore_data_1_grades=NewModel,ModelA=NewModelA in CLI).
[main] INFO  o.o.codegen.InlineModelResolver - Inline schema created as product_ecoscore_data_1. To have complete control of the model name, set the `title` field or use the modelNameMapping option (e.g. --model-name-mappings product_ecoscore_data_1=NewModel,ModelA=NewModelA in CLI) or inlineSchemaNameMapping option (--inline-schema-name-mappings product_ecoscore_data_1=NewModel,ModelA=NewModelA in CLI).
[main] INFO  o.o.codegen.InlineModelResolver - Inline schema created as product_ingredients_percent_max. To have complete control of the model name, set the `title` field or use the modelNameMapping option (e.g. --model-name-mappings product_ingredients_percent_max=NewModel,ModelA=NewModelA in CLI) or inlineSchemaNameMapping option (--inline-schema-name-mappings product_ingredients_percent_max=NewModel,ModelA=NewModelA in CLI).
[main] INFO  o.o.codegen.InlineModelResolver - Inline schema created as ingredient_1. To have complete control of the model name, set the `title` field or use the modelNameMapping option (e.g. --model-name-mappings ingredient_1=NewModel,ModelA=NewModelA in CLI) or inlineSchemaNameMapping option (--inline-schema-name-mappings ingredient_1=NewModel,ModelA=NewModelA in CLI).
[main] INFO  o.o.codegen.InlineModelResolver - Inline schema created as product_ingredients_traces_hierarchy. To have complete control of the model name, set the `title` field or use the modelNameMapping option (e.g. --model-name-mappings product_ingredients_traces_hierarchy=NewModel,ModelA=NewModelA in CLI) or inlineSchemaNameMapping option (--inline-schema-name-mappings product_ingredients_traces_hierarchy=NewModel,ModelA=NewModelA in CLI).
[main] INFO  o.o.codegen.InlineModelResolver - Inline schema created as product_ingredients_traces_tags. To have complete control of the model name, set the `title` field or use the modelNameMapping option (e.g. --model-name-mappings product_ingredients_traces_tags=NewModel,ModelA=NewModelA in CLI) or inlineSchemaNameMapping option (--inline-schema-name-mappings product_ingredients_traces_tags=NewModel,ModelA=NewModelA in CLI).
[main] INFO  o.o.codegen.InlineModelResolver - Inline schema created as product_extended_owner_fields_1_additionalProperties. To have complete control of the model name, set the `title` field or use the modelNameMapping option (e.g. --model-name-mappings product_extended_owner_fields_1_additionalProperties=NewModel,ModelA=NewModelA in CLI) or inlineSchemaNameMapping option (--inline-schema-name-mappings product_extended_owner_fields_1_additionalProperties=NewModel,ModelA=NewModelA in CLI).
[main] INFO  o.o.codegen.InlineModelResolver - Inline schema created as product_extended_owner_fields_1. To have complete control of the model name, set the `title` field or use the modelNameMapping option (e.g. --model-name-mappings product_extended_owner_fields_1=NewModel,ModelA=NewModelA in CLI) or inlineSchemaNameMapping option (--inline-schema-name-mappings product_extended_owner_fields_1=NewModel,ModelA=NewModelA in CLI).
[main] INFO  o.o.codegen.InlineModelResolver - Inline schema created as Product_allOf_languages_codes. To have complete control of the model name, set the `title` field or use the modelNameMapping option (e.g. --model-name-mappings Product_allOf_languages_codes=NewModel,ModelA=NewModelA in CLI) or inlineSchemaNameMapping option (--inline-schema-name-mappings Product_allOf_languages_codes=NewModel,ModelA=NewModelA in CLI).
[main] INFO  o.o.codegen.InlineModelResolver - Inline schema created as Product_allOf_manufacturer. To have complete control of the model name, set the `title` field or use the modelNameMapping option (e.g. --model-name-mappings Product_allOf_manufacturer=NewModel,ModelA=NewModelA in CLI) or inlineSchemaNameMapping option (--inline-schema-name-mappings Product_allOf_manufacturer=NewModel,ModelA=NewModelA in CLI).
[main] INFO  o.o.codegen.InlineModelResolver - Inline schema created as product_meta_source_1. To have complete control of the model name, set the `title` field or use the modelNameMapping option (e.g. --model-name-mappings product_meta_source_1=NewModel,ModelA=NewModelA in CLI) or inlineSchemaNameMapping option (--inline-schema-name-mappings product_meta_source_1=NewModel,ModelA=NewModelA in CLI).
[main] WARN  o.o.codegen.DefaultCodegen - Generation using 3.1.0 specs is in development and is not officially supported yet. If you would like to expedite development, please consider working on the open issues in the 3.1.0 project: https://github.com/orgs/OpenAPITools/projects/4/views/1 and reach out to our team on Slack at https://join.slack.com/t/openapi-generator/shared_invite/zt-12jxxd7p2-XUeQM~4pzsU9x~eGLQqX2g
[main] INFO  o.o.codegen.DefaultGenerator - Model get_cgi_product_image_upload_pl_request not generated since it's marked as unused (due to form parameters) and `skipFormModel` (global property) set to true (default)
[main] INFO  o.o.codegen.DefaultGenerator - Model post_cgi_product_image_crop_pl_request not generated since it's marked as unused (due to form parameters) and `skipFormModel` (global property) set to true (default)
[main] INFO  o.o.codegen.DefaultGenerator - Model unselect_a_photo_request not generated since it's marked as unused (due to form parameters) and `skipFormModel` (global property) set to true (default)
[main] INFO  o.o.codegen.DefaultGenerator - Model post_cgi_product_jqm2_pl_request not generated since it's marked as unused (due to form parameters) and `skipFormModel` (global property) set to true (default)
[main] INFO  o.o.codegen.DefaultGenerator - Model get_cgi_session_pl_request not generated since it's marked as unused (due to form parameters) and `skipFormModel` (global property) set to true (default)
[main] INFO  o.o.codegen.DefaultGenerator - Model product_selected_images_1_front_display not generated since it's a free-form object
[main] INFO  o.o.codegen.DefaultGenerator - Model product_selected_images_1_front_small not generated since it's a free-form object
[main] INFO  o.o.codegen.DefaultGenerator - Model product_selected_images_1_front_thumb not generated since it's a free-form object
[main] INFO  o.o.codegen.DefaultGenerator - Model product_ecoscore_data_1_grades not generated since it's a free-form object
[main] INFO  o.o.codegen.DefaultGenerator - Model Product_allOf_languages_codes not generated since it's a free-form object
[main] WARN  o.o.codegen.DefaultCodegen - Could not compute datatypeWithEnum from string, null
[main] WARN  o.o.codegen.DefaultCodegen - Could not compute datatypeWithEnum from string, null
[main] WARN  o.o.codegen.DefaultCodegen - Could not compute datatypeWithEnum from string, null
[main] INFO  o.o.codegen.TemplateManager - writing file ~/projects/food-alpha/packages/off-clients/openapi/README.md
[main] INFO  o.o.codegen.TemplateManager - writing file ~/projects/food-alpha/packages/off-clients/openapi/openapi/openapi.yaml
[main] INFO  o.o.codegen.TemplateManager - Skipped ~/projects/food-alpha/packages/off-clients/openapi/.openapi-generator-ignore (Skipped by supportingFiles options supplied by user.)
[main] INFO  o.o.codegen.TemplateManager - writing file ~/projects/food-alpha/packages/off-clients/openapi/.openapi-generator/VERSION
[main] INFO  o.o.codegen.TemplateManager - writing file ~/projects/food-alpha/packages/off-clients/openapi/.openapi-generator/FILES
################################################################################
# Thanks for using OpenAPI Generator.                                          #
# Please consider donation to help us maintain this project 🙏                 #
# https://opencollective.com/openapi_generator/donate                          #
################################################################################

> @food-alpha/[email protected] redocly:lint ~/projects/food-alpha/packages/off-clients
> npx @redocly/cli@latest lint  off@v1

validating ./fork-shinjigi-4pullrequest-api-ref/api.yml...
./fork-shinjigi-4pullrequest-api-ref/api.yml: validated in 100ms

Woohoo! Your API description is valid. 🎉


> @food-alpha/[email protected] redocly ~/projects/food-alpha/packages/off-clients
> npx @redocly/cli@latest build-docs ./fork-shinjigi-4pullrequest-api-ref/api.yml --output ./clients/redocly/redocly.html

Found redocly.yaml and using theme.openapi options
Prerendering docs

🎉 bundled successfully in: ./clients/redocly/redocly.html (701 KiB) [⏱ 2ms].
```

### Related issue(s) and discussion
<!-- Please add the issue number this issue will close, that way, once
your pull request is merged, the issue will be closed as well -->
- Related to:
#7446 
#9419 
#8039
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🧽 API - Quality 🔐 API auth The API requires auth in order to perform editing.There is a common mechanism & a Robotoff mechanism API READ All READ APIs include Product, Search… API Refactor API v3 API WRITE WRITE API to allow sending product info and image API Issues related to the Open Food Facts API. More specific labels exist & should be used (API WRITE…) 📚 Documentation Documentation issues improve the project for everyone. 📚 OpenAPI
Development

No branches or pull requests

2 participants