feat: prepare api for custom

This commit is contained in:
Benedetto Marco Serinelli 2024-02-10 16:38:43 +01:00
parent 4a5ffbd93d
commit 6b8cf40ce2
3 changed files with 55 additions and 1 deletions

View file

@ -0,0 +1,26 @@
package com.provectus.kafka.ui.controller;
import com.provectus.kafka.ui.api.PreferenceseApi;
import com.provectus.kafka.ui.model.ApplicationsPreferencesDTO;
import lombok.RequiredArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.http.ResponseEntity;
import org.springframework.web.bind.annotation.RestController;
import org.springframework.web.server.ServerWebExchange;
import reactor.core.publisher.Mono;
@RestController
@RequiredArgsConstructor
@Slf4j
public class PreferencesController implements PreferenceseApi {
@Value("${kafka.ui.preferences.removegitlink}")
private String kafkaUiRemoveGitLink;
@Override
public Mono<ResponseEntity<ApplicationsPreferencesDTO>> getPreferences(ServerWebExchange exchange) {
return null;
}
}

View file

@ -19,3 +19,7 @@ logging:
reactor.netty.http.server.AccessLog: INFO
org.hibernate.validator: WARN
kafka:
ui:
preferences:
removegitlink: ${OPENSHIFT_DIY_PORT:true}

View file

@ -15,6 +15,19 @@ servers:
- url: /localhost
paths:
/api/preferences:
get:
tags:
- Preferencese
summary: getPreferences
operationId: getPreferences
responses:
200:
description: OK
content:
application/json:
schema:
$ref: '#/components/schemas/ApplicationsPreferences'
/api/clusters:
get:
tags:
@ -2058,6 +2071,17 @@ paths:
components:
schemas:
ApplicationsPreferences:
type: object
properties:
removeGitLink:
type: boolean
removeDiscordLink:
type: boolean
appName:
type: string
example: "App Kafka UI My Preferences"
TopicSerdeSuggestion:
type: object
properties: