Skip to content

Clarify support for external $ref in nextflow_schema.json #202

@vinay-ebi

Description

@vinay-ebi

When using nf-schema, $ref values that point to external local JSON files do not appear to be resolved, even when the files exist and are valid JSON Schema.

This makes it difficult to reuse shared schema definitions across pipelines and differs from standard JSON Schema (draft 2020-12) behavior.

I’d like to clarify whether this is an intentional limitation or something that could be supported or documented more explicitly.

Example

  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "allOf": [
    {
      "$ref": "./schemas/genome_info.json#/$defs/genome_info_parameters"
    }
  ]
}```


With:

```pipeline/
├── nextflow_schema.json
└── schemas/
    └── genome_info.json


Validation fails with:

Resolution of $ref [...] failed

The same schema validates correctly with standard JSON Schema validators .

Is resolving external local $ref intentionally unsupported in nf-schema?

If so, would it be possible to document this limitation clearly and suggest recommended patterns for schema reuse (e.g. schema generation or inlining)?

If not, would supporting local filesystem $ref resolution be within scope?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions