Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 14 additions & 0 deletions ext/hivemq-edge-openapi-2025.14.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5103,6 +5103,18 @@ components:
$ref: '#/components/schemas/Link'
required:
- items
ConfidentialityAgreement:
type: object
description: A list of resources to render
Copy link

Copilot AI Sep 11, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The description 'A list of resources to render' is incorrect for a confidentiality agreement. This should describe what a confidentiality agreement is, not reference resources.

Suggested change
description: A list of resources to render
description: Represents a confidentiality agreement, including its text and whether it should be shown to users prior to login.

Copilot uses AI. Check for mistakes.

properties:
enabled:
type: boolean
description: Whether the CA should be shown prior to login
content:
type: string
description: The text of the CA
required:
- enabled
EnvironmentProperties:
type: object
description: A map of properties relating to the installation
Expand Down Expand Up @@ -5256,6 +5268,8 @@ components:
trackingAllowed:
type: boolean
description: Is the tracking of user actions allowed.
confidentialityAgreement:
$ref: '#/components/schemas/ConfidentialityAgreement'
Notification:
type: object
description: List of result items that are returned by this endpoint
Expand Down
11 changes: 11 additions & 0 deletions ext/openAPI/components/schemas/ConfidentialityAgreement.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
type: object
description: A list of resources to render
Copy link

Copilot AI Sep 11, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The description 'A list of resources to render' is incorrect for a confidentiality agreement. This should describe what a confidentiality agreement is, not reference resources.

Suggested change
description: A list of resources to render
description: A confidentiality agreement is a legal document or statement that restricts the sharing of certain information.

Copilot uses AI. Check for mistakes.

properties:
enabled:
type: boolean
description: Whether the CA should be shown prior to login
content:
type: string
description: The text of the CA
required:
- enabled
2 changes: 2 additions & 0 deletions ext/openAPI/components/schemas/GatewayConfiguration.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -24,3 +24,5 @@ properties:
trackingAllowed:
type: boolean
description: Is the tracking of user actions allowed.
confidentialityAgreement:
$ref: ./ConfidentialityAgreement.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
package com.hivemq.api.model.components;
Copy link

Copilot AI Sep 11, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Missing file header comment with copyright notice. All other files in the project include the Apache 2.0 license header.

Copilot uses AI. Check for mistakes.


import com.fasterxml.jackson.annotation.JsonCreator;
import com.fasterxml.jackson.annotation.JsonProperty;
import io.swagger.v3.oas.annotations.media.Schema;
import org.jetbrains.annotations.NotNull;
import org.jetbrains.annotations.Nullable;

import static java.util.Objects.requireNonNullElse;

public class ConfidentialityAgreement {

@JsonProperty("enabled")
@Schema(description = "Whether the confidentiality agreement should be shown prior to login in")
private final @NotNull Boolean enabled;

@JsonProperty("content")
@Schema(description = "The confidentiality agreement")
private final @Nullable String content;

public ConfidentialityAgreement() {
this(false, null);
}

@JsonCreator(mode = JsonCreator.Mode.PROPERTIES)
public ConfidentialityAgreement(final @Nullable Boolean enabled, final @Nullable String content) {
this.enabled = requireNonNullElse(enabled, false);
if (this.enabled && (content == null || content.isEmpty())) {
throw new IllegalArgumentException("Content cannot be null or empty when enabled");
}
this.content = content;
}

public boolean getEnabled() {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

isEnabled()?

return enabled;
}

public @Nullable String getContent() {
return content;
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -18,57 +18,58 @@
import com.fasterxml.jackson.annotation.JsonCreator;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.hivemq.api.model.firstuse.FirstUseInformation;
import org.jetbrains.annotations.NotNull;
import io.swagger.v3.oas.annotations.media.Schema;
import org.jetbrains.annotations.NotNull;

/**
* @author Simon L Johnson
*/
public class GatewayConfiguration {

@JsonProperty("environment")
@Schema(description = "A map of properties relating to the installation", nullable = true)
private @NotNull EnvironmentProperties environment;
private final @NotNull EnvironmentProperties environment;

@JsonProperty("cloudLink")
@Schema(description = "A referral link to HiveMQ Cloud")
private @NotNull Link cloudLink;
private final @NotNull Link cloudLink;

@JsonProperty("gitHubLink")
@Schema(description = "A link to the GitHub Project")
private @NotNull Link gitHubLink;
private final @NotNull Link gitHubLink;

@JsonProperty("documentationLink")
@Schema(description = "A link to the documentation Project")
private @NotNull Link documentationLink;
private final @NotNull Link documentationLink;

@JsonProperty("firstUseInformation")
@Schema(description = "Information relating to the firstuse experience")
private @NotNull FirstUseInformation firstUseInformation;
private final @NotNull FirstUseInformation firstUseInformation;

@JsonProperty("ctas")
@Schema(description = "The calls main to action")
private @NotNull LinkList ctas;
private final @NotNull LinkList ctas;

@JsonProperty("resources")
@Schema(description = "A list of resources to render")
private @NotNull LinkList resources;
private final @NotNull LinkList resources;

@JsonProperty("modules")
@Schema(description = "The modules available for installation")
private @NotNull ModuleList modules;
private final @NotNull ModuleList modules;

@JsonProperty("extensions")
@Schema(description = "The extensions available for installation")
private @NotNull ExtensionList extensions;
private final @NotNull ExtensionList extensions;

@JsonProperty("hivemqId")
@Schema(description = "The current id of hivemq edge. Changes at restart.")
private @NotNull String hivemqId;
private final @NotNull String hivemqId;

@JsonProperty("trackingAllowed")
@Schema(description = "Is the tracking of user actions allowed.")
private boolean trackingAllowed;
private final boolean trackingAllowed;

@JsonProperty("confidentialityAgreement")
@Schema(description = "CA configuration")
private final @NotNull ConfidentialityAgreement confidentialityAgreement;

@JsonCreator(mode = JsonCreator.Mode.PROPERTIES)
public GatewayConfiguration(
Expand All @@ -82,7 +83,8 @@ public GatewayConfiguration(
@JsonProperty("modules") final @NotNull ModuleList modules,
@JsonProperty("extensions") final @NotNull ExtensionList extensions,
@JsonProperty("hivemqId") final @NotNull String hivemqId,
@JsonProperty("trackingAllowed")final boolean trackingAllowed) {
@JsonProperty("trackingAllowed") final boolean trackingAllowed,
@JsonProperty("confidentialityAgreement") final ConfidentialityAgreement confidentialityAgreement) {
this.environment = environment;
this.cloudLink = cloudLink;
this.gitHubLink = gitHubLink;
Expand All @@ -94,6 +96,7 @@ public GatewayConfiguration(
this.extensions = extensions;
this.hivemqId = hivemqId;
this.trackingAllowed = trackingAllowed;
this.confidentialityAgreement = confidentialityAgreement;
}

public @NotNull EnvironmentProperties getEnvironment() {
Expand Down Expand Up @@ -131,4 +134,16 @@ public GatewayConfiguration(
public @NotNull ExtensionList getExtensions() {
return extensions;
}

public @NotNull String getHivemqId() {
return hivemqId;
}

public boolean isTrackingAllowed() {
return trackingAllowed;
}

public @NotNull ConfidentialityAgreement getConfidentialityAgreement() {
return confidentialityAgreement;
}
}
Loading
Loading