AbsaOSS / AbsaOSS/enceladus

VersionedModelController.create should yield Location header

Open
#1,611 0 comments 0 reactions 0 assignees View on GitHub
bug priority: undecided
Dominant language
Scala
Stars
33
Forks
16
PR merge metrics
No merged PRs in 30d

Description

## Describe the bug
All extending classes of `VersionedModelController` define a `/create` endpoint that persists an entity when called with POST. Correct response `201 Created` is returned. Customarily, this should be accompanied by the Location header with the URI pointing to the created item.

## To Reproduce
Steps to reproduce the behavior OR commands run:
1. Call e.g. `PUT /api/dataset/create` with a valid DS content.
2. Inspect the response.

## Expected behaviour
Location header to be generally present with all entity-creating calls.

## Additional context
An example of this is implemented in `PropertyDefinitionController.createDatasetProperty` : [[1](https://github.com/AbsaOSS/enceladus/blob/8d173718817572d25fc01449ef357092eda0205f/menas/src/main/scala/za/co/absa/enceladus/menas/controllers/PropertyDefinitionController.scala)]

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.