Skip to content

Commit

Permalink
[8.x] [ML] Update JSON schemas for code editors (#207706) (#207723)
Browse files Browse the repository at this point in the history
# Backport

This will backport the following commits from `main` to `8.x`:
- [[ML] Update JSON schemas for code editors
(#207706)](#207706)

<!--- Backport version: 9.4.3 -->

### Questions ?
Please refer to the [Backport tool
documentation](https://github.com/sqren/backport)

<!--BACKPORT [{"author":{"name":"Dima
Arnautov","email":"[email protected]"},"sourceCommit":{"committedDate":"2025-01-22T10:36:31Z","message":"[ML]
Update JSON schemas for code editors (#207706)\n\n## Summary\r\n\r\n-
Updates the default path to the openapi file \r\n- Updates JSON schemas
for ML and Transform code editors with the latest\r\nchanges from
elasticsearch-specification","sha":"ab2379f1f7c4563a5f3c119033bcff5397bab0f6","branchLabelMapping":{"^v9.0.0$":"main","^v8.18.0$":"8.x","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["release_note:enhancement",":ml","Feature:Anomaly
Detection","Feature:Transforms","v9.0.0","Team:ML","backport:version","v8.18.0"],"title":"[ML]
Update JSON schemas for code editors
","number":207706,"url":"https://github.com/elastic/kibana/pull/207706","mergeCommit":{"message":"[ML]
Update JSON schemas for code editors (#207706)\n\n## Summary\r\n\r\n-
Updates the default path to the openapi file \r\n- Updates JSON schemas
for ML and Transform code editors with the latest\r\nchanges from
elasticsearch-specification","sha":"ab2379f1f7c4563a5f3c119033bcff5397bab0f6"}},"sourceBranch":"main","suggestedTargetBranches":["8.x"],"targetPullRequestStates":[{"branch":"main","label":"v9.0.0","branchLabelMappingKey":"^v9.0.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/207706","number":207706,"mergeCommit":{"message":"[ML]
Update JSON schemas for code editors (#207706)\n\n## Summary\r\n\r\n-
Updates the default path to the openapi file \r\n- Updates JSON schemas
for ML and Transform code editors with the latest\r\nchanges from
elasticsearch-specification","sha":"ab2379f1f7c4563a5f3c119033bcff5397bab0f6"}},{"branch":"8.x","label":"v8.18.0","branchLabelMappingKey":"^v8.18.0$","isSourceBranch":false,"state":"NOT_CREATED"}]}]
BACKPORT-->

Co-authored-by: Dima Arnautov <[email protected]>
  • Loading branch information
kibanamachine and darnautov authored Jan 22, 2025
1 parent 6250109 commit 8e5484c
Show file tree
Hide file tree
Showing 6 changed files with 2,376 additions and 3,167 deletions.
26 changes: 25 additions & 1 deletion x-pack/platform/packages/private/ml/json_schemas/README.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,27 @@
# @kbn/json-schemas

JSON schema for code editors in Kibana
This package provides JSON schemas used by code editors within the Kibana app.

## Generating/Updating the JSON Schema

To generate or update the output JSON schema files, run the following command from the root directory of the package:

```bash
yarn run jsonSchema
```

By default, this command assumes that your `elasticsearch-specification` folder is located next to the Kibana repository. If your `elasticsearch-specification` folder is located elsewhere, you can specify the path to the OpenAPI file as a command-line argument:

```bash
yarn run jsonSchema /path/to/elasticsearch-specification/output/openapi/elasticsearch-serverless-openapi.json
```

### Example:

```bash
yarn run jsonSchema /Users/my_user/dev/elasticsearch-specification/output/openapi/elasticsearch-serverless-openapi.json
```

This will generate or update the necessary JSON schema files in the `./src` folder.

Once the changes are made, ensure they are reviewed and merged to the appropriate release version.
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,8 @@ export class JsonSchemaService {
'..',
'..',
'..',
'..',
'..',
'elasticsearch-specification',
'output',
'openapi',
Expand Down
Loading

0 comments on commit 8e5484c

Please sign in to comment.