You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+6Lines changed: 6 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -89,6 +89,12 @@ It will listen on the IP address `0.0.0.0`, which means all the available IP add
89
89
90
90
In most cases you would (and should) have a "termination proxy" handling HTTPS for you on top, this will depend on how you deploy your application, your provider might do this for you, or you might need to set it up yourself. You can learn more about it in the <ahref="https://fastapi.tiangolo.com/deployment/"class="external-link"target="_blank">FastAPI Deployment documentation</a>.
91
91
92
+
## `fastapi schema`
93
+
94
+
When you run `fastapi schema`, it will generate a swagger/openapi document.
95
+
96
+
This document will be output to stderr by default, however `--output <filename>` option can be used to write output into file. You can control the format of the JSON file by specifying indent level with `--indent #`. If set to 0, JSON will be in the minimal/compress form. Default is 2 spaces.
97
+
92
98
## License
93
99
94
100
This project is licensed under the terms of the MIT license.
help="A path to a Python file or package directory (with [blue]__init__.py[/blue] files) containing a [bold]FastAPI[/bold] app. If not provided, a default set of paths will be tried."
382
+
),
383
+
] =None,
384
+
*,
385
+
app: Annotated[
386
+
Union[str, None],
387
+
typer.Option(
388
+
help="The name of the variable that contains the [bold]FastAPI[/bold] app in the imported module or package. If not provided, it is detected automatically."
389
+
),
390
+
] =None,
391
+
output: Annotated[
392
+
Union[str, None],
393
+
typer.Option(
394
+
help="The filename to write schema to. If not provided, write to stderr."
395
+
),
396
+
] =None,
397
+
indent: Annotated[
398
+
int,
399
+
typer.Option(help="JSON format indent. If 0, disable pretty printing"),
0 commit comments