tech.jhipster.lite.module.infrastructure.primary.RestJHipsterModulePropertiesDefinition Maven / Gradle / Ivy
package tech.jhipster.lite.module.infrastructure.primary;
import io.swagger.v3.oas.annotations.media.Schema;
import java.util.Collection;
import tech.jhipster.lite.module.domain.resource.JHipsterModulePropertiesDefinition;
@Schema(name = "JHipsterModulePropertiesDefinition", description = "Definition for module properties")
final class RestJHipsterModulePropertiesDefinition {
private final Collection definitions;
private RestJHipsterModulePropertiesDefinition(Collection definitions) {
this.definitions = definitions;
}
static RestJHipsterModulePropertiesDefinition from(JHipsterModulePropertiesDefinition propertiesDefinition) {
return new RestJHipsterModulePropertiesDefinition(
propertiesDefinition.stream().map(RestJHipsterModulePropertyDefinition::from).toList()
);
}
@Schema(description = "Definition of the properties for a module")
public Collection getDefinitions() {
return definitions;
}
}