Commit a79c732f authored by Matija Obreza's avatar Matija Obreza

Updated API method names and parameters

- Use genesys.api.Pagination instead of 4 @RequestParams
parent a635b561
......@@ -150,28 +150,6 @@ public class DatasetController {
return new FilteredPage<>(filterCode, filter, datasetService.listDatasets(filter, new PageRequest(page, Integer.min(pageSize, 100), direction, sort)));
}
/**
* Filter datasets by filter code.
*
* @param page the page
* @param pageSize the page size
* @param direction the direction
* @param sort the sort
* @param filterCode the filter code
* @return the filtered page
* @throws IOException Signals that an I/O exception has occurred.
* @deprecated Use {@link #datasetList(int, int, org.springframework.data.domain.Sort.Direction, String[], String, DatasetFilter)}
*/
@PostMapping(value = "/list/{filterCode}")
public FilteredPage<Dataset> datasetListShort(@RequestParam(name = "p", required = false, defaultValue = "0") final int page,
@RequestParam(name = "l", required = false, defaultValue = "50") final int pageSize,
@RequestParam(name = "d", required = false, defaultValue = "ASC") final Sort.Direction direction,
@RequestParam(name = "s", required = false, defaultValue = "id") final String[] sort, @PathVariable("filterCode") final String filterCode) throws IOException {
final DatasetFilter filter = shortFilterService.filterByCode(filterCode, DatasetFilter.class);
return new FilteredPage<>(filterCode, filter, datasetService.listDatasets(filter, new PageRequest(page, Integer.min(pageSize, 100), direction, sort)));
}
/**
* Gets the dataset.
*
......
......@@ -236,7 +236,7 @@ public class DescriptorController {
*/
@RequestMapping(value = "/upsert", method = RequestMethod.POST)
@PreAuthorize("hasRole('ADMINISTRATOR')")
public List<Descriptor> updateDescriptor(@RequestBody final List<Descriptor> source) {
public List<Descriptor> updateDescriptors(@RequestBody final List<Descriptor> source) {
return descriptorService.upsertDescriptors(source);
}
......
......@@ -72,7 +72,7 @@ public class LanguagesController {
*/
@PreAuthorize("hasRole('ADMINISTRATOR')")
@PostMapping(value = "/update")
public @ResponseBody String updateLanguages() throws IOException {
public @ResponseBody String updateLanguageVocabulary() throws IOException {
LOG.info("Updating ISO language codes");
vocabularyService.autoUpdateOrCreateVocabulary(ISO639_3, iso639VocabularyUpdater.getISO639Vocabulary());
return "OK";
......@@ -85,7 +85,7 @@ public class LanguagesController {
* @return the vocabulary term
*/
@GetMapping(value = "/{code}", produces = MediaType.APPLICATION_JSON_VALUE)
public VocabularyTerm get(@PathVariable("code") final String code) {
public VocabularyTerm getLanguageTerm(@PathVariable("code") final String code) {
return vocabularyService.getVocabularyTerm(ISO639_3, code);
}
......@@ -97,7 +97,7 @@ public class LanguagesController {
* @throws IOException Signals that an I/O exception has occurred.
*/
@GetMapping(value = "/autocomplete", produces = MediaType.APPLICATION_JSON_VALUE)
public List<VocabularyTerm> autocomplete(@RequestParam("l") final String text) throws IOException {
public List<VocabularyTerm> autocompleteLanguageTerm(@RequestParam("l") final String text) throws IOException {
if (text.length() < 3) {
return Collections.emptyList();
}
......
......@@ -24,15 +24,15 @@ import org.genesys.catalog.model.filters.PartnerFilter;
import org.genesys.catalog.service.PartnerService;
import org.genesys.catalog.service.ShortFilterService;
import org.genesys2.server.api.ApiBaseController;
import org.genesys2.server.api.Pagination;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.data.domain.Page;
import org.springframework.data.domain.PageRequest;
import org.springframework.data.domain.Sort;
import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.web.bind.annotation.DeleteMapping;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.PutMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
......@@ -72,12 +72,9 @@ public class PartnerController {
* @return the page
*/
@PostMapping(value = "/list-mine")
public Page<Partner> myPartners(@RequestParam(name = "p", required = false, defaultValue = "0") final int page,
@RequestParam(name = "l", required = false, defaultValue = "50") final int pageSize,
@RequestParam(name = "d", required = false, defaultValue = "ASC") final Sort.Direction direction,
@RequestParam(name = "s", required = false, defaultValue = "name") final String[] sort, @RequestBody final PartnerFilter partnerFilter) {
public Page<Partner> myPartners(final Pagination page, @RequestBody final PartnerFilter partnerFilter) {
return partnerService.listPartnersForCurrentUser(partnerFilter, new PageRequest(page, Integer.min(pageSize, 100), direction, sort));
return partnerService.listPartnersForCurrentUser(partnerFilter, page.toPageRequest(100));
}
/**
......@@ -92,41 +89,16 @@ public class PartnerController {
* @throws IOException
*/
@PostMapping(value = "/list")
public FilteredPage<Partner> listPartners(@RequestParam(name = "p", required = false, defaultValue = "0") final int page,
@RequestParam(name = "l", required = false, defaultValue = "50") final int pageSize,
@RequestParam(name = "d", required = false, defaultValue = "ASC") final Sort.Direction direction,
@RequestParam(name = "s", required = false, defaultValue = "id") final String[] sort,
@RequestParam(name = "f", required = false) String filterCode,
@RequestBody(required = false) PartnerFilter filter) throws IOException {
public FilteredPage<Partner> listPartners(@RequestParam(name = "f", required = false) String filterCode, final Pagination page,
@RequestBody(required = false) PartnerFilter filter) throws IOException {
System.err.println("Paginate " + page);
if (filterCode != null) {
filter = shortFilterService.filterByCode(filterCode, PartnerFilter.class);
} else {
filterCode = shortFilterService.getCode(filter);
}
return new FilteredPage<>(filterCode, filter, partnerService.listPartners(filter, new PageRequest(page, Integer.min(pageSize, 100), direction, sort)));
}
/**
* Filter partners by filter code.
*
* @param page the page
* @param pageSize the page size
* @param direction the direction
* @param sort the sort
* @param filterCode the filter code
* @return the filtered page
* @throws IOException Signals that an I/O exception has occurred.
* @deprecated Use {@link #listPartners(int, int, org.springframework.data.domain.Sort.Direction, String[], String, PartnerFilter)}
*/
@PostMapping(value = "/list/{filterCode}")
public FilteredPage<Partner> listPartners2(@RequestParam(name = "p", required = false, defaultValue = "0") final int page,
@RequestParam(name = "l", required = false, defaultValue = "50") final int pageSize,
@RequestParam(name = "d", required = false, defaultValue = "ASC") final Sort.Direction direction,
@RequestParam(name = "s", required = false, defaultValue = "id") final String[] sort, @PathVariable("filterCode") final String filterCode) throws IOException {
final PartnerFilter filter = shortFilterService.filterByCode(filterCode, PartnerFilter.class);
return new FilteredPage<>(filterCode, filter, partnerService.listPartners(filter, new PageRequest(page, Integer.min(pageSize, 100), direction, sort)));
return new FilteredPage<>(filterCode, filter, partnerService.listPartners(filter, page.toPageRequest(100)));
}
/**
......@@ -161,8 +133,8 @@ public class PartnerController {
* @return the partner
*/
@PreAuthorize("hasRole('ADMINISTRATOR') or hasPermission(#source.getId(), #source.class.getName(), 'write')")
@PostMapping(value = "/update/{UUID},{version}")
public Partner updatePartner(@PathVariable("UUID") final UUID uuid, @PathVariable("version") final int version, @RequestBody final Partner source) {
@PutMapping(value = "/update")
public Partner updatePartner(@RequestBody final Partner source) {
return partnerService.updatePartner(source);
}
......
......@@ -90,7 +90,7 @@ public class SearchController {
Map<String, SearchResults<?>> suggestions = new HashMap<>();
suggestions.put("search.group.crop", SearchResults.from("code", Arrays.asList("crop"), hitsByEntity.get(Crop.class)));
suggestions.put("search.group.partner", SearchResults.from("uuid", Arrays.asList("owner.uuid"), hitsByEntity.get(Partner.class)));
suggestions.put("search.group.accession", SearchResults.from("doi", Arrays.asList("accessionIdentifier.doi"), hitsByEntity.get(AccessionRef.class)));
suggestions.put("search.group.accession", SearchResults.from("doi", Arrays.asList("accessionRef.doi"), hitsByEntity.get(AccessionRef.class)));
suggestions.put("search.group.descriptor", SearchResults.from("uuid", Arrays.asList("descriptor.uuid"), hitsByEntity.get(Descriptor.class)));
// Search datasets
......
......@@ -181,25 +181,4 @@ public class VocabularyController {
return new FilteredPage<>(filterCode, filter, vocabularyService.listVocabularies(filter, new PageRequest(page, Integer.min(pageSize, 100), direction, sort)));
}
/**
* Filter controlled vocabularies by filter code.
*
* @param page the page
* @param pageSize the page size
* @param direction the direction
* @param sort the sort
* @param filterCode the filter code
* @return the filtered page
* @throws IOException Signals that an I/O exception has occurred.
*/
@PostMapping(value = "/list/{filterCode}")
public FilteredPage<ControlledVocabulary> list(@RequestParam(name = "p", required = false, defaultValue = "0") final int page,
@RequestParam(name = "l", required = false, defaultValue = "50") final int pageSize,
@RequestParam(name = "d", required = false, defaultValue = "ASC") final Sort.Direction direction,
@RequestParam(name = "s", required = false, defaultValue = "id") final String[] sort, @PathVariable("filterCode") final String filterCode) throws IOException {
final ControlledVocabularyFilter filter = shortFilterService.filterByCode(filterCode, ControlledVocabularyFilter.class);
return new FilteredPage<>(filterCode, filter, vocabularyService.listVocabularies(filter, new PageRequest(page, Integer.min(pageSize, 100), direction, sort)));
}
}
......@@ -75,7 +75,7 @@ public class WiewsController {
*/
@PreAuthorize("hasRole('ADMINISTRATOR')")
@PostMapping(value = "/update")
public @ResponseBody String updateLanguages() throws IOException {
public @ResponseBody String updateWiewsVocabulary() throws IOException {
LOG.info("Updating FAO WIEWS codes");
vocabularyService.autoUpdateOrCreateVocabulary(FAO_WIEWS_UUID, wiewsVocabularyUpdater.getWiewsVocabulary());
return "OK";
......@@ -88,7 +88,7 @@ public class WiewsController {
* @return the vocabulary term
*/
@GetMapping(value = "/{code}", produces = MediaType.APPLICATION_JSON_VALUE)
public VocabularyTerm get(@PathVariable("code") final String code) {
public VocabularyTerm getWiewsTerm(@PathVariable("code") final String code) {
return vocabularyService.getVocabularyTerm(FAO_WIEWS_UUID, code);
}
......@@ -100,7 +100,7 @@ public class WiewsController {
* @throws IOException Signals that an I/O exception has occurred.
*/
@GetMapping(value = "/autocomplete", produces = MediaType.APPLICATION_JSON_VALUE)
public List<VocabularyTerm> autocomplete(@RequestParam("term") final String text) throws IOException {
public List<VocabularyTerm> autocompleteWiewsTerm(@RequestParam("term") final String text) throws IOException {
if (text.length() < 3) {
return Collections.emptyList();
}
......
......@@ -56,30 +56,30 @@ public class AccessionRefFilter {
/**
* Builds the query.
*
* @param accessionIdentifiers the accession identifiers
* @param accessionRefs the accession identifiers
* @return the predicate
*/
public Predicate buildQuery(final SetPath<AccessionRef, QAccessionRef> accessionIdentifiers) {
public Predicate buildQuery(final SetPath<AccessionRef, QAccessionRef> accessionRefs) {
final BooleanBuilder and = new BooleanBuilder();
final QAccessionRef identifier = accessionIdentifiers.any();
final QAccessionRef accessionRef = accessionRefs.any();
if (doi != null && !doi.isEmpty()) {
and.and(identifier.doi.in(doi));
and.and(accessionRef.doi.in(doi));
}
if (instCode != null && !instCode.isEmpty()) {
and.and(identifier.instCode.in(instCode));
and.and(accessionRef.instCode.in(instCode));
}
if (genus != null && !genus.isEmpty()) {
and.and(identifier.genus.in(genus));
and.and(accessionRef.genus.in(genus));
}
if (species != null && !species.isEmpty()) {
and.and(identifier.species.in(species));
and.and(accessionRef.species.in(species));
}
if (acceNumb != null) {
and.and(acceNumb.buildQuery(identifier.acceNumb));
and.and(acceNumb.buildQuery(accessionRef.acceNumb));
}
if (accession != null) {
and.and(accession.buildQuery(identifier.accession));
and.and(accession.buildQuery(accessionRef.accession));
}
return and;
......
......@@ -45,11 +45,13 @@ public class DatasetFilter extends UuidModelFilter<DatasetFilter, Dataset> {
/** The owner. */
public PartnerFilter owner;
/** The accession identifier. */
public AccessionRefFilter accessionIdentifier;
/** The accession reference. */
public AccessionRefFilter accessionRef;
/** Dataset location filter */
public DatasetLocationFilter location;
/** Descriptor filter */
public DescriptorFilter descriptor;
/** The title. */
......@@ -90,8 +92,8 @@ public class DatasetFilter extends UuidModelFilter<DatasetFilter, Dataset> {
if (owner != null) {
and.and(owner.buildQuery(dataset.owner));
}
if (accessionIdentifier != null) {
and.and(accessionIdentifier.buildQuery(dataset.accessionRefs));
if (accessionRef != null) {
and.and(accessionRef.buildQuery(dataset.accessionRefs));
}
if (descriptor != null) {
and.and(descriptor.buildQuery(dataset.descriptors.any()));
......
/*
* Copyright 2018 Global Crop Diversity Trust
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.genesys2.server.api;
import java.util.Arrays;
import org.springframework.data.domain.PageRequest;
import org.springframework.data.domain.Pageable;
import org.springframework.data.domain.Sort;
import org.springframework.data.domain.Sort.Direction;
/**
* Data pagination request
*
* @author Matija Obreza
*/
public class Pagination {
private final String[] DEFAULT_SORT_PROPERTIES = { "id" };
/**
* Page (0-based)
*/
private Integer p;
/**
* Page size (length)
*/
private Integer l;
/**
* Sort direction
*/
private Sort.Direction d;
/**
* Sort properties
*/
private String[] s;
public int getP() {
return p;
}
public void setP(int p) {
this.p = p;
}
public int getL() {
return l;
}
public void setL(int l) {
this.l = l;
}
public Sort.Direction getD() {
return d;
}
public void setD(Sort.Direction d) {
this.d = d;
}
public String[] getS() {
return s;
}
public void setS(String[] s) {
this.s = s;
}
@Override
public String toString() {
return "Pagination page=" + p + ", pageSize=" + l + ", dir=" + d + ", sort=" + Arrays.toString(s);
}
/**
* Get sort direction or {@link Sort.Direction#ASC} if null.
*
* @return sort direction or {@link Sort.Direction#ASC}
*/
private Direction getDirection() {
return d == null ? Sort.Direction.ASC : d;
}
/**
* Gets list of sort properties, returns the {@link #DEFAULT_SORT_PROPERTIES} if
* null
*
* @return provided properties or {@link #DEFAULT_SORT_PROPERTIES}
*/
private String[] getSortProperties() {
return s == null || s.length == 0 ? DEFAULT_SORT_PROPERTIES : s;
}
/**
* @param maxPageSize
* @return
*/
public Pageable toPageRequest(int maxPageSize) {
return new PageRequest(p == null ? 0 : p, Integer.min(l == null ? 100 : l, maxPageSize), getDirection(), getSortProperties());
}
}
......@@ -136,12 +136,13 @@ public class RepositoryController {
* @throws NotFoundElement the not found element
*/
@PostMapping(value = "/upload/**")
public RepositoryFile uploadFile(@RequestParam("file") final MultipartFile file, final HttpServletRequest request) throws InvalidRepositoryPathException,
public RepositoryFile uploadFile(@RequestParam(name = "file", required = true) final MultipartFile file,
@RequestParam(name = "metadata", required = false) final RepositoryFile metadata, final HttpServletRequest request) throws InvalidRepositoryPathException,
InvalidRepositoryFileDataException, IOException {
final String folderPath = ((String) request.getAttribute(HandlerMapping.PATH_WITHIN_HANDLER_MAPPING_ATTRIBUTE)).substring((CONTROLLER_URL + "/upload").length());
Path repositoryPath = Paths.get(folderPath);
LOG.info("Upload file {} to path {}", file.getOriginalFilename(), repositoryPath);
return repositoryService.addFile(repositoryPath, file.getOriginalFilename(), file.getContentType(), file.getBytes(), null);
return repositoryService.addFile(repositoryPath, file.getOriginalFilename(), file.getContentType(), file.getBytes(), metadata);
}
/**
......
......@@ -58,6 +58,8 @@ public class PartnerControllerTest extends AbstractApiTest {
private PartnerRepository partnerRepository;
private MockMvc mockMvc;
@Before
public void beforeTest() throws Exception {
......@@ -96,6 +98,131 @@ public class PartnerControllerTest extends AbstractApiTest {
/*@formatter:on*/
}
@Test
public void listPartnersPaginationTest() throws Exception {
partnerRepository.save(setPartner("Partner one", true, "Partner one", UUID.randomUUID()));
partnerRepository.save(setPartner("Partner Two", true, "Partner Two", UUID.randomUUID()));
/*@formatter:off*/
// Page 1
this.mockMvc
.perform(RestDocumentationRequestBuilders.post(PartnerController.CONTROLLER_URL.concat("/list?p={page}&l={pageSize}"), 0, 1)
.contentType(MediaType.APPLICATION_JSON)
.content("{}"))
// .andDo(MockMvcResultHandlers.print())
.andExpect(content().contentType(MediaType.APPLICATION_JSON_UTF8))
.andExpect(status().isOk())
.andExpect(jsonPath("$.number", is(0)))
.andExpect(jsonPath("$.size", is(1)))
.andExpect(jsonPath("$.numberOfElements", is(1)))
.andExpect(jsonPath("$.first", is(true)))
.andExpect(jsonPath("$.last", is(false)))
.andExpect(jsonPath("$.sort[0]", not(nullValue())))
.andExpect(jsonPath("$.sort[0].direction", is("ASC")))
.andExpect(jsonPath("$.sort[0].property", is("id")))
.andExpect(jsonPath("$.filterCode", not(nullValue())))
.andExpect(jsonPath("$.filter", not(nullValue())))
.andExpect(jsonPath("$.content[0]", not(nullValue())))
;
/*@formatter:on*/
String filterCode = shortFilterService.getCode(new PartnerFilter());
/*@formatter:off*/
// Page 1
this.mockMvc
.perform(RestDocumentationRequestBuilders.post(PartnerController.CONTROLLER_URL.concat("/list?f={filterCode}&p={page}&l={pageSize}"), filterCode, 0, 1))
// .andDo(MockMvcResultHandlers.print())
.andExpect(content().contentType(MediaType.APPLICATION_JSON_UTF8))
.andExpect(status().isOk())
.andExpect(jsonPath("$.number", is(0)))
.andExpect(jsonPath("$.size", is(1)))
.andExpect(jsonPath("$.numberOfElements", is(1)))
.andExpect(jsonPath("$.first", is(true)))
.andExpect(jsonPath("$.last", is(false)))
.andExpect(jsonPath("$.sort[0]", not(nullValue())))
.andExpect(jsonPath("$.sort[0].direction", is("ASC")))
.andExpect(jsonPath("$.sort[0].property", is("id")))
.andExpect(jsonPath("$.filterCode", is(filterCode)))
.andExpect(jsonPath("$.filter", not(nullValue())))
.andExpect(jsonPath("$.content[0]", not(nullValue())))
;
/*@formatter:on*/
/*@formatter:off*/
// Page 2
this.mockMvc
.perform(RestDocumentationRequestBuilders.post(PartnerController.CONTROLLER_URL.concat("/list?p={page}&l={pageSize}&f={filterCode}"), 1, 1, filterCode))
// .andDo(MockMvcResultHandlers.print())
.andExpect(content().contentType(MediaType.APPLICATION_JSON_UTF8))
.andExpect(status().isOk())
.andExpect(jsonPath("$.number", is(1)))
.andExpect(jsonPath("$.size", is(1)))
.andExpect(jsonPath("$.numberOfElements", is(1)))
.andExpect(jsonPath("$.first", is(false)))
.andExpect(jsonPath("$.last", is(true)))
.andExpect(jsonPath("$.sort[0]", not(nullValue())))
.andExpect(jsonPath("$.sort[0].direction", is("ASC")))
.andExpect(jsonPath("$.sort[0].property", is("id")))
.andExpect(jsonPath("$.filterCode", is(filterCode)))
.andExpect(jsonPath("$.filter", not(nullValue())))
.andExpect(jsonPath("$.content[0]", not(nullValue())))
;
/*@formatter:on*/
/*@formatter:off*/
// Page 2
this.mockMvc
.perform(RestDocumentationRequestBuilders.post(PartnerController.CONTROLLER_URL.concat("/list?p={page}&l={pageSize}&f={filterCode}&s=name"), 1, 1, filterCode))
// .andDo(MockMvcResultHandlers.print())
.andExpect(content().contentType(MediaType.APPLICATION_JSON_UTF8))
.andExpect(status().isOk())
.andExpect(jsonPath("$.number", is(1)))
.andExpect(jsonPath("$.size", is(1)))
.andExpect(jsonPath("$.numberOfElements", is(1)))
.andExpect(jsonPath("$.first", is(false)))
.andExpect(jsonPath("$.last", is(true)))
.andExpect(jsonPath("$.sort[0]", not(nullValue())))
.andExpect(jsonPath("$.sort[0].direction", is("ASC")))
.andExpect(jsonPath("$.sort[0].property", is("name")))
.andExpect(jsonPath("$.filterCode", is(filterCode)))
.andExpect(jsonPath("$.filter", not(nullValue())))
.andExpect(jsonPath("$.content[0]", not(nullValue())))
;
/*@formatter:on*/
/*@formatter:off*/
// Page 2
this.mockMvc
.perform(RestDocumentationRequestBuilders.post(PartnerController.CONTROLLER_URL.concat("/list?p={page}&l={pageSize}&f={filterCode}&s=name,id&d=DESC"), 1, 1, filterCode))
// .andDo(MockMvcResultHandlers.print())
.andExpect(content().contentType(MediaType.APPLICATION_JSON_UTF8))
.andExpect(status().isOk())
.andExpect(jsonPath("$.number", is(1)))
.andExpect(jsonPath("$.size", is(1)))
.andExpect(jsonPath("$.numberOfElements", is(1)))
.andExpect(jsonPath("$.first", is(false)))
.andExpect(jsonPath("$.last", is(true)))
.andExpect(jsonPath("$.sort[0]", not(nullValue())))
.andExpect(jsonPath("$.sort[0].direction", is("DESC")))
.andExpect(jsonPath("$.sort[0].property", is("name")))
.andExpect(jsonPath("$.sort[1].direction", is("DESC")))
.andExpect(jsonPath("$.sort[1].property", is("id")))
.andExpect(jsonPath("$.filterCode", is(filterCode)))
.andExpect(jsonPath("$.filter", not(nullValue())))
.andExpect(jsonPath("$.content[0]", not(nullValue())))
;
/*@formatter:on*/
}
@Test
public void listPartnersByFilterCodeTest() throws Exception {
final PartnerFilter partnerFilter = new PartnerFilter();
......@@ -109,7 +236,7 @@ public class PartnerControllerTest extends AbstractApiTest {
/*@formatter:off*/
mockMvc
.perform(RestDocumentationRequestBuilders.post(PartnerController.CONTROLLER_URL + "/list/{filterCode}", filterCode)
.perform(RestDocumentationRequestBuilders.post(PartnerController.CONTROLLER_URL + "/list?f={filterCode}", filterCode)