Skip to content

feat: Add the serializer and endpoints for the bound samples

Imane Messak requested to merge adapt_data_model into dev
  • Modify the model
    • Include some missing fields such as created_by, last_edited_by, created_time and last_edited_time.
    • Add some restrictions on the fields data, datalink and sample.
  • Modify the admin file to be able to visualize the SampleBoundData
  • add the serializer DataBoundSampleSerializer for the SampleBoundData
    • the data was left in the fields to be returned by the APIs as in an id for now until the Data Bound Samples is implemented (Note: the right structure is commented)
  • Endpoints Implementations (Note that in all the API a get_the_abject method is used which is a generalization of the Mixins we are using for the get_node and get_workspace, and it allows us to check and get the object if it exists and return the right error response):
    • GET
    • POST
    • DELETE
  • In the Create if the sample bound data was already created, 200 in returned with the associated sample (the API specification implies to return a 400 if Sample is already associated with this data)
Edited by Imane Messak

Merge request reports