Skip to content

Feature Request: Include JsonPath in HTML Format #2835

@abfeb8

Description

@abfeb8

User story
As an API developer using Spectral CLI for linting OpenAPI specifications, I can see JsonPath information in the HTML format report, so that I can quickly locate and fix issues in my OpenAPI documents without having to cross-reference with other formats.

Is your feature request related to a problem?
Currently, the HTML report format generated by Spectral CLI doesn't include JsonPath information for the identified issues, while this information is available in other output formats like JSON. This makes it harder to precisely locate and fix problems when using the HTML report format, which otherwise provides a nice visual overview of linting results.

Describe the solution you'd like
I'd like to see the JsonPath for each identified issue included in the HTML report format. Ideally, this would be displayed alongside the existing information for each issue, making it easy to pinpoint exactly where in the OpenAPI document the problem exists. This could be implemented as an optional parameter (e.g., --html-include-jsonpath) to maintain backward compatibility.

Additional context
I'm willing to contribute this feature myself if the team agrees it would be valuable. The implementation would likely involve modifying the HTML formatter to extract the JsonPath information that's already available in the underlying results object and including it in the generated HTML output.

Metadata

Metadata

Assignees

No one assigned

    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