awslabs / fhir-works-on-aws-routing

The routing implementation of the FHIR Works on AWS framework. Finding the correct component to handle the HTTP FHIR request
Apache License 2.0
31 stars 26 forks source link

fix: fix content type for .well-known/smart-configuration #160

Closed carvantes closed 2 years ago

carvantes commented 2 years ago

A previous change is non-conformant with the SMART spec: https://github.com/awslabs/fhir-works-on-aws-routing/pull/147 Inferno tests fail with:

fail - SD-01 FHIR server makes SMART configuration available from well-known endpoint
    Message: Expected content-type application/json but found application/fhir+json

It's fine to keep application/fhir+json as default content-type and just explicitly set it to something else when needed (like to application/json here), since application/fhir+json is correct in the vast majority of cases.

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

codecov-commenter commented 2 years ago

Codecov Report

Merging #160 (2d37bb9) into mainline (51c6b0c) will decrease coverage by 0.05%. The diff coverage is 0.00%.

Impacted file tree graph

@@             Coverage Diff              @@
##           mainline     #160      +/-   ##
============================================
- Coverage     75.82%   75.76%   -0.06%     
============================================
  Files            47       47              
  Lines          1365     1366       +1     
  Branches        284      284              
============================================
  Hits           1035     1035              
- Misses          330      331       +1     
Impacted Files Coverage Δ
src/router/routes/wellKnownUriRoute.ts 25.00% <0.00%> (-2.28%) :arrow_down:

Continue to review full report at Codecov.

Legend - Click here to learn more Δ = absolute <relative> (impact), ø = not affected, ? = missing data Powered by Codecov. Last update 51c6b0c...2d37bb9. Read the comment docs.