Closed earth2marsh closed 9 years ago
The validator is intended for 2.0 only. The UI, for example, will not try to validate earlier versions.
That said, perhaps the error can be clearer. The badge is an interesting option (much like HTML and CSS validators).
so much to do! I do agree that the validator badge should be hidden or show something different if it's a 1.2 spec.
@earth2marsh how about if we show a badge that somehow, concisely says "this is an old swagger version, upgrade to 2.0" with a link to an upgrade page? Solves many problems.
Yes! I'm totally down with that. The problem is that the online validator works so well, that we should expect folks will try to use 1.2 specs, but then saying those are invalid isn't quite fair. @fehguy 's approach nicely kills two birds with one stone.
Finally found something you're not good at, @fehguy.
there's a long list
that's a lie
If a spec is submitted, but the version is not supported, then the debug information might explain that. (Even better, validating 1.2 would be great!)
Similarly, since submitting a valid 1.2 spec will always show an "Invalid" badge, that can be misleading. One design workaround might be to always show the version being validated, such as "Valid 2.0" or "Invalid 2.0". (Another approach could be to put the version number in the URL, though it might be ambiguous whether that's the version of the spec or the validator.)