-
-
Notifications
You must be signed in to change notification settings - Fork 41
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
xmlns improvements, template file hierarchy improvements (#100)
* Improving xmlns detection on xhtml type * Fixing xml unserializing in child types * Internal cleanup & refactor
- Loading branch information
Showing
50 changed files
with
4,084 additions
and
946 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,64 @@ | ||
name: 'Load FHIR Validator' | ||
description: 'Downloads and caches a FHIR validator jar' | ||
|
||
inputs: | ||
version: | ||
required: false | ||
description: 'Version of validator to download' | ||
default: '6.3.4' | ||
|
||
base-url: | ||
required: false | ||
description: 'Base download URL' | ||
default: 'https://github.com/hapifhir/org.hl7.fhir.core/releases/download' | ||
|
||
filename: | ||
required: false | ||
description: 'Validator filename' | ||
default: 'validator_cli.jar' | ||
|
||
runs: | ||
using: composite | ||
steps: | ||
- id: vars | ||
shell: bash -e {0} | ||
# language=sh | ||
run: | | ||
echo 'url=${{ inputs.base-url }}/${{ inputs.version }}/${{ inputs.filename }}' >> $GITHUB_OUTPUT | ||
echo 'cache-key=fhir-validator-${{ inputs.version }}-2' >> $GITHUB_OUTPUT | ||
- uses: actions/cache@v4 | ||
id: cache | ||
with: | ||
path: | | ||
${{ github.workspace }}/bin | ||
/home/runner/.fhir | ||
key: '${{ steps.vars.outputs.cache-key }}' | ||
|
||
- name: 'Install Java' | ||
if: steps.cache.outputs.cache-hit != 'true' && steps.cache.outputs.cache-hit != true | ||
uses: actions/setup-java@v4 | ||
with: | ||
distribution: 'zulu' | ||
java-version: 18 | ||
|
||
- name: 'Download and cache extensions' | ||
if: steps.cache.outputs.cache-hit != 'true' && steps.cache.outputs.cache-hit != true | ||
shell: bash -e {0} | ||
# language=sh | ||
run: | | ||
echo '::group::Downloading validator_cli.jar ${{ inputs.version }}' | ||
mkdir -p '${{ github.workspace }}/bin' | ||
wget -q '${{ steps.vars.outputs.url }}' -O '${{ github.workspace }}/bin/${{ inputs.filename }}' | ||
echo '::endgroup::' | ||
echo '::group::Caching validator assets' | ||
java -jar '${{ github.workspace }}/bin/validator_cli.jar' -version 1.0.2 | ||
java -jar '${{ github.workspace }}/bin/validator_cli.jar' -version 1.4.0 | ||
java -jar '${{ github.workspace }}/bin/validator_cli.jar' -version 3.0.2 | ||
java -jar '${{ github.workspace }}/bin/validator_cli.jar' -version 4.0.1 | ||
java -jar '${{ github.workspace }}/bin/validator_cli.jar' -version 4.1.0 | ||
java -jar '${{ github.workspace }}/bin/validator_cli.jar' -version 4.3.0 | ||
java -jar '${{ github.workspace }}/bin/validator_cli.jar' -version 5.0.0 | ||
echo '::endgroup::' | ||
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,71 @@ | ||
name: 'Load FHIR XSD' | ||
description: 'Downloads and caches a a version of FHIR source files' | ||
|
||
inputs: | ||
version: | ||
required: true | ||
description: 'Version to download' | ||
|
||
base-url: | ||
required: false | ||
description: 'Base FHIR URL' | ||
default: 'https://hl7.org/fhir' | ||
|
||
filename: | ||
required: false | ||
description: 'Name of xsd file' | ||
default: 'fhir-all-xsd.zip' | ||
|
||
user-agent: | ||
required: false | ||
description: 'User agent string to use' | ||
default: 'Mozilla/5.0 (Android 4.4; Mobile; rv:41.0) Gecko/41.0 Firefox/41.0' | ||
|
||
outputs: | ||
cache-key: | ||
description: 'Actions Cache key' | ||
value: '${{ steps.vars.cache-key }}' | ||
|
||
runs: | ||
using: composite | ||
steps: | ||
- id: vars | ||
shell: bash -e {0} | ||
# language=sh | ||
run: | | ||
_month="$(date "+%Y%m")" | ||
_cache_key="fhir-source-${{ inputs.version }}-${_month}-1" | ||
_dl_url="${{ inputs.base-url}}/${{ inputs.version }}/${{ inputs.filename }}" | ||
_cache_dir="${{ github.workspace }}/input" | ||
_xsd_cache_dir="${_cache_dir}/${{ inputs.version }}" | ||
_zip_filename="${_cache_dir}/${{ inputs.version }}.zip" | ||
echo "cache-key=${_cache_key}" >> $GITHUB_OUTPUT | ||
echo "cache-dir=${_cache_dir}" >> $GITHUB_OUTPUT | ||
echo "xsd-cache-dir=${_xsd_cache_dir}" >> $GITHUB_OUTPUT | ||
echo "url=${_dl_url}" >> $GITHUB_OUTPUT | ||
echo "zip-filename=${_zip_filename}" >> $GITHUB_OUTPUT | ||
- uses: actions/cache@v4 | ||
id: cache | ||
with: | ||
path: '${{ steps.vars.outputs.cache-dir }}' | ||
key: '${{ steps.vars.outputs.cache-key }}' | ||
|
||
- name: 'Download' | ||
if: steps.cache.outputs.cache-hit != 'true' && steps.cache.outputs.cache-hit != true | ||
shell: bash -e {0} | ||
# language=sh | ||
run: | | ||
mkdir -p '${{ steps.vars.outputs.xsd-cache-dir }}' | ||
curl \ | ||
-L \ | ||
-A '${{ inputs.user-agent }}' \ | ||
-o '${{ steps.vars.outputs.zip-filename }}' \ | ||
'${{ steps.vars.outputs.url }}' | ||
unzip -o -qq '${{ steps.vars.outputs.zip-filename }}' -d '${{ steps.vars.outputs.xsd-cache-dir }}' | ||
ls -l '${{ steps.vars.outputs.cache-dir}}' | ||
ls -l '${{ steps.vars.outputs.xsd-cache-dir }}' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,6 @@ | ||
/vendor | ||
/composer.lock | ||
/tmp | ||
.idea/ | ||
.svn/ | ||
tmp/ | ||
vendor/ | ||
/*.iml | ||
/.idea | ||
/.svn | ||
/.*.cache |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.