From a496e907eaf458c33d8c2fde408de5f0e757ad49 Mon Sep 17 00:00:00 2001 From: Roman Hotsiy Date: Wed, 9 Mar 2016 21:54:21 +0200 Subject: [PATCH] Fix operation links --- lib/components/Method/method.html | 2 +- lib/components/Method/method.js | 6 ++---- package.json | 2 +- 3 files changed, 4 insertions(+), 6 deletions(-) diff --git a/lib/components/Method/method.html b/lib/components/Method/method.html index c8fc86c2..1a428a93 100644 --- a/lib/components/Method/method.html +++ b/lib/components/Method/method.html @@ -1,7 +1,7 @@

- {{data.methodInfo.summary}} + {{data.methodInfo.summary}}

{{data.httpMethod}} diff --git a/lib/components/Method/method.js b/lib/components/Method/method.js index 5a8ea3c3..3fc287cb 100644 --- a/lib/components/Method/method.js +++ b/lib/components/Method/method.js @@ -8,15 +8,13 @@ import ResponsesList from '../ResponsesList/responses-list'; import ResponsesSamples from '../ResponsesSamples/responses-samples'; import SchemaSample from '../SchemaSample/schema-sample'; import RequestSamples from '../RequestSamples/request-samples'; -import {EncodeURIComponentPipe} from '../../utils/pipes'; @RedocComponent({ selector: 'method', templateUrl: './lib/components/Method/method.html', styleUrls: ['./lib/components/Method/method.css'], directives: [ParamsList, ResponsesList, ResponsesSamples, SchemaSample, RequestSamples], - inputs: ['tag'], - pipes: [EncodeURIComponentPipe] + inputs: ['tag'] }) export default class Method extends BaseComponent { constructor(schemaMgr) { @@ -32,7 +30,7 @@ export default class Method extends BaseComponent { this.data.methodInfo.tags = this.filterMainTags(this.data.methodInfo.tags); this.data.bodyParam = this.findBodyParam(); if (this.componentSchema.operationId) { - this.data.methodAnchor = 'operation/' + this.componentSchema.operationId; + this.data.methodAnchor = 'operation/' + encodeURIComponent(this.componentSchema.operationId); } else { this.data.methodAnchor = 'tag/' + this.tag + this.pointer; } diff --git a/package.json b/package.json index bcf3fe6d..589bd2ab 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "redoc", "description": "Swagger-generated API Reference Documentation", - "version": "0.6.3", + "version": "0.6.4", "repository": { "type": "git", "url": "git://github.com/Rebilly/ReDoc"