diff --git a/src/API/Backends/Spec.php b/src/API/Backends/Spec.php new file mode 100644 index 00000000..fe643f5c --- /dev/null +++ b/src/API/Backends/Spec.php @@ -0,0 +1,40 @@ + $spec['key'], + 'type' => $spec['type'], + 'description' => $spec['description'], + ]; + + if (ag_exists($spec, 'choices')) { + $item['choices'] = $spec['choices']; + } + + $list[] = $item; + } + + return api_response(HTTP_STATUS::HTTP_OK, $list); + } +}