Commit a56ff71a authored by Pablo Panero's avatar Pablo Panero
Browse files

Add serializer and increase records-rest version to include the latest pid_checker

parent bc46257b
#!/usr/bin/python
# -*- coding: utf-8 -*-
# Copyright (C) 2018, CERN
# This software is distributed under the terms of the GNU General Public
# Licence version 3 (GPL Version 3), copied verbatim in the file "COPYING".
# In applying this license, CERN does not waive the privileges and immunities
# granted to it by virtue of its status as Intergovernmental Organization
# or submit itself to any jurisdiction.
from __future__ import absolute_import, print_function
from invenio_records_rest.serializers.json import JSONSerializer
from invenio_records_rest.serializers.response import record_responsify, \
search_responsify
from cern_search_rest_api.modules.cernsearch.marshmallow import \
CSASRecordSchemaV1
# Serializers
# ===========
#: JSON serializer definition.
json_v1 = JSONSerializer(CSASRecordSchemaV1, replace_refs=True)
# Records-REST serializers
# ========================
#: JSON record serializer for individual records.
json_v1_response = record_responsify(json_v1, 'application/json')
#: JSON record serializer for search results.
json_v1_search = search_responsify(json_v1, 'application/json')
__all__ = (
'json_v1',
'json_v1_response',
'json_v1_search',
)
\ No newline at end of file
......@@ -9,7 +9,7 @@ invenio-db[postgresql,versioning]>=1.0.0,<1.1.0
invenio-indexer[elasticsearch5]>=1.0.0,<1.1.0
invenio-jsonschemas>=1.0.0,<1.1.0
invenio-logging>=1.0.0,<1.1.0
invenio-records-rest[elasticsearch5]>=1.2.0,<1.3.0
invenio-records-rest[elasticsearch5]>=1.3.0,<1.4.0
invenio-records[postgresql]>=1.0.0,<1.1.0
invenio-rest[cors]>=1.0.0,<1.1.0
invenio-oauthclient>=1.0.0,<1.1.0
......
......@@ -58,7 +58,7 @@ install_requires = [
'invenio-indexer[elasticsearch5]>=1.0.0,<1.1.0',
'invenio-jsonschemas>=1.0.0,<1.1.0',
'invenio-logging>=1.0.0,<1.1.0',
'invenio-records-rest[elasticsearch5]>=1.2.0,<1.3.0',
'invenio-records-rest[elasticsearch5]>=1.3.0,<1.4.0',
'invenio-records[postgresql]>=1.0.0,<1.1.0',
'invenio-rest[cors]>=1.0.0,<1.1.0',
'invenio-oauthclient>=1.0.0,<1.1.0',
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment