Skip to content

Enum types are not parsed correctly #70

Description

@jdidion

After packing https://github.com/common-workflow-language/cwl-v1.2/blob/1.2.1_proposed/tests/anon_enum_inside_array_inside_schemadef.cwl using cwlpack and then parsing with cwljava, the enum has symbols like "file:/Users/jdidion/projects/cwlScala/target/test-classes/CommandLineTools/conformance/#anon_enum_inside_array_inside_schemadef.cwl/first/user_type_2/species/homo_sapiens" rather than just "homo_sapiens". Packed workflow below.

{
    "cwlVersion": "v1.2",
    "class": "CommandLineTool",
    "requirements": [
        {
            "class": "InlineJavascriptRequirement"
        }
    ],
    "inputs": [
        {
            "type": {
                "name": "user_type_2",
                "type": "record",
                "fields": [
                    {
                        "type": [
                            "null",
                            {
                                "type": "enum",
                                "symbols": [
                                    "homo_sapiens",
                                    "mus_musculus"
                                ]
                            }
                        ],
                        "name": "species"
                    },
                    {
                        "type": [
                            "null",
                            {
                                "type": "enum",
                                "symbols": [
                                    "GRCh37",
                                    "GRCh38",
                                    "GRCm38"
                                ]
                            }
                        ],
                        "name": "ncbi_build"
                    }
                ]
            },
            "id": "first"
        }
    ],
    "baseCommand": "echo",
    "arguments": [
        {
            "prefix": "species",
            "valueFrom": "$(inputs.first.species)"
        },
        {
            "prefix": "ncbi_build",
            "valueFrom": "$(inputs.first.ncbi_build)"
        }
    ],
    "outputs": [
        {
            "type": "stdout",
            "id": "result"
        }
    ],
    "id": "anon_enum_inside_array_inside_schemadef.cwl"
}

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions