Skip to content
This repository has been archived by the owner on Jun 9, 2019. It is now read-only.

Explorer not showing when using useUrlBasedVersioning and AuthenitcationClass - 200 : OK ../resources.json #16

Open
codemonkeyneo opened this issue Feb 24, 2015 · 2 comments

Comments

@codemonkeyneo
Copy link

This one is driving me nuts and maybe its just me, but at least I can recreate the issue.

Explorer is giving me the following error;

200 : OK ../resources.json

I have worked out that its because of Authenitcation class and set useUrlBasedVersioning both included in the index.php. If you try each of the items separately then explorer works as expected. I do want both to work so I can show both versions in explorer.

Code used

Defaults::$useUrlBasedVersioning = true;  // comment out to work and leave auth line

$r = new Restler();
$r->setAPIVersion(2);
$r->setSupportedFormats('JsonFormat', 'XmlFormat');

$r->addApiClass('Resources'); // this produces the needed resources.json

$r->addAPIClass('BMI');
$r->addAuthenticationClass('SimpleAuth'); // comment out to work and leave url line
$r->handle();

is this a bug or does it need to be refactored differently.

Cheer

Codemonkeyneo

@Arul-
Copy link
Member

Arul- commented Feb 24, 2015

Thanks for giving some sample code which will make it easy to reproduce the error, will check it ASAP

@codemonkeyneo
Copy link
Author

Possible solved my issue but not sure its correct way.

I have had to add the SimpleAuth class into a seperate version folder.... guess this could get messy ?

Is it possible to just have one auth class for all versions ?

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants