rest-schemagen-spring
Spring support for Mercateo/rest-schemagen. See TNG/rest-demo-jersey for a comprehensive example.
Getting started
After adding this projects dependency, the following minimal configuration is required for a working schema generator:
@Configuration
@Import(JerseyHateoasConfiguration.class)
public class WeatherServerConfiguration {
@Bean
public FieldCheckerForSchema fieldCheckerForSchema() {
return (field, callContext) -> true;
}
@Bean
public MethodCheckerForLink methodCheckerForLink() {
return scope -> true;
}
}
Particular link factories can be created via:
@Bean
@Named("stationsLinkFactory")
LinkFactory<FooResource> stationsResourceLinkFactory(LinkMetaFactory linkMetaFactory) {
return linkMetaFactory.createFactoryFor(FooResource.class);
}