mirror of
https://github.com/Redocly/redoc.git
synced 2024-11-24 01:23:43 +03:00
Merge commit 'ea0d242bfeac3ff1ba4af7ee3a70843c3d6f2fe9' into releases
This commit is contained in:
commit
4be06ea707
17
CHANGELOG.md
Normal file
17
CHANGELOG.md
Normal file
|
@ -0,0 +1,17 @@
|
|||
# 1.1.0 (2016-08-12)
|
||||
### Bug fixes
|
||||
|
||||
* Fix API description width on mobile
|
||||
* Render valid JSON in samples (quoted object keys)
|
||||
|
||||
### Features/Improvements
|
||||
|
||||
* Add Tuple support (arrays with separate schema for each value) (#69)
|
||||
* Add special representation for enum with one value (#70)
|
||||
* Change `< * >` notation to `< anything >`
|
||||
|
||||
|
||||
# 1.0.1 (2016-08-01)
|
||||
### Bug fixes
|
||||
|
||||
* Use api host if schema host is undefined
|
|
@ -9,10 +9,10 @@
|
|||
</head>
|
||||
<body>
|
||||
<nav>
|
||||
<header> ReDoc </header>
|
||||
<header> <a href="/"> ReDoc </a> </header>
|
||||
<template is="dom-bind" id="specs">
|
||||
<form id="schema-url-form" is="iron-form">
|
||||
<vaadin-combo-box-light id="spec-input" items="[[specs]]" attr-for-value="value" allow-custom-value>
|
||||
<vaadin-combo-box-light id="spec-input" items="[[specs]]" allow-custom-value>
|
||||
<input placeholder="URL to a spec to try" id="schema-url-input" type="text" is="iron-input" value="https://rebilly.github.io/RebillyAPI/swagger.json">
|
||||
</vaadin-combo-box-light>
|
||||
<button type="submit"> Explore </button>
|
||||
|
|
|
@ -109,6 +109,10 @@ nav iframe {
|
|||
top: 0;
|
||||
}
|
||||
|
||||
header a {
|
||||
color: inherit;
|
||||
text-decoration: none;
|
||||
}
|
||||
@media (min-width: 1000px) {
|
||||
nav header {
|
||||
position: absolute;
|
||||
|
|
21
demo/main.js
21
demo/main.js
|
@ -48,10 +48,27 @@
|
|||
'https://api.apis.guru/v2/specs/data2crm.com/1/swagger.yaml',
|
||||
'https://api.apis.guru/v2/specs/graphhopper.com/1.0/swagger.yaml'
|
||||
];
|
||||
|
||||
var $specInput = document.getElementById('spec-input');
|
||||
$specInput.addEventListener('value-changed', function(e) {
|
||||
schemaUrlInput.value = e.detail.value;
|
||||
|
||||
// $specInput.addEventListener('value-changed', function(e) {
|
||||
// schemaUrlInput.value = e.detail.value;
|
||||
// location.search = updateQueryStringParameter(location.search, 'url', schemaUrlInput.value);
|
||||
// });
|
||||
|
||||
function selectItem() {
|
||||
let value = this.innerText.trim();
|
||||
schemaUrlInput.value = value;
|
||||
location.search = updateQueryStringParameter(location.search, 'url', schemaUrlInput.value);
|
||||
}
|
||||
|
||||
// for some reason events are not triggered so have to dirty fix this
|
||||
$specInput.addEventListener('click', function(event) {
|
||||
let $elems = document.querySelectorAll('.item.vaadin-combo-box-overlay');
|
||||
$elems.forEach(function($el) {
|
||||
$el.addEventListener('mousedown', selectItem);
|
||||
$el.addEventListener('mousedown', selectItem);
|
||||
});
|
||||
});
|
||||
});
|
||||
//window.redocDebugMode = true;
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
Download OpenAPI (fka Swagger) specification:
|
||||
<a class="openapi-button" target="_blank" attr.href='{{specUrl}}'> Download </a>
|
||||
</p>
|
||||
<p *ngIf="info.description" [innerHtml]="info['x-redoc-html-description'] | safe"> </p>
|
||||
<p *ngIf="info.description" class="redoc-markdown-block" [innerHtml]="info['x-redoc-html-description'] | safe"> </p>
|
||||
<p>
|
||||
<!-- TODO: create separate components for contact and license ? -->
|
||||
<span *ngIf="info.contact"> Contact:
|
||||
|
|
|
@ -5,7 +5,7 @@ declare var Prism: any;
|
|||
const md = new Remarkable({
|
||||
html: true,
|
||||
linkify: true,
|
||||
breaks: false,
|
||||
breaks: true,
|
||||
typographer: false,
|
||||
highlight: (str, lang) => {
|
||||
if (lang === 'json') lang = 'js';
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
{
|
||||
"name": "redoc",
|
||||
"description": "Swagger-generated API Reference Documentation",
|
||||
"version": "1.1.0",
|
||||
"version": "1.1.1",
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "git://github.com/Rebilly/ReDoc"
|
||||
|
|
Loading…
Reference in New Issue
Block a user