Skip to content

Commit 5891534

Browse files
authored
Update layout of client guide based on feedback (smithy-lang#2533)
1 parent c18b835 commit 5891534

File tree

3 files changed

+22
-9
lines changed

3 files changed

+22
-9
lines changed

docs/source-2.0/languages/java/client/dynamic-client.rst

Lines changed: 14 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -48,9 +48,6 @@ Now, create the ``DynamicClient`` instance for this model and service:
4848
var client = DynamicClient.builder()
4949
.service(shapeId)
5050
.model(model)
51-
.protocol(new RestJsonClientProtocol(shapeId))
52-
.transport(new JavaHttpClientTransport())
53-
.endpointResolver(EndpointResolver.staticEndpoint("https://api.cafe.example.com"))
5451
.build();
5552
5653
.. admonition:: Important
@@ -67,3 +64,17 @@ The ``Document.createFromObject`` method can create a ``Document`` from a map:
6764
var input = Document.createFromObject(Map.of("coffeeType", "COLD_BREW"));
6865
var result = client.call("CreateOrder", input).get();
6966
System.out.println(result);
67+
68+
Dynamic clients, like generated clients, support the runtime configuration of protocols,
69+
transports, auth schemes, and endpoint resolvers:
70+
71+
.. code-block:: java
72+
73+
var client = DynamicClient.builder()
74+
.service(shapeId)
75+
.model(model)
76+
.protocol(new RestJsonClientProtocol(shapeId))
77+
.transport(new JavaHttpClientTransport())
78+
.addPlugin(new MyPlugin())
79+
.endpointResolver(EndpointResolver.staticEndpoint("https://api.cafe.example.com"))
80+
.build();

docs/source-2.0/languages/java/client/index.rst

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,9 +17,8 @@ For a general introduction the the Smithy Java framework, see the Smithy :doc:`.
1717
:maxdepth: 1
1818

1919
generating-clients
20-
codegen-integrations
21-
dynamic-client
2220
configuration
2321
customization
2422
plugins
25-
23+
dynamic-client
24+
codegen-integrations

docs/source-2.0/languages/java/client/plugins.rst

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ The added agent header has the form:
7171

7272
.. code-block::
7373
74-
smithy-java/<smithy> ua/<ua> os/<family>#<version> lang/java#<version> m/<features>
74+
smithy-java/<smithy> ua/<ua> os/<os-family>#<os-version> lang/java#<java-version> m/<features>
7575
7676
.. list-table::
7777
:header-rows: 1
@@ -89,9 +89,12 @@ The added agent header has the form:
8989
* - ``os-family``
9090
- ``macos``
9191
- Operating system client is running on
92-
* - ``version``
92+
* - ``os-version``
9393
- ``14.6.1``
94-
- version of OS or Language the client is running on.
94+
- version of OS client is running on.
95+
* - ``java-version``
96+
- ``17.2.0``
97+
- version of Java client is running on.
9598
* - ``features``
9699
- ``a,b``
97100
- Comma-separated list of feature Ids

0 commit comments

Comments
 (0)