diff --git a/tipg/factory.py b/tipg/factory.py index d935f0cd..3f97ca5f 100644 --- a/tipg/factory.py +++ b/tipg/factory.py @@ -219,7 +219,8 @@ def __post_init__(self): """Post Init: register route and configure specific options.""" self.register_routes() if self.with_common: - self.register_common_routes() + self._conformances_route() + self._landing_route() def url_for(self, request: Request, name: str, **path_params: Any) -> str: """Return full url (with prefix) for a specific handler.""" @@ -269,8 +270,8 @@ def links(self, request: Request) -> List[model.Link]: """Register factory Routes.""" ... - def register_common_routes(self): - """Register Landing (/) and Conformance (/conformance) routes.""" + def _conformance_route(self): + """Register Conformance (/conformance) route.""" @self.router.get( "/conformance", @@ -303,6 +304,9 @@ def conformance( return data + def _landing_route(self): + """Register Landing (/) and Conformance (/conformance) routes.""" + @self.router.get( "/", response_model=model.Landing,