Merge remote-tracking branch 'SwaggerOfficial/develop_2.0' into JSONEditor
Conflicts: dist/swagger-ui.js dist/swagger-ui.min.js package.json
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
# Swagger UI
|
||||
|
||||
[](https://travis-ci.org/swagger-api/swagger-ui)
|
||||
[](https://travis-ci.org/swagger-api/swagger-ui)
|
||||
|
||||
Swagger UI is part of the Swagger project. The Swagger project allows you to produce, visualize and consume your OWN RESTful services. No proxy or 3rd party services required. Do it your own way.
|
||||
|
||||
@@ -64,10 +64,9 @@ You may choose to customize Swagger UI for your organization. Here is an overvie
|
||||
- lib: Contains javascript dependencies which swagger-ui depends on
|
||||
- node_modules: Contains node modules which swagger-ui uses for its development.
|
||||
- src
|
||||
- src/main/coffeescript: main code in CoffeeScript
|
||||
- src/main/templates: [handlebars](http://handlebarsjs.com/) templates used to render swagger-ui
|
||||
- src/main/html: the html files, some images and css
|
||||
- src/main/javascript: some legacy javascript referenced by CoffeeScript code
|
||||
- src/main/javascript: main code
|
||||
|
||||
### SwaggerUi
|
||||
To use swagger-ui you should take a look at the [source of swagger-ui html page](https://github.com/swagger-api/swagger-ui/blob/master/dist/index.html) and customize it. This basically requires you to instantiate a SwaggerUi object and call load() on it as below:
|
||||
|
||||
19435
dist/swagger-ui.js
vendored
19435
dist/swagger-ui.js
vendored
File diff suppressed because one or more lines are too long
10
dist/swagger-ui.min.js
vendored
10
dist/swagger-ui.min.js
vendored
File diff suppressed because one or more lines are too long
@@ -113,7 +113,7 @@ gulp.task('copy', ['less'], function() {
|
||||
* Watch for changes and recompile
|
||||
*/
|
||||
gulp.task('watch', function() {
|
||||
return watch(['./src/**/*.{coffee,js,less,handlebars}'], function() {
|
||||
return watch(['./src/**/*.{js,less,handlebars}'], function() {
|
||||
gulp.start('default');
|
||||
});
|
||||
});
|
||||
|
||||
27
package.json
27
package.json
@@ -1,28 +1,27 @@
|
||||
{
|
||||
"name": "swagger-ui",
|
||||
"author": "Tony Tam <fehguy@gmail.com>",
|
||||
"description": "Swagger UI is a dependency-free collection of HTML, Javascript, and CSS assets that dynamically generate beautiful documentation from a Swagger-compliant API",
|
||||
"version": "2.1.8-M1",
|
||||
"contributors": [{
|
||||
"name": "Mohsen Azimi",
|
||||
"email": "me@azimi.me"
|
||||
}],
|
||||
"description": "Swagger UI is a dependency-free collection of HTML, JavaScript, and CSS assets that dynamically generate beautiful documentation from a Swagger-compliant API",
|
||||
"version": "2.1.0-M2",
|
||||
"homepage": "http://swagger.io",
|
||||
"license": "Apache 2.0",
|
||||
"scripts": {
|
||||
"build": "gulp.js;",
|
||||
"serve": "gulp.js serve;",
|
||||
"pretest": "jshint .",
|
||||
"test": "gulp; mocha",
|
||||
"postinstall": "cd node_modules/swagger-client/; npm install; gulp"
|
||||
"build": "gulp",
|
||||
"serve": "gulp serve",
|
||||
"prejshint": "gulp",
|
||||
"jshint": "jshint .",
|
||||
"pretest": "npm run jshint",
|
||||
"test": "mocha"
|
||||
},
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/swagger-api/swagger-ui.git"
|
||||
},
|
||||
"readmeFilename": "README.md",
|
||||
"dependencies": {
|
||||
"shred": "0.8.10",
|
||||
"btoa": "1.1.1",
|
||||
"swagger-client": "2.1.9-M1",
|
||||
"json-editor": "~0.7.15"
|
||||
},
|
||||
"devDependencies": {
|
||||
"chai": "^2.1.0",
|
||||
"cors": "^2.5.3",
|
||||
@@ -46,6 +45,6 @@
|
||||
"less": "^2.4.0",
|
||||
"mocha": "^2.1.0",
|
||||
"selenium-webdriver": "^2.45.0",
|
||||
"swagger-client": "git://github.com/swagger-api/swagger-js#develop_2.0"
|
||||
"swagger-client": "2.1.0-M2"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -5,11 +5,13 @@
|
||||
<input type="file" name='{{name}}'/>
|
||||
{{else}}
|
||||
{{#if default}}
|
||||
<div class="editor_holder"></div>
|
||||
<textarea class='body-textarea required' placeholder='(required)' name='{{name}}'>{{default}}</textarea>
|
||||
<br />
|
||||
<div class="parameter-content-type" />
|
||||
{{else}}
|
||||
<textarea class='body-textarea required' placeholder='(required)' name='{{name}}'></textarea>
|
||||
<div class="editor_holder"></div>
|
||||
<br />
|
||||
<div class="parameter-content-type" />
|
||||
{{/if}}
|
||||
|
||||
@@ -31,18 +31,18 @@
|
||||
"grantTypes": {
|
||||
"implicit": {
|
||||
"loginEndpoint": {
|
||||
"url": "http://petstore.swagger.wordnik.com/oauth/dialog"
|
||||
"url": "http://petstore.swagger.io/oauth/dialog"
|
||||
},
|
||||
"tokenName": "access_token"
|
||||
},
|
||||
"authorization_code": {
|
||||
"tokenRequestEndpoint": {
|
||||
"url": "http://petstore.swagger.wordnik.com/oauth/requestToken",
|
||||
"url": "http://petstore.swagger.io/oauth/requestToken",
|
||||
"clientIdName": "client_id",
|
||||
"clientSecretName": "client_secret"
|
||||
},
|
||||
"tokenEndpoint": {
|
||||
"url": "http://petstore.swagger.wordnik.com/oauth/token",
|
||||
"url": "http://petstore.swagger.io/oauth/token",
|
||||
"tokenName": "access_code"
|
||||
}
|
||||
}
|
||||
@@ -51,7 +51,7 @@
|
||||
},
|
||||
"info": {
|
||||
"title": "Swagger Sample App",
|
||||
"description": "This is a sample server Petstore server. You can find out more about Swagger \n at <a href=\"http://swagger.wordnik.com\">http://swagger.wordnik.com</a> or on irc.freenode.net, #swagger. For this sample,\n you can use the api key \"special-key\" to test the authorization filters",
|
||||
"description": "This is a sample server Petstore server. You can find out more about Swagger \n at <a href=\"http://swagger.io\">http://swagger.io</a> or on irc.freenode.net, #swagger. For this sample,\n you can use the api key \"special-key\" to test the authorization filters",
|
||||
"termsOfServiceUrl": "http://helloreverb.com/terms/",
|
||||
"contact": "apiteam@wordnik.com",
|
||||
"license": "Apache 2.0",
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
{
|
||||
"apiVersion": "1.0.0",
|
||||
"swaggerVersion": "1.2",
|
||||
"basePath": "http://petstore.swagger.wordnik.com/api",
|
||||
"basePath": "http://petstore.swagger.io/api",
|
||||
"resourcePath": "/pet",
|
||||
"produces": [
|
||||
"application/json",
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
{
|
||||
"apiVersion": "1.0.0",
|
||||
"swaggerVersion": "1.2",
|
||||
"basePath": "http://petstore.swagger.wordnik.com/api",
|
||||
"basePath": "http://petstore.swagger.io/api",
|
||||
"resourcePath": "/store",
|
||||
"produces": [
|
||||
"application/json"
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
{
|
||||
"apiVersion": "1.0.0",
|
||||
"swaggerVersion": "1.2",
|
||||
"basePath": "http://petstore.swagger.wordnik.com/api",
|
||||
"basePath": "http://petstore.swagger.io/api",
|
||||
"resourcePath": "/user",
|
||||
"produces": [
|
||||
"application/json"
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
{
|
||||
"swagger": "2.0",
|
||||
"info": {
|
||||
"description": "This is a sample server Petstore server. You can find out more about Swagger at <a href=\"http://swagger.wordnik.com\">http://swagger.wordnik.com</a> or on irc.freenode.net, #swagger. For this sample, you can use the api key \"special-key\" to test the authorization filters",
|
||||
"description": "This is a sample server Petstore server. You can find out more about Swagger at <a href=\"http://swagger.io\">http://swagger.io</a> or on irc.freenode.net, #swagger. For this sample, you can use the api key \"special-key\" to test the authorization filters",
|
||||
"version": "1.0.0",
|
||||
"title": "Swagger Petstore",
|
||||
"termsOfService": "http://helloreverb.com/terms/",
|
||||
@@ -15,7 +15,7 @@
|
||||
"url": "http://www.apache.org/licenses/LICENSE-2.0.html"
|
||||
}
|
||||
},
|
||||
"host": "petstore.swagger.wordnik.com",
|
||||
"host": "petstore.swagger.io",
|
||||
"basePath": "/v2",
|
||||
"schemes": [
|
||||
"http"
|
||||
@@ -742,7 +742,7 @@
|
||||
},
|
||||
"petstore_auth": {
|
||||
"type": "oauth2",
|
||||
"authorizationUrl": "http://petstore.swagger.wordnik.com/api/oauth/dialog",
|
||||
"authorizationUrl": "http://petstore.swagger.io/api/oauth/dialog",
|
||||
"flow": "implicit"
|
||||
}
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user