Skip to content

Strict Mode Improvements #71

@holm0563

Description

@holm0563

Strict mode is confusing.

  • Its an optional parameter thats easy to miss
  • It gets overridden from the OpenApiComparator.Compare method by the version number (only if set to false)
  • There is no way to tell what was a breaking change vs a warning / error
  • When not in strict mode, only AddedSchema & VersionsReversed are errors
    • Which I don't understand this use case unless for newer versions its just nice to see the list of warnings.

This PR fixes:

  • Strict mode if set by OpenApiComparator.Compare overrides any manual settings by the version number
  • NoVersionChange was throwing when it wasnt accurate
  • Return BreakingChange status regardless of strict mode

Long term it may be nice to instead of having strict mode, allow an easier way to customize severity levels for all comparisons.
Along with this Severity could be expanded to have 0:Info, 1:Warning, 2:Breaking, 3:Error and maybe more levels.

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