commit 5063c9a1795d62976645822c77efe523fe2518d8
parent e9c8dff944314a56185a11fee7a04dc97d1c5973
Author: Felicitus <felicitus@felicitus.org>
Date: Fri, 30 Jan 2015 18:24:11 +0100
Moved generic controller design document to markdown format
Diffstat:
2 files changed, 48 insertions(+), 0 deletions(-)
diff --git a/documentation/GENERIC-CONTROLLER b/documentation/GENERIC-CONTROLLER
diff --git a/documentation/GENERIC-CONTROLLER.md b/documentation/GENERIC-CONTROLLER.md
@@ -0,0 +1,47 @@
+In order to keep implementations small, we need a generic controller mechanism.
+
+This controller is used for lists, and needs to support the following features:
+
+# Getting a list
+- Pagination
+- Filtering (including joined properties)
+- Ordering
+- Specifying relations to fetch
+
+## Filtering
+
+Example:
+
+```json
+filter=[
+{
+ "property":"part.manufacturers.manufacturer.url",
+ "constraint": "atmel.com",
+ "operator": "contains"
+},
+{
+ "property":"@sum(part.stockLevels.stockLevel)",
+ "constraint": 100,
+ "operator": ">"
+}
+]
+```
+
+## Specifying relations to include in the result set
+
+Example:
+fetch=[
+{
+ "property":"part.manufacturers"
+}
+
+##
+
+# Adding an object
+
+# Updating an object
+
+# Partially updating an object
+
+# Removing an object
+- Recursive delete with optional preview (=return all entities which would be removed)+
\ No newline at end of file