Skip to content

Fix all validation errors #4796

Open
Open
@pquentin

Description

@pquentin

For more than a year, we've been working to reduce the number of validation errors in https://github.com/elastic/elasticsearch-specification/blob/main/output/schema/validation-errors.json to zero. We used to have hundreds of them, but as of writing this we have 40 left. Actually getting to zero will allow us to fail CI whenever a new one is introduced. This issue is about tracking the work left here.

Compiler

  • Property XXX is a single-variant and must be required (6 errors)
    • QueryVectorBuilder - only one implementation
    • RankContainer - RankBuilder is an abstract class with two implementations, the deprecated RRFRankBuilder that we expose in the spec, and TextSimilarityRankBuilder that is meant to be used with retrievers instead.
    • RetentionPolicyContainer - two implementations, but NullRetentionPolicyConfig is set by using null - https://github.com/search?q=repo%3Aelastic%2Fclients-flight-recordings%20retention_policy&type=code does not appear to be a container, where is this time field coming from?
    • SyncContainer: SyncConfig only has one real implementation
    • TriggerContainer Trigger has two implementations, schedule and manual. Only schedule is exposed. This is used in WatcherPutWatchRequest, QueryWatchResponse, ExecuteWatchRequest and GetWatchResponse. In other world, it's only "user input", and it makes no sense to input a manual schedule.
    • TriggerEventContainer. In Elasticsearch, TriggerEvent is an asbtract base class (not an interface) with two implementations. However, this is only used in ExecuteWatchResponse, as seen below. In recordings, I have only seen manual, like this.
      {
        "_id": "my_watch_2e5cacf8-73cb-452a-ad9b-99e0e33531a9-2025-07-08T09:05:56.260576834Z",
        "watch_record": {
          "@timestamp": "2025-07-08T09:05:56.259912876Z",
          "state": "executed",
          ...
          "trigger_event": {
            "manual": {
              "schedule": {
                "scheduled_time": "2025-07-08T09:05:56.259Z"
              }
            },
            "triggered_time": "2025-07-08T09:05:56.259Z",
            "type": "manual"
          },
          "user": "elastic",
          "watch_id": "my_watch"
        }
      }
      

Differences from rest-api-spec

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions