Skip to content

get indexes response is incorrect #29

Description

@rdjy

The response of get indexes is defined as an array of IndexResponse

responses:
'200':
description: ''
content:
application/json:
schema:
type: array
items:
"$ref": "#/components/schemas/IndexResponse"

while IndexResponse is also of array type,

IndexResponse:
type: array
description: The data returned by the index fetch.
items:

However, the actual response is not in nested array structure.

$ curl -s -H 'Content-Type: application/json' -H "X-Cassandra-Token: ${ASTRA_DB_TOKEN}" \
 https://${ASTRA_DB_ID}-${ASTRA_DB_REGION}.apps.astra.datastax.com/api/rest/v2/schemas/keyspaces/${ASTRA_DB_KEYSPACE}/tables/foo/indexes  \
  | jq .
[
  {
    "keyspace_name": "ghoti",
    "table_name": "foo",
    "index_name": "foo_lastname_idx",
    "kind": "CUSTOM",
    "options": [
      {
        "key": "class_name",
        "value": "org.apache.cassandra.index.sai.StorageAttachedIndex"
      },
      {
        "key": "target",
        "value": "lastname"
      }
    ]
  }
]

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions