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"
}
]
}
]
The response of get indexes is defined as an array of IndexResponse
astra-client-go/rest-api-swagger.yaml
Lines 428 to 436 in c640f33
while IndexResponse is also of array type,
astra-client-go/rest-api-swagger.yaml
Lines 1238 to 1241 in c640f33
However, the actual response is not in nested array structure.