From 585b9cfb5679796536bdbd4619f92e88275312ab Mon Sep 17 00:00:00 2001
From: Khoa Tran
Date: Mon, 10 Apr 2017 17:50:21 +1000
Subject: [PATCH 01/15] fix issue with loading https spec. See
https://github.com/Rebilly/ReDoc/issues/243
---
build/webpack.common.js | 2 +-
package.json | 1 +
yarn.lock | 4 ++++
3 files changed, 6 insertions(+), 1 deletion(-)
diff --git a/build/webpack.common.js b/build/webpack.common.js
index 30e9a57d..da047652 100644
--- a/build/webpack.common.js
+++ b/build/webpack.common.js
@@ -23,7 +23,7 @@ module.exports = function (options) {
extensions: ['.ts', '.js', '.json', '.css'],
alias: {
http: 'stream-http',
- https: 'stream-http'
+ https: 'https-browserify'
}
},
diff --git a/package.json b/package.json
index d0381e92..2ffe2e96 100644
--- a/package.json
+++ b/package.json
@@ -74,6 +74,7 @@
"dropkickjs": "^2.1.10",
"hint.css": "^2.3.2",
"http-server": "^0.9.0",
+ "https-browserify": "^1.0.0",
"istanbul-instrumenter-loader": "^2.0.0",
"jasmine-core": "^2.4.1",
"jasmine-spec-reporter": "^3.1.0",
diff --git a/yarn.lock b/yarn.lock
index cff5c269..97a83a91 100644
--- a/yarn.lock
+++ b/yarn.lock
@@ -2369,6 +2369,10 @@ https-browserify@0.0.1:
version "0.0.1"
resolved "https://registry.yarnpkg.com/https-browserify/-/https-browserify-0.0.1.tgz#3f91365cabe60b77ed0ebba24b454e3e09d95a82"
+https-browserify@^1.0.0:
+ version "1.0.0"
+ resolved "https://registry.yarnpkg.com/https-browserify/-/https-browserify-1.0.0.tgz#ec06c10e0a34c0f2faf199f7fd7fc78fffd03c73"
+
https-proxy-agent@^1.0.0:
version "1.0.0"
resolved "https://registry.yarnpkg.com/https-proxy-agent/-/https-proxy-agent-1.0.0.tgz#35f7da6c48ce4ddbfa264891ac593ee5ff8671e6"
From 303b49e9185082585c705e56dbb7dae17b09fbec Mon Sep 17 00:00:00 2001
From: Vincent Giersch
Date: Mon, 17 Apr 2017 11:38:31 +0200
Subject: [PATCH 02/15] fix: ul missing css
---
lib/components/Redoc/redoc.scss | 3 +++
1 file changed, 3 insertions(+)
diff --git a/lib/components/Redoc/redoc.scss b/lib/components/Redoc/redoc.scss
index 415a7940..b6e0443d 100644
--- a/lib/components/Redoc/redoc.scss
+++ b/lib/components/Redoc/redoc.scss
@@ -240,6 +240,9 @@ footer {
padding-left: 2em;
margin: 0;
margin-bottom: 1em;
+ font-family: $base-font, $base-font-family;
+ font-weight: $base-font-weight;
+ line-height: $base-line-height;
}
table {
From 3f48357e39563778cd5888f4f2cd93159c214660 Mon Sep 17 00:00:00 2001
From: Roman Hotsiy
Date: Sat, 1 Apr 2017 15:12:23 +0300
Subject: [PATCH 03/15] chore: module build + export services
---
build/webpack.prod.js | 24 ++++++++++++------------
lib/redoc.module.ts | 16 ++++++++++++++--
package.json | 6 ++++--
tsconfig.json | 3 ++-
4 files changed, 32 insertions(+), 17 deletions(-)
diff --git a/build/webpack.prod.js b/build/webpack.prod.js
index 1b517d66..e21d6735 100644
--- a/build/webpack.prod.js
+++ b/build/webpack.prod.js
@@ -49,18 +49,18 @@ const config = webpackMerge(commonConfig({
minimize: true,
debug: false
}),
- new webpack.optimize.UglifyJsPlugin({
- compress: {
- warnings: false,
- screw_ie8: true,
- negate_iife: false // for lazy v8
- },
- mangle: { screw_ie8 : true },
- output: {
- comments: false
- },
- sourceMap: true
- }),
+ // new webpack.optimize.UglifyJsPlugin({
+ // compress: {
+ // warnings: false,
+ // screw_ie8: true,
+ // negate_iife: false // for lazy v8
+ // },
+ // mangle: { screw_ie8 : true },
+ // output: {
+ // comments: false
+ // },
+ // sourceMap: true
+ // }),
new webpack.BannerPlugin(BANNER)
]
})
diff --git a/lib/redoc.module.ts b/lib/redoc.module.ts
index b3081fc0..5e5a5dca 100644
--- a/lib/redoc.module.ts
+++ b/lib/redoc.module.ts
@@ -17,6 +17,7 @@ import {
ComponentParser,
ContentProjector,
Marker,
+ SchemaHelper,
SearchService,
COMPONENT_PARSER_ALLOWED } from './services/';
@@ -39,9 +40,20 @@ import { SpecManager } from './utils/spec-manager';
{ provide: ErrorHandler, useClass: CustomErrorHandler },
{ provide: COMPONENT_PARSER_ALLOWED, useValue: { 'security-definitions': SecurityDefinitions} }
],
- exports: [Redoc]
+ exports: [Redoc, REDOC_DIRECTIVES, REDOC_COMMON_DIRECTIVES, REDOC_PIPES]
})
export class RedocModule {
}
-export { Redoc, SpecManager };
+export { Redoc, SpecManager, ScrollService,
+Hash,
+WarningsService,
+OptionsService,
+AppStateService,
+ComponentParser,
+ContentProjector,
+MenuService,
+SearchService,
+SchemaHelper,
+LazyTasksService,
+Marker };
diff --git a/package.json b/package.json
index 2ffe2e96..10c974b3 100644
--- a/package.json
+++ b/package.json
@@ -10,7 +10,7 @@
"node": ">=6.9",
"npm": ">=3.0.0"
},
- "main": "dist/redoc.min.js",
+ "main": "dist/redoc-module.js",
"scripts": {
"test": "npm run lint && node ./build/run_tests.js",
"branch-release": "git reset --hard && branch-release",
@@ -33,7 +33,9 @@
"webdriver": "webdriver-manager update",
"serve:prod": "NODE_ENV=production npm start",
"protractor": "protractor",
- "changelog": "conventional-changelog -p angular -i CHANGELOG.md -s -r 1"
+ "changelog": "conventional-changelog -p angular -i CHANGELOG.md -s -r 1",
+ "build:prod-module": "npm run build:sass && npm run ngc && npm run webpack:prod && IS_MODULE=true npm run webpack:prod",
+ "build:module": "npm run build:sass && npm run ngc && IS_MODULE=true npm run webpack:prod"
},
"keywords": [
"OpenAPI",
diff --git a/tsconfig.json b/tsconfig.json
index 10461ce5..fbb918e7 100644
--- a/tsconfig.json
+++ b/tsconfig.json
@@ -13,10 +13,11 @@
"should",
"webpack"
],
+ "outDir": "dist",
"lib": [
"DOM", "ES2016", "DOM.Iterable"
],
- "noEmitHelpers": true
+ "noEmitHelpers": false
},
"compileOnSave": false,
"exclude": [
From 92eec250e637a19b6fe2e233a99ff912b7b7f323 Mon Sep 17 00:00:00 2001
From: Roman Hotsiy
Date: Tue, 18 Apr 2017 16:10:34 +0300
Subject: [PATCH 04/15] new: Add verbs badges (implements #61)
---
.../EndpointLink/endpoint-link.scss | 36 ++++++++++++
lib/components/SideMenu/side-menu-items.html | 5 +-
lib/components/SideMenu/side-menu-items.scss | 55 +++++++++++++++++++
lib/components/SideMenu/side-menu.ts | 11 ++--
4 files changed, 99 insertions(+), 8 deletions(-)
diff --git a/lib/components/EndpointLink/endpoint-link.scss b/lib/components/EndpointLink/endpoint-link.scss
index 3bcbc510..9a70ba0a 100644
--- a/lib/components/EndpointLink/endpoint-link.scss
+++ b/lib/components/EndpointLink/endpoint-link.scss
@@ -110,3 +110,39 @@
transform: translateY(0%) scaleY(1);
}
}
+
+.http-verb {
+ color: white;
+
+ &.get {
+ background-color: $get-color;
+ }
+
+ &.post {
+ background-color: $post-color;
+ }
+
+ &.put {
+ background-color: $put-color;
+ }
+
+ &.options {
+ background-color: $options-color;
+ }
+
+ &.patch {
+ background-color: $patch-color;
+ }
+
+ &.delete {
+ background-color: $delete-color;
+ }
+
+ &.basic {
+ background-color: $basic-color;
+ }
+
+ &.link {
+ background-color: $link-color;
+ }
+}
diff --git a/lib/components/SideMenu/side-menu-items.html b/lib/components/SideMenu/side-menu-items.html
index 0db93069..b9ab5340 100644
--- a/lib/components/SideMenu/side-menu-items.html
+++ b/lib/components/SideMenu/side-menu-items.html
@@ -1,6 +1,9 @@
- Contact:
+ Contact:
{{info.contact.name || info.contact.url}}
From 4839b3ce696399b806b2df41a7b1cb967c1caf5f Mon Sep 17 00:00:00 2001
From: Roman Hotsiy
Date: Tue, 18 Apr 2017 16:42:59 +0300
Subject: [PATCH 08/15] chore: operation list minor refactor
---
lib/components/OperationsList/operations-list.html | 2 +-
lib/components/OperationsList/operations-list.scss | 1 -
lib/components/OperationsList/operations-list.ts | 10 +++++++++-
3 files changed, 10 insertions(+), 3 deletions(-)
diff --git a/lib/components/OperationsList/operations-list.html b/lib/components/OperationsList/operations-list.html
index 0907c592..aa57ed89 100644
--- a/lib/components/OperationsList/operations-list.html
+++ b/lib/components/OperationsList/operations-list.html
@@ -1,7 +1,7 @@
diff --git a/lib/components/OperationsList/operations-list.scss b/lib/components/OperationsList/operations-list.scss
index 04f32b6f..a66e1310 100644
--- a/lib/components/OperationsList/operations-list.scss
+++ b/lib/components/OperationsList/operations-list.scss
@@ -12,7 +12,6 @@
.tag-info {
padding: $section-spacing;
box-sizing: border-box;
- background-color: white;
width: 60%;
@media (max-width: $right-panel-squash-breakpoint) {
diff --git a/lib/components/OperationsList/operations-list.ts b/lib/components/OperationsList/operations-list.ts
index a0284321..620f4c3f 100644
--- a/lib/components/OperationsList/operations-list.ts
+++ b/lib/components/OperationsList/operations-list.ts
@@ -30,7 +30,10 @@ export class OperationsList extends BaseComponent implements OnInit {
if (!menuItem.metadata) return;
if (menuItem.metadata.type === 'tag') {
- this.tags.push(menuItem);
+ this.tags.push({
+ ...menuItem,
+ anchor: this.buildAnchor(menuItem.id)
+ });
}
if (menuItem.metadata.type === 'operation' && !menuItem.parent) {
emptyTag.items.push(menuItem);
@@ -39,6 +42,11 @@ export class OperationsList extends BaseComponent implements OnInit {
if (emptyTag.items.length) this.tags.push(emptyTag);
}
+ buildAnchor(tagId):string {
+ return this.menu.hashFor(tagId,
+ { type: 'tag'});
+ }
+
trackByTagName(_, el) {
return el.name;
}
From b265e85927fbc8c2efb4c931939262f806f5519a Mon Sep 17 00:00:00 2001
From: Roman Hotsiy
Date: Tue, 18 Apr 2017 16:46:19 +0300
Subject: [PATCH 09/15] chore: add exports
---
lib/components/JsonSchema/json-schema-lazy.ts | 2 +-
lib/components/Operation/operation.ts | 6 +++---
lib/components/Search/redoc-search.ts | 2 +-
lib/utils/swagger-typings.ts | 2 +-
4 files changed, 6 insertions(+), 6 deletions(-)
diff --git a/lib/components/JsonSchema/json-schema-lazy.ts b/lib/components/JsonSchema/json-schema-lazy.ts
index 24e2f1cb..c3a81bb1 100644
--- a/lib/components/JsonSchema/json-schema-lazy.ts
+++ b/lib/components/JsonSchema/json-schema-lazy.ts
@@ -36,7 +36,7 @@ export class JsonSchemaLazy implements OnDestroy, OnInit, AfterViewInit {
return schema && schema.$ref || this.pointer;
}
- _loadAfterSelf() {
+ private _loadAfterSelf() {
var componentFactory = this.resolver.resolveComponentFactory(JsonSchema);
let contextInjector = this.location.parentInjector;
let compRef = this.location.createComponent(componentFactory, null, contextInjector, null);
diff --git a/lib/components/Operation/operation.ts b/lib/components/Operation/operation.ts
index 7931069a..9b635cd4 100644
--- a/lib/components/Operation/operation.ts
+++ b/lib/components/Operation/operation.ts
@@ -4,9 +4,9 @@ import JsonPointer from '../../utils/JsonPointer';
import { BaseComponent, SpecManager } from '../base';
import { SchemaHelper } from '../../services/schema-helper.service';
import { OptionsService, MenuService } from '../../services/';
+import { SwaggerBodyParameter } from '../../utils/swagger-typings';
-
-interface OperationInfo {
+export interface OperationInfo {
verb: string;
path: string;
info: {
@@ -72,7 +72,7 @@ export class Operation extends BaseComponent implements OnInit {
return tags.filter(tag => tagsMap[tag] && tagsMap[tag]['x-traitTag']);
}
- findBodyParam() {
+ findBodyParam():SwaggerBodyParameter {
let params = this.specMgr.getOperationParams(this.pointer);
let bodyParam = params.find(param => param.in === 'body');
return bodyParam;
diff --git a/lib/components/Search/redoc-search.ts b/lib/components/Search/redoc-search.ts
index 35a66ff5..5cf8b286 100644
--- a/lib/components/Search/redoc-search.ts
+++ b/lib/components/Search/redoc-search.ts
@@ -74,7 +74,7 @@ export class RedocSearch implements OnInit {
item.pointers
);
this.marker.remark();
- this.menu.activate(item.menuItem.flatIdx);
+ this.menu.activate(item.menuItem);
this.menu.scrollToActive();
}
diff --git a/lib/utils/swagger-typings.ts b/lib/utils/swagger-typings.ts
index 530f07f9..91e74c5e 100644
--- a/lib/utils/swagger-typings.ts
+++ b/lib/utils/swagger-typings.ts
@@ -10,7 +10,7 @@ import {
Response
} from '@types/swagger-schema-official';
-interface RedocInjectedPointer {
+export interface RedocInjectedPointer {
_pointer?: string;
}
From 7a09b4ac11bd48487ed4667f9cf33a400a1cb03d Mon Sep 17 00:00:00 2001
From: Roman Hotsiy
Date: Tue, 18 Apr 2017 16:46:51 +0300
Subject: [PATCH 10/15] chore: disable authentication auto adding (part 2)
---
lib/utils/spec-manager.ts | 13 ++++++++++---
1 file changed, 10 insertions(+), 3 deletions(-)
diff --git a/lib/utils/spec-manager.ts b/lib/utils/spec-manager.ts
index e09f03b7..43118bba 100644
--- a/lib/utils/spec-manager.ts
+++ b/lib/utils/spec-manager.ts
@@ -1,5 +1,5 @@
'use strict';
-
+import { Injectable } from '@angular/core';
import * as JsonSchemaRefParser from 'json-schema-ref-parser';
import { JsonPointer } from './JsonPointer';
import { parse as urlParse, resolve as urlResolve } from 'url';
@@ -9,6 +9,7 @@ import { MdRenderer } from './md-renderer';
import { SwaggerOperation, SwaggerParameter } from './swagger-typings';
import { snapshot } from './helpers';
+import { OptionsService, Options } from '../services/options.service';
import { WarningsService } from '../services/warnings.service';
function getDiscriminator(obj) {
@@ -22,6 +23,7 @@ export interface DescendantInfo {
idx?: number;
}
+@Injectable()
export class SpecManager {
public _schema: any = {};
public apiUrl: string;
@@ -32,6 +34,11 @@ export class SpecManager {
public spec = new BehaviorSubject(null);
public _specUrl: string;
private parser: any;
+ private options: Options;
+
+ constructor(optionsService: OptionsService) {
+ this.options = optionsService.options;
+ }
load(urlOrObject: string|Object) {
let promise = new Promise((resolve, reject) => {
@@ -87,8 +94,8 @@ export class SpecManager {
throw Error('Specification Error: Required field "info" is not specified at the top level of the specification');
}
if (!this._schema.info.description) this._schema.info.description = '';
- if (this._schema.securityDefinitions) {
- let SecurityDefinitions = require('../components/').SecurityDefinitions;
+ if (this._schema.securityDefinitions && !this.options.noAutoAuth) {
+ let SecurityDefinitions = require('../components/').SecurityDefinitions;
mdRender.addPreprocessor(SecurityDefinitions.insertTagIntoDescription);
}
this._schema.info['x-redoc-html-description'] = mdRender.renderMd(this._schema.info.description);
From 7e36a9ba12ecaa53c097838699816bf31d9877fe Mon Sep 17 00:00:00 2001
From: Roman Hotsiy
Date: Tue, 18 Apr 2017 16:48:04 +0300
Subject: [PATCH 11/15] chored: add missing variables
---
lib/shared/styles/_variables.scss | 10 ++++++++++
1 file changed, 10 insertions(+)
diff --git a/lib/shared/styles/_variables.scss b/lib/shared/styles/_variables.scss
index b50ad976..b8a6ec74 100644
--- a/lib/shared/styles/_variables.scss
+++ b/lib/shared/styles/_variables.scss
@@ -70,3 +70,13 @@ $border-radius: 2px;
// texts
$array-text: 'Array of ';
$tuple-text: 'Tuple ';
+
+// HTTP Verb colors
+$get-color: #6bbd5b;
+$post-color: #248fb2;
+$put-color: #9b708b;
+$options-color: #d3ca12;
+$patch-color: #e09d43;
+$delete-color: #e27a7a;
+$basic-color: #999;
+$link-color: #31bbb6;
From c41f56d33ca444bf0a94d2c3eee38f91ce9fe3dd Mon Sep 17 00:00:00 2001
From: Roman Hotsiy
Date: Wed, 19 Apr 2017 12:41:15 +0300
Subject: [PATCH 12/15] chore: fix tests
---
lib/components/base.spec.ts | 3 ++-
lib/services/schema-normalizer.service.spec.ts | 4 +++-
tests/unit/SpecManager.spec.ts | 3 ++-
3 files changed, 7 insertions(+), 3 deletions(-)
diff --git a/lib/components/base.spec.ts b/lib/components/base.spec.ts
index efc0687f..88e5a6ef 100644
--- a/lib/components/base.spec.ts
+++ b/lib/components/base.spec.ts
@@ -2,6 +2,7 @@
import { SpecManager } from '../utils/spec-manager';
import { BaseComponent } from '../components/base';
+import { OptionsService } from '../services/options.service';
describe('Redoc components', () => {
describe('BaseComponent', () => {
@@ -9,7 +10,7 @@ describe('Redoc components', () => {
let component;
beforeAll(() => {
- specMgr = new SpecManager();
+ specMgr = new SpecManager(new OptionsService());
specMgr._schema = {tags: []};
});
diff --git a/lib/services/schema-normalizer.service.spec.ts b/lib/services/schema-normalizer.service.spec.ts
index e25c6bc9..c1d801bb 100644
--- a/lib/services/schema-normalizer.service.spec.ts
+++ b/lib/services/schema-normalizer.service.spec.ts
@@ -1,9 +1,11 @@
'use strict';
import { SchemaNormalizer } from './schema-normalizer.service';
import { SpecManager } from '../utils/spec-manager';;
+import { OptionsService } from '../services/options.service';
+
describe('Spec Helper', () => {
- let specMgr:SpecManager = new SpecManager();
+ let specMgr:SpecManager = new SpecManager(new OptionsService());
let normalizer = new SchemaNormalizer(specMgr);
describe('Dereference', () => {
diff --git a/tests/unit/SpecManager.spec.ts b/tests/unit/SpecManager.spec.ts
index 69a7c81a..a0089d20 100644
--- a/tests/unit/SpecManager.spec.ts
+++ b/tests/unit/SpecManager.spec.ts
@@ -1,6 +1,7 @@
'use strict';
import { SpecManager } from '../../lib/utils/spec-manager';
+import { OptionsService } from '../../lib/services/options.service';
import * as xExtendedDefs from './x-extended-defs.json';
describe('Utils', () => {
@@ -8,7 +9,7 @@ describe('Utils', () => {
let specMgr: SpecManager;
beforeEach(() => {
- specMgr = new SpecManager();
+ specMgr = new SpecManager(new OptionsService());
});
it('load should return a promise', ()=> {
From 9c4bc5944fcbc04392ede242149a821b0f128f60 Mon Sep 17 00:00:00 2001
From: Roman Hotsiy
Date: Wed, 19 Apr 2017 12:41:38 +0300
Subject: [PATCH 13/15] chore: uncomment uglify + fix lint
---
build/webpack.prod.js | 24 ++++++++++++------------
lib/services/menu.service.ts | 6 +++---
2 files changed, 15 insertions(+), 15 deletions(-)
diff --git a/build/webpack.prod.js b/build/webpack.prod.js
index e21d6735..1b517d66 100644
--- a/build/webpack.prod.js
+++ b/build/webpack.prod.js
@@ -49,18 +49,18 @@ const config = webpackMerge(commonConfig({
minimize: true,
debug: false
}),
- // new webpack.optimize.UglifyJsPlugin({
- // compress: {
- // warnings: false,
- // screw_ie8: true,
- // negate_iife: false // for lazy v8
- // },
- // mangle: { screw_ie8 : true },
- // output: {
- // comments: false
- // },
- // sourceMap: true
- // }),
+ new webpack.optimize.UglifyJsPlugin({
+ compress: {
+ warnings: false,
+ screw_ie8: true,
+ negate_iife: false // for lazy v8
+ },
+ mangle: { screw_ie8 : true },
+ output: {
+ comments: false
+ },
+ sourceMap: true
+ }),
new webpack.BannerPlugin(BANNER)
]
})
diff --git a/lib/services/menu.service.ts b/lib/services/menu.service.ts
index cebff4da..18e47196 100644
--- a/lib/services/menu.service.ts
+++ b/lib/services/menu.service.ts
@@ -50,14 +50,14 @@ export class MenuService {
items: MenuItem[];
activeIdx: number = -1;
+ public domRoot: Document | Element = document;
+
private _flatItems: MenuItem[];
private _hashSubscription: Subscription;
private _scrollSubscription: Subscription;
private _progressSubscription: Subscription;
private _tagsWithOperations: any;
- public domRoot: Document | Element = document;
-
constructor(
private hash:Hash,
private tasks: LazyTasksService,
@@ -70,7 +70,7 @@ export class MenuService {
this.specMgr.spec.subscribe(spec => {
if (!spec) return;
this.buildMenu();
- })
+ });
this._scrollSubscription = scrollService.scroll.subscribe((evt) => {
this.onScroll(evt.isScrolledDown);
From 61fd42698d5fe1bcb1b4f64d834155ec2f00aa32 Mon Sep 17 00:00:00 2001
From: Roman Hotsiy
Date: Wed, 19 Apr 2017 13:43:17 +0300
Subject: [PATCH 14/15] new: http verb badges in search results
---
lib/components/Redoc/redoc.scss | 67 ++++++++++++++++++++
lib/components/Search/redoc-search.html | 5 +-
lib/components/Search/redoc-search.scss | 1 +
lib/components/SideMenu/side-menu-items.html | 4 +-
lib/components/SideMenu/side-menu-items.scss | 57 +----------------
5 files changed, 74 insertions(+), 60 deletions(-)
diff --git a/lib/components/Redoc/redoc.scss b/lib/components/Redoc/redoc.scss
index b6e0443d..d9503f00 100644
--- a/lib/components/Redoc/redoc.scss
+++ b/lib/components/Redoc/redoc.scss
@@ -113,6 +113,73 @@ side-menu {
font-size: 18px;
}
+/* global menu items styles (search results + menu) */
+:host /deep/ {
+ .menu-item-header > span {
+ display: inline-block;
+ vertical-align: middle;
+ }
+
+ .menu-item-header > .operation-type + .menu-item-title {
+ width: calc(100% - 32px); // 32 = 26px image width + 6px margin left
+ }
+
+ .menu-item-header > .operation-type {
+ width: 26px;
+ display: inline-block;
+ height: 13px;
+ background-color: #333;
+ border-radius: 3px;
+ vertical-align: top;
+ background-image: url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABMAAACgCAYAAADuDlcXAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAyRpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuMy1jMDExIDY2LjE0NTY2MSwgMjAxMi8wMi8wNi0xNDo1NjoyNyAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIgeG1sbnM6eG1wPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvIiB4bWxuczp4bXBNTT0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wL21tLyIgeG1sbnM6c3RSZWY9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9zVHlwZS9SZXNvdXJjZVJlZiMiIHhtcDpDcmVhdG9yVG9vbD0iQWRvYmUgUGhvdG9zaG9wIENTNiAoTWFjaW50b3NoKSIgeG1wTU06SW5zdGFuY2VJRD0ieG1wLmlpZDpFNjQ5N0JDQUE3OTYxMUU0ODNGMUE0RUM3NjRDRTQyNyIgeG1wTU06RG9jdW1lbnRJRD0ieG1wLmRpZDpFNjQ5N0JDQkE3OTYxMUU0ODNGMUE0RUM3NjRDRTQyNyI+IDx4bXBNTTpEZXJpdmVkRnJvbSBzdFJlZjppbnN0YW5jZUlEPSJ4bXAuaWlkOkU2NDk3QkM4QTc5NjExRTQ4M0YxQTRFQzc2NENFNDI3IiBzdFJlZjpkb2N1bWVudElEPSJ4bXAuZGlkOkU2NDk3QkM5QTc5NjExRTQ4M0YxQTRFQzc2NENFNDI3Ii8+IDwvcmRmOkRlc2NyaXB0aW9uPiA8L3JkZjpSREY+IDwveDp4bXBtZXRhPiA8P3hwYWNrZXQgZW5kPSJyIj8+mIrGwQAAAZ9JREFUeNrsmtuOwyAMRBmU//9lbx9208ayjQ1EarSDVFW56ARIGGZIIK/S3gWvX3X7LN3a6WxDHdPnnDBpcZHEOe3wrmLUMg2zatKykPOq1/5fK71tLIQR9jjYsaJfWdWAAcRsM2W1z9LNGcFkRlmtPhvpf7qmHAGEESZqLFr/qbHaCy4Is6oxLdvT+nWr0lLPCCPsFn+mA5e2UjLycL1o6qLMiapqRGoifVCDinrgU2mRyJthzZg3CSPs+2HhIM4YGq0a4oDgiGjYTKw20/OwUzAEuXz73YSqtdsV+F1a3eZpweFEGGG7Y3ULbJRk4nYPlEHbUi86wpNtbz4oB37PICOrLEdC9DKzFv7EkQ8tYY8Nr8tuyJrRsdpMrIJ0n4GPBmGEEUbYzRMKnFwug1B7rppmbCiyBjBrQ1vC8KW/CxrF7osNrRbxMjofWsIIuwU2vapnZfTRq4/wFXl3hG9bMzP6ZWV47LoB+Gym1/EyUleKI2GEPW8pQpu80bHLvsifSWFVAVEzo2VDTxxb9T16eO7sF0vmxPNPxPFHgAEA/rGUMXq/uWcAAAAASUVORK5CYII=');
+ background-repeat: no-repeat;
+ background-position: 6px 4px;
+ text-indent: -9000px;
+ margin-right: 6px;
+ margin-top: 2px;
+
+ &.get {
+ background-position: 8px -12px;
+ background-color: $get-color;
+ }
+
+ &.post {
+ background-position: 6px 4px;
+ background-color: $post-color;
+ }
+
+ &.put {
+ background-position: 8px -28px;
+ background-color: $put-color;
+ }
+
+ &.options {
+ background-position: 4px -148px;
+ background-color: $options-color;
+ }
+
+ &.patch {
+ background-position: 4px -114px;
+ background-color: $patch-color;
+ }
+
+ &.delete {
+ background-position: 4px -44px;
+ background-color: $delete-color;
+ }
+
+ &.basic {
+ background-position: 5px -79px;
+ background-color: $basic-color;
+ }
+
+ &.link {
+ background-position: 4px -131px;
+ background-color: $link-color;
+ }
+ }
+}
+
/* global redoc styles */
@for $index from 1 through 5 {
diff --git a/lib/components/Search/redoc-search.html b/lib/components/Search/redoc-search.html
index 2c4e3a21..5c7becf6 100644
--- a/lib/components/Search/redoc-search.html
+++ b/lib/components/Search/redoc-search.html
@@ -5,9 +5,10 @@
- -
- {{item.menuItem.name}}
+ {{item.menuItem?.metadata?.operation}}
diff --git a/lib/components/Search/redoc-search.scss b/lib/components/Search/redoc-search.scss
index 19bee15a..c58fc3b5 100644
--- a/lib/components/Search/redoc-search.scss
+++ b/lib/components/Search/redoc-search.scss
@@ -44,6 +44,7 @@ input {
overflow-y: auto;
border-bottom: 1px solid darken($side-bar-bg-color, 10%);
border-top: 1px solid darken($side-bar-bg-color, 10%);
+ line-height: 1.2;
min-height: 150px;
max-height: 250px;
diff --git a/lib/components/SideMenu/side-menu-items.html b/lib/components/SideMenu/side-menu-items.html
index b9ab5340..74e72a90 100644
--- a/lib/components/SideMenu/side-menu-items.html
+++ b/lib/components/SideMenu/side-menu-items.html
@@ -1,8 +1,8 @@