[domain] you can specify Schema components under the "schema_components" key of the domain dictionary

This commit is contained in:
maxime 2023-08-02 12:55:04 +02:00
parent 9657f0f9ec
commit 60ff99d0fb
1 changed files with 3 additions and 1 deletions

View File

@ -50,6 +50,7 @@ class HalfDomain(Starlette):
self.version = self.d_domain['version']
self.halfapi_version = self.d_domain.get('halfapi_version', __version__)
self.deps = self.d_domain.get('deps', tuple())
self.schema_components = self.d_domain.get('schema_components', dict())
if not router:
self.router = self.d_domain.get('routers', '.routers')
@ -474,7 +475,8 @@ class HalfDomain(Starlette):
f'x-{key}': value
for key, value in self.d_domain.items()
}),
}
},
'components': self.schema_components
}
)