Skip to content

Commit

Permalink
[ML] Update JSON schemas for code editors (#207706)
Browse files Browse the repository at this point in the history
## Summary

- Updates the default path to the openapi file 
- Updates JSON schemas for ML and Transform code editors with the latest
changes from elasticsearch-specification
  • Loading branch information
darnautov authored Jan 22, 2025
1 parent 4146dd6 commit ab2379f
Show file tree
Hide file tree
Showing 6 changed files with 2,386 additions and 3,169 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 ab2379f

Please sign in to comment.