Search in sources :

Example 1 with OpenAPIConvention

use of io.jexxa.infrastructure.drivingadapter.rest.openapi.OpenAPIConvention in project Jexxa by repplix.

the class RESTfulRPCAdapter method getJavalinConfig.

private void getJavalinConfig(JavalinConfig javalinConfig) {
    javalinConfig.server(this::getServer);
    javalinConfig.showJavalinBanner = false;
    javalinConfig.jsonMapper(new JexxaJSONMapper());
    Location location = Location.CLASSPATH;
    if (properties.getProperty(JexxaWebProperties.JEXXA_REST_STATIC_FILES_EXTERNAL, "false").equalsIgnoreCase("true")) {
        location = Location.EXTERNAL;
    }
    if (properties.containsKey(JexxaWebProperties.JEXXA_REST_STATIC_FILES_ROOT)) {
        javalinConfig.addStaticFiles(properties.getProperty(JexxaWebProperties.JEXXA_REST_STATIC_FILES_ROOT), location);
    }
    this.openAPIConvention = new OpenAPIConvention(properties, javalinConfig);
}
Also used : OpenAPIConvention(io.jexxa.infrastructure.drivingadapter.rest.openapi.OpenAPIConvention) Location(io.javalin.http.staticfiles.Location)

Example 2 with OpenAPIConvention

use of io.jexxa.infrastructure.drivingadapter.rest.openapi.OpenAPIConvention in project Jexxa by jexxa-projects.

the class RESTfulRPCAdapter method getJavalinConfig.

private void getJavalinConfig(JavalinConfig javalinConfig) {
    javalinConfig.server(this::getServer);
    javalinConfig.showJavalinBanner = false;
    javalinConfig.jsonMapper(new JexxaJSONMapper());
    Location location = Location.CLASSPATH;
    if (properties.getProperty(JexxaWebProperties.JEXXA_REST_STATIC_FILES_EXTERNAL, "false").equalsIgnoreCase("true")) {
        location = Location.EXTERNAL;
    }
    if (properties.containsKey(JexxaWebProperties.JEXXA_REST_STATIC_FILES_ROOT)) {
        javalinConfig.addStaticFiles(properties.getProperty(JexxaWebProperties.JEXXA_REST_STATIC_FILES_ROOT), location);
    }
    this.openAPIConvention = new OpenAPIConvention(properties, javalinConfig);
}
Also used : OpenAPIConvention(io.jexxa.infrastructure.drivingadapter.rest.openapi.OpenAPIConvention) Location(io.javalin.http.staticfiles.Location)

Aggregations

Location (io.javalin.http.staticfiles.Location)2 OpenAPIConvention (io.jexxa.infrastructure.drivingadapter.rest.openapi.OpenAPIConvention)2