RepreZen / KaiZen-OpenAPI-Editor

Eclipse Editor for the Swagger-OpenAPI Description Language
Eclipse Public License 1.0
115 stars 12 forks source link

shorter version format (1.0) produces unhelpful error message "number is not allowed, value should be of type string" #361

Open abstratt opened 7 years ago

abstratt commented 7 years ago

KaiZen-OpenAPI-Editor 0.8.0.201706092017

If I provide 1.2 as the value of the API version property, I get an unhelpful error message. "value of type number is not allowed, value should be of type string"

swagger: "2.0"
info:
  description: Tax Blaster
  version: 1.0
  title: TaxBlaster

Changing it to 1.0.0 avoids the error, apparently the third component is required or else the value is parsed as a number. Quotes avoid the issue. Maybe that is a YAML quirk, but maybe the editor can be more helpful.

tedepstein commented 7 years ago

@abstratt , I just noticed that we never replied to this issue. Thanks for reporting it, and sorry for the delay. I agree that the message could be more helpful. We're working to a prioritized plan right now, so it might be a while, but I expect we will address this.