Skip to content

Commit ae48928

Browse files
committed
Update openapi schema
1 parent c185481 commit ae48928

File tree

2 files changed

+133
-15
lines changed

2 files changed

+133
-15
lines changed

src/openapi/schema.ts

Lines changed: 132 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -112,9 +112,6 @@ export interface paths {
112112
/** Gives meta information about the server and can be used to provide information to another Weaviate instance that wants to interact with the current instance. */
113113
get: operations['meta.get'];
114114
};
115-
'/schema/cluster-status': {
116-
get: operations['schema.cluster.status'];
117-
};
118115
'/schema': {
119116
get: operations['schema.dump'];
120117
post: operations['schema.objects.create'];
@@ -145,6 +142,10 @@ export interface paths {
145142
/** delete tenants from a specific class */
146143
delete: operations['tenants.delete'];
147144
};
145+
'/schema/{className}/tenants/{tenantName}': {
146+
/** Check if a tenant exists for a specific class */
147+
head: operations['tenant.exists'];
148+
};
148149
'/backups/{backend}': {
149150
/** Starts a process of creating a backup for a set of classes */
150151
post: operations['backups.create'];
@@ -159,6 +160,10 @@ export interface paths {
159160
/** Starts a process of restoring a backup for a set of classes */
160161
post: operations['backups.restore'];
161162
};
163+
'/cluster/statistics': {
164+
/** Returns Raft cluster statistics of Weaviate DB. */
165+
get: operations['cluster.get.statistics'];
166+
};
162167
'/nodes': {
163168
/** Returns status of Weaviate DB. */
164169
get: operations['nodes.get'];
@@ -364,6 +369,8 @@ export interface definitions {
364369
MultiTenancyConfig: {
365370
/** @description Whether or not multi-tenancy is enabled for this class */
366371
enabled?: boolean;
372+
/** @description Nonexistent tenants should (not) be created implicitly */
373+
autoTenantCreation?: boolean;
367374
};
368375
/** @description JSON object value. */
369376
JsonObject: { [key: string]: unknown };
@@ -716,6 +723,8 @@ export interface definitions {
716723
* @description The length of the vector indexing queue.
717724
*/
718725
vectorQueueLength?: number;
726+
/** @description The load status of the shard. */
727+
loaded?: boolean;
719728
};
720729
/** @description The definition of a backup node status response body */
721730
NodeStatus: {
@@ -742,6 +751,57 @@ export interface definitions {
742751
NodesStatusResponse: {
743752
nodes?: definitions['NodeStatus'][];
744753
};
754+
/** @description The definition of Raft statistics. */
755+
RaftStatistics: {
756+
appliedIndex?: string;
757+
commitIndex?: string;
758+
fsmPending?: string;
759+
lastContact?: string;
760+
lastLogIndex?: string;
761+
lastLogTerm?: string;
762+
lastSnapshotIndex?: string;
763+
lastSnapshotTerm?: string;
764+
/** @description Weaviate Raft nodes. */
765+
latestConfiguration?: { [key: string]: unknown };
766+
latestConfigurationIndex?: string;
767+
numPeers?: string;
768+
protocolVersion?: string;
769+
protocolVersionMax?: string;
770+
protocolVersionMin?: string;
771+
snapshotVersionMax?: string;
772+
snapshotVersionMin?: string;
773+
state?: string;
774+
term?: string;
775+
};
776+
/** @description The definition of node statistics. */
777+
Statistics: {
778+
/** @description The name of the node. */
779+
name?: string;
780+
/**
781+
* @description Node's status.
782+
* @default HEALTHY
783+
* @enum {string}
784+
*/
785+
status?: 'HEALTHY' | 'UNHEALTHY' | 'UNAVAILABLE' | 'TIMEOUT';
786+
bootstrapped?: boolean;
787+
dbLoaded?: boolean;
788+
/** Format: uint64 */
789+
initialLastAppliedIndex?: number;
790+
lastAppliedIndex?: number;
791+
isVoter?: boolean;
792+
leaderId?: { [key: string]: unknown };
793+
leaderAddress?: { [key: string]: unknown };
794+
open?: boolean;
795+
ready?: boolean;
796+
candidates?: { [key: string]: unknown };
797+
/** @description Weaviate Raft statistics. */
798+
raft?: definitions['RaftStatistics'];
799+
};
800+
/** @description The cluster statistics of all of the Weaviate nodes */
801+
ClusterStatisticsResponse: {
802+
statistics?: definitions['Statistics'][];
803+
synchronized?: boolean;
804+
};
745805
/** @description Either set beacon (direct reference) or set class and schema (concept reference) */
746806
SingleRef: {
747807
/**
@@ -2216,19 +2276,13 @@ export interface operations {
22162276
};
22172277
};
22182278
};
2219-
'schema.cluster.status': {
2220-
responses: {
2221-
/** The schema in the cluster is in sync. */
2222-
200: {
2223-
schema: definitions['SchemaClusterStatus'];
2224-
};
2225-
/** The schema is either out of sync (see response body) or the sync check could not be completed. */
2226-
500: {
2227-
schema: definitions['SchemaClusterStatus'];
2279+
'schema.dump': {
2280+
parameters: {
2281+
header: {
2282+
/** If consistency is true, the request will be proxied to the leader to ensure strong schema consistency */
2283+
consistency?: boolean;
22282284
};
22292285
};
2230-
};
2231-
'schema.dump': {
22322286
responses: {
22332287
/** Successfully dumped the database schema. */
22342288
200: {
@@ -2278,6 +2332,10 @@ export interface operations {
22782332
path: {
22792333
className: string;
22802334
};
2335+
header: {
2336+
/** If consistency is true, the request will be proxied to the leader to ensure strong schema consistency */
2337+
consistency?: boolean;
2338+
};
22812339
};
22822340
responses: {
22832341
/** Found the Class, returned as body */
@@ -2460,6 +2518,10 @@ export interface operations {
24602518
path: {
24612519
className: string;
24622520
};
2521+
header: {
2522+
/** If consistency is true, the request will be proxied to the leader to ensure strong schema consistency */
2523+
consistency?: boolean;
2524+
};
24632525
};
24642526
responses: {
24652527
/** tenants from specified class. */
@@ -2573,6 +2635,39 @@ export interface operations {
25732635
};
25742636
};
25752637
};
2638+
/** Check if a tenant exists for a specific class */
2639+
'tenant.exists': {
2640+
parameters: {
2641+
path: {
2642+
className: string;
2643+
tenantName: string;
2644+
};
2645+
header: {
2646+
/** If consistency is true, the request will be proxied to the leader to ensure strong schema consistency */
2647+
consistency?: boolean;
2648+
};
2649+
};
2650+
responses: {
2651+
/** The tenant exists in the specified class */
2652+
200: unknown;
2653+
/** Unauthorized or invalid credentials. */
2654+
401: unknown;
2655+
/** Forbidden */
2656+
403: {
2657+
schema: definitions['ErrorResponse'];
2658+
};
2659+
/** The tenant not found */
2660+
404: unknown;
2661+
/** Invalid Tenant class */
2662+
422: {
2663+
schema: definitions['ErrorResponse'];
2664+
};
2665+
/** An error has occurred while trying to fulfill the request. Most likely the ErrorResponse will contain more information about the error. */
2666+
500: {
2667+
schema: definitions['ErrorResponse'];
2668+
};
2669+
};
2670+
};
25762671
/** Starts a process of creating a backup for a set of classes */
25772672
'backups.create': {
25782673
parameters: {
@@ -2709,6 +2804,29 @@ export interface operations {
27092804
};
27102805
};
27112806
};
2807+
/** Returns Raft cluster statistics of Weaviate DB. */
2808+
'cluster.get.statistics': {
2809+
responses: {
2810+
/** Cluster statistics successfully returned */
2811+
200: {
2812+
schema: definitions['ClusterStatisticsResponse'];
2813+
};
2814+
/** Unauthorized or invalid credentials. */
2815+
401: unknown;
2816+
/** Forbidden */
2817+
403: {
2818+
schema: definitions['ErrorResponse'];
2819+
};
2820+
/** Invalid backup restoration status attempt. */
2821+
422: {
2822+
schema: definitions['ErrorResponse'];
2823+
};
2824+
/** An error has occurred while trying to fulfill the request. Most likely the ErrorResponse will contain more information about the error. */
2825+
500: {
2826+
schema: definitions['ErrorResponse'];
2827+
};
2828+
};
2829+
};
27122830
/** Returns status of Weaviate DB. */
27132831
'nodes.get': {
27142832
parameters: {

tools/refresh_schema.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,6 @@
22

33
set -euo pipefail
44

5-
branchOrTag="${1:-master}"
5+
branchOrTag="${1:-main}"
66
npx openapi-typescript https://raw.githubusercontent.com/weaviate/weaviate/${branchOrTag}/openapi-specs/schema.json -o ./src/openapi/schema.ts
77
npx prettier --write --no-error-on-unmatched-pattern './src/openapi/schema.ts'

0 commit comments

Comments
 (0)