Skip to content

Commit

Permalink
Update to NDC Spec v0.2.0-rc.2 (#40)
Browse files Browse the repository at this point in the history
  • Loading branch information
daniel-chambers authored Dec 12, 2024
1 parent 8459b1a commit 8cfeae1
Show file tree
Hide file tree
Showing 5 changed files with 111 additions and 28 deletions.
4 changes: 2 additions & 2 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 4 additions & 0 deletions rust-toolchain.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
[toolchain]
channel = "1.83.0"
profile = "default" # see https://rust-lang.github.io/rustup/concepts/profiles.html
components = ["llvm-tools-preview", "rust-analyzer", "rust-src"] # see https://rust-lang.github.io/rustup/concepts/components.html
101 changes: 84 additions & 17 deletions src/schema/schema.generated.json
Original file line number Diff line number Diff line change
Expand Up @@ -1111,6 +1111,90 @@
}
}
},
{
"type": "object",
"required": [
"type"
],
"properties": {
"type": {
"type": "string",
"enum": [
"contains"
]
}
}
},
{
"type": "object",
"required": [
"type"
],
"properties": {
"type": {
"type": "string",
"enum": [
"contains_insensitive"
]
}
}
},
{
"type": "object",
"required": [
"type"
],
"properties": {
"type": {
"type": "string",
"enum": [
"starts_with"
]
}
}
},
{
"type": "object",
"required": [
"type"
],
"properties": {
"type": {
"type": "string",
"enum": [
"starts_with_insensitive"
]
}
}
},
{
"type": "object",
"required": [
"type"
],
"properties": {
"type": {
"type": "string",
"enum": [
"ends_with"
]
}
}
},
{
"type": "object",
"required": [
"type"
],
"properties": {
"type": {
"type": "string",
"enum": [
"ends_with_insensitive"
]
}
}
},
{
"type": "object",
"required": [
Expand Down Expand Up @@ -1416,23 +1500,6 @@
"AggregateCapabilitiesSchemaInfo": {
"title": "Aggregate Capabilities Schema Info",
"type": "object",
"properties": {
"filter_by": {
"description": "Schema information relevant to the aggregates.filter_by capability",
"anyOf": [
{
"$ref": "#/definitions/AggregateFilterByCapabilitiesSchemaInfo"
},
{
"type": "null"
}
]
}
}
},
"AggregateFilterByCapabilitiesSchemaInfo": {
"title": "Aggregate Filter By Capabilities Schema Info",
"type": "object",
"required": [
"count_scalar_type"
],
Expand Down
24 changes: 18 additions & 6 deletions src/schema/schema.generated.ts
Original file line number Diff line number Diff line change
Expand Up @@ -152,6 +152,24 @@ export type ComparisonOperatorDefinition =
| {
type: "greater_than_or_equal";
}
| {
type: "contains";
}
| {
type: "contains_insensitive";
}
| {
type: "starts_with";
}
| {
type: "starts_with_insensitive";
}
| {
type: "ends_with";
}
| {
type: "ends_with_insensitive";
}
| {
type: "custom";
/**
Expand Down Expand Up @@ -902,12 +920,6 @@ export interface QueryCapabilitiesSchemaInfo {
aggregates?: AggregateCapabilitiesSchemaInfo | null;
}
export interface AggregateCapabilitiesSchemaInfo {
/**
* Schema information relevant to the aggregates.filter_by capability
*/
filter_by?: AggregateFilterByCapabilitiesSchemaInfo | null;
}
export interface AggregateFilterByCapabilitiesSchemaInfo {
/**
* The scalar type which should be used for the return type of count (star_count and column_count) operations.
*/
Expand Down
6 changes: 3 additions & 3 deletions typegen/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ edition = "2021"
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html

[dependencies]
ndc-models = { git = "http://github.com/hasura/ndc-spec.git", tag = "v0.2.0-rc.1" }
schemars = "0.8.15"
ndc-models = { git = "http://github.com/hasura/ndc-spec.git", tag = "v0.2.0-rc.2" }
schemars = "^0.8"
serde = "^1.0"
serde_json = "1.0.107"
serde_json = "^1.0"
serde_derive = "^1.0"

0 comments on commit 8cfeae1

Please sign in to comment.