Class JsonApiErrors
java.lang.Object
com.toedter.spring.hateoas.jsonapi.JsonApiErrors
Class to build JSON:API compliant error messages.
-
Constructor Summary
ConstructorDescriptionJsonApiErrors
(JsonApiError jsonApiError) Creates JsonApiErrors with initialJsonApiError
. -
Method Summary
Modifier and TypeMethodDescriptionstatic JsonApiErrors
create()
Creates emptyJsonApiErrors
.Gets list ofJsonApiError
objects.toString()
withError
(JsonApiError jsonApiError) Adds anJsonApiError
to the list.
-
Constructor Details
-
JsonApiErrors
Creates JsonApiErrors with initialJsonApiError
.- Parameters:
jsonApiError
- the initialJsonApiError
-
JsonApiErrors
public JsonApiErrors()
-
-
Method Details
-
withError
Adds anJsonApiError
to the list.- Parameters:
jsonApiError
- theJsonApiError
to be added.- Returns:
- this
JsonApiErrors
object.
-
create
Creates emptyJsonApiErrors
.- Returns:
- A new
JsonApiErrors
object.
-
toString
-
getErrors
Gets list ofJsonApiError
objects.- Returns:
- list of
JsonApiError
objects.
-