Skip to content

Commit

Permalink
add an optional title to custom granularity
Browse files Browse the repository at this point in the history
  • Loading branch information
KSDaemon committed Sep 13, 2024
1 parent 9fd256d commit fab435c
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions packages/cubejs-schema-compiler/src/compiler/CubeValidator.ts
Original file line number Diff line number Diff line change
Expand Up @@ -111,6 +111,7 @@ const BaseDimensionWithoutSubQuery = {
then: Joi.object().pattern(identifierRegex,
Joi.alternatives([
Joi.object().keys({
title: Joi.string(),
interval: GranularityInterval.required(),
origin: Joi.string().required().custom((value, helpers) => {
const date = new Date(value);
Expand All @@ -122,6 +123,7 @@ const BaseDimensionWithoutSubQuery = {
}),
}),
Joi.object().keys({
title: Joi.string(),
interval: GranularityInterval.required().custom((value, helper) => {
const intParsed = value.split(' ');
const msg = { custom: 'Arbitrary intervals cannot be used without origin point specified' };
Expand Down

0 comments on commit fab435c

Please sign in to comment.