Sync docs from master to gh-pages
This commit is contained in:
@@ -417,14 +417,80 @@ body.book #toc,body.book #preamble,body.book h1.sect0,body.book .sect1>h2{page-b
|
||||
.show-for-print{display:inherit!important}}
|
||||
</style>
|
||||
<style>
|
||||
.hidden { display: none;}.switch { border-width: 1px 1px 0 1px; border-style: solid; border-color: #7a2518; display: inline-block;}.switch--item { padding: 10px; background-color: #ffffff; color: #7a2518; display: inline-block; cursor: pointer;}.switch--item.selected { background-color: #7a2519; color: #ffffff;}
|
||||
</style>
|
||||
.hidden {
|
||||
display: none;
|
||||
}
|
||||
|
||||
.switch {
|
||||
border-width: 1px 1px 0 1px;
|
||||
border-style: solid;
|
||||
border-color: #7a2518;
|
||||
display: inline-block;
|
||||
}
|
||||
|
||||
.switch--item {
|
||||
padding: 10px;
|
||||
background-color: #ffffff;
|
||||
color: #7a2518;
|
||||
display: inline-block;
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
.switch--item.selected {
|
||||
background-color: #7a2519;
|
||||
color: #ffffff;
|
||||
}
|
||||
</style>
|
||||
<script src="http://cdnjs.cloudflare.com/ajax/libs/zepto/1.1.6/zepto.min.js"></script>
|
||||
<script type="text/javascript">
|
||||
function addBlockSwitches() { $('.primary').each(function() { primary = $(this); createSwitchItem(primary, createBlockSwitch(primary)).item.addClass("selected"); primary.children('.title').remove(); }); $('.secondary').each(function(idx, node) { secondary = $(node); primary = findPrimary(secondary); switchItem = createSwitchItem(secondary, primary.children('.switch')); switchItem.content.addClass('hidden'); findPrimary(secondary).append(switchItem.content); secondary.remove(); });}function createBlockSwitch(primary) { blockSwitch = $('<div class="switch"></div>'); primary.prepend(blockSwitch); return blockSwitch;}function findPrimary(secondary) { candidate = secondary.prev(); while (!candidate.is('.primary')) { candidate = candidate.prev(); } return candidate;}function createSwitchItem(block, blockSwitch) { blockName = block.children('.title').text(); content = block.children('.content').first().append(block.next('.colist')); item = $('<div class="switch--item">' + blockName + '</div>'); item.on('click', '', content, function(e) { $(this).addClass('selected'); $(this).siblings().removeClass('selected'); e.data.siblings('.content').addClass('hidden'); e.data.removeClass('hidden'); }); blockSwitch.append(item); return {'item': item, 'content': content};}$(addBlockSwitches);
|
||||
function addBlockSwitches() {
|
||||
$('.primary').each(function() {
|
||||
primary = $(this);
|
||||
createSwitchItem(primary, createBlockSwitch(primary)).item.addClass("selected");
|
||||
primary.children('.title').remove();
|
||||
});
|
||||
$('.secondary').each(function(idx, node) {
|
||||
secondary = $(node);
|
||||
primary = findPrimary(secondary);
|
||||
switchItem = createSwitchItem(secondary, primary.children('.switch'));
|
||||
switchItem.content.addClass('hidden');
|
||||
findPrimary(secondary).append(switchItem.content);
|
||||
secondary.remove();
|
||||
});
|
||||
}
|
||||
|
||||
function createBlockSwitch(primary) {
|
||||
blockSwitch = $('<div class="switch"></div>');
|
||||
primary.prepend(blockSwitch);
|
||||
return blockSwitch;
|
||||
}
|
||||
|
||||
function findPrimary(secondary) {
|
||||
candidate = secondary.prev();
|
||||
while (!candidate.is('.primary')) {
|
||||
candidate = candidate.prev();
|
||||
}
|
||||
return candidate;
|
||||
}
|
||||
|
||||
function createSwitchItem(block, blockSwitch) {
|
||||
blockName = block.children('.title').text();
|
||||
content = block.children('.content').first().append(block.next('.colist'));
|
||||
item = $('<div class="switch--item">' + blockName + '</div>');
|
||||
item.on('click', '', content, function(e) {
|
||||
$(this).addClass('selected');
|
||||
$(this).siblings().removeClass('selected');
|
||||
e.data.siblings('.content').addClass('hidden');
|
||||
e.data.removeClass('hidden');
|
||||
});
|
||||
blockSwitch.append(item);
|
||||
return {'item': item, 'content': content};
|
||||
}
|
||||
|
||||
$(addBlockSwitches);
|
||||
</script>
|
||||
</head>
|
||||
|
||||
<body class="article toc2 toc-left">
|
||||
<div id="header">
|
||||
<h1>Spring Cloud Contract</h1>
|
||||
@@ -842,10 +908,10 @@ files root as described next.
|
||||
<p>WireMock can read response bodies from files on the classpath or file
|
||||
system. In that case you will see in the JSON DSL that the response
|
||||
has a "bodyFileName" instead of a (literal) "body". The files are
|
||||
resolved relative to a root directory <code>src/test/resources/<em>files</code> by
|
||||
resolved relative to a root directory <code>src/test/resources/__files</code> by
|
||||
default. To customize this location you can set the <code>files</code> attribute
|
||||
in the <code>@AutoConfigureWireMock</code> annotation to the location of the
|
||||
parent directory (i.e. the place where <code></em>files</code> is a
|
||||
parent directory (i.e. the place <code>__files</code> is a
|
||||
subdirectory). You can use Spring resource notation to refer to
|
||||
<code>file:…​</code> or <code>classpath:…​</code> locations (but generic URLs are not
|
||||
supported). A list of values can be given and WireMock will resolve
|
||||
|
||||
Reference in New Issue
Block a user