HampusAndersson01 / Parameter-Database

Thesis work for Volvo Trucks Technology
1 stars 0 forks source link

Modify create parameter endpoint to include unit/rigfamily description #52

Closed HampusAndersson01 closed 1 year ago

HampusAndersson01 commented 1 year ago

Now uses

{
      "name": "Test rig",
      "description": "Test rigfamily parameter",
      "datatype": "str",
      "modified_date": "2023-01-28",
      "comment": "Test Comment",
      "min": 0,
      "max": 9999,
      "decimals": 2,
      "unit": {
          "name": "%"
      },
      "rigfamily": {
          "name": "GOT_FP;GOT_LP"
      },
      "images": {
          "name": "lorem picsum;lorem picsum",
          "url": "https://picsum.photos/200;https://picsum.photos/200/300"
      },
      "possible_values":{
          "value": "testvalue;testvakyes",
          "description": "testvalues desc;"
      }
},

Should use

{
  "name": "065X",
  "description": "OFY+ flag from PDP-rigs = 1 when Vol_Oil",
  "datatype": "f",
  "decimals": 1,
  "min": -3,
  "max": 3,
  "creation_date": null,
  "modified_date": null,
  "created_by": null,
  "modified_by": null,
  "comment": null,
  "unit": {
    "name": "-",
    "description": ""
  },
  "rigfamily": {
    "name": "GOT_LP;GOT_FP",
    "description": "Gothenburg Endurance test cells;Gothenburg Function test cells"
  },
  "images": {
    "name": "lorem picsum",
    "description": null,
    "url": "https://picsum.photos/400"
  },
  "possible_values": {
    "value": "1;2;3",
    "description": "testvalue1;testvalue2;testvalue3"
  }
}
HampusAndersson01 commented 1 year ago

Also update openAPI Docs