mirror of
https://github.com/elastic/kibana.git
synced 2025-04-23 17:28:26 -04:00
Kibana Sustainable Architecture: Force visibility: 'private'
for solutions in manifest (#199452)
## Summary Small improvements for the JSON schema for `kibana.jsonc` manifests: * Allow `visibility: 'shared'` only when `group: 'platform'` (thanks @dgieselaar!) * Remove `group: 'common'` option. We don't want users categorising modules as `'common'` (it has the semantic meaning of "not categorised").
This commit is contained in:
parent
3c976c0b93
commit
6cb3447acc
1 changed files with 32 additions and 9 deletions
|
@ -49,18 +49,10 @@ export const MANIFEST_V2: JSONSchema = {
|
|||
`,
|
||||
},
|
||||
group: {
|
||||
enum: ['common', 'platform', 'observability', 'security', 'search'],
|
||||
enum: ['platform', 'observability', 'security', 'search'],
|
||||
description: desc`
|
||||
Specifies the group to which this module pertains.
|
||||
`,
|
||||
default: 'common',
|
||||
},
|
||||
visibility: {
|
||||
enum: ['private', 'shared'],
|
||||
description: desc`
|
||||
Specifies the visibility of this module, i.e. whether it can be accessed by everybody or only modules in the same group
|
||||
`,
|
||||
default: 'shared',
|
||||
},
|
||||
devOnly: {
|
||||
type: 'boolean',
|
||||
|
@ -112,6 +104,37 @@ export const MANIFEST_V2: JSONSchema = {
|
|||
type: 'string',
|
||||
},
|
||||
},
|
||||
allOf: [
|
||||
{
|
||||
if: {
|
||||
properties: { group: { const: 'platform' } },
|
||||
},
|
||||
then: {
|
||||
properties: {
|
||||
visibility: {
|
||||
enum: ['private', 'shared'],
|
||||
description: desc`
|
||||
Specifies the visibility of this module, i.e. whether it can be accessed by everybody or only modules in the same group
|
||||
`,
|
||||
default: 'shared',
|
||||
},
|
||||
},
|
||||
required: ['visibility'],
|
||||
},
|
||||
else: {
|
||||
properties: {
|
||||
visibility: {
|
||||
const: 'private',
|
||||
description: desc`
|
||||
Specifies the visibility of this module, i.e. whether it can be accessed by everybody or only modules in the same group
|
||||
`,
|
||||
default: 'private',
|
||||
},
|
||||
},
|
||||
required: ['visibility'],
|
||||
},
|
||||
},
|
||||
],
|
||||
oneOf: [
|
||||
{
|
||||
type: 'object',
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue