diff --git a/src/offat/parsers/openapi.py b/src/offat/parsers/openapi.py index 347c716..261c2e1 100644 --- a/src/offat/parsers/openapi.py +++ b/src/offat/parsers/openapi.py @@ -28,7 +28,7 @@ def __init__(self, file_or_url: str, spec: dict | None = None) -> None: def _populate_hosts(self): servers = self.specification.get('servers', []) hosts = [] - if not hosts: + if not servers: logger.error('Invalid Server Url: Server URLs are missing in spec file') raise InvalidOpenAPIv3File('Server URLs Not Found in spec file')