Use json_response_and_validate_schema/2 in tests to validate OpenAPI schema
This commit is contained in:
parent
f1ca917bb0
commit
2efc00b3cf
7 changed files with 330 additions and 358 deletions
|
|
@ -26,6 +26,8 @@ defmodule Pleroma.Web.MastodonAPI.AccountController do
|
|||
alias Pleroma.Web.OAuth.Token
|
||||
alias Pleroma.Web.TwitterAPI.TwitterAPI
|
||||
|
||||
plug(OpenApiSpex.Plug.CastAndValidate, render_error: Pleroma.Web.ApiSpec.RenderError)
|
||||
|
||||
plug(:skip_plug, OAuthScopesPlug when action == :identity_proofs)
|
||||
|
||||
plug(
|
||||
|
|
@ -83,8 +85,6 @@ defmodule Pleroma.Web.MastodonAPI.AccountController do
|
|||
plug(RateLimiter, [name: :app_account_creation] when action == :create)
|
||||
plug(:assign_account_by_id when action in @needs_account)
|
||||
|
||||
plug(OpenApiSpex.Plug.CastAndValidate, render_error: Pleroma.Web.ApiSpec.RenderError)
|
||||
|
||||
action_fallback(Pleroma.Web.MastodonAPI.FallbackController)
|
||||
|
||||
defdelegate open_api_operation(action), to: Pleroma.Web.ApiSpec.AccountOperation
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue