Commit d41a4064 authored by Carina Antunes's avatar Carina Antunes
Browse files

[88] files: implement file upload

parent ac79df2e
CERN_SEARCH_INSTANCE=cernsearch-test
CERN_SEARCH_INSTANCE=test
CERN_SEARCH_INSTANCE_RATELIMIT=1000/hour
CERN_SEARCH_REMOTE_APP_RESOURCE=localhost
CERN_SEARCH_USE_EGROUPS='False'
CONTAINER_NAME=cern-search-rest-api
DEFAULT_RECORDS_FILES_LOCATION=/usr/share/cern-search-api/files
ENV=dev
FLASK_SKIP_DOTENV=1
......
[flake8]
max-line-length = 120
CERN_SEARCH_INSTANCE=cernsearch-test
CERN_SEARCH_INSTANCE=test
CERN_SEARCH_INSTANCE_RATELIMIT=1000/hour
CERN_SEARCH_REMOTE_APP_RESOURCE=localhost
CERN_SEARCH_USE_EGROUPS='False'
CONTAINER_NAME=cern-search-rest-api
DEFAULT_RECORDS_FILES_LOCATION=/usr/share/cern-search-api/files
ENV=dev
FLASK_SKIP_DOTENV=1
......@@ -12,14 +15,14 @@ INVENIO_ACCOUNTS_SESSION_REDIS_URL=redis://localhost:6379/1
INVENIO_ADMIN_ACCESS_GROUPS=CernSearch-Administrators@cern.ch
INVENIO_ADMIN_USER=test@example.com
INVENIO_ADMIN_VIEW_ACCESS_GROUPS=CernSearch-Administrators@cern.ch
INVENIO_APP_ALLOWED_HOSTS=['localhost']
INVENIO_APP_ALLOWED_HOSTS=['localhost','127.0.0.1']
INVENIO_CACHE_REDIS_HOST=localhost
INVENIO_CACHE_REDIS_URL=redis://localhost:6379/0
INVENIO_CERN_APP_CREDENTIALS={'consumer_key':'bah'}
INVENIO_CERN_APP_CREDENTIALS_CONSUMER_KEY=xxx
INVENIO_COLLECT_STORAGE=flask_collect.storage.file
INVENIO_INDEXER_DEFAULT_DOC_TYPE=doc_v0.0.1
INVENIO_INDEXER_DEFAULT_INDEX=cernsearch-test-doc_v0.0.1
INVENIO_INDEXER_DEFAULT_DOC_TYPE=doc_v0.0.2
INVENIO_INDEXER_DEFAULT_INDEX=cernsearch-test-doc_v0.0.2
INVENIO_LOGGING_CONSOLE='True'
INVENIO_LOGGING_CONSOLE_LEVEL=DEBUG
INVENIO_RATELIMIT_STORAGE_URL='redis://localhost:6379/3'
......
......@@ -7,7 +7,7 @@
# under the terms of the MIT License; see LICENSE file for more details.
# Use CentOS7:
FROM gitlab-registry.cern.ch/webservices/cern-search/cern-search-rest-api/cern-search-rest-api-base:f17d05967fc1ac40204bfa7c1b1deb7c0df4391b
FROM gitlab-registry.cern.ch/webservices/cern-search/cern-search-rest-api/cern-search-rest-api-base:f4fe630858f6626c39f0fbdcb9d31e99227987a2
ARG build_env
# CERN Search installation
......
......@@ -27,7 +27,7 @@ DOCKER_FILE := docker-compose.full.yml
endif
build-env:
docker-compose -f $(DOCKER_FILE) up -d --build --remove-orphans
docker-compose -f $(DOCKER_FILE) up -d --remove-orphans
.PHONY: env
logs:
......@@ -56,10 +56,6 @@ shell-env:
docker-compose -f $(DOCKER_FILE) exec $(SERVICE_NAME) /bin/bash
.PHONY: shell-env
root-shell-env:
docker-compose -f $(DOCKER_FILE) exec -u root $(SERVICE_NAME) /bin/bash
.PHONY: root-shell-env
env: generate-certificates build-env populate-instance load-fixtures shell-env
.PHONY: env
......
......@@ -14,19 +14,19 @@ pytest-mock = ">=1.6.0"
invenio-access = ">=1.0.0,<1.1.0"
invenio-admin = ">=1.0.0,<1.1.0"
invenio-accounts = ">=1.0.0,<1.1.0"
invenio-app = ">=1.1.0,<1.2.0"
invenio-base = ">=1.0.0,<1.1.0"
invenio-config = ">=1.0.0,<1.1.0"
invenio-app = "<1.3.0,>=1.2.0"
invenio-base = "<1.2.0,>=1.1.0"
invenio-config = "<1.1.0,>=1.0.2"
invenio-db = {version = ">=1.0.0,<1.1.0",extras = ["postgresql", "versioning"]}
invenio-indexer = {version = "==1.0.2",extras = ["elasticsearch6"]}
invenio-indexer = {extras = ["elasticsearch6"],version = ">=1.1.0,<1.2.0"}
invenio-jsonschemas = ">=1.0.0,<1.1.0"
invenio-logging = ">=1.0.0,<1.1.0"
invenio-records-rest = {version = ">=1.3.0,<1.4.0",extras = ["elasticsearch6"]}
invenio-records-rest = {extras = ["elasticsearch6"],version = "<1.6.0,>=1.4.0"}
invenio-records = {version = ">=1.0.0,<1.1.0",extras = ["postgresql"]}
invenio-rest = {version = ">=1.0.0,<1.1.0",extras = ["cors"]}
invenio-rest = {extras = ["cors"],version = "<1.2.0,>=1.1.0"}
invenio-oauthclient = ">=1.0.0,<1.1.0"
invenio-oauth2server = ">=1.0.0,<1.1.0"
invenio-search = {version = "==1.1.0",extras = ["elasticsearch6"]}
invenio-search = {extras = ["elasticsearch6"],version = "<1.3.0,>=1.2.0"}
invenio-theme = ">=1.1.0,<1.2.0"
ldap = "<1.1.0,>=1.0.2"
npm = ">=0.1.1"
......@@ -37,6 +37,7 @@ uwsgi-tools = ">=1.1.1,<1.2.0"
Flask = "*"
uWSGI = ">=2.0.16"
marshmallow = "<3"
invenio-records-files = ">=1.1.0,<1.2.0"
[requires]
python_version = "3.6"
{
"_meta": {
"hash": {
"sha256": "4a867c6d94932c361ec19e54ea935cc39a8d78c0ee06b32a0743a672a1a02409"
"sha256": "1fee209c8955ce9ccbd857a95fc08b6229b955296aa544019e979c7e95657e05"
},
"pipfile-spec": 6,
"requires": {
......@@ -24,18 +24,10 @@
},
"amqp": {
"hashes": [
"sha256:19a917e260178b8d410122712bac69cb3e6db010d68f6101e7307508aded5e68",
"sha256:19d851b879a471fcfdcf01df9936cff924f422baa77653289f7095dedd5fb26a"
"sha256:6e649ca13a7df3faacdc8bbb280aa9a6602d22fd9d545336077e573a1f4ff3b8",
"sha256:77f1aef9410698d20eaeac5b73a87817365f457a507d82edf292e12cbb83b08d"
],
"version": "==2.5.1"
},
"appnope": {
"hashes": [
"sha256:5b26757dc6f79a3b7dc9fab95359328d5747fcb2409d331ea66d0272b90ab2a0",
"sha256:8b995ffe925347a2138d7ac0fe77155e4311a0ea6d6da4f5128fe4b3cbe5ed71"
],
"markers": "sys_platform == 'darwin'",
"version": "==0.1.0"
"version": "==2.5.2"
},
"arrow": {
"hashes": [
......@@ -97,7 +89,6 @@
"sha256:4c4532aa683f170f40bd76f928b70bc06ff171a959e06e71bf35f2f9d6031ef9",
"sha256:528e56767ae7e43a16cfef24ee1062491f5754368d38fcfffa861cdb9ef219be"
],
"markers": "python_version < '3.7'",
"version": "==4.3.0"
},
"certifi": {
......@@ -368,6 +359,12 @@
],
"version": "==0.14.2"
},
"fs": {
"hashes": [
"sha256:ba2cca8773435a7c86059d57cb4b8ea30fda40f8610941f7822d1ce3ffd36197"
],
"version": "==0.5.4"
},
"ftfy": {
"hashes": [
"sha256:3c0066db64a98436e751e56414f03f1cdea54f29364c0632c141c36cca6a5d94"
......@@ -389,10 +386,10 @@
},
"idna": {
"hashes": [
"sha256:156a6814fb5ac1fc6850fb002e0852d56c0c8d2531923a51032d1b70760e186e",
"sha256:684a38a6f903c1d71d6d5fac066b58d7768af4de2b832e426ec79c30daa94a16"
"sha256:c357b3f628cf53ae2c4c05627ecc484553142ca23264e593d327bcde5e9c3407",
"sha256:ea8b7f6188e6fa117537c3df7da9fc686d485087abf6ac197f9c46432f7e4a3c"
],
"version": "==2.7"
"version": "==2.8"
},
"importlib-metadata": {
"hashes": [
......@@ -440,11 +437,11 @@
},
"invenio-app": {
"hashes": [
"sha256:a77aee57118d06909d2187a3e25f3d0a299189e06bb43b4d7404a689119ae75a",
"sha256:df15a9ef65758f82f75f8b392456793c2fc36e9984d15113c852a7d8fd2c52dd"
"sha256:3cd980498a4312d50b71f73ab82b6b4ae914ba3eb526ec77f908435c8fdf962a",
"sha256:c58a51699a27768ad36006ff41900c2b769c76493ee67d5d213d62d842ac9d33"
],
"index": "pypi",
"version": "==1.1.1"
"version": "==1.2.3"
},
"invenio-assets": {
"hashes": [
......@@ -455,11 +452,11 @@
},
"invenio-base": {
"hashes": [
"sha256:6e532854a43e4f54fc7d9b1cbda720ce4ce6383b00cee6ba5f7e86ef78f12fe2",
"sha256:f972e10b69a68a80c342f0bcf6b3b02a6a67af4fb6e8e347ce8b482fcb47e973"
"sha256:c73e8c830207334fc855ae20316800c0040d266597ec51cc3ebbd3d28837058b",
"sha256:ee7697ef902c11876a0db63e158fb882c0ebb907422eabe7fdd982a6fdb93fad"
],
"index": "pypi",
"version": "==1.0.2"
"version": "==1.1.0"
},
"invenio-cache": {
"hashes": [
......@@ -488,6 +485,13 @@
"index": "pypi",
"version": "==1.0.4"
},
"invenio-files-rest": {
"hashes": [
"sha256:1b573616dfef3c575d1a7b56dd1de325742a0a4e0d23042569c3eeedb30833c9",
"sha256:bfed3b562f33833b8275a87204a2b91a0a37ac3dd152800689ef188485a2c001"
],
"version": "==1.0.1"
},
"invenio-i18n": {
"hashes": [
"sha256:69513d531ccffdfa47cec1e7cd701c72966573d2e9c4e24c96607cb7324dce48",
......@@ -500,10 +504,10 @@
"elasticsearch6"
],
"hashes": [
"sha256:ca8c705813eb1256625f3c6d1550a0610be693676d4929f2f63e0fcf17879973"
"sha256:79cdbb98063ddc83c43e252105c9cec7ce81f4e6cd1c2074179c9667108d5724"
],
"index": "pypi",
"version": "==1.0.2"
"version": "==1.1.0"
},
"invenio-jsonschemas": {
"hashes": [
......@@ -562,38 +566,46 @@
"index": "pypi",
"version": "==1.0.2"
},
"invenio-records-files": {
"hashes": [
"sha256:3f2653bc2a1d1c8367e649337fb0c98f10a63b0e3f44ebd0e2f4a2bba029ae0a",
"sha256:476491b011d233262f71d0bfb301d17a8596e5024d3c2bb9bc8593e6b596ce4f"
],
"index": "pypi",
"version": "==1.1.1"
},
"invenio-records-rest": {
"extras": [
"elasticsearch6"
],
"hashes": [
"sha256:6b81d790c2ff4cc0c9f744375117c0b06edea10042600a6bb67dbdff4da7746d",
"sha256:9b067710b0e98ccb763576155423c423be2f8245a5a137dd2566f3e386bd23c2"
"sha256:1aee70630126c1d19e207ebf0286697c5be4d6c01b384dd28f69c806db2d9f17",
"sha256:bbb83b52086a74556a87487747e7a6ed80f9eda6bed4f048976b95268551c73c"
],
"index": "pypi",
"version": "==1.3.0"
"version": "==1.5.0"
},
"invenio-rest": {
"extras": [
"cors"
],
"hashes": [
"sha256:665cdc6d7f47b532e4823dc1a0a62de32e31caf387efc93aff7593a34124ee1d",
"sha256:e5a73fcfc15c052840608950c0524447f1e86d24cc58a8fbf12a48a82f7e582a"
"sha256:26a5153101b9fc3ffe82f2c5f6cd2bb18d72e99605cfdb130732d75e47cf962d",
"sha256:975b48ab124119af32babf5ef7270076aa77d537bf8edfab0265ae4b8fc77d8b"
],
"index": "pypi",
"version": "==1.0.0"
"version": "==1.1.2"
},
"invenio-search": {
"extras": [
"elasticsearch6"
],
"hashes": [
"sha256:13a3370fb508979f8d0fa2ffe834ae1abc39dc7fcf19e1aec6b2c2b9dedab8f8",
"sha256:2fa00558e6056bcf75065830d021880bda72f353d9fdca892a219c28f23a4eba"
"sha256:5956be4f6f024f84d4732307356b618ff826336e437e9d1c7ec99edfc1b7d734",
"sha256:bf104f3ef751d38ea545689c08b25c94d6dc91130096ea890c92315fa519299c"
],
"index": "pypi",
"version": "==1.1.0"
"version": "==1.2.3"
},
"invenio-theme": {
"hashes": [
......@@ -695,10 +707,10 @@
},
"kombu": {
"hashes": [
"sha256:31edb84947996fdda065b6560c128d5673bb913ff34aa19e7b84755217a24deb",
"sha256:c9078124ce2616b29cf6607f0ac3db894c59154252dee6392cdbbe15e5c4b566"
"sha256:1760b54b1d15a547c9a26d3598a1c8cdaf2436386ac1f5561934bc8a3cbbbd86",
"sha256:e7465aa85a1db889116819f08c5de29520d2fa103324dcdca5e90af345f01771"
],
"version": "==4.6.5"
"version": "==4.6.6"
},
"ldap": {
"hashes": [
......@@ -889,11 +901,13 @@
"sha256:84156313f258eafff716b2961644a4483a9be44a5d43551d554844d15d4d224e",
"sha256:8578d6b8192e4c805e85f187bc530d0f52ba86c39172e61cd51f68fddd648103",
"sha256:890167d5091279a27e2505ff0e1fb273f8c48c41d35c5b92adbf4af80e6b2ed6",
"sha256:98e10634792ac0e9e7a92a76b4991b44c2325d3e7798270a808407355e7bb0a1",
"sha256:9aadff9032e967865f9778485571e93908d27dab21d0fdfdec0ca779bb6f8ad9",
"sha256:9f24f383a298a0c0f9b3113b982e21751a8ecde6615494a3f1470eb4a9d70e9e",
"sha256:a73021b44813b5c84eda4a3af5826dd72356a900bac9bd9dd1f0f81ee1c22c2f",
"sha256:afd96845e12638d2c44d213d4810a08f4dc4a563f9a98204b7428e567014b1cd",
"sha256:b73ddf033d8cd4cc9dfed6324b1ad2a89ba52c410ef6877998422fcb9c23e3a8",
"sha256:b8f490f5fad1767a1331df1259763b3bad7d7af12a75b950c2843ba319b2415f",
"sha256:dbc5cd56fff1a6152ca59445178652756f4e509f672e49ccdf3d79c1043113a4",
"sha256:eac8a3499754790187bb00574ab980df13e754777d346f85e0ff6df929bcd964",
"sha256:eaed1c65f461a959284649e37b5051224f4db6ebdc84e40b5e65f2986f101a08"
......@@ -1020,6 +1034,23 @@
],
"version": "==1.1.0"
},
"simplejson": {
"hashes": [
"sha256:067a7177ddfa32e1483ba5169ebea1bc2ea27f224853211ca669325648ca5642",
"sha256:2fc546e6af49fb45b93bbe878dea4c48edc34083729c0abd09981fe55bdf7f91",
"sha256:354fa32b02885e6dae925f1b5bbf842c333c1e11ea5453ddd67309dc31fdb40a",
"sha256:37e685986cf6f8144607f90340cff72d36acf654f3653a6c47b84c5c38d00df7",
"sha256:3af610ee72efbe644e19d5eaad575c73fb83026192114e5f6719f4901097fce2",
"sha256:3b919fc9cf508f13b929a9b274c40786036b31ad28657819b3b9ba44ba651f50",
"sha256:3dd289368bbd064974d9a5961101f080e939cbe051e6689a193c99fb6e9ac89b",
"sha256:6c3258ffff58712818a233b9737fe4be943d306c40cf63d14ddc82ba563f483a",
"sha256:75e3f0b12c28945c08f54350d91e624f8dd580ab74fd4f1bbea54bc6b0165610",
"sha256:b1f329139ba647a9548aa05fb95d046b4a677643070dc2afc05fa2e975d09ca5",
"sha256:ee9625fc8ee164902dfbb0ff932b26df112da9f871c32f0f9c1bcf20c350fe2a",
"sha256:fb2530b53c28f0d4d84990e945c2ebb470edb469d63e389bf02ff409012fe7c5"
],
"version": "==3.16.0"
},
"simplekv": {
"hashes": [
"sha256:0700a30ecd9e19dd03dd8df3533f0f6b32a1d8d4fdf7ad5540f009ac3273db13",
......@@ -1085,10 +1116,10 @@
},
"urllib3": {
"hashes": [
"sha256:2393a695cd12afedd0dcb26fe5d50d0cf248e5a66f75dbd89a3d4eb333a61af4",
"sha256:a637e5fae88995b256e3409dc4d52c2e2e0ba32c42a6365fee8bbd2238de3cfb"
"sha256:3de946ffbed6e6746608990594d08faac602528ac7015ac28d33cee6a45b7398",
"sha256:9a107b99a5393caf59c7aa3c1249c16e6879447533d0887f4336dde834c7be86"
],
"version": "==1.24.3"
"version": "==1.25.6"
},
"uwsgi": {
"hashes": [
......@@ -1398,10 +1429,10 @@
},
"pyparsing": {
"hashes": [
"sha256:4acadc9a2b96c19fe00932a38ca63e601180c39a189a696abce1eaab641447e1",
"sha256:61b5ed888beab19ddccab3478910e2076a6b5a0295dffc43021890e136edf764"
"sha256:20f995ecd72f2a1f4bf6b072b63b22e2eb457836601e76d6e5dfcd75436acc1f",
"sha256:4ca62001be367f01bd3e92ecbb79070272a9d4964dce6a48a82ff0b8bc7e683a"
],
"version": "==2.4.4"
"version": "==2.4.5"
},
"pytest": {
"hashes": [
......@@ -1463,10 +1494,10 @@
},
"urllib3": {
"hashes": [
"sha256:2393a695cd12afedd0dcb26fe5d50d0cf248e5a66f75dbd89a3d4eb333a61af4",
"sha256:a637e5fae88995b256e3409dc4d52c2e2e0ba32c42a6365fee8bbd2238de3cfb"
"sha256:3de946ffbed6e6746608990594d08faac602528ac7015ac28d33cee6a45b7398",
"sha256:9a107b99a5393caf59c7aa3c1249c16e6879447533d0887f4336dde834c7be86"
],
"version": "==1.24.3"
"version": "==1.25.6"
},
"wcwidth": {
"hashes": [
......
......@@ -4,8 +4,9 @@
# This file is part of CERN Search.
# Copyright (C) 2018-2019 CERN.
#
# CERN Search is free software; you can redistribute it and/or modify it
# Citadel Search is free software; you can redistribute it and/or modify it
# under the terms of the MIT License; see LICENSE file for more details.
"""Configuration for Citadel Search."""
from __future__ import absolute_import, print_function
......@@ -27,6 +28,7 @@ def _(x):
"""Identity function used to trigger string extraction."""
return x
# Theme
# =====
THEME_SEARCHBAR = False
......@@ -40,7 +42,8 @@ CERN_REMOTE_APP["params"].update(dict(request_token_params={
"scope": "Name Email Bio Groups",
}))
CERN_REMOTE_APP["authorized_handler"] = 'cern_search_rest_api.modules.cernsearch.handlers:cern_authorized_signup_handler'
CERN_REMOTE_APP["authorized_handler"] = \
'cern_search_rest_api.modules.cernsearch.handlers:cern_authorized_signup_handler'
OAUTHCLIENT_REMOTE_APPS = dict(
cern=CERN_REMOTE_APP,
......@@ -69,7 +72,7 @@ JSONSCHEMAS_REGISTER_ENDPOINTS_UI = True
# Search configuration
# =====================
SEARCH_MAPPINGS = [os.getenv('CERN_SEARCH_INSTANCE', 'cernsearch-test')]
SEARCH_MAPPINGS = [os.getenv('CERN_SEARCH_INSTANCE', 'test')]
SEARCH_USE_EGROUPS = ast.literal_eval(os.getenv('CERN_SEARCH_USE_EGROUPS', 'True'))
SEARCH_DOC_PIPELINES = ast.literal_eval(os.getenv('CERN_SEARCH_DOC_PIPELINES', '{}'))
......@@ -80,6 +83,14 @@ SEARCH_DOC_PIPELINES = ast.literal_eval(os.getenv('CERN_SEARCH_DOC_PIPELINES', '
_Record_PID = 'pid(recid, record_class="cern_search_rest_api.modules.cernsearch.api:CernSearchRecord")' # TODO
RECORDS_FILES_REST_ENDPOINTS = {
'RECORDS_REST_ENDPOINTS': {
'docid': '/files',
}
}
FILES_REST_PERMISSION_FACTORY = 'cern_search_rest_api.modules.cernsearch.permissions:files_permission_factory'
RECORDS_REST_ENDPOINTS = dict(
docid=dict(
pid_type='recid',
......@@ -101,7 +112,7 @@ RECORDS_REST_ENDPOINTS = dict(
'application/json-patch+json': lambda: request.get_json(force=True)
},
search_class='cern_search_rest_api.modules.cernsearch.search.RecordCERNSearch',
search_index=os.getenv('CERN_SEARCH_INSTANCE', 'cernsearch-test'),
search_index=os.getenv('CERN_SEARCH_INSTANCE', 'test'),
search_serializers={
'application/json': ('cern_search_rest_api.modules.cernsearch.serializers'
':json_v1_search'),
......@@ -164,7 +175,6 @@ RECORDS_REST_SORT_OPTIONS = {
}
}
RECORDS_REST_ELASTICSEARCH_ERROR_HANDLERS = copy.deepcopy(
irr_config.RECORDS_REST_ELASTICSEARCH_ERROR_HANDLERS)
RECORDS_REST_ELASTICSEARCH_ERROR_HANDLERS['mapper_parsing_exception'] = \
......@@ -174,7 +184,7 @@ RECORDS_REST_ELASTICSEARCH_ERROR_HANDLERS['mapper_parsing_exception'] = \
# ===
RATELIMIT_DEFAULT = os.getenv('CERN_SEARCH_INSTANCE_RATELIMIT', '5000/hour')
APP_HEALTH_BLUEPRINT_ENABLED = False
APP_HEALTH_BLUEPRINT_ENABLED = True
# CORS
# ====
......
......@@ -9,7 +9,7 @@
""" Record API"""
from invenio_pidstore.models import PersistentIdentifier
from invenio_records.api import Record
from invenio_records_files.api import Record
from .fetchers import recid_fetcher
......
{
"title": "EDMS Object Type File schema v4.0.0",
"id": "http://0.0.0.0:5000/schemas/edms/file_v4.0.0.json",
"$schema": "http://0.0.0.0:5000/schemas/edms/file_v4.0.0.json",
"type": "object",
"properties": {
"_access": {
"type": "object",
"properties": {
"owner":{
"type": "array",
"items": {"type": "string"}
},
"read":{
"type": "array",
"items": {"type": "string"}
},
"update":{
"type": "array",
"items": {"type": "string"}
},
"delete":{
"type": "array",
"items": {"type": "string"}
}
}
},
"_data": {
"type": "object",
"properties": {
"object_type": {
"type": "string"
},
"cid": {
"type": "integer"
},
"document_id": {
"type": "integer"
},
"cern_id": {
"type": "string"
},
"file_id": {
"type": "integer"
},
"external_reference": {
"type": "string"
},
"version": {
"type": "string"
},
"latest_version": {
"type": "boolean"
},
"title": {
"type": "string"
},
"file_name": {
"type": "string"
},
"description": {
"type": "string"
},
"context": {
"type": "object",
"properties": {
"name": {
"type": "string"
},
"context_id": {
"type": "string"
}
}
},
"document_type": {
"type": "string"
},
"release_procedure": {
"type": "string"
},
"obsolete": {
"type": "boolean"
},
"author": {
"type": "object",
"properties": {
"full_name": {
"type": "string"
},
"email": {
"type": "string"
}
}
},
"keywords": {
"type": "string"
},
"equipment_code": {
"type": "string"
},
"attributes": {
"type": "array",
"items": {
"type": "string"
}
},
"b64": {
"type": "string",
"description": "Base64 encoded binary file."
},
"content": {
"type": "object",
"description": "Extracted content of the binary file",
"properties": {
"content": {
"type": "string"
},
"title": {
"type": "string"
},
"keywords": {
"type": "array",
"items": {
"type": "string"
}
},
"author": {
"type": "string"
},
"content_type": {
"type": "string"
}
}
}
}
},
"owner": {
"type": "string"
},
"group":{
"type": "string"
},
"parents": {
"type": "array",
"items": {
"type": "object",
"properties": {
"parent_type": {
"type": "string"
},