Skip to content
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

BDR and NIA adjustments #951

Merged
merged 17 commits into from
Jan 29, 2025
Merged

BDR and NIA adjustments #951

merged 17 commits into from
Jan 29, 2025

Conversation

taylordowns2000
Copy link
Member

@taylordowns2000 taylordowns2000 commented Jan 28, 2025

Summary

This PR introduces a mock-validator which is used by ghana-bdr and ghana-nia to verify that the request bodies sent to a specific endpoint match the requirements for those systems.

I think that the improved mocks for these adaptors are not particularly interesting for you guys. The thing that I'd like your thoughts on is whether or not the mock-validator is in the right place. I can see myself using this type of simple helper for building mock servers a lot.

AI Usage

Please disclose how you've used AI in this work (it's cool, we just want to
know!):

  • Code generation (copilot but not intellisense)
  • Learning or fact checking
  • Strategy / design
  • Optimisation / refactoring
  • Translation / spellchecking / doc gen
  • Other
  • I have not used AI

You can read more details in our
Responsible AI Policy

Review Checklist

Before merging, the reviewer should check the following items:

  • Does the PR do what it claims to do?
  • If this is a new adaptor, added the adaptor on marketing website ?
  • If this PR includes breaking changes, do we need to update any jobs in
    production? Is it safe to release?
  • Are there any unit tests?
  • Is there a changeset associated with this PR? Should there be? Note that
    dev only changes don't need a changeset.
  • Have you ticked a box under AI Usage?

@josephjclark
Copy link
Collaborator

@taylordowns2000 not in tools please! There is no runtime code in tools.

I agree that a general validator seems useful, although I'd probably recommend using json schema (we have a function for that in common, see for reference). But for now, I'd just bake it into the adaptor that needs it and we'll work out how to generalise later.

@taylordowns2000 taylordowns2000 changed the title Improve mocking for BDR and NIA BDR and NIA adjustments Jan 28, 2025
@josephjclark
Copy link
Collaborator

@taylordowns2000 we need to fix or skip that failing test before merging

Don't feel you need my approval before updating these adaptors btw (unless you're doing something unusual, like digging into tools/!

Copy link
Collaborator

Choose a reason for hiding this comment

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

Move this to mocks.js file in their respective adaptors

@taylordowns2000 taylordowns2000 merged commit df5fffe into main Jan 29, 2025
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

3 participants