Skip to content

Commit 64a0669

Browse files
authored
Merge pull request #89 from FIWARE/wistefan-patch-3
Update participant-registration.yaml
2 parents a8e8eaa + 546042a commit 64a0669

File tree

2 files changed

+10
-18
lines changed

2 files changed

+10
-18
lines changed

charts/data-space-connector/Chart.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ apiVersion: v2
22
name: data-space-connector
33
description: Umbrella Chart for the FIWARE Data Space Connector, combining all essential parts to be used by a participant.
44
type: application
5-
version: 8.2.20
5+
version: 8.2.21
66
dependencies:
77
- name: postgresql
88
condition: postgresql.enabled

charts/data-space-connector/templates/participant-registration.yaml

Lines changed: 9 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -16,29 +16,21 @@ data:
1616
{{- range $index, $credentialType := .Values.registration.credentialTypes }}
1717
1818
# credentials config service registration
19-
{{- if eq $index 0 }}
2019
curl -v -X 'POST' \
2120
'{{ $registration.til }}/issuer' \
2221
-H 'accept: */*' \
2322
-H 'Content-Type: application/json' \
2423
-d "{
2524
\"did\": \"{{ $registration.did }}\",
26-
\"credentials\": [{
27-
\"credentialsType\": \"{{ $credentialType }}\"
28-
}]
25+
\"credentials\": [
26+
{{- $last := sub (len $registration.credentialTypes) 1 -}}
27+
{{- range $index, $credentialType := $registration.credentialTypes }}
28+
{
29+
\"credentialsType\": \"{{ $credentialType }}\"
30+
}{{- if lt $index $last }},{{ end }}
31+
{{- end }}
32+
]
2933
}"
30-
{{- else }}
31-
curl -v -X 'PUT' \
32-
"{{ $registration.til }}/issuer/{{ $registration.did }}" \
33-
-H 'accept: */*' \
34-
-H 'Content-Type: application/json' \
35-
-d "{
36-
\"did\": \"{{ $registration.did }}\",
37-
\"credentials\": [{
38-
\"credentialsType\": \"{{ $credentialType }}\"
39-
}]
40-
}"
41-
{{- end }}
4234
{{- end }}
4335
44-
{{- end }}
36+
{{- end }}

0 commit comments

Comments
 (0)