Skip to content
This repository has been archived by the owner on Apr 13, 2023. It is now read-only.

Commit

Permalink
feat: Add support for Validator interface (#56)
Browse files Browse the repository at this point in the history
BREAKING CHANGE: updated to interface 8.0.0 which changed the structure of FhirConfig. FhirConfig now requires the validators attribute. That attribute is then used in routing.
  • Loading branch information
nguyen102 committed Feb 11, 2021
1 parent 8134be9 commit b57b54c
Show file tree
Hide file tree
Showing 17 changed files with 295 additions and 277 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@
"cors": "^2.8.5",
"errorhandler": "^1.5.1",
"express": "^4.17.1",
"fhir-works-on-aws-interface": "^7.0.1",
"fhir-works-on-aws-interface": "^8.0.0",
"flat": "^5.0.0",
"http-errors": "^1.8.0",
"lodash": "^4.17.15",
Expand Down
1 change: 1 addition & 0 deletions sampleData/r4FhirConfigGeneric.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ const config = (stubs: {
bulkDataAccess: BulkDataAccess;
}): FhirConfig => ({
configVersion: 1,
validators: [],
productInfo: {
orgName: 'Organization Name',
},
Expand Down
1 change: 1 addition & 0 deletions sampleData/r4FhirConfigNoGeneric.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ const config = (stubs: {
bulkDataAccess: BulkDataAccess;
}): FhirConfig => ({
configVersion: 1,
validators: [],
productInfo: {
orgName: 'Organization Name',
},
Expand Down
1 change: 1 addition & 0 deletions sampleData/r4FhirConfigWithExclusions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ const config = (stubs: {
bulkDataAccess: BulkDataAccess;
}): FhirConfig => ({
configVersion: 1,
validators: [],
productInfo: {
orgName: 'Organization Name',
},
Expand Down
1 change: 1 addition & 0 deletions sampleData/stu3FhirConfigWithExclusions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ const config = (stubs: {
bulkDataAccess: BulkDataAccess;
}): FhirConfig => ({
configVersion: 1,
validators: [],
productInfo: {
orgName: 'Organization Name',
},
Expand Down
6 changes: 3 additions & 3 deletions src/app.ts
Original file line number Diff line number Diff line change
Expand Up @@ -100,8 +100,8 @@ export function generateServerlessRouter(
typeSearch,
typeHistory,
fhirConfig.auth.authorization,
fhirVersion,
serverUrl,
fhirConfig.validators,
);

const route: GenericResourceRoute = new GenericResourceRoute(
Expand All @@ -125,8 +125,8 @@ export function generateServerlessRouter(
genericResource.typeSearch,
genericResource.typeHistory,
fhirConfig.auth.authorization,
fhirVersion,
serverUrl,
fhirConfig.validators,
);

const genericRoute: GenericResourceRoute = new GenericResourceRoute(
Expand All @@ -145,7 +145,7 @@ export function generateServerlessRouter(
if (fhirConfig.profile.systemOperations.length > 0) {
const rootRoute = new RootRoute(
fhirConfig.profile.systemOperations,
fhirVersion,
fhirConfig.validators,
serverUrl,
fhirConfig.profile.bundle,
fhirConfig.profile.systemSearch,
Expand Down
Loading

0 comments on commit b57b54c

Please sign in to comment.