Closed JohnRDOrazio closed 5 months ago
first step taken, pecl package is now installed on the server!
apparently yaml_emit
cannot directly handle PHP objects, only associative arrays (see php/pecl-file_formats-yaml issue #70). So unless that's ever a thing, we'll just have to json_decode(json_encode($output),true)
to get an associative array, and then yaml_emit
from there.
Implemented in commits c734a38eb69e635565a94460f15d6974f9ec126b...82bbf7cf8d416d39bbd642cdd31cfd4f2304ffea !
and added application/yaml
to the OpenAPI schema in commit 82bbf7cf8d416d39bbd642cdd31cfd4f2304ffea...a359952c9f3c44a4dfb208b8288e6e8f31fde17c !
This issue is now complete!
yaml validation is now a thing too, in the litcal-tests interface! Implemented validation here in LitCalHealth
and added the option in the tests interface.
Currently, the API has a preference for
JSON
output, with some support forXML
output andICS
output. However nowadays another popular data exchange format isYAML
. We should enable a request for Content Typeapplication/yaml
.This will require enabling the pecl extension yaml-emit on the server and implementing a minimum amount of logic to allow the transform on output.