Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Summary
Implements the
$release
endpoint in the server according to the CRMI IG definition.New behavior
The user can now release a Measure or Library draft artifact and any resources it is composed of by sending a GET or POST request to
Measure/$release
,Measure/:id/$release
,Library/$release
andLibrary/:id/$release
. This operation takes three required parameters:id
,releaseVersion
, andversionBehavior
. It updates the artifact and children artifactdate
andversion
. For pieces of the spec that are a unclear, questions have been added to the connectathon document.Code changes
service/README.md
- add description of$release
service/scripts/dbSetup.ts
- add check for publishable environment before coercing to activeservice/src/config/capabilityStatementResources.json
- add crmi-releaseservice/src/config/serverConfig.ts
- addrelease
endpointsservice/src/requestSchemas
- add ReleaseArgs for type checkingservice/src/services/LibraryService.ts
/service/src/services/MeasureService.ts
- addrelease
functionservice/test/services/LibraryService.test.ts
/service/test/services/MeasureService.test.ts
- added unit testsservice/test/utils.ts
- add utility for removing test resourcesNote: I believe all instances of
catchMissingId
in RequestSchemas are unnecessary because id is a strict required parameter already in zod args definition. Any problem with removing them?Testing guidance
Ensure env has
AUTHORING=true
to allow for draft artifacts to existIn service folder...
npm run check
npm run build
npm run db:reset
npm run db:loadBundle {pathToNestedChild-draft.json}
(change an existing nested child bundle to make root artifact and all children statusdraft
or ask me for a sample bundle)npm run start
Run through the attached Insomnia tests (and fiddle with to test any other edge cases)
You can repeat the
npm run db:reset
npm run db:loadBundle {pathToNestedChild-draft.json}
steps between Insomnia tests to ensure the correct draft artifact exists
Insomnia requests:
release-requests.json