Port historical schemas to jsonschema (#1084)

* Port historical schemas to jsonschema
* Add marshmallow-json dependency
* Mark etc/api_schemas as binary
* Remove gitattributes attempt
* Lint fix
* Apply PR feedback
* Additional PR feedback
* Extract stack version from packages.yml
* Fix the backport schemas
* Cache the schema reads
* Add migration for #1167
* Make a separate 'migration not found' error
This commit is contained in:
Ross Wolf
2021-05-13 14:27:32 -06:00
committed by GitHub
parent e40276c12b
commit eb40c52c7c
56 changed files with 25134 additions and 560 deletions
+10
View File
@@ -15,6 +15,7 @@ import time
from pathlib import Path
import click
import typing
from elasticsearch import Elasticsearch
from eql import load_dump
@@ -703,3 +704,12 @@ def validate_ml_detections_asset(directory):
click.echo(f'description to paste with release:\n\n{description_str}\n')
return zip_name, description_str
@dev_group.command("update-schemas")
def update_schemas():
from . rule import BaseRuleData, AnyRuleData
classes = [BaseRuleData] + list(typing.get_args(AnyRuleData))
for cls in classes:
cls.save_schema()