SoftInstigate / restheart

Rapid API Development with MongoDB
https://restheart.org
GNU Affero General Public License v3.0
807 stars 171 forks source link

Create missing database and /or collection on document PUT #362

Closed chwal closed 5 years ago

chwal commented 5 years ago

Expected Behavior

PUT request with a valid JSON-Body on https://domain.tld/database/collection/document should create the database, collection and the document itself if they dont exist.

Current Behavior

Restheart responds with code 404 on given database.

Context

This is affecting our restheart client software, where this logic needs to be implemented over and over again.

Environment

RESTHeart version 3.10.1

Steps to Reproduce

  1. See Expected Behavior
ujibang commented 5 years ago

Won't implement.

Although it would simplify some specific use cases it would make much harder dealing with security permissions.

Also I don't find it compliant with REST paradigm. A verb on a resource would have side effects on parent resources.

It is much easier handling this requirement client side.