Merge branch 'master' into releases

This commit is contained in:
Roman Hotsiy 2016-03-13 02:40:50 +02:00
commit 0f2ac8cdbc
3 changed files with 8 additions and 12 deletions

View File

@ -101,13 +101,10 @@ $sub-schema-offset: ($bullet-size/2) + $bullet-margin;
} }
.param-type.with-hint { .param-type.with-hint {
&:before, &:after { display: inline-block;
content: "\\00a0"; margin-bottom: 0.4em;
} border-bottom: 1px dotted rgba(38,50,56,0.4);
background-color: rgba(0, 50, 159, 0.1); padding: 0;
padding: 0.2em 0;
font-size: 0.85em;
border-radius: 3px;
cursor: help; cursor: help;
} }

View File

@ -66,7 +66,6 @@ export default class JsonSchema extends BaseComponent {
if (!schema.properties) { if (!schema.properties) {
this.isTrivial = true; this.isTrivial = true;
this._displayType = schema.type; this._displayType = schema.type;
this._displayTypeHint = 'This field may contain data of any type';
return; return;
} }
@ -108,13 +107,13 @@ export default class JsonSchema extends BaseComponent {
propData.format = itemFormat; propData.format = itemFormat;
propData._isArray = true; propData._isArray = true;
propData.type = 'array ' + propData.items.type; propData.type = 'array ' + propData.items.type;
} else if (propData.type === 'object') { } else if (propData.type === 'object' && propData.properties) {
propData._displayType = propData.title || 'object'; propData._displayType = propData.title || 'object';
} else if (!propData.type) { } else if (!propData.type) {
propData._displayType = '< * >'; propData._displayType = '< * >';
propData._displayTypeHint = 'This field may contain data of any type'; propData._displayTypeHint = 'This field may contain data of any type';
} else { } else {
// here we are sure that property has simple type // here we are sure that property has simple type (integer, string, object withou properties)
// delete pointer for simple types to not show it as subschema // delete pointer for simple types to not show it as subschema
if (propData._pointer) { if (propData._pointer) {
propData._pointer = undefined; propData._pointer = undefined;

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.5", "version": "0.6.6",
"repository": { "repository": {
"type": "git", "type": "git",
"url": "git://github.com/Rebilly/ReDoc" "url": "git://github.com/Rebilly/ReDoc"
@ -56,7 +56,7 @@
"devDependencies": { "devDependencies": {
"babel-eslint": "^4.1.6", "babel-eslint": "^4.1.6",
"babel-polyfill": "^6.3.14", "babel-polyfill": "^6.3.14",
"branch-release": "^0.3.1", "branch-release": "^0.3.2",
"browser-sync": "^2.10.1", "browser-sync": "^2.10.1",
"del": "^2.2.0", "del": "^2.2.0",
"deploy-to-gh-pages": "^1.0.0", "deploy-to-gh-pages": "^1.0.0",