mirror of
https://github.com/Redocly/redoc.git
synced 2024-11-27 19:13:44 +03:00
Merge commit '9ccfd52640e81b8c9b0d1c66950ccadd64f01e68' into releases
This commit is contained in:
commit
24dd8b0421
24
CHANGELOG.md
24
CHANGELOG.md
|
@ -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>
|
||||
# 1.9.0 (2017-02-25)
|
||||
|
||||
|
|
|
@ -110,9 +110,7 @@ module.exports = function (options) {
|
|||
'AOT': options.AOT
|
||||
}),
|
||||
|
||||
new StringReplacePlugin(),
|
||||
new webpack.NormalModuleReplacementPlugin(/node_modules\/rxjs\/operator\/.*/, root('build/empty.js')),
|
||||
new webpack.NormalModuleReplacementPlugin(/node_modules\/rxjs\/testing\//, root('build/empty.js'))
|
||||
new StringReplacePlugin()
|
||||
],
|
||||
node: {
|
||||
global: true,
|
||||
|
|
|
@ -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 |
|
||||
|
||||
###### 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
|
||||
Information about tags group
|
||||
|
|
|
@ -28,7 +28,7 @@ export class Hash {
|
|||
}
|
||||
|
||||
update(hash: string|null) {
|
||||
if (!hash) return;
|
||||
if (hash == undefined) return;
|
||||
this.noEmit = true;
|
||||
window.location.hash = hash;
|
||||
setTimeout(() => {
|
||||
|
|
|
@ -3,6 +3,7 @@ import { Injectable, EventEmitter } from '@angular/core';
|
|||
import { Subscription } from 'rxjs/Subscription';
|
||||
import { BehaviorSubject } from 'rxjs/BehaviorSubject';
|
||||
import { ScrollService, INVIEW_POSITION } from './scroll.service';
|
||||
import { WarningsService } from './warnings.service';
|
||||
import { Hash } from './hash.service';
|
||||
import { SpecManager } from '../utils/spec-manager';
|
||||
import { SchemaHelper } from './schema-helper.service';
|
||||
|
@ -207,7 +208,10 @@ export class MenuService {
|
|||
|
||||
this.deactivate(this.activeIdx);
|
||||
this.activeIdx = idx;
|
||||
if (idx < 0) return;
|
||||
if (idx < 0) {
|
||||
this.hash.update('');
|
||||
return;
|
||||
}
|
||||
|
||||
item.active = true;
|
||||
|
||||
|
@ -351,7 +355,7 @@ export class MenuService {
|
|||
|
||||
tags = tags.map(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;
|
||||
}
|
||||
this._tagsWithMethods[k].used = true;
|
||||
|
@ -408,7 +412,7 @@ export class MenuService {
|
|||
checkAllTagsUsedInGroups() {
|
||||
for (let tag of Object.keys(this._tagsWithMethods)) {
|
||||
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`);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,11 +1,11 @@
|
|||
'use strict';
|
||||
import { Injectable } from '@angular/core';
|
||||
import { Subject } from 'rxjs';
|
||||
import { BehaviorSubject } from 'rxjs/BehaviorSubject';
|
||||
|
||||
@Injectable()
|
||||
export class WarningsService {
|
||||
private static _warnings: Array<string> = [];
|
||||
private static _warningsObs = new Subject<Array<string>>();
|
||||
private static _warningsObs = new BehaviorSubject<Array<string>>([]);
|
||||
|
||||
static get warnings() {
|
||||
return WarningsService._warningsObs;
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
{
|
||||
"name": "redoc",
|
||||
"description": "Swagger-generated API Reference Documentation",
|
||||
"version": "1.10.1",
|
||||
"version": "1.10.2",
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "git://github.com/Rebilly/ReDoc"
|
||||
|
|
Loading…
Reference in New Issue
Block a user