open_api_spex v3.9.0 OpenApiSpex.JsonErrorResponse View Source
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.JsonApiErrorResponse}
}
Link to this section Summary
Functions
Convenience function to return that wraps JsonApiErrorResponse in an Operation response.
A module implementing the OpenApiSpex.Schema
behaviour should export a schema/0
function
that produces an OpenApiSpex.Schema
struct.
Link to this section Types
Link to this type
t()
View Source
t()
View Source
t() :: %OpenApiSpex.JsonErrorResponse{errors: term()}
t() :: %OpenApiSpex.JsonErrorResponse{errors: term()}
Link to this section Functions
Link to this function
response() View Source
Convenience function to return that wraps JsonApiErrorResponse in an Operation response.
Examples
@doc responses: %{
201 => {"User", "application/json", UserResponse}
422 => OpenApiSpex.JsonApiErrorResponse.response()
}
Link to this function
schema() View Source
A module implementing the OpenApiSpex.Schema
behaviour should export a schema/0
function
that produces an OpenApiSpex.Schema
struct.
Callback implementation for OpenApiSpex.Schema.schema/0
.