OpenAPI documentation should specify array of string or string instead of typeless schema for `kind`
Current documentation does not specify the possible types for the property kind
in CursorQueryRequest
and QueryRequests
:
Currently:
CursorQueryRequest:
description: Json object to query the Search API
type: object
required:
- kind
properties:
cursor:
.....
kind:
type: object
description: The kind of the record to query e.g. "tenant1:test:well:1.0.0" or "tenant1:test:well:1.0.0,tenant1:test:well:2.0.0" or ["tenant1:test:well:1.0.0", "tenant1:test:well:2.0.0"].
This causes issue when creating data models based on the OpenAPI documentation, as the typeless schemas will be interpreted as an dictionary type, but description specifies that both string and array of strings are valid parameters.
By specifying types correctly using oneOf
instead, gives a correct specification:
CursorQueryRequest:
description: Json object to query the Search API
type: object
required:
- kind
properties:
cursor:
.....
kind:
type: object
additionalProperties:
oneOf:
- type: string
- type: array
items:
type: string
description: The kind of the record to query e.g. "tenant1:test:well:1.0.0" or "tenant1:test:well:1.0.0,tenant1:test:well:2.0.0" or ["tenant1:test:well:1.0.0", "tenant1:test:well:2.0.0"].
This makes the models unambiguous.
Affects CursorQueryRequest
and QueryRequests
, as these needs the kind
parameter