Skip to content

codelinks global property injection causes schema violations with unevaluatedProperties: false #71

@m-anderson1313

Description

@m-anderson1313

When sphinx-codelinks extracts implementation markers from code, it injects 5 metadata properties (directory, file, local-url, project, remote-url) into all extracted needs, regardless of need type. This causes schema validation failures in projects using strict schema validation ("unevaluatedProperties": false).

Current Behaviour:

Projects with strict schema validators fail with: "Unevaluated properties are not allowed ('directory', 'file', ...)" for all 20 need types (role, req, spec, impl, test, etc.)
Workaround: manually pre-declare these 5 properties on all 20 need validators (not scalable)

Expected Behaviour:

One of the following:

Per-type filtering — Configuration option to inject properties only into semantically relevant need types (e.g., only impl, spec, test)
Documentation — Clear guidance that projects using sphinx-codelinks should use permissive validation ("unevaluatedProperties": false omitted from schema)
Selective injection — Code marker syntax to specify which properties to inject

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