Motov Yurii
Motov Yurii
```python response = client.get("/openapi.json") response = client.get("/static/swagger.js") response = client.get("/static/swagger.css") assert "/static/swagger.js" in swagger_html assert f"{root_path}/static/swagger.js" not in swagger_html assert "/static/swagger.css" in swagger_html assert f"{root_path}/static/swagger.css" not in swagger_html ``` The...
IMO, ideally we just need to update docs example (add `root_path` prefixes to URLs of assets as it's done in the [original endpoint function](https://github.com/fastapi/fastapi/blob/28038f19cfae040c826ad7a89f511fc854d9d44f/fastapi/applications.py#L1014-L1026)) and parameterize test for that code...
Closing this in favor of new #13825
@adsharma, are there any other use cases beside the use case with external library you've mentioned? Could it be useful for something else?
Thanks for quick reply! > In a large repository of many thousand SQLModels, you might want to defer work. Otherwise, model loading becomes slow and expensive. But in current implementation...
Would be nice if you could summarize use cases we discussed and update the description of this PR, so that we could hide some comments as resolved. It would simplify...
> Updated the summary. Please review. Unfortunately, I think you misunderstood me.. For now the description looks like a promotion of your library. But I think we should focus on...
Works well in current version: ```py import typer def main(name: str): typer.echo(f'Name: {name}') if __name__ == '__main__': typer.run(main) ``` ``` $ python main.py --help Usage: main.py [OPTIONS] NAME ╭─ Arguments...
Alternatively, if we don't want to handle passing `str`, we can specify type as ```py Union[ List[str], Tuple[str, ...], Set[str], FrozenSet[str], Iterable[str], ] ```