mirror of
https://github.com/deepset-ai/haystack.git
synced 2025-07-13 03:50:36 +00:00

* Testing black on ui/ * Applying black on docstores * Add latest docstring and tutorial changes * Create a single GH action for Black and docs to reduce commit noise to the minimum, slightly refactor the OpenAPI action too * Remove comments * Relax constraints on pydoc-markdown * Split temporary black from the docs. Pydoc-markdown was obsolete and needs a separate PR to upgrade * Fix a couple of bugs * Add a type: ignore that was missing somehow * Give path to black * Apply Black * Apply Black * Relocate a couple of type: ignore * Update documentation * Make Linux CI run after applying Black * Triggering Black * Apply Black * Remove dependency, does not work well * Remove manually double trailing commas * Update documentation Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
23 lines
595 B
Python
23 lines
595 B
Python
import json
|
|
from pathlib import Path
|
|
import os
|
|
import sys
|
|
|
|
sys.path.append("../../../../")
|
|
|
|
rest_path = Path("../../../../rest_api").absolute()
|
|
pipeline_path = str(rest_path / "pipeline" / "pipeline_empty.yaml")
|
|
app_path = str(rest_path / "application.py")
|
|
print(f"Loading OpenAPI specs from {app_path} with pipeline at {pipeline_path}")
|
|
|
|
os.environ["PIPELINE_YAML_PATH"] = pipeline_path
|
|
|
|
from rest_api.application import get_openapi_specs
|
|
|
|
# Generate the openapi specs
|
|
specs = get_openapi_specs()
|
|
|
|
# Dump the specs into a JSON file
|
|
with open(f"openapi.json", "w") as f:
|
|
json.dump(specs, f)
|