ToolShed API 2.0

This commit is contained in:
John Chilton
2023-09-26 13:46:58 -04:00
parent bad135b9d7
commit d1d629074b
46 changed files with 1963 additions and 283 deletions
+11 -2
View File
@@ -28,8 +28,17 @@ YamlDumper.add_implicit_resolver("!anyurl", url_regex(), None)
@click.command("Write openapi schema to path")
@click.argument("schema_path", type=click.Path(dir_okay=False, writable=True), required=False)
def write_open_api_schema(schema_path):
openapi_schema = get_openapi_schema()
@click.option("--app", type=click.Choice(["gx", "shed"]), required=False, default="gx")
def write_open_api_schema(schema_path, app: str):
if app == "shed":
# Importing this causes the Galaxy schema to generate
# in a different fashion and causes a diff in downstream
# typescript generation for instance. So delay this.
from tool_shed.webapp.fast_app import get_openapi_schema as get_openapi_schema_shed
openapi_schema = get_openapi_schema_shed()
else:
openapi_schema = get_openapi_schema()
if schema_path:
if schema_path.endswith((".yml", ".yaml")):
with open(schema_path, "w") as f: