swagger_ui_generator 0.0.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (104) hide show
  1. checksums.yaml +7 -0
  2. data/.gitignore +19 -0
  3. data/Gemfile +4 -0
  4. data/LICENSE.txt +22 -0
  5. data/README.md +69 -0
  6. data/Rakefile +23 -0
  7. data/lib/generators/swagger_ui_generator/install/install_generator.rb +22 -0
  8. data/lib/generators/swagger_ui_generator/install/templates/public/api-docs.html.erb +73 -0
  9. data/lib/generators/swagger_ui_generator/install/templates/public/swagger/css/highlight.default.css +135 -0
  10. data/lib/generators/swagger_ui_generator/install/templates/public/swagger/css/screen.css +1070 -0
  11. data/lib/generators/swagger_ui_generator/install/templates/public/swagger/lib/backbone-min.js +38 -0
  12. data/lib/generators/swagger_ui_generator/install/templates/public/swagger/lib/handlebars-1.0.0.js +2278 -0
  13. data/lib/generators/swagger_ui_generator/install/templates/public/swagger/lib/highlight.7.3.pack.js +1 -0
  14. data/lib/generators/swagger_ui_generator/install/templates/public/swagger/lib/jquery-1.8.0.min.js +2 -0
  15. data/lib/generators/swagger_ui_generator/install/templates/public/swagger/lib/jquery.ba-bbq.min.js +18 -0
  16. data/lib/generators/swagger_ui_generator/install/templates/public/swagger/lib/jquery.slideto.min.js +1 -0
  17. data/lib/generators/swagger_ui_generator/install/templates/public/swagger/lib/jquery.wiggle.min.js +8 -0
  18. data/lib/generators/swagger_ui_generator/install/templates/public/swagger/lib/shred.bundle.js +2765 -0
  19. data/lib/generators/swagger_ui_generator/install/templates/public/swagger/lib/shred/content.js +193 -0
  20. data/lib/generators/swagger_ui_generator/install/templates/public/swagger/lib/swagger.js +1311 -0
  21. data/lib/generators/swagger_ui_generator/install/templates/public/swagger/lib/underscore-min.js +32 -0
  22. data/lib/generators/swagger_ui_generator/install/templates/public/swagger/swagger-ui.js +2129 -0
  23. data/lib/generators/swagger_ui_generator/install/templates/public/swagger/throbber.gif +0 -0
  24. data/lib/swagger_ui_generator.rb +5 -0
  25. data/lib/swagger_ui_generator/importer.rb +97 -0
  26. data/lib/swagger_ui_generator/version.rb +3 -0
  27. data/swagger_ui_generator.gemspec +28 -0
  28. data/test/lib/generators/swagger_ui_generator/install_generator_test.rb +73 -0
  29. data/test/test_helper.rb +19 -0
  30. data/vendor/swagger-ui/.gitignore +22 -0
  31. data/vendor/swagger-ui/.npmignore +7 -0
  32. data/vendor/swagger-ui/Cakefile +132 -0
  33. data/vendor/swagger-ui/README.md +110 -0
  34. data/vendor/swagger-ui/dist/css/highlight.default.css +135 -0
  35. data/vendor/swagger-ui/dist/css/screen.css +1070 -0
  36. data/vendor/swagger-ui/dist/images/logo_small.png +0 -0
  37. data/vendor/swagger-ui/dist/images/pet_store_api.png +0 -0
  38. data/vendor/swagger-ui/dist/images/throbber.gif +0 -0
  39. data/vendor/swagger-ui/dist/images/wordnik_api.png +0 -0
  40. data/vendor/swagger-ui/dist/index.html +78 -0
  41. data/vendor/swagger-ui/dist/lib/backbone-min.js +38 -0
  42. data/vendor/swagger-ui/dist/lib/handlebars-1.0.0.js +2278 -0
  43. data/vendor/swagger-ui/dist/lib/highlight.7.3.pack.js +1 -0
  44. data/vendor/swagger-ui/dist/lib/jquery-1.8.0.min.js +2 -0
  45. data/vendor/swagger-ui/dist/lib/jquery.ba-bbq.min.js +18 -0
  46. data/vendor/swagger-ui/dist/lib/jquery.slideto.min.js +1 -0
  47. data/vendor/swagger-ui/dist/lib/jquery.wiggle.min.js +8 -0
  48. data/vendor/swagger-ui/dist/lib/shred.bundle.js +2765 -0
  49. data/vendor/swagger-ui/dist/lib/shred/content.js +193 -0
  50. data/vendor/swagger-ui/dist/lib/swagger.js +1311 -0
  51. data/vendor/swagger-ui/dist/lib/underscore-min.js +32 -0
  52. data/vendor/swagger-ui/dist/swagger-ui.js +2129 -0
  53. data/vendor/swagger-ui/dist/swagger-ui.min.js +1 -0
  54. data/vendor/swagger-ui/lib/backbone-min.js +38 -0
  55. data/vendor/swagger-ui/lib/handlebars-1.0.0.js +2278 -0
  56. data/vendor/swagger-ui/lib/highlight.7.3.pack.js +1 -0
  57. data/vendor/swagger-ui/lib/jquery-1.8.0.min.js +2 -0
  58. data/vendor/swagger-ui/lib/jquery.ba-bbq.min.js +18 -0
  59. data/vendor/swagger-ui/lib/jquery.slideto.min.js +1 -0
  60. data/vendor/swagger-ui/lib/jquery.wiggle.min.js +8 -0
  61. data/vendor/swagger-ui/lib/shred.bundle.js +2765 -0
  62. data/vendor/swagger-ui/lib/shred/content.js +193 -0
  63. data/vendor/swagger-ui/lib/swagger.js +1311 -0
  64. data/vendor/swagger-ui/lib/underscore-min.js +32 -0
  65. data/vendor/swagger-ui/package.json +26 -0
  66. data/vendor/swagger-ui/src/main/coffeescript/SwaggerUi.coffee +101 -0
  67. data/vendor/swagger-ui/src/main/coffeescript/view/ContentTypeView.coffee +14 -0
  68. data/vendor/swagger-ui/src/main/coffeescript/view/HeaderView.coffee +37 -0
  69. data/vendor/swagger-ui/src/main/coffeescript/view/MainView.coffee +18 -0
  70. data/vendor/swagger-ui/src/main/coffeescript/view/OperationView.coffee +318 -0
  71. data/vendor/swagger-ui/src/main/coffeescript/view/ParameterContentTypeView.coffee +14 -0
  72. data/vendor/swagger-ui/src/main/coffeescript/view/ParameterView.coffee +57 -0
  73. data/vendor/swagger-ui/src/main/coffeescript/view/ResourceView.coffee +21 -0
  74. data/vendor/swagger-ui/src/main/coffeescript/view/ResponseContentTypeView.coffee +14 -0
  75. data/vendor/swagger-ui/src/main/coffeescript/view/SignatureView.coffee +51 -0
  76. data/vendor/swagger-ui/src/main/coffeescript/view/StatusCodeView.coffee +11 -0
  77. data/vendor/swagger-ui/src/main/html/css/highlight.default.css +135 -0
  78. data/vendor/swagger-ui/src/main/html/css/screen.css +1070 -0
  79. data/vendor/swagger-ui/src/main/html/images/logo_small.png +0 -0
  80. data/vendor/swagger-ui/src/main/html/images/pet_store_api.png +0 -0
  81. data/vendor/swagger-ui/src/main/html/images/throbber.gif +0 -0
  82. data/vendor/swagger-ui/src/main/html/images/wordnik_api.png +0 -0
  83. data/vendor/swagger-ui/src/main/html/index.html +78 -0
  84. data/vendor/swagger-ui/src/main/javascript/doc.js +184 -0
  85. data/vendor/swagger-ui/src/main/less/reset.less +50 -0
  86. data/vendor/swagger-ui/src/main/less/screen.less +67 -0
  87. data/vendor/swagger-ui/src/main/less/specs.less +1004 -0
  88. data/vendor/swagger-ui/src/main/template/content_type.handlebars +10 -0
  89. data/vendor/swagger-ui/src/main/template/main.handlebars +22 -0
  90. data/vendor/swagger-ui/src/main/template/operation.handlebars +85 -0
  91. data/vendor/swagger-ui/src/main/template/param.handlebars +30 -0
  92. data/vendor/swagger-ui/src/main/template/param_list.handlebars +25 -0
  93. data/vendor/swagger-ui/src/main/template/param_readonly.handlebars +15 -0
  94. data/vendor/swagger-ui/src/main/template/param_readonly_required.handlebars +15 -0
  95. data/vendor/swagger-ui/src/main/template/param_required.handlebars +31 -0
  96. data/vendor/swagger-ui/src/main/template/parameter_content_type.handlebars +10 -0
  97. data/vendor/swagger-ui/src/main/template/resource.handlebars +27 -0
  98. data/vendor/swagger-ui/src/main/template/response_content_type.handlebars +10 -0
  99. data/vendor/swagger-ui/src/main/template/signature.handlebars +18 -0
  100. data/vendor/swagger-ui/src/main/template/status_code.handlebars +2 -0
  101. data/vendor/swagger-ui/src/test/spec.html +26 -0
  102. data/vendor/swagger-ui/src/test/swagger-ui-spec.coffee +49 -0
  103. data/vendor/swagger-ui/swagger-ui.json +20 -0
  104. metadata +240 -0
