#codegen #openapi #api-client #typesense

typesense_codegen

client for typesense generated with openapi spec

1 unstable release

0.23.0 Aug 4, 2022

#812 in Development tools

27 downloads per month
Used in typesense

Apache-2.0

190KB
3.5K SLoC

Rust API client for openapi

An open source search engine for building delightful search experiences.

Overview

This API client was generated by the OpenAPI Generator project. By using the openapi-spec from a remote server, you can easily generate an API client.

  • API version: 0.23.0
  • Package version: 0.23.0
  • Build package: org.openapitools.codegen.languages.RustClientCodegen

Installation

Put the package under your project folder in a directory named openapi and add the following to Cargo.toml under [dependencies]:

openapi = { path = "./openapi" }

Documentation for API Endpoints

All URIs are relative to http://localhost

Class Method HTTP request Description
CollectionsApi create_collection POST /collections Create a new collection
CollectionsApi delete_alias DELETE /aliases/{aliasName} Delete an alias
CollectionsApi delete_collection DELETE /collections/{collectionName} Delete a collection
CollectionsApi get_alias GET /aliases/{aliasName} Retrieve an alias
CollectionsApi get_aliases GET /aliases List all aliases
CollectionsApi get_collection GET /collections/{collectionName} Retrieve a single collection
CollectionsApi get_collections GET /collections List all collections
CollectionsApi update_collection PATCH /collections/{collectionName} Update a collection
CollectionsApi upsert_alias PUT /aliases/{aliasName} Create or update a collection alias
DebugApi debug GET /debug Print debugging information
DocumentsApi delete_document DELETE /collections/{collectionName}/documents/{documentId} Delete a document
DocumentsApi delete_documents DELETE /collections/{collectionName}/documents Delete a bunch of documents
DocumentsApi delete_search_override DELETE /collections/{collectionName}/overrides/{overrideId} Delete an override associated with a collection
DocumentsApi delete_search_synonym DELETE /collections/{collectionName}/synonyms/{synonymId} Delete a synonym associated with a collection
DocumentsApi export_documents GET /collections/{collectionName}/documents/export Export all documents in a collection
DocumentsApi get_document GET /collections/{collectionName}/documents/{documentId} Retreive a document
DocumentsApi get_search_override GET /collections/{collectionName}/overrides/{overrideId} Retrieve a single search override
DocumentsApi get_search_overrides GET /collections/{collectionName}/overrides List all collection overrides
DocumentsApi get_search_synonym GET /collections/{collectionName}/synonyms/{synonymId} Retrieve a single search synonym
DocumentsApi get_search_synonyms GET /collections/{collectionName}/synonyms List all collection synonyms
DocumentsApi import_documents POST /collections/{collectionName}/documents/import Import documents into a collection
DocumentsApi index_document POST /collections/{collectionName}/documents Index a document
DocumentsApi multi_search POST /multi_search send multiple search requests in a single HTTP request
DocumentsApi search_collection GET /collections/{collectionName}/documents/search Search for documents in a collection
DocumentsApi update_document PATCH /collections/{collectionName}/documents/{documentId} Update a document
DocumentsApi upsert_search_override PUT /collections/{collectionName}/overrides/{overrideId} Create or update an override to promote certain documents over others
DocumentsApi upsert_search_synonym PUT /collections/{collectionName}/synonyms/{synonymId} Create or update a synonym
HealthApi health GET /health Checks if Typesense server is ready to accept requests.
KeysApi create_key POST /keys Create an API Key
KeysApi delete_key DELETE /keys/{keyId} Delete an API key given its ID.
KeysApi get_key GET /keys/{keyId} Retrieve (metadata about) a key
KeysApi get_keys GET /keys Retrieve (metadata about) all keys.
OperationsApi take_snapshot POST /operations/snapshot Creates a point-in-time snapshot of a Typesense node's state and data in the specified directory.
OperationsApi vote POST /operations/vote Triggers a follower node to initiate the raft voting process, which triggers leader re-election.
OverrideApi get_search_override GET /collections/{collectionName}/overrides/{overrideId} Retrieve a single search override
PromoteApi delete_search_override DELETE /collections/{collectionName}/overrides/{overrideId} Delete an override associated with a collection
PromoteApi get_search_overrides GET /collections/{collectionName}/overrides List all collection overrides
PromoteApi upsert_search_override PUT /collections/{collectionName}/overrides/{overrideId} Create or update an override to promote certain documents over others

Documentation For Models

To get access to the crate's generated documentation, use:

cargo doc --open

Author

Dependencies

~3–12MB
~245K SLoC