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

        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
        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
        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
        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

          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: