Skip to content

Commit

Permalink
add validation for both static structures at the same time, as there …
Browse files Browse the repository at this point in the history
…can be ID overlap
  • Loading branch information
clezag committed May 6, 2024
1 parent 06153d6 commit 3aae4b2
Showing 1 changed file with 10 additions and 4 deletions.
14 changes: 10 additions & 4 deletions validation/validate.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,14 +6,20 @@

template=$(<delivery_container.xml)
endpoint="${ENDPOINT:-localhost:8000}"

tmpfile="${TMPFILE:-validate.xml}"

function vUrl () {
parking=`curl $1`
xmllint --format - <<<"${template//PLACEHOLDER/$parking}" > $tmpfile
content=""
for arg in "$@"
do
content+=`curl $arg`
done

xmllint --format - <<<"${template//PLACEHOLDER/$content}" > $tmpfile
xmllint --noout --schema ../netex-italian-profile/xsd/NeTEx_publication_Lev4.xsd $tmpfile
}

vUrl $endpoint/netex/parking \
&& vUrl $endpoint/netex/sharing

&& vUrl $endpoint/netex/sharing \
&& vUrl $endpoint/netex/parking $endpoint/netex/sharing

0 comments on commit 3aae4b2

Please sign in to comment.