mirror of
https://github.com/galaxyproject/galaxy.git
synced 2026-09-19 02:21:32 +08:00
ToolShed API 2.0
This commit is contained in:
@@ -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:
|
||||
|
||||
Reference in New Issue
Block a user