Luracast / Restler-API-Explorer

Restler API Explorer is a tweaked version of Swagger UI, a dependency-free collection of HTML, Javascript, and CSS assets that dynamically generate beautiful documentation from a Swagger-compliant API.
http://luracast.com/products/restler/
94 stars 29 forks source link

Getting window.authorizations is undefined #4

Closed omarojo closed 10 years ago

omarojo commented 10 years ago

I get in Chrome Console: Uncaught ReferenceError: ApiKeyAuthorization is not defined
in Firefox Console: TypeError: window.authorizations is undefined

when trying to use window.authorizations.add("key", new ApiKeyAuthorization("api_key", key, "query"));

I actually want to use that for "header" instead of "query" because I want to add user & pwd input fields to be converted to base64 and sent via "Authorization: Basic" headers

Arul- commented 10 years ago

Are you trying the explorer against v3 branch of Restler?

omarojo commented 10 years ago

This is what I see in Restler.php file

So I guess, yes.. it is 3.0

Arul- commented 10 years ago

Both v3 branch and master branch are using version 3.0.0rc4

So it will be hard to tell by looking at the class files

If you have downloaded directly from github, which of the following links did you use?

  1. https://github.com/Luracast/Restler/archive/master.zip (master)
  2. https://github.com/Luracast/Restler/archive/v3.zip (v3)

Or if you are adding Restler as a dependency using composer

  1. "luracast/restler": "dev-master" (master)
  2. "luracast/restler": "3.*@dev" (v3)

In both cases you should be using master branch, then you will not see this problem

Arul- commented 10 years ago

Since I did not hear back from you, I assume this issue is resolved