mirror of
https://github.com/elastic/kibana.git
synced 2025-04-24 09:48:58 -04:00
[8.x] Kibana Sustainable Architecture: Force `visibility: 'private'` for solutions in manifest (#199452) (#199488)
# Backport This will backport the following commits from `main` to `8.x`: - [Kibana Sustainable Architecture: Force `visibility: 'private'` for solutions in manifest (#199452)](https://github.com/elastic/kibana/pull/199452) <!--- Backport version: 9.4.3 --> ### Questions ? Please refer to the [Backport tool documentation](https://github.com/sqren/backport) <!--BACKPORT [{"author":{"name":"Gerard Soldevila","email":"gerard.soldevila@elastic.co"},"sourceCommit":{"committedDate":"2024-11-08T14:36:07Z","message":"Kibana Sustainable Architecture: Force `visibility: 'private'` for solutions in manifest (#199452)\n\n## Summary\r\n\r\nSmall improvements for the JSON schema for `kibana.jsonc` manifests:\r\n* Allow `visibility: 'shared'` only when `group: 'platform'` (thanks\r\n@dgieselaar!)\r\n* Remove `group: 'common'` option. We don't want users categorising\r\nmodules as `'common'` (it has the semantic meaning of \"not\r\ncategorised\").","sha":"6cb3447acc1614b58f6a1f88e9ccbd5d1b0e85e7","branchLabelMapping":{"^v9.0.0$":"main","^v8.17.0$":"8.x","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["Team:Core","release_note:skip","v9.0.0","backport:prev-minor"],"title":"Kibana Sustainable Architecture: Force `visibility: 'private'` for solutions in manifest","number":199452,"url":"https://github.com/elastic/kibana/pull/199452","mergeCommit":{"message":"Kibana Sustainable Architecture: Force `visibility: 'private'` for solutions in manifest (#199452)\n\n## Summary\r\n\r\nSmall improvements for the JSON schema for `kibana.jsonc` manifests:\r\n* Allow `visibility: 'shared'` only when `group: 'platform'` (thanks\r\n@dgieselaar!)\r\n* Remove `group: 'common'` option. We don't want users categorising\r\nmodules as `'common'` (it has the semantic meaning of \"not\r\ncategorised\").","sha":"6cb3447acc1614b58f6a1f88e9ccbd5d1b0e85e7"}},"sourceBranch":"main","suggestedTargetBranches":[],"targetPullRequestStates":[{"branch":"main","label":"v9.0.0","branchLabelMappingKey":"^v9.0.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/199452","number":199452,"mergeCommit":{"message":"Kibana Sustainable Architecture: Force `visibility: 'private'` for solutions in manifest (#199452)\n\n## Summary\r\n\r\nSmall improvements for the JSON schema for `kibana.jsonc` manifests:\r\n* Allow `visibility: 'shared'` only when `group: 'platform'` (thanks\r\n@dgieselaar!)\r\n* Remove `group: 'common'` option. We don't want users categorising\r\nmodules as `'common'` (it has the semantic meaning of \"not\r\ncategorised\").","sha":"6cb3447acc1614b58f6a1f88e9ccbd5d1b0e85e7"}}]}] BACKPORT--> Co-authored-by: Gerard Soldevila <gerard.soldevila@elastic.co>
This commit is contained in:
parent
db886034d3
commit
4b4bd24074
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