Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

VersionedModelController.create should yield Location header #1611

Open
dk1844 opened this issue Nov 30, 2020 · 0 comments
Open

VersionedModelController.create should yield Location header #1611

dk1844 opened this issue Nov 30, 2020 · 0 comments
Labels
bug Something isn't working priority: undecided Undecided priority to be assigned after discussion

Comments

@dk1844
Copy link
Contributor

dk1844 commented Nov 30, 2020

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]

@dk1844 dk1844 added bug Something isn't working priority: undecided Undecided priority to be assigned after discussion labels Nov 30, 2020
dk1844 added a commit that referenced this issue Nov 30, 2020
…st; Issue #1611 mentioned.

missing essentiality is fallbacked to Optional when missing (this would be expected by the definition) - reflected in the API test, too
dk1844 added a commit that referenced this issue Dec 11, 2020
#1569 
 - dataset properties pilot implementation
 - PropertyDefinitionController uses VersionedModelController methods where possible - just aliased to gain as much consistency as possible

 - properties marked with `putIntoInfoFile` are written into _INFO file
 - invalid dataset properties block spark-jobs execution 
 - Java Optional -> Scala Option implicit redone (impl def -> impl class wrapper)

 - PD create now returns Location header + reflected in the API test;  Issue #1611 mentioned.
 - missing essentiality is fallbacked to Optional when missing (this would be expected by the definition) - reflected in the API test, too

 - unit tests, integTests added

#1569 Review updates:
 -  dataset retrieval with properties validation at-once at /api/dataset/{datasetName}/{datasetVersion}?validateProperties=true|false
 - CommonExecutionSuite - common execution integ test - making sure common job exec fails on invalid dataset properties from DAO

- Std execution - dataset properties prefix for info file writing is now configurable (config key is "control.info.dataset.properties.prefix", default value: "")
 - hasValidNameChars regex fix (@Zejnilovic's mini request)
 - in case of json mapping exception being caused by PropertyTypeValidationException, react with most specific errorMessage to the REST API client
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working priority: undecided Undecided priority to be assigned after discussion
Projects
None yet
Development

No branches or pull requests

1 participant