File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -67,11 +67,14 @@ def read_version_from_pyproject():
6767 # retrieve OpenAPI schema via initialized app
6868 open_api = get_openapi (
6969 title = app .title ,
70+ summary = app .summary ,
7071 version = app .version ,
7172 openapi_version = app .openapi_version ,
7273 description = app .description ,
7374 routes = app .routes ,
7475 license_info = app .license_info ,
76+ servers = app .servers ,
77+ contact = app .contact ,
7578 )
7679
7780 # dump the schema into file
Original file line number Diff line number Diff line change 2323
2424app = FastAPI (
2525 title = f"{ service_name } service - OpenAPI" ,
26+ summary = f"{ service_name } service API specification." ,
2627 description = f"{ service_name } service API specification." ,
2728 version = version .__version__ ,
29+ contact = {
30+ "name" : "Pavel Tisnovsky" ,
31+ "url" : "https://github.com/tisnik/" ,
32+ "email" : "ptisnovs@redhat.com" ,
33+ },
2834 license_info = {
2935 "name" : "Apache 2.0" ,
3036 "url" : "https://www.apache.org/licenses/LICENSE-2.0.html" ,
3137 },
38+ servers = [
39+ {"url" : "http://localhost:8080/" , "description" : "Locally running service" }
40+ ],
3241)
3342
3443app .add_middleware (
You can’t perform that action at this time.
0 commit comments