69916 1010 ez ezr update insurance schema#814
Conversation
longmd
left a comment
There was a problem hiding this comment.
Can you do this change without even touching the EZ schema?? This is going to break the EZ again with this setup and we just don't want to be touching that right now.
Yes, I could, but that would mean keeping shared code that is no longer shared. I basically moved the shared code into the EZ schema, so it should be identical. |
|
I'd be okay with that in the short term. Its the |
There was a problem hiding this comment.
Pull Request Overview
This PR updates the 10-10EZR schema to incorporate the new insurance provider schema and corresponding test validations.
- Introduces an insuranceProvider helper and extended tests for the providers field in the schema.
- Updates the schema definition by validating insuranceProvider objects with required properties via an anyOf construct.
Reviewed Changes
Copilot reviewed 3 out of 4 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
| test/schemas/10-10EZR/schema.spec.js | Added test cases for various valid and invalid insuranceProvider object scenarios. |
| src/schemas/10-10EZR/schema.js | Updated the providers property to support the new insurance provider schema using conditional requirements. |
Files not reviewed (1)
- package.json: Language not supported
| providers: { | ||
| type: 'array', | ||
| items: definitions.insuranceProvider, | ||
| items: { |
There was a problem hiding this comment.
Consider adding 'additionalProperties: false' within the insuranceProvider object schema to prevent acceptance of unexpected properties.
There was a problem hiding this comment.
What do you think of this comment @JoshingYou1? I do see some other schemas use it. It's also mentioned in the README. I'll leave the decision up to you.
|
Can you address Rebecca's comment above please? |
|
@rjohnson2011 , Josh is OOO until the 27th, I believe. We will have him address that feedback when he returns. |
What Does This Code Do?
Pull Requests to update the schema in related repositories
After you've merged your changes to vets-json-schema you'll need to make PR's to vets-website and vets-api. Please link them here.