diff --git a/packages/cubejs-api-gateway/openspec.yml b/packages/cubejs-api-gateway/openspec.yml index a971070d7968b..ce0051b83ab5f 100644 --- a/packages/cubejs-api-gateway/openspec.yml +++ b/packages/cubejs-api-gateway/openspec.yml @@ -158,6 +158,18 @@ components: type: "string" meta: type: "object" + V1CubeMetaFolder: + type: "object" + required: + - name + - members + properties: + name: + type: "string" + members: + type: array + items: + type: "string" V1CubeMeta: type: "object" required: @@ -193,6 +205,10 @@ components: type: "array" items: $ref: "#/components/schemas/V1CubeMetaJoin" + folders: + type: "array" + items: + $ref: "#/components/schemas/V1CubeMetaFolder" V1CubeMetaType: type: "string" description: Type of cube diff --git a/rust/cubesql/cubeclient/.openapi-generator/FILES b/rust/cubesql/cubeclient/.openapi-generator/FILES index 9151da7ed16ac..3b7c992366f32 100644 --- a/rust/cubesql/cubeclient/.openapi-generator/FILES +++ b/rust/cubesql/cubeclient/.openapi-generator/FILES @@ -4,6 +4,7 @@ src/models/mod.rs src/models/v1_cube_meta.rs src/models/v1_cube_meta_dimension.rs src/models/v1_cube_meta_dimension_granularity.rs +src/models/v1_cube_meta_folder.rs src/models/v1_cube_meta_join.rs src/models/v1_cube_meta_measure.rs src/models/v1_cube_meta_segment.rs diff --git a/rust/cubesql/cubeclient/src/models/mod.rs b/rust/cubesql/cubeclient/src/models/mod.rs index 276b1a0daae83..409b2b4865628 100644 --- a/rust/cubesql/cubeclient/src/models/mod.rs +++ b/rust/cubesql/cubeclient/src/models/mod.rs @@ -4,6 +4,8 @@ pub mod v1_cube_meta_dimension; pub use self::v1_cube_meta_dimension::V1CubeMetaDimension; pub mod v1_cube_meta_dimension_granularity; pub use self::v1_cube_meta_dimension_granularity::V1CubeMetaDimensionGranularity; +pub mod v1_cube_meta_folder; +pub use self::v1_cube_meta_folder::V1CubeMetaFolder; pub mod v1_cube_meta_join; pub use self::v1_cube_meta_join::V1CubeMetaJoin; pub mod v1_cube_meta_measure; diff --git a/rust/cubesql/cubeclient/src/models/v1_cube_meta.rs b/rust/cubesql/cubeclient/src/models/v1_cube_meta.rs index 08dafaa64f803..cc81b7aa7cb36 100644 --- a/rust/cubesql/cubeclient/src/models/v1_cube_meta.rs +++ b/rust/cubesql/cubeclient/src/models/v1_cube_meta.rs @@ -28,6 +28,8 @@ pub struct V1CubeMeta { pub segments: Vec, #[serde(rename = "joins", skip_serializing_if = "Option::is_none")] pub joins: Option>, + #[serde(rename = "folders", skip_serializing_if = "Option::is_none")] + pub folders: Option>, } impl V1CubeMeta { @@ -48,6 +50,7 @@ impl V1CubeMeta { dimensions, segments, joins: None, + folders: None, } } } diff --git a/rust/cubesql/cubeclient/src/models/v1_cube_meta_folder.rs b/rust/cubesql/cubeclient/src/models/v1_cube_meta_folder.rs new file mode 100644 index 0000000000000..b137ceedaf986 --- /dev/null +++ b/rust/cubesql/cubeclient/src/models/v1_cube_meta_folder.rs @@ -0,0 +1,23 @@ +/* + * Cube.js + * + * Cube.js Swagger Schema + * + * The version of the OpenAPI document: 1.0.0 + * + * Generated by: https://openapi-generator.tech + */ + +#[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)] +pub struct V1CubeMetaFolder { + #[serde(rename = "name")] + pub name: String, + #[serde(rename = "members")] + pub members: Vec, +} + +impl V1CubeMetaFolder { + pub fn new(name: String, members: Vec) -> V1CubeMetaFolder { + V1CubeMetaFolder { name, members } + } +} diff --git a/rust/cubesql/cubesql/benches/large_model.rs b/rust/cubesql/cubesql/benches/large_model.rs index d1dee60d5a9ed..5565a266ae67d 100644 --- a/rust/cubesql/cubesql/benches/large_model.rs +++ b/rust/cubesql/cubesql/benches/large_model.rs @@ -100,6 +100,7 @@ pub fn get_large_model_test_meta(dims: usize) -> Vec { .collect(), segments: vec![], joins: None, + folders: None, meta: None, }] } diff --git a/rust/cubesql/cubesql/src/compile/test/mod.rs b/rust/cubesql/cubesql/src/compile/test/mod.rs index ba12a4a250c6c..8ddbbb9545eff 100644 --- a/rust/cubesql/cubesql/src/compile/test/mod.rs +++ b/rust/cubesql/cubesql/src/compile/test/mod.rs @@ -152,6 +152,7 @@ pub fn get_test_meta() -> Vec { name: "Logs".to_string(), relationship: "belongsTo".to_string(), }]), + folders: None, meta: None, }, CubeMeta { @@ -199,6 +200,7 @@ pub fn get_test_meta() -> Vec { name: "NumberCube".to_string(), relationship: "belongsTo".to_string(), }]), + folders: None, meta: None, }, CubeMeta { @@ -217,6 +219,7 @@ pub fn get_test_meta() -> Vec { }], segments: vec![], joins: None, + folders: None, meta: None, }, CubeMeta { @@ -288,6 +291,7 @@ pub fn get_test_meta() -> Vec { .collect(), segments: Vec::new(), joins: Some(Vec::new()), + folders: None, meta: None, }, CubeMeta { @@ -396,6 +400,7 @@ pub fn get_test_meta() -> Vec { .collect(), segments: Vec::new(), joins: Some(Vec::new()), + folders: None, meta: None, }, ] @@ -418,6 +423,7 @@ pub fn get_string_cube_meta() -> Vec { }], segments: vec![], joins: None, + folders: None, meta: None, }] } @@ -457,6 +463,7 @@ pub fn get_sixteen_char_member_cube() -> Vec { ], segments: vec![], joins: None, + folders: None, meta: None, }] } diff --git a/rust/cubesql/cubesql/src/transport/ctx.rs b/rust/cubesql/cubesql/src/transport/ctx.rs index 9033eef2d42ca..389623d510f88 100644 --- a/rust/cubesql/cubesql/src/transport/ctx.rs +++ b/rust/cubesql/cubesql/src/transport/ctx.rs @@ -234,6 +234,7 @@ mod tests { measures: vec![], segments: vec![], joins: None, + folders: None, meta: None, }, CubeMeta { @@ -245,6 +246,7 @@ mod tests { measures: vec![], segments: vec![], joins: None, + folders: None, meta: None, }, ]; diff --git a/rust/cubesql/cubesql/src/transport/mod.rs b/rust/cubesql/cubesql/src/transport/mod.rs index 4955124693637..4e4103202214a 100644 --- a/rust/cubesql/cubesql/src/transport/mod.rs +++ b/rust/cubesql/cubesql/src/transport/mod.rs @@ -9,6 +9,7 @@ pub type CubeMetaDimension = cubeclient::models::V1CubeMetaDimension; pub type CubeMetaMeasure = cubeclient::models::V1CubeMetaMeasure; pub type CubeMetaSegment = cubeclient::models::V1CubeMetaSegment; pub type CubeMetaJoin = cubeclient::models::V1CubeMetaJoin; +pub type CubeMetaFolder = cubeclient::models::V1CubeMetaFolder; // Request/Response pub type TransportLoadResponse = cubeclient::models::V1LoadResponse; pub type TransportLoadRequestQuery = cubeclient::models::V1LoadRequestQuery;