mirror of
https://github.com/Redocly/redoc.git
synced 2025-07-15 02:32:20 +03:00
Merge commit '822d84c9f82c27f3f9c22f5b7b0483a792748ef4' into releases
This commit is contained in:
commit
8579f39117
|
@ -1,3 +1,12 @@
|
||||||
|
# 1.3.0 (2014-08-31)
|
||||||
|
### Bug fixes
|
||||||
|
* Fix code samples are not shown for operations without body param (#93)
|
||||||
|
* Fixed side menu overlapped site footer (#75)
|
||||||
|
* Fix broken order in discriminator dropdown
|
||||||
|
|
||||||
|
### Features/Improvements
|
||||||
|
* Support "x-nullable" property by @kedashoe (#92)
|
||||||
|
|
||||||
# 1.2.0 (2016-08-30)
|
# 1.2.0 (2016-08-30)
|
||||||
### Bug fixes
|
### Bug fixes
|
||||||
* Fix sticky sidebar top sticking (#75)
|
* Fix sticky sidebar top sticking (#75)
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
# ReDoc
|
# ReDoc
|
||||||
**OpenAPI/Swagger-generated API Reference Documentation**
|
**OpenAPI/Swagger-generated API Reference Documentation**
|
||||||
|
|
||||||
[](https://travis-ci.org/Rebilly/ReDoc) [](https://coveralls.io/github/Rebilly/ReDoc?branch=master) [](https://APIs.guru) [](https://codeclimate.com/github/Rebilly/ReDoc) [](https://david-dm.org/Rebilly/ReDoc#info=devDependencies) [](https://waffle.io/Rebilly/ReDoc)
|
[](https://travis-ci.org/Rebilly/ReDoc) [](https://coveralls.io/github/Rebilly/ReDoc?branch=master) [](https://APIs.guru) [](https://codeclimate.com/github/Rebilly/ReDoc) [](https://david-dm.org/Rebilly/ReDoc) [](https://david-dm.org/Rebilly/ReDoc#info=devDependencies) [](https://waffle.io/Rebilly/ReDoc)
|
||||||
|
|
||||||
[](https://www.npmjs.com/package/redoc) [](http://bower.io/) [](https://github.com/Rebilly/ReDoc/blob/master/LICENSE)
|
[](https://www.npmjs.com/package/redoc) [](http://bower.io/) [](https://github.com/Rebilly/ReDoc/blob/master/LICENSE)
|
||||||
|
|
||||||
|
|
|
@ -12,13 +12,9 @@ module.exports = {
|
||||||
debug: false,
|
debug: false,
|
||||||
|
|
||||||
resolve: {
|
resolve: {
|
||||||
extensions: ['', '.ts', '.js', '.json', '.css', '.scss', '.html'],
|
extensions: ['', '.ts', '.js', '.json', '.css'],
|
||||||
root: root('lib'),
|
root: root('lib'),
|
||||||
descriptionFiles: ['package.json'],
|
modulesDirectories: ['node_modules'],
|
||||||
modules: [
|
|
||||||
'node_modules',
|
|
||||||
root('lib')
|
|
||||||
],
|
|
||||||
alias: {
|
alias: {
|
||||||
'./lib/bootstrap': root('lib/bootstrap.dev'),
|
'./lib/bootstrap': root('lib/bootstrap.dev'),
|
||||||
http: 'stream-http',
|
http: 'stream-http',
|
||||||
|
@ -26,10 +22,17 @@ module.exports = {
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
externals: {
|
externals: {
|
||||||
"jquery": "jQuery"
|
"jquery": "jQuery",
|
||||||
|
'esprima': 'esprima' // optional dep of ys-yaml not needed for redoc
|
||||||
},
|
},
|
||||||
node: {
|
node: {
|
||||||
fs: "empty"
|
fs: "empty",
|
||||||
|
crypto: "empty",
|
||||||
|
global: "window",
|
||||||
|
process: true,
|
||||||
|
module: false,
|
||||||
|
clearImmediate: false,
|
||||||
|
setImmediate: false
|
||||||
},
|
},
|
||||||
entry: {
|
entry: {
|
||||||
'redoc': './lib/index.ts',
|
'redoc': './lib/index.ts',
|
||||||
|
@ -57,7 +60,10 @@ module.exports = {
|
||||||
module: {
|
module: {
|
||||||
preLoaders: [{
|
preLoaders: [{
|
||||||
test: /\.js$/,
|
test: /\.js$/,
|
||||||
loader: 'source-map'
|
loader: 'source-map-loader',
|
||||||
|
exclude: [
|
||||||
|
/node_modules/
|
||||||
|
]
|
||||||
}],
|
}],
|
||||||
loaders: [{
|
loaders: [{
|
||||||
test: /\.ts$/,
|
test: /\.ts$/,
|
||||||
|
|
|
@ -12,26 +12,29 @@ const BANNER =
|
||||||
|
|
||||||
module.exports = {
|
module.exports = {
|
||||||
context: root(),
|
context: root(),
|
||||||
devtool: 'cheap-module-source-map',
|
devtool: 'source-map',
|
||||||
|
|
||||||
resolve: {
|
resolve: {
|
||||||
extensions: ['', '.ts', '.js', '.json', '.css', '.scss', '.html'],
|
extensions: ['', '.ts', '.js', '.json', '.css'],
|
||||||
root: root('lib'),
|
root: root('lib'),
|
||||||
descriptionFiles: ['package.json'],
|
modulesDirectories: ['node_modules'],
|
||||||
modules: [
|
|
||||||
'node_modules',
|
|
||||||
root('lib')
|
|
||||||
],
|
|
||||||
alias: {
|
alias: {
|
||||||
http: 'stream-http',
|
http: 'stream-http',
|
||||||
https: 'stream-http'
|
https: 'stream-http'
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
externals: {
|
externals: {
|
||||||
"jquery": "jQuery"
|
'jquery': 'jQuery',
|
||||||
|
'esprima': 'esprima' // optional dep of ys-yaml not needed for redoc
|
||||||
},
|
},
|
||||||
node: {
|
node: {
|
||||||
fs: "empty"
|
fs: "empty",
|
||||||
|
crypto: "empty",
|
||||||
|
global: "window",
|
||||||
|
process: true,
|
||||||
|
module: false,
|
||||||
|
clearImmediate: false,
|
||||||
|
setImmediate: false
|
||||||
},
|
},
|
||||||
entry: {
|
entry: {
|
||||||
'redoc': ['./lib/polyfills.ts', './lib/vendor.ts', './lib/index.ts']
|
'redoc': ['./lib/polyfills.ts', './lib/vendor.ts', './lib/index.ts']
|
||||||
|
@ -49,7 +52,10 @@ module.exports = {
|
||||||
module: {
|
module: {
|
||||||
preLoaders: [{
|
preLoaders: [{
|
||||||
test: /\.js$/,
|
test: /\.js$/,
|
||||||
loader: 'source-map'
|
loader: 'source-map-loader',
|
||||||
|
exclude: [
|
||||||
|
/node_modules/
|
||||||
|
]
|
||||||
}],
|
}],
|
||||||
loaders: [{
|
loaders: [{
|
||||||
test: /\.ts$/,
|
test: /\.ts$/,
|
||||||
|
|
|
@ -8,13 +8,9 @@ module.exports = {
|
||||||
|
|
||||||
devtool: 'inline-source-map',
|
devtool: 'inline-source-map',
|
||||||
resolve: {
|
resolve: {
|
||||||
extensions: ['', '.ts', '.js', '.json', '.css', '.scss', '.html'],
|
extensions: ['', '.ts', '.js', '.json', '.css'],
|
||||||
root: root('lib'),
|
root: root('lib'),
|
||||||
descriptionFiles: ['package.json'],
|
modulesDirectories: ['node_modules'],
|
||||||
modules: [
|
|
||||||
'node_modules',
|
|
||||||
root('lib'),
|
|
||||||
],
|
|
||||||
alias: {
|
alias: {
|
||||||
'./lib/bootstrap': root('lib/bootstrap.dev'),
|
'./lib/bootstrap': root('lib/bootstrap.dev'),
|
||||||
http: 'stream-http',
|
http: 'stream-http',
|
||||||
|
@ -22,10 +18,17 @@ module.exports = {
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
externals: {
|
externals: {
|
||||||
"jquery": "jQuery"
|
"jquery": "jQuery",
|
||||||
|
'esprima': 'esprima' // optional dep of ys-yaml not needed for redoc
|
||||||
},
|
},
|
||||||
node: {
|
node: {
|
||||||
fs: "empty"
|
fs: "empty",
|
||||||
|
crypto: "empty",
|
||||||
|
global: "window",
|
||||||
|
process: true,
|
||||||
|
module: false,
|
||||||
|
clearImmediate: false,
|
||||||
|
setImmediate: false
|
||||||
},
|
},
|
||||||
|
|
||||||
output: {
|
output: {
|
||||||
|
@ -38,7 +41,10 @@ module.exports = {
|
||||||
module: {
|
module: {
|
||||||
preLoaders: [{
|
preLoaders: [{
|
||||||
test: /\.js$/,
|
test: /\.js$/,
|
||||||
loader: 'source-map'
|
loader: 'source-map-loader',
|
||||||
|
exclude: [
|
||||||
|
/node_modules/
|
||||||
|
]
|
||||||
}],
|
}],
|
||||||
loaders: [ {
|
loaders: [ {
|
||||||
test: /\.ts$/,
|
test: /\.ts$/,
|
||||||
|
|
|
@ -12,13 +12,13 @@ info:
|
||||||
For this sample, you can use the api key `special-key` to test the authorization filters.
|
For this sample, you can use the api key `special-key` to test the authorization filters.
|
||||||
# Introduction
|
# Introduction
|
||||||
This API is documented in **OpenAPI format** and is based on
|
This API is documented in **OpenAPI format** and is based on
|
||||||
[Pestore sample](http://petstore.swagger.io/) provided by [swagger.io](http://swagger.io) team.
|
[Petstore sample](http://petstore.swagger.io/) provided by [swagger.io](http://swagger.io) team.
|
||||||
It was **extended** to illustrate features of [generator-openapi-repo](https://github.com/Rebilly/generator-openapi-repo)
|
It was **extended** to illustrate features of [generator-openapi-repo](https://github.com/Rebilly/generator-openapi-repo)
|
||||||
tool and [ReDoc](https://github.com/Rebilly/ReDoc) documentation. In addition to standard
|
tool and [ReDoc](https://github.com/Rebilly/ReDoc) documentation. In addition to standard
|
||||||
OpenAPI syntax we use a few [vendor extensions](https://github.com/Rebilly/ReDoc/blob/master/docs/redoc-vendor-extensions.md).
|
OpenAPI syntax we use a few [vendor extensions](https://github.com/Rebilly/ReDoc/blob/master/docs/redoc-vendor-extensions.md).
|
||||||
# OpenAPI Specification
|
# OpenAPI Specification
|
||||||
This API is documented in **OpenAPI format** and is based on
|
This API is documented in **OpenAPI format** and is based on
|
||||||
[Pestore sample](http://petstore.swagger.io/) provided by [swagger.io](http://swagger.io) team.
|
[Petstore sample](http://petstore.swagger.io/) provided by [swagger.io](http://swagger.io) team.
|
||||||
It was **extended** to illustrate features of [generator-openapi-repo](https://github.com/Rebilly/generator-openapi-repo)
|
It was **extended** to illustrate features of [generator-openapi-repo](https://github.com/Rebilly/generator-openapi-repo)
|
||||||
tool and [ReDoc](https://github.com/Rebilly/ReDoc) documentation. In addition to standard
|
tool and [ReDoc](https://github.com/Rebilly/ReDoc) documentation. In addition to standard
|
||||||
OpenAPI syntax we use a few [vendor extensions](https://github.com/Rebilly/ReDoc/blob/master/docs/redoc-vendor-extensions.md).
|
OpenAPI syntax we use a few [vendor extensions](https://github.com/Rebilly/ReDoc/blob/master/docs/redoc-vendor-extensions.md).
|
||||||
|
|
|
@ -22,7 +22,7 @@ a.openapi-button {
|
||||||
font-weight: normal;
|
font-weight: normal;
|
||||||
}
|
}
|
||||||
|
|
||||||
:host [section] {
|
:host /deep/ [section] {
|
||||||
padding-top: 60px;
|
padding-top: 60px;
|
||||||
margin-top: 20px;
|
margin-top: 20px;
|
||||||
}
|
}
|
||||||
|
|
|
@ -7,7 +7,7 @@ import { OptionsService } from '../../services/index';
|
||||||
import {
|
import {
|
||||||
inject,
|
inject,
|
||||||
async,
|
async,
|
||||||
TestComponentBuilder
|
TestBed
|
||||||
} from '@angular/core/testing';
|
} from '@angular/core/testing';
|
||||||
|
|
||||||
import { ApiInfo } from './api-info';
|
import { ApiInfo } from './api-info';
|
||||||
|
@ -15,23 +15,23 @@ import { SpecManager } from '../../utils/SpecManager';
|
||||||
|
|
||||||
describe('Redoc components', () => {
|
describe('Redoc components', () => {
|
||||||
describe('ApiInfo Component', () => {
|
describe('ApiInfo Component', () => {
|
||||||
let builder;
|
|
||||||
let component;
|
let component;
|
||||||
let fixture;
|
let fixture;
|
||||||
let opts;
|
let opts;
|
||||||
|
beforeEach(() => {
|
||||||
beforeEach(async(inject([TestComponentBuilder, SpecManager, OptionsService], (tcb, specMgr, _opts) => {
|
TestBed.configureTestingModule({ declarations: [ TestAppComponent ] });
|
||||||
|
});
|
||||||
|
beforeEach(async(inject([SpecManager, OptionsService], (specMgr, _opts) => {
|
||||||
opts = _opts;
|
opts = _opts;
|
||||||
opts.options = {
|
opts.options = {
|
||||||
scrollYOffset: () => 0,
|
scrollYOffset: () => 0,
|
||||||
$scrollParent: window
|
$scrollParent: window
|
||||||
};
|
};
|
||||||
builder = tcb;
|
|
||||||
return specMgr.load('/tests/schemas/api-info-test.json');
|
return specMgr.load('/tests/schemas/api-info-test.json');
|
||||||
})));
|
})));
|
||||||
|
|
||||||
beforeEach(() => {
|
beforeEach(() => {
|
||||||
fixture = builder.createSync(TestAppComponent);
|
fixture = TestBed.createComponent(TestAppComponent);
|
||||||
component = getChildDebugElement(fixture.debugElement, 'api-info').componentInstance;
|
component = getChildDebugElement(fixture.debugElement, 'api-info').componentInstance;
|
||||||
fixture.detectChanges();
|
fixture.detectChanges();
|
||||||
});
|
});
|
||||||
|
@ -55,7 +55,6 @@ describe('Redoc components', () => {
|
||||||
/** Test component that contains an ApiInfo. */
|
/** Test component that contains an ApiInfo. */
|
||||||
@Component({
|
@Component({
|
||||||
selector: 'test-app',
|
selector: 'test-app',
|
||||||
directives: [ApiInfo],
|
|
||||||
template:
|
template:
|
||||||
`<api-info></api-info>`
|
`<api-info></api-info>`
|
||||||
})
|
})
|
||||||
|
|
|
@ -6,7 +6,7 @@ import { Component } from '@angular/core';
|
||||||
import {
|
import {
|
||||||
inject,
|
inject,
|
||||||
async,
|
async,
|
||||||
TestComponentBuilder
|
TestBed
|
||||||
} from '@angular/core/testing';
|
} from '@angular/core/testing';
|
||||||
|
|
||||||
import { ApiLogo } from './api-logo';
|
import { ApiLogo } from './api-logo';
|
||||||
|
@ -21,13 +21,15 @@ describe('Redoc components', () => {
|
||||||
let specMgr;
|
let specMgr;
|
||||||
|
|
||||||
let schemaUrl = '/tests/schemas/api-info-test.json';
|
let schemaUrl = '/tests/schemas/api-info-test.json';
|
||||||
beforeEach(async(inject([TestComponentBuilder, SpecManager], (tcb, _specMgr) => {
|
beforeEach(() => {
|
||||||
builder = tcb;
|
TestBed.configureTestingModule({ declarations: [ TestAppComponent ] });
|
||||||
|
});
|
||||||
|
beforeEach(async(inject([SpecManager], ( _specMgr) => {
|
||||||
specMgr = _specMgr;
|
specMgr = _specMgr;
|
||||||
return specMgr.load(schemaUrl);
|
return specMgr.load(schemaUrl);
|
||||||
})));
|
})));
|
||||||
beforeEach(() => {
|
beforeEach(() => {
|
||||||
fixture = builder.createSync(TestAppComponent);
|
fixture = TestBed.createComponent(TestAppComponent);
|
||||||
component = getChildDebugElement(fixture.debugElement, 'api-logo').componentInstance;
|
component = getChildDebugElement(fixture.debugElement, 'api-logo').componentInstance;
|
||||||
fixture.detectChanges();
|
fixture.detectChanges();
|
||||||
});
|
});
|
||||||
|
@ -59,7 +61,6 @@ describe('Redoc components', () => {
|
||||||
/** Test component that contains an ApiInfo. */
|
/** Test component that contains an ApiInfo. */
|
||||||
@Component({
|
@Component({
|
||||||
selector: 'test-app',
|
selector: 'test-app',
|
||||||
directives: [ApiLogo],
|
|
||||||
providers: [SpecManager],
|
providers: [SpecManager],
|
||||||
template:
|
template:
|
||||||
`<api-logo></api-logo>`
|
`<api-logo></api-logo>`
|
||||||
|
|
|
@ -5,22 +5,26 @@ import { Component } from '@angular/core';
|
||||||
|
|
||||||
import {
|
import {
|
||||||
inject,
|
inject,
|
||||||
TestComponentBuilder
|
TestBed
|
||||||
} from '@angular/core/testing';
|
} from '@angular/core/testing';
|
||||||
|
|
||||||
import { JsonSchemaLazy } from './json-schema-lazy';
|
import { JsonSchemaLazy } from './json-schema-lazy';
|
||||||
|
|
||||||
describe('Redoc components', () => {
|
describe('Redoc components', () => {
|
||||||
|
beforeEach(() => {
|
||||||
|
TestBed.configureTestingModule({ declarations: [ TestAppComponent ] });
|
||||||
|
});
|
||||||
|
|
||||||
describe('JsonSchemaLazy Component', () => {
|
describe('JsonSchemaLazy Component', () => {
|
||||||
let builder;
|
let builder;
|
||||||
let component;
|
let component;
|
||||||
let fixture;
|
let fixture;
|
||||||
|
|
||||||
beforeEach(inject([TestComponentBuilder], (tcb) => {
|
beforeEach(inject([TestBed], (tcb) => {
|
||||||
builder = tcb;
|
|
||||||
}));
|
}));
|
||||||
beforeEach(() => {
|
beforeEach(() => {
|
||||||
fixture = builder.createSync(TestAppComponent);
|
fixture = TestBed.createComponent(TestAppComponent);
|
||||||
let debugEl = getChildDebugElement(fixture.debugElement, 'json-schema-lazy');
|
let debugEl = getChildDebugElement(fixture.debugElement, 'json-schema-lazy');
|
||||||
component = <JsonSchemaLazy>debugEl.componentInstance;
|
component = <JsonSchemaLazy>debugEl.componentInstance;
|
||||||
spyOn(component, '_loadAfterSelf').and.stub();
|
spyOn(component, '_loadAfterSelf').and.stub();
|
||||||
|
@ -47,7 +51,6 @@ describe('Redoc components', () => {
|
||||||
/** Test component that contains a Method. */
|
/** Test component that contains a Method. */
|
||||||
@Component({
|
@Component({
|
||||||
selector: 'test-app',
|
selector: 'test-app',
|
||||||
directives: [JsonSchemaLazy],
|
|
||||||
template:
|
template:
|
||||||
`<json-schema-lazy></json-schema-lazy>`
|
`<json-schema-lazy></json-schema-lazy>`
|
||||||
})
|
})
|
||||||
|
|
|
@ -72,7 +72,7 @@
|
||||||
</span>
|
</span>
|
||||||
<span *ngIf="prop._required" class="param-required">Required</span>
|
<span *ngIf="prop._required" class="param-required">Required</span>
|
||||||
<span *ngIf="prop['x-nullable']" class="param-nullable">Nullable</span>
|
<span *ngIf="prop['x-nullable']" class="param-nullable">Nullable</span>
|
||||||
<div *ngIf="prop.default">Default: {{prop.default | json}}</div>
|
<div *ngIf="prop.default != null">Default: {{prop.default | json}}</div>
|
||||||
<div *ngIf="prop.enum && !prop.isDiscriminator" class="param-enum">
|
<div *ngIf="prop.enum && !prop.isDiscriminator" class="param-enum">
|
||||||
<span *ngFor="let enumItem of prop.enum" class="enum-value {{enumItem.type}}"> {{enumItem.val | json}} </span>
|
<span *ngFor="let enumItem of prop.enum" class="enum-value {{enumItem.type}}"> {{enumItem.val | json}} </span>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -3,7 +3,7 @@
|
||||||
import { Component } from '@angular/core';
|
import { Component } from '@angular/core';
|
||||||
import {
|
import {
|
||||||
inject,
|
inject,
|
||||||
TestComponentBuilder
|
TestBed
|
||||||
} from '@angular/core/testing';
|
} from '@angular/core/testing';
|
||||||
|
|
||||||
import { getChildDebugElement } from '../../../tests/helpers';
|
import { getChildDebugElement } from '../../../tests/helpers';
|
||||||
|
@ -13,19 +13,22 @@ import { JsonSchema } from './json-schema';
|
||||||
import { SpecManager } from '../../utils/SpecManager';;
|
import { SpecManager } from '../../utils/SpecManager';;
|
||||||
|
|
||||||
describe('Redoc components', () => {
|
describe('Redoc components', () => {
|
||||||
|
beforeEach(() => {
|
||||||
|
TestBed.configureTestingModule({ declarations: [ TestAppComponent ] });
|
||||||
|
});
|
||||||
describe('JsonSchema Component', () => {
|
describe('JsonSchema Component', () => {
|
||||||
let builder;
|
let builder;
|
||||||
let component;
|
let component;
|
||||||
let fixture;
|
let fixture;
|
||||||
let specMgr;
|
let specMgr;
|
||||||
|
|
||||||
beforeEach(inject([TestComponentBuilder, SpecManager], (tcb, _spec) => {
|
beforeEach(inject([SpecManager], ( _spec) => {
|
||||||
builder = tcb;
|
|
||||||
specMgr = _spec;
|
specMgr = _spec;
|
||||||
}));
|
}));
|
||||||
|
|
||||||
beforeEach(() => {
|
beforeEach(() => {
|
||||||
fixture = builder.createSync(TestAppComponent);
|
fixture = TestBed.createComponent(TestAppComponent);
|
||||||
let debugEl = getChildDebugElement(fixture.debugElement, 'json-schema');
|
let debugEl = getChildDebugElement(fixture.debugElement, 'json-schema');
|
||||||
component = debugEl.componentInstance;
|
component = debugEl.componentInstance;
|
||||||
});
|
});
|
||||||
|
@ -59,7 +62,6 @@ describe('Redoc components', () => {
|
||||||
/** Test component that contains a Method. */
|
/** Test component that contains a Method. */
|
||||||
@Component({
|
@Component({
|
||||||
selector: 'test-app',
|
selector: 'test-app',
|
||||||
directives: [JsonSchema],
|
|
||||||
providers: [SpecManager],
|
providers: [SpecManager],
|
||||||
template:
|
template:
|
||||||
`<json-schema></json-schema>`
|
`<json-schema></json-schema>`
|
||||||
|
|
|
@ -47,6 +47,7 @@ export class JsonSchema extends BaseComponent implements OnInit {
|
||||||
|
|
||||||
this.pointer = activeDescendant.$ref;
|
this.pointer = activeDescendant.$ref;
|
||||||
this.schema = this.specMgr.byPointer(this.pointer);
|
this.schema = this.specMgr.byPointer(this.pointer);
|
||||||
|
this.normalizer.reset();
|
||||||
this.schema = this.normalizer.normalize(this.schema, this.normPointer,
|
this.schema = this.normalizer.normalize(this.schema, this.normPointer,
|
||||||
{resolved: true});
|
{resolved: true});
|
||||||
this.preprocessSchema();
|
this.preprocessSchema();
|
||||||
|
@ -119,7 +120,7 @@ export class JsonSchema extends BaseComponent implements OnInit {
|
||||||
}
|
}
|
||||||
|
|
||||||
trackByName(index: number, item: any): number {
|
trackByName(index: number, item: any): number {
|
||||||
return item.name;
|
return item.name + (item._pointer || '');
|
||||||
}
|
}
|
||||||
|
|
||||||
ngOnInit() {
|
ngOnInit() {
|
||||||
|
|
|
@ -4,7 +4,7 @@ import { Component } from '@angular/core';
|
||||||
import {
|
import {
|
||||||
inject,
|
inject,
|
||||||
async,
|
async,
|
||||||
TestComponentBuilder
|
TestBed
|
||||||
} from '@angular/core/testing';
|
} from '@angular/core/testing';
|
||||||
|
|
||||||
import { getChildDebugElement } from '../../../tests/helpers';
|
import { getChildDebugElement } from '../../../tests/helpers';
|
||||||
|
@ -13,17 +13,20 @@ import { Method } from './method';
|
||||||
import { SpecManager } from '../../utils/SpecManager';;
|
import { SpecManager } from '../../utils/SpecManager';;
|
||||||
|
|
||||||
describe('Redoc components', () => {
|
describe('Redoc components', () => {
|
||||||
|
beforeEach(() => {
|
||||||
|
TestBed.configureTestingModule({ declarations: [ TestAppComponent ] });
|
||||||
|
});
|
||||||
describe('Method Component', () => {
|
describe('Method Component', () => {
|
||||||
let builder;
|
let builder;
|
||||||
let component;
|
let component;
|
||||||
|
|
||||||
beforeEach(async(inject([TestComponentBuilder, SpecManager], (tcb, specMgr) => {
|
beforeEach(async(inject([SpecManager], ( specMgr) => {
|
||||||
builder = tcb;
|
|
||||||
return specMgr.load('/tests/schemas/extended-petstore.yml');
|
return specMgr.load('/tests/schemas/extended-petstore.yml');
|
||||||
})));
|
})));
|
||||||
|
|
||||||
beforeEach(() => {
|
beforeEach(() => {
|
||||||
let fixture = builder.createSync(TestAppComponent);
|
let fixture = TestBed.createComponent(TestAppComponent);
|
||||||
component = getChildDebugElement(fixture.debugElement, 'method').componentInstance;
|
component = getChildDebugElement(fixture.debugElement, 'method').componentInstance;
|
||||||
fixture.detectChanges();
|
fixture.detectChanges();
|
||||||
});
|
});
|
||||||
|
@ -50,7 +53,6 @@ describe('Redoc components', () => {
|
||||||
/** Test component that contains a Method. */
|
/** Test component that contains a Method. */
|
||||||
@Component({
|
@Component({
|
||||||
selector: 'test-app',
|
selector: 'test-app',
|
||||||
directives: [Method],
|
|
||||||
providers: [SpecManager],
|
providers: [SpecManager],
|
||||||
template:
|
template:
|
||||||
`<method pointer='#/paths/~1user~1{username}/put'></method>`
|
`<method pointer='#/paths/~1user~1{username}/put'></method>`
|
||||||
|
|
|
@ -4,7 +4,7 @@ import { Component } from '@angular/core';
|
||||||
import {
|
import {
|
||||||
inject,
|
inject,
|
||||||
async,
|
async,
|
||||||
TestComponentBuilder
|
TestBed
|
||||||
} from '@angular/core/testing';
|
} from '@angular/core/testing';
|
||||||
|
|
||||||
import { getChildDebugElement } from '../../../tests/helpers';
|
import { getChildDebugElement } from '../../../tests/helpers';
|
||||||
|
@ -14,17 +14,20 @@ import { MethodsList } from './methods-list';
|
||||||
import { SpecManager } from '../../utils/SpecManager';
|
import { SpecManager } from '../../utils/SpecManager';
|
||||||
|
|
||||||
describe('Redoc components', () => {
|
describe('Redoc components', () => {
|
||||||
|
beforeEach(() => {
|
||||||
|
TestBed.configureTestingModule({ declarations: [ TestAppComponent ] });
|
||||||
|
});
|
||||||
describe('MethodsList Component', () => {
|
describe('MethodsList Component', () => {
|
||||||
let builder;
|
let builder;
|
||||||
let component;
|
let component;
|
||||||
let fixture;
|
let fixture;
|
||||||
|
|
||||||
beforeEach(async(inject([TestComponentBuilder, SpecManager], (tcb, specMgr) => {
|
beforeEach(async(inject([SpecManager], ( specMgr) => {
|
||||||
builder = tcb;
|
|
||||||
return specMgr.load('/tests/schemas/methods-list-component.json');
|
return specMgr.load('/tests/schemas/methods-list-component.json');
|
||||||
})));
|
})));
|
||||||
beforeEach(() => {
|
beforeEach(() => {
|
||||||
fixture = builder.createSync(TestAppComponent);
|
fixture = TestBed.createComponent(TestAppComponent);
|
||||||
component = getChildDebugElement(fixture.debugElement, 'methods-list').componentInstance;
|
component = getChildDebugElement(fixture.debugElement, 'methods-list').componentInstance;
|
||||||
fixture.detectChanges();
|
fixture.detectChanges();
|
||||||
});
|
});
|
||||||
|
@ -47,7 +50,6 @@ describe('Redoc components', () => {
|
||||||
|
|
||||||
@Component({
|
@Component({
|
||||||
selector: 'test-app',
|
selector: 'test-app',
|
||||||
directives: [ MethodsList ],
|
|
||||||
template:
|
template:
|
||||||
`<methods-list></methods-list>`
|
`<methods-list></methods-list>`
|
||||||
})
|
})
|
||||||
|
|
|
@ -16,7 +16,7 @@
|
||||||
title="{{param._displayTypeHint}}"> {{param._displayType}} {{param._displayFormat}}</span>
|
title="{{param._displayTypeHint}}"> {{param._displayType}} {{param._displayFormat}}</span>
|
||||||
<span class="param-range" *ngIf="param._range"> {{param._range}} </span>
|
<span class="param-range" *ngIf="param._range"> {{param._range}} </span>
|
||||||
<span *ngIf="param.required" class="param-required">Required</span>
|
<span *ngIf="param.required" class="param-required">Required</span>
|
||||||
<div class="default" *ngIf="param.default">Default: {{param.default | json}}</div>
|
<div class="default" *ngIf="param.default != null">Default: {{param.default | json}}</div>
|
||||||
<div *ngIf="param.enum" class="param-enum">
|
<div *ngIf="param.enum" class="param-enum">
|
||||||
<span *ngFor="let enumItem of param.enum" class="enum-value {{enumItem.type}}"> {{enumItem.val | json}} </span>
|
<span *ngFor="let enumItem of param.enum" class="enum-value {{enumItem.type}}"> {{enumItem.val | json}} </span>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -103,7 +103,7 @@ api-logo {
|
||||||
/* global redoc styles */
|
/* global redoc styles */
|
||||||
|
|
||||||
@for $index from 1 through 5 {
|
@for $index from 1 through 5 {
|
||||||
:host h#{$index}{
|
:host /deep/ h#{$index}{
|
||||||
margin-top: 0;
|
margin-top: 0;
|
||||||
font-family: $headers-font, $headers-font-family;
|
font-family: $headers-font, $headers-font-family;
|
||||||
color: $headers-color;
|
color: $headers-color;
|
||||||
|
@ -111,7 +111,7 @@ api-logo {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
:host {
|
:host /deep/ {
|
||||||
h1 { font-size: $h1; }
|
h1 { font-size: $h1; }
|
||||||
h2 { font-size: $h2; }
|
h2 { font-size: $h2; }
|
||||||
h3 { font-size: $h3; }
|
h3 { font-size: $h3; }
|
||||||
|
@ -168,7 +168,7 @@ footer {
|
||||||
|
|
||||||
/* markdown elements */
|
/* markdown elements */
|
||||||
|
|
||||||
:host .redoc-markdown-block {
|
:host /deep/ .redoc-markdown-block {
|
||||||
pre {
|
pre {
|
||||||
font-family: Courier, monospace;
|
font-family: Courier, monospace;
|
||||||
white-space: pre-wrap;
|
white-space: pre-wrap;
|
||||||
|
|
|
@ -8,7 +8,7 @@ import {
|
||||||
async
|
async
|
||||||
} from '@angular/core/testing';
|
} from '@angular/core/testing';
|
||||||
|
|
||||||
import { TestComponentBuilder } from '@angular/core/testing';
|
import { TestBed } from '@angular/core/testing';
|
||||||
|
|
||||||
import { Redoc } from './redoc';
|
import { Redoc } from './redoc';
|
||||||
import { SpecManager } from '../../utils/SpecManager';
|
import { SpecManager } from '../../utils/SpecManager';
|
||||||
|
@ -17,28 +17,31 @@ import { OptionsService } from '../../services/index';
|
||||||
let optsMgr:OptionsService;
|
let optsMgr:OptionsService;
|
||||||
|
|
||||||
describe('Redoc components', () => {
|
describe('Redoc components', () => {
|
||||||
|
beforeEach(() => {
|
||||||
|
TestBed.configureTestingModule({ declarations: [ TestAppComponent ] });
|
||||||
|
});
|
||||||
describe('Redoc Component', () => {
|
describe('Redoc Component', () => {
|
||||||
let builder;
|
let builder;
|
||||||
let specMgr;
|
let specMgr;
|
||||||
|
|
||||||
beforeEach(async(inject([TestComponentBuilder, SpecManager, OptionsService],
|
beforeEach(async(inject([SpecManager, OptionsService],
|
||||||
(tcb, _specMgr, _optsMgr) => {
|
( _specMgr, _optsMgr) => {
|
||||||
optsMgr = _optsMgr;
|
optsMgr = _optsMgr;
|
||||||
builder = tcb;
|
|
||||||
specMgr = _specMgr;
|
specMgr = _specMgr;
|
||||||
return specMgr.load('/tests/schemas/extended-petstore.yml');
|
return specMgr.load('/tests/schemas/extended-petstore.yml');
|
||||||
})));
|
})));
|
||||||
|
|
||||||
|
|
||||||
it('should init component', () => {
|
it('should init component', () => {
|
||||||
let fixture = builder.createSync(TestAppComponent);
|
let fixture = TestBed.createComponent(TestAppComponent);
|
||||||
let component = getChildDebugElement(fixture.debugElement, 'redoc').componentInstance;
|
let component = getChildDebugElement(fixture.debugElement, 'redoc').componentInstance;
|
||||||
expect(component).not.toBeNull();
|
expect(component).not.toBeNull();
|
||||||
fixture.destroy();
|
fixture.destroy();
|
||||||
});
|
});
|
||||||
|
|
||||||
it('should init components tree without errors', () => {
|
it('should init components tree without errors', () => {
|
||||||
let fixture = builder.createSync(TestAppComponent);
|
let fixture = TestBed.createComponent(TestAppComponent);
|
||||||
(() => fixture.detectChanges()).should.not.throw();
|
(() => fixture.detectChanges()).should.not.throw();
|
||||||
fixture.destroy();
|
fixture.destroy();
|
||||||
});
|
});
|
||||||
|
@ -89,16 +92,16 @@ describe('Redoc components', () => {
|
||||||
// let dom;
|
// let dom;
|
||||||
// let destroySpy;
|
// let destroySpy;
|
||||||
//
|
//
|
||||||
// beforeEach(async(inject([TestComponentBuilder, SpecManager, OptionsService, BrowserDomAdapter],
|
// beforeEach(async(inject([SpecManager, OptionsService, BrowserDomAdapter],
|
||||||
// (tcb, specMgr, opts, _dom) => {
|
// ( specMgr, opts, _dom) => {
|
||||||
// builder = tcb;
|
//
|
||||||
// optsMgr = opts;
|
// optsMgr = opts;
|
||||||
// dom = _dom;
|
// dom = _dom;
|
||||||
// return specMgr.load('/tests/schemas/extended-petstore.yml');
|
// return specMgr.load('/tests/schemas/extended-petstore.yml');
|
||||||
// })));
|
// })));
|
||||||
//
|
//
|
||||||
// beforeEach(() => {
|
// beforeEach(() => {
|
||||||
// fixture = builder.createSync(TestAppComponent);
|
// fixture = TestBed.createComponent(TestAppComponent);
|
||||||
// element = getChildDebugElement(fixture.debugElement, 'methods-list').nativeElement;
|
// element = getChildDebugElement(fixture.debugElement, 'methods-list').nativeElement;
|
||||||
// destroySpy = jasmine.createSpy('spy');
|
// destroySpy = jasmine.createSpy('spy');
|
||||||
// Redoc.appRef = <ComponentRef<any>>{
|
// Redoc.appRef = <ComponentRef<any>>{
|
||||||
|
@ -165,7 +168,6 @@ describe('Redoc components', () => {
|
||||||
/** Test component that contains a Redoc. */
|
/** Test component that contains a Redoc. */
|
||||||
@Component({
|
@Component({
|
||||||
selector: 'test-app',
|
selector: 'test-app',
|
||||||
directives: [Redoc],
|
|
||||||
template:
|
template:
|
||||||
`<redoc disable-lazy-schemas></redoc>`
|
`<redoc disable-lazy-schemas></redoc>`
|
||||||
})
|
})
|
||||||
|
|
|
@ -46,7 +46,7 @@ header {
|
||||||
font-weight: normal;
|
font-weight: normal;
|
||||||
}
|
}
|
||||||
|
|
||||||
:host > tabs > ul li {
|
:host /deep/ > tabs > ul li {
|
||||||
font-family: $headers-font;
|
font-family: $headers-font;
|
||||||
font-size: .9em;
|
font-size: .9em;
|
||||||
border-radius: $border-radius;
|
border-radius: $border-radius;
|
||||||
|
@ -66,7 +66,7 @@ header {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
:host tabs ul {
|
:host /deep/ tabs ul {
|
||||||
padding-top: 10px;
|
padding-top: 10px;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -55,7 +55,7 @@ pre {
|
||||||
opacity: 1;
|
opacity: 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
:host {
|
:host /deep/ {
|
||||||
.property {
|
.property {
|
||||||
//font-weight: bold;
|
//font-weight: bold;
|
||||||
}
|
}
|
||||||
|
|
|
@ -5,13 +5,11 @@ import { Component, ElementRef, Input, ChangeDetectionStrategy, OnInit } from '@
|
||||||
import * as OpenAPISampler from 'openapi-sampler';
|
import * as OpenAPISampler from 'openapi-sampler';
|
||||||
|
|
||||||
import { BaseComponent, SpecManager } from '../base';
|
import { BaseComponent, SpecManager } from '../base';
|
||||||
import { JsonFormatter } from '../../utils/JsonFormatterPipe';
|
|
||||||
import { SchemaNormalizer } from '../../services/schema-normalizer.service';
|
import { SchemaNormalizer } from '../../services/schema-normalizer.service';
|
||||||
|
|
||||||
@Component({
|
@Component({
|
||||||
selector: 'schema-sample',
|
selector: 'schema-sample',
|
||||||
templateUrl: './schema-sample.html',
|
templateUrl: './schema-sample.html',
|
||||||
pipes: [JsonFormatter],
|
|
||||||
styleUrls: ['./schema-sample.css'],
|
styleUrls: ['./schema-sample.css'],
|
||||||
changeDetection: ChangeDetectionStrategy.OnPush
|
changeDetection: ChangeDetectionStrategy.OnPush
|
||||||
})
|
})
|
||||||
|
|
|
@ -9,7 +9,7 @@ import {
|
||||||
async
|
async
|
||||||
} from '@angular/core/testing';
|
} from '@angular/core/testing';
|
||||||
|
|
||||||
import { TestComponentBuilder } from '@angular/core/testing';
|
import { TestBed } from '@angular/core/testing';
|
||||||
|
|
||||||
import { MethodsList, SideMenu } from '../index';
|
import { MethodsList, SideMenu } from '../index';
|
||||||
|
|
||||||
|
@ -18,14 +18,17 @@ import { SpecManager } from '../../utils/SpecManager';
|
||||||
let testOptions;
|
let testOptions;
|
||||||
|
|
||||||
describe('Redoc components', () => {
|
describe('Redoc components', () => {
|
||||||
|
beforeEach(() => {
|
||||||
|
TestBed.configureTestingModule({ declarations: [ TestAppComponent ] });
|
||||||
|
});
|
||||||
describe('SideMenu Component', () => {
|
describe('SideMenu Component', () => {
|
||||||
let builder;
|
let builder;
|
||||||
let component;
|
let component;
|
||||||
let fixture;
|
let fixture;
|
||||||
|
|
||||||
beforeEach(async(inject([TestComponentBuilder, SpecManager, OptionsService],
|
beforeEach(async(inject([SpecManager, OptionsService],
|
||||||
(tcb, specMgr, opts) => {
|
( specMgr, opts) => {
|
||||||
builder = tcb;
|
|
||||||
testOptions = opts;
|
testOptions = opts;
|
||||||
testOptions.options = {
|
testOptions.options = {
|
||||||
scrollYOffset: () => 0,
|
scrollYOffset: () => 0,
|
||||||
|
@ -35,7 +38,7 @@ describe('Redoc components', () => {
|
||||||
})));
|
})));
|
||||||
|
|
||||||
beforeEach(() => {
|
beforeEach(() => {
|
||||||
fixture = builder.createSync(TestAppComponent);
|
fixture = TestBed.createComponent(TestAppComponent);
|
||||||
component = getChildDebugElement(fixture.debugElement, 'side-menu').componentInstance;
|
component = getChildDebugElement(fixture.debugElement, 'side-menu').componentInstance;
|
||||||
fixture.detectChanges();
|
fixture.detectChanges();
|
||||||
});
|
});
|
||||||
|
@ -54,7 +57,6 @@ describe('Redoc components', () => {
|
||||||
/** Test component that contains an ApiInfo. */
|
/** Test component that contains an ApiInfo. */
|
||||||
@Component({
|
@Component({
|
||||||
selector: 'test-app',
|
selector: 'test-app',
|
||||||
directives: [MethodsList, SideMenu],
|
|
||||||
template:
|
template:
|
||||||
`<side-menu></side-menu>
|
`<side-menu></side-menu>
|
||||||
<methods-list></methods-list>`
|
<methods-list></methods-list>`
|
||||||
|
|
|
@ -2,13 +2,15 @@
|
||||||
|
|
||||||
import { Component, ElementRef, ChangeDetectorRef, OnInit } from '@angular/core';
|
import { Component, ElementRef, ChangeDetectorRef, OnInit } from '@angular/core';
|
||||||
|
|
||||||
import { global } from '@angular/core/src/facade/lang';
|
//import { global } from '@angular/core/src/facade/lang';
|
||||||
import { trigger, state, animate, transition, style } from '@angular/core';
|
import { trigger, state, animate, transition, style } from '@angular/core';
|
||||||
import { BaseComponent, SpecManager } from '../base';
|
import { BaseComponent, SpecManager } from '../base';
|
||||||
import { ScrollService, Hash, MenuService, OptionsService } from '../../services/index';
|
import { ScrollService, Hash, MenuService, OptionsService } from '../../services/index';
|
||||||
import { BrowserDomAdapter as DOM } from '../../utils/browser-adapter';
|
import { BrowserDomAdapter as DOM } from '../../utils/browser-adapter';
|
||||||
import { MenuCategory } from '../../services/schema-helper.service';
|
import { MenuCategory } from '../../services/schema-helper.service';
|
||||||
|
|
||||||
|
const global = window;
|
||||||
|
|
||||||
@Component({
|
@Component({
|
||||||
selector: 'side-menu',
|
selector: 'side-menu',
|
||||||
templateUrl: './side-menu.html',
|
templateUrl: './side-menu.html',
|
||||||
|
|
|
@ -1,4 +1,30 @@
|
||||||
import 'core-js/es6';
|
import 'core-js/es6/symbol';
|
||||||
|
import 'core-js/es6/object';
|
||||||
|
import 'core-js/es6/function';
|
||||||
|
import 'core-js/es6/parse-int';
|
||||||
|
import 'core-js/es6/parse-float';
|
||||||
|
import 'core-js/es6/number';
|
||||||
|
import 'core-js/es6/math';
|
||||||
|
import 'core-js/es6/string';
|
||||||
|
import 'core-js/es6/date';
|
||||||
|
import 'core-js/es6/array';
|
||||||
|
import 'core-js/es6/regexp';
|
||||||
|
import 'core-js/es6/map';
|
||||||
|
import 'core-js/es6/set';
|
||||||
|
import 'core-js/es6/weak-map';
|
||||||
|
import 'core-js/es6/weak-set';
|
||||||
|
import 'core-js/es6/typed';
|
||||||
|
import 'core-js/es6/reflect';
|
||||||
|
// see issue https://github.com/AngularClass/angular2-webpack-starter/issues/709
|
||||||
|
// import 'core-js/es6/promise';
|
||||||
|
|
||||||
import 'core-js/es7/reflect';
|
import 'core-js/es7/reflect';
|
||||||
import 'ts-helpers';
|
|
||||||
import 'zone.js/dist/zone';
|
import 'zone.js/dist/zone';
|
||||||
|
|
||||||
|
// Typescript emit helpers polyfill
|
||||||
|
import 'ts-helpers';
|
||||||
|
|
||||||
|
if (!IS_PRODUCTION) {
|
||||||
|
Error.stackTraceLimit = Infinity;
|
||||||
|
require('zone.js/dist/long-stack-trace-zone');
|
||||||
|
}
|
||||||
|
|
|
@ -3,32 +3,34 @@ import { Component } from '@angular/core';
|
||||||
import {
|
import {
|
||||||
inject,
|
inject,
|
||||||
async,
|
async,
|
||||||
TestComponentBuilder
|
TestBed
|
||||||
} from '@angular/core/testing';
|
} from '@angular/core/testing';
|
||||||
|
|
||||||
import { MenuService } from './menu.service';
|
import { MenuService } from './menu.service';
|
||||||
import { Hash } from './hash.service';
|
import { Hash } from './hash.service';
|
||||||
import { ScrollService } from './scroll.service';
|
import { ScrollService } from './scroll.service';
|
||||||
import { MethodsList } from '../components/index';
|
|
||||||
import { SpecManager } from '../utils/SpecManager';;
|
import { SpecManager } from '../utils/SpecManager';;
|
||||||
|
|
||||||
describe('Menu service', () => {
|
describe('Menu service', () => {
|
||||||
|
beforeEach(() => {
|
||||||
|
TestBed.configureTestingModule({ declarations: [ TestAppComponent ] });
|
||||||
|
});
|
||||||
|
|
||||||
let menu, hashService, scroll;
|
let menu, hashService, scroll;
|
||||||
let builder;
|
|
||||||
let specMgr;
|
let specMgr;
|
||||||
|
|
||||||
beforeEach(async(inject([TestComponentBuilder, SpecManager, Hash, ScrollService],
|
beforeEach(async(inject([SpecManager, Hash, ScrollService],
|
||||||
(tcb, _specMgr, _hash, _scroll, _menu) => {
|
( _specMgr, _hash, _scroll, _menu) => {
|
||||||
hashService = _hash;
|
hashService = _hash;
|
||||||
scroll = _scroll;
|
scroll = _scroll;
|
||||||
builder = tcb;
|
|
||||||
specMgr = _specMgr;
|
specMgr = _specMgr;
|
||||||
return specMgr.load('/tests/schemas/extended-petstore.yml');
|
return specMgr.load('/tests/schemas/extended-petstore.yml');
|
||||||
})));
|
})));
|
||||||
|
|
||||||
beforeEach(() => {
|
beforeEach(() => {
|
||||||
menu = new MenuService(hashService, scroll, specMgr);
|
menu = new MenuService(hashService, scroll, specMgr);
|
||||||
let fixture = builder.createSync(TestAppComponent);
|
let fixture = TestBed.createComponent(TestAppComponent);
|
||||||
fixture.detectChanges();
|
fixture.detectChanges();
|
||||||
});
|
});
|
||||||
|
|
||||||
|
@ -91,7 +93,6 @@ describe('Menu service', () => {
|
||||||
|
|
||||||
@Component({
|
@Component({
|
||||||
selector: 'test-app',
|
selector: 'test-app',
|
||||||
directives: [ MethodsList ],
|
|
||||||
template:
|
template:
|
||||||
`<div id='parent' style='height: 500px; overflow:auto'>
|
`<div id='parent' style='height: 500px; overflow:auto'>
|
||||||
<methods-list></methods-list>
|
<methods-list></methods-list>
|
||||||
|
|
|
@ -41,6 +41,10 @@ export class SchemaNormalizer {
|
||||||
res['x-redoc-normalized'] = true;
|
res['x-redoc-normalized'] = true;
|
||||||
return res;
|
return res;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
reset() {
|
||||||
|
this._dereferencer.reset();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
class SchemaWalker {
|
class SchemaWalker {
|
||||||
|
@ -178,6 +182,9 @@ class SchemaDereferencer {
|
||||||
|
|
||||||
constructor(private _spec: SpecManager, private normalizator: SchemaNormalizer) {
|
constructor(private _spec: SpecManager, private normalizator: SchemaNormalizer) {
|
||||||
}
|
}
|
||||||
|
reset() {
|
||||||
|
this._refCouner.reset();
|
||||||
|
}
|
||||||
|
|
||||||
visit($ref) {
|
visit($ref) {
|
||||||
this._refCouner.visit($ref);
|
this._refCouner.visit($ref);
|
||||||
|
@ -208,7 +215,7 @@ class SchemaDereferencer {
|
||||||
let keysCount = Object.keys(schema).length;
|
let keysCount = Object.keys(schema).length;
|
||||||
if ( keysCount > 2 || (keysCount === 2 && !schema.description) ) {
|
if ( keysCount > 2 || (keysCount === 2 && !schema.description) ) {
|
||||||
WarningsService.warn(`Other properties are defined at the same level as $ref at "#${pointer}". ` +
|
WarningsService.warn(`Other properties are defined at the same level as $ref at "#${pointer}". ` +
|
||||||
'They are IGNORRED according to the JsonSchema spec');
|
'They are IGNORED according to the JsonSchema spec');
|
||||||
resolved.description = resolved.description || schema.description;
|
resolved.description = resolved.description || schema.description;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
@import '../../styles/variables';
|
@import '../../styles/variables';
|
||||||
|
|
||||||
:host {
|
:host /deep/ {
|
||||||
.dk-select {
|
.dk-select {
|
||||||
max-width: 100%;
|
max-width: 100%;
|
||||||
font-family: $headers-font, $headers-font-family;
|
font-family: $headers-font, $headers-font-family;
|
||||||
|
|
|
@ -4,20 +4,23 @@ import { getChildDebugElementByType } from '../../../../tests/helpers';
|
||||||
import { Component } from '@angular/core';
|
import { Component } from '@angular/core';
|
||||||
import {
|
import {
|
||||||
inject,
|
inject,
|
||||||
TestComponentBuilder
|
TestBed
|
||||||
} from '@angular/core/testing';
|
} from '@angular/core/testing';
|
||||||
|
|
||||||
import { StickySidebar } from '../index';
|
import { StickySidebar } from '../index';
|
||||||
|
|
||||||
describe('Common components', () => {
|
describe('Common components', () => {
|
||||||
|
beforeEach(() => {
|
||||||
|
TestBed.configureTestingModule({ declarations: [ TestApp ] });
|
||||||
|
});
|
||||||
describe('StickySidebar Component', () => {
|
describe('StickySidebar Component', () => {
|
||||||
let builder;
|
let builder;
|
||||||
let component;
|
let component;
|
||||||
let fixture;
|
let fixture;
|
||||||
|
|
||||||
beforeEach(inject([TestComponentBuilder], (tcb) => {
|
beforeEach(inject([TestBed], (tcb) => {
|
||||||
builder = tcb;
|
|
||||||
fixture = builder.createSync(TestApp);
|
fixture = TestBed.createComponent(TestApp);
|
||||||
let debugEl = getChildDebugElementByType(fixture.debugElement, StickySidebar);
|
let debugEl = getChildDebugElementByType(fixture.debugElement, StickySidebar);
|
||||||
component = debugEl.injector.get(StickySidebar);
|
component = debugEl.injector.get(StickySidebar);
|
||||||
}));
|
}));
|
||||||
|
@ -64,7 +67,6 @@ describe('Common components', () => {
|
||||||
/** Test component that contains an ApiInfo. */
|
/** Test component that contains an ApiInfo. */
|
||||||
@Component({
|
@Component({
|
||||||
selector: 'test-app',
|
selector: 'test-app',
|
||||||
directives: [StickySidebar],
|
|
||||||
template:
|
template:
|
||||||
`<div style="padding-top: 20px">
|
`<div style="padding-top: 20px">
|
||||||
<div style="height: 20px; position: fixed; top: 0;"> </div>
|
<div style="height: 20px; position: fixed; top: 0;"> </div>
|
||||||
|
|
|
@ -5,12 +5,15 @@ import { Component } from '@angular/core';
|
||||||
|
|
||||||
import {
|
import {
|
||||||
inject,
|
inject,
|
||||||
TestComponentBuilder
|
TestBed
|
||||||
} from '@angular/core/testing';
|
} from '@angular/core/testing';
|
||||||
|
|
||||||
import {Tabs, Tab} from '../index';
|
import {Tabs, Tab} from '../index';
|
||||||
|
|
||||||
describe('Common components', () => {
|
describe('Common components', () => {
|
||||||
|
beforeEach(() => {
|
||||||
|
TestBed.configureTestingModule({ declarations: [ TestApp ] });
|
||||||
|
});
|
||||||
describe('Tabs Component', () => {
|
describe('Tabs Component', () => {
|
||||||
let builder;
|
let builder;
|
||||||
let component;
|
let component;
|
||||||
|
@ -19,9 +22,9 @@ describe('Common components', () => {
|
||||||
let fixture;
|
let fixture;
|
||||||
let hostComponent;
|
let hostComponent;
|
||||||
|
|
||||||
beforeEach(inject([TestComponentBuilder], (tcb) => {
|
beforeEach(inject([TestBed], (tcb) => {
|
||||||
builder = tcb;
|
|
||||||
fixture = builder.createSync(TestApp);
|
fixture = TestBed.createComponent(TestApp);
|
||||||
hostComponent = fixture.debugElement.componentInstance;
|
hostComponent = fixture.debugElement.componentInstance;
|
||||||
debugEl = getChildDebugElement(fixture.debugElement, 'tabs');
|
debugEl = getChildDebugElement(fixture.debugElement, 'tabs');
|
||||||
childDebugEls = getChildDebugElementAll(debugEl, 'tab');
|
childDebugEls = getChildDebugElementAll(debugEl, 'tab');
|
||||||
|
@ -131,7 +134,6 @@ describe('Common components', () => {
|
||||||
/** Test component that contains an ApiInfo. */
|
/** Test component that contains an ApiInfo. */
|
||||||
@Component({
|
@Component({
|
||||||
selector: 'test-app',
|
selector: 'test-app',
|
||||||
directives: [Tabs, Tab],
|
|
||||||
template:
|
template:
|
||||||
`<tabs (change)="onEvent($event)">
|
`<tabs (change)="onEvent($event)">
|
||||||
<tab tabTitle="Tab1" tabStatus="test">Test</tab>
|
<tab tabTitle="Tab1" tabStatus="test">Test</tab>
|
||||||
|
|
|
@ -21,7 +21,7 @@ $zippy-redirect-bg-color: rgba($zippy-redirect-color, .08);
|
||||||
.zippy-title {
|
.zippy-title {
|
||||||
padding: 10px;
|
padding: 10px;
|
||||||
border-radius: 2px;
|
border-radius: 2px;
|
||||||
margin: 2px 0;
|
margin-bottom: 4px;
|
||||||
line-height: 1.5em;
|
line-height: 1.5em;
|
||||||
background-color: #f2f2f2;
|
background-color: #f2f2f2;
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
|
@ -46,16 +46,12 @@ $zippy-redirect-bg-color: rgba($zippy-redirect-color, .08);
|
||||||
background-color: $zippy-info-bg-color;
|
background-color: $zippy-info-bg-color;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.zippy-indicator svg {
|
.zippy-indicator svg {
|
||||||
height: 1.2em;
|
height: 1.2em;
|
||||||
vertical-align: middle;
|
vertical-align: middle;
|
||||||
transition: all 0.3s ease;
|
|
||||||
transform: rotateZ(-180deg);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.zippy-hidden > .zippy-title svg {
|
|
||||||
transform: rotateZ(0);
|
|
||||||
}
|
|
||||||
|
|
||||||
.zippy-title polygon {
|
.zippy-title polygon {
|
||||||
.zippy-success > & {
|
.zippy-success > & {
|
||||||
|
|
|
@ -5,21 +5,23 @@ import { getChildDebugElement, mouseclick } from '../../../../tests/helpers';
|
||||||
import { Component } from '@angular/core';
|
import { Component } from '@angular/core';
|
||||||
import {
|
import {
|
||||||
inject,
|
inject,
|
||||||
TestComponentBuilder
|
TestBed
|
||||||
} from '@angular/core/testing';
|
} from '@angular/core/testing';
|
||||||
|
|
||||||
import { Zippy } from '../index';
|
import { Zippy } from '../index';
|
||||||
|
|
||||||
describe('Common components', () => {
|
describe('Common components', () => {
|
||||||
|
beforeEach(() => {
|
||||||
|
TestBed.configureTestingModule({ declarations: [ TestApp ] });
|
||||||
|
});
|
||||||
describe('Zippy Component', () => {
|
describe('Zippy Component', () => {
|
||||||
let builder;
|
let builder;
|
||||||
let component;
|
let component;
|
||||||
let nativeElement;
|
let nativeElement;
|
||||||
let fixture;
|
let fixture;
|
||||||
|
|
||||||
beforeEach(inject([TestComponentBuilder], (tcb) => {
|
beforeEach(inject([TestBed], (tcb) => {
|
||||||
builder = tcb;
|
fixture = TestBed.createComponent(TestApp);
|
||||||
fixture = builder.createSync(TestApp);
|
|
||||||
let debugEl = getChildDebugElement(fixture.debugElement, 'zippy');
|
let debugEl = getChildDebugElement(fixture.debugElement, 'zippy');
|
||||||
component = debugEl.componentInstance;
|
component = debugEl.componentInstance;
|
||||||
nativeElement = debugEl.nativeElement;
|
nativeElement = debugEl.nativeElement;
|
||||||
|
@ -92,7 +94,6 @@ describe('Common components', () => {
|
||||||
/** Test component that contains an ApiInfo. */
|
/** Test component that contains an ApiInfo. */
|
||||||
@Component({
|
@Component({
|
||||||
selector: 'test-app',
|
selector: 'test-app',
|
||||||
directives: [Zippy],
|
|
||||||
template:
|
template:
|
||||||
`<zippy title="Zippy" type="test" [visible]="true" [empty]="true" (open)="open()" (close)="close()">test</zippy>`
|
`<zippy title="Zippy" type="test" [visible]="true" [empty]="true" (open)="open()" (close)="close()">test</zippy>`
|
||||||
})
|
})
|
||||||
|
|
|
@ -1,14 +1,18 @@
|
||||||
'use strict';
|
'use strict';
|
||||||
import { Pipe, PipeTransform } from '@angular/core';
|
import { Pipe, PipeTransform } from '@angular/core';
|
||||||
import { isBlank } from '@angular/core/src/facade/lang';
|
//import { isBlank } from '@angular/core/src/facade/lang';
|
||||||
import { DomSanitizationService } from '@angular/platform-browser';
|
import { DomSanitizer } from '@angular/platform-browser';
|
||||||
|
|
||||||
|
function isBlank(obj) {
|
||||||
|
return obj === undefined || obj === null;
|
||||||
|
}
|
||||||
|
|
||||||
var level = 1;
|
var level = 1;
|
||||||
const COLLAPSE_LEVEL = 2;
|
const COLLAPSE_LEVEL = 2;
|
||||||
|
|
||||||
@Pipe({ name: 'jsonFormatter' })
|
@Pipe({ name: 'jsonFormatter' })
|
||||||
export class JsonFormatter implements PipeTransform {
|
export class JsonFormatter implements PipeTransform {
|
||||||
constructor(private sanitizer: DomSanitizationService) {}
|
constructor(private sanitizer: DomSanitizer) {}
|
||||||
transform(value) {
|
transform(value) {
|
||||||
if (isBlank(value)) return value;
|
if (isBlank(value)) return value;
|
||||||
return this.sanitizer.bypassSecurityTrustHtml(jsonToHTML(value));
|
return this.sanitizer.bypassSecurityTrustHtml(jsonToHTML(value));
|
||||||
|
|
|
@ -4,7 +4,7 @@ import * as JsonSchemaRefParser from 'json-schema-ref-parser';
|
||||||
import { JsonPointer } from './JsonPointer';
|
import { JsonPointer } from './JsonPointer';
|
||||||
import { renderMd, safePush } from './helpers';
|
import { renderMd, safePush } from './helpers';
|
||||||
import * as slugify from 'slugify';
|
import * as slugify from 'slugify';
|
||||||
import { parse as urlParse } from 'url';
|
import { parse as urlParse, resolve as urlResolve } from 'url';
|
||||||
|
|
||||||
export class SpecManager {
|
export class SpecManager {
|
||||||
public _schema: any = {};
|
public _schema: any = {};
|
||||||
|
@ -42,7 +42,7 @@ export class SpecManager {
|
||||||
|
|
||||||
/* calculate common used values */
|
/* calculate common used values */
|
||||||
init() {
|
init() {
|
||||||
let urlParts = this._url ? urlParse(this._url) : {};
|
let urlParts = this._url ? urlParse(urlResolve(window.location.href, this._url)) : {};
|
||||||
let schemes = this._schema.schemes;
|
let schemes = this._schema.schemes;
|
||||||
let protocol;
|
let protocol;
|
||||||
if (!schemes || !schemes.length) {
|
if (!schemes || !schemes.length) {
|
||||||
|
@ -56,7 +56,8 @@ export class SpecManager {
|
||||||
}
|
}
|
||||||
|
|
||||||
let host = this._schema.host || urlParts.host;
|
let host = this._schema.host || urlParts.host;
|
||||||
this.apiUrl = protocol + '://' + host + this._schema.basePath;
|
let basePath = this._schema.basePath || '/';
|
||||||
|
this.apiUrl = protocol + '://' + host + basePath;
|
||||||
if (this.apiUrl.endsWith('/')) {
|
if (this.apiUrl.endsWith('/')) {
|
||||||
this.apiUrl = this.apiUrl.substr(0, this.apiUrl.length - 1);
|
this.apiUrl = this.apiUrl.substr(0, this.apiUrl.length - 1);
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,15 +1,21 @@
|
||||||
'use strict';
|
'use strict';
|
||||||
|
|
||||||
import { Pipe, PipeTransform } from '@angular/core';
|
import { Pipe, PipeTransform } from '@angular/core';
|
||||||
import { DomSanitizationService } from '@angular/platform-browser';
|
import { DomSanitizer } from '@angular/platform-browser';
|
||||||
import { isString, stringify, isBlank } from '@angular/core/src/facade/lang';
|
import { isString, stringify, isBlank } from '@angular/core/src/facade/lang';
|
||||||
import { BaseException } from '@angular/core/src/facade/exceptions';
|
|
||||||
import JsonPointer from './JsonPointer';
|
import JsonPointer from './JsonPointer';
|
||||||
import { renderMd } from './helpers';
|
import { renderMd } from './helpers';
|
||||||
|
import { JsonFormatter } from './JsonFormatterPipe';
|
||||||
|
|
||||||
declare var Prism: any;
|
declare var Prism: any;
|
||||||
|
|
||||||
|
|
||||||
|
class BaseException {
|
||||||
|
message: string;
|
||||||
|
constructor(message) {
|
||||||
|
this.message = message;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
class InvalidPipeArgumentException extends BaseException {
|
class InvalidPipeArgumentException extends BaseException {
|
||||||
constructor(type, value) {
|
constructor(type, value) {
|
||||||
|
@ -52,7 +58,7 @@ export class JsonPointerEscapePipe implements PipeTransform {
|
||||||
|
|
||||||
@Pipe({ name: 'marked' })
|
@Pipe({ name: 'marked' })
|
||||||
export class MarkedPipe implements PipeTransform {
|
export class MarkedPipe implements PipeTransform {
|
||||||
constructor(private sanitizer: DomSanitizationService) {}
|
constructor(private sanitizer: DomSanitizer) {}
|
||||||
transform(value:string) {
|
transform(value:string) {
|
||||||
if (isBlank(value)) return value;
|
if (isBlank(value)) return value;
|
||||||
if (!isString(value)) {
|
if (!isString(value)) {
|
||||||
|
@ -67,7 +73,7 @@ export class MarkedPipe implements PipeTransform {
|
||||||
|
|
||||||
@Pipe({ name: 'safe' })
|
@Pipe({ name: 'safe' })
|
||||||
export class SafePipe implements PipeTransform {
|
export class SafePipe implements PipeTransform {
|
||||||
constructor(private sanitizer: DomSanitizationService) {}
|
constructor(private sanitizer: DomSanitizer) {}
|
||||||
transform(value:string) {
|
transform(value:string) {
|
||||||
if (isBlank(value)) return value;
|
if (isBlank(value)) return value;
|
||||||
if (!isString(value)) {
|
if (!isString(value)) {
|
||||||
|
@ -88,7 +94,7 @@ const langMap = {
|
||||||
|
|
||||||
@Pipe({ name: 'prism' })
|
@Pipe({ name: 'prism' })
|
||||||
export class PrismPipe implements PipeTransform {
|
export class PrismPipe implements PipeTransform {
|
||||||
constructor(private sanitizer: DomSanitizationService) {}
|
constructor(private sanitizer: DomSanitizer) {}
|
||||||
transform(value, args) {
|
transform(value, args) {
|
||||||
if (isBlank(args) || args.length === 0) {
|
if (isBlank(args) || args.length === 0) {
|
||||||
throw new BaseException('Prism pipe requires one argument');
|
throw new BaseException('Prism pipe requires one argument');
|
||||||
|
@ -119,5 +125,5 @@ export class EncodeURIComponentPipe implements PipeTransform {
|
||||||
}
|
}
|
||||||
|
|
||||||
export const REDOC_PIPES = [
|
export const REDOC_PIPES = [
|
||||||
JsonPointerEscapePipe, MarkedPipe, SafePipe, PrismPipe, EncodeURIComponentPipe
|
JsonPointerEscapePipe, MarkedPipe, SafePipe, PrismPipe, EncodeURIComponentPipe, JsonFormatter
|
||||||
];
|
];
|
||||||
|
|
|
@ -23,9 +23,12 @@ import 'dropkickjs/build/css/dropkick.css';
|
||||||
import 'prismjs/themes/prism-dark.css';
|
import 'prismjs/themes/prism-dark.css';
|
||||||
import 'hint.css/hint.base.css';
|
import 'hint.css/hint.base.css';
|
||||||
|
|
||||||
import '@angular/common';
|
if (!IS_PRODUCTION) {
|
||||||
import '@angular/core';
|
require('@angular/platform-browser');
|
||||||
import '@angular/platform-browser';
|
require('@angular/platform-browser-dynamic');
|
||||||
|
require('@angular/core');
|
||||||
|
require('@angular/common');
|
||||||
|
|
||||||
// RxJS
|
// RxJS
|
||||||
import 'rxjs/Rx';
|
require('rxjs/Rx');
|
||||||
|
}
|
||||||
|
|
5
manual-types/index.d.ts
vendored
5
manual-types/index.d.ts
vendored
|
@ -14,3 +14,8 @@ declare module "*.css" {
|
||||||
|
|
||||||
declare var LIB_VERSION: any;
|
declare var LIB_VERSION: any;
|
||||||
declare var IS_PRODUCTION: any;
|
declare var IS_PRODUCTION: any;
|
||||||
|
|
||||||
|
interface ErrorStackTraceLimit {
|
||||||
|
stackTraceLimit: number;
|
||||||
|
}
|
||||||
|
interface ErrorConstructor extends ErrorStackTraceLimit {}
|
||||||
|
|
35
package.json
35
package.json
|
@ -1,7 +1,7 @@
|
||||||
{
|
{
|
||||||
"name": "redoc",
|
"name": "redoc",
|
||||||
"description": "Swagger-generated API Reference Documentation",
|
"description": "Swagger-generated API Reference Documentation",
|
||||||
"version": "1.3.0",
|
"version": "1.3.1",
|
||||||
"repository": {
|
"repository": {
|
||||||
"type": "git",
|
"type": "git",
|
||||||
"url": "git://github.com/Rebilly/ReDoc"
|
"url": "git://github.com/Rebilly/ReDoc"
|
||||||
|
@ -40,6 +40,7 @@
|
||||||
"author": "Roman Hotsiy",
|
"author": "Roman Hotsiy",
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
|
"@angular/compiler-cli": "^0.6.0",
|
||||||
"@types/core-js": "^0.9.31",
|
"@types/core-js": "^0.9.31",
|
||||||
"@types/jasmine": "^2.2.32",
|
"@types/jasmine": "^2.2.32",
|
||||||
"@types/requirejs": "^2.1.26",
|
"@types/requirejs": "^2.1.26",
|
||||||
|
@ -57,8 +58,8 @@
|
||||||
"istanbul-instrumenter-loader": "^0.2.0",
|
"istanbul-instrumenter-loader": "^0.2.0",
|
||||||
"jasmine-core": "^2.4.1",
|
"jasmine-core": "^2.4.1",
|
||||||
"jasmine-spec-reporter": "^2.4.0",
|
"jasmine-spec-reporter": "^2.4.0",
|
||||||
"karma": "^0.13.15",
|
"karma": "^1.2.0",
|
||||||
"karma-chrome-launcher": "^1.0.1",
|
"karma-chrome-launcher": "^2.0.0",
|
||||||
"karma-coverage": "github:douglasduteil/karma-coverage#next",
|
"karma-coverage": "github:douglasduteil/karma-coverage#next",
|
||||||
"karma-coveralls": "^1.1.2",
|
"karma-coveralls": "^1.1.2",
|
||||||
"karma-jasmine": "^1.0.2",
|
"karma-jasmine": "^1.0.2",
|
||||||
|
@ -71,29 +72,27 @@
|
||||||
"karma-webpack": "^1.8.0",
|
"karma-webpack": "^1.8.0",
|
||||||
"node-sass": "^3.8.0",
|
"node-sass": "^3.8.0",
|
||||||
"phantomjs-prebuilt": "^2.1.7",
|
"phantomjs-prebuilt": "^2.1.7",
|
||||||
"protractor": "^3.3.0",
|
"protractor": "^4.0.4",
|
||||||
"raw-loader": "^0.5.1",
|
"raw-loader": "^0.5.1",
|
||||||
"shelljs": "^0.7.0",
|
"shelljs": "^0.7.0",
|
||||||
"should": "^9.0.2",
|
"should": "^11.1.0",
|
||||||
"sinon": "^1.17.2",
|
"sinon": "^1.17.2",
|
||||||
"source-map-loader": "^0.1.5",
|
"source-map-loader": "^0.1.5",
|
||||||
"style-loader": "^0.13.1",
|
"style-loader": "^0.13.1",
|
||||||
"ts-helpers": "^1.1.1",
|
"ts-helpers": "^1.1.1",
|
||||||
"tslint": "^3.15.0-dev.0",
|
"tslint": "^3.15.0-dev.0",
|
||||||
"tslint-stylish": "^2.1.0-beta",
|
"tslint-stylish": "^2.1.0-beta",
|
||||||
"typescript": "^2.0.0",
|
"typescript": "^2.0.2",
|
||||||
"webpack": "^2.1.0-beta.21",
|
"webpack": "^2.1.0-beta.21",
|
||||||
"webpack-dev-server": "^1.15.0",
|
"webpack-dev-server": "^2.1.0-beta.2"
|
||||||
"yargs": "^4.7.1"
|
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@angular/common": "^2.0.0-rc.5",
|
"@angular/common": "^2.0.0-rc.6",
|
||||||
"@angular/compiler": "^2.0.0-rc.5",
|
"@angular/compiler": "^2.0.0-rc.6",
|
||||||
"@angular/compiler-cli": "^0.5.0",
|
"@angular/core": "^2.0.0-rc.6",
|
||||||
"@angular/core": "^2.0.0-rc.5",
|
"@angular/platform-browser": "^2.0.0-rc.6",
|
||||||
"@angular/platform-browser": "^2.0.0-rc.5",
|
"@angular/platform-browser-dynamic": "^2.0.0-rc.6",
|
||||||
"@angular/platform-browser-dynamic": "^2.0.0-rc.5",
|
"@angular/platform-server": "^2.0.0-rc.6",
|
||||||
"@angular/platform-server": "^2.0.0-rc.5",
|
|
||||||
"core-js": "^2.4.1",
|
"core-js": "^2.4.1",
|
||||||
"dropkickjs": "^2.1.10",
|
"dropkickjs": "^2.1.10",
|
||||||
"hint.css": "^2.3.2",
|
"hint.css": "^2.3.2",
|
||||||
|
@ -102,10 +101,10 @@
|
||||||
"openapi-sampler": "^0.3.0",
|
"openapi-sampler": "^0.3.0",
|
||||||
"prismjs": "^1.5.1",
|
"prismjs": "^1.5.1",
|
||||||
"remarkable": "^1.6.2",
|
"remarkable": "^1.6.2",
|
||||||
"rxjs": "5.0.0-beta.6",
|
"rxjs": "^5.0.0-beta.11",
|
||||||
"scrollparent": "^1.0.0",
|
"scrollparent": "^1.0.0",
|
||||||
"slugify": "^0.1.1",
|
"slugify": "^1.0.2",
|
||||||
"stream-http": "^2.3.1",
|
"stream-http": "^2.3.1",
|
||||||
"zone.js": "^0.6.15"
|
"zone.js": "^0.6.17"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -14,7 +14,6 @@
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"host": "petstore.swagger.io",
|
"host": "petstore.swagger.io",
|
||||||
"basePath": "/v2/",
|
|
||||||
"schemes": ["http"],
|
"schemes": ["http"],
|
||||||
"paths": {
|
"paths": {
|
||||||
"/pet": {
|
"/pet": {
|
||||||
|
|
|
@ -1,30 +1,31 @@
|
||||||
{
|
{
|
||||||
"compilerOptions": {
|
"compilerOptions": {
|
||||||
"experimentalDecorators": true,
|
"experimentalDecorators": true,
|
||||||
"emitDecoratorMetadata": true,
|
"emitDecoratorMetadata": true,
|
||||||
"module": "es6",
|
"module": "commonjs",
|
||||||
"target": "es5",
|
"target": "es5",
|
||||||
"noImplicitAny": false,
|
"noImplicitAny": false,
|
||||||
"sourceMap": true,
|
"sourceMap": true,
|
||||||
"outDir": ".tmp/lib",
|
"outDir": ".tmp",
|
||||||
"pretty": true,
|
"pretty": true,
|
||||||
"moduleResolution": "node",
|
"moduleResolution": "node",
|
||||||
"types": [
|
"types": [
|
||||||
"core-js",
|
"core-js",
|
||||||
"jasmine",
|
"jasmine",
|
||||||
"should",
|
"should",
|
||||||
"requirejs"
|
"requirejs"
|
||||||
],
|
],
|
||||||
"noEmitHelpers": true
|
"noEmitHelpers": true
|
||||||
},
|
},
|
||||||
"compileOnSave": false,
|
"compileOnSave": false,
|
||||||
|
"exclude": [
|
||||||
"exclude": [
|
|
||||||
"node_modules",
|
"node_modules",
|
||||||
".tmp"
|
".tmp",
|
||||||
|
"dist"
|
||||||
],
|
],
|
||||||
"awesomeTypescriptLoaderOptions": {
|
"awesomeTypescriptLoaderOptions": {
|
||||||
"resolveGlobs": true,
|
"resolveGlobs": true,
|
||||||
"forkChecker": true
|
"forkChecker": true,
|
||||||
|
"useWebpackText": true
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue
Block a user