I am developing a new interface for an existing Drupal website and we will continue to use Drupal in headless mode using the REST API while we migrate to a better long term solution.
Exposing custom content types seems pretty straightforward for the most part, but one aspect is giving me a headache: It seems impossible to expose the list of allowed values in a list field (e.g. categories that were defined in drupal). Ideally, i believe there should be a way to query the API for a given list field returning a list of possible values for that field.
The closest I've gotten is through the Entity Rest Extra module, but while it exposes a ton of information on the fields, even default value for the list field, the allowed values are not there.
Is there a way to expose the allowed values list in the restful API?
Since the module I found is so close to what I need, would it be easily implemented by custom patching my PHP code? Where should I look for clues?