diff --git a/app/src/main/java/io/xpipe/app/beacon/AppBeaconServer.java b/app/src/main/java/io/xpipe/app/beacon/AppBeaconServer.java index 872037929..93af376e5 100644 --- a/app/src/main/java/io/xpipe/app/beacon/AppBeaconServer.java +++ b/app/src/main/java/io/xpipe/app/beacon/AppBeaconServer.java @@ -163,16 +163,20 @@ public class AppBeaconServer { if (notFoundHtml == null) { AppResources.with(AppResources.XPIPE_MODULE, "misc/api.md", file -> { var md = Files.readString(file); - md = md.replaceAll(Pattern.quote( """ + md = md.replaceAll( + Pattern.quote( + """ > 400 Response - + ```json { "message": "string" } ``` - """), ""); - notFoundHtml = MarkdownHelper.toHtml(md, + """), + ""); + notFoundHtml = MarkdownHelper.toHtml( + md, head -> { return head + "\n" + "" + "\n" + "" diff --git a/app/src/main/java/io/xpipe/app/beacon/impl/ConnectionInfoExchangeImpl.java b/app/src/main/java/io/xpipe/app/beacon/impl/ConnectionInfoExchangeImpl.java index a1dc77f4b..ed59fbcb6 100644 --- a/app/src/main/java/io/xpipe/app/beacon/impl/ConnectionInfoExchangeImpl.java +++ b/app/src/main/java/io/xpipe/app/beacon/impl/ConnectionInfoExchangeImpl.java @@ -1,11 +1,12 @@ package io.xpipe.app.beacon.impl; -import com.sun.net.httpserver.HttpExchange; import io.xpipe.app.storage.DataStorage; import io.xpipe.beacon.BeaconClientException; import io.xpipe.beacon.api.ConnectionInfoExchange; import io.xpipe.core.store.StorePath; +import com.sun.net.httpserver.HttpExchange; + import java.util.ArrayList; import java.util.UUID; @@ -15,7 +16,9 @@ public class ConnectionInfoExchangeImpl extends ConnectionInfoExchange { public Object handle(HttpExchange exchange, Request msg) throws BeaconClientException { var list = new ArrayList(); for (UUID uuid : msg.getConnections()) { - var e = DataStorage.get().getStoreEntryIfPresent(uuid).orElseThrow(() -> new BeaconClientException("Unknown connection: " + uuid)); + var e = DataStorage.get() + .getStoreEntryIfPresent(uuid) + .orElseThrow(() -> new BeaconClientException("Unknown connection: " + uuid)); var names = DataStorage.get() .getStorePath(DataStorage.get() @@ -24,9 +27,17 @@ public class ConnectionInfoExchangeImpl extends ConnectionInfoExchange { .getNames(); var cat = new StorePath(names.subList(1, names.size())); - var apply = InfoResponse.builder().lastModified(e.getLastModified()).lastUsed(e.getLastUsed()).connection(e.getCategoryUuid()).category(cat).name( - DataStorage.get().getStorePath(e)).rawData(e.getStore()).usageCategory(e.getProvider().getUsageCategory()).type( - e.getProvider().getId()).state(e.getStorePersistentState()).build(); + var apply = InfoResponse.builder() + .lastModified(e.getLastModified()) + .lastUsed(e.getLastUsed()) + .connection(e.getCategoryUuid()) + .category(cat) + .name(DataStorage.get().getStorePath(e)) + .rawData(e.getStore()) + .usageCategory(e.getProvider().getUsageCategory()) + .type(e.getProvider().getId()) + .state(e.getStorePersistentState()) + .build(); list.add(apply); } return Response.builder().infos(list).build(); diff --git a/app/src/main/java/io/xpipe/app/beacon/impl/ConnectionQueryExchangeImpl.java b/app/src/main/java/io/xpipe/app/beacon/impl/ConnectionQueryExchangeImpl.java index a12773919..f0f3e65d1 100644 --- a/app/src/main/java/io/xpipe/app/beacon/impl/ConnectionQueryExchangeImpl.java +++ b/app/src/main/java/io/xpipe/app/beacon/impl/ConnectionQueryExchangeImpl.java @@ -1,10 +1,11 @@ package io.xpipe.app.beacon.impl; -import com.sun.net.httpserver.HttpExchange; import io.xpipe.app.storage.DataStorage; import io.xpipe.app.storage.DataStoreEntry; import io.xpipe.beacon.api.ConnectionQueryExchange; +import com.sun.net.httpserver.HttpExchange; + import java.util.ArrayList; import java.util.List; import java.util.regex.Pattern; @@ -13,7 +14,8 @@ public class ConnectionQueryExchangeImpl extends ConnectionQueryExchange { @Override public Object handle(HttpExchange exchange, Request msg) { - var catMatcher = Pattern.compile(toRegex("all connections/" + msg.getCategoryFilter().toLowerCase())); + var catMatcher = Pattern.compile( + toRegex("all connections/" + msg.getCategoryFilter().toLowerCase())); var conMatcher = Pattern.compile(toRegex(msg.getConnectionFilter().toLowerCase())); var typeMatcher = Pattern.compile(toRegex(msg.getTypeFilter().toLowerCase())); @@ -49,7 +51,9 @@ public class ConnectionQueryExchangeImpl extends ConnectionQueryExchange { found.add(storeEntry); } - return Response.builder().found(found.stream().map(entry -> entry.getUuid()).toList()).build(); + return Response.builder() + .found(found.stream().map(entry -> entry.getUuid()).toList()) + .build(); } private String toRegex(String pattern) { diff --git a/app/src/main/java/io/xpipe/app/beacon/impl/FsReadExchangeImpl.java b/app/src/main/java/io/xpipe/app/beacon/impl/FsReadExchangeImpl.java index 55fe19257..97f9c7ed1 100644 --- a/app/src/main/java/io/xpipe/app/beacon/impl/FsReadExchangeImpl.java +++ b/app/src/main/java/io/xpipe/app/beacon/impl/FsReadExchangeImpl.java @@ -31,7 +31,8 @@ public class FsReadExchangeImpl extends FsReadExchange { var file = BlobManager.get().newBlobFile(); try (var in = fs.openInput(msg.getPath().toString())) { var fixedIn = new FixedSizeInputStream(new BufferedInputStream(in), size); - try (var fileOut = Files.newOutputStream(file.resolve(msg.getPath().getFileName()))) { + try (var fileOut = + Files.newOutputStream(file.resolve(msg.getPath().getFileName()))) { fixedIn.transferTo(fileOut); } in.transferTo(OutputStream.nullOutputStream()); diff --git a/app/src/main/java/io/xpipe/app/browser/BrowserBookmarkHeaderComp.java b/app/src/main/java/io/xpipe/app/browser/BrowserBookmarkHeaderComp.java index 02d42f50f..71e3c1c4c 100644 --- a/app/src/main/java/io/xpipe/app/browser/BrowserBookmarkHeaderComp.java +++ b/app/src/main/java/io/xpipe/app/browser/BrowserBookmarkHeaderComp.java @@ -1,16 +1,18 @@ package io.xpipe.app.browser; -import atlantafx.base.theme.Styles; import io.xpipe.app.comp.store.StoreCategoryWrapper; import io.xpipe.app.comp.store.StoreViewState; import io.xpipe.app.fxcomps.SimpleComp; import io.xpipe.app.fxcomps.impl.FilterComp; import io.xpipe.app.fxcomps.impl.HorizontalComp; import io.xpipe.app.util.DataStoreCategoryChoiceComp; + import javafx.beans.property.Property; import javafx.beans.property.SimpleObjectProperty; import javafx.beans.property.SimpleStringProperty; import javafx.scene.layout.Region; + +import atlantafx.base.theme.Styles; import lombok.Getter; import java.util.List; @@ -29,9 +31,7 @@ public final class BrowserBookmarkHeaderComp extends SimpleComp { StoreViewState.get().getActiveCategory(), this.category) .styleClass(Styles.LEFT_PILL); - var filter = new FilterComp(this.filter) - .styleClass(Styles.RIGHT_PILL) - .hgrow(); + var filter = new FilterComp(this.filter).styleClass(Styles.RIGHT_PILL).hgrow(); var top = new HorizontalComp(List.of(category, filter)) .apply(struc -> struc.get().setFillHeight(true)) diff --git a/app/src/main/java/io/xpipe/app/browser/BrowserSelectionListComp.java b/app/src/main/java/io/xpipe/app/browser/BrowserSelectionListComp.java index c97c15f60..de41cf583 100644 --- a/app/src/main/java/io/xpipe/app/browser/BrowserSelectionListComp.java +++ b/app/src/main/java/io/xpipe/app/browser/BrowserSelectionListComp.java @@ -50,17 +50,20 @@ public class BrowserSelectionListComp extends SimpleComp { @Override protected Region createSimple() { - var c = new ListBoxViewComp<>(list, list, entry -> { - return Comp.of(() -> { - var image = PrettyImageHelper.ofFixedSizeSquare(entry.getIcon(), 24) - .createRegion(); - var l = new Label(null, image); - l.setTextOverrun(OverrunStyle.CENTER_ELLIPSIS); - l.textProperty().bind(PlatformThread.sync(nameTransformation.apply(entry))); - return l; - }); - }, - false) + var c = new ListBoxViewComp<>( + list, + list, + entry -> { + return Comp.of(() -> { + var image = PrettyImageHelper.ofFixedSizeSquare(entry.getIcon(), 24) + .createRegion(); + var l = new Label(null, image); + l.setTextOverrun(OverrunStyle.CENTER_ELLIPSIS); + l.textProperty().bind(PlatformThread.sync(nameTransformation.apply(entry))); + return l; + }); + }, + false) .styleClass("selected-file-list"); return c.createRegion(); } diff --git a/app/src/main/java/io/xpipe/app/browser/BrowserWelcomeComp.java b/app/src/main/java/io/xpipe/app/browser/BrowserWelcomeComp.java index d0a2416fd..8350041df 100644 --- a/app/src/main/java/io/xpipe/app/browser/BrowserWelcomeComp.java +++ b/app/src/main/java/io/xpipe/app/browser/BrowserWelcomeComp.java @@ -97,19 +97,23 @@ public class BrowserWelcomeComp extends SimpleComp { var storeList = new VBox(); storeList.setSpacing(8); - var listBox = new ListBoxViewComp<>(list, list, e -> { - var disable = new SimpleBooleanProperty(); - var entryButton = entryButton(e, disable); - var dirButton = dirButton(e, disable); - return new HorizontalComp(List.of(entryButton, dirButton)).apply(struc -> { - ((Region) struc.get().getChildren().get(0)) - .prefHeightProperty() - .bind(struc.get().heightProperty()); - ((Region) struc.get().getChildren().get(1)) - .prefHeightProperty() - .bind(struc.get().heightProperty()); - }); - }, true) + var listBox = new ListBoxViewComp<>( + list, + list, + e -> { + var disable = new SimpleBooleanProperty(); + var entryButton = entryButton(e, disable); + var dirButton = dirButton(e, disable); + return new HorizontalComp(List.of(entryButton, dirButton)).apply(struc -> { + ((Region) struc.get().getChildren().get(0)) + .prefHeightProperty() + .bind(struc.get().heightProperty()); + ((Region) struc.get().getChildren().get(1)) + .prefHeightProperty() + .bind(struc.get().heightProperty()); + }); + }, + true) .apply(struc -> { VBox vBox = (VBox) struc.get().getContent(); vBox.setSpacing(10); diff --git a/app/src/main/java/io/xpipe/app/comp/base/ListBoxViewComp.java b/app/src/main/java/io/xpipe/app/comp/base/ListBoxViewComp.java index 011cd6f65..18ae445ca 100644 --- a/app/src/main/java/io/xpipe/app/comp/base/ListBoxViewComp.java +++ b/app/src/main/java/io/xpipe/app/comp/base/ListBoxViewComp.java @@ -5,6 +5,7 @@ import io.xpipe.app.fxcomps.CompStructure; import io.xpipe.app.fxcomps.SimpleCompStructure; import io.xpipe.app.fxcomps.util.DerivedObservableList; import io.xpipe.app.fxcomps.util.PlatformThread; + import javafx.application.Platform; import javafx.beans.binding.Bindings; import javafx.collections.ListChangeListener; @@ -32,7 +33,8 @@ public class ListBoxViewComp extends Comp> { private final int limit = Integer.MAX_VALUE; private final boolean scrollBar; - public ListBoxViewComp(ObservableList shown, ObservableList all, Function> compFunction, boolean scrollBar) { + public ListBoxViewComp( + ObservableList shown, ObservableList all, Function> compFunction, boolean scrollBar) { this.shown = PlatformThread.sync(shown); this.all = PlatformThread.sync(all); this.compFunction = compFunction; @@ -64,10 +66,13 @@ public class ListBoxViewComp extends Comp> { scroll.skinProperty().subscribe(newValue -> { if (newValue != null) { ScrollBar bar = (ScrollBar) scroll.lookup(".scroll-bar:vertical"); - bar.opacityProperty().bind(Bindings.createDoubleBinding(() -> { - var v = bar.getVisibleAmount(); - return v < 1.0 ? 1.0 : 0.0; - }, bar.visibleAmountProperty())); + bar.opacityProperty() + .bind(Bindings.createDoubleBinding( + () -> { + var v = bar.getVisibleAmount(); + return v < 1.0 ? 1.0 : 0.0; + }, + bar.visibleAmountProperty())); } }); } else { diff --git a/app/src/main/java/io/xpipe/app/comp/store/StoreCreationMenu.java b/app/src/main/java/io/xpipe/app/comp/store/StoreCreationMenu.java index 1e2f026fc..b30ec5bb4 100644 --- a/app/src/main/java/io/xpipe/app/comp/store/StoreCreationMenu.java +++ b/app/src/main/java/io/xpipe/app/comp/store/StoreCreationMenu.java @@ -28,29 +28,22 @@ public class StoreCreationMenu { menu.getItems().add(category("addHost", "mdi2h-home-plus", DataStoreCreationCategory.HOST, "ssh")); - menu.getItems() - .add(category("addDesktop", "mdi2c-camera-plus", DataStoreCreationCategory.DESKTOP, null)); + menu.getItems().add(category("addDesktop", "mdi2c-camera-plus", DataStoreCreationCategory.DESKTOP, null)); + + menu.getItems().add(category("addShell", "mdi2t-text-box-multiple", DataStoreCreationCategory.SHELL, null)); menu.getItems() - .add(category("addShell", "mdi2t-text-box-multiple", DataStoreCreationCategory.SHELL, null)); + .add(category("addScript", "mdi2s-script-text-outline", DataStoreCreationCategory.SCRIPT, "script")); + + menu.getItems().add(category("addService", "mdi2c-cloud-braces", DataStoreCreationCategory.SERVICE, null)); menu.getItems() - .add(category( - "addScript", "mdi2s-script-text-outline", DataStoreCreationCategory.SCRIPT, "script")); + .add(category("addTunnel", "mdi2v-vector-polyline-plus", DataStoreCreationCategory.TUNNEL, null)); menu.getItems() - .add(category("addService", "mdi2c-cloud-braces", DataStoreCreationCategory.SERVICE, null)); + .add(category("addCommand", "mdi2c-code-greater-than", DataStoreCreationCategory.COMMAND, "cmd")); - menu.getItems() - .add(category( - "addTunnel", "mdi2v-vector-polyline-plus", DataStoreCreationCategory.TUNNEL, null)); - - menu.getItems() - .add(category( - "addCommand", "mdi2c-code-greater-than", DataStoreCreationCategory.COMMAND, "cmd")); - - menu.getItems() - .add(category("addDatabase", "mdi2d-database-plus", DataStoreCreationCategory.DATABASE, null)); + menu.getItems().add(category("addDatabase", "mdi2d-database-plus", DataStoreCreationCategory.DATABASE, null)); } private static MenuItem category( diff --git a/app/src/main/java/io/xpipe/app/comp/store/StoreEntryListComp.java b/app/src/main/java/io/xpipe/app/comp/store/StoreEntryListComp.java index 6eaa98f10..4718088d4 100644 --- a/app/src/main/java/io/xpipe/app/comp/store/StoreEntryListComp.java +++ b/app/src/main/java/io/xpipe/app/comp/store/StoreEntryListComp.java @@ -4,6 +4,7 @@ import io.xpipe.app.comp.base.ListBoxViewComp; import io.xpipe.app.comp.base.MultiContentComp; import io.xpipe.app.fxcomps.Comp; import io.xpipe.app.fxcomps.SimpleComp; + import javafx.beans.binding.Bindings; import javafx.beans.value.ObservableValue; import javafx.scene.layout.Region; @@ -14,18 +15,18 @@ public class StoreEntryListComp extends SimpleComp { private Comp createList() { var content = new ListBoxViewComp<>( - StoreViewState.get() - .getCurrentTopLevelSection() - .getShownChildren() - .getList(), - StoreViewState.get() - .getCurrentTopLevelSection() - .getAllChildren() - .getList(), - (StoreSection e) -> { - var custom = StoreSection.customSection(e, true).hgrow(); - return custom; - }, + StoreViewState.get() + .getCurrentTopLevelSection() + .getShownChildren() + .getList(), + StoreViewState.get() + .getCurrentTopLevelSection() + .getAllChildren() + .getList(), + (StoreSection e) -> { + var custom = StoreSection.customSection(e, true).hgrow(); + return custom; + }, true); return content.styleClass("store-list-comp"); } diff --git a/app/src/main/java/io/xpipe/app/comp/store/StoreSectionComp.java b/app/src/main/java/io/xpipe/app/comp/store/StoreSectionComp.java index e6844a96d..6553b83c3 100644 --- a/app/src/main/java/io/xpipe/app/comp/store/StoreSectionComp.java +++ b/app/src/main/java/io/xpipe/app/comp/store/StoreSectionComp.java @@ -134,10 +134,12 @@ public class StoreSectionComp extends Comp> { section.getWrapper().getExpanded(), section.getAllChildren().getList()); var content = new ListBoxViewComp<>( - listSections.getList(), section.getAllChildren().getList(), (StoreSection e) -> { + listSections.getList(), + section.getAllChildren().getList(), + (StoreSection e) -> { return StoreSection.customSection(e, false).apply(GrowAugment.create(true, false)); }, - false) + false) .minHeight(0) .hgrow(); @@ -151,8 +153,7 @@ public class StoreSectionComp extends Comp> { var full = new VerticalComp(List.of( topEntryList, Comp.separator().hide(expanded.not()), - content - .styleClass("children-content") + content.styleClass("children-content") .hide(Bindings.or( Bindings.not(section.getWrapper().getExpanded()), Bindings.size(section.getShownChildren().getList()) diff --git a/app/src/main/java/io/xpipe/app/comp/store/StoreSectionMiniComp.java b/app/src/main/java/io/xpipe/app/comp/store/StoreSectionMiniComp.java index 4367b46ed..58b56ecb1 100644 --- a/app/src/main/java/io/xpipe/app/comp/store/StoreSectionMiniComp.java +++ b/app/src/main/java/io/xpipe/app/comp/store/StoreSectionMiniComp.java @@ -9,6 +9,7 @@ import io.xpipe.app.fxcomps.impl.IconButtonComp; import io.xpipe.app.fxcomps.impl.PrettyImageHelper; import io.xpipe.app.fxcomps.impl.VerticalComp; import io.xpipe.app.storage.DataStoreColor; + import javafx.beans.binding.Bindings; import javafx.beans.property.BooleanProperty; import javafx.beans.property.SimpleBooleanProperty; @@ -133,15 +134,16 @@ public class StoreSectionMiniComp extends Comp> { section.getAllChildren().getList()) : section.getShownChildren(); var content = new ListBoxViewComp<>( - listSections.getList(), section.getAllChildren().getList(), (StoreSection e) -> { + listSections.getList(), + section.getAllChildren().getList(), + (StoreSection e) -> { return new StoreSectionMiniComp(e, this.augment, this.action); }, - section.getWrapper() == null) + section.getWrapper() == null) .minHeight(0) .hgrow(); - list.add(content - .styleClass("children-content") + list.add(content.styleClass("children-content") .hide(Bindings.or( Bindings.not(expanded), Bindings.size(section.getAllChildren().getList()).isEqualTo(0)))); diff --git a/app/src/main/java/io/xpipe/app/core/window/AppWindowBounds.java b/app/src/main/java/io/xpipe/app/core/window/AppWindowBounds.java index c12fd733e..9b8042364 100644 --- a/app/src/main/java/io/xpipe/app/core/window/AppWindowBounds.java +++ b/app/src/main/java/io/xpipe/app/core/window/AppWindowBounds.java @@ -2,6 +2,7 @@ package io.xpipe.app.core.window; import io.xpipe.app.core.App; import io.xpipe.core.process.OsType; + import javafx.geometry.Rectangle2D; import javafx.stage.Screen; import javafx.stage.Stage; diff --git a/app/src/main/java/io/xpipe/app/ext/DataStoreProvider.java b/app/src/main/java/io/xpipe/app/ext/DataStoreProvider.java index 88a0c61eb..9f27e842b 100644 --- a/app/src/main/java/io/xpipe/app/ext/DataStoreProvider.java +++ b/app/src/main/java/io/xpipe/app/ext/DataStoreProvider.java @@ -136,7 +136,7 @@ public interface DataStoreProvider { default DataStoreUsageCategory getUsageCategory() { var cc = getCreationCategory(); - if (cc == DataStoreCreationCategory.SHELL || cc == DataStoreCreationCategory.HOST) { + if (cc == DataStoreCreationCategory.SHELL || cc == DataStoreCreationCategory.HOST) { return DataStoreUsageCategory.SHELL; } @@ -233,5 +233,4 @@ public interface DataStoreProvider { } List> getStoreClasses(); - } diff --git a/app/src/main/java/io/xpipe/app/fxcomps/impl/DataStoreListChoiceComp.java b/app/src/main/java/io/xpipe/app/fxcomps/impl/DataStoreListChoiceComp.java index 86b5152ba..552ac4ba7 100644 --- a/app/src/main/java/io/xpipe/app/fxcomps/impl/DataStoreListChoiceComp.java +++ b/app/src/main/java/io/xpipe/app/fxcomps/impl/DataStoreListChoiceComp.java @@ -36,21 +36,24 @@ public class DataStoreListChoiceComp extends SimpleComp { @Override protected Region createSimple() { - var list = new ListBoxViewComp<>(selectedList, selectedList, t -> { - if (t == null) { - return null; - } + var list = new ListBoxViewComp<>( + selectedList, + selectedList, + t -> { + if (t == null) { + return null; + } - var label = new LabelComp(t.get().getName()).apply(struc -> struc.get() - .setGraphic(PrettyImageHelper.ofFixedSizeSquare( - t.get().getProvider().getDisplayIconFileName(t.getStore()), 16) - .createRegion())); - var delete = new IconButtonComp("mdal-delete_outline", () -> { - selectedList.remove(t); - }); - return new HorizontalComp(List.of(label, Comp.hspacer(), delete)).styleClass("entry"); - }, - true) + var label = new LabelComp(t.get().getName()).apply(struc -> struc.get() + .setGraphic(PrettyImageHelper.ofFixedSizeSquare( + t.get().getProvider().getDisplayIconFileName(t.getStore()), 16) + .createRegion())); + var delete = new IconButtonComp("mdal-delete_outline", () -> { + selectedList.remove(t); + }); + return new HorizontalComp(List.of(label, Comp.hspacer(), delete)).styleClass("entry"); + }, + true) .padding(new Insets(0)) .apply(struc -> struc.get().setMinHeight(0)) .apply(struc -> ((VBox) struc.get().getContent()).setSpacing(5)); diff --git a/app/src/main/java/io/xpipe/app/fxcomps/impl/StoreCategoryComp.java b/app/src/main/java/io/xpipe/app/fxcomps/impl/StoreCategoryComp.java index 2eb8fb41e..c5919a83d 100644 --- a/app/src/main/java/io/xpipe/app/fxcomps/impl/StoreCategoryComp.java +++ b/app/src/main/java/io/xpipe/app/fxcomps/impl/StoreCategoryComp.java @@ -113,7 +113,8 @@ public class StoreCategoryComp extends SimpleComp { var l = category.getChildren() .sorted(Comparator.comparing(storeCategoryWrapper -> storeCategoryWrapper.nameProperty().getValue().toLowerCase(Locale.ROOT))); - var children = new ListBoxViewComp<>(l, l, storeCategoryWrapper -> new StoreCategoryComp(storeCategoryWrapper), false); + var children = + new ListBoxViewComp<>(l, l, storeCategoryWrapper -> new StoreCategoryComp(storeCategoryWrapper), false); var emptyBinding = Bindings.isEmpty(category.getChildren()); var v = new VerticalComp(List.of(categoryButton, children.hide(emptyBinding))); diff --git a/beacon/src/main/java/io/xpipe/beacon/api/ConnectionInfoExchange.java b/beacon/src/main/java/io/xpipe/beacon/api/ConnectionInfoExchange.java index 653e08b72..91a69928a 100644 --- a/beacon/src/main/java/io/xpipe/beacon/api/ConnectionInfoExchange.java +++ b/beacon/src/main/java/io/xpipe/beacon/api/ConnectionInfoExchange.java @@ -2,6 +2,7 @@ package io.xpipe.beacon.api; import io.xpipe.beacon.BeaconInterface; import io.xpipe.core.store.StorePath; + import lombok.Builder; import lombok.NonNull; import lombok.Value; @@ -34,7 +35,6 @@ public class ConnectionInfoExchange extends BeaconInterface infos; } - @Jacksonized @Builder @Value diff --git a/beacon/src/main/java/io/xpipe/beacon/api/ConnectionQueryExchange.java b/beacon/src/main/java/io/xpipe/beacon/api/ConnectionQueryExchange.java index 1ec40e2ab..5cfa51907 100644 --- a/beacon/src/main/java/io/xpipe/beacon/api/ConnectionQueryExchange.java +++ b/beacon/src/main/java/io/xpipe/beacon/api/ConnectionQueryExchange.java @@ -1,6 +1,7 @@ package io.xpipe.beacon.api; import io.xpipe.beacon.BeaconInterface; + import lombok.Builder; import lombok.NonNull; import lombok.Value; diff --git a/openapi.yaml b/openapi.yaml index cfa6ea8b3..a409e2ce3 100644 --- a/openapi.yaml +++ b/openapi.yaml @@ -6,7 +6,7 @@ info: You can get started by either using this page as an API reference or alternatively import the OpenAPI definition file into your API client of choice: OpenAPI .yaml specification - + The XPipe application will start up an HTTP server that can be used to send requests. Note that this server is HTTP-only for now as it runs only on localhost. HTTPS requests are not accepted. @@ -44,7 +44,7 @@ paths: Note that for development you can also turn off the required authentication in the XPipe settings menu, allowing you to send unauthenticated requests. operationId: handshake - security: [] + security: [ ] requestBody: required: true content: @@ -104,7 +104,7 @@ paths: examples: standard: summary: Matched connections - value: { "found": [ "f0ec68aa-63f5-405c-b178-9a4454556d6b"] } + value: { "found": [ "f0ec68aa-63f5-405c-b178-9a4454556d6b" ] } '400': $ref: '#/components/responses/BadRequest' '401': @@ -130,7 +130,7 @@ paths: examples: simple: summary: Standard - value: { "connections": ["f0ec68aa-63f5-405c-b178-9a4454556d6b"] } + value: { "connections": [ "f0ec68aa-63f5-405c-b178-9a4454556d6b" ] } responses: '200': description: The query was successful. The body contains the detailed connection information. @@ -141,10 +141,10 @@ paths: examples: standard: summary: Connection information - value: { "infos": [ { "connection": "f0ec68aa-63f5-405c-b178-9a4454556d6b", "category": ["default"] , - "name": ["local machine"], "type": "local", "rawData" : {}, "usageCategory" : "shell", - "lastUsed" : "2024-05-31T11:53:02.408504600Z", "lastModified" : "2024-06-23T21:15:25.608097Z", - "state": {} } ] } + value: { "infos": [ { "connection": "f0ec68aa-63f5-405c-b178-9a4454556d6b", "category": [ "default" ] , + "name": [ "local machine" ], "type": "local", "rawData": { }, "usageCategory": "shell", + "lastUsed": "2024-05-31T11:53:02.408504600Z", "lastModified": "2024-06-23T21:15:25.608097Z", + "state": { } } ] } '400': $ref: '#/components/responses/BadRequest' '401': @@ -738,4 +738,4 @@ components: scheme: bearer description: The bearer token used is the session token that you receive from the handshake exchange. security: - - bearerAuth: [] + - bearerAuth: [ ]