Ignore query string when extracting path parameters
Closes gh-285
This commit is contained in:
@@ -130,6 +130,23 @@ public class PathParametersSnippetTests extends AbstractSnippetTests {
|
||||
"/{a}/{b}?foo=bar").build());
|
||||
}
|
||||
|
||||
@Test
|
||||
public void pathParametersWithQueryStringWithParameters() throws IOException {
|
||||
this.snippet
|
||||
.expectPathParameters("path-parameters-with-query-string-with-parameters")
|
||||
.withContents(
|
||||
tableWithTitleAndHeader(getTitle(), "Parameter", "Description")
|
||||
.row("`a`", "one").row("`b`", "two"));
|
||||
new PathParametersSnippet(Arrays.asList(parameterWithName("a").description("one"),
|
||||
parameterWithName("b").description("two")))
|
||||
.document(operationBuilder(
|
||||
"path-parameters-with-query-string-with-parameters")
|
||||
.attribute(
|
||||
RestDocumentationGenerator.ATTRIBUTE_NAME_URL_TEMPLATE,
|
||||
"/{a}/{b}?foo={c}")
|
||||
.build());
|
||||
}
|
||||
|
||||
@Test
|
||||
public void pathParametersWithCustomAttributes() throws IOException {
|
||||
TemplateResourceResolver resolver = mock(TemplateResourceResolver.class);
|
||||
|
||||
Reference in New Issue
Block a user