diff --git a/app/api/utils.py b/app/api/utils.py index 7c80a76d3e75b9e5b32fe002aceb34040a6f67e1..bf86b23ac11cb4ae2d0edec42ec0e24939b4fa05 100644 --- a/app/api/utils.py +++ b/app/api/utils.py @@ -67,7 +67,9 @@ async def check_repo(repo: GitRepository, client: AsyncClient) -> None: Http client with an open connection. Dependency Injection. """ await repo.check_files_exist( - ["README.md", "CHANGELOG.md", "main.nf", "nextflow_schema.json"], client=client, raise_error=True + ["README.md", "CHANGELOG.md", "main.nf", "nextflow_schema.json", "docs/usage.md", "docs/output.md"], + client=client, + raise_error=True, ) diff --git a/app/schemas/workflow_version.py b/app/schemas/workflow_version.py index d9bdf913c41d60d4ecbe97619a31dfe8cf639d56..d1e4890a08bc9640d77a83f621bd5da99b98ab13 100644 --- a/app/schemas/workflow_version.py +++ b/app/schemas/workflow_version.py @@ -63,9 +63,19 @@ class WorkflowVersionFull(WorkflowVersionReduced): ) changelog_url: AnyHttpUrl = Field( ..., - description="URL to download CHAnGELOG.md from", + description="URL to download CHANGELOG.md from", example="https://raw.githubusercontent.com/example/example/CHANGELOG.md", ) + usage_url: AnyHttpUrl = Field( + ..., + description="URL to download usage.md from", + example="https://raw.githubusercontent.com/example/example/docs/usage.md", + ) + output_url: AnyHttpUrl = Field( + ..., + description="URL to download output.md from", + example="https://raw.githubusercontent.com/example/example/docs/output.md", + ) parameter_schema_url: AnyHttpUrl = Field( ..., description="URL to download nextflow_schema.json from", @@ -78,6 +88,8 @@ class WorkflowVersionFull(WorkflowVersionReduced): workflow_id=db_version.workflow_id, readme_url=repo.downloadFileURL("README.md"), changelog_url=repo.downloadFileURL("CHANGELOG.md"), + usage_url=repo.downloadFileURL("docs/usage.md"), + output_url=repo.downloadFileURL("docs/output.md"), parameter_schema_url=repo.downloadFileURL("nextflow_schema.json"), **WorkflowVersionReduced.from_db_version(db_version).dict(), )