View Source OpenApiSpex.JsonErrorResponse (open_api_spex v3.16.0)

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

examples

Examples

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

Link to this section Summary

Functions

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

Callback implementation for OpenApiSpex.Schema.schema/0.

Link to this section Types

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

Link to this section Functions

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

examples

Examples

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

Callback implementation for OpenApiSpex.Schema.schema/0.