fix: change INVALID_INPUT for INVALID_ARGUMENT according to guidelines#129
Conversation
| value: | ||
| status: 400 | ||
| code: INVALID_ARGUMENT | ||
| message: "Expected property is missing: subscriptionId" |
There was a problem hiding this comment.
- If the type is a special error, then the description could be also more concrete.
- This special 400 error shouldn't have a Generic400 as example
There was a problem hiding this comment.
I'm not completely getting the special error comment. Since in CAMARA we are using examples to include specific errors, I chose to create a different schema containing both examples. So this way we have two schemas, one containing only Generic 400 for the endpoints that doesn't have subscriptionId and another one containing both.
Is there a better way to do it without adding it inline? or do you mean that it should only have the specific error because the Generic doesn't apply?
What description do you think would be more appropriate?
There was a problem hiding this comment.
I thought that since we also have the Generic400 error, then this SubscriptionIdRequired is a specialized one, so it could have a
-
description like "SubscriptionId is missing" and
-
it should only have one example, exactly this case when subscriptionid is missing:
examples: status: 400 code: INVALID_ARGUMENT message: "Expected property is missing: subscriptionId"
There was a problem hiding this comment.
As discussed in the meeting we remove the missing suscriptionId example. It would make sense to maintain it if the error code was different, but since it is still INVALID ARGUMENT, we can skip it.
|
Hi @akoshunyadi I think we can merge this one so we can include it in the changelog too before the release |
What type of PR is this?
Add one of the following kinds:
What this PR does / why we need it:
Change old INVALID_INPUT 400 errors for INVALID_ARGUMENTS as stated in the commonalities guidelines