Uploaded image for project: 'OpenAM'
  1. OpenAM
  2. OPENAM-12978

API Explorer - Create Page Node Example Value is inadequate

    XMLWordPrintable

    Details

    • Bug
    • Status: Open
    • Major
    • Resolution: Unresolved
    • 6.0.0
    • None
    • REST SDK
    • ForgeRock Access Management 6.0.0-SNAPSHOT Build 794ac69988 (2018-April-21 23:39)
    • Rank:
      1|hzvu5j:

      Description

      Bug description

      API Explorer - Create Page Node Example Value is inadequate
      How would anyone know what is required?
      Instead of:

      {
        "nodes": [
          {
            "id": "string",
            "displayName": "string",
            "nodeType": "string"
          }
        ]
      }

      It should read:

      {
        "nodes": [
          {
            "id": "string",
            "displayName": "string",
            "nodeType": "string"
          }
        ],
         "_id":"string",
         "_type":{
            "_id":"PageNode",
            "name":"Page Node"
         }
      }

      How to reproduce the issue

      • Create a node e.g. PasswordCollectorNode
        • curl -X PUT --header 'Content-Type: application/json' --header 'Accept: application/json' -d '{}' 'http://joanna.example.com:8080/openam/json/realm-config/authentication/authenticationtrees/nodes/PasswordCollectorNode/11111111-1234-1234-1234-123456789012'
        •  {
            "_id": "11111111-1234-1234-1234-123456789012",
            "_rev": "588626379",
            "_type": {
              "_id": "PasswordCollectorNode",
              "name": "Password Collector",
              "collection": true
            }
          } 
      • Create a page node with that node
      Expected behaviour
      curl -X PUT --header 'Content-Type: application/json' --header 'Accept: application/json' -d '{ \ 
          "nodes":[ \ 
             { \ 
                "displayName":"Password Collector", \ 
                "nodeType":"PasswordCollectorNode", \ 
                "_id":"11111111-1234-1234-1234-123456789012" \ 
             } \ 
          ], \ 
          "_id":"22222222-1234-1234-1234-123456789012", \ 
          "_type":{ \ 
             "_id":"PageNode", \ 
             "name":"Page Node" \ 
          } \ 
       }' 'http://joanna.example.com:8080/openam/json/realm-config/authentication/authenticationtrees/nodes/PageNode/22222222-1234-1234-1234-123456789012'
      
      '

      Successful page node creation

      {
        "_id": "22222222-1234-1234-1234-123456789012",
        "_rev": "-1158694843",
        "nodes": [
          {
            "_id": "11111111-1234-1234-1234-123456789012",
            "nodeType": "PasswordCollectorNode",
            "displayName": "Password Collector"
          }
        ],
        "_type": {
          "_id": "PageNode",
          "name": "Page Node",
          "collection": true
        }
      }
      Current behaviour
      curl -X PUT --header 'Content-Type: application/json' --header 'Accept: application/json' -d '{ \ 
         "nodes": [ \ 
           { \ 
             "id": "11111111-1234-1234-1234-123456789012", \ 
             "displayName": "Username Collector", \ 
             "nodeType": "UsernameCollectorNode" \ 
           } \ 
         ] \ 
       }' 'http://joanna.example.com:8080/openam/json/realm-config/authentication/authenticationtrees/nodes/PageNode/22222222-1234-1234-1234-123456789012'
      {
        "code": 400,
        "reason": "Bad Request",
        "message": "Invalid config: Node does not exist: null: Node does not exist: null"
      }

        Attachments

          Activity

            People

            Unassigned Unassigned
            AndrewVinall Andrew Vinall
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Dates

              Created:
              Updated: