Skip to content

AlexSchr/rest-schemagen-spring

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

48 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

rest-schemagen-spring

Build Status Coverage Status MavenCentral

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);
    }

About

Spring configuration for common.rest.schemagen

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Shell 37.1%
  • Java 36.7%
  • Batchfile 26.2%