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

Fix FHIR converter sample requests #951

Merged
merged 3 commits into from
Nov 29, 2023
Merged

Fix FHIR converter sample requests #951

merged 3 commits into from
Nov 29, 2023

Conversation

emmastephenson
Copy link
Collaborator

@emmastephenson emmastephenson commented Nov 28, 2023

PULL REQUEST

Summary

Adds dropdown options for different sample requests to the API docs for our FHIR converter. All 3 sample messages were tested and work for the FHIR converter.

Related Issue

Fixes #937

Additional Information

This method of setting multiple API docs probably will break when we upgrade to the latest version of FastAPI - some changes were introduced in 0.99 (we're on 0.96 at time of writing). See more here.

Screenshots

Screenshot 2023-11-28 at 10 55 14 AM
Screenshot 2023-11-28 at 10 55 26 AM

Checklist

  • If this code affects the other scrum team, have they been notified? (In Slack, as reviewers, etc.)

Copy link

codecov bot commented Nov 28, 2023

Codecov Report

Merging #951 (045b688) into main (7ff6498) will not change coverage.
The diff coverage is n/a.

Additional details and impacted files
@@           Coverage Diff           @@
##             main     #951   +/-   ##
=======================================
  Coverage   96.72%   96.72%           
=======================================
  Files          48       48           
  Lines        2811     2811           
=======================================
  Hits         2719     2719           
  Misses         92       92           
Flag Coverage Δ
unit-tests 96.72% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

Copy link
Collaborator

@robertmitchellv robertmitchellv left a comment

Choose a reason for hiding this comment

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

looks great 🏆

@@ -43,7 +45,10 @@ async def health_check():
status_code=200,
responses=sample_response,
)
async def convert(input: FhirConverterInput, response: Response):
async def convert(
input: Annotated[FhirConverterInput, Body(examples=sample_request)],
Copy link
Collaborator

Choose a reason for hiding this comment

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

this is a neat way to do this 🚀

@emmastephenson emmastephenson merged commit 6e77780 into main Nov 29, 2023
30 checks passed
@emmastephenson emmastephenson deleted the emma/937-doc-fix branch November 29, 2023 22:09
@robertmitchellv robertmitchellv mentioned this pull request Dec 5, 2023
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.

Correct "root_template" in PHDI API docs for /convert-to-fhir
2 participants