@@ -0,0 +1,10 @@
1
+ <label for="contentType"></label>
2
+ <select name="contentType">
3
+ {{#if produces}}
4
+ {{#each produces}}
5
+ <option value="{{{this}}}">{{{this}}}</option>
6
+ {{/each}}
7
+ {{else}}
8
+ <option value="application/json">application/json</option>
9
+ {{/if}}
10
+ </select>
@@ -0,0 +1,22 @@
1
+ <div class='info' id='api_info'>
2
+ {{#if info}}
3
+ <div class="info_title">{{info.title}}</div>
4
+ <div class="info_description">{{{info.description}}}</div>
5
+ {{#if info.termsOfServiceUrl}}<div class="info_tos"><a href="{{info.termsOfServiceUrl}}">Terms of service</a></div>{{/if}}
6
+ {{#if info.contact}}<div class='info_contact'><a href="mailto:{{info.contact}}">Contact the developer</a></div>{{/if}}
7
+ {{#if info.license}}<div class='info_license'><a href='{{info.licenseUrl}}'>{{info.license}}</a></div>{{/if}}
8
+ {{/if}}
9
+ </div>
10
+ <div class='container' id='resources_container'>
11
+ <ul id='resources'>
12
+ </ul>
13
+
14
+ <div class="footer">
15
+ <br>
16
+ <br>
17
+ <h4 style="color: #999">[ <span style="font-variant: small-caps">base url</span>: {{basePath}}
18
+ {{#if apiVersion}}
19
+ , <span style="font-variant: small-caps">api version</span>: {{apiVersion}}
20
+ {{/if}}]</h4>
21
+ </div>
22
+ </div>
@@ -0,0 +1,85 @@
1
+
2
+ <ul class='operations' >
3
+ <li class='{{method}} operation' id='{{resourceName}}_{{nickname}}_{{method}}_{{number}}'>
4
+ <div class='heading'>
5
+ <h3>
6
+ <span class='http_method'>
7
+ <a href='#!/{{resourceName}}/{{nickname}}_{{method}}_{{number}}' class="toggleOperation">{{method}}</a>
8
+ </span>
9
+ <span class='path'>
10
+ <a href='#!/{{resourceName}}/{{nickname}}_{{method}}_{{number}}' class="toggleOperation">{{path}}</a>
11
+ </span>
12
+ </h3>
13
+ <ul class='options'>
14
+ <li>
15
+ <a href='#!/{{resourceName}}/{{nickname}}_{{method}}_{{number}}' class="toggleOperation">{{{summary}}}</a>
16
+ </li>
17
+ </ul>
18
+ </div>
19
+ <div class='content' id='{{resourceName}}_{{nickname}}_{{method}}_{{number}}_content' style='display:none'>
20
+ {{#if notes}}
21
+ <h4>Implementation Notes</h4>
22
+ <p>{{{notes}}}</p>
23
+ {{/if}}
24
+ {{#if type}}
25
+ <h4>Response Class</h4>
26
+ <p><span class="model-signature" /></p>
27
+ <br/>
28
+ <div class="response-content-type" />
29
+ {{/if}}
30
+ <form accept-charset='UTF-8' class='sandbox'>
31
+ <div style='margin:0;padding:0;display:inline'></div>
32
+ {{#if parameters}}
33
+ <h4>Parameters</h4>
34
+ <table class='fullwidth'>
35
+ <thead>
36
+ <tr>
37
+ <th style="width: 100px; max-width: 100px">Parameter</th>
38
+ <th style="width: 310px; max-width: 310px">Value</th>
39
+ <th style="width: 200px; max-width: 200px">Description</th>
40
+ <th style="width: 100px; max-width: 100px">Parameter Type</th>
41
+ <th style="width: 220px; max-width: 230px">Data Type</th>
42
+ </tr>
43
+ </thead>
44
+ <tbody class="operation-params">
45
+
46
+ </tbody>
47
+ </table>
48
+ {{/if}}
49
+ {{#if responseMessages}}
50
+ <div style='margin:0;padding:0;display:inline'></div>
51
+ <h4>Error Status Codes</h4>
52
+ <table class='fullwidth'>
53
+ <thead>
54
+ <tr>
55
+ <th>HTTP Status Code</th>
56
+ <th>Reason</th>
57
+ </tr>
58
+ </thead>
59
+ <tbody class="operation-status">
60
+
61
+ </tbody>
62
+ </table>
63
+ {{/if}}
64
+ {{#if isReadOnly}}
65
+ {{else}}
66
+ <div class='sandbox_header'>
67
+ <input class='submit' name='commit' type='button' value='Try it out!' />
68
+ <a href='#' class='response_hider' style='display:none'>Hide Response</a>
69
+ <img alt='Throbber' class='response_throbber' src='images/throbber.gif' style='display:none' />
70
+ </div>
71
+ {{/if}}
72
+ </form>
73
+ <div class='response' style='display:none'>
74
+ <h4>Request URL</h4>
75
+ <div class='block request_url'></div>
76
+ <h4>Response Body</h4>
77
+ <div class='block response_body'></div>
78
+ <h4>Response Code</h4>
79
+ <div class='block response_code'></div>
80
+ <h4>Response Headers</h4>
81
+ <div class='block response_headers'></div>
82
+ </div>
83
+ </div>
84
+ </li>
85
+ </ul>
@@ -0,0 +1,30 @@
1
+ <td class='code'>{{name}}</td>
2
+ <td>
3
+
4
+ {{#if isBody}}
5
+ {{#if isFile}}
6
+ <input type="file" name='{{name}}'/>
7
+ <div class="parameter-content-type" />
8
+ {{else}}
9
+ {{#if defaultValue}}
10
+ <textarea class='body-textarea' name='{{name}}'>{{defaultValue}}</textarea>
11
+ {{else}}
12
+ <textarea class='body-textarea' name='{{name}}'></textarea>
13
+ <br />
14
+ <div class="parameter-content-type" />
15
+ {{/if}}
16
+ {{/if}}
17
+ {{else}}
18
+ {{#if defaultValue}}
19
+ <input class='parameter' minlength='0' name='{{name}}' placeholder='' type='text' value='{{defaultValue}}'/>
20
+ {{else}}
21
+ <input class='parameter' minlength='0' name='{{name}}' placeholder='' type='text' value=''/>
22
+ {{/if}}
23
+ {{/if}}
24
+
25
+ </td>
26
+ <td>{{{description}}}</td>
27
+ <td>{{{paramType}}}</td>
28
+ <td>
29
+ <span class="model-signature"></span>
30
+ </td>
@@ -0,0 +1,25 @@
1
+ <td class='code'>{{name}}</td>
2
+ <td>
3
+ <select {{#if allowMultiple}} multiple='multiple'{{/if}} class='parameter' name='{{name}}'>
4
+ {{#if required}}
5
+ {{else}}
6
+ {{#if defaultValue}}
7
+ {{else}}
8
+ {{#if allowMultiple}}
9
+ {{else}}
10
+ <option selected="" value=''></option>
11
+ {{/if}}
12
+ {{/if}}
13
+ {{/if}}
14
+ {{#each allowableValues.descriptiveValues}}
15
+ {{#if isDefault}}
16
+ <option selected="" value='{{value}}'>{{value}} (default)</option>
17
+ {{else}}
18
+ <option value='{{value}}'>{{value}}</option>
19
+ {{/if}}
20
+ {{/each}}
21
+ </select>
22
+ </td>
23
+ <td>{{{description}}}</td>
24
+ <td>{{{paramType}}}</td>
25
+ <td><span class="model-signature"></span></td>
@@ -0,0 +1,15 @@
1
+ <td class='code'>{{name}}</td>
2
+ <td>
3
+ {{#if isBody}}
4
+ <textarea class='body-textarea' readonly='readonly' name='{{name}}'>{{defaultValue}}</textarea>
5
+ {{else}}
6
+ {{#if defaultValue}}
7
+ {{defaultValue}}
8
+ {{else}}
9
+ (empty)
10
+ {{/if}}
11
+ {{/if}}
12
+ </td>
13
+ <td>{{{description}}}</td>
14
+ <td>{{{paramType}}}</td>
15
+ <td><span class="model-signature"></span></td>
@@ -0,0 +1,15 @@
1
+ <td class='code required'>{{name}}</td>
2
+ <td>
3
+ {{#if isBody}}
4
+ <textarea class='body-textarea' readonly='readonly' placeholder='(required)' name='{{name}}'>{{defaultValue}}</textarea>
5
+ {{else}}
6
+ {{#if defaultValue}}
7
+ {{defaultValue}}
8
+ {{else}}
9
+ (empty)
10
+ {{/if}}
11
+ {{/if}}
12
+ </td>
13
+ <td>{{{description}}}</td>
14
+ <td>{{{paramType}}}</td>
15
+ <td><span class="model-signature"></span></td>
@@ -0,0 +1,31 @@
1
+ <td class='code required'>{{name}}</td>
2
+ <td>
3
+ {{#if isBody}}
4
+ {{#if isFile}}
5
+ <input type="file" name='{{name}}'/>
6
+ {{else}}
7
+ {{#if defaultValue}}
8
+ <textarea class='body-textarea' placeholder='(required)' name='{{name}}'>{{defaultValue}}</textarea>
9
+ {{else}}
10
+ <textarea class='body-textarea' placeholder='(required)' name='{{name}}'></textarea>
11
+ <br />
12
+ <div class="parameter-content-type" />
13
+ {{/if}}
14
+ {{/if}}
15
+ {{else}}
16
+ {{#if isFile}}
17
+ <input class='parameter' class='required' type='file' name='{{name}}'/>
18
+ {{else}}
19
+ {{#if defaultValue}}
20
+ <input class='parameter required' minlength='1' name='{{name}}' placeholder='(required)' type='text' value='{{defaultValue}}'/>
21
+ {{else}}
22
+ <input class='parameter required' minlength='1' name='{{name}}' placeholder='(required)' type='text' value=''/>
23
+ {{/if}}
24
+ {{/if}}
25
+ {{/if}}
26
+ </td>
27
+ <td>
28
+ <strong>{{{description}}}</strong>
29
+ </td>
30
+ <td>{{{paramType}}}</td>
31
+ <td><span class="model-signature"></span></td>
@@ -0,0 +1,10 @@
1
+ <label for="parameterContentType"></label>
2
+ <select name="parameterContentType">
3
+ {{#if consumes}}
4
+ {{#each consumes}}
5
+ <option value="{{{this}}}">{{{this}}}</option>
6
+ {{/each}}
7
+ {{else}}
8
+ <option value="application/json">application/json</option>
9
+ {{/if}}
10
+ </select>
@@ -0,0 +1,27 @@
1
+ <div class='heading'>
2
+ <h2>
3
+ <a href='#!/{{name}}' onclick="Docs.toggleEndpointListForResource('{{name}}');">{{name}}</a> {{#description}} : {{/description}}{{{description}}}
4
+ </h2>
5
+ <ul class='options'>
6
+ <li>
7
+ <a href='#!/{{name}}' id='endpointListTogger_{{name}}'
8
+ onclick="Docs.toggleEndpointListForResource('{{name}}');">Show/Hide</a>
9
+ </li>
10
+ <li>
11
+ <a href='#' onclick="Docs.collapseOperationsForResource('{{name}}'); return false;">
12
+ List Operations
13
+ </a>
14
+ </li>
15
+ <li>
16
+ <a href='#' onclick="Docs.expandOperationsForResource('{{name}}'); return false;">
17
+ Expand Operations
18
+ </a>
19
+ </li>
20
+ <li>
21
+ <a href='{{url}}'>Raw</a>
22
+ </li>
23
+ </ul>
24
+ </div>
25
+ <ul class='endpoints' id='{{name}}_endpoint_list' style='display:none'>
26
+
27
+ </ul>
@@ -0,0 +1,10 @@
1
+ <label for="responseContentType"></label>
2
+ <select name="responseContentType">
3
+ {{#if produces}}
4
+ {{#each produces}}
5
+ <option value="{{{this}}}">{{{this}}}</option>
6
+ {{/each}}
7
+ {{else}}
8
+ <option value="application/json">application/json</option>
9
+ {{/if}}
10
+ </select>
@@ -0,0 +1,18 @@
1
+ <div>
2
+ <ul class="signature-nav">
3
+ <li><a class="description-link" href="#">Model</a></li>
4
+ <li><a class="snippet-link" href="#">Model Schema</a></li>
5
+ </ul>
6
+ <div>
7
+
8
+ <div class="signature-container">
9
+ <div class="description">
10
+ {{{signature}}}
11
+ </div>
12
+
13
+ <div class="snippet">
14
+ <pre><code>{{sampleJSON}}</code></pre>
15
+ <small class="notice"></small>
16
+ </div>
17
+ </div>
18
+
@@ -0,0 +1,2 @@
1
+ <td width='15%' class='code'>{{code}}</td>
2
+ <td>{{{message}}}</td>
@@ -0,0 +1,26 @@
1
+ <!DOCTYPE HTML>
2
+ <head>
3
+ <title>swagger-ui specs</title>
4
+ <link rel="stylesheet" type="text/css" href="../../lib/jasmine-1.1.0/jasmine.css">
5
+
6
+ <script src="http://code.jquery.com/jquery.min.js"></script>
7
+ <script type="text/javascript" src="../../lib/jasmine-1.1.0/jasmine.js"></script>
8
+ <script type="text/javascript" src="../../lib/jasmine-1.1.0/jasmine-html.js"></script>
9
+
10
+ <!-- source first, then spec -->
11
+ <script type="text/javascript" src="../../lib/swagger-ui.js"></script>
12
+ <script type="text/javascript" src="../../lib/swagger-ui-spec.js"></script>
13
+ </head>
14
+ <body>
15
+ <script type="text/javascript">
16
+ $(function() {
17
+ jasmine.getEnv().addReporter(new jasmine.TrivialReporter());
18
+ jasmine.getEnv().execute();
19
+ });
20
+ </script>
21
+
22
+ <div id="swagger_ui"></div>
23
+
24
+ </body>
25
+
26
+ </html>
@@ -0,0 +1,49 @@
1
+ window.url = "http://api.wordnik.com/v4/resources.json"
2
+
3
+ describe 'SwaggerUi', ->
4
+
5
+ describe 'constructor', ->
6
+
7
+ beforeEach ->
8
+ window.ui = new SwaggerUi
9
+ api_key: window.api_key
10
+ url: window.url
11
+ waitsFor ->
12
+ ui.ready
13
+
14
+ it "sets a `ready` property when the API is ready", ->
15
+ runs ->
16
+ expect(ui.ready).toBe(true)
17
+
18
+ it "has access to the precompiled Handlebars template", ->
19
+ runs ->
20
+ expect(Handlebars.templates['template.html']).toBeDefined()
21
+
22
+ describe 'DOM container', ->
23
+
24
+ afterEach ->
25
+ $("#swagger_ui").remove()
26
+
27
+ it "renders to default DOM container if it exists", ->
28
+ window.ui = new SwaggerUi
29
+ waitsFor ->
30
+ ui.ready
31
+ runs ->
32
+ expect($("#swagger_ui").length).toBe(1)
33
+
34
+ it "creates default DOM container if it doesn't exist", ->
35
+ expect($("#swagger_ui").length).toBe(0)
36
+ window.ui = new SwaggerUi
37
+ waitsFor ->
38
+ ui.ready
39
+ runs ->
40
+ expect($("#swagger_ui").length).toBe(1)
41
+
42
+ it "allows an alternate DOM container to be specified when initialized", ->
43
+ expect($("#swagger_ui").length).toBe(0)
44
+ window.ui = new SwaggerUi
45
+ dom_id: 'zhwagger'
46
+ waitsFor ->
47
+ ui.ready
48
+ runs ->
49
+ expect($("#zhwagger").length).toBe(1)
@@ -0,0 +1,20 @@
1
+ {
2
+ "folders":
3
+ [
4
+ {
5
+ "path": ".",
6
+ "folder_exclude_patterns": ["dist", "node_modules", "lib"]
7
+ }
8
+ ],
9
+ "settings":
10
+ {
11
+ "file_exclude_patterns": ["swagger-ui.sublime-workspace"]
12
+ },
13
+ "build_systems":
14
+ [
15
+ {
16
+ "name": "List",
17
+ "cmd": ["ls"]
18
+ }
19
+ ]
20
+ }
metadata ADDED
@@ -0,0 +1,240 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: swagger_ui_generator
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.0.1
5
+ platform: ruby
6
+ authors:
7
+ - Solomon White
8
+ autorequire:
9
+ bindir: bin
10
+ cert_chain: []
11
+ date: 2014-02-19 00:00:00.000000000 Z
12
+ dependencies:
13
+ - !ruby/object:Gem::Dependency
14
+ name: bundler
15
+ requirement: !ruby/object:Gem::Requirement
16
+ requirements:
17
+ - - "~>"
18
+ - !ruby/object:Gem::Version
19
+ version: '1.5'
20
+ type: :development
21
+ prerelease: false
22
+ version_requirements: !ruby/object:Gem::Requirement
23
+ requirements:
24
+ - - "~>"
25
+ - !ruby/object:Gem::Version
26
+ version: '1.5'
27
+ - !ruby/object:Gem::Dependency
28
+ name: pry-nav
29
+ requirement: !ruby/object:Gem::Requirement
30
+ requirements:
31
+ - - ">="
32
+ - !ruby/object:Gem::Version
33
+ version: '0'
34
+ type: :development
35
+ prerelease: false
36
+ version_requirements: !ruby/object:Gem::Requirement
37
+ requirements:
38
+ - - ">="
39
+ - !ruby/object:Gem::Version
40
+ version: '0'
41
+ - !ruby/object:Gem::Dependency
42
+ name: rake
43
+ requirement: !ruby/object:Gem::Requirement
44
+ requirements:
45
+ - - ">="
46
+ - !ruby/object:Gem::Version
47
+ version: '0'
48
+ type: :development
49
+ prerelease: false
50
+ version_requirements: !ruby/object:Gem::Requirement
51
+ requirements:
52
+ - - ">="
53
+ - !ruby/object:Gem::Version
54
+ version: '0'
55
+ - !ruby/object:Gem::Dependency
56
+ name: rails
57
+ requirement: !ruby/object:Gem::Requirement
58
+ requirements:
59
+ - - ">="
60
+ - !ruby/object:Gem::Version
61
+ version: '3.1'
62
+ type: :development
63
+ prerelease: false
64
+ version_requirements: !ruby/object:Gem::Requirement
65
+ requirements:
66
+ - - ">="
67
+ - !ruby/object:Gem::Version
68
+ version: '3.1'
69
+ - !ruby/object:Gem::Dependency
70
+ name: railties
71
+ requirement: !ruby/object:Gem::Requirement
72
+ requirements:
73
+ - - ">="
74
+ - !ruby/object:Gem::Version
75
+ version: '3.1'
76
+ type: :runtime
77
+ prerelease: false
78
+ version_requirements: !ruby/object:Gem::Requirement
79
+ requirements:
80
+ - - ">="
81
+ - !ruby/object:Gem::Version
82
+ version: '3.1'
83
+ - !ruby/object:Gem::Dependency
84
+ name: nokogiri
85
+ requirement: !ruby/object:Gem::Requirement
86
+ requirements:
87
+ - - ">="
88
+ - !ruby/object:Gem::Version
89
+ version: '0'
90
+ type: :runtime
91
+ prerelease: false
92
+ version_requirements: !ruby/object:Gem::Requirement
93
+ requirements:
94
+ - - ">="
95
+ - !ruby/object:Gem::Version
96
+ version: '0'
97
+ description: Rails generator to build Swagger UI API doc viewer
98
+ email:
99
+ - rubysolo@gmail.com
100
+ executables: []
101
+ extensions: []
102
+ extra_rdoc_files: []
103
+ files:
104
+ - ".gitignore"
105
+ - Gemfile
106
+ - LICENSE.txt
107
+ - README.md
108
+ - Rakefile
109
+ - lib/generators/swagger_ui_generator/install/install_generator.rb
110
+ - lib/generators/swagger_ui_generator/install/templates/public/api-docs.html.erb
111
+ - lib/generators/swagger_ui_generator/install/templates/public/swagger/css/highlight.default.css
112
+ - lib/generators/swagger_ui_generator/install/templates/public/swagger/css/screen.css
113
+ - lib/generators/swagger_ui_generator/install/templates/public/swagger/lib/backbone-min.js
114
+ - lib/generators/swagger_ui_generator/install/templates/public/swagger/lib/handlebars-1.0.0.js
115
+ - lib/generators/swagger_ui_generator/install/templates/public/swagger/lib/highlight.7.3.pack.js
116
+ - lib/generators/swagger_ui_generator/install/templates/public/swagger/lib/jquery-1.8.0.min.js
117
+ - lib/generators/swagger_ui_generator/install/templates/public/swagger/lib/jquery.ba-bbq.min.js
118
+ - lib/generators/swagger_ui_generator/install/templates/public/swagger/lib/jquery.slideto.min.js
119
+ - lib/generators/swagger_ui_generator/install/templates/public/swagger/lib/jquery.wiggle.min.js
120
+ - lib/generators/swagger_ui_generator/install/templates/public/swagger/lib/shred.bundle.js
121
+ - lib/generators/swagger_ui_generator/install/templates/public/swagger/lib/shred/content.js
122
+ - lib/generators/swagger_ui_generator/install/templates/public/swagger/lib/swagger.js
123
+ - lib/generators/swagger_ui_generator/install/templates/public/swagger/lib/underscore-min.js
124
+ - lib/generators/swagger_ui_generator/install/templates/public/swagger/swagger-ui.js
125
+ - lib/generators/swagger_ui_generator/install/templates/public/swagger/throbber.gif
126
+ - lib/swagger_ui_generator.rb
127
+ - lib/swagger_ui_generator/importer.rb
128
+ - lib/swagger_ui_generator/version.rb
129
+ - swagger_ui_generator.gemspec
130
+ - test/lib/generators/swagger_ui_generator/install_generator_test.rb
131
+ - test/test_helper.rb
132
+ - vendor/swagger-ui/.gitignore
133
+ - vendor/swagger-ui/.npmignore
134
+ - vendor/swagger-ui/Cakefile
135
+ - vendor/swagger-ui/README.md
136
+ - vendor/swagger-ui/bin/CoffeeScript.png
137
+ - vendor/swagger-ui/bin/jasmine-1.1.0/MIT.LICENSE
138
+ - vendor/swagger-ui/bin/jasmine-1.1.0/jasmine-html.js
139
+ - vendor/swagger-ui/bin/jasmine-1.1.0/jasmine.css
140
+ - vendor/swagger-ui/bin/jasmine-1.1.0/jasmine.js
141
+ - vendor/swagger-ui/bin/jasmine-1.1.0/jasmine.sass
142
+ - vendor/swagger-ui/bin/jasmine-1.1.0/jasmine_favicon.png
143
+ - vendor/swagger-ui/bin/yuicompressor-2.4.7.jar
144
+ - vendor/swagger-ui/dist/css/highlight.default.css
145
+ - vendor/swagger-ui/dist/css/screen.css
146
+ - vendor/swagger-ui/dist/images/logo_small.png
147
+ - vendor/swagger-ui/dist/images/pet_store_api.png
148
+ - vendor/swagger-ui/dist/images/throbber.gif
149
+ - vendor/swagger-ui/dist/images/wordnik_api.png
150
+ - vendor/swagger-ui/dist/index.html
151
+ - vendor/swagger-ui/dist/lib/backbone-min.js
152
+ - vendor/swagger-ui/dist/lib/handlebars-1.0.0.js
153
+ - vendor/swagger-ui/dist/lib/highlight.7.3.pack.js
154
+ - vendor/swagger-ui/dist/lib/jquery-1.8.0.min.js
155
+ - vendor/swagger-ui/dist/lib/jquery.ba-bbq.min.js
156
+ - vendor/swagger-ui/dist/lib/jquery.slideto.min.js
157
+ - vendor/swagger-ui/dist/lib/jquery.wiggle.min.js
158
+ - vendor/swagger-ui/dist/lib/shred.bundle.js
159
+ - vendor/swagger-ui/dist/lib/shred/content.js
160
+ - vendor/swagger-ui/dist/lib/swagger.js
161
+ - vendor/swagger-ui/dist/lib/underscore-min.js
162
+ - vendor/swagger-ui/dist/swagger-ui.js
163
+ - vendor/swagger-ui/dist/swagger-ui.min.js
164
+ - vendor/swagger-ui/lib/backbone-min.js
165
+ - vendor/swagger-ui/lib/handlebars-1.0.0.js
166
+ - vendor/swagger-ui/lib/highlight.7.3.pack.js
167
+ - vendor/swagger-ui/lib/jquery-1.8.0.min.js
168
+ - vendor/swagger-ui/lib/jquery.ba-bbq.min.js
169
+ - vendor/swagger-ui/lib/jquery.slideto.min.js
170
+ - vendor/swagger-ui/lib/jquery.wiggle.min.js
171
+ - vendor/swagger-ui/lib/shred.bundle.js
172
+ - vendor/swagger-ui/lib/shred/content.js
173
+ - vendor/swagger-ui/lib/swagger.js
174
+ - vendor/swagger-ui/lib/underscore-min.js
175
+ - vendor/swagger-ui/package.json
176
+ - vendor/swagger-ui/src/main/coffeescript/SwaggerUi.coffee
177
+ - vendor/swagger-ui/src/main/coffeescript/view/ContentTypeView.coffee
178
+ - vendor/swagger-ui/src/main/coffeescript/view/HeaderView.coffee
179
+ - vendor/swagger-ui/src/main/coffeescript/view/MainView.coffee
180
+ - vendor/swagger-ui/src/main/coffeescript/view/OperationView.coffee
181
+ - vendor/swagger-ui/src/main/coffeescript/view/ParameterContentTypeView.coffee
182
+ - vendor/swagger-ui/src/main/coffeescript/view/ParameterView.coffee
183
+ - vendor/swagger-ui/src/main/coffeescript/view/ResourceView.coffee
184
+ - vendor/swagger-ui/src/main/coffeescript/view/ResponseContentTypeView.coffee
185
+ - vendor/swagger-ui/src/main/coffeescript/view/SignatureView.coffee
186
+ - vendor/swagger-ui/src/main/coffeescript/view/StatusCodeView.coffee
187
+ - vendor/swagger-ui/src/main/html/css/highlight.default.css
188
+ - vendor/swagger-ui/src/main/html/css/screen.css
189
+ - vendor/swagger-ui/src/main/html/images/logo_small.png
190
+ - vendor/swagger-ui/src/main/html/images/pet_store_api.png
191
+ - vendor/swagger-ui/src/main/html/images/throbber.gif
192
+ - vendor/swagger-ui/src/main/html/images/wordnik_api.png
193
+ - vendor/swagger-ui/src/main/html/index.html
194
+ - vendor/swagger-ui/src/main/javascript/doc.js
195
+ - vendor/swagger-ui/src/main/less/reset.less
196
+ - vendor/swagger-ui/src/main/less/screen.less
197
+ - vendor/swagger-ui/src/main/less/specs.less
198
+ - vendor/swagger-ui/src/main/template/content_type.handlebars
199
+ - vendor/swagger-ui/src/main/template/main.handlebars
200
+ - vendor/swagger-ui/src/main/template/operation.handlebars
201
+ - vendor/swagger-ui/src/main/template/param.handlebars
202
+ - vendor/swagger-ui/src/main/template/param_list.handlebars
203
+ - vendor/swagger-ui/src/main/template/param_readonly.handlebars
204
+ - vendor/swagger-ui/src/main/template/param_readonly_required.handlebars
205
+ - vendor/swagger-ui/src/main/template/param_required.handlebars
206
+ - vendor/swagger-ui/src/main/template/parameter_content_type.handlebars
207
+ - vendor/swagger-ui/src/main/template/resource.handlebars
208
+ - vendor/swagger-ui/src/main/template/response_content_type.handlebars
209
+ - vendor/swagger-ui/src/main/template/signature.handlebars
210
+ - vendor/swagger-ui/src/main/template/status_code.handlebars
211
+ - vendor/swagger-ui/src/test/spec.html
212
+ - vendor/swagger-ui/src/test/swagger-ui-spec.coffee
213
+ - vendor/swagger-ui/swagger-ui.json
214
+ homepage: http://github.com/rubysolo/swagger_ui_generator
215
+ licenses:
216
+ - MIT
217
+ metadata: {}
218
+ post_install_message:
219
+ rdoc_options: []
220
+ require_paths:
221
+ - lib
222
+ required_ruby_version: !ruby/object:Gem::Requirement
223
+ requirements:
224
+ - - ">="
225
+ - !ruby/object:Gem::Version
226
+ version: '0'
227
+ required_rubygems_version: !ruby/object:Gem::Requirement
228
+ requirements:
229
+ - - ">="
230
+ - !ruby/object:Gem::Version
231
+ version: '0'
232
+ requirements: []
233
+ rubyforge_project:
234
+ rubygems_version: 2.2.0
235
+ signing_key:
236
+ specification_version: 4
237
+ summary: Swagger UI Generator
238
+ test_files:
239
+ - test/lib/generators/swagger_ui_generator/install_generator_test.rb
240
+ - test/test_helper.rb