Uploaded image for project: 'Help-Desk'
  1. Help-Desk
  2. HELP-15412

FIWARE.Question.Tech.Which characters can be used in an attribute name? - FIWARE Orion.

    Details

      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": "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" }

        Activity

        Transition Time In Source Status Execution Times Last Executer Last Execution Date
        Open Open In Progress In Progress
        17h 59m 1 Backlog Manager 02/Feb/19 6:05 PM
        In Progress In Progress Answered Answered
        3h 1 Backlog Manager 02/Feb/19 9:06 PM
        Answered Answered Closed Closed
        9h 1 Backlog Manager 03/Feb/19 6:06 AM
        fla Fernando Lopez made changes -
        Fix Version/s 2021 [ 12600 ]
        fla Fernando Lopez made changes -
        Assignee Backlog Manager [ backlogmanager ]
        fla Fernando Lopez made changes -
        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 @- &lt;&lt;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 @- &lt;&lt;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 @- &lt;&lt;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 @- &lt;&lt;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"
        }

        backlogmanager Backlog Manager made changes -
        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.
        Hide
        backlogmanager Backlog Manager added a comment -

        2019-02-03 06:05|UPDATED status: transition Finish| # answers= 1, accepted answer= True

        Show
        backlogmanager Backlog Manager added a comment - 2019-02-03 06:05|UPDATED status: transition Finish| # answers= 1, accepted answer= True
        backlogmanager Backlog Manager made changes -
        Resolution Done [ 10000 ]
        Status Answered [ 10104 ] Closed [ 6 ]
        Hide
        backlogmanager Backlog Manager added a comment -

        2019-02-02 21:05|UPDATED status: transition Answered| # answers= 1, accepted answer= False

        Show
        backlogmanager Backlog Manager added a comment - 2019-02-02 21:05|UPDATED status: transition Answered| # answers= 1, accepted answer= False
        backlogmanager Backlog Manager made changes -
        Status In Progress [ 3 ] Answered [ 10104 ]
        Hide
        backlogmanager Backlog Manager added a comment -

        2019-02-02 18:05|UPDATED status: transition Answer| # answers= 1, accepted answer= False

        Show
        backlogmanager Backlog Manager added a comment - 2019-02-02 18:05|UPDATED status: transition Answer| # answers= 1, accepted answer= False
        backlogmanager Backlog Manager made changes -
        Status Open [ 1 ] In Progress [ 3 ]
        backlogmanager Backlog Manager made changes -
        Field Original Value New Value
        Component/s FIWARE-TECH-HELP [ 10278 ]
        Hide
        backlogmanager Backlog Manager added a comment -

        2019-02-02 00:05|CREATED monitor | # answers= 0, accepted answer= False

        Show
        backlogmanager Backlog Manager added a comment - 2019-02-02 00:05|CREATED monitor | # answers= 0, accepted answer= False
        backlogmanager Backlog Manager created issue -

          People

          • Assignee:
            backlogmanager Backlog Manager
            Reporter:
            backlogmanager Backlog Manager
          • Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: