Skip to content

Commit 5abe9cf

Browse files
committed
Fix auto generation for Synonyms and Query Ruleset APIs
1 parent 9965478 commit 5abe9cf

File tree

8 files changed

+60
-4
lines changed

8 files changed

+60
-4
lines changed

docs/sphinx/api.rst

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -144,6 +144,12 @@ Nodes
144144
.. autoclass:: NodesClient
145145
:members:
146146

147+
Query rules
148+
-----------
149+
150+
.. autoclass:: QueryRulesetClient
151+
:members:
152+
147153
Rollup Indices
148154
--------------
149155

@@ -192,6 +198,12 @@ SQL
192198
.. autoclass:: SqlClient
193199
:members:
194200

201+
Synonyms
202+
--------
203+
204+
.. autoclass:: SynonymsClient
205+
:members:
206+
195207
TLS/SSL
196208
-------
197209

elasticsearch/_async/client/__init__.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,7 @@
6161
from .ml import MlClient
6262
from .monitoring import MonitoringClient
6363
from .nodes import NodesClient
64+
from .query_ruleset import QueryRulesetClient
6465
from .rollup import RollupClient
6566
from .search_application import SearchApplicationClient
6667
from .searchable_snapshots import SearchableSnapshotsClient
@@ -70,6 +71,7 @@
7071
from .snapshot import SnapshotClient
7172
from .sql import SqlClient
7273
from .ssl import SslClient
74+
from .synonyms import SynonymsClient
7375
from .tasks import TasksClient
7476
from .text_structure import TextStructureClient
7577
from .transform import TransformClient
@@ -449,6 +451,7 @@ def __init__(
449451
self.migration = MigrationClient(self)
450452
self.ml = MlClient(self)
451453
self.monitoring = MonitoringClient(self)
454+
self.query_ruleset = QueryRulesetClient(self)
452455
self.rollup = RollupClient(self)
453456
self.search_application = SearchApplicationClient(self)
454457
self.searchable_snapshots = SearchableSnapshotsClient(self)
@@ -457,6 +460,7 @@ def __init__(
457460
self.shutdown = ShutdownClient(self)
458461
self.sql = SqlClient(self)
459462
self.ssl = SslClient(self)
463+
self.synonyms = SynonymsClient(self)
460464
self.text_structure = TextStructureClient(self)
461465
self.transform = TransformClient(self)
462466
self.watcher = WatcherClient(self)

elasticsearch/_async/client/query_ruleset.py

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,15 @@
1515
# specific language governing permissions and limitations
1616
# under the License.
1717

18-
class C:
18+
import typing as t
19+
20+
from elastic_transport import ObjectApiResponse
21+
22+
from ._base import NamespacedClient
23+
from .utils import SKIP_IN_PATH, _quote, _rewrite_parameters
24+
25+
26+
class QueryRulesetClient(NamespacedClient):
1927
@_rewrite_parameters()
2028
async def delete(
2129
self,

elasticsearch/_async/client/synonyms.py

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,15 @@
1515
# specific language governing permissions and limitations
1616
# under the License.
1717

18-
class C:
18+
import typing as t
19+
20+
from elastic_transport import ObjectApiResponse
21+
22+
from ._base import NamespacedClient
23+
from .utils import SKIP_IN_PATH, _quote, _rewrite_parameters
24+
25+
26+
class SynonymsClient(NamespacedClient):
1927
@_rewrite_parameters()
2028
async def delete_synonym(
2129
self,

elasticsearch/_sync/client/__init__.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,7 @@
6161
from .ml import MlClient
6262
from .monitoring import MonitoringClient
6363
from .nodes import NodesClient
64+
from .query_ruleset import QueryRulesetClient
6465
from .rollup import RollupClient
6566
from .search_application import SearchApplicationClient
6667
from .searchable_snapshots import SearchableSnapshotsClient
@@ -70,6 +71,7 @@
7071
from .snapshot import SnapshotClient
7172
from .sql import SqlClient
7273
from .ssl import SslClient
74+
from .synonyms import SynonymsClient
7375
from .tasks import TasksClient
7476
from .text_structure import TextStructureClient
7577
from .transform import TransformClient
@@ -449,12 +451,14 @@ def __init__(
449451
self.migration = MigrationClient(self)
450452
self.ml = MlClient(self)
451453
self.monitoring = MonitoringClient(self)
454+
self.query_ruleset = QueryRulesetClient(self)
452455
self.rollup = RollupClient(self)
453456
self.search_application = SearchApplicationClient(self)
454457
self.searchable_snapshots = SearchableSnapshotsClient(self)
455458
self.security = SecurityClient(self)
456459
self.slm = SlmClient(self)
457460
self.shutdown = ShutdownClient(self)
461+
self.synonyms = SynonymsClient(self)
458462
self.sql = SqlClient(self)
459463
self.ssl = SslClient(self)
460464
self.text_structure = TextStructureClient(self)

elasticsearch/_sync/client/query_ruleset.py

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,15 @@
1515
# specific language governing permissions and limitations
1616
# under the License.
1717

18-
class C:
18+
import typing as t
19+
20+
from elastic_transport import ObjectApiResponse
21+
22+
from ._base import NamespacedClient
23+
from .utils import SKIP_IN_PATH, _quote, _rewrite_parameters
24+
25+
26+
class QueryRulesetClient(NamespacedClient):
1927
@_rewrite_parameters()
2028
def delete(
2129
self,

elasticsearch/_sync/client/synonyms.py

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,15 @@
1515
# specific language governing permissions and limitations
1616
# under the License.
1717

18-
class C:
18+
import typing as t
19+
20+
from elastic_transport import ObjectApiResponse
21+
22+
from ._base import NamespacedClient
23+
from .utils import SKIP_IN_PATH, _quote, _rewrite_parameters
24+
25+
26+
class SynonymsClient(NamespacedClient):
1927
@_rewrite_parameters()
2028
def delete_synonym(
2129
self,

elasticsearch/client.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,9 @@
4444
from ._sync.client.ml import MlClient as MlClient # noqa: F401
4545
from ._sync.client.monitoring import MonitoringClient as MonitoringClient # noqa: F401
4646
from ._sync.client.nodes import NodesClient as NodesClient # noqa: F401
47+
from ._sync.client.query_ruleset import ( # noqa: F401
48+
QueryRulesetClient as QueryRulesetClient,
49+
)
4750
from ._sync.client.rollup import RollupClient as RollupClient # noqa: F401
4851
from ._sync.client.search_application import ( # noqa: F401
4952
SearchApplicationClient as SearchApplicationClient,
@@ -57,6 +60,7 @@
5760
from ._sync.client.snapshot import SnapshotClient as SnapshotClient # noqa: F401
5861
from ._sync.client.sql import SqlClient as SqlClient # noqa: F401
5962
from ._sync.client.ssl import SslClient as SslClient # noqa: F401
63+
from ._sync.client.synonyms import SynonymsClient as SynonymsClient # noqa: F401
6064
from ._sync.client.tasks import TasksClient as TasksClient # noqa: F401
6165
from ._sync.client.text_structure import ( # noqa: F401
6266
TextStructureClient as TextStructureClient,

0 commit comments

Comments
 (0)