Skip to content

Commit

Permalink
feat: Schema format options
Browse files Browse the repository at this point in the history
  • Loading branch information
efirs committed Oct 28, 2022
1 parent ec27094 commit 452d3c5
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 1 deletion.
12 changes: 11 additions & 1 deletion server/v1/api.proto
Original file line number Diff line number Diff line change
Expand Up @@ -575,6 +575,11 @@ message ListCollectionsResponse {
message DescribeDatabaseRequest {
// Name of the database.
string db = 1;

// Return schema in the requested format.
// Format can be JSON, Go, TypeScript, Java.
// Default is JSON.
string schema_format = 2;
}

message DescribeCollectionRequest {
Expand All @@ -584,8 +589,13 @@ message DescribeCollectionRequest {
// Name of the collection.
string collection = 2;

// Return schema in the requested format.
// Format can be JSON, Go, TypeScript, Java.
// Default is JSON.
string schema_format = 3;

// Collection options.
CollectionOptions options = 3;
CollectionOptions options = 4;
}

// A detailed description of the database and all the associated collections.
Expand Down
6 changes: 6 additions & 0 deletions server/v1/openapi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -1408,6 +1408,9 @@ components:
collection:
type: string
description: Name of the collection.
schema_format:
type: string
description: Return schema in the requested format. Format can be JSON, Go, TypeScript, Java. Default is JSON.
options:
$ref: '#/components/schemas/CollectionOptions'
DescribeCollectionResponse:
Expand All @@ -1432,6 +1435,9 @@ components:
db:
type: string
description: Name of the database.
schema_format:
type: string
description: Return schema in the requested format. Format can be JSON, Go, TypeScript, Java. Default is JSON.
DescribeDatabaseResponse:
type: object
properties:
Expand Down

0 comments on commit 452d3c5

Please sign in to comment.