-
-
Notifications
You must be signed in to change notification settings - Fork 389
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
feat: api docs remove query string from get by barcode and add security to solve openapi linter errors/warnings #10922
Conversation
+ add type on obj to remove redocly linter error + TODO on image_role normalize and white_magic fields + uniform quotes
…ror. + Ingredient reference to fix generator referencing error.
…redocly and swagger validation error: "Problem: Don't put query string items in the path, they belong in parameters with `in: query`."
- 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.
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #10922 +/- ##
==========================================
- Coverage 49.54% 49.03% -0.51%
==========================================
Files 67 77 +10
Lines 20650 22229 +1579
Branches 4980 5313 +333
==========================================
+ Hits 10231 10901 +670
- Misses 9131 9994 +863
- Partials 1288 1334 +46 ☔ View full report in Codecov by Sentry. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks a lot @shinjigi
I just have a small point on order of parameters in cookie !
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you!
…ng_from_get_by_barcode
…ng_from_get_by_barcode
…https://github.com/shinjigi/openfoodfacts-server into feat_apidocs_remove_query_string_from_get_by_barcode
Quality Gate passedIssues Measures |
🤖 I have created a release *beep* *boop* --- ## [2.47.0](v2.46.0...v2.47.0) (2024-10-24) ### Features * api docs remove query string from get by barcode and add security to solve openapi linter errors/warnings ([#10922](#10922)) ([b7aefbd](b7aefbd)) * Eco-Score improvements and change of scale: A+ to F ([#10829](#10829)) ([87df665](87df665)) ### Bug Fixes * add googleOther bot ([#10912](#10912)) ([d56760a](d56760a)) * allow CORS requests for product image move ([#10920](#10920)) ([967a47e](967a47e)) * attribute for product without new nutriscore data ([#10915](#10915)) ([c413719](c413719)) * cosmetic changes for new Eco-Score grades ([#10921](#10921)) ([6e7dbfa](6e7dbfa)) * Revert "fix: remove unused jquery-ui safe-active-element module ([#10708](#10708))" ([#10924](#10924)) ([d290c54](d290c54)) --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please).
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 addssecurity schemes
and authentication endpoints to the Open Food Facts API.cookieAuth
anduserAgentAuth
./cgi/session.pl
for login and obtaining a session cookie.AppCredentials
.Authentication
for endpoints related to authentication.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 within: query
."Screenshot
Related issue(s) and discussion
📝 API Documentation using OpenAPI (tracker) #7446
Usability issues with the API doc #9419
OpenAPISpec is not a valid 3.1.0 openAPI-Spec #8039