Skip to content

Commit

Permalink
multi-client-resolve-comments (#26602)
Browse files Browse the repository at this point in the history
update multi-client and multi-endpoint design doc to resolve comments
  • Loading branch information
qiaozha authored Jul 25, 2023
1 parent a7c3acb commit 1fb6b2d
Showing 1 changed file with 4 additions and 57 deletions.
61 changes: 4 additions & 57 deletions design/multi-client-and-multi-endpoint-in-modular.md
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,7 @@ First, let's consider some common questions about this two design.

With the above initial proposals and the above considerations, we get our finalized design for both multi-client and multi-endpoint.

### Finalized Proposal in Multi-Client
### Finalized Proposal in Multi-Client & Multi-Endpoint

<!-- markdownlint-disable MD033 -->
<table>
Expand All @@ -156,60 +156,8 @@ With the above initial proposals and the above considerations, we get our finali
<tr>
<td>
<pre lang="typescript">
Both sub classical clients exported as well as models
Export all classical sub-clients and models
@azure/foo

</pre>
<pre lang="typescript">
ClientA
@azure/foo/clientA
@azure/foo/clientA/api
@azure/foo/clientA/models
</pre>
<pre lang="typescript">
ClientB
@azure/foo/clientB
@azure/foo/clientB/api
@azure/foo/clientB/models
</pre>
</td>
<td>
<pre lang="typescript">
Both sub classical clients exported as well as models
src
src/rest
</pre>
<pre lang="typescript">
ClientA
src/clientA
src/clientA/api
src/clientA/models
</pre>
<pre lang="typescript">
ClientB
src/clientB
src/clientB/api
src/clientB/models
</pre>
</td>
</tr>
</table>
<!-- markdownlint-enable MD033 -->

### Finalized Proposal in Multi-Endpoint

<!-- markdownlint-disable MD033 -->
<table>
<tr>
<th>Subpath Exports</th>
<th>Source Code Structure</th>
</tr>
<tr>
<td>
<pre lang="typescript">
Both sub classical clients exported as well as models
@azure/foo

</pre>
<pre lang="typescript">
ClientA
Expand All @@ -226,9 +174,8 @@ ClientB
</td>
<td>
<pre lang="typescript">
Both sub classical clients exported as well as models
Export all classical sub-clients and models
src
src/rest
</pre>
<pre lang="typescript">
ClientA
Expand All @@ -247,4 +194,4 @@ src/clientB/models
</table>
<!-- markdownlint-enable MD033 -->

The proposals look the same in both the Multi-Client and Multi-Endpoint case. But there's a difference in the `src/rest` between the Multi-Client and the Multi-Endpoint case. In the Multi-Client case, we will just have a `src/rest/index.ts` that exports everything from the `@azure-rest/service` standalone RLC. In the Multi-Endpoint case, we will just have a `src/rest/clientA/index.ts` that exports everything from the `@azure-rest/service-clientA` standalone RLC and a `src/rest/clientB/index.ts` that exports everything from the `@azure-rest/service-clientB` standalone RLC which is a multiple RLC packages maps to one Modular package scenario.
The proposals should be the same in both the Multi-Client and Multi-Endpoint case. But there's a difference in the rest layer between the Multi-Client and the Multi-Endpoint case. In the Multi-Client case, we will just have one `@azure-rest/foo` as the modular dependencies that provides the rest api layer stuff to the modular layer. In the Multi-Endpoint case, we will have both `@azure-rest/foo-clientA` that provides rest api layer of clientA to the modular layer sub-client clientA and `@azure-rest/foo-clientB` that provides rest api layer of clientB to the modular layer to the sub-client clientB.

0 comments on commit 1fb6b2d

Please sign in to comment.