Skip to content

Commit 4882163

Browse files
committed
in with the new
1 parent 1529ed9 commit 4882163

File tree

86 files changed

+8547
-0
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

86 files changed

+8547
-0
lines changed

.babelrc

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
{
2+
"presets": [
3+
"es2015",
4+
"react",
5+
"stage-0"
6+
]
7+
}

.gitignore

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
node_modules
2+
.idea
3+
.deps_check
4+
.DS_Store
5+
npm-debug.log

.npmignore

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
*
2+
*/
3+
!README.md
4+
!package.json
5+
!dist

LICENSE

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
Copyright 2017 SmartBear Software
2+
3+
Licensed under the Apache License, Version 2.0 (the "License");
4+
you may not use this file except in compliance with the License.
5+
You may obtain a copy of the License at [apache.org/licenses/LICENSE-2.0](http://www.apache.org/licenses/LICENSE-2.0)
6+
7+
Unless required by applicable law or agreed to in writing, software
8+
distributed under the License is distributed on an "AS IS" BASIS,
9+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
10+
See the License for the specific language governing permissions and
11+
limitations under the License.

README.md

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
# Swagger-Editor
2+
3+
[![Build Status](https://travis-ci.org/swagger-api/swagger-editor.svg?branch=master)](https://travis-ci.org/swagger-api/swagger-editor)
4+
[![Code Climate](https://codeclimate.com/github/swagger-api/swagger-editor/badges/gpa.svg)](https://codeclimate.com/github/swagger-api/swagger-editor)
5+
[![Dependency Status](https://david-dm.org/swagger-api/swagger-editor/status.svg)](https://david-dm.org/swagger-api/swagger-editor)
6+
[![devDependency Status](https://david-dm.org/swagger-api/swagger-editor/dev-status.svg)](https://david-dm.org/swagger-api/swagger-editor-#info=devDependencies)
7+
8+
Swagger Editor lets you edit [Swagger API specifications](https://github.com/swagger-api/swagger-spec/blob/master/versions/2.0.md) in YAML inside your browser and to preview documentations in real time.
9+
Valid Swagger JSON descriptions can then be generated and used with the full Swagger tooling (code generation, documentation, etc).
10+
11+
## New!
12+
13+
This is the new version of swagger-ui, 3.x.
14+
15+
For the older version of swagger-ui, refer to the [*2.x branch*](https://github.com/swagger-api/swagger-ui/tree/2.x)=
16+
17+
## Running locally
18+
19+
If you have Node.js and npm installed, you can run `npm start` to spin up a static server.
20+
21+
Otherwise, you can open `index.html` directly from your filesystem in your browser.
22+
23+
##### Browser support
24+
25+
Swagger UI works in the latest versions of Chrome, Safari, Firefox, Edge and IE11.
26+
27+
## License
28+
29+
Copyright 2017 SmartBear Software
30+
31+
Licensed under the Apache License, Version 2.0 (the "License");
32+
you may not use this file except in compliance with the License.
33+
You may obtain a copy of the License at [apache.org/licenses/LICENSE-2.0](http://www.apache.org/licenses/LICENSE-2.0)
34+
35+
Unless required by applicable law or agreed to in writing, software
36+
distributed under the License is distributed on an "AS IS" BASIS,
37+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
38+
See the License for the specific language governing permissions and
39+
limitations under the License.

build-tools/loadersByExtension.js

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
function extsToRegExp(exts) {
2+
return new RegExp("\\.(" + exts.map(function(ext) {
3+
return ext.replace(/\./g, "\\.");
4+
}).join("|") + ")(\\?.*)?$");
5+
}
6+
7+
module.exports = function loadersByExtension(obj) {
8+
var loaders = [];
9+
Object.keys(obj).forEach(function(key) {
10+
var exts = key.split("|");
11+
var value = obj[key];
12+
var entry = {
13+
extensions: exts,
14+
test: extsToRegExp(exts)
15+
};
16+
if(Array.isArray(value)) {
17+
entry.loaders = value;
18+
} else if(typeof value === "string") {
19+
entry.loader = value;
20+
} else {
21+
Object.keys(value).forEach(function(valueKey) {
22+
entry[valueKey] = value[valueKey];
23+
});
24+
}
25+
loaders.push(entry);
26+
});
27+
return loaders;
28+
};

dist/swagger-editor-bundle.js

Lines changed: 126 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/swagger-editor-bundle.js.map

Lines changed: 1 addition & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/swagger-editor.css

Lines changed: 2 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/swagger-editor.css.map

Lines changed: 1 addition & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)