Skip to content

Commit

Permalink
RESTServer minor edits
Browse files Browse the repository at this point in the history
  • Loading branch information
mikera committed Nov 5, 2024
1 parent fb36cb7 commit 947339d
Showing 1 changed file with 9 additions and 5 deletions.
14 changes: 9 additions & 5 deletions convex-restapi/src/main/java/convex/restapi/RESTServer.java
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
import java.nio.file.Files;
import java.nio.file.Path;
import java.util.HashMap;
import java.util.function.Consumer;

import org.eclipse.jetty.server.ServerConnector;
import org.slf4j.Logger;
Expand All @@ -31,6 +32,8 @@
import io.javalin.http.staticfiles.Location;
import io.javalin.openapi.JsonSchemaLoader;
import io.javalin.openapi.JsonSchemaResource;
import io.javalin.openapi.OpenApiInfo;
import io.javalin.openapi.plugin.DefinitionConfiguration;
import io.javalin.openapi.plugin.OpenApiPlugin;
import io.javalin.openapi.plugin.redoc.ReDocPlugin;
import io.javalin.openapi.plugin.swagger.SwaggerPlugin;
Expand Down Expand Up @@ -124,14 +127,15 @@ protected void addOpenApiPlugins(JavalinConfig config) {
String docsPath="openapi-plugin/openapi-default.json";

config.registerPlugin(new OpenApiPlugin(pluginConfig -> {

pluginConfig
.withDocumentationPath(docsPath)
.withDefinitionConfiguration((version, definition) -> {
definition.withInfo(info -> {
info.setTitle("Convex REST API");
info.setVersion("0.7.0");
});
DefinitionConfiguration def=definition;
def=def.withInfo((Consumer <OpenApiInfo>)
info -> {
info.setTitle("Convex REST API");
info.setVersion("0.7.0");
});
});
}));

Expand Down

0 comments on commit 947339d

Please sign in to comment.