Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions packages/cubejs-api-gateway/openspec.yml
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,8 @@ components:
type: "string"
shortTitle:
type: "string"
meta:
type: "object"
V1CubeMetaDimensionGranularity:
type: "object"
required:
Expand Down Expand Up @@ -131,6 +133,8 @@ components:
type: array
items:
$ref: "#/components/schemas/V1CubeMetaDimensionGranularity"
meta:
type: "object"
V1CubeMetaMeasure:
type: "object"
required:
Expand All @@ -147,6 +151,8 @@ components:
type: "string"
aggType:
type: "string"
meta:
type: "object"
V1CubeMeta:
type: "object"
required:
Expand All @@ -162,6 +168,8 @@ components:
type: "string"
type:
$ref: "#/components/schemas/V1CubeMetaType"
meta:
type: "object"
description:
type: "string"
measures:
Expand Down
1 change: 0 additions & 1 deletion rust/cubesql/cubeclient/DEVELOPMENT.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,5 @@ The above command will also overwrite `src/apis/default_api.rs`, remember to do

1. Revert block for long polling in `load_v1()`
2. Revert block containing `tests` module
3. Rename fields from `r#type` to `_type` (TODO: we can use `--name-mappings type=_type` on new `openapi-generator`)

Finally, run `cargo fmt`
3 changes: 3 additions & 0 deletions rust/cubesql/cubeclient/src/models/v1_cube_meta.rs
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,8 @@
pub title: Option<String>,
#[serde(rename = "type")]
pub r#type: crate::models::V1CubeMetaType,
#[serde(rename = "meta", skip_serializing_if = "Option::is_none")]
pub meta: Option<serde_json::Value>,
#[serde(rename = "description", skip_serializing_if = "Option::is_none")]
pub description: Option<String>,
#[serde(rename = "measures")]
Expand All @@ -40,6 +42,7 @@
name,
title: None,
r#type,
meta: None,

Check warning on line 45 in rust/cubesql/cubeclient/src/models/v1_cube_meta.rs

View check run for this annotation

Codecov / codecov/patch

rust/cubesql/cubeclient/src/models/v1_cube_meta.rs#L45

Added line #L45 was not covered by tests
description: None,
measures,
dimensions,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,8 @@
pub r#type: String,
#[serde(rename = "granularities", skip_serializing_if = "Option::is_none")]
pub granularities: Option<Vec<crate::models::V1CubeMetaDimensionGranularity>>,
#[serde(rename = "meta", skip_serializing_if = "Option::is_none")]
pub meta: Option<serde_json::Value>,
}

impl V1CubeMetaDimension {
Expand All @@ -27,6 +29,7 @@
description: None,
r#type,
granularities: None,
meta: None,

Check warning on line 32 in rust/cubesql/cubeclient/src/models/v1_cube_meta_dimension.rs

View check run for this annotation

Codecov / codecov/patch

rust/cubesql/cubeclient/src/models/v1_cube_meta_dimension.rs#L32

Added line #L32 was not covered by tests
}
}
}
3 changes: 3 additions & 0 deletions rust/cubesql/cubeclient/src/models/v1_cube_meta_measure.rs
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,8 @@
pub r#type: String,
#[serde(rename = "aggType", skip_serializing_if = "Option::is_none")]
pub agg_type: Option<String>,
#[serde(rename = "meta", skip_serializing_if = "Option::is_none")]
pub meta: Option<serde_json::Value>,
}

impl V1CubeMetaMeasure {
Expand All @@ -30,6 +32,7 @@
description: None,
r#type,
agg_type: None,
meta: None,

Check warning on line 35 in rust/cubesql/cubeclient/src/models/v1_cube_meta_measure.rs

View check run for this annotation

Codecov / codecov/patch

rust/cubesql/cubeclient/src/models/v1_cube_meta_measure.rs#L35

Added line #L35 was not covered by tests
}
}
}
3 changes: 3 additions & 0 deletions rust/cubesql/cubeclient/src/models/v1_cube_meta_segment.rs
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,8 @@
pub description: Option<String>,
#[serde(rename = "shortTitle")]
pub short_title: String,
#[serde(rename = "meta", skip_serializing_if = "Option::is_none")]
pub meta: Option<serde_json::Value>,
}

impl V1CubeMetaSegment {
Expand All @@ -27,6 +29,7 @@
title,
description: None,
short_title,
meta: None,

Check warning on line 32 in rust/cubesql/cubeclient/src/models/v1_cube_meta_segment.rs

View check run for this annotation

Codecov / codecov/patch

rust/cubesql/cubeclient/src/models/v1_cube_meta_segment.rs#L32

Added line #L32 was not covered by tests
}
}
}
4 changes: 4 additions & 0 deletions rust/cubesql/cubesql/benches/large_model.rs
Original file line number Diff line number Diff line change
Expand Up @@ -80,13 +80,15 @@ pub fn get_large_model_test_meta(dims: usize) -> Vec<V1CubeMeta> {
description: None,
r#type: "number".to_string(),
agg_type: Some("count".to_string()),
meta: None,
},
V1CubeMetaMeasure {
name: format!("{}.sum", cube_name),
title: None,
description: None,
r#type: "number".to_string(),
agg_type: Some("sum".to_string()),
meta: None,
},
],
dimensions: (1..=dims)
Expand All @@ -95,10 +97,12 @@ pub fn get_large_model_test_meta(dims: usize) -> Vec<V1CubeMeta> {
description: None,
r#type: "number".to_string(),
granularities: None,
meta: None,
})
.collect(),
segments: vec![],
joins: None,
meta: None,
}]
}

Expand Down
Loading
Loading