fix: use dto to make json structure stable

This commit is contained in:
Erik Foris 2024-07-06 14:22:54 +02:00
parent 79b851a4a7
commit e94ead7026

View File

@ -11,15 +11,16 @@ import de.uni_passau.fim.PADAS.group3.DataDash.model.DatasetService;
import de.uni_passau.fim.PADAS.group3.DataDash.model.Type; import de.uni_passau.fim.PADAS.group3.DataDash.model.Type;
import org.springframework.data.domain.Pageable; import org.springframework.data.domain.Pageable;
import org.springframework.data.web.config.EnableSpringDataWebSupport; import org.springframework.data.web.config.EnableSpringDataWebSupport;
import org.springframework.data.web.config.EnableSpringDataWebSupport.PageSerializationMode;
import org.springframework.data.domain.Sort; import org.springframework.data.domain.Sort;
import java.util.UUID; import java.util.UUID;
import org.springframework.web.bind.annotation.PostMapping; import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody; import org.springframework.web.bind.annotation.RequestBody;
@EnableSpringDataWebSupport(pageSerializationMode = PageSerializationMode.VIA_DTO)
@RestController @RestController
@RequestMapping("/api/v1/datasets") @RequestMapping("/api/v1/datasets")
@EnableSpringDataWebSupport
public class DatasetController { public class DatasetController {
@Autowired @Autowired
private DatasetService datasetService; private DatasetService datasetService;