New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

JSON::Validator::OpenAPI was removed #44

Closed
eserte opened this Issue Jan 6, 2019 · 5 comments

Comments

Projects
None yet
3 participants
@eserte
Copy link

eserte commented Jan 6, 2019

See https://metacpan.org/changes/distribution/JSON-Validator#L14 (FYI: @jhthorsen)

This means Yancy's test suite currently fails:

#   Failed test 'Mojolicious/Plugin/Yancy.pm loaded ok'
#   at t/00-compile.t line 53.
#          got: '512'
#     expected: '0'
Can't locate JSON/Validator/OpenAPI.pm in @INC (you may need to install the JSON::Validator::OpenAPI module) (@INC contains: ... .) at /home/cpansand/.cpan/build/2019010609/Yancy-1.020-1/blib/lib/Mojolicious/Plugin/Yancy.pm line 408.
BEGIN failed--compilation aborted at /home/cpansand/.cpan/build/2019010609/Yancy-1.020-1/blib/lib/Mojolicious/Plugin/Yancy.pm line 408.
Compilation failed in require at -e line 1.
# Looks like you failed 1 test of 10.
t/00-compile.t ............... 
Dubious, test returned 1 (wstat 256, 0x100)
Failed 1/10 subtests 
	(less 1 skipped subtest: 8 okay)
... (etc)...
@jhthorsen

This comment has been minimized.

Copy link

jhthorsen commented Jan 6, 2019

I'm not sure why M::P::Yancy use JSON::Validator::OpenAPI. There shouldn't be any reason to depend on that directly.

@mohawk2

This comment has been minimized.

Copy link
Contributor

mohawk2 commented Jan 7, 2019

Confirmed. This makes Yancy work correctly again:

cpanm JSON::Validator@2.19 Mojolicious::Plugin::OpenAPI@2.07
@mohawk2

This comment has been minimized.

Copy link
Contributor

mohawk2 commented Jan 7, 2019

I believe the manual use of JSON::Validator started as a solution to #13, which then switched to JSON::Validator::OpenAPI with 7e06ef8.

@mohawk2

This comment has been minimized.

Copy link
Contributor

mohawk2 commented Jan 7, 2019

The JV bug-fix on coercion has broken Yancy which also does a form of coercion. I believe I am on track to fix this.

@mohawk2

This comment has been minimized.

Copy link
Contributor

mohawk2 commented Jan 7, 2019

#45 ought to fix.

@preaction preaction closed this in #45 Jan 8, 2019

preaction added a commit that referenced this issue Jan 9, 2019

release v1.021
    [Added]

    - Added some more intelligent inferences about a configured OpenAPI
      spec to hook up the controller. In short: It's now easier to
      provide your own OpenAPI spec to work with the Yancy editor.
      Thanks @mohawk2 for continuing this work! [Github #43]

    [Fixed]

    - Fixed compatibility with JSON::Validator version 3. Thanks
      @mohawk2 for the patch! [Github #45] Thanks @eserte for the report
      [Github #44]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment