The /metadata request is accepting both ‘application/fhir+json’ and ‘application/json’, same as the endpoint list request does, but it should only accept 'application/fhir+json'. The reason we are more flexible with the endpoint list request is because we aren't sure if the endpoint list being served is a FHIR endpoint or something else, but the /metadata request should only accept ‘application/fhir+json’. Update the error message produced when the Capability Statement returned is not a valid resource to be more informative.
Summary
The /metadata request is accepting both ‘application/fhir+json’ and ‘application/json’, same as the endpoint list request does, but it should only accept 'application/fhir+json'. The reason we are more flexible with the endpoint list request is because we aren't sure if the endpoint list being served is a FHIR endpoint or something else, but the /metadata request should only accept ‘application/fhir+json’. Update the error message produced when the Capability Statement returned is not a valid resource to be more informative.