<h3 dir="auto">Description</h3>
<p dir="auto">For instance, I have two dockerized FastApi application running. My <code class="notranslate">App1</code> always calls <code class="notranslate">App2</code>.<br>
Is it possible to route calls to <code class="notranslate">App2</code> in a simple way from <code class="notranslate">App1</code>, without writing duplicate endpoints in <code class="notranslate">App1</code> and using requests lib to call endpoints in <code class="notranslate">App2</code>?</p>
<p dir="auto">Something in lines of <a href="https://fastapi.tiangolo.com/advanced/sub-applications-proxy/" rel="nofollow">Sub Applications</a> but across two different dockerized application.</p>
<p dir="auto">Hi<br>
I have identified a problem related to the way the integrated swagger interprets lists in formdata. So this is the endpoint I use:</p>
<blockquote>
<p dir="auto">@router.patch("/clients/{client_id}")<br>
def patch_client(client_id: int,<br>
db: Session = Depends(get_db),<br>
email: typing.Optional[List[EmailStr]] = Form(None),<br>
phone: typing.Optional[List[str]] = Form(None) ........</p>
</blockquote>
<p dir="auto">Basically for the Swagger auto-documentation to implement a form list all I have to do is use typing.List then in the Swagger UI appears the button "Add Item". Now the problem is it doesn't work as it should. For the email part it works only if you add a single email, on a second email I get 422 Unprocessable Entity. For phones instead of giving me a proper list of strings I get a list with a single string with each phone field separated by comma. The curl which is generated just doesn't work.</p>
<p dir="auto">This is the curl which is generated:</p>
<blockquote>
<p dir="auto">curl -X PATCH "<a href="http://10.2.1.90:8000/clients/564" rel="nofollow">http://10.2.1.90:8000/clients/564</a>" -H  "accept: application/json" -H  "Content-Type: application/x-www-form-urlencoded" -d "<strong>email=user%40example.com,user%40example.com</strong>&amp;phone="</p>
</blockquote>
<p dir="auto">It doesn't work, simply because it expects a proper EmailStr instead it gets some kind of concatenated thing.</p>
<p dir="auto">Now, this is change I made to the curl and it works as expected:</p>
<blockquote>
<p dir="auto">curl -X PATCH "<a href="http://10.2.1.90:8000/clients/564" rel="nofollow">http://10.2.1.90:8000/clients/564</a>" -H  "accept: application/json" -H  "Content-Type: application/x-www-form-urlencoded" -d "email=user%40example.com&amp;email=user%40example.com&amp;phone="<br>
And I get a proper list:<br>
['<a href="mailto:user@example.com">user@example.com</a>', '<a href="mailto:user@example.com">user@example.com</a>']</p>
</blockquote>
<p dir="auto">As far as I know it's perfectly allowed and according to spec to specify duplicated keys which contain different values. Why does the integrated Swagger UI behave like this though?</p>
<p dir="auto">The problem appears both for multipart and x-www-form-urlencoded because of that concatenation that uses a comma.</p>