Add support for GFM syntax in model (schema) descriptions -- relies on one small change to swagger-client
This commit is contained in:
11
dist/css/print.css
vendored
11
dist/css/print.css
vendored
@@ -426,6 +426,17 @@
|
|||||||
.swagger-section .swagger-ui-wrap .model-signature .description .propWrap .optionsWrapper .optionName {
|
.swagger-section .swagger-ui-wrap .model-signature .description .propWrap .optionsWrapper .optionName {
|
||||||
font-weight: bold;
|
font-weight: bold;
|
||||||
}
|
}
|
||||||
|
.swagger-section .swagger-ui-wrap .model-signature .description .propDesc.markdown > p:first-child,
|
||||||
|
.swagger-section .swagger-ui-wrap .model-signature .description .propDesc.markdown > p:last-child {
|
||||||
|
display: inline;
|
||||||
|
}
|
||||||
|
.swagger-section .swagger-ui-wrap .model-signature .description .propDesc.markdown > p:not(:first-child):before {
|
||||||
|
display: block;
|
||||||
|
content: '';
|
||||||
|
}
|
||||||
|
.swagger-section .swagger-ui-wrap .model-signature .description span:last-of-type.propDesc.markdown > p:only-child {
|
||||||
|
margin-right: -3px;
|
||||||
|
}
|
||||||
.swagger-section .swagger-ui-wrap .model-signature .propName {
|
.swagger-section .swagger-ui-wrap .model-signature .propName {
|
||||||
font-weight: bold;
|
font-weight: bold;
|
||||||
}
|
}
|
||||||
|
|||||||
11
dist/css/screen.css
vendored
11
dist/css/screen.css
vendored
@@ -426,6 +426,17 @@
|
|||||||
.swagger-section .swagger-ui-wrap .model-signature .description .propWrap .optionsWrapper .optionName {
|
.swagger-section .swagger-ui-wrap .model-signature .description .propWrap .optionsWrapper .optionName {
|
||||||
font-weight: bold;
|
font-weight: bold;
|
||||||
}
|
}
|
||||||
|
.swagger-section .swagger-ui-wrap .model-signature .description .propDesc.markdown > p:first-child,
|
||||||
|
.swagger-section .swagger-ui-wrap .model-signature .description .propDesc.markdown > p:last-child {
|
||||||
|
display: inline;
|
||||||
|
}
|
||||||
|
.swagger-section .swagger-ui-wrap .model-signature .description .propDesc.markdown > p:not(:first-child):before {
|
||||||
|
display: block;
|
||||||
|
content: '';
|
||||||
|
}
|
||||||
|
.swagger-section .swagger-ui-wrap .model-signature .description span:last-of-type.propDesc.markdown > p:only-child {
|
||||||
|
margin-right: -3px;
|
||||||
|
}
|
||||||
.swagger-section .swagger-ui-wrap .model-signature .propName {
|
.swagger-section .swagger-ui-wrap .model-signature .propName {
|
||||||
font-weight: bold;
|
font-weight: bold;
|
||||||
}
|
}
|
||||||
|
|||||||
841
dist/swagger-ui.js
vendored
841
dist/swagger-ui.js
vendored
File diff suppressed because one or more lines are too long
19
dist/swagger-ui.min.js
vendored
19
dist/swagger-ui.min.js
vendored
File diff suppressed because one or more lines are too long
@@ -426,6 +426,17 @@
|
|||||||
.swagger-section .swagger-ui-wrap .model-signature .description .propWrap .optionsWrapper .optionName {
|
.swagger-section .swagger-ui-wrap .model-signature .description .propWrap .optionsWrapper .optionName {
|
||||||
font-weight: bold;
|
font-weight: bold;
|
||||||
}
|
}
|
||||||
|
.swagger-section .swagger-ui-wrap .model-signature .description .propDesc.markdown > p:first-child,
|
||||||
|
.swagger-section .swagger-ui-wrap .model-signature .description .propDesc.markdown > p:last-child {
|
||||||
|
display: inline;
|
||||||
|
}
|
||||||
|
.swagger-section .swagger-ui-wrap .model-signature .description .propDesc.markdown > p:not(:first-child):before {
|
||||||
|
display: block;
|
||||||
|
content: '';
|
||||||
|
}
|
||||||
|
.swagger-section .swagger-ui-wrap .model-signature .description span:last-of-type.propDesc.markdown > p:only-child {
|
||||||
|
margin-right: -3px;
|
||||||
|
}
|
||||||
.swagger-section .swagger-ui-wrap .model-signature .propName {
|
.swagger-section .swagger-ui-wrap .model-signature .propName {
|
||||||
font-weight: bold;
|
font-weight: bold;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -426,6 +426,17 @@
|
|||||||
.swagger-section .swagger-ui-wrap .model-signature .description .propWrap .optionsWrapper .optionName {
|
.swagger-section .swagger-ui-wrap .model-signature .description .propWrap .optionsWrapper .optionName {
|
||||||
font-weight: bold;
|
font-weight: bold;
|
||||||
}
|
}
|
||||||
|
.swagger-section .swagger-ui-wrap .model-signature .description .propDesc.markdown > p:first-child,
|
||||||
|
.swagger-section .swagger-ui-wrap .model-signature .description .propDesc.markdown > p:last-child {
|
||||||
|
display: inline;
|
||||||
|
}
|
||||||
|
.swagger-section .swagger-ui-wrap .model-signature .description .propDesc.markdown > p:not(:first-child):before {
|
||||||
|
display: block;
|
||||||
|
content: '';
|
||||||
|
}
|
||||||
|
.swagger-section .swagger-ui-wrap .model-signature .description span:last-of-type.propDesc.markdown > p:only-child {
|
||||||
|
margin-right: -3px;
|
||||||
|
}
|
||||||
.swagger-section .swagger-ui-wrap .model-signature .propName {
|
.swagger-section .swagger-ui-wrap .model-signature .propName {
|
||||||
font-weight: bold;
|
font-weight: bold;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -200,6 +200,10 @@ window.SwaggerUi = Backbone.Router.extend({
|
|||||||
$('.markdown').each(function(){
|
$('.markdown').each(function(){
|
||||||
$(this).html(marked($(this).html()));
|
$(this).html(marked($(this).html()));
|
||||||
});
|
});
|
||||||
|
|
||||||
|
$('.propDesc', '.model-signature .description').each(function () {
|
||||||
|
$(this).html(marked($(this).html())).addClass('markdown');
|
||||||
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
});
|
});
|
||||||
|
|||||||
@@ -321,6 +321,19 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
.propDesc.markdown {
|
||||||
|
> p:first-child,
|
||||||
|
> p:last-child {
|
||||||
|
display: inline;
|
||||||
|
}
|
||||||
|
> p:not(:first-child):before {
|
||||||
|
display: block;
|
||||||
|
content: '';
|
||||||
|
}
|
||||||
|
}
|
||||||
|
span:last-of-type.propDesc.markdown > p:only-child {
|
||||||
|
margin-right: -3px; // otherwise there is a gap before the comma
|
||||||
|
}
|
||||||
}
|
}
|
||||||
.propName {
|
.propName {
|
||||||
font-weight: bold;
|
font-weight: bold;
|
||||||
|
|||||||
Reference in New Issue
Block a user