belgif / rest-problem-java

Java library for RFC 9457 Problems with support for standard problem types of the Belgif REST guide (https://www.belgif.be/specification/rest/api-guide/#error-handling)
https://belgif.github.io/rest-problem-java/
Apache License 2.0
3 stars 0 forks source link

Remove deprecated status and instance properties in InputValidationIssue #35

Closed jpraet closed 3 months ago

jpraet commented 4 months ago

We can probably remove the deprecated status and instance properties in InputValidationIssue. They exist because InputValidationIssue extends Problem in problem-v1.yaml, but they are not supposed to be used.

InputValidationIssue supports additionalProperties, so if really needed, these deprecated properties could still be used there.

jpraet commented 3 months ago

@pvdbosch is the "instance" property on InputValidationIssue discouraged or not? Only "status" is officially mentioned in https://github.com/belgif/openapi-problem/blob/6a89c0720a89d34c76f8e063c5856a7b2d64b389/src/main/openapi/problem/v1/problem-v1.yaml#L131.

pvdbosch commented 3 months ago

This has not yet been discussed AFAIK, but for most use cases, I don't think an identifier for each individual issue is useful and worthwhile. Usually, a single instance value on the InputValidationProblem should be sufficient.

jpraet commented 3 months ago

Ah, it came from a review comment on the rest-support library:

image

So in my opinion we can remove the properties if they are not intended to be used. As fallback, they can be added/retrieved via the additionalProperties.