From 60ff99d0fb69e808cfb2eb5053b903e28e8f58d9 Mon Sep 17 00:00:00 2001 From: maxime Date: Wed, 2 Aug 2023 12:55:04 +0200 Subject: [PATCH] [domain] you can specify Schema components under the "schema_components" key of the domain dictionary --- halfapi/half_domain.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/halfapi/half_domain.py b/halfapi/half_domain.py index 9eb3699..f1b781e 100644 --- a/halfapi/half_domain.py +++ b/halfapi/half_domain.py @@ -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 } )