Add schema definition extension plumbing#1200
Conversation
edb2d90 to
ef7b7e5
Compare
3643e2f to
63b3c9f
Compare
ef7b7e5 to
d841965
Compare
| namespace schema_name do | ||
| ::ElasticGraph::Local::RakeTasks.new(local_config_yaml: settings_file, path_to_schema: schema_file) do |tasks| | ||
| tasks.opensearch_versions = [] | ||
| tasks.enforce_json_schema_version = false |
There was a problem hiding this comment.
For the site examples I think we want this to be false, as we don't want to ever bump the json schema version on them. The generated schema artifacts are git-ignored so it works fine on CI with either false or true, but it may add friction if these examples all inherit the default value of true. For example, if I'm iterating on a site example schema the default of true may force me to manually delete the schema artifacts between runs of be rake site:serve, whereas that was previously not needed.
Can you add schema.enforce_json_schema_version false next to schema.json_schema_version 1 in the site example schemas?
| # ) do |tasks| | ||
| # # TODO: remove this once we're past the prototyping stage | ||
| # tasks.enforce_json_schema_version = false | ||
| # end |
There was a problem hiding this comment.
This is useful API documentation that previously rendered on our website. Can you copy it over to the new schema.enforce_json_schema_version API?
There was a problem hiding this comment.
I don't think the changes here are needed--if I revert them, script/type_check still passes.
Why
Prepare schema definition for ingestion serializer extensions before moving JSON Schema code into its own gem.
What
extension_modulesplumbing for APIs, factories, and rake tasksschema.enforce_json_schema_version falseRisk Assessment
Medium — this touches schema definition setup, but JSON Schema behavior remains in
elasticgraph-schema_definitionin this PR.References