Skip to content

Add default Validation Rule(s) for schema reference validity #2453

@martincostello

Description

@martincostello

Is your feature request related to a problem? Please describe.

I found a bug in ASP.NET Core where invalid schema references were being generated that are circular references: dotnet/aspnetcore#63090

I looked to add a test that uses the validation rules, but the built-in default rules do not detect any such issues (though they found others).

editor.swagger.io does detect these issues, as that's how I found the bug.

Describe the solution you'd like

One or more validation rules that verify that OpenAPI schema references are valid.

Describe alternatives you've considered

Write code to manually traverse the document and validate schema references (e.g. dotnet/aspnetcore@06ffc01).

Additional context

dotnet/aspnetcore#63090

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