View Source OpenApiSpex.JsonErrorResponse (open_api_spex v3.21.2)

Schema for the default error renderer used by OpenApiSpex.Plug.CastAndValidate.

Examples

@doc responses: %{
       201 => {"User", "application/json", UserResponse}
       422 => {"Unprocessable Entity", "application/json", OpenApiSpex.JsonErrorResponse}
     }

Summary

Functions

Convenience function to return that wraps JsonErrorResponse in an Operation response.

Callback implementation for OpenApiSpex.Schema.schema/0.

Types

@type t() :: %OpenApiSpex.JsonErrorResponse{errors: term()}

Functions

Convenience function to return that wraps JsonErrorResponse in an Operation response.

Examples

@doc responses: %{
       201 => {"User", "application/json", UserResponse}
       422 => OpenApiSpex.JsonErrorResponse.response()
     }

Callback implementation for OpenApiSpex.Schema.schema/0.