Skip to content

VED-940 Restructure Search API Sections#1062

Merged
JamesW1-NHS merged 31 commits intomasterfrom
VED-940-OAS
Dec 16, 2025
Merged

VED-940 Restructure Search API Sections#1062
JamesW1-NHS merged 31 commits intomasterfrom
VED-940-OAS

Conversation

@JamesW1-NHS
Copy link
Contributor

@JamesW1-NHS JamesW1-NHS commented Dec 11, 2025

Summary

  • Routine Change

Update the OAS documentation for Search to improve clarity and separate GET and POST into distinct, consistent sections.

Changes required:

Rename GET title to "Search for a patient’s immunisation records (GET)".
Reduce and tidy GET text; move generic content (e.g. Flagged Patients) to a general section near the top.
Remove details no longer needed (NHS number change, location text, duplicate contained-resource note).
Create a new dedicated section for Search POST titled “Search for a patient’s immunisation records (POST)”.
Explain purpose of POST and how it differs from GET.
Link POST to the GET section for shared details to avoid duplication.
Remove search by identifier from OAS file. May have to be reinserted in the future based on user requirements (GPIT)

Reviews Required

  • Dev
  • Test
  • Tech Author
  • Product Owner

Review Checklist

ℹ️ This section is to be filled in by the reviewer.

  • I have reviewed the changes in this PR and they fill all of the acceptance criteria of the ticket.
  • If there were infrastructure, operational, or build changes, I have made sure there is sufficient evidence that the changes will work.
  • If there were changes that are outside of the regular release processes e.g. account infrastructure to setup, manual setup for external API integrations, secrets to set, then I have checked that the developer has flagged this to the Tech Lead as release steps.
  • I have checked that no Personal Identifiable Data (PID) is logged as part of the changes.

@github-actions
Copy link
Contributor

This branch is working on a ticket in the NHS England VED JIRA Project. Here's a handy link to the ticket:

VED-940

Copy link
Collaborator

@dlzhry2nhs dlzhry2nhs left a comment

Choose a reason for hiding this comment

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

Couple of general comments but overall looks good. One or two may need clarifying with PO/Architect as am not 100% clear on exactly what they are expecting from some of the bullet points.

$ref: "#/components/requestBodies/SearchImmunizationPost"
responses:
"200":
$ref: "#/components/responses/200-imms-search"
Copy link
Collaborator

Choose a reason for hiding this comment

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

When testing with the sandbox, it is telling me that: Violation: response.body.entry.0.resource Response body property entry.0.resource must match exactly one schema in oneOf.

This means that the first object in the example, the immunization, does not conform to the spec we've written. It could be the bit to do with search mode. Worth double checking exactly what it is that is upsetting it.

Copy link
Collaborator

Choose a reason for hiding this comment

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

The first places I would look is the structure of the patient object in the immunization as we mess around with this in search. Secondly, the example also contains a "search": {
"mode": "match"
} object, so also worth a check.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

This is VED-298. I'll be looking at it in due course.
The important thing is that the current changes (indeed all the changes since the original JSON) don't appear to have broken the sandbox any more than it was to start with.)

Copy link
Collaborator

Choose a reason for hiding this comment

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

Right, I would say the structure of the API response schema vs. example fundamentally does not match, so while we are working on adding the documentation for the POST endpoint this would be an ideal time to ensure things are right.

If we are not publishing until after VED-298 then it's ok to defer, but I would prefer when we introduce a new endpoint to the OAS file then it is completed properly rather than in a partially complete state.

Copy link
Collaborator

@dlzhry2nhs dlzhry2nhs left a comment

Choose a reason for hiding this comment

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

Would ideally like the new endpoint example to match its schema, but worst case scenario can look to resolve in the next ticket.

@sonarqubecloud
Copy link

@JamesW1-NHS JamesW1-NHS temporarily deployed to internal-dev-sandbox December 16, 2025 09:39 — with GitHub Actions Inactive
@JamesW1-NHS JamesW1-NHS merged commit 6a80019 into master Dec 16, 2025
17 checks passed
@JamesW1-NHS JamesW1-NHS deleted the VED-940-OAS branch December 16, 2025 10:27
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

Comments