Skip to content

Commit 673bf3b

Browse files
committed
Restructure reference docs
1 parent d02b391 commit 673bf3b

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

56 files changed

+185
-228
lines changed

docs/docset.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@ project: 'Java API Client'
22
exclude:
33
- external-resources.md
44
- design/*
5-
- local/README.md
65
cross_links:
76
- docs-content
87
- elasticsearch
@@ -13,3 +12,4 @@ subs:
1312
serverless-full: "Elastic Cloud Serverless"
1413
es3: "Elasticsearch Serverless"
1514
es: "Elasticsearch"
15+
version: "9.0.0"

docs/local/README.md

Lines changed: 0 additions & 1 deletion
This file was deleted.
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
The source code for the examples above can be found in the [Java API Client tests](https://github.com/elastic/elasticsearch-java/tree/main/java-client/src/test/java/co/elastic/clients/documentation).

docs/reference/api-conventions.md

Lines changed: 0 additions & 28 deletions
This file was deleted.

docs/reference/blocking-async.md renamed to docs/reference/api-conventions/blocking-async.md

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,13 @@ API clients come in two flavors: blocking and asynchronous. All methods on async
99

1010
Both flavors can be used at the same time depending on your needs, sharing the same transport object:
1111

12+
<!-- :::include
13+
```java
14+
ElasticsearchTransport transport = ...
15+
:::{include} {doc-tests-src}/api_conventions/ApiConventionsTest.java[blocking-and-async]
16+
```
17+
-->
18+
1219
```java
1320
ElasticsearchTransport transport = ...
1421

@@ -36,5 +43,6 @@ asyncClient
3643

3744
Although we won’t go in deeper details on asynchronous programming in Java, remember to handle failures of asynchronous tasks. It’s easy to overlook them and have errors go unnoticed.
3845

39-
The source code for the examples above can be found in the [Java API Client tests](https://github.com/elastic/elasticsearch-java/tree/master/java-client/src/test/java/co/elastic/clients/documentation).
46+
:::{include} /reference/_snippets/doc-tests-blurb.md
47+
:::
4048

docs/reference/building-objects.md renamed to docs/reference/api-conventions/building-objects.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -99,5 +99,6 @@ SearchResponse<SomeApplicationData> results = client
9999
1. Search results will be mapped to `SomeApplicationData` instances to be readily available to the application.
100100

101101

102-
The source code for the examples above can be found in the [Java API Client tests](https://github.com/elastic/elasticsearch-java/tree/master/java-client/src/test/java/co/elastic/clients/documentation).
102+
:::{include} /reference/_snippets/doc-tests-blurb.md
103+
:::
103104

File renamed without changes.
Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
---
2+
mapped_pages:
3+
- https://www.elastic.co/guide/en/elasticsearch/client/java-api-client/current/api-conventions.html
4+
---
5+
6+
# API conventions [api-conventions]
7+
8+
The Java API Client uses a very consistent code structure, using modern code patterns that make complex requests easier to write and complex responses easier to process. The sections below explain these in details.
9+
10+
* [Package structure and namespace clients](package-structure.md)
11+
* [Method naming conventions](method-naming.md)
12+
* [Blocking and asynchronous clients](blocking-async.md)
13+
* [Building API objects](building-objects.md)
14+
* [Lists and maps](lists-maps.md)
15+
* [Variant types](variant-types.md)
16+
* [Object life cycles and thread safety](object-lifecycles.md)
17+
* [Creating API objects from JSON data](loading-json.md)
18+
* [Exceptions](exception-conventions.md)
19+
20+
21+
22+
23+
24+
25+
26+
27+
28+

docs/reference/lists-maps.md renamed to docs/reference/api-conventions/lists-maps.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,5 +73,6 @@ assertEquals(0, stats.failures().size());
7373
assertFalse(ApiTypeHelper.isDefined(stats.failures()));
7474
```
7575

76-
The source code for the examples above can be found in the [Java API Client tests](https://github.com/elastic/elasticsearch-java/tree/master/java-client/src/test/java/co/elastic/clients/documentation).
76+
:::{include} /reference/_snippets/doc-tests-blurb.md
77+
:::
7778

docs/reference/loading-json.md renamed to docs/reference/api-conventions/loading-json.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -167,5 +167,6 @@ Map<String, Aggregate> aggs = client
167167

168168
Notice that order matters when the JSON snippets have some common properties: just as when setting property values programmatically, the last value that is set for a property overwrites the previous one.
169169

170-
The source code for the examples above can be found in the [Java API Client tests](https://github.com/elastic/elasticsearch-java/tree/master/java-client/src/test/java/co/elastic/clients/documentation).
170+
:::{include} /reference/_snippets/doc-tests-blurb.md
171+
:::
171172

0 commit comments

Comments
 (0)