Update Implementing Generic CRUD Endpoints authored by Vihar Mamania's avatar Vihar Mamania
...@@ -24,7 +24,11 @@ Implement a function to perform record-level consistency validation. This functi ...@@ -24,7 +24,11 @@ Implement a function to perform record-level consistency validation. This functi
In `api_configuration.py` add a API config object with all details. In `api_configuration.py` add a API config object with all details.
``` ```
WellPressureTestRawMeasurementAPI = APIConfiguration(tag = "Well Pressure Test Raw Measurement", entityURI="/wellpressuretestrawmeasurement", entity=Entity.WELLPRESSURETESTRAWMEASUREMENT,record_id_constraint=WellPressureTestRawMeasurementId, record_consistency_check_function=check_well_pressure_test_raw_measurement_consistency)
WellPressureTestRawMeasurementAPI = APIConfiguration(tag="WellPressureTestRawMeasurement v3",
entity_uri="/wellpressuretestrawmeasurement",
entity=Entity.WELLPRESSURETESTRAWMEASUREMENT,
record_id_constraint=WellPressureTestRawMeasurementId, record_consistency_check_function=check_well_pressure_test_raw_measurement_consistency)
``` ```
Finally In `wdms_app.py` add the above API object to `ddms_v3_routes_crud_api` list, this would automatically expose the given set of APIs for this entity. Finally In `wdms_app.py` add the above API object to `ddms_v3_routes_crud_api` list, this would automatically expose the given set of APIs for this entity.
... ...
......