From 4d5895bfc7656c63bc899119acf6d5ff38ac883b Mon Sep 17 00:00:00 2001 From: FabioSol Date: Tue, 11 Nov 2025 00:29:16 -0600 Subject: [PATCH 01/16] feat: new config file --- config/_default/params.yml | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) create mode 100644 config/_default/params.yml diff --git a/config/_default/params.yml b/config/_default/params.yml new file mode 100644 index 00000000..36b425be --- /dev/null +++ b/config/_default/params.yml @@ -0,0 +1,25 @@ +frontmatter: + author: + type: string + required: true + pattern: ^[\\w-\\.]+@([\\w-]+\\.)+[\\w-]{2,4}$ + status: + type: enum + required: true + items: + - Draft + - Review + - Published + - Deprecated + slug: + type: string + required: true + pattern: ^[a-z]+(-[a-z]+)*$ + URL: + type: string + required: true + pattern: ^(\/[a-zA-Z0-9-._~]+)*\/?$ + weight: + type: number + required: true + minimum: 1 From 60b125a98c70e82b870e3222ff8da333b9a0a51e Mon Sep 17 00:00:00 2001 From: FabioSol Date: Tue, 11 Nov 2025 01:16:22 -0600 Subject: [PATCH 02/16] fix: change to hugo.yml for consistency --- config/_default/hugo.yml | 26 ++++++++++++++++++++++++++ config/_default/params.yml | 25 ------------------------- spec.json | 0 3 files changed, 26 insertions(+), 25 deletions(-) create mode 100644 config/_default/hugo.yml delete mode 100644 config/_default/params.yml create mode 100644 spec.json diff --git a/config/_default/hugo.yml b/config/_default/hugo.yml new file mode 100644 index 00000000..d5592016 --- /dev/null +++ b/config/_default/hugo.yml @@ -0,0 +1,26 @@ +params: + frontmatter: + author: + type: string + required: true + pattern: ^[\\w-\\.]+@([\\w-]+\\.)+[\\w-]{2,4}$ + status: + type: enum + required: true + items: + - Draft + - Review + - Published + - Deprecated + slug: + type: string + required: true + pattern: ^[a-z]+(-[a-z]+)*$ + URL: + type: string + required: true + pattern: ^(\/[a-zA-Z0-9-._~]+)*\/?$ + weight: + type: number + required: true + minimum: 1 diff --git a/config/_default/params.yml b/config/_default/params.yml deleted file mode 100644 index 36b425be..00000000 --- a/config/_default/params.yml +++ /dev/null @@ -1,25 +0,0 @@ -frontmatter: - author: - type: string - required: true - pattern: ^[\\w-\\.]+@([\\w-]+\\.)+[\\w-]{2,4}$ - status: - type: enum - required: true - items: - - Draft - - Review - - Published - - Deprecated - slug: - type: string - required: true - pattern: ^[a-z]+(-[a-z]+)*$ - URL: - type: string - required: true - pattern: ^(\/[a-zA-Z0-9-._~]+)*\/?$ - weight: - type: number - required: true - minimum: 1 diff --git a/spec.json b/spec.json new file mode 100644 index 00000000..e69de29b From 061fa538f17975ff9968a236ce0a3f77055c7dbe Mon Sep 17 00:00:00 2001 From: FabioSol Date: Tue, 11 Nov 2025 01:33:51 -0600 Subject: [PATCH 03/16] fix: remove non basic fields --- config/_default/hugo.yml | 20 -------------------- 1 file changed, 20 deletions(-) diff --git a/config/_default/hugo.yml b/config/_default/hugo.yml index d5592016..9446cffb 100644 --- a/config/_default/hugo.yml +++ b/config/_default/hugo.yml @@ -4,23 +4,3 @@ params: type: string required: true pattern: ^[\\w-\\.]+@([\\w-]+\\.)+[\\w-]{2,4}$ - status: - type: enum - required: true - items: - - Draft - - Review - - Published - - Deprecated - slug: - type: string - required: true - pattern: ^[a-z]+(-[a-z]+)*$ - URL: - type: string - required: true - pattern: ^(\/[a-zA-Z0-9-._~]+)*\/?$ - weight: - type: number - required: true - minimum: 1 From 2460df321f34fc1cef7d7b0036b5078f8b06270e Mon Sep 17 00:00:00 2001 From: FabioSol Date: Wed, 12 Nov 2025 07:45:07 -0600 Subject: [PATCH 04/16] fix: use email type --- config/_default/hugo.yml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/config/_default/hugo.yml b/config/_default/hugo.yml index 9446cffb..ec263eb3 100644 --- a/config/_default/hugo.yml +++ b/config/_default/hugo.yml @@ -1,6 +1,5 @@ params: frontmatter: author: - type: string + type: email required: true - pattern: ^[\\w-\\.]+@([\\w-]+\\.)+[\\w-]{2,4}$ From a05915fe23fc31481d4870117aea63069c0c35ec Mon Sep 17 00:00:00 2001 From: FabioSol Date: Fri, 14 Nov 2025 08:30:37 -0600 Subject: [PATCH 05/16] schemas presented version --- .../schemas/data-types.yaml | 29 +++++++++++++++++++ .../schemas/format-types.yaml | 15 ++++++++++ .../schemas/root-type.yaml | 6 ++++ spec.json | 0 4 files changed, 50 insertions(+) create mode 100644 frontmatter-config-design/schemas/data-types.yaml create mode 100644 frontmatter-config-design/schemas/format-types.yaml create mode 100644 frontmatter-config-design/schemas/root-type.yaml delete mode 100644 spec.json diff --git a/frontmatter-config-design/schemas/data-types.yaml b/frontmatter-config-design/schemas/data-types.yaml new file mode 100644 index 00000000..fdea368b --- /dev/null +++ b/frontmatter-config-design/schemas/data-types.yaml @@ -0,0 +1,29 @@ + +string: + extends: root # Inherits attributes from root type + placeholder_text: string # Placeholder text for input fields + pattern: string # Regex pattern for validation + min_length: number # Minimum length of the string + max_length: number # Maximum length of the string + +number: + extends: root # Inherits attributes from root type + placeholder_text: string # Placeholder text for input fields + minimum: number # Minimum value + maximum: number # Maximum value + multiple_of: number # Value must be a multiple of this number + +boolean: + extends: root # Inherits attributes from root type + +enum: + extends: root # Inherits attributes from root type + items: array[string] # List of valid enum values + min_items: number # Minimum number of items \\TODO: erase + +array: + extends: root # Inherits attributes from root type + items: + type: string # Type of items in the array + enums: array[string|number] # Valid enum values for items (if type is enum) + min_items: number \ No newline at end of file diff --git a/frontmatter-config-design/schemas/format-types.yaml b/frontmatter-config-design/schemas/format-types.yaml new file mode 100644 index 00000000..37fb053d --- /dev/null +++ b/frontmatter-config-design/schemas/format-types.yaml @@ -0,0 +1,15 @@ +text: + extends: string + rows: number # Number of rows for textarea + +email: + extends: string + pattern: '^[a-zA-Z0-9._%+-]+@[a-zA-Z0-9.-]+\.[a-zA-Z]{2,}$' # predefined Email regex pattern + +date: + extends: string + pattern: '^\d{4}-\d{2}-\d{2}$' # YYYY-MM-DD format + +datetime: + extends: string + pattern: '^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}(Z|[+-]\d{2}:\d{2})$' # ISO 8601 format diff --git a/frontmatter-config-design/schemas/root-type.yaml b/frontmatter-config-design/schemas/root-type.yaml new file mode 100644 index 00000000..b85ffd3f --- /dev/null +++ b/frontmatter-config-design/schemas/root-type.yaml @@ -0,0 +1,6 @@ + +root: + type: string # The type name + required: boolean # Whether field is mandatory + validation_text: string # Custom validation message + default_value: any # Default value for the field diff --git a/spec.json b/spec.json deleted file mode 100644 index e69de29b..00000000 From e86be35bfdeef31a58427f4c67757df1219254b0 Mon Sep 17 00:00:00 2001 From: FabioSol Date: Fri, 14 Nov 2025 08:38:08 -0600 Subject: [PATCH 06/16] fix: change number attribute multiple_of to interger flag --- frontmatter-config-design/schemas/data-types.yaml | 5 ++--- frontmatter-config-design/schemas/root-type.yaml | 1 - 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/frontmatter-config-design/schemas/data-types.yaml b/frontmatter-config-design/schemas/data-types.yaml index fdea368b..9a55ef06 100644 --- a/frontmatter-config-design/schemas/data-types.yaml +++ b/frontmatter-config-design/schemas/data-types.yaml @@ -1,4 +1,3 @@ - string: extends: root # Inherits attributes from root type placeholder_text: string # Placeholder text for input fields @@ -11,7 +10,7 @@ number: placeholder_text: string # Placeholder text for input fields minimum: number # Minimum value maximum: number # Maximum value - multiple_of: number # Value must be a multiple of this number + integer: boolean # Whether the number should be an integer boolean: extends: root # Inherits attributes from root type @@ -19,7 +18,7 @@ boolean: enum: extends: root # Inherits attributes from root type items: array[string] # List of valid enum values - min_items: number # Minimum number of items \\TODO: erase + min_items: number # Minimum number of items array: extends: root # Inherits attributes from root type diff --git a/frontmatter-config-design/schemas/root-type.yaml b/frontmatter-config-design/schemas/root-type.yaml index b85ffd3f..8f6adfa5 100644 --- a/frontmatter-config-design/schemas/root-type.yaml +++ b/frontmatter-config-design/schemas/root-type.yaml @@ -1,4 +1,3 @@ - root: type: string # The type name required: boolean # Whether field is mandatory From 9007e80443d56af4e94184db29f91c4f0d46bd7c Mon Sep 17 00:00:00 2001 From: FabioSol Date: Fri, 14 Nov 2025 08:40:38 -0600 Subject: [PATCH 07/16] feat: add sample --- .../samples/frontmatter-config-1.yaml | 33 +++++++++++++++++++ 1 file changed, 33 insertions(+) create mode 100644 frontmatter-config-design/samples/frontmatter-config-1.yaml diff --git a/frontmatter-config-design/samples/frontmatter-config-1.yaml b/frontmatter-config-design/samples/frontmatter-config-1.yaml new file mode 100644 index 00000000..f4fa5349 --- /dev/null +++ b/frontmatter-config-design/samples/frontmatter-config-1.yaml @@ -0,0 +1,33 @@ +author: + type: email + required: true + +title: + type: string + required: true + placeholder_text: "Enter document title" + max_length: 100 + +status: + type: enum + required: true + items: + - Draft + - Review + - Published + - Deprecated + +slug: + type: string + required: true + pattern: ^[a-z]+(-[a-z]+)*$ + +URL: + type: string + required: true + pattern: ^(\/[a-zA-Z0-9-._~]+)*\/?$ + +weight: + type: number + required: true + minimum: 1 \ No newline at end of file From ecacf16e2e01ac737708d341e5b5cd171ce431d1 Mon Sep 17 00:00:00 2001 From: FabioSol Date: Fri, 14 Nov 2025 08:44:29 -0600 Subject: [PATCH 08/16] fix: address feedback on arrays and enums --- .../samples/frontmatter-config-1.yaml | 4 +++- frontmatter-config-design/schemas/data-types.yaml | 13 ++++--------- 2 files changed, 7 insertions(+), 10 deletions(-) diff --git a/frontmatter-config-design/samples/frontmatter-config-1.yaml b/frontmatter-config-design/samples/frontmatter-config-1.yaml index f4fa5349..40f02d17 100644 --- a/frontmatter-config-design/samples/frontmatter-config-1.yaml +++ b/frontmatter-config-design/samples/frontmatter-config-1.yaml @@ -9,8 +9,10 @@ title: max_length: 100 status: - type: enum + type: array required: true + allowMultiple: false + items_type: string items: - Draft - Review diff --git a/frontmatter-config-design/schemas/data-types.yaml b/frontmatter-config-design/schemas/data-types.yaml index 9a55ef06..4b9f373e 100644 --- a/frontmatter-config-design/schemas/data-types.yaml +++ b/frontmatter-config-design/schemas/data-types.yaml @@ -15,14 +15,9 @@ number: boolean: extends: root # Inherits attributes from root type -enum: - extends: root # Inherits attributes from root type - items: array[string] # List of valid enum values - min_items: number # Minimum number of items - array: extends: root # Inherits attributes from root type - items: - type: string # Type of items in the array - enums: array[string|number] # Valid enum values for items (if type is enum) - min_items: number \ No newline at end of file + items_type: string # Type of items in the array + items: array # Type of items in the array + allowMultiple: boolean # Whether multiple items are allowed + min_items: number # Minimum number of items \ No newline at end of file From 8e9cd141e3a7e04343e520e45b0eee3b9255f097 Mon Sep 17 00:00:00 2001 From: FabioSol Date: Fri, 14 Nov 2025 08:58:24 -0600 Subject: [PATCH 09/16] feat: required, optional and default annotations --- .../schemas/data-types.yaml | 22 +++++++++---------- .../schemas/format-types.yaml | 2 +- .../schemas/root-type.yaml | 8 +++---- 3 files changed, 16 insertions(+), 16 deletions(-) diff --git a/frontmatter-config-design/schemas/data-types.yaml b/frontmatter-config-design/schemas/data-types.yaml index 4b9f373e..02d916fd 100644 --- a/frontmatter-config-design/schemas/data-types.yaml +++ b/frontmatter-config-design/schemas/data-types.yaml @@ -1,23 +1,23 @@ string: extends: root # Inherits attributes from root type - placeholder_text: string # Placeholder text for input fields - pattern: string # Regex pattern for validation - min_length: number # Minimum length of the string - max_length: number # Maximum length of the string + placeholder_text: string # [Optional] - Placeholder text for input fields + pattern: string # [Optional] - Regex pattern for validation + min_length: number # [Default: 0] - Minimum length of the string + max_length: number # [Optional] - Maximum length of the string number: extends: root # Inherits attributes from root type - placeholder_text: string # Placeholder text for input fields - minimum: number # Minimum value - maximum: number # Maximum value - integer: boolean # Whether the number should be an integer + placeholder_text: string # [Optional] - Placeholder text for input fields + minimum: number # [Optional] - Minimum value + maximum: number # [Optional] - Maximum value + integer: boolean # [Default: false] - Whether the number should be an integer boolean: extends: root # Inherits attributes from root type array: extends: root # Inherits attributes from root type - items_type: string # Type of items in the array - items: array # Type of items in the array - allowMultiple: boolean # Whether multiple items are allowed + items_type: string # [Required] - Type of items in the array + items: array # [Optional] - List of allowed items + allowMultiple: boolean # [Conditional to items] - Whether multiple of the allowed items can be selected min_items: number # Minimum number of items \ No newline at end of file diff --git a/frontmatter-config-design/schemas/format-types.yaml b/frontmatter-config-design/schemas/format-types.yaml index 37fb053d..52cb96a5 100644 --- a/frontmatter-config-design/schemas/format-types.yaml +++ b/frontmatter-config-design/schemas/format-types.yaml @@ -1,6 +1,6 @@ text: extends: string - rows: number # Number of rows for textarea + rows: number # [Optional] - Number of rows for textarea email: extends: string diff --git a/frontmatter-config-design/schemas/root-type.yaml b/frontmatter-config-design/schemas/root-type.yaml index 8f6adfa5..9ccf697e 100644 --- a/frontmatter-config-design/schemas/root-type.yaml +++ b/frontmatter-config-design/schemas/root-type.yaml @@ -1,5 +1,5 @@ root: - type: string # The type name - required: boolean # Whether field is mandatory - validation_text: string # Custom validation message - default_value: any # Default value for the field + type: string # [Required] - The type name + required: boolean # [Default: false] - Whether field is mandatory + validation_text: string # [Optional] - Custom validation message + default_value: any # [Optional] - Default value for the field From 51aeb7e27e97711c91d7757985ce71c023ceb02e Mon Sep 17 00:00:00 2001 From: FabioSol Date: Sun, 23 Nov 2025 22:25:14 -0600 Subject: [PATCH 10/16] fix: address feedback, required validation and placeholder text --- .../samples/frontmatter-config-1.yaml | 12 ++++++++++++ frontmatter-config-design/schemas/data-types.yaml | 2 -- frontmatter-config-design/schemas/root-type.yaml | 3 ++- 3 files changed, 14 insertions(+), 3 deletions(-) diff --git a/frontmatter-config-design/samples/frontmatter-config-1.yaml b/frontmatter-config-design/samples/frontmatter-config-1.yaml index 40f02d17..a50e5801 100644 --- a/frontmatter-config-design/samples/frontmatter-config-1.yaml +++ b/frontmatter-config-design/samples/frontmatter-config-1.yaml @@ -1,16 +1,21 @@ author: type: email required: true + placeholder_text: "Enter author email address" + validation_text: "Invalid email address" title: type: string required: true placeholder_text: "Enter document title" + validation_text: "Title cannot exceed 100 characters" max_length: 100 status: type: array required: true + placeholder_text: "Select document status" + validation_text: "Please select a valid status" allowMultiple: false items_type: string items: @@ -22,14 +27,21 @@ status: slug: type: string required: true + placeholder_text: "Enter URL-friendly slug" + validation_text: "Slug can only contain lowercase letters and hyphens" pattern: ^[a-z]+(-[a-z]+)*$ URL: type: string required: true + placeholder_text: "Enter document URL" + validation_text: "Invalid URL format" pattern: ^(\/[a-zA-Z0-9-._~]+)*\/?$ weight: type: number required: true + placeholder_text: "Enter document weight" + validation_text: "Weight must be a positive integer" + integer: true minimum: 1 \ No newline at end of file diff --git a/frontmatter-config-design/schemas/data-types.yaml b/frontmatter-config-design/schemas/data-types.yaml index 02d916fd..15192581 100644 --- a/frontmatter-config-design/schemas/data-types.yaml +++ b/frontmatter-config-design/schemas/data-types.yaml @@ -1,13 +1,11 @@ string: extends: root # Inherits attributes from root type - placeholder_text: string # [Optional] - Placeholder text for input fields pattern: string # [Optional] - Regex pattern for validation min_length: number # [Default: 0] - Minimum length of the string max_length: number # [Optional] - Maximum length of the string number: extends: root # Inherits attributes from root type - placeholder_text: string # [Optional] - Placeholder text for input fields minimum: number # [Optional] - Minimum value maximum: number # [Optional] - Maximum value integer: boolean # [Default: false] - Whether the number should be an integer diff --git a/frontmatter-config-design/schemas/root-type.yaml b/frontmatter-config-design/schemas/root-type.yaml index 9ccf697e..3fbebe9e 100644 --- a/frontmatter-config-design/schemas/root-type.yaml +++ b/frontmatter-config-design/schemas/root-type.yaml @@ -1,5 +1,6 @@ root: type: string # [Required] - The type name required: boolean # [Default: false] - Whether field is mandatory - validation_text: string # [Optional] - Custom validation message + placeholder_text: string # [Required] - Placeholder text message + validation_text: string # [Required] - Custom validation message default_value: any # [Optional] - Default value for the field From 2bf88991cf35b91216825edd71666b31f793eadf Mon Sep 17 00:00:00 2001 From: FabioSol Date: Sun, 23 Nov 2025 22:29:26 -0600 Subject: [PATCH 11/16] chore: update frontmatter config to match latest changes (provisional) --- config/_default/hugo.yml | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/config/_default/hugo.yml b/config/_default/hugo.yml index ec263eb3..6dc66106 100644 --- a/config/_default/hugo.yml +++ b/config/_default/hugo.yml @@ -1,5 +1,13 @@ params: frontmatter: + title: + type: string + required: true + placeholder_text: "Enter document title" + validation_text: "Title cannot exceed 100 characters" + max_length: 100 author: type: email required: true + placeholder_text: "Enter author email address" + validation_text: "Invalid email address" From 145cba6867a6471dfa8f527a48bc093c349cf8a9 Mon Sep 17 00:00:00 2001 From: FabioSol Date: Tue, 25 Nov 2025 00:19:46 -0600 Subject: [PATCH 12/16] fix: address feedback --- config/_default/hugo.yml | 13 --------- .../_default/presidium/frontmatter/params.yml | 12 +++++++++ .../samples/frontmatter-config-1.yaml | 27 +++++++++---------- .../schemas/data-types.yaml | 11 ++++---- .../schemas/format-types.yaml | 3 +++ .../schemas/root-type.yaml | 9 +++---- 6 files changed, 37 insertions(+), 38 deletions(-) delete mode 100644 config/_default/hugo.yml create mode 100644 config/_default/presidium/frontmatter/params.yml diff --git a/config/_default/hugo.yml b/config/_default/hugo.yml deleted file mode 100644 index 6dc66106..00000000 --- a/config/_default/hugo.yml +++ /dev/null @@ -1,13 +0,0 @@ -params: - frontmatter: - title: - type: string - required: true - placeholder_text: "Enter document title" - validation_text: "Title cannot exceed 100 characters" - max_length: 100 - author: - type: email - required: true - placeholder_text: "Enter author email address" - validation_text: "Invalid email address" diff --git a/config/_default/presidium/frontmatter/params.yml b/config/_default/presidium/frontmatter/params.yml new file mode 100644 index 00000000..d04afc64 --- /dev/null +++ b/config/_default/presidium/frontmatter/params.yml @@ -0,0 +1,12 @@ +frontmatter: + title: + type: string + required: true + placeholder_message: Enter a title + validation_message: Please ensure your article has a title + author: + type: email + required: true + placeholder_message: Enter author email + validation_message: Please ensure your article has an author email address + diff --git a/frontmatter-config-design/samples/frontmatter-config-1.yaml b/frontmatter-config-design/samples/frontmatter-config-1.yaml index a50e5801..5c98be34 100644 --- a/frontmatter-config-design/samples/frontmatter-config-1.yaml +++ b/frontmatter-config-design/samples/frontmatter-config-1.yaml @@ -1,22 +1,21 @@ author: type: email required: true - placeholder_text: "Enter author email address" - validation_text: "Invalid email address" + placeholder_message: Enter author email + validation_message: Please ensure your article has an author email address title: type: string required: true - placeholder_text: "Enter document title" - validation_text: "Title cannot exceed 100 characters" + placeholder_message: Enter a title + validation_message: Please ensure your article has a title max_length: 100 status: - type: array + type: option required: true - placeholder_text: "Select document status" - validation_text: "Please select a valid status" - allowMultiple: false + placeholder_message: Select status + validation_message: Please select a valid status from the dropdown items_type: string items: - Draft @@ -27,21 +26,21 @@ status: slug: type: string required: true - placeholder_text: "Enter URL-friendly slug" - validation_text: "Slug can only contain lowercase letters and hyphens" + placeholder_message: eg. example-slug + validation_message: Invalid slug format. Use lowercase letters, numbers, underscores and hyphens only (e.g. "validate" or "solution-definition") pattern: ^[a-z]+(-[a-z]+)*$ URL: type: string required: true - placeholder_text: "Enter document URL" - validation_text: "Invalid URL format" + placeholder_message: https://example.com + validation_message: Please enter a valid URL (e.g. https://example.com) pattern: ^(\/[a-zA-Z0-9-._~]+)*\/?$ weight: type: number required: true - placeholder_text: "Enter document weight" - validation_text: "Weight must be a positive integer" + placeholder_message: eg. 5 + validation_message: Weight must be a non-negative integer integer: true minimum: 1 \ No newline at end of file diff --git a/frontmatter-config-design/schemas/data-types.yaml b/frontmatter-config-design/schemas/data-types.yaml index 15192581..c6b2fb7b 100644 --- a/frontmatter-config-design/schemas/data-types.yaml +++ b/frontmatter-config-design/schemas/data-types.yaml @@ -4,11 +4,11 @@ string: min_length: number # [Default: 0] - Minimum length of the string max_length: number # [Optional] - Maximum length of the string -number: - extends: root # Inherits attributes from root type - minimum: number # [Optional] - Minimum value - maximum: number # [Optional] - Maximum value - integer: boolean # [Default: false] - Whether the number should be an integer +#number: probably needed in future +# extends: root # Inherits attributes from root type +# minimum: number # [Optional] - Minimum value +# maximum: number # [Optional] - Maximum value +# integer: boolean # [Default: false] - Whether the number should be an integer boolean: extends: root # Inherits attributes from root type @@ -17,5 +17,4 @@ array: extends: root # Inherits attributes from root type items_type: string # [Required] - Type of items in the array items: array # [Optional] - List of allowed items - allowMultiple: boolean # [Conditional to items] - Whether multiple of the allowed items can be selected min_items: number # Minimum number of items \ No newline at end of file diff --git a/frontmatter-config-design/schemas/format-types.yaml b/frontmatter-config-design/schemas/format-types.yaml index 52cb96a5..c2b720d3 100644 --- a/frontmatter-config-design/schemas/format-types.yaml +++ b/frontmatter-config-design/schemas/format-types.yaml @@ -13,3 +13,6 @@ date: datetime: extends: string pattern: '^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}(Z|[+-]\d{2}:\d{2})$' # ISO 8601 format + +option: + extends: array \ No newline at end of file diff --git a/frontmatter-config-design/schemas/root-type.yaml b/frontmatter-config-design/schemas/root-type.yaml index 3fbebe9e..e05c6ab2 100644 --- a/frontmatter-config-design/schemas/root-type.yaml +++ b/frontmatter-config-design/schemas/root-type.yaml @@ -1,6 +1,5 @@ root: - type: string # [Required] - The type name - required: boolean # [Default: false] - Whether field is mandatory - placeholder_text: string # [Required] - Placeholder text message - validation_text: string # [Required] - Custom validation message - default_value: any # [Optional] - Default value for the field + type: string # [Required] - The type name + required: boolean # [Default: false] - Whether field is mandatory + placeholder_message: string # [Required] - Placeholder message + validation_message: string # [Required] - Custom validation message From ad3af5fad66c8d3df368d0d587da96cfb850189c Mon Sep 17 00:00:00 2001 From: FabioSol Date: Wed, 26 Nov 2025 14:50:20 -0600 Subject: [PATCH 13/16] feat: add object data type --- .../samples/frontmatter-config-2.yaml | 34 +++++++++++++++++++ .../schemas/data-types.yaml | 13 ++++++- 2 files changed, 46 insertions(+), 1 deletion(-) create mode 100644 frontmatter-config-design/samples/frontmatter-config-2.yaml diff --git a/frontmatter-config-design/samples/frontmatter-config-2.yaml b/frontmatter-config-design/samples/frontmatter-config-2.yaml new file mode 100644 index 00000000..2569e9c4 --- /dev/null +++ b/frontmatter-config-design/samples/frontmatter-config-2.yaml @@ -0,0 +1,34 @@ +# object example +author: + type: object + required: true + placeholder_message: Enter author details + properties: + name: + type: string + required: true + email: + type: email + required: true + avatar: + type: string + required: false + bio: + type: string + required: false + +# array of objects example +related_articles: + type: array + required: false + items_type: object + items_properties: + title: + type: string + required: true + url: + type: string + required: true + description: + type: string + required: false diff --git a/frontmatter-config-design/schemas/data-types.yaml b/frontmatter-config-design/schemas/data-types.yaml index c6b2fb7b..ad4b6cc1 100644 --- a/frontmatter-config-design/schemas/data-types.yaml +++ b/frontmatter-config-design/schemas/data-types.yaml @@ -17,4 +17,15 @@ array: extends: root # Inherits attributes from root type items_type: string # [Required] - Type of items in the array items: array # [Optional] - List of allowed items - min_items: number # Minimum number of items \ No newline at end of file + min_items: number # [Default: 0] - Minimum number of items + items_properties: # [required | items_type: object] - Properties of each item if items_type is object + key: # Property name + type: string # Type of the property + required: boolean # Whether the property is required + +object: + extends: root # Inherits attributes from root type + properties: # [Required] - Properties of the object + key: # Property name + type: string # Type of the property + required: boolean # Whether the property is required \ No newline at end of file From 534f913e328f23452ae2193621a660c8db7b3e1a Mon Sep 17 00:00:00 2001 From: FabioSol Date: Fri, 28 Nov 2025 08:52:42 -0600 Subject: [PATCH 14/16] fix: added fields for clarity --- frontmatter-config-design/schemas/data-types.yaml | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/frontmatter-config-design/schemas/data-types.yaml b/frontmatter-config-design/schemas/data-types.yaml index ad4b6cc1..f9c84308 100644 --- a/frontmatter-config-design/schemas/data-types.yaml +++ b/frontmatter-config-design/schemas/data-types.yaml @@ -22,10 +22,14 @@ array: key: # Property name type: string # Type of the property required: boolean # Whether the property is required + placeholder_message: string # [Required] - Placeholder message + validation_message: string # [Required] - Custom validation message object: extends: root # Inherits attributes from root type properties: # [Required] - Properties of the object key: # Property name type: string # Type of the property - required: boolean # Whether the property is required \ No newline at end of file + required: boolean # Whether the property is required + placeholder_message: string # [Required] - Placeholder message + validation_message: string # [Required] - Custom validation message \ No newline at end of file From 809a826534b8f51aa00f0ba507542446a09e36ad Mon Sep 17 00:00:00 2001 From: FabioSol Date: Fri, 28 Nov 2025 10:55:54 -0600 Subject: [PATCH 15/16] chore: update samples to showcase ticket requirements --- .../samples/frontmatter-config-2.yaml | 46 +++++++++++++++---- 1 file changed, 36 insertions(+), 10 deletions(-) diff --git a/frontmatter-config-design/samples/frontmatter-config-2.yaml b/frontmatter-config-design/samples/frontmatter-config-2.yaml index 2569e9c4..7d31960e 100644 --- a/frontmatter-config-design/samples/frontmatter-config-2.yaml +++ b/frontmatter-config-design/samples/frontmatter-config-2.yaml @@ -1,23 +1,49 @@ -# object example -author: +# object example (PRSDM-9766 example) +persona: type: object required: true - placeholder_message: Enter author details + placeholder_message: Enter persona details + validation_message: Please provide all the required persona information properties: name: type: string required: true - email: - type: email + placeholder_message: Enter the persona's name + validation_message: Name is required + role: + type: string required: true - avatar: + placeholder_message: Enter the persona's role + validation_message: Role is required + +# array of objects example 1 (PRSDM-9766 example) +attributes: + type: array + required: true + items_type: object + items_properties: + name: type: string - required: false - bio: + required: true + placeholder_message: Enter attribute name + validation_message: Attribute name is required + key-role: type: string - required: false + required: true + placeholder_message: Enter key role + validation_message: Key role is required + optionality: + type: string + required: true + placeholder_message: Enter optionality + validation_message: Optionality is required + description: + type: string + required: true + placeholder_message: Enter description + validation_message: Description is required -# array of objects example +# array of objects example 2 related_articles: type: array required: false From 6556f1b0598b5a2ffe065ec0f818525538846d7a Mon Sep 17 00:00:00 2001 From: FabioSol Date: Mon, 1 Dec 2025 08:35:46 -0600 Subject: [PATCH 16/16] fix: make optional the validation message --- frontmatter-config-design/schemas/data-types.yaml | 4 ++-- frontmatter-config-design/schemas/root-type.yaml | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/frontmatter-config-design/schemas/data-types.yaml b/frontmatter-config-design/schemas/data-types.yaml index f9c84308..5d3f3517 100644 --- a/frontmatter-config-design/schemas/data-types.yaml +++ b/frontmatter-config-design/schemas/data-types.yaml @@ -23,7 +23,7 @@ array: type: string # Type of the property required: boolean # Whether the property is required placeholder_message: string # [Required] - Placeholder message - validation_message: string # [Required] - Custom validation message + validation_message: string # [Optional] - Custom validation message object: extends: root # Inherits attributes from root type @@ -32,4 +32,4 @@ object: type: string # Type of the property required: boolean # Whether the property is required placeholder_message: string # [Required] - Placeholder message - validation_message: string # [Required] - Custom validation message \ No newline at end of file + validation_message: string # [Optional] - Custom validation message \ No newline at end of file diff --git a/frontmatter-config-design/schemas/root-type.yaml b/frontmatter-config-design/schemas/root-type.yaml index e05c6ab2..e60b2f4e 100644 --- a/frontmatter-config-design/schemas/root-type.yaml +++ b/frontmatter-config-design/schemas/root-type.yaml @@ -2,4 +2,4 @@ root: type: string # [Required] - The type name required: boolean # [Default: false] - Whether field is mandatory placeholder_message: string # [Required] - Placeholder message - validation_message: string # [Required] - Custom validation message + validation_message: string # [Optional] - Custom validation message