Details
-
Type:
Monitor
-
Status: Closed
-
Priority:
Major
-
Resolution: Done
-
Affects Version/s: None
-
Fix Version/s: 2021
-
Component/s: FIWARE-TECH-HELP
-
Labels:
-
HD-Enabler:Orion
Description
Created question in FIWARE Q/A platform on 01-02-2019 at 23:02
Please, ANSWER this question AT https://stackoverflow.com/questions/54488078/which-characters-can-be-used-in-an-attribute-name-fiware-orion
Question:
Which characters can be used in an attribute name? - FIWARE Orion
Description:
I'd like to know details about character set and character code that can be used in an attribute name. I tried to create an entity that has an attribute name "日本語". I was able to create it in case of NGSIv1 but not in case of NGSIv2.
In case of NGSIv1 API,
Request:
(curl localhost:1026/v1/updateContext -sS --header 'Content-Type: application/json' \
-header 'Accept: application/json' -d @ <<EOF) | jq .
{
"contextElements": [
{
"type": "Test",
"isPattern": "false",
"id": "Testv1",
"attributes": [
,
{ "name": "日本語", "type": "Integer", "value": "2" } ]
}
],
"updateAction": "APPEND"
}
EOF
Response:
{
"contextResponses": [
{
"contextElement": {
"type": "Test",
"isPattern": "false",
"id": "Testv1",
"attributes": [
,
{ "name": "日本語", "type": "Integer", "value": "" } ]
},
"statusCode":
}
]
}
In case of NGSIv2 API,
Request:
(curl localhost:1026/v2/entities -s -S -H 'Content-Type: application/json' \
d @ <<EOF) | jq .
{
"id": "Test1",
"type": "Test",
"japanese":
,
"日本語":
}
EOF
Response:
{ "error": "BadRequest", "description": "Invalid characters in attribute name" }Activity
Field | Original Value | New Value |
---|---|---|
Component/s | FIWARE-TECH-HELP [ 10278 ] |
Status | Open [ 1 ] | In Progress [ 3 ] |
Status | In Progress [ 3 ] | Answered [ 10104 ] |
Resolution | Done [ 10000 ] | |
Status | Answered [ 10104 ] | Closed [ 6 ] |
Summary | [fiware-stackoverflow] Which characters can be used in an attribute name? - FIWARE Orion | FIWARE.Question.Tech.Which characters can be used in an attribute name? - FIWARE Orion. |
HD-Enabler | Orion [ 10875 ] | |
Description |
Created question in FIWARE Q/A platform on 01-02-2019 at 23:02 {color: red}Please, ANSWER this question AT{color} https://stackoverflow.com/questions/54488078/which-characters-can-be-used-in-an-attribute-name-fiware-orion +Question:+ Which characters can be used in an attribute name? - FIWARE Orion +Description:+ I'd like to know details about character set and character code that can be used in an attribute name. I tried to create an entity that has an attribute name "日本語". I was able to create it in case of NGSIv1 but not in case of NGSIv2. In case of NGSIv1 API, Request: (curl localhost:1026/v1/updateContext -sS --header 'Content-Type: application/json' \ --header 'Accept: application/json' -d @- <<EOF) | jq . { "contextElements": [ { "type": "Test", "isPattern": "false", "id": "Testv1", "attributes": [ { "name": "japanese", "type": "Integer", "value": "1" }, { "name": "日本語", "type": "Integer", "value": "2" } ] } ], "updateAction": "APPEND" } EOF Response: { "contextResponses": [ { "contextElement": { "type": "Test", "isPattern": "false", "id": "Testv1", "attributes": [ { "name": "japanese", "type": "Integer", "value": "" }, { "name": "日本語", "type": "Integer", "value": "" } ] }, "statusCode": { "code": "200", "reasonPhrase": "OK" } } ] } In case of NGSIv2 API, Request: (curl localhost:1026/v2/entities -s -S -H 'Content-Type: application/json' \ -d @- <<EOF) | jq . { "id": "Test1", "type": "Test", "japanese": { "value": 1, "type": "Integer" }, "日本語": { "value": 2, "type": "Integer" } } EOF Response: { "error": "BadRequest", "description": "Invalid characters in attribute name" } |
Created question in FIWARE Q/A platform on 01-02-2019 at 23:02
{color: red}Please, ANSWER this question AT{color} https://stackoverflow.com/questions/54488078/which-characters-can-be-used-in-an-attribute-name-fiware-orion +Question:+ Which characters can be used in an attribute name? - FIWARE Orion +Description:+ I'd like to know details about character set and character code that can be used in an attribute name. I tried to create an entity that has an attribute name "日本語". I was able to create it in case of NGSIv1 but not in case of NGSIv2. In case of NGSIv1 API, Request: (curl localhost:1026/v1/updateContext -sS --header 'Content-Type: application/json' \ --header 'Accept: application/json' -d @- <<EOF) | jq . { "contextElements": [ { "type": "Test", "isPattern": "false", "id": "Testv1", "attributes": [ { "name": "japanese", "type": "Integer", "value": "1" }, { "name": "日本語", "type": "Integer", "value": "2" } ] } ], "updateAction": "APPEND" } EOF Response: { "contextResponses": [ { "contextElement": { "type": "Test", "isPattern": "false", "id": "Testv1", "attributes": [ { "name": "japanese", "type": "Integer", "value": "" }, { "name": "日本語", "type": "Integer", "value": "" } ] }, "statusCode": { "code": "200", "reasonPhrase": "OK" } } ] } In case of NGSIv2 API, Request: (curl localhost:1026/v2/entities -s -S -H 'Content-Type: application/json' \ -d @- <<EOF) | jq . { "id": "Test1", "type": "Test", "japanese": { "value": 1, "type": "Integer" }, "日本語": { "value": 2, "type": "Integer" } } EOF Response: { "error": "BadRequest", "description": "Invalid characters in attribute name" } |
Assignee | Backlog Manager [ backlogmanager ] |
Fix Version/s | 2021 [ 12600 ] |