Hi! I'm trying to launch a workflow on sequera wit...
# seqera-platform-community-help
u
Hi! I'm trying to launch a workflow on sequera with the following schema.json, but it does not render in the Seqera UI. I've validated i
Copy code
{
  "$schema": "<https://json-schema.org/draft/2020-12/schema>",
  "$id": "<https://raw.githubusercontent.com///nextflow_schema.seqera.json>",
  "title": "Lorem ipsum",
  "type": "object",
  "definitions": {
    "config_part_1": {
      "title": "Config part 1",
      "type": "object",
      "properties": {
        "prop_1": {
          "type": "string",
          "default": "foo"
        },
        "prop_2": {
          "type": "string",
          "default": "bar"
        },
        "dataset_1": {
          "type": "string",
          "format": "file-path",
          "mimetype": "text/csv"
        }
      }
    },
    "config_part_2": {
      "title": "Config part 2",
      "type": "object",
      "properties": {
        "prop_3": {
          "type": "integer",
          "default": 5
        },
        "prop_4": {
          "type": "number",
          "default": 0.8
        }
      }
    }
  },
  "properties": {},
  "allOf": [
    {
      "$ref": "#/definitions/config_part_1"
    },
    {
      "$ref": "#/definitions/config_part_2"
    }
  ]
}
I've validated the schema using
Copy code
% npx ajv-cli validate \
  --spec=draft2020 \
  -s schema.json \
  -d /dev/null \
  --strict=false
unknown format "file-path" ignored in schema at path "#/definitions/config_part_1/properties/dataset_1"
unknown format "file-path" ignored in schema at path "#/definitions/config_part_1/properties/dataset_1"
/dev/null valid
It warns about the "file-path" format, but that's the format to use when loading datasets in Seqera if I'm not mistaken, so that should not be the problem, no?
p
We are moving towards having our own Nextflow spec in the near future as the community and tooling has never really supported full true JSON schema
Docs for the schema that we use are here: https://nextflow-io.github.io/nf-schema/latest/nextflow_schema/nextflow_schema_specification/ (will move soon when we have the new more official spec)
I would recommend using
nf-core pipelines schema build
for working with schema JSON files as it creates it all via a GUI and should give valid JSON. It works for any piepline, not just nf-core
We're working on a generic replacement at the moment: https://github.com/nextflow-io/schema-builder
I copied + pasted what you wrote into the old builder, I think you should be able to access it here: https://oldsite.nf-co.re/pipeline_schema_builder?id=1769438933_9451b2eea059
it looks fine to me to be honest
what is it that's not working within seqera platform?
u
The UI is just empty. No properties.
u
I've rolled back to a flat property structure without "grouping" and that worked
p
It might be a
defs
versus
definitions
thing, that changed between JSON schema versions
on the move now so can't check but that's my best guess
u
defs
worked. thanks!
p
Hooray! 🎉
🙌 1