Initial search service commit
[aai/search-data-service.git] / src / main / resources / json / schema / document-field.schema.json
diff --git a/src/main/resources/json/schema/document-field.schema.json b/src/main/resources/json/schema/document-field.schema.json
new file mode 100644 (file)
index 0000000..2b79256
--- /dev/null
@@ -0,0 +1,37 @@
+{
+  "$schema": "http://json-schema.org/draft-04/schema#",
+  "title": "Document Field Schema",
+  "description": "Describes the structure of a document field for storage in a document store.",
+  "type": "object",
+  "javaType": "org.openecomp.sa.rest.DocumentFieldSchema",
+  "properties": {
+    "name": {
+      "type": "string"
+    },
+    "data-type": {
+      "type": "string"
+    },
+    "format": {
+      "type": "string"
+    },
+    "searchable": {
+      "type": "boolean"
+    },
+    "search-analyzer": {
+      "type": "string"
+    },
+    "index-analyzer": {
+      "type": "string"
+    },
+    "sub-fields": {
+      "type": "array",
+      "items": {
+        "$ref": "document-field.schema.json"
+      }
+    }
+  },
+  "required": [
+    "name",
+    "data-type"
+  ]
+}
\ No newline at end of file