Skip to content

autogenerate field classes from schema #2780

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
Feb 14, 2025

Conversation

miguelgrinberg
Copy link
Contributor

@miguelgrinberg miguelgrinberg commented Feb 7, 2025

This change adds autogeneration of field classes in the DSL module from the Elasticsearch specification, so that the class constructors have explicit arguments and docstrings.

Copy link

github-actions bot commented Feb 7, 2025

A documentation preview will be available soon.

Request a new doc build by commenting
  • Rebuild this PR: run docs-build
  • Rebuild this PR and all Elastic docs: run docs-build rebuild

run docs-build is much faster than run docs-build rebuild. A rebuild should only be needed in rare situations.

If your PR continues to fail for an unknown reason, the doc build pipeline may be broken. Elastic employees can check the pipeline status here.

@miguelgrinberg miguelgrinberg force-pushed the autogenerate-fields branch 2 times, most recently from a1ede9b to 4539281 Compare February 12, 2025 18:58
@miguelgrinberg miguelgrinberg marked this pull request as ready for review February 12, 2025 19:39
Copy link
Member

@pquentin pquentin left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks! LGTM.

@miguelgrinberg miguelgrinberg merged commit 6e23635 into elastic:main Feb 14, 2025
15 checks passed
@miguelgrinberg miguelgrinberg deleted the autogenerate-fields branch February 14, 2025 14:26
github-actions bot pushed a commit that referenced this pull request Feb 14, 2025
* autogenerate field classes from schema

* generated code

* special case the dynamic field to also be a bool

(cherry picked from commit 6e23635)
github-actions bot pushed a commit that referenced this pull request Feb 14, 2025
* autogenerate field classes from schema

* generated code

* special case the dynamic field to also be a bool

(cherry picked from commit 6e23635)
miguelgrinberg added a commit that referenced this pull request Feb 14, 2025
* autogenerate field classes from schema

* generated code

* special case the dynamic field to also be a bool

(cherry picked from commit 6e23635)

Co-authored-by: Miguel Grinberg <miguel.grinberg@gmail.com>
miguelgrinberg added a commit that referenced this pull request Feb 14, 2025
* autogenerate field classes from schema

* generated code

* special case the dynamic field to also be a bool

(cherry picked from commit 6e23635)

Co-authored-by: Miguel Grinberg <miguel.grinberg@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants