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

API Descriptor using String instead of "Number" type for some settings

    Details

    • Target Version/s:
    • Sprint:
      Sprint 2017.17 Newton, Sprint 2018.1 Newton
    • Needs backport:
      Yes
    • Support Ticket IDs:
    • Needs QA verification:
      Yes
    • Functional tests:
      No
    • Are the reproduction steps defined?:
      No (add reasons in the comment)

      Description

      For the set of API descriptors settings, some of the settings are not using "integer/long" type and shoehorn everything as "String" (no type validation)

       Take for example the following (ok J2EEAgent settings):

                          "configurationReloadInterval": {
                            "type": "object",
                            "properties": {
                              "inherited": {
                                "type": "boolean"
                              },
                              "value": {
                                "type": "integer",
                                "format": "int32"
                              }
                            },
      

      but then these new ones for Agent 5 is

      
                          "webSocketConnectionIntervalInMinutes": {
                            "type": "object",
                            "properties": {
                              "inherited": {
                                "type": "boolean"
                              },
                              "value": {
                                "type": "string"
                              }
                            },
      
                          "postDataPreserveCacheEntryMaxTotalSizeMb": {
                            "type": "object",
                            "properties": {
                              "inherited": {
                                "type": "boolean"
                              },
                              "value": {
                                "type": "string"
                              }
                            },
                            "title": "PDP Maximum Cache Size",
                            "description": "Maximum size of the PDP cache, in megabytes (Property name: org.forgerock.openam.agents.config.postdata.preserve.cache.entry.max.total.size.mb). (Agent 5 only)",
                            "x-propertyOrder": 13600
                          }
                      "postDataPreserveCacheEntryMaxEntries": {
                        "type": "string",
                        "title": "PDP Maximum Number of Cache Entries",
                        "description": "Maximum number of entries to hold in the PDP cache (Property name: org.forgerock.openam.agents.config.postdata.preserve.cache.entry.max.entries) (Agent 5 only).",
                        "x-propertyOrder": 13550
                      },
      
                      "postDataPreserveCacheEntryMaxTotalSizeMb": {
                        "type": "string",
                        "title": "PDP Maximum Cache Size",
                        "description": "Maximum size of the PDP cache, in megabytes (Property name: org.forgerock.openam.agents.config.postdata.preserve.cache.entry.max.total.size.mb). (Agent 5 only)",
                        "x-propertyOrder": 13600
                      },
      

      The schema is defined as in AgentService.xml as a string

                          <AttributeSchema
                                  name="org.forgerock.openam.agents.config.balance.websocket.connection.interval.in.minutes"
                                  type="single"
                                  syntax="string"
                                  i18nKey="a246a"
                                  order="12105" resourceName="webSocketConnectionIntervalInMinutes">
                              <DefaultValues>
                                  <Value></Value>
                              </DefaultValues>
                          </AttributeSchema>
      
      

      This although may work but should be more correct since the REST API may be used to created these. (PS: currently 5.1/5.5/6.0 does not seems to have resource versioning – they seems to be same and so we should get things right)

        Attachments

          Activity

            People

            • Assignee:
              dipu.seminlal Dipu Seminlal
              Reporter:
              chee-weng.chea C-Weng C
            • Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: