
Security News
New React Server Components Vulnerabilities: DoS and Source Code Exposure
New DoS and source code exposure bugs in React Server Components and Next.js: what’s affected and how to update safely.
@bluehalo/fhir-json-schema-validator
Advanced tools
Utility for validating FHIR resources
yarn add @bluehalo/fhir-json-schema-validator
@bluehalo/fhir-json-schema-validator exports a single class called JSONSchemaValidator. This class takes two optional
arguments for initialization:
schemaThis is the path to the JSON schema that you would like to validate against. It defaults to the
fhir.schema.jsonfile included in this package.
ajvSettingsThis is an object with the settings to pass on to AJV. It defaults to suppresses log and warn messages, but logs error
messages. For a full list of AJV options see the README on the AJV GitHub page athttps://github.com/epoberezkin/ajv.
// Default initialization:
let defaultValidator = new JSONSchemaValidator();
// Custom initialization
let defaultValidator = new JSONSchemaValidator(schema, ajvSettings);
The QueryBuilder class has a method called validate which takes two arguments:
resourceThe resource that is to be validated against the FHIR JSON schema.
verboseBoolean value specifying whether or not to return the full set of validation errors (true) or to take the time to condense error messages (false). Defaults to false. The error messages generated by the over-arching json schema are too numerous to be of any use. For any specific resource, we can compile a resource-specific validator and re-validate to get more concise and helpful error messages.
The validate method returns an array that contains any errors generated from validation.
This list will be of length 0 if no errors were found.
See index.test.js for examples of usage
FAQs
FHIR json schema validator
We found that @bluehalo/fhir-json-schema-validator demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 0 open source maintainers collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Security News
New DoS and source code exposure bugs in React Server Components and Next.js: what’s affected and how to update safely.

Security News
Socket CEO Feross Aboukhadijeh joins Software Engineering Daily to discuss modern software supply chain attacks and rising AI-driven security risks.

Security News
GitHub has revoked npm classic tokens for publishing; maintainers must migrate, but OpenJS warns OIDC trusted publishing still has risky gaps for critical projects.