This step not needed

This commit is contained in:
dgtlmoon
2025-10-17 11:04:05 +02:00
parent d93dcf9c2a
commit ecdd8987bb
+1 -8
View File
@@ -38,16 +38,9 @@ def get_openapi_spec():
spec_path = os.path.join(os.path.dirname(__file__), '../../docs/api-spec.yaml')
if not os.path.exists(spec_path):
# Possibly for pip3 packages (will be shipped with the package)
# Possibly for pip3 packages
spec_path = os.path.join(os.path.dirname(__file__), '../docs/api-spec.yaml')
# 3. Last resort: check if it's in the package root for pip/PyPI installations
if not os.path.exists(spec_path):
import changedetectionio
package_root = os.path.dirname(os.path.dirname(changedetectionio.__file__))
spec_path = os.path.join(package_root, 'docs/api-spec.yaml')
with open(spec_path, 'r') as f:
spec_dict = yaml.safe_load(f)
_openapi_spec = OpenAPI.from_dict(spec_dict)