Isilon / isilon_sdk

Official repository for isilon_sdk. All language bindings are available for download under the 'Releases' tab.
MIT License
50 stars 21 forks source link

Spec file validation fail: invalid schema at definition NfsNetgroup #16

Closed cbrainerd closed 6 years ago

cbrainerd commented 8 years ago

"name": "SyntaxError", "message": "Swagger schema validation failed. Data does not match any schemas from 'oneOf' at #/paths//platform/3/protocols/nfs/netgroup/put/parameters/1 Data does not match any schemas from 'oneOf' at #/paths//platform/3/protocols/nfs/netgroup/put/parameters/1 Expected type object but found type string at #/schema/properties/type Missing required property: type at #/ Missing required property: $ref at #/paths//platform/3/protocols/nfs/netgroup/put/parameters/1

A malformed schema is generated for definition NfsNetgroup. The "properties" nested directly under another "properties" is not valid.

        "NfsNetgroup": {
            "properties": {
                "description": "NFS netgroup cache settings.",
                "properties": {
                    "bgwrite": {
                        "description": "To-disk backup interval for the netgroup cache.",
                        "type": "integer"
                    },
                    "expiration": {
                        "description": "Time between updates of netgroups in the cache.",
                        "type": "integer"
                    },
                    "lifetime": {
                        "description": "Length of time an un-accessed netgroup remains in the cache.",
                        "type": "integer"
                    },
                    "retry": {
                        "description": "Retry interval for netgroup updates if the remote provider is unresponsive.",
                        "type": "integer"
                    }
                },
                "type": "object"
            },
            "type": "object"
        },

The root of the problem is likely a malformed PAPI PUT_input_schema for /platform/3/protocols/nfs/netgroup/put/parameters/1. This should be fixed in a future OneFS release (bug 176259) but would need to be addressed in create_swagger_config.py to create valid spec files from existing OneFS releases.

The bad schema suspected to result in the bad output in the spec file is:

"PUT_input_schema": {
  "settings": {
    "description": "NFS netgroup cache settings.",
    "properties": {
      "bgwrite": {
        "description": "To-disk backup interval for the netgroup cache.",
        "type": "integer"
      },
      "expiration": {
        "description": "Time between updates of netgroups in the cache.",
        "type": "integer"
      },
      "lifetime": {
        "description": "Length of time an un-accessed netgroup remains in the cache.",
        "type": "integer"
      },
      "retry": {
        "description": "Retry interval for netgroup updates if the remote provider is unresponsive.",
        "type": "integer"
      }
    },
    "type": "object"
  },
  "type": "object"
}
Atomicology commented 6 years ago

The schemas have already been updated in the MRs for OneFS 8.0.0 and 8.0.1, which were the two affected versions. Thus, I am closing this issue as it is no longer present.