public RestApplication() {

    packages("pl.edu.amu.rest");
    packages("io.swagger.jaxrs.listing");

    BeanConfig beanConfig = new BeanConfig();
    beanConfig.setVersion("1.0.2");
    beanConfig.setSchemes(new String[] {"http"});
    beanConfig.setHost("localhost:8080");
    beanConfig.setBasePath("/");
    beanConfig.setResourcePackage("pl.edu.amu.rest");
    beanConfig.setScan(true);
  }
Пример #2
0
  public RESTApp() {
    packages("restaurant.vs.rest");
    // swagger

    register(io.swagger.jaxrs.listing.ApiListingResource.class);
    register(io.swagger.jaxrs.listing.SwaggerSerializers.class);

    BeanConfig config = new BeanConfig();
    config.setBasePath("/RestaurantRESTApp/vs");
    config.setDescription("REST API Demo");
    config.setVersion("1.0");
    config.setSchemes(new String[] {"http"});
    config.setResourcePackage("restaurant.vs");
    config.setTitle("RestaurantRESTApp");
    config.setScan(true);
  }
Пример #3
0
 private void configureSwagger() {
   BeanConfig config =
       new BeanConfig() {
         @Override
         public Swagger configure(Swagger swagger) {
           Swagger configure = super.configure(swagger);
           configure.securityDefinition("auth_name", new BasicAuthDefinition());
           return configure;
         }
       };
   config.setVersion("1.0");
   config.setResourcePackage("br.ufsc.myfood.application.core");
   config.setBasePath("/app");
   config.setDescription("Restaurante MyFood");
   config.setTitle("Restaurante MyFood");
   config.setScan(true);
   config.setSchemes(new String[] {"http"});
 }
Пример #4
0
  public ApplicationConfig() {
    BeanConfig beanConfig = new BeanConfig();
    beanConfig.setTitle("Photonic3D REST API");
    beanConfig.setVersion("0.0." + HostProperties.Instance().getVersionNumber());
    beanConfig.setSchemes(new String[] {"http"});
    // beanConfig.setHost("localhost:9091");
    beanConfig.setBasePath("/services");
    beanConfig.setResourcePackage("org.area515.resinprinter.services");
    beanConfig.setScan(true);
    beanConfig.setPrettyPrint(true);

    singletons.add(buildJacksonJaxbJsonProvider());
    singletons.add(new ExceptionMarshaller());
    singletons.add(PrintableService.INSTANCE);
    singletons.add(MachineService.INSTANCE);
    singletons.add(SettingsService.INSTANCE);
    singletons.add(PrinterService.INSTANCE);
    singletons.add(PrintJobService.INSTANCE);
    singletons.add(MediaService.INSTANCE);
    singletons.add(CustomizerService.INSTANCE);
    singletons.add(UserService.INSTANCE);
    singletons.add(RemoteService.INSTANCE);
  }