File tree Expand file tree Collapse file tree 3 files changed +33
-2
lines changed
smithy-aws-protocol-tests/model/restJson1 Expand file tree Collapse file tree 3 files changed +33
-2
lines changed Original file line number Diff line number Diff line change @@ -105,8 +105,12 @@ that support the following members:
105105 the query string (for example, "/foo/bar").
106106 * - host
107107 - ``string ``
108- - The host / endpoint provided to the client, not including the path or
109- scheme (for example, "example.com").
108+ - The host / endpoint provided to the client (for example, "example.com").
109+ ``host `` MAY contain a path to indicate a base path from which each
110+ operation in the service is appended to. For example, given a ``host ``
111+ of ``example.com/foo/bar `` and an operation path of ``/MyOperation ``,
112+ the resolved host of the operation is ``example.com `` and the resolved
113+ path is ``/foo/bar/MyOperation ``.
110114 * - resolvedHost
111115 - ``string ``
112116 - The host / endpoint that the client should send to, not including the
Original file line number Diff line number Diff line change 1+ // This file defines tests to ensure that implementations support endpoints with paths
2+
3+ $ version : " 1.0"
4+
5+ namespace aws.protocoltests.restjson
6+
7+ use aws.protocols#restJson1
8+ use smithy.test#httpRequestTests
9+
10+ @httpRequestTests ([
11+ {
12+ id : " RestJsonHostWithPath" ,
13+ documentation : """
14+ Custom endpoints supplied by users can have paths""" ,
15+ protocol : restJson1 ,
16+ method : " GET" ,
17+ uri : " /custom/HostWithPathOperation" ,
18+ body : " " ,
19+ host : " example.com/custom" ,
20+ appliesTo : " client"
21+ }
22+ ])
23+ @http (uri : " /HostWithPathOperation" , method : " GET" )
24+ operation HostWithPathOperation {}
Original file line number Diff line number Diff line change @@ -86,5 +86,8 @@ service RestJson {
8686 // @endpoint and @hostLabel trait tests
8787 EndpointOperation ,
8888 EndpointWithHostLabelOperation ,
89+
90+ // custom endpoints with paths
91+ HostWithPathOperation ,
8992 ]
9093}
You can’t perform that action at this time.
0 commit comments