elixir-cloud-aai / trs-filer

Lightweight, flexible Flask/Gunicorn-based GA4GH TRS implementation
Apache License 2.0
8 stars 6 forks source link

Extend schema for registering tool versions #43

Closed uniqueg closed 4 years ago

uniqueg commented 4 years ago

Description

The information required to register a tool/workflow is not fully captured by the Tool and ToolVersion schemas in the TRS specificatiom. The current implementation of the amended ToolRegister and ToolVersionRegister lack the properties required to specify properties and contents of files (e.g., container, workflow and test descriptor files).

Proposed solution

The ToolVersionRegister schema in trs_filer/api/additions.openapi.yaml should be extended with a new property files

        files:
          description: Properties and (pointers to) contents of files associated with a tool.
          type: array
          items:
            $ref: "#/components/schemas/Files"

which in turn requires appending a new Files schema that is itself a composite of the TRS ToolFile and FileWrapper schemas:

    Files:
      description: Properties and (a pointer to the) contents of a file.
      allOf:
        - $ref: "#/components/schemas/ToolFile"
        - $ref: "#/components/schemas/FileWrapper"
  • The ToolFile schema describes properties for the relative location the file should be stored at (note that this also implies the file name), as well as the type of file (primary/secondary descriptor, container file, test file, other).
  • The FileWrapper schema describes properties that either take the actual file contents or a URL to the raw file contents (at least one of content or url has to be provided), as well as a dictionary of checksums for the file (optional unless it's a production tool). Conditionally required properties (either url or content and checksum in case the is_production property of the Tool schema is set to True) need to be manually validated in the controller dealing with tool (version) registration.

To do

uniqueg commented 4 years ago

Resolved by #45