Merge branch 'master' into releases

This commit is contained in:
Roman Hotsiy 2016-03-09 22:00:21 +02:00
commit 22c76a060d
3 changed files with 4 additions and 6 deletions

View File

@ -1,7 +1,7 @@
<div class="method"> <div class="method">
<div class="method-content"> <div class="method-content">
<h2 class="method-header sharable-header"> <h2 class="method-header sharable-header">
<a class="share-link" href="#{{data.methodAnchor | encodeURIComponent }}"></a>{{data.methodInfo.summary}} <a class="share-link" href="#{{data.methodAnchor}}"></a>{{data.methodInfo.summary}}
</h2> </h2>
<h3 class="method-endpoint"> <h3 class="method-endpoint">
<span class="http-method" [ngClass]="data.httpMethod">{{data.httpMethod}}</span> <span class="http-method" [ngClass]="data.httpMethod">{{data.httpMethod}}</span>

View File

@ -8,15 +8,13 @@ import ResponsesList from '../ResponsesList/responses-list';
import ResponsesSamples from '../ResponsesSamples/responses-samples'; import ResponsesSamples from '../ResponsesSamples/responses-samples';
import SchemaSample from '../SchemaSample/schema-sample'; import SchemaSample from '../SchemaSample/schema-sample';
import RequestSamples from '../RequestSamples/request-samples'; import RequestSamples from '../RequestSamples/request-samples';
import {EncodeURIComponentPipe} from '../../utils/pipes';
@RedocComponent({ @RedocComponent({
selector: 'method', selector: 'method',
templateUrl: './lib/components/Method/method.html', templateUrl: './lib/components/Method/method.html',
styleUrls: ['./lib/components/Method/method.css'], styleUrls: ['./lib/components/Method/method.css'],
directives: [ParamsList, ResponsesList, ResponsesSamples, SchemaSample, RequestSamples], directives: [ParamsList, ResponsesList, ResponsesSamples, SchemaSample, RequestSamples],
inputs: ['tag'], inputs: ['tag']
pipes: [EncodeURIComponentPipe]
}) })
export default class Method extends BaseComponent { export default class Method extends BaseComponent {
constructor(schemaMgr) { constructor(schemaMgr) {
@ -32,7 +30,7 @@ export default class Method extends BaseComponent {
this.data.methodInfo.tags = this.filterMainTags(this.data.methodInfo.tags); this.data.methodInfo.tags = this.filterMainTags(this.data.methodInfo.tags);
this.data.bodyParam = this.findBodyParam(); this.data.bodyParam = this.findBodyParam();
if (this.componentSchema.operationId) { if (this.componentSchema.operationId) {
this.data.methodAnchor = 'operation/' + this.componentSchema.operationId; this.data.methodAnchor = 'operation/' + encodeURIComponent(this.componentSchema.operationId);
} else { } else {
this.data.methodAnchor = 'tag/' + this.tag + this.pointer; this.data.methodAnchor = 'tag/' + this.tag + this.pointer;
} }

View File

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