Skip to content

Conversation

@zzak
Copy link
Contributor

@zzak zzak commented Apr 5, 2025

Depends on ota42y/openapi_parser#182.

I wasn't sure how to version guard this, but the tests pass using my branch. But this won't work without a version of openapi_parser which includes that option.

I chose to test the validation error message, but there weren't other examples like this in the code base so maybe unnecessary (testing the parser, not the tool). More just me making sure things were lined up properly.

Copy link
Member

@geemus geemus left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good overall, suggested a couple of fixes for the test names and a possible way to guard for backwards compatibility, let me know what you think. Thanks!

@zzak zzak force-pushed the allow_empty_date_and_datetime branch from 7e00fe9 to 347d57e Compare April 6, 2025 01:52
@zzak
Copy link
Contributor Author

zzak commented Apr 6, 2025

Hang on, I think we also need this in the response validator too.

Committee::InvalidResponse:
   #/components/schemas/Component/properties/originated_at Value: "" is not conformant with date-time format
 # lib/committee/schema_validator/open_api_3/operation_wrapper.rb:39:in `rescue in validate_response_params'
 # lib/committee/schema_validator/open_api_3/operation_wrapper.rb:34:in `validate_response_params'
 # lib/committee/schema_validator/open_api_3/response_validator.rb:20:in `call'
 # lib/committee/schema_validator/open_api_3.rb:46:in `response_validate'
 # lib/committee/test/methods.rb:40:in `assert_response_schema_confirm'
 # lib/committee/test/methods.rb:8:in `assert_schema_conform'

I'm looking into it, but I think we may need to patch openapi_parser again 😭

Co-authored-by: Wesley Beary <geemus@gmail.com>
@zzak zzak force-pushed the allow_empty_date_and_datetime branch from 347d57e to 2dd5e69 Compare April 6, 2025 08:53
@zzak
Copy link
Contributor Author

zzak commented Apr 6, 2025

Ok, I've tested this with ota42y/openapi_parser#183 and everything is working now.

Copy link
Member

@geemus geemus left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm, thanks!

@geemus geemus merged commit 9727f9b into interagent:master Apr 7, 2025
8 checks passed
@geemus
Copy link
Member

geemus commented Apr 7, 2025

@zzak thanks again for working through that. Is that everything you needed to change? Do we just need a committee release now?

@zzak
Copy link
Contributor Author

zzak commented Apr 7, 2025

Thank you!! 🙇
Our tests are all passing with branches so I assume release shouldn't break anything. I will update it in my day tomorrow and let you know if anything goes wrong.

@geemus
Copy link
Member

geemus commented Apr 7, 2025

Sounds good.

Released v5.5.3

Just let me know if anything comes up.

@zzak zzak deleted the allow_empty_date_and_datetime branch April 7, 2025 23:15
@zzak
Copy link
Contributor Author

zzak commented Apr 7, 2025

🎉 Everything is working, thanks again for all your help!

@geemus
Copy link
Member

geemus commented Apr 7, 2025

Awesome, glad to hear it!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants