jhthorsen / json-validator

:cop: Validate data against a JSON schema
https://metacpan.org/release/JSON-Validator
56 stars 58 forks source link

loading schema from mojo app is not documented or tested #188

Closed karenetheridge closed 4 years ago

karenetheridge commented 4 years ago

I was going to submit a PR that tested this, but it sounds like you're refactoring this area, and a different decision might be best --

I noticed that the final section of _load_schema (where $self->ua->server->app is checked) is not covered by any unit tests, since Mojolicious::Plugin::OpenAPI was refactored out in commit bb11c70022a30 and t/load-from-app.t was removed.

These are the main choices (aside from doing nothing of course):

jhthorsen commented 4 years ago

I think there's more of these cases. It happened when I split the repos, so instead of figuring how to do the testing properly, I cheated by adding the https://github.com/mojolicious/json-validator/blob/master/run-all-tests.sh script.

What I'm trying to say is that this functionality is tested, but unfortunately not from J::V. Let's keep this issue open as a reminder to fix it when I do the refactoring again.