diff --git a/app/src/main/java/io/apicurio/registry/rest/v3/SystemResourceImpl.java b/app/src/main/java/io/apicurio/registry/rest/v3/SystemResourceImpl.java index 113c6b3289..8049094e32 100644 --- a/app/src/main/java/io/apicurio/registry/rest/v3/SystemResourceImpl.java +++ b/app/src/main/java/io/apicurio/registry/rest/v3/SystemResourceImpl.java @@ -98,6 +98,7 @@ public UserInterfaceConfig getUIConfig() { .deleteGroup(restConfig.isGroupDeletionEnabled()) .deleteArtifact(restConfig.isArtifactDeletionEnabled()) .deleteVersion(restConfig.isArtifactVersionDeletionEnabled()) + .draftMutability(restConfig.isArtifactVersionMutabilityEnabled()) .settings("true".equals(uiConfig.featureSettings)).build()) .build(); } diff --git a/app/src/test/java/io/apicurio/registry/noprofile/rest/v3/DraftContentTest.java b/app/src/test/java/io/apicurio/registry/noprofile/rest/v3/DraftContentTest.java index 9daa069b6d..30e5566ae2 100644 --- a/app/src/test/java/io/apicurio/registry/noprofile/rest/v3/DraftContentTest.java +++ b/app/src/test/java/io/apicurio/registry/noprofile/rest/v3/DraftContentTest.java @@ -10,6 +10,7 @@ import io.apicurio.registry.rest.client.models.CreateVersion; import io.apicurio.registry.rest.client.models.ProblemDetails; import io.apicurio.registry.rest.client.models.RuleType; +import io.apicurio.registry.rest.client.models.UserInterfaceConfig; import io.apicurio.registry.rest.client.models.VersionContent; import io.apicurio.registry.rest.client.models.VersionMetaData; import io.apicurio.registry.rest.client.models.VersionSearchResults; @@ -460,4 +461,12 @@ public void testDraftVersionsInCoreV2() throws Exception { .get("/registry/v2/groups/{groupId}/artifacts/{artifactId}/versions/latest").then() .statusCode(200); } + + @Test + public void testUiConfig() throws Exception { + UserInterfaceConfig config = clientV3.system().uiConfig().get(); + Assertions.assertNotNull(config); + Assertions.assertTrue(config.getFeatures().getDraftMutability()); + } + } diff --git a/common/src/main/resources/META-INF/openapi.json b/common/src/main/resources/META-INF/openapi.json index a086af219e..bc7b256c2a 100644 --- a/common/src/main/resources/META-INF/openapi.json +++ b/common/src/main/resources/META-INF/openapi.json @@ -4821,6 +4821,10 @@ "deleteVersion": { "description": "", "type": "boolean" + }, + "draftMutability": { + "description": "", + "type": "boolean" } }, "example": { diff --git a/go-sdk/pkg/registryclient-v3/kiota-lock.json b/go-sdk/pkg/registryclient-v3/kiota-lock.json index 6884f617f8..9497dff6c1 100644 --- a/go-sdk/pkg/registryclient-v3/kiota-lock.json +++ b/go-sdk/pkg/registryclient-v3/kiota-lock.json @@ -1,5 +1,5 @@ { - "descriptionHash": "6D428EDE13C8C05F3E9350ADBED7F44A1E6FFE2930A5F0EF8AF63340F89684254673F58AD88E237A968713F30D33CF09EB59BC3D3F08969CB79C3C4444A972C8", + "descriptionHash": "760E2C412DC1229895C64DE9E5C64E93739B4734CB2A4444323019D1A22B4C081479F739A9C7372E3E87D335E577DDE222B8DF9D48DF05ED285DEA1D2C7F2729", "descriptionLocation": "../../v3.json", "lockFileVersion": "1.0.0", "kiotaVersion": "1.19.1", diff --git a/go-sdk/pkg/registryclient-v3/models/user_interface_config_features.go b/go-sdk/pkg/registryclient-v3/models/user_interface_config_features.go index b6e7ac9e21..22efd546fd 100644 --- a/go-sdk/pkg/registryclient-v3/models/user_interface_config_features.go +++ b/go-sdk/pkg/registryclient-v3/models/user_interface_config_features.go @@ -15,6 +15,8 @@ type UserInterfaceConfigFeatures struct { deleteGroup *bool // The deleteVersion property deleteVersion *bool + // The draftMutability property + draftMutability *bool // The readOnly property readOnly *bool // The roleManagement property @@ -66,6 +68,12 @@ func (m *UserInterfaceConfigFeatures) GetDeleteVersion() *bool { return m.deleteVersion } +// GetDraftMutability gets the draftMutability property value. The draftMutability property +// returns a *bool when successful +func (m *UserInterfaceConfigFeatures) GetDraftMutability() *bool { + return m.draftMutability +} + // GetFieldDeserializers the deserialization information for the current model // returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful func (m *UserInterfaceConfigFeatures) GetFieldDeserializers() map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { @@ -110,6 +118,16 @@ func (m *UserInterfaceConfigFeatures) GetFieldDeserializers() map[string]func(i8 } return nil } + res["draftMutability"] = func(n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetDraftMutability(val) + } + return nil + } res["readOnly"] = func(n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { val, err := n.GetBoolValue() if err != nil { @@ -187,6 +205,12 @@ func (m *UserInterfaceConfigFeatures) Serialize(writer i878a80d2330e89d26896388a return err } } + { + err := writer.WriteBoolValue("draftMutability", m.GetDraftMutability()) + if err != nil { + return err + } + } { err := writer.WriteBoolValue("readOnly", m.GetReadOnly()) if err != nil { @@ -239,6 +263,11 @@ func (m *UserInterfaceConfigFeatures) SetDeleteVersion(value *bool) { m.deleteVersion = value } +// SetDraftMutability sets the draftMutability property value. The draftMutability property +func (m *UserInterfaceConfigFeatures) SetDraftMutability(value *bool) { + m.draftMutability = value +} + // SetReadOnly sets the readOnly property value. The readOnly property func (m *UserInterfaceConfigFeatures) SetReadOnly(value *bool) { m.readOnly = value @@ -261,6 +290,7 @@ type UserInterfaceConfigFeaturesable interface { GetDeleteArtifact() *bool GetDeleteGroup() *bool GetDeleteVersion() *bool + GetDraftMutability() *bool GetReadOnly() *bool GetRoleManagement() *bool GetSettings() *bool @@ -268,6 +298,7 @@ type UserInterfaceConfigFeaturesable interface { SetDeleteArtifact(value *bool) SetDeleteGroup(value *bool) SetDeleteVersion(value *bool) + SetDraftMutability(value *bool) SetReadOnly(value *bool) SetRoleManagement(value *bool) SetSettings(value *bool)