private void writeActionDescriptors(
      JsonGenerator jgen, String currentVocab, List<ActionDescriptor> actionDescriptors)
      throws IOException, IntrospectionException {
    for (ActionDescriptor actionDescriptor : actionDescriptors) {
      jgen.writeStartObject(); // begin a hydra:Operation

      final String semanticActionType = actionDescriptor.getSemanticActionType();
      if (semanticActionType != null) {
        jgen.writeStringField("@type", semanticActionType);
      }
      jgen.writeStringField("hydra:method", actionDescriptor.getHttpMethod());

      final ActionInputParameter requestBodyInputParameter = actionDescriptor.getRequestBody();
      if (requestBodyInputParameter != null) {

        jgen.writeObjectFieldStart("hydra:expects"); // begin hydra:expects

        final Class<?> clazz = requestBodyInputParameter.getParameterType();
        final Expose classExpose = clazz.getAnnotation(Expose.class);
        final String typeName;
        if (classExpose != null) {
          typeName = classExpose.value();
        } else {
          typeName = requestBodyInputParameter.getParameterType().getSimpleName();
        }
        jgen.writeStringField("@type", typeName);

        jgen.writeArrayFieldStart("hydra:supportedProperty"); // begin hydra:supportedProperty
        // TODO check need for actionDescriptor and requestBodyInputParameter here:
        recurseSupportedProperties(
            jgen,
            currentVocab,
            clazz,
            actionDescriptor,
            requestBodyInputParameter,
            requestBodyInputParameter.getCallValue());
        jgen.writeEndArray(); // end hydra:supportedProperty

        jgen.writeEndObject(); // end hydra:expects
      }

      jgen.writeEndObject(); // end hydra:Operation
    }
  }