Skip to content

[ML] Calendars API : Inconsistencies in documentation / JSON spec #39677

@codebrain

Description

@codebrain

The ml.getcalendars API has some issues:

  1. It is not possible to use paging parameters (from/size) when addressing a single calendar_id in the request. Elasticsearch throws a request validation exception. This is unlike the behaviour of ml.getcategories which does allow this combination and returns an array with length 1.

  2. The public documentation is incorrect (https://www.elastic.co/guide/en/elasticsearch/reference/current/ml-get-calendar.html), the from and size parameters need to be nested under a parent page object as per the other ML APIs. It is also incomplete in that the description body parameter is not mentioned in any of the examples.

  3. The YAML tests are misleading in that they do not use the page object prefix -

  4. The absence of of a body description in the JSON spec:

    - a null value instead signals our code generator to generate only GET verbs, despite the generator being aware of the POST verb. It is arguable that this is a weakness in our .NET client generator, so I have patched the JSON locally using our patching mechanism to fix.

Metadata

Metadata

Assignees

No one assigned

    Labels

    :mlMachine learning

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions