Permalink
Browse files

Merge branch 'master' of github.com:wordnik/swagger.js

  • Loading branch information...
2 parents adbccf9 + 7d0db86 commit 71468ef8bde15a438cabbb0faf437cd3fe57721e Will Fitzgerald committed Mar 31, 2012
Showing with 7 additions and 2 deletions.
  1. +2 −2 example.html
  2. +3 −0 lib/swagger.js
  3. +2 −0 src/swagger.coffee
View
@@ -4,10 +4,10 @@
<title>swagger.js example</title>
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.7.1/jquery.min.js"></script>
- <script type="text/javascript" src="https://raw.github.com/wordnik/swagger.js/blob/master/lib/swagger.js"></script>
+ <script type="text/javascript" src="https://raw.github.com/wordnik/swagger.js/master/lib/swagger.js"></script>
<script type="text/javascript">
$(function() {
- wordnik = new Api({
+ wordnik = new SwaggerApi({
api_key: 'a2a73e7b926c924fad7001ca3111acd55af2ffabf50eb4ae5', // sample wordnik API key
verbose: true,
success: function() {
View

Some generated files are not rendered by default. Learn more.

Oops, something went wrong.
View
@@ -21,6 +21,8 @@ class SwaggerApi
$.getJSON @discoveryUrl, (response) =>
@basePath = response.basePath
+ throw "discoveryUrl basePath must be a URL." unless @basePath.match(/^HTTP/i)?
+
# TODO: Take this out. It's an API regression.
@basePath = @basePath.replace(/\/$/, '')

0 comments on commit 71468ef

Please sign in to comment.