From 86b4db468bce6fe0f60dee07f7e550fb31278fbd Mon Sep 17 00:00:00 2001 From: Bohdan Khorolets Date: Tue, 15 Aug 2017 10:08:01 +0300 Subject: [PATCH 01/12] Add `display: inline-block` for `.openapi-button` (#321) --- lib/components/ApiInfo/api-info.scss | 1 + 1 file changed, 1 insertion(+) diff --git a/lib/components/ApiInfo/api-info.scss b/lib/components/ApiInfo/api-info.scss index f7e9f732..6e0d08a5 100644 --- a/lib/components/ApiInfo/api-info.scss +++ b/lib/components/ApiInfo/api-info.scss @@ -17,6 +17,7 @@ font-weight: normal; margin-left: 0.5em; padding: 3px 8px 4px; + display: inline-block; } :host /deep/ [section] { From 955ef7101d58c08699d1a6e76665e43ae3ab5d9c Mon Sep 17 00:00:00 2001 From: Roman Hotsiy Date: Thu, 17 Aug 2017 10:27:19 +0300 Subject: [PATCH 02/12] chore: remove some dead code --- .editorconfig | 31 +++++++++++++++++++++++++++++++ lib/utils/pipes.ts | 17 +++-------------- tests/unit/pipes.spec.js | 30 +----------------------------- 3 files changed, 35 insertions(+), 43 deletions(-) create mode 100644 .editorconfig diff --git a/.editorconfig b/.editorconfig new file mode 100644 index 00000000..7303e2f6 --- /dev/null +++ b/.editorconfig @@ -0,0 +1,31 @@ +[*] +charset=utf-8 +end_of_line=lf +insert_final_newline=false +indent_style=space +indent_size=4 + +[{.eslintrc,.babelrc,.stylelintrc,jest.config,*.json,*.jsb3,*.jsb2,*.bowerrc}] +indent_style=space +indent_size=2 + +[*.scss] +indent_style=space +indent_size=2 + +[*.styl] +indent_style=space +indent_size=2 + +[*.coffee] +indent_style=space +indent_size=2 + +[{.analysis_options,*.yml,*.yaml}] +indent_style=space +indent_size=2 + +[tslint.json] +indent_style=space +indent_size=2 + diff --git a/lib/utils/pipes.ts b/lib/utils/pipes.ts index 4f8a7802..549603a9 100644 --- a/lib/utils/pipes.ts +++ b/lib/utils/pipes.ts @@ -35,17 +35,6 @@ export class KeysPipe implements PipeTransform { } } -@Pipe({ name: 'jsonPointerEscape' }) -export class JsonPointerEscapePipe implements PipeTransform { - transform(value:string) { - if (isBlank(value)) return value; - if (!isString(value)) { - throw new InvalidPipeArgumentException(JsonPointerEscapePipe, value); - } - return JsonPointer.escape(value); - } -} - @Pipe({ name: 'marked' }) export class MarkedPipe implements PipeTransform { renderer: MdRenderer; @@ -58,7 +47,7 @@ export class MarkedPipe implements PipeTransform { transform(value:string) { if (isBlank(value)) return value; if (!isString(value)) { - throw new InvalidPipeArgumentException(JsonPointerEscapePipe, value); + throw new InvalidPipeArgumentException(MarkedPipe, value); } let res = `${this.renderer.renderMd(value)}`; return this.unstrustedSpec ? res : this.sanitizer.bypassSecurityTrustHtml(res); @@ -95,7 +84,7 @@ export class PrismPipe implements PipeTransform { } if (isBlank(value)) return value; if (!isString(value)) { - throw new InvalidPipeArgumentException(JsonPointerEscapePipe, value); + throw new InvalidPipeArgumentException(PrismPipe, value); } let lang = args[0].toString().trim().toLowerCase(); if (langMap[lang]) lang = langMap[lang]; @@ -138,5 +127,5 @@ export class CollectionFormatPipe implements PipeTransform { } export const REDOC_PIPES = [ - JsonPointerEscapePipe, MarkedPipe, SafePipe, PrismPipe, EncodeURIComponentPipe, JsonFormatter, KeysPipe, CollectionFormatPipe + MarkedPipe, SafePipe, PrismPipe, EncodeURIComponentPipe, JsonFormatter, KeysPipe, CollectionFormatPipe ]; diff --git a/tests/unit/pipes.spec.js b/tests/unit/pipes.spec.js index 1f6e4839..859ea385 100644 --- a/tests/unit/pipes.spec.js +++ b/tests/unit/pipes.spec.js @@ -1,6 +1,6 @@ 'use strict'; -import {KeysPipe, JsonPointerEscapePipe, MarkedPipe} from '../../lib/utils/pipes'; +import {KeysPipe, MarkedPipe} from '../../lib/utils/pipes'; describe('Pipes', () => { describe('KeysPipe', () => { @@ -33,34 +33,6 @@ describe('Pipes', () => { }); }); - describe('JsonPointerEscapePipe', () => { - let unescaped; - let escaped; - var pipe; - - beforeEach(() => { - unescaped = 'test/path~1'; - escaped = 'test~1path~01'; - pipe = new JsonPointerEscapePipe(); - }); - - describe('JsonPointerEscapePipe transform', () => { - it('should escpae pointer', () => { - var val = pipe.transform(unescaped); - val.should.be.equal(escaped); - }); - - it('should not support other objects', () => { - (() => pipe.transform(45)).should.throw(); - (() => pipe.transform({})).should.throw(); - }); - - it('should not throw on blank input', () => { - (() => pipe.transform()).should.not.throw(); - }); - }); - }); - describe('MarkedPipe', () => { let unmarked; let marked; From b84177c1578df3c6972cd6006328a36f9cb87988 Mon Sep 17 00:00:00 2001 From: Roman Hotsiy Date: Thu, 17 Aug 2017 11:23:12 +0300 Subject: [PATCH 03/12] feat: support text-plain response sample closes #270 --- demo/swagger.yaml | 1 + lib/components/SchemaSample/schema-sample.html | 10 +++++++++- lib/components/SchemaSample/schema-sample.scss | 2 +- lib/components/SchemaSample/schema-sample.ts | 9 ++++----- lib/utils/helpers.ts | 15 +++++++++++++++ 5 files changed, 30 insertions(+), 7 deletions(-) diff --git a/demo/swagger.yaml b/demo/swagger.yaml index 7ffec750..b4590253 100644 --- a/demo/swagger.yaml +++ b/demo/swagger.yaml @@ -619,6 +619,7 @@ paths: examples: application/json: OK application/xml: OK + text/plain: OK headers: X-Rate-Limit: type: integer diff --git a/lib/components/SchemaSample/schema-sample.html b/lib/components/SchemaSample/schema-sample.html index a13dbc78..27357ef8 100644 --- a/lib/components/SchemaSample/schema-sample.html +++ b/lib/components/SchemaSample/schema-sample.html @@ -20,7 +20,15 @@ -

+      

+    
+  
+  
+    
+
+ Copy +
+
{{textSample}}
diff --git a/lib/components/SchemaSample/schema-sample.scss b/lib/components/SchemaSample/schema-sample.scss index 70a26a73..ff3fbf9e 100644 --- a/lib/components/SchemaSample/schema-sample.scss +++ b/lib/components/SchemaSample/schema-sample.scss @@ -131,7 +131,7 @@ pre { padding-left: 6px; } - .redoc-json, .xml-sample { + .redoc-json, .response-sample { overflow-x: auto; padding: 20px; border-radius: $border-radius*2; diff --git a/lib/components/SchemaSample/schema-sample.ts b/lib/components/SchemaSample/schema-sample.ts index 00fa9558..4bbbe4d9 100644 --- a/lib/components/SchemaSample/schema-sample.ts +++ b/lib/components/SchemaSample/schema-sample.ts @@ -6,7 +6,7 @@ import * as OpenAPISampler from 'openapi-sampler'; import JsonPointer from '../../utils/JsonPointer'; import { BaseComponent, SpecManager } from '../base'; import { SchemaNormalizer } from '../../services/schema-normalizer.service'; -import { getJsonLikeSample, getXmlLikeSample} from '../../utils/helpers'; +import { getJsonLikeSample, getXmlLikeSample, getTextLikeSample } from '../../utils/helpers'; @Component({ selector: 'schema-sample', @@ -21,6 +21,7 @@ export class SchemaSample extends BaseComponent implements OnInit { element: any; sample: any; xmlSample: string; + textSample: string; enableButtons: boolean = false; private _normalizer:SchemaNormalizer; @@ -51,10 +52,8 @@ export class SchemaSample extends BaseComponent implements OnInit { base.examples = requestExamples; } - let xmlLikeSample = base.examples && getXmlLikeSample(base.examples); - if (xmlLikeSample) { - this.xmlSample = xmlLikeSample; - } + this.xmlSample = base.examples && getXmlLikeSample(base.examples); + this.textSample = base.examples && getTextLikeSample(base.examples); let jsonLikeSample = base.examples && getJsonLikeSample(base.examples); if (jsonLikeSample) { diff --git a/lib/utils/helpers.ts b/lib/utils/helpers.ts index dc0fa3d3..1ab9ab76 100644 --- a/lib/utils/helpers.ts +++ b/lib/utils/helpers.ts @@ -142,6 +142,10 @@ export function isXmlLike(contentType: string): boolean { return contentType.search(/xml/i) !== -1; } +export function isTextLike(contentType: string): boolean { + return contentType.search(/text\/plain/i) !== -1; +} + export function getJsonLikeSample(samples: Object = {}) { const jsonLikeKeys = Object.keys(samples).filter(isJsonLike); @@ -161,3 +165,14 @@ export function getXmlLikeSample(samples: Object = {}) { return samples[xmlLikeKeys[0]]; } + + +export function getTextLikeSample(samples: Object = {}) { + const textLikeKeys = Object.keys(samples).filter(isTextLike); + + if (!textLikeKeys.length) { + return false; + } + + return samples[textLikeKeys[0]]; +} From f792273be8460f2c6f96eda8135a31c8754b36cb Mon Sep 17 00:00:00 2001 From: Roman Hotsiy Date: Thu, 17 Aug 2017 11:25:58 +0300 Subject: [PATCH 04/12] support x-example for parameters closes #297 --- demo/swagger.yaml | 1 + .../JsonSchema/_json-schema-common.scss | 30 ++++++++++++------- lib/components/ParamsList/params-list.html | 3 ++ lib/components/Redoc/redoc.scss | 9 ++---- lib/services/schema-helper.service.ts | 3 ++ 5 files changed, 29 insertions(+), 17 deletions(-) diff --git a/demo/swagger.yaml b/demo/swagger.yaml index b4590253..88447235 100644 --- a/demo/swagger.yaml +++ b/demo/swagger.yaml @@ -242,6 +242,7 @@ paths: in: header required: false type: string + x-example: Bearer - name: petId in: path description: Pet id to delete diff --git a/lib/components/JsonSchema/_json-schema-common.scss b/lib/components/JsonSchema/_json-schema-common.scss index b6a27a2b..b9a48e89 100644 --- a/lib/components/JsonSchema/_json-schema-common.scss +++ b/lib/components/JsonSchema/_json-schema-common.scss @@ -64,7 +64,8 @@ $sub-schema-offset: ($bullet-size / 2) + $bullet-margin; font-weight: bold; } -.param-type, .param-array-format { +.param-type, +.param-array-format { vertical-align: middle; line-height: $param-name-height; color: rgba($black, 0.4); @@ -73,7 +74,8 @@ $sub-schema-offset: ($bullet-size / 2) + $bullet-margin; .param-type { font-weight: normal; word-break: break-all; - &.array::before, &.tuple::before { + &.array::before, + &.tuple::before { color: $black; font-weight: $base-font-weight; .param-collection-format-multi + & { @@ -144,7 +146,6 @@ $sub-schema-offset: ($bullet-size / 2) + $bullet-margin; } .param:first-of-type { - > .param-name::before { content: ''; display: block; @@ -158,7 +159,6 @@ $sub-schema-offset: ($bullet-size / 2) + $bullet-margin; .param:last-of-type, .param.last { - > .param-name { position: relative; @@ -236,14 +236,24 @@ $sub-schema-offset: ($bullet-size / 2) + $bullet-margin; } } +.param-example { + font-size: 0.95em; + + &::before { + content: 'Example: '; + } +} + .param-enum-value, -.param-default-value { - background-color: $background-color; - border: 1px solid rgba($secondary-color, 0.2); +.param-default-value, +.param-example-value { + font-family: Courier, monospace; + background-color: rgba($secondary-color, 0.02); + border: 1px solid rgba($secondary-color, 0.1); margin: 2px 3px; - padding: 0 5px; - border-radius: 2px; - color: $secondary-color; + padding: 0.1em 0.2em 0.2em; + border-radius: $border-radius; + color: $text-color; display: inline-block; min-width: 20px; text-align: center; diff --git a/lib/components/ParamsList/params-list.html b/lib/components/ParamsList/params-list.html index 3f4fcc25..fc6f705a 100644 --- a/lib/components/ParamsList/params-list.html +++ b/lib/components/ParamsList/params-list.html @@ -22,6 +22,9 @@
{{param.default | json}}
+
+ {{param.example | json}} +
{{enumItem.val | json}} diff --git a/lib/components/Redoc/redoc.scss b/lib/components/Redoc/redoc.scss index abf2326e..14a82928 100644 --- a/lib/components/Redoc/redoc.scss +++ b/lib/components/Redoc/redoc.scss @@ -275,16 +275,11 @@ footer { code { font-family: Courier, monospace; background-color: rgba(38,50,56,0.04); - padding: 0.1em 0 0.2em 0; + padding: 0.1em 0.2em 0.2em; font-size: 1em; border-radius: $border-radius; color: $red; - border: 1px solid rgba(38,50,56,0.1); - - &:before, &:after { - letter-spacing: -0.2em; - //content: "\00a0"; - } + border: 1px solid rgba(38,50,56, 0.1); } p:last-of-type { diff --git a/lib/services/schema-helper.service.ts b/lib/services/schema-helper.service.ts index e2acd3cc..d8579d8b 100644 --- a/lib/services/schema-helper.service.ts +++ b/lib/services/schema-helper.service.ts @@ -119,6 +119,9 @@ const injectors = { injectTo._displayType = propertySchema.title ? `${propertySchema.title} (${propertySchema.type})` : propertySchema.type; } + if (injectTo['x-example'] && !propertySchema.example) { + injectTo.example = propertySchema['x-example']; + } injectTo._widgetType = 'trivial'; } }, From 60e8cb437ab85253170ce3f4572bc0393b873dda Mon Sep 17 00:00:00 2001 From: Roman Hotsiy Date: Thu, 17 Aug 2017 11:42:12 +0300 Subject: [PATCH 05/12] feat: generate download link for specs defined by an object closes #289 --- lib/components/ApiInfo/api-info.html | 2 +- lib/components/ApiInfo/api-info.ts | 13 +++++++++++-- lib/utils/spec-manager.ts | 2 ++ 3 files changed, 14 insertions(+), 3 deletions(-) diff --git a/lib/components/ApiInfo/api-info.html b/lib/components/ApiInfo/api-info.html index c853aaca..55f0a4e9 100644 --- a/lib/components/ApiInfo/api-info.html +++ b/lib/components/ApiInfo/api-info.html @@ -2,7 +2,7 @@

{{info.title}} ({{info.version}})

Download OpenAPI specification: - Download + Download

diff --git a/lib/components/ApiInfo/api-info.ts b/lib/components/ApiInfo/api-info.ts index d04423c4..1f6240c8 100644 --- a/lib/components/ApiInfo/api-info.ts +++ b/lib/components/ApiInfo/api-info.ts @@ -1,5 +1,6 @@ 'use strict'; import { Component, ChangeDetectionStrategy, OnInit, ElementRef } from '@angular/core'; +import { DomSanitizer, SafeResourceUrl } from '@angular/platform-browser'; import { SpecManager, BaseComponent } from '../base'; import { OptionsService, Marker } from '../../services/index'; @@ -11,11 +12,13 @@ import { OptionsService, Marker } from '../../services/index'; }) export class ApiInfo extends BaseComponent implements OnInit { info: any = {}; - specUrl: String; + specUrl: String | SafeResourceUrl; + downloadFilename = ''; constructor(specMgr: SpecManager, private optionsService: OptionsService, elRef: ElementRef, - marker: Marker + marker: Marker, + private sanitizer: DomSanitizer ) { super(specMgr); marker.addElement(elRef.nativeElement); @@ -24,6 +27,12 @@ export class ApiInfo extends BaseComponent implements OnInit { init() { this.info = this.componentSchema.info; this.specUrl = this.specMgr.specUrl; + if (!this.specUrl && window.Blob && window.URL) { + const blob = new Blob([JSON.stringify(this.specMgr.rawSpec, null, 2)], {type : 'application/json'}); + this.specUrl = this.sanitizer.bypassSecurityTrustResourceUrl(window.URL.createObjectURL(blob)); + this.downloadFilename = 'swagger.json'; + } + if (!isNaN(parseInt(this.info.version.toString().substring(0, 1)))) { this.info.version = 'v' + this.info.version; } diff --git a/lib/utils/spec-manager.ts b/lib/utils/spec-manager.ts index 3c3ce3ee..6a399da4 100644 --- a/lib/utils/spec-manager.ts +++ b/lib/utils/spec-manager.ts @@ -26,6 +26,7 @@ export interface DescendantInfo { @Injectable() export class SpecManager { public _schema: any = {}; + public rawSpec: any; public apiUrl: string; public apiProtocol: string; public swagger: string; @@ -48,6 +49,7 @@ export class SpecManager { if (typeof urlOrObject === 'string') { this.specUrl = urlOrObject; } + this.rawSpec = schema; this._schema = snapshot(schema); try { this.init(); From 6b61d3aee1fde06720c68409cd641946df6d88de Mon Sep 17 00:00:00 2001 From: Roman Hotsiy Date: Thu, 17 Aug 2017 11:42:58 +0300 Subject: [PATCH 06/12] chore: fix .editorconfig --- .editorconfig | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/.editorconfig b/.editorconfig index 7303e2f6..737ec4aa 100644 --- a/.editorconfig +++ b/.editorconfig @@ -3,7 +3,7 @@ charset=utf-8 end_of_line=lf insert_final_newline=false indent_style=space -indent_size=4 +indent_size=2 [{.eslintrc,.babelrc,.stylelintrc,jest.config,*.json,*.jsb3,*.jsb2,*.bowerrc}] indent_style=space @@ -28,4 +28,3 @@ indent_size=2 [tslint.json] indent_style=space indent_size=2 - From cb3d318e4a28ef4daf737ebdf689b191de46e413 Mon Sep 17 00:00:00 2001 From: Bohdan Khorolets Date: Wed, 16 Aug 2017 19:42:25 +0300 Subject: [PATCH 07/12] Closes #322: Feature request: Clickable logo that points to specific url --- lib/components/ApiLogo/api-logo.html | 5 ++++- lib/components/ApiLogo/api-logo.ts | 3 +++ 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/lib/components/ApiLogo/api-logo.html b/lib/components/ApiLogo/api-logo.html index 897e3583..e152677b 100644 --- a/lib/components/ApiLogo/api-logo.html +++ b/lib/components/ApiLogo/api-logo.html @@ -1 +1,4 @@ - + + + + diff --git a/lib/components/ApiLogo/api-logo.ts b/lib/components/ApiLogo/api-logo.ts index e253d852..ff75ae12 100644 --- a/lib/components/ApiLogo/api-logo.ts +++ b/lib/components/ApiLogo/api-logo.ts @@ -17,6 +17,9 @@ export class ApiLogo extends BaseComponent implements OnInit { init() { let logoInfo = this.componentSchema.info['x-logo']; + if ('url' in this.componentSchema.info['contact']) { + this.logo.url = this.componentSchema.info['contact']['url']; + } if (!logoInfo) return; this.logo.imgUrl = logoInfo.url; this.logo.bgColor = logoInfo.backgroundColor || 'transparent'; From 514fc297c4cafd8503de5137df190a5b1436f528 Mon Sep 17 00:00:00 2001 From: Bohdan Khorolets Date: Thu, 17 Aug 2017 16:56:42 +0300 Subject: [PATCH 08/12] fix: Increase padding top for .api-info-wrapper when left sidebar is hiding to avoid header overlaying by top menu. --- lib/components/ApiInfo/api-info.scss | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/lib/components/ApiInfo/api-info.scss b/lib/components/ApiInfo/api-info.scss index 6e0d08a5..2f06d834 100644 --- a/lib/components/ApiInfo/api-info.scss +++ b/lib/components/ApiInfo/api-info.scss @@ -9,6 +9,10 @@ @media (max-width: $right-panel-squash-breakpoint) { width: 100%; } + + @media (max-width: $side-menu-mobile-breakpoint) { + padding-top: $section-spacing + 20px; + } } .openapi-button { From 4516507535b44e766d8e39346cb5bcebeb583953 Mon Sep 17 00:00:00 2001 From: Roman Hotsiy Date: Thu, 17 Aug 2017 23:32:04 +0300 Subject: [PATCH 09/12] chore: upload logo --- docs/images/redoc-logo.png | Bin 0 -> 8934 bytes 1 file changed, 0 insertions(+), 0 deletions(-) create mode 100644 docs/images/redoc-logo.png diff --git a/docs/images/redoc-logo.png b/docs/images/redoc-logo.png new file mode 100644 index 0000000000000000000000000000000000000000..456d18b7e37130d57964ef06a1ea18a04a732388 GIT binary patch literal 8934 zcmaKRc_5T+*Z6J8S_mcCCMl(1?8{iPg&|8QCVOTq#f-+-2ZJQL2-#CvDuo$Kc2c&n zgtG7ZGTC?GH$Ct3Jm2q+@BQYFnd`ppv!8RF>zp&;Mh4nvm@YB_0B{DTqiGBP)Huo- z$3RE<-o&^DQhvCxx6H97Xa}s99R>-gA}~L1FE@ zMN#gT|Dm9XbhpPiyJ4NtD9|5@b`Q`VSY<(qr2kRD)$L!hDEGh3L@^k|+s+LlAtwGu zrGEhR_5W{BSJ!``-Lb~V|B?59CG2kM;o9zzN4SBs^00Y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+Z2($OkGPp+rh~DWmL?N696gbP!Fp#ytRJ!DK^0{=BQ;w z=u~O(3zwzD6vnbJ?xx&nSSMxj^=$1-kjYCLYO+cGb+s z93RM%=$%&LakkhiQ07_MGj%&fKL;uYs!RPTc|%IGIB1#!T=(QX6$2AxhVGv@3U)2{DQ1oI&6Px(MTRp1JPIQB2MZu zb1rEdWn^>+U2F`t-zp>iT%5U(_oiS#BV?V*54AllPD9aB{NS3b8-o|-dp{KuJxCTo zrycY4;#Wz?o1+ZeRN}P2A)%T&K^(g92pivI_<45ltI{;b6wga4t@>mtt%PH`n3yMT zP{6a0QwT%8IC#xtwp3iabqM=kx3fx zT(v9bc7qCuQ4=>k?4PI9NzVvbt}gX-{Lo)w5GjpxZp!;wUJ%>y#F(N^L(v~~d?@N@ zOai9SZ{uIKVI=f~cSfh-0YND|kfRCqq&p~l-Lv?8IJ(Slhvv4`TZ32ks>~;GWbbMB zzTI5*o=RGM_k7#rD2IKf$Q{Ri3;BfvxjeaS44_L$oxPRhn6A`ZOQd>uhi?LD-}q5$ z<5ugSY!s4V(EhT9W@k;JVJyeqpp7cc`=O`pFUDMiY+PVF1!DmQF;@<+FoPzT$Kv{n zsYrA&>up{SH84!{XJf2s;MxuhGrhwi!UX#O36gr!KG=N#G9H}z;1|~wyl>E96KQ0k zRy10>@MYHR&Z>-d$!|5ZE^79-P&^w`G9BTRa+`)8(Og)-{Hv`eg)F4&C;ZWTDO<^Z z>D8Y Date: Thu, 17 Aug 2017 23:35:34 +0300 Subject: [PATCH 10/12] =?UTF-8?q?Add=20new=20ReDoc=20logo=20to=20README=20?= =?UTF-8?q?=F0=9F=96=BC,=20kudos=20to=20@cesarlevel?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- README.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 469c6a23..f2e2c1f7 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,5 @@ -# ReDoc +ReDoc logo + **OpenAPI/Swagger-generated API Reference Documentation** [![Build Status](https://travis-ci.org/Rebilly/ReDoc.svg?branch=master)](https://travis-ci.org/Rebilly/ReDoc) [![Coverage Status](https://coveralls.io/repos/Rebilly/ReDoc/badge.svg?branch=master&service=github)](https://coveralls.io/github/Rebilly/ReDoc?branch=master) [![Tested on APIs.guru](http://api.apis.guru/badges/tested_on.svg)](https://APIs.guru) [![dependencies Status](https://david-dm.org/Rebilly/ReDoc/status.svg)](https://david-dm.org/Rebilly/ReDoc) [![devDependencies Status](https://david-dm.org/Rebilly/ReDoc/dev-status.svg)](https://david-dm.org/Rebilly/ReDoc#info=devDependencies) [![Stories in Ready](https://badge.waffle.io/Rebilly/ReDoc.png?label=ready&title=Ready)](https://waffle.io/Rebilly/ReDoc) From b165785064dba0ff039ab2aa57a75df890af8d36 Mon Sep 17 00:00:00 2001 From: Daniel Chao Date: Wed, 16 Aug 2017 13:33:52 -0700 Subject: [PATCH 11/12] Add margins around list-items in markdown They're pretty tightly squeezed in there right now. --- 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 14a82928..f0c1501f 100644 --- a/lib/components/Redoc/redoc.scss +++ b/lib/components/Redoc/redoc.scss @@ -306,6 +306,9 @@ footer { font-family: $base-font, $base-font-family; font-weight: $base-font-weight; line-height: $base-line-height; + > li { + margin: 1em 0; + } } table { From 111bcdb0b9e97d4ec7fe33b2dbb418b226759288 Mon Sep 17 00:00:00 2001 From: Roman Hotsiy Date: Mon, 28 Aug 2017 11:11:40 +0300 Subject: [PATCH 12/12] v1.18.0 --- CHANGELOG.md | 20 ++++++++++++++++++++ package.json | 2 +- 2 files changed, 21 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index aed0b4a8..84764cab 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,23 @@ + +# [1.18.0](https://github.com/Rebilly/ReDoc/compare/v1.16.1...v1.18.0) (2017-08-28) + + +### Bug Fixes + +* increase padding top for `.api-info-wrapper` when left sidebar is hiding to avoid header overlaying by top menu ([514fc29](https://github.com/Rebilly/ReDoc/commit/514fc29)) +* add `display: inline-block` for `.openapi-button` ([86b4db4](https://github.com/Rebilly/ReDoc/commit/86b4db4)), +closes [#321](https://github.com/Rebilly/ReDoc/issues/321) +* add margins around list-items in markdown ([b165785](https://github.com/Rebilly/ReDoc/commit/b165785)) + +### Features + +* generate download link for specs defined by an object ([60e8cb4](https://github.com/Rebilly/ReDoc/commit/60e8cb4)), closes [#289](https://github.com/Rebilly/ReDoc/issues/289) +* support text-plain response sample ([b84177c](https://github.com/Rebilly/ReDoc/commit/b84177c)), closes [#270](https://github.com/Rebilly/ReDoc/issues/270) +* clickable logo that points to specific url ([cb3d318](https://github.com/Rebilly/ReDoc/commit/cb3d318)), closes +[#322](https://github.com/Rebilly/ReDoc/issues/322) +* support x-example for parameters ([f792273](https://github.com/Rebilly/ReDoc/commit/f792273)), closes +[#297](https://github.com/Rebilly/ReDoc/issues/297) + # [1.17.0](https://github.com/Rebilly/ReDoc/compare/v1.16.1...v1.17.0) (2017-08-02) diff --git a/package.json b/package.json index dc5eb7a9..d6efc9d3 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "redoc", "description": "Swagger-generated API Reference Documentation", - "version": "1.17.0", + "version": "1.18.0", "repository": { "type": "git", "url": "git://github.com/Rebilly/ReDoc"