Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

get indexes response is incorrect #29

Open
rdjy opened this issue Oct 12, 2023 · 0 comments
Open

get indexes response is incorrect #29

rdjy opened this issue Oct 12, 2023 · 0 comments

Comments

@rdjy
Copy link

rdjy commented Oct 12, 2023

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"
      }
    ]
  }
]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant