io.openapitools.hal.EmbeddedNameFunction Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of swagger-hal Show documentation
Show all versions of swagger-hal Show documentation
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