diff --git a/src/components/FSHControls.js b/src/components/FSHControls.js index 6d7e8ac..ca42815 100644 --- a/src/components/FSHControls.js +++ b/src/components/FSHControls.js @@ -221,7 +221,6 @@ export default function FSHControls(props) { setIsGoFSHRunning(true); const gofshInputStrings = props.gofshText.map((def) => def.def).filter((d) => d); const parsedDependencies = dependencies === '' ? [] : dependencies.split(','); - // Create small ImplementationGuide resource to send canonical and version information if (canonical || version || fhirVersion !== '') { const igResource = { diff --git a/src/utils/FSHHelpers.js b/src/utils/FSHHelpers.js index 575c6d7..f181720 100644 --- a/src/utils/FSHHelpers.js +++ b/src/utils/FSHHelpers.js @@ -36,6 +36,9 @@ export async function runGoFSH(input, options) { const location = `Input_${i}`; try { resource = JSON.parse(resource); + if (!resource.resourceType) { + logger.error(`FHIR JSON ${resource.id ?? location} is missing the required "resourceType" property`); + } } catch (e) { logger.error(`Could not parse ${location} to JSON`); return;