Update OpenAPI Models for Namespace #541
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Update OpenAPI Models for Namespace
Summary
This PR updates the codebase to align with the latest OpenAPI specification changes for namespace-related models. The API specification has been updated to:
total_countfield toListNamespacesResponsetotal_countfield inNamespaceDescriptionwithindexed_fieldsfieldThe wrapper code has been updated to properly parse and populate these new fields when using the gRPC client.
Changes
Code Generator Updates
Updated
codegen/apissubmodule to latest commit (bbad89bd51d792534a9ba06a44ed1f2259f7f89f)Updated
pinecone/core/openapi/db_data/model/list_namespaces_response.py:total_count(int) field toListNamespacesResponseUpdated
pinecone/core/openapi/db_data/model/namespace_description.py:total_countfield (moved toListNamespacesResponse)indexed_fieldsfield of typeNamespaceDescriptionIndexedFieldsAdded new model
pinecone/core/openapi/db_data/model/namespace_description_indexed_fields.py:NamespaceDescriptionIndexedFieldswithfieldsproperty (list of strings)Updated
pinecone/core/openapi/db_data/models/__init__.py:NamespaceDescriptionIndexedFieldsUpdated
pinecone/openapi_support/api_version.py:Wrapper Code Updates
pinecone/grpc/utils.py:parse_list_namespaces_responsefunction:total_countfrom gRPC response (totalCountin JSON)indexedFieldsfor each namespace in the listNamespaceDescriptionIndexedFieldsobjects when presentListNamespacesResponseparse_namespace_descriptionfunction:indexedFieldsfrom gRPC response (if present)NamespaceDescriptionIndexedFieldsobject with thefieldsarrayindexed_fieldswhen constructingNamespaceDescriptionAdded import for
NamespaceDescriptionIndexedFieldsmodelTechnical Details
Field Changes
ListNamespacesResponse.total_count(new):inttotalCountin gRPC JSON responseNamespaceDescription.indexed_fields(new):NamespaceDescriptionIndexedFieldsindexedFields.fieldsin gRPC JSON responseNamespaceDescription.total_count(removed):ListNamespacesResponsewhere it is more semantically appropriateBackward Compatibility
NoneTesting
Notes
total_countandindexed_fieldsare optional fields, so backward compatibility is maintained