-
Notifications
You must be signed in to change notification settings - Fork 12
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Feature/api formbackend management #3617
Conversation
Ich habe einen Issue bei dw aufgemacht und versuche ein Workaround zu implementieren: dropwizard/dropwizard#9612 |
try { | ||
managerNode.getFormScanner().execute(null, null); | ||
} | ||
catch (Exception e) { | ||
throw new RuntimeException(e); | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
DRY?
// Workaround to remove metrics (see https://github.com/dropwizard/dropwizard/issues/9612) | ||
ConfiguredCloseableHttpClient internalHttpClient = conqueryClientBuilder.getHttpClient(); | ||
if (internalHttpClient != null) { | ||
internalHttpClient.getClient().close(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
frage mich hier ob du damit nicht alle clients schließt?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Der InterneClient ist exclusiv für jeden JerseyClient, den man Instanziiert
@@ -9,4 +9,6 @@ | |||
public interface PluginConfig { | |||
|
|||
default void initialize(ManagerNode managerNode){} | |||
|
|||
default void deinitialize(){} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
close()?
<goal>generate</goal> | ||
</goals> | ||
<configuration> | ||
<inputSpec>${project.basedir}/src/main/resources/openapi/admin-openapi.json</inputSpec> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
wo benutzt du die Klassen die hiermit konfiguriert werden?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Es wird dieses Interface generiert:
/**
* Represents a collection of functions to interact with the API endpoints.
*/
@Path("/config/plugins/form-backend")
@Api(description = "the config API")
@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaJAXRSSpecServerCodegen", date = "2024-11-08T16:19:10.432789300+01:00[Europe/Berlin]", comments = "Generator version: 7.9.0")
public interface ConfigApi {
/**
*
*
* @param configId
* @return successful operation
*/
@DELETE
@Path("/{configId}")
@Produces({ "*/*" })
@ApiOperation(value = "unegister form backend configuration", notes = "", tags={ "plugin" })
@ApiResponses(value = {
@ApiResponse(code = 200, message = "successful operation", response = String.class) })
String deleteFormBackend(@PathParam("configId") String configId);
/**
*
*
* @return successful operation
*/
@GET
@Produces({ "application/json" })
@ApiOperation(value = "lists all registered form backend configurations", notes = "", tags={ "plugin" })
@ApiResponses(value = {
@ApiResponse(code = 200, message = "successful operation", response = String.class, responseContainer = "List") })
List<String> listFormBackends();
/**
*
*
* @param pluginConfig
* @return successful operation
*/
@POST
@Consumes({ "application/json" })
@Produces({ "application/json" })
@ApiOperation(value = "adds a form backend configurations", notes = "", tags={ "plugin" })
@ApiResponses(value = {
@ApiResponse(code = 200, message = "successful operation", response = String.class) })
String registerFormBackend(@Valid @NotNull FormBackendConfig pluginConfig);
}
Und ich habe es hiermit implementiert backend/src/main/java/com/bakdata/conquery/resources/admin/rest/ConfigApiResource.java
uses openapi spec to define endpoints