belgif / rest-guide

REST Guidelines of Belgian government institutions
https://www.belgif.be/specification/rest/api-guide/
Apache License 2.0
24 stars 4 forks source link

Using InputValidationProblem for urn:problem-type:belgif:missingPermission #114

Open jpraet opened 1 year ago

jpraet commented 1 year ago

https://www.belgif.be/specification/rest/api-guide/#missing-permission sometimes relates to usage of specific input parameters.

Currently it is not specifically mentioned in the rest-guide that a urn:problem-type:belgif:missingPermission may contain "issues" property (so using InputValidationProblem type instead of Problem type) with more details.

An example of where this IS specifically mentioned is https://www.belgif.be/specification/rest/api-guide/#resource-not-found.

pvdbosch commented 1 year ago

Additional properties (using a specialized Problem subtype are not) are always allowed; the guide can't exhaustively list every possible use case. Though this use case may be common enough to document it explicitly; to discuss on WG.

That said, I find it a bit weird to use InputValidationProblem in this and the resource not found problem case, because there can't be a list of nested issues (i.e. the InputValidationIssue structure at root level would suffice). Can be discussed in #108 .