-
Notifications
You must be signed in to change notification settings - Fork 69
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
Api 12293 remove extra validations #9588
Conversation
modules/appeals_api/spec/config/schemas/v1/200996_headers_json_spec.rb
Outdated
Show resolved
Hide resolved
modules/appeals_api/spec/fixtures/v2/invalid_200996_headers_characters.json
Outdated
Show resolved
Hide resolved
modules/appeals_api/spec/requests/v2/higher_level_reviews_controller_spec.rb
Outdated
Show resolved
Hide resolved
modules/appeals_api/spec/requests/v2/higher_level_reviews_controller_spec.rb
Show resolved
Hide resolved
|
||
context 'returns 422 when decison date is not a date' do | ||
let(:error_content) do | ||
{ 'status' => 422, 'detail' => "'banana' did not fit within the defined length limits" } |
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.
Hm. Seems like the detail should be something like, "'banana' is not a date", or that it didn't match the pattern, right?
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.
Note: We're going to create a ticket to look into whether this is the expected detail.
Description of change
Look into the date validations across all three appeal types
Original issue(s)
API-12293
Things to Know About This PR
Question posed: can we validate that a date is in the past with the schemas?
Research Findings
It seems that many people have opened issues hoping for this feature, and as far as I can tell, they have all been closed for various reasons. A somewhat recent documentation states that json_)schema allows for time duration as part of the schema, but not a max value for a date.