Merge commit '9ccfd52640e81b8c9b0d1c66950ccadd64f01e68' into releases

This commit is contained in:
RedocBot 2017-03-01 01:30:08 +00:00 committed by travis@localhost
commit 24dd8b0421
8 changed files with 38 additions and 11 deletions

View File

@ -1,3 +1,27 @@
<a name="1.10.1"></a>
## 1.10.1 (2017-02-27)
### Bug Fixes
* improve x-servers dropdown animation performance ([69c7d98](https://github.com/Rebilly/ReDoc/commit/69c7d98))
<a name="1.10.0"></a>
# 1.10.0 (2017-02-27)
### Bug Fixes
* Revert: remove unused hide-hostname option ([7031176](https://github.com/Rebilly/ReDoc/commit/7031176))
### Features
* new option `required-props-first` ([c724df4](https://github.com/Rebilly/ReDoc/commit/c724df4)), closes [#191](https://github.com/Rebilly/ReDoc/issues/191)
* update fragment while scrolling and on menu clicks ([66c06b3](https://github.com/Rebilly/ReDoc/commit/66c06b3)), closes [#138](https://github.com/Rebilly/ReDoc/issues/138) [#202](https://github.com/Rebilly/ReDoc/issues/202)
<a name="1.9.0"></a> <a name="1.9.0"></a>
# 1.9.0 (2017-02-25) # 1.9.0 (2017-02-25)

View File

View File

@ -110,9 +110,7 @@ module.exports = function (options) {
'AOT': options.AOT 'AOT': options.AOT
}), }),
new StringReplacePlugin(), new StringReplacePlugin()
new webpack.NormalModuleReplacementPlugin(/node_modules\/rxjs\/operator\/.*/, root('build/empty.js')),
new webpack.NormalModuleReplacementPlugin(/node_modules\/rxjs\/testing\//, root('build/empty.js'))
], ],
node: { node: {
global: true, global: true,

View File

@ -13,7 +13,8 @@ Backported from OpenAPI 3.0 [`servers`](https://github.com/OAI/OpenAPI-Specifica
| x-tagGroups | [ [Tag Group Object](#tagGroupObject) ] | A list of tag groups | | x-tagGroups | [ [Tag Group Object](#tagGroupObject) ] | A list of tag groups |
###### Usage in Redoc ###### Usage in Redoc
`x-tagGroups` is used to group tags in the side menu `x-tagGroups` is used to group tags in the side menu.
If you are going to use `x-tagGroups`, please make sure you **add all tags to a group**, since a tag that is not in a group, **will not be displayed** at all!
#### <a name="tagGroupObject"></a>Tag Group Object #### <a name="tagGroupObject"></a>Tag Group Object
Information about tags group Information about tags group

View File

@ -28,7 +28,7 @@ export class Hash {
} }
update(hash: string|null) { update(hash: string|null) {
if (!hash) return; if (hash == undefined) return;
this.noEmit = true; this.noEmit = true;
window.location.hash = hash; window.location.hash = hash;
setTimeout(() => { setTimeout(() => {

View File

@ -3,6 +3,7 @@ import { Injectable, EventEmitter } from '@angular/core';
import { Subscription } from 'rxjs/Subscription'; import { Subscription } from 'rxjs/Subscription';
import { BehaviorSubject } from 'rxjs/BehaviorSubject'; import { BehaviorSubject } from 'rxjs/BehaviorSubject';
import { ScrollService, INVIEW_POSITION } from './scroll.service'; import { ScrollService, INVIEW_POSITION } from './scroll.service';
import { WarningsService } from './warnings.service';
import { Hash } from './hash.service'; import { Hash } from './hash.service';
import { SpecManager } from '../utils/spec-manager'; import { SpecManager } from '../utils/spec-manager';
import { SchemaHelper } from './schema-helper.service'; import { SchemaHelper } from './schema-helper.service';
@ -207,7 +208,10 @@ export class MenuService {
this.deactivate(this.activeIdx); this.deactivate(this.activeIdx);
this.activeIdx = idx; this.activeIdx = idx;
if (idx < 0) return; if (idx < 0) {
this.hash.update('');
return;
}
item.active = true; item.active = true;
@ -351,7 +355,7 @@ export class MenuService {
tags = tags.map(k => { tags = tags.map(k => {
if (!this._tagsWithMethods[k]) { if (!this._tagsWithMethods[k]) {
console.warn(`Non-existing tag "${k}" is specified in tag group "${tagGroup.name}"`); WarningsService.warn(`Non-existing tag "${k}" is added to the group "${tagGroup.name}"`);
return null; return null;
} }
this._tagsWithMethods[k].used = true; this._tagsWithMethods[k].used = true;
@ -408,7 +412,7 @@ export class MenuService {
checkAllTagsUsedInGroups() { checkAllTagsUsedInGroups() {
for (let tag of Object.keys(this._tagsWithMethods)) { for (let tag of Object.keys(this._tagsWithMethods)) {
if (!this._tagsWithMethods[tag].used) { if (!this._tagsWithMethods[tag].used) {
console.warn(`Tag "${tag}" is not added to any group`); WarningsService.warn(`Tag "${tag}" is not added to any group`);
} }
} }
} }

View File

@ -1,11 +1,11 @@
'use strict'; 'use strict';
import { Injectable } from '@angular/core'; import { Injectable } from '@angular/core';
import { Subject } from 'rxjs'; import { BehaviorSubject } from 'rxjs/BehaviorSubject';
@Injectable() @Injectable()
export class WarningsService { export class WarningsService {
private static _warnings: Array<string> = []; private static _warnings: Array<string> = [];
private static _warningsObs = new Subject<Array<string>>(); private static _warningsObs = new BehaviorSubject<Array<string>>([]);
static get warnings() { static get warnings() {
return WarningsService._warningsObs; return WarningsService._warningsObs;

View File

@ -1,7 +1,7 @@
{ {
"name": "redoc", "name": "redoc",
"description": "Swagger-generated API Reference Documentation", "description": "Swagger-generated API Reference Documentation",
"version": "1.10.1", "version": "1.10.2",
"repository": { "repository": {
"type": "git", "type": "git",
"url": "git://github.com/Rebilly/ReDoc" "url": "git://github.com/Rebilly/ReDoc"