Closed sjn closed 6 years ago
Are you suggesting changing https://github.com/jhthorsen/json-validator/blob/2fc669e7c577c21fd0369d1332ca5560989ebab4/lib/JSON/Validator/OpenAPI.pm#L37 to the line below?
$self->schema->data->{info}{version} ||= $class->VERSION;
(I'm not going to change to dying)
I'm rejecting your proposal, but closing this with https://github.com/jhthorsen/json-validator/commit/fd20ff7a6e9b620ed99b9ae80a3ca03e0fd0c9dc
I think that will make both of us happy.
Hei!
The "version_from_class" config currently defaults to the current app's version. While that's a less-than-horrible option (and useful during early development), wouldn't it be better if the plugin just died with an error message if info.version isn't set in the spec file? An API version number lives a different life than a module version number, and usually doesn't change at the same time as the API (which is expected to be stable).
Just a thought. :)