-
Notifications
You must be signed in to change notification settings - Fork 194
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
Avoids overwriting Plug.Conn body_params and params with the cast outcome #425
Conversation
@mbuhot did you have the chance to review this? Is there something missing to have it merged? (sorry for bothering you) |
Thanks for the ping @albertored. This PR is very close.
|
a05585e
to
9958c2e
Compare
@mbuhot all your suggestions are now implemented |
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.
@albertored just one final suggestion to keep the values under conn.private.open_api_spex
(like we do for PutApiSpec) to prevent potential clashes with other plugs that OpenApiSpex users have in their apps.
f4aab1d
to
1bc81db
Compare
@mbuhot it should be ready now, thank you |
* Update depenedencies: OpenAPISpex + cursor based pagination * Update formatter config * Add internal server error implementation * Test errors * Implement pagination interface * Implement Plugins API module macros * Implement Public API base URI (to be used with path helpers once called from within forwarded router's scope) * Implement OpenAPI specs + schemas * Implement Shared Links context module * Add pagination and error views * Add Shared Link view * Implement Shared Link controller * Expose SharedLink.t() spec * Implement separate router for the Plugins API * Update moduledocs * Always wrap resource objects with `data` * Update moduledoc * Use open-api-spex/open_api_spex#425 due to open-api-spex/open_api_spex#92 * Rely on BASE_URL for swagger-ui server definition * Fixup goals migration * Migrate broken goals before deleting dupes * Remove bypassing test rate limiting for which there's none anyway * Move the context module under `Plausible.` namespace * Bring back conn assignment to PluginsAPICase template * Update test/plausible_web/plugins/api/controllers/shared_links_test.exs Co-authored-by: Uku Taht <Uku.taht@gmail.com> * Update renamed aliases * Seed static token for development purposes * Delegate Plugins API 500s to a familiar shape * Simplify with statement --------- Co-authored-by: Uku Taht <Uku.taht@gmail.com>
…ided by the :replace_params config option This allows us to configure Open API Spex to not overwrite the params with the casted versions which violates the Plug.Conn.t() contract open-api-spex/open_api_spex#92 open-api-spex/open_api_spex#425
See #398 and #376
As aked in this comment the flag for moving cast result to
conn.private
is now an option toCastAndValidate
plug.Credits to @riccardomanfrin and @lucacorti