Uploaded image for project: 'Data Management'
  1. Data Management
  2. DM-12192

Implement validation, serialization, and deserialization using Marshmallow

    XMLWordPrintable

    Details

    • Type: Story
    • Status: Won't Fix
    • Resolution: Done
    • Fix Version/s: None
    • Component/s: None
    • Labels:
      None

      Description

      During DM-10742 we tried to upgrade django to a newer version (1.11.3) and faced the problem that the django-json-field 0.5.7 package does not work with this version when it does the deserialization of JSON data.

      We have to look for alternatives for this package and perhaps write a serializer/deserializer by ourserlves. Also this package is not being maintained anymore.

        Attachments

          Issue Links

            Activity

            No builds found.
            afausti Angelo Fausti created issue -
            afausti Angelo Fausti made changes -
            Field Original Value New Value
            Epic Link DM-10181 [ 31811 ]
            afausti Angelo Fausti made changes -
            Link This issue blocks DM-12194 [ DM-12194 ]
            afausti Angelo Fausti made changes -
            Story Points 2.8
            afausti Angelo Fausti made changes -
            Description During DM-10742 we tried to upgrade django to a newer version (1.11.3) and faced the problem that the django-json-field 0.5.7 package does not work with this version when it does the deserialization of JSON data.

            We have to look for alternatives for this package and perhaps write a serializer/deserializer by ourserlves. Also this package is not being maintained anymore.
            afausti Angelo Fausti made changes -
            Link This issue is triggered by DM-12187 [ DM-12187 ]
            afausti Angelo Fausti made changes -
            Link This issue is blocked by DM-12191 [ DM-12191 ]
            afausti Angelo Fausti made changes -
            Summary Implement serializer/deserializer for the JSON fields (replace django-json-field 0.5.7) Implement validation, serialization, and deserialization using Marshmallow
            Hide
            afausti Angelo Fausti added a comment - - edited

            See issue:
            https://github.com/adamchainz/django-mysql/issues/342

            The lack of support for JSON field in Django and MariaDB is one of the reasons we want to migrate the SQuaSH API to Flask + SQLAlchemy. We are looking into https://marshmallow.readthedocs.io/en/latest/index.html# for the new implementation.

            The result of this investigation should be a proof of concept to demonstrate that we can use MariaDB 10.2 JSON field support with Flask + SQLAlchemy.

            Show
            afausti Angelo Fausti added a comment - - edited See issue: https://github.com/adamchainz/django-mysql/issues/342 The lack of support for JSON field in Django and MariaDB is one of the reasons we want to migrate the SQuaSH API to Flask + SQLAlchemy. We are looking into https://marshmallow.readthedocs.io/en/latest/index.html# for the new implementation. The result of this investigation should be a proof of concept to demonstrate that we can use MariaDB 10.2 JSON field support with Flask + SQLAlchemy.
            afausti Angelo Fausti made changes -
            Link This issue blocks DM-12194 [ DM-12194 ]
            Hide
            afausti Angelo Fausti added a comment -

            We are using request parser to for validation of the request parameters and request body and it seems enough for now, see work on DM-9741. Thus I am moving this one to the backlog.

            Show
            afausti Angelo Fausti added a comment - We are using request parser to for validation of the request parameters and request body and it seems enough for now, see work on DM-9741 . Thus I am moving this one to the backlog.
            afausti Angelo Fausti made changes -
            Epic Link DM-10181 [ 31811 ] DM-5504 [ 23337 ]
            Hide
            afausti Angelo Fausti added a comment -

            See also https://blog.miguelgrinberg.com/post/designing-a-restful-api-using-flask-restful on how to use fields and marshal function to improve the current implementation based on reqparse.

            Show
            afausti Angelo Fausti added a comment - See also https://blog.miguelgrinberg.com/post/designing-a-restful-api-using-flask-restful  on how to use fields  and marshal  function to improve the current implementation based on reqparse.
            tjenness Tim Jenness made changes -
            Remote Link This issue links to "Page (Confluence)" [ 31074 ]
            Hide
            tjenness Tim Jenness added a comment -

            Angelo Fausti is this ticket still relevant or should it be closed?

            Show
            tjenness Tim Jenness added a comment - Angelo Fausti is this ticket still relevant or should it be closed?
            Hide
            afausti Angelo Fausti added a comment -

            It is not relevant anymore, the plan is move to FastAPI and use Pydantic models instead.

            PS.: I probably have a bunch of tickets like this one that became obsolete, I'll go over my backlog epic and review them.

            Show
            afausti Angelo Fausti added a comment - It is not relevant anymore, the plan is move to FastAPI and use Pydantic models instead. PS.: I probably have a bunch of tickets like this one that became obsolete, I'll go over my backlog epic and review them.
            afausti Angelo Fausti made changes -
            Resolution Done [ 10000 ]
            Status To Do [ 10001 ] Won't Fix [ 10405 ]

              People

              Assignee:
              afausti Angelo Fausti
              Reporter:
              afausti Angelo Fausti
              Watchers:
              Angelo Fausti, Tim Jenness
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved:

                  Jenkins Builds

                  No builds found.