Skip to content

Commit

Permalink
Update recordCount -> vectorCount (#189)
Browse files Browse the repository at this point in the history
## Problem
Collections still return `vector_count` and we've updated the OpenAPI
spec.

## Solution

- Regenerate OpenAPI core
- Fix small issue in `merge` workflow
  • Loading branch information
austin-denoble authored Jan 14, 2024
2 parents 6aa2d9b + 4238505 commit 7284b02
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 11 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/merge.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ jobs:
- name: Setup
uses: ./.github/actions/setup
- name: Build docs
uses: ./github/actions/build-docs
uses: ./.github/actions/build-docs

# build-and-publish-docs:
# name: Build and publish docs to sdk-docs
Expand Down
17 changes: 7 additions & 10 deletions src/pinecone-generated-ts-fetch/models/CollectionModel.ts
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ export interface CollectionModel {
* @type {number}
* @memberof CollectionModel
*/
size: number;
size?: number;
/**
* The status of the collection.
* @type {string}
Expand All @@ -42,13 +42,13 @@ export interface CollectionModel {
* @type {number}
* @memberof CollectionModel
*/
dimension: number;
dimension?: number;
/**
* The number of records stored in the collection
* @type {number}
* @memberof CollectionModel
*/
recordCount: number;
vectorCount?: number;
/**
* The environment where the collection is hosted.
* @type {string}
Expand All @@ -75,10 +75,7 @@ export type CollectionModelStatusEnum = typeof CollectionModelStatusEnum[keyof t
export function instanceOfCollectionModel(value: object): boolean {
let isInstance = true;
isInstance = isInstance && "name" in value;
isInstance = isInstance && "size" in value;
isInstance = isInstance && "status" in value;
isInstance = isInstance && "dimension" in value;
isInstance = isInstance && "recordCount" in value;

return isInstance;
}
Expand All @@ -94,10 +91,10 @@ export function CollectionModelFromJSONTyped(json: any, ignoreDiscriminator: boo
return {

'name': json['name'],
'size': json['size'],
'size': !exists(json, 'size') ? undefined : json['size'],
'status': json['status'],
'dimension': json['dimension'],
'recordCount': json['record_count'],
'dimension': !exists(json, 'dimension') ? undefined : json['dimension'],
'vectorCount': !exists(json, 'vector_count') ? undefined : json['vector_count'],
'environment': !exists(json, 'environment') ? undefined : json['environment'],
};
}
Expand All @@ -115,7 +112,7 @@ export function CollectionModelToJSON(value?: CollectionModel | null): any {
'size': value.size,
'status': value.status,
'dimension': value.dimension,
'record_count': value.recordCount,
'vector_count': value.vectorCount,
'environment': value.environment,
};
}
Expand Down

0 comments on commit 7284b02

Please sign in to comment.