Record Class ProblemDetailSchema
java.lang.Object
java.lang.Record
nl.b3p.planmonitorwonen.api.model.ProblemDetailSchema
public record ProblemDetailSchema(String type, String title, int status, String detail, String instance, List<ValidationError> errors)
extends Record
Only used to document the format of error responses in the OpenAPI documentation. The responses are created by Spring
as a
ProblemDetail, which has its extra properties in a map not suitable for
documenting.-
Constructor Summary
ConstructorsConstructorDescriptionProblemDetailSchema(String type, String title, int status, String detail, String instance, List<ValidationError> errors) Creates an instance of aProblemDetailSchemarecord class. -
Method Summary
Modifier and TypeMethodDescriptiondetail()Returns the value of thedetailrecord component.final booleanIndicates whether some other object is "equal to" this one.errors()Returns the value of theerrorsrecord component.final inthashCode()Returns a hash code value for this object.instance()Returns the value of theinstancerecord component.intstatus()Returns the value of thestatusrecord component.title()Returns the value of thetitlerecord component.final StringtoString()Returns a string representation of this record class.type()Returns the value of thetyperecord component.
-
Constructor Details
-
ProblemDetailSchema
public ProblemDetailSchema(String type, String title, int status, String detail, String instance, List<ValidationError> errors) Creates an instance of aProblemDetailSchemarecord class.- Parameters:
type- the value for thetyperecord componenttitle- the value for thetitlerecord componentstatus- the value for thestatusrecord componentdetail- the value for thedetailrecord componentinstance- the value for theinstancerecord componenterrors- the value for theerrorsrecord component
-
-
Method Details
-
toString
-
hashCode
-
equals
Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. Reference components are compared withObjects::equals(Object,Object); primitive components are compared with thecomparemethod from their corresponding wrapper classes. -
type
Returns the value of thetyperecord component.- Returns:
- the value of the
typerecord component
-
title
Returns the value of thetitlerecord component.- Returns:
- the value of the
titlerecord component
-
status
public int status()Returns the value of thestatusrecord component.- Returns:
- the value of the
statusrecord component
-
detail
Returns the value of thedetailrecord component.- Returns:
- the value of the
detailrecord component
-
instance
Returns the value of theinstancerecord component.- Returns:
- the value of the
instancerecord component
-
errors
Returns the value of theerrorsrecord component.- Returns:
- the value of the
errorsrecord component
-