elastic / elasticsearch-rs

Official Elasticsearch Rust Client
https://www.elastic.co/guide/en/elasticsearch/client/rust-api/current/index.html
Apache License 2.0
705 stars 72 forks source link

Update REST spec to 7.4.1 and generate url part enums #14

Closed russcam closed 4 years ago

russcam commented 4 years ago

This commit updates the REST API spec to v7.4.1, updating the structs used to model the API endpoints.

With the change to group URL parts with each path, this commit also generates enums for each of the URL parts, replacing the pattern matching on tuples of optional parts with pattern matching on enums.

Builder constructor functions now accept the associated enum as a ctor argument. Where an API contains only a single enum value that accepts no URL parts, this ctor argument is omitted as it is superfluous.

Closes #11 Closes #8