mirror of
https://github.com/dgtlmoon/changedetection.io.git
synced 2026-04-30 14:50:39 +00:00
5669509255
Build and push containers / metadata (push) Has been cancelled
Build and push containers / build-push-containers (push) Has been cancelled
Publish Python 🐍distribution 📦 to PyPI and TestPyPI / Build distribution 📦 (push) Has been cancelled
ChangeDetection.io App Test / lint-code (push) Has been cancelled
Publish Python 🐍distribution 📦 to PyPI and TestPyPI / Test the built package works basically. (push) Has been cancelled
Publish Python 🐍distribution 📦 to PyPI and TestPyPI / Publish Python 🐍 distribution 📦 to PyPI (push) Has been cancelled
ChangeDetection.io App Test / test-application-3-10 (push) Has been cancelled
ChangeDetection.io App Test / test-application-3-11 (push) Has been cancelled
ChangeDetection.io App Test / test-application-3-12 (push) Has been cancelled
ChangeDetection.io App Test / test-application-3-13 (push) Has been cancelled
CodeQL / Analyze (javascript) (push) Has been cancelled
CodeQL / Analyze (python) (push) Has been cancelled
22 lines
661 B
Python
22 lines
661 B
Python
import functools
|
|
from flask import make_response
|
|
from flask_restful import Resource
|
|
|
|
|
|
@functools.cache
|
|
def _get_spec_yaml():
|
|
"""Build and cache the merged spec as a YAML string (only serialized once per process)."""
|
|
import yaml
|
|
from changedetectionio.api import build_merged_spec_dict
|
|
return yaml.dump(build_merged_spec_dict(), default_flow_style=False, allow_unicode=True)
|
|
|
|
|
|
class Spec(Resource):
|
|
def get(self):
|
|
"""Return the merged OpenAPI spec including all registered processor extensions."""
|
|
return make_response(
|
|
_get_spec_yaml(),
|
|
200,
|
|
{'Content-Type': 'application/yaml'}
|
|
)
|