Skip to content

Readd inner device property schema

Nils Brinckmann requested to merge readd-inner-device-property-schema into master

I also readded the device property schema for the nested usage in devices. Otherwise it would contain another elements in the payload like this:

{
    "data": {
        "type": "device",
        "attributes": {
            "manufacturer_name": null,
            // ...
            "properties": {
                "data": [{
                    "type": "device_property",
                    "attributes": {
                        "failure_value": null,
                        "unit_uri": null,
                        "compartment_name": null,
                        "label": "test property",
                        "sampling_media_uri": null,
                        "unit_name": null,
                        "accuracy": null,
                        "property_uri": null,
                        "property_name": null,
                        "measuring_range_max": null,
                        "measuring_range_min": null,
                        "sampling_media_name": null,
                        "compartment_uri": null
                    },
                    "relationships": {
                        "device": {
                            "links": {
                                "related": "/rdm/svm-api/v1/devices/1"
                            }
                        }
                    },
                    "id": "1",
                    "links": {
                        "self": "/rdm/svm-api/v1/device-properties/1"
                    }
                }, {
                    "type": "device_property",
                    "attributes": {
                        "failure_value": null,
                        "unit_uri": null,
                        "compartment_name": null,
                        "label": "test property 2",
                        "sampling_media_uri": null,
                        "unit_name": null,
                        "accuracy": null,
                        "property_uri": null,
                        "property_name": null,
                        "measuring_range_max": null,
                        "measuring_range_min": null,
                        "sampling_media_name": null,
                        "compartment_uri": null
                    },
                    "relationships": {
                        "device": {
                            "links": {
                                "related": "/rdm/svm-api/v1/devices/1"
                            }
                        }
                    },
                    "id": "2",
                    "links": {
                        "self": "/rdm/svm-api/v1/device-properties/2"
                    }
                }]
            }
        },
        "relationships": {
            // ...
        },
        "id": "1",
        "links": {
            "self": "/rdm/svm-api/v1/devices/1"
        }
    },
    "links": {
        "self": "/rdm/svm-api/v1/devices/1"
    },
    "jsonapi": {
        "version": "1.0"
    }
}

(It contains another data, type & attributes element in the object).

(And this MR is based on !48 (merged)).

Merge request reports

Loading