Closed mbarton closed 3 months ago
Fixes #213
Before anything other than height caused a validation error as height was a mandatory field in the Open API spec (whilst the others were optional).
height
curl -X POST -H 'Content-Type: application/json' -d '{"measurement_method":"weight","sex":"female","centile_format":"cole-nine-centiles","is_sds":false}' http://localhost:8000/uk-who/chart-coordinates
growth-api-1 | 2024-07-10T19:27:51.142703424Z {'type': 'missing', 'loc': ('response', 'centile_data', 1, 'uk_who_infant', 'female', 'height'), 'msg': 'Fiel d required', 'input': {'weight': [elided full centile data]
I would add a regression test but the existing tests for this endpoint are skipped. Have raised https://github.com/rcpch/digital-growth-charts-server/issues/216 to fix
Fixes #213
Before anything other than
height
caused a validation error asheight
was a mandatory field in the Open API spec (whilst the others were optional).