parent
e90d00ffce
commit
cb40b986d1
|
@ -176,10 +176,8 @@ public class RestTestsFromSnippetsTask extends SnippetsTask {
|
||||||
String body = matcher.group("body")
|
String body = matcher.group("body")
|
||||||
String catchPart = last ? snippet.catchPart : null
|
String catchPart = last ? snippet.catchPart : null
|
||||||
if (pathAndQuery.startsWith('/')) {
|
if (pathAndQuery.startsWith('/')) {
|
||||||
// Why not do some light linting while we're here?
|
// Leading '/'s break the generated paths
|
||||||
throw new InvalidUserDataException(
|
pathAndQuery = pathAndQuery.substring(1)
|
||||||
"Path shouldn't start with a '/': $snippet\n"
|
|
||||||
+ snippet.contents)
|
|
||||||
}
|
}
|
||||||
emitDo(method, pathAndQuery, body, catchPart)
|
emitDo(method, pathAndQuery, body, catchPart)
|
||||||
}
|
}
|
||||||
|
|
|
@ -41,7 +41,7 @@ in the field mapping, as follows:
|
||||||
|
|
||||||
[source,js]
|
[source,js]
|
||||||
--------------------------------------------------
|
--------------------------------------------------
|
||||||
PUT my_index
|
PUT /my_index
|
||||||
{
|
{
|
||||||
"mappings": {
|
"mappings": {
|
||||||
"my_type": {
|
"my_type": {
|
||||||
|
|
Loading…
Reference in New Issue