All Downloads are FREE. Search and download functionalities are using the official Maven repository.

io.openapitools.hal.EmbeddedNameFunction Maven / Gradle / Ivy

Go to download

Swagger Open API specification module supporting generation of documentation from endpoints utilizing the Jackson HAL module.

The newest version!
package io.openapitools.hal;

import io.openapitools.jackson.dataformat.hal.annotation.EmbeddedResource;
import java.util.Optional;
import java.util.function.BiFunction;

/**
 * Bi-function generating property name for embedded resource.
 */
public class EmbeddedNameFunction implements BiFunction> {

    @Override
    public Optional apply(HALResourceType parent, EmbeddedResource embedded) {
        if (embedded.value().isEmpty()) {
            return Optional.empty();
        } else {
            return Optional.of(embedded.value());
        }
    }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy