Skip to content
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

Can internal refs validation be turned off? #435

Closed
AaronJan opened this issue Sep 5, 2017 · 4 comments
Closed

Can internal refs validation be turned off? #435

AaronJan opened this issue Sep 5, 2017 · 4 comments

Comments

@AaronJan
Copy link

AaronJan commented Sep 5, 2017

I wrote Kobe, that separated Definitions from swagger-php, but internal ref validation broken this design (because definitions are not in the Swagger object).

Currently I stay in 2.0.10 to avoid this (or I can ignore NOTICE log by overwrite $log in \Swagger\Logger), but I want to know if there are any good solution for this problem, like turn off validation by option, or something else.

Thanks!

@bfanger
Copy link
Collaborator

bfanger commented Sep 5, 2017

Are the definitions added later? then postpone the validation until the swagger object is complete.

Validation is hard-coded, if you'd want to convert it to a a pluggable/rule based validation.
I'd gladly merge that as a pull-request.

@AaronJan
Copy link
Author

AaronJan commented Sep 6, 2017

I'd be glad to do that.
Working on it.

@plimpton
Copy link

Yeah, this broke our docs page as well. It couldn't find the config.yml defined global definitions and had to revert to 2.0.10

@bfanger
Copy link
Collaborator

bfanger commented Aug 10, 2018

Closing due to inactivity.

Available workarounds:

  • Reimplement scan() and delay/skip the ->validate() call.
  • Correct the annotation-object-tree with a custom processor:
    Analysis::registerProcessor(new KobeProcessor())

@bfanger bfanger closed this as completed Aug 10, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants