-
Notifications
You must be signed in to change notification settings - Fork 14
feat: respond 4xx when parameters are unrecognised #287
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
feat: respond 4xx when parameters are unrecognised #287
Conversation
… wrong or with incorrect value
…ractusx#48) Co-authored-by: Arnab Kumar Nandy (Cofinity-X) <150015794+arnabcx@users.noreply.github.com> Co-authored-by: Nitesh Sakhiya <37956326+niteshsakhiya@users.noreply.github.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I really don't like the approach of changing all the parameters fro there specific type to string values. that completely messes up the swagger documentation and gives one the impression that all values are allowed, without a hint that only specific values will work.
I'd really like to discuss this approach and not include it in the release, since it makes the swagger documentation more or less useless. The parameters are validated by the framework if a wrong value is set.
I think you have a valid point and I also agree with it. Anyway this request comes in order to make the life of the customer easier and to understand what is going on with the data they are requesting. Only the swagger is not enough for them to have a quick understanding on the errors that are thrown to them. It would be nice to discuss this deeply and then decide with we just drop it off or not. |
@leandro-cavalcante I recommend to discuss this in the next open portal meeting on Tuesday, I suggest that you write a message in the portal matrix chat, to reserve some time in the agenda for this issue. |
Description
Enhanced message errors for the end point /policy-content. Now when one or more required parameters are missing, the message error lists the required parameters and also possible values. Helping the user to identify incorrect or missing values faster.
Why
When requesting a policy from Get /policy-content, the client may use an incorrect parameter key, receive a 200 response, and incorrectly assume that the policy states what they intended it to state.
Issue
Enhance message errors
Checklist
Please delete options that are not relevant.