Skip to content

Commit

Permalink
Fix auto generation for Synonyms and Query Ruleset APIs
Browse files Browse the repository at this point in the history
  • Loading branch information
pquentin committed Sep 14, 2023
1 parent 830894e commit d99a582
Show file tree
Hide file tree
Showing 8 changed files with 60 additions and 4 deletions.
12 changes: 12 additions & 0 deletions docs/sphinx/api.rst
Original file line number Diff line number Diff line change
Expand Up @@ -144,6 +144,12 @@ Nodes
.. autoclass:: NodesClient
:members:

Query rules
-----------

.. autoclass:: QueryRulesetClient
:members:

Rollup Indices
--------------

Expand Down Expand Up @@ -192,6 +198,12 @@ SQL
.. autoclass:: SqlClient
:members:

Synonyms
--------

.. autoclass:: SynonymsClient
:members:

TLS/SSL
-------

Expand Down
4 changes: 4 additions & 0 deletions elasticsearch/_async/client/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,7 @@
from .ml import MlClient
from .monitoring import MonitoringClient
from .nodes import NodesClient
from .query_ruleset import QueryRulesetClient
from .rollup import RollupClient
from .search_application import SearchApplicationClient
from .searchable_snapshots import SearchableSnapshotsClient
Expand All @@ -70,6 +71,7 @@
from .snapshot import SnapshotClient
from .sql import SqlClient
from .ssl import SslClient
from .synonyms import SynonymsClient
from .tasks import TasksClient
from .text_structure import TextStructureClient
from .transform import TransformClient
Expand Down Expand Up @@ -449,6 +451,7 @@ def __init__(
self.migration = MigrationClient(self)
self.ml = MlClient(self)
self.monitoring = MonitoringClient(self)
self.query_ruleset = QueryRulesetClient(self)
self.rollup = RollupClient(self)
self.search_application = SearchApplicationClient(self)
self.searchable_snapshots = SearchableSnapshotsClient(self)
Expand All @@ -457,6 +460,7 @@ def __init__(
self.shutdown = ShutdownClient(self)
self.sql = SqlClient(self)
self.ssl = SslClient(self)
self.synonyms = SynonymsClient(self)
self.text_structure = TextStructureClient(self)
self.transform = TransformClient(self)
self.watcher = WatcherClient(self)
Expand Down
10 changes: 9 additions & 1 deletion elasticsearch/_async/client/query_ruleset.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,15 @@
# specific language governing permissions and limitations
# under the License.

class C:
import typing as t

from elastic_transport import ObjectApiResponse

from ._base import NamespacedClient
from .utils import SKIP_IN_PATH, _quote, _rewrite_parameters


class QueryRulesetClient(NamespacedClient):
@_rewrite_parameters()
async def delete(
self,
Expand Down
10 changes: 9 additions & 1 deletion elasticsearch/_async/client/synonyms.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,15 @@
# specific language governing permissions and limitations
# under the License.

class C:
import typing as t

from elastic_transport import ObjectApiResponse

from ._base import NamespacedClient
from .utils import SKIP_IN_PATH, _quote, _rewrite_parameters


class SynonymsClient(NamespacedClient):
@_rewrite_parameters()
async def delete_synonym(
self,
Expand Down
4 changes: 4 additions & 0 deletions elasticsearch/_sync/client/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,7 @@
from .ml import MlClient
from .monitoring import MonitoringClient
from .nodes import NodesClient
from .query_ruleset import QueryRulesetClient
from .rollup import RollupClient
from .search_application import SearchApplicationClient
from .searchable_snapshots import SearchableSnapshotsClient
Expand All @@ -70,6 +71,7 @@
from .snapshot import SnapshotClient
from .sql import SqlClient
from .ssl import SslClient
from .synonyms import SynonymsClient
from .tasks import TasksClient
from .text_structure import TextStructureClient
from .transform import TransformClient
Expand Down Expand Up @@ -449,12 +451,14 @@ def __init__(
self.migration = MigrationClient(self)
self.ml = MlClient(self)
self.monitoring = MonitoringClient(self)
self.query_ruleset = QueryRulesetClient(self)
self.rollup = RollupClient(self)
self.search_application = SearchApplicationClient(self)
self.searchable_snapshots = SearchableSnapshotsClient(self)
self.security = SecurityClient(self)
self.slm = SlmClient(self)
self.shutdown = ShutdownClient(self)
self.synonyms = SynonymsClient(self)
self.sql = SqlClient(self)
self.ssl = SslClient(self)
self.text_structure = TextStructureClient(self)
Expand Down
10 changes: 9 additions & 1 deletion elasticsearch/_sync/client/query_ruleset.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,15 @@
# specific language governing permissions and limitations
# under the License.

class C:
import typing as t

from elastic_transport import ObjectApiResponse

from ._base import NamespacedClient
from .utils import SKIP_IN_PATH, _quote, _rewrite_parameters


class QueryRulesetClient(NamespacedClient):
@_rewrite_parameters()
def delete(
self,
Expand Down
10 changes: 9 additions & 1 deletion elasticsearch/_sync/client/synonyms.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,15 @@
# specific language governing permissions and limitations
# under the License.

class C:
import typing as t

from elastic_transport import ObjectApiResponse

from ._base import NamespacedClient
from .utils import SKIP_IN_PATH, _quote, _rewrite_parameters


class SynonymsClient(NamespacedClient):
@_rewrite_parameters()
def delete_synonym(
self,
Expand Down
4 changes: 4 additions & 0 deletions elasticsearch/client.py
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,9 @@
from ._sync.client.ml import MlClient as MlClient # noqa: F401
from ._sync.client.monitoring import MonitoringClient as MonitoringClient # noqa: F401
from ._sync.client.nodes import NodesClient as NodesClient # noqa: F401
from ._sync.client.query_ruleset import ( # noqa: F401
QueryRulesetClient as QueryRulesetClient,
)
from ._sync.client.rollup import RollupClient as RollupClient # noqa: F401
from ._sync.client.search_application import ( # noqa: F401
SearchApplicationClient as SearchApplicationClient,
Expand All @@ -57,6 +60,7 @@
from ._sync.client.snapshot import SnapshotClient as SnapshotClient # noqa: F401
from ._sync.client.sql import SqlClient as SqlClient # noqa: F401
from ._sync.client.ssl import SslClient as SslClient # noqa: F401
from ._sync.client.synonyms import SynonymsClient as SynonymsClient # noqa: F401
from ._sync.client.tasks import TasksClient as TasksClient # noqa: F401
from ._sync.client.text_structure import ( # noqa: F401
TextStructureClient as TextStructureClient,
Expand Down

0 comments on commit d99a582

Please sign in to comment.