Skip to content

Commit

Permalink
Merge pull request #117 from IATI/feature/structured-json
Browse files Browse the repository at this point in the history
Structured JSON v3.3.0
  • Loading branch information
akmiller01 authored Nov 8, 2022
2 parents 722882c + 8f4ed97 commit f7a02e1
Show file tree
Hide file tree
Showing 11 changed files with 4,503 additions and 1,796 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/apim-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -68,4 +68,4 @@ jobs:
--parameters RedisConnectionString=${{ env.RedisConnectionString }} \
--parameters ApplicationInsightsInstanceName=${{ env.ApplicationInsightsInstanceName }} \
--parameters Branch=${{ env.Branch }} \
--parameters '{"serviceUrl":{"value":{"apidefinitionsrev1":"","api61e68d73c8e44ca9124dcddbrev1":"${{ env.SolrBaseUrl }}","datastorerev1":"${{ env.SolrBaseUrl }}","datastorerev2":"${{ env.SolrBaseUrl }}","datastorerev3":"${{ env.SolrBaseUrl }}","iativalidatorv2rev1":"","iativalidatorv2rev2":"","iativalidatorv2rev3":"","validatorservicesprivaterev1":""}}}'
--parameters '{"serviceUrl":{"value":{"apidefinitionsrev1":"","api61e68d73c8e44ca9124dcddbrev1":"${{ env.SolrBaseUrl }}","datastorerev1":"${{ env.SolrBaseUrl }}","datastorerev2":"${{ env.SolrBaseUrl }}","datastorerev3":"${{ env.SolrBaseUrl }}","datastorerev4":"${{ env.SolrBaseUrl }}","iativalidatorv2rev1":"","iativalidatorv2rev2":"","iativalidatorv2rev3":"","validatorservicesprivaterev1":""}}}'
2 changes: 1 addition & 1 deletion .github/workflows/apim-develop.yml
Original file line number Diff line number Diff line change
Expand Up @@ -68,4 +68,4 @@ jobs:
--parameters RedisConnectionString=${{ env.RedisConnectionString }} \
--parameters ApplicationInsightsInstanceName=${{ env.ApplicationInsightsInstanceName }} \
--parameters Branch=${{ env.Branch }} \
--parameters '{"serviceUrl":{"value":{"apidefinitionsrev1":"","api61e68d73c8e44ca9124dcddbrev1":"${{ env.SolrBaseUrl }}","datastorerev1":"${{ env.SolrBaseUrl }}","datastorerev2":"${{ env.SolrBaseUrl }}","datastorerev3":"${{ env.SolrBaseUrl }}","iativalidatorv2rev1":"","iativalidatorv2rev2":"","iativalidatorv2rev3":"","validatorservicesprivaterev1":""}}}'
--parameters '{"serviceUrl":{"value":{"apidefinitionsrev1":"","api61e68d73c8e44ca9124dcddbrev1":"${{ env.SolrBaseUrl }}","datastorerev1":"${{ env.SolrBaseUrl }}","datastorerev2":"${{ env.SolrBaseUrl }}","datastorerev3":"${{ env.SolrBaseUrl }}","datastorerev4":"${{ env.SolrBaseUrl }}","iativalidatorv2rev1":"","iativalidatorv2rev2":"","iativalidatorv2rev3":"","validatorservicesprivaterev1":""}}}'
2 changes: 1 addition & 1 deletion .github/workflows/apim-prod.yml
Original file line number Diff line number Diff line change
Expand Up @@ -64,4 +64,4 @@ jobs:
--parameters RedisConnectionString=${{ env.RedisConnectionString }} \
--parameters ApplicationInsightsInstanceName=${{ env.ApplicationInsightsInstanceName }} \
--parameters Branch=${{ env.Branch }} \
--parameters '{"serviceUrl":{"value":{"apidefinitionsrev1":"","api61e68d73c8e44ca9124dcddbrev1":"${{ env.SolrBaseUrl }}","datastorerev1":"${{ env.SolrBaseUrl }}","datastorerev2":"${{ env.SolrBaseUrl }}","datastorerev3":"${{ env.SolrBaseUrl }}","iativalidatorv2rev1":"","iativalidatorv2rev2":"","iativalidatorv2rev3":"","validatorservicesprivaterev1":""}}}'
--parameters '{"serviceUrl":{"value":{"apidefinitionsrev1":"","api61e68d73c8e44ca9124dcddbrev1":"${{ env.SolrBaseUrl }}","datastorerev1":"${{ env.SolrBaseUrl }}","datastorerev2":"${{ env.SolrBaseUrl }}","datastorerev3":"${{ env.SolrBaseUrl }}","datastorerev4":"${{ env.SolrBaseUrl }}","iativalidatorv2rev1":"","iativalidatorv2rev2":"","iativalidatorv2rev3":"","validatorservicesprivaterev1":""}}}'
27 changes: 19 additions & 8 deletions extraction_templates/extract_apis.sh
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#!/bin/bash

cd azure-api-management-devops-resource-kit/src/ARMTemplates && \
cd azure-api-management-devops-resource-kit/src/ArmTemplates && \
dotnet restore && \
dotnet run extract --extractorConfig ../../../apimExtract.json && \
cd -
Expand All @@ -20,10 +20,21 @@ for SERVICE in ${SERVICES[@]}; do
done

# Temp XML encoding bugifx: https://github.com/Azure/azure-api-management-devops-resource-kit/issues/825
for filename in policies/* ; do
echo $filename
sed -i '' -e 's/>/>/g' $filename
sed -i '' -e 's/&lt;/</g' $filename
sed -i '' -e 's/&quot;/"/g' $filename
sed -i '' -e 's/amp;//g' $filename
done
# Different syntax for sed between MacOS and Linux
if [[ $OSTYPE == 'darwin'* ]]; then
for filename in policies/* ; do
echo $filename
sed -i '' -e 's/&gt;/>/g' $filename
sed -i '' -e 's/&lt;/</g' $filename
sed -i '' -e 's/&quot;/"/g' $filename
sed -i '' -e 's/amp;//g' $filename
done
else
for filename in policies/* ; do
echo $filename
sed -i -e 's/&gt;/>/g' $filename
sed -i -e 's/&lt;/</g' $filename
sed -i -e 's/&quot;/"/g' $filename
sed -i -e 's/amp;//g' $filename
done
fi
12 changes: 6 additions & 6 deletions service/apim-iati-dev-api-release.template.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,39 +10,39 @@
{
"apiVersion": "2021-08-01",
"type": "Microsoft.ApiManagement/service/apis/releases",
"name": "[concat(parameters('apimServiceName'), '/api-definitions;rev=1/1df20cd6-ab87-49e0-92a5-976efafadf40')]",
"name": "[concat(parameters('apimServiceName'), '/api-definitions;rev=1/4ce7bbc0-fb68-44bc-a360-92eb3074ad8f')]",
"properties": {
"apiId": "/apis/api-definitions;rev=1"
}
},
{
"apiVersion": "2021-08-01",
"type": "Microsoft.ApiManagement/service/apis/releases",
"name": "[concat(parameters('apimServiceName'), '/61e68d73c8e44ca9124dcddb;rev=1/7b6dde5b-7d26-44a0-8017-b4b07a1d7482')]",
"name": "[concat(parameters('apimServiceName'), '/61e68d73c8e44ca9124dcddb;rev=1/30f23e0b-31fd-428a-ae69-b38248faf987')]",
"properties": {
"apiId": "/apis/61e68d73c8e44ca9124dcddb;rev=1"
}
},
{
"apiVersion": "2021-08-01",
"type": "Microsoft.ApiManagement/service/apis/releases",
"name": "[concat(parameters('apimServiceName'), '/datastore;rev=3/127f1686-65dd-4313-b293-17761a5a0ffc')]",
"name": "[concat(parameters('apimServiceName'), '/datastore;rev=4/8ab064c4-eef0-42ad-a1b4-2b56073dce5d')]",
"properties": {
"apiId": "/apis/datastore;rev=3"
"apiId": "/apis/datastore;rev=4"
}
},
{
"apiVersion": "2021-08-01",
"type": "Microsoft.ApiManagement/service/apis/releases",
"name": "[concat(parameters('apimServiceName'), '/iati-validator-v2;rev=3/e5b1a661-172f-4d29-9155-6ca3c04e439c')]",
"name": "[concat(parameters('apimServiceName'), '/iati-validator-v2;rev=3/5bc6eff8-d3dc-4abf-8969-ac8d4d08cdeb')]",
"properties": {
"apiId": "/apis/iati-validator-v2;rev=3"
}
},
{
"apiVersion": "2021-08-01",
"type": "Microsoft.ApiManagement/service/apis/releases",
"name": "[concat(parameters('apimServiceName'), '/validator-services-private;rev=1/2136f970-a4d2-41e0-8361-df9f54e772eb')]",
"name": "[concat(parameters('apimServiceName'), '/validator-services-private;rev=1/b16e9486-10f5-480e-a7d4-752fe679fbca')]",
"properties": {
"apiId": "/apis/validator-services-private;rev=1"
}
Expand Down
16 changes: 16 additions & 0 deletions service/apim-iati-dev-apiTags.template.json
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,22 @@
"displayName": "datause"
}
},
{
"apiVersion": "2021-08-01",
"type": "Microsoft.ApiManagement/service/apis/tags",
"name": "[concat(parameters('apimServiceName'), '/datastore;rev=4/datastore')]",
"properties": {
"displayName": "datastore"
}
},
{
"apiVersion": "2021-08-01",
"type": "Microsoft.ApiManagement/service/apis/tags",
"name": "[concat(parameters('apimServiceName'), '/datastore;rev=4/datause')]",
"properties": {
"displayName": "datause"
}
},
{
"apiVersion": "2021-08-01",
"type": "Microsoft.ApiManagement/service/apis/tags",
Expand Down
Loading

0 comments on commit f7a02e1

Please sign in to comment.