Skip to content
82 changes: 80 additions & 2 deletions docs/settings-gen/readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,16 @@ groups:
description: |
REQUIRED
Multiline string. Can include tables, lists, code examples, etc.
# state: OPTIONAL One of deprecated/hidden/tech-preview
# applies_to: MANDATORY applicability metadata
# Supports docs-builder applies_to syntax.
# Replace "ga" with the correct availability information: "preview", "beta", "ga", "deprecated", "removed", "unavailable" are accepted values
# Only specify a version for the "stack" key; multiple values are accepted for this key, for example "stack: preview 9.4, ga 9.5, removed 9.8"
#
# applies_to:
# - "stack: ga 9.2"
# - "ess: ga"
# - "self: ga"
#
# deprecation_details: "" OPTIONAL
# note: "" OPTIONAL
# tip: "" OPTIONAL
Expand All @@ -43,11 +52,80 @@ groups:
# - option: OPTIONAL
# description: "" OPTIONAL
# type: OPTIONAL ONe of static/dynamic
# platforms: OPTIONAL, list each supported platform
# - cloud
# - serverless
# - self-managed
# settings: OPTIONAL, nested settings list
# Child settings inherit applies_to from the parent unless overridden.
# - setting: "[n].url"
# description: |
# REQUIRED
# example: |
OPTIONAL
Multiline string. Can include tables, lists, code examples, etc.
```
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We also talked about being able to specify default values, that can potentially be different per deployment/project type (maybe that's a different issue?)

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's a good idea, but perhaps we could wait till we try apply the schema?


## Example

The following example shows a fully populated document with page metadata, group metadata, nested settings, and multiple `applies_to` statements.

```yaml
---
product: Kibana
collection: Example settings collection
id: example-settings
page_description: |
This page demonstrates the full settings documentation schema.

Settings descriptions can include inline applies annotations, for example:
{applies_to}`stack: ga 9.2` and {applies_to}`ess: ga`.

groups:
- group: Example group
id: example-group
description: |
These settings are examples for documentation structure and applicability tagging.
example: |
```yaml
my.parent.setting:
child: value
```

settings:
- setting: my.parent.setting
id: my-parent-setting
description: |
Parent setting with nested child settings.
datatype: string
default: ""
applies_to:
stack: ga 9.2
ess: ga
self: ga

settings:
- setting: "[n].url"
description: |
Child setting inheriting the parent's applicability.
datatype: string

- setting: "[n].serverlessOnly"
description: |
Child setting overriding applicability using the inline list form.
datatype: bool
default: false
applies_to:
- "serverless: ga"

- setting: my.deprecated.setting
description: |
This setting is deprecated.
datatype: bool
default: false
applies_to:
- "stack: deprecated 9.3+"
- "ess: ga"
- "self: ga"
deprecation_details: "Deprecated starting in 9.3."
---
```
Loading