Skip to content

Commit 73e8701

Browse files
committed
Credentials Issuer: updates authorizable_attribute_info_optional examples
1 parent fc29f03 commit 73e8701

File tree

2 files changed

+21
-6
lines changed

2 files changed

+21
-6
lines changed

README.md

Lines changed: 18 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -108,9 +108,24 @@ It's important to configure some JSON data so it's consumed by the DECODE's APIs
108108

109109
```json
110110
[
111-
{ attribute_info_key: 'gender', attribute_info_type: 'string', attribute_info_set: ['male','female'], attribute_info_k: 3 },
112-
{ attribute_info_key: 'age', attribute_info_type: 'integer', attribute_info_set: ['0-18','18-25','25-45','>45'], attribute_info_k: 3 },
113-
{ attribute_info_key: 'district', attribute_info_type: 'str', attribute_info_set: ['sant marti','gracia','...'], attribute_info_k: 3 }
111+
{
112+
"k": 2,
113+
"name": "age",
114+
"type": "str",
115+
"value_set": [ "0-19", "20-29", "30-39", ">40" ]
116+
},
117+
{
118+
"k": 2,
119+
"name": "gender",
120+
"type": "str",
121+
"value_set": [ "F", "M", "O" ]
122+
},
123+
{
124+
"k": 2,
125+
"name": "district",
126+
"type": "str",
127+
"value_set": [ "1", "2", "3", "4", "5", "6", "7", "8", "9", "10" ]
128+
}
114129
]
115130
```
116131

decidim-petitions/lib/decidim/petitions/component.rb

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -78,9 +78,9 @@
7878
}
7979
],
8080
json_attribute_info_optional: [
81-
{ attribute_info_key: 'gender', attribute_info_type: 'string', attribute_info_set: ['male','female'], attribute_info_k: 3 },
82-
{ attribute_info_key: 'age', attribute_info_type: 'integer', attribute_info_set: ['0-18','18-25','25-45','>45'], attribute_info_k: 3 },
83-
{ attribute_info_key: 'district', attribute_info_type: 'str', attribute_info_set: ['sant marti','gracia','...'], attribute_info_k: 3 }
81+
{ "k": 2, "name": "age", "type": "str", "value_set": [ "0-19", "20-29", "30-39", ">40" ] },
82+
{ "k": 2, "name": "gender", "type": "str", "value_set": [ "F", "M", "O" ] },
83+
{ "k": 2, "name": "district", "type": "str", "value_set": [ "1", "2", "3", "4", "5", "6", "7", "8", "9", "10" ] }
8484
]
8585
)
8686
end

0 commit comments

Comments
 (0)