/// Creates an OAuth handler with default OAuth options.
/// Uses the default AppId, ClientId, and RedirectUri.
@@ -504,7 +501,7 @@ public OAuthHandler OAuth(OAuthOptions options)
///
/// ContentstackClient client = new ContentstackClient();
/// OAuthHandler oauthHandler = client.OAuth();
- ///
+ ///
/// // Get authorization URL with default options
/// string authUrl = oauthHandler.GetAuthorizationUrl();
///
@@ -515,9 +512,7 @@ public OAuthHandler OAuth()
var defaultOptions = new OAuthOptions();
return new OAuthHandler(this, defaultOptions);
}
- */
- /*
///
/// Sets OAuth tokens for the client to use for authenticated requests.
/// This method is called internally by the OAuthHandler after successful token exchange or refresh.
@@ -586,7 +581,7 @@ public bool HasValidOAuthTokens(string clientId)
/// This method should be called when logging out or switching authentication methods.
///
/// The OAuth client ID to clear tokens for.
- public void ClearOAuthTokens(string clientId = null)
+ public void ClearOAuthTokens(string? clientId = null)
{
if (!string.IsNullOrEmpty(clientId))
{
@@ -669,7 +664,6 @@ internal void ClearAllOAuthTokens()
_oauthTokens.Clear();
}
#endregion
- */
///
/// The Get user call returns comprehensive information of an existing user account.
@@ -709,7 +703,6 @@ public Task GetUserAsync(ParameterCollection? collection =
return InvokeAsync(getUser);
}
- /*
///
/// Ensures that the current OAuth token is valid and refreshes it if needed.
/// This method is called before each API request to automatically handle token refresh.
@@ -777,7 +770,6 @@ private async Task EnsureOAuthTokenIsValidAsync()
$"OAuth token validation failed: {ex.Message}", ex);
}
}
- */
}
}
diff --git a/Contentstack.Management.Core/ContentstackResponse.cs b/Contentstack.Management.Core/ContentstackResponse.cs
index 5d192c4..f68c33c 100644
--- a/Contentstack.Management.Core/ContentstackResponse.cs
+++ b/Contentstack.Management.Core/ContentstackResponse.cs
@@ -6,7 +6,6 @@
using System.Net.Http.Headers;
using System.Text.Json;
using System.Text.Json.Nodes;
-using Newtonsoft.Json.Linq;
namespace Contentstack.Management.Core
{
@@ -154,17 +153,6 @@ public JsonObject OpenJsonObjectResponse()
return JsonNode.Parse(OpenResponse())!.AsObject();
}
- ///
- /// Backward compatibility method for non-migrated models. Will be removed in future versions.
- ///
- /// The JObject (Newtonsoft.Json).
- [Obsolete("Use OpenJsonObjectResponse() instead. This method will be removed in future versions.")]
- public JObject OpenJObjectResponse()
- {
- ThrowIfDisposed();
- return JObject.Parse(OpenResponse());
- }
-
///
/// String format response.
///
diff --git a/Contentstack.Management.Core/IResponse.cs b/Contentstack.Management.Core/IResponse.cs
index bb80386..5a0ac54 100644
--- a/Contentstack.Management.Core/IResponse.cs
+++ b/Contentstack.Management.Core/IResponse.cs
@@ -1,7 +1,5 @@
-using System;
using System.Net;
using System.Text.Json.Nodes;
-using Newtonsoft.Json.Linq;
namespace Contentstack.Management.Core
{
@@ -22,12 +20,6 @@ public interface IResponse
JsonObject OpenJsonObjectResponse();
- ///
- /// Backward compatibility method for non-migrated models. Will be removed in future versions.
- ///
- [Obsolete("Use OpenJsonObjectResponse() instead. This method will be removed in future versions.")]
- JObject OpenJObjectResponse();
-
TResponse? OpenTResponse();
}
}
diff --git a/Contentstack.Management.Core/Models/AuditLog.cs b/Contentstack.Management.Core/Models/AuditLog.cs
index 1e2d082..9b68b57 100644
--- a/Contentstack.Management.Core/Models/AuditLog.cs
+++ b/Contentstack.Management.Core/Models/AuditLog.cs
@@ -9,11 +9,11 @@ namespace Contentstack.Management.Core.Models
public class AuditLog
{
internal Stack stack;
- public string Uid { get; set; }
+ public string? Uid { get; set; }
internal string resourcePath;
- internal AuditLog(Stack stack, string uid = null)
+ internal AuditLog(Stack stack, string? uid = null)
{
stack.ThrowIfAPIKeyEmpty();
@@ -33,12 +33,12 @@ internal AuditLog(Stack stack, string uid = null)
///
///
/// The .
- public virtual ContentstackResponse FindAll(ParameterCollection collection = null)
+ public virtual ContentstackResponse FindAll(ParameterCollection? collection = null)
{
stack.ThrowIfNotLoggedIn();
ThrowIfUidNotEmpty();
- var service = new FetchDeleteService(stack.client.serializer, stack, resourcePath, collection: collection);
+ var service = new FetchDeleteService(stack, resourcePath, collection: collection);
return stack.client.InvokeSync(service);
}
@@ -53,12 +53,12 @@ public virtual ContentstackResponse FindAll(ParameterCollection collection = nul
///
///
/// The .
- public virtual Task FindAllAsync(ParameterCollection collection = null)
+ public virtual Task FindAllAsync(ParameterCollection? collection = null)
{
stack.ThrowIfNotLoggedIn();
ThrowIfUidNotEmpty();
- var service = new FetchDeleteService(stack.client.serializer, stack, resourcePath, collection: collection);
+ var service = new FetchDeleteService(stack, resourcePath, collection: collection);
return stack.client.InvokeAsync(service);
}
@@ -73,12 +73,12 @@ public virtual Task FindAllAsync(ParameterCollection colle
///
///
/// The .
- public virtual ContentstackResponse Fetch(ParameterCollection collection = null)
+ public virtual ContentstackResponse Fetch(ParameterCollection? collection = null)
{
stack.ThrowIfNotLoggedIn();
ThrowIfUidEmpty();
- var service = new FetchDeleteService(stack.client.serializer, stack, resourcePath, collection: collection);
+ var service = new FetchDeleteService(stack, resourcePath, collection: collection);
return stack.client.InvokeSync(service);
}
@@ -93,12 +93,12 @@ public virtual ContentstackResponse Fetch(ParameterCollection collection = null)
///
///
/// The .
- public virtual Task FetchAsync(ParameterCollection collection = null)
+ public virtual Task FetchAsync(ParameterCollection? collection = null)
{
stack.ThrowIfNotLoggedIn();
ThrowIfUidEmpty();
- var service = new FetchDeleteService(stack.client.serializer, stack, resourcePath, collection: collection);
+ var service = new FetchDeleteService(stack, resourcePath, collection: collection);
return stack.client.InvokeAsync(service);
}
diff --git a/Contentstack.Management.Core/Models/CustomExtension/CustomFieldModel.cs b/Contentstack.Management.Core/Models/CustomExtension/CustomFieldModel.cs
index e39c5fe..b445a0c 100644
--- a/Contentstack.Management.Core/Models/CustomExtension/CustomFieldModel.cs
+++ b/Contentstack.Management.Core/Models/CustomExtension/CustomFieldModel.cs
@@ -10,25 +10,25 @@ public class CustomFieldModel : IExtensionInterface
{
public string Title { get; set; }
public string DataType { get; set; }
- public string Tags { get; set; }
+ public string? Tags { get; set; }
public bool Multiple { get; set; }
public string ContentType { get; set; }
internal ByteArrayContent byteArray;
- public CustomFieldModel(string filePath, string contentType, string title, string dataType, bool isMultiple = false, string tags = null) :
+ public CustomFieldModel(string filePath, string contentType, string title, string dataType, bool isMultiple = false, string? tags = null) :
this(File.OpenRead(filePath), contentType, title, dataType, isMultiple, tags)
{ }
- public CustomFieldModel(Stream stream, string contentType, string title, string dataType, bool isMultiple = false, string tags = null) :
+ public CustomFieldModel(Stream stream, string contentType, string title, string dataType, bool isMultiple = false, string? tags = null) :
this(getBytes(stream), contentType, title, dataType, isMultiple, tags)
{ }
- public CustomFieldModel(byte[] bytes, string contentType, string title, string dataType, bool isMultiple = false, string tags = null) :
+ public CustomFieldModel(byte[] bytes, string contentType, string title, string dataType, bool isMultiple = false, string? tags = null) :
this(getByteArray(bytes), contentType, title, dataType, isMultiple, tags)
{ }
- public CustomFieldModel(ByteArrayContent byteArray, string contentType, string title, string dataType, bool isMultiple = false, string tags = null)
+ public CustomFieldModel(ByteArrayContent byteArray, string contentType, string title, string dataType, bool isMultiple = false, string? tags = null)
{
if (byteArray == null)
diff --git a/Contentstack.Management.Core/Models/CustomExtension/CustomWidgetModel.cs b/Contentstack.Management.Core/Models/CustomExtension/CustomWidgetModel.cs
index 6b6753f..b9684f0 100644
--- a/Contentstack.Management.Core/Models/CustomExtension/CustomWidgetModel.cs
+++ b/Contentstack.Management.Core/Models/CustomExtension/CustomWidgetModel.cs
@@ -1,36 +1,35 @@
using System;
-using System.Globalization;
using System.IO;
using System.Net.Http;
using System.Net.Http.Headers;
+using System.Text.Json;
using Contentstack.Management.Core.Abstractions;
using Contentstack.Management.Core.Utils;
-using Newtonsoft.Json;
namespace Contentstack.Management.Core.Models.CustomExtension
{
public class CustomWidgetModel : IExtensionInterface
{
public string Title { get; set; }
- public string Tags { get; set; }
- public ExtensionScope Scope { get; set; }
+ public string? Tags { get; set; }
+ public ExtensionScope? Scope { get; set; }
public string ContentType { get; set; }
internal ByteArrayContent byteArray;
- public CustomWidgetModel(string filePath, string contentType, string title, string tags = null, ExtensionScope scope = null) :
+ public CustomWidgetModel(string filePath, string contentType, string title, string? tags = null, ExtensionScope? scope = null) :
this(File.OpenRead(filePath), contentType, title, tags, scope)
{ }
- public CustomWidgetModel(Stream stream, string contentType, string title, string tags = null, ExtensionScope scope = null) :
+ public CustomWidgetModel(Stream stream, string contentType, string title, string? tags = null, ExtensionScope? scope = null) :
this(getBytes(stream), contentType, title, tags, scope)
{ }
- public CustomWidgetModel(byte[] bytes, string contentType, string title, string tags = null, ExtensionScope scope = null) :
+ public CustomWidgetModel(byte[] bytes, string contentType, string title, string? tags = null, ExtensionScope? scope = null) :
this(getByteArray(bytes), contentType, title, tags, scope)
{ }
- public CustomWidgetModel(ByteArrayContent byteArray, string contentType, string title, string tags = null, ExtensionScope scope = null)
+ public CustomWidgetModel(ByteArrayContent byteArray, string contentType, string title, string? tags = null, ExtensionScope? scope = null)
{
if (byteArray == null)
{
@@ -74,18 +73,11 @@ public HttpContent GetHttpContent()
}
if (Scope != null)
{
- using (StringWriter stringWriter = new StringWriter(CultureInfo.InvariantCulture))
- {
- JsonWriter writer = new JsonTextWriter(stringWriter);
-
- JsonSerializer.Create().Serialize(writer, Scope);
- string snippet = stringWriter.ToString();
- StringContent jsonPart = new StringContent(snippet);
- jsonPart.Headers.ContentDisposition = new ContentDispositionHeaderValue("form-data");
- jsonPart.Headers.ContentType = new MediaTypeHeaderValue("application/json");
-
- content.Add(jsonPart, "extension[scope]", snippet);
- }
+ string snippet = JsonSerializer.Serialize(Scope);
+ StringContent jsonPart = new StringContent(snippet);
+ jsonPart.Headers.ContentDisposition = new ContentDispositionHeaderValue("form-data");
+ jsonPart.Headers.ContentType = new MediaTypeHeaderValue("application/json");
+ content.Add(jsonPart, "extension[scope]", snippet);
}
content.Add(new StringContent("widget"), "extension[type]");
return content;
diff --git a/Contentstack.Management.Core/Models/CustomExtension/DashboardWidgetModel.cs b/Contentstack.Management.Core/Models/CustomExtension/DashboardWidgetModel.cs
index b75c43b..450b168 100644
--- a/Contentstack.Management.Core/Models/CustomExtension/DashboardWidgetModel.cs
+++ b/Contentstack.Management.Core/Models/CustomExtension/DashboardWidgetModel.cs
@@ -9,26 +9,26 @@ namespace Contentstack.Management.Core.Models.CustomExtension
public class DashboardWidgetModel : IExtensionInterface
{
public string Title { get; set; }
- public string Tags { get; set; }
+ public string? Tags { get; set; }
public string ContentType { get; set; }
- public string DefaultWidth { get; set; }
+ public string? DefaultWidth { get; set; }
public bool Enable { get; set; }
internal ByteArrayContent byteArray;
- public DashboardWidgetModel(string filePath, string contentType, string title, bool isEnable = false, string defaultWidth = null, string tags = null) :
+ public DashboardWidgetModel(string filePath, string contentType, string title, bool isEnable = false, string? defaultWidth = null, string? tags = null) :
this(File.OpenRead(filePath), contentType, title, isEnable, defaultWidth, tags)
{ }
- public DashboardWidgetModel(Stream stream, string contentType, string title, bool isEnable = false, string defaultWidth = null, string tags = null) :
+ public DashboardWidgetModel(Stream stream, string contentType, string title, bool isEnable = false, string? defaultWidth = null, string? tags = null) :
this(getBytes(stream), contentType, title, isEnable, defaultWidth, tags)
{ }
- public DashboardWidgetModel(byte[] bytes, string contentType, string title, bool isEnable = false, string defaultWidth = null, string tags = null) :
+ public DashboardWidgetModel(byte[] bytes, string contentType, string title, bool isEnable = false, string? defaultWidth = null, string? tags = null) :
this(getByteArray(bytes), contentType, title, isEnable, defaultWidth, tags)
{ }
- public DashboardWidgetModel(ByteArrayContent byteArray, string contentType, string title, bool isEnable = false, string defaultWidth = null, string tags = null)
+ public DashboardWidgetModel(ByteArrayContent byteArray, string contentType, string title, bool isEnable = false, string? defaultWidth = null, string? tags = null)
{
if (byteArray == null)
diff --git a/Contentstack.Management.Core/Models/Extension.cs b/Contentstack.Management.Core/Models/Extension.cs
index 7364ebf..8066147 100644
--- a/Contentstack.Management.Core/Models/Extension.cs
+++ b/Contentstack.Management.Core/Models/Extension.cs
@@ -10,11 +10,11 @@ namespace Contentstack.Management.Core.Models
public class Extension
{
internal Stack stack;
- public string Uid { get; set; }
+ public string? Uid { get; set; }
internal string resourcePath;
- internal Extension(Stack stack, string uid = null)
+ internal Extension(Stack stack, string? uid = null)
{
stack.ThrowIfAPIKeyEmpty();
@@ -55,7 +55,7 @@ public virtual ContentstackResponse Upload(IExtensionInterface model)
{
ThrowIfUidNotEmpty();
- var service = new UploadService(stack.client.serializer, stack, resourcePath, model);
+ var service = new UploadService(stack, resourcePath, model);
return stack.client.InvokeSync(service);
}
@@ -76,7 +76,7 @@ public virtual Task UploadAsync(IExtensionInterface model)
ThrowIfUidNotEmpty();
stack.ThrowIfNotLoggedIn();
- var service = new UploadService(stack.client.serializer, stack, resourcePath, model);
+ var service = new UploadService(stack, resourcePath, model);
return stack.client.InvokeAsync(service);
}
@@ -96,7 +96,7 @@ public virtual ContentstackResponse Create(ExtensionModel model)
{
ThrowIfUidNotEmpty();
- var service = new CreateUpdateService(stack.client.serializer, stack, resourcePath, model, "extension");
+ var service = new CreateUpdateService(stack, resourcePath, model, "extension");
return stack.client.InvokeSync(service);
}
@@ -117,7 +117,7 @@ public virtual Task CreateAsync(ExtensionModel model)
ThrowIfUidNotEmpty();
stack.ThrowIfNotLoggedIn();
- var service = new CreateUpdateService(stack.client.serializer, stack, resourcePath, model, "extension");
+ var service = new CreateUpdateService(stack, resourcePath, model, "extension");
return stack.client.InvokeAsync, ContentstackResponse>(service);
}
@@ -137,7 +137,7 @@ public virtual ContentstackResponse Update(ExtensionModel model)
{
ThrowIfUidEmpty();
- var service = new CreateUpdateService(stack.client.serializer, stack, resourcePath, model, "extension", "PUT");
+ var service = new CreateUpdateService(stack, resourcePath, model, "extension", "PUT");
return stack.client.InvokeSync(service);
}
@@ -153,12 +153,12 @@ public virtual ContentstackResponse Update(ExtensionModel model)
///
///
/// The .
- public virtual Task UpdateAsync(ExtensionModel model, ParameterCollection collection = null)
+ public virtual Task UpdateAsync(ExtensionModel model, ParameterCollection? collection = null)
{
stack.ThrowIfNotLoggedIn();
ThrowIfUidEmpty();
- var service = new CreateUpdateService(stack.client.serializer, stack, resourcePath, model, "extension", "PUT");
+ var service = new CreateUpdateService(stack, resourcePath, model, "extension", "PUT");
return stack.client.InvokeAsync, ContentstackResponse>(service);
}
@@ -173,12 +173,12 @@ public virtual Task UpdateAsync(ExtensionModel model, Para
///
///
/// The .
- public virtual ContentstackResponse Fetch(ParameterCollection collection = null)
+ public virtual ContentstackResponse Fetch(ParameterCollection? collection = null)
{
stack.ThrowIfNotLoggedIn();
ThrowIfUidEmpty();
- var service = new FetchDeleteService(stack.client.serializer, stack, resourcePath, collection: collection);
+ var service = new FetchDeleteService(stack, resourcePath, collection: collection);
return stack.client.InvokeSync(service);
}
@@ -193,12 +193,12 @@ public virtual ContentstackResponse Fetch(ParameterCollection collection = null)
///
///
/// The .
- public virtual Task FetchAsync(ParameterCollection collection = null)
+ public virtual Task FetchAsync(ParameterCollection? collection = null)
{
stack.ThrowIfNotLoggedIn();
ThrowIfUidEmpty();
- var service = new FetchDeleteService(stack.client.serializer, stack, resourcePath, collection: collection);
+ var service = new FetchDeleteService(stack, resourcePath, collection: collection);
return stack.client.InvokeAsync(service);
}
@@ -218,7 +218,7 @@ public virtual ContentstackResponse Delete()
stack.ThrowIfNotLoggedIn();
ThrowIfUidEmpty();
- var service = new FetchDeleteService(stack.client.serializer, stack, resourcePath, "DELETE");
+ var service = new FetchDeleteService(stack, resourcePath, "DELETE");
return stack.client.InvokeSync(service);
}
@@ -238,7 +238,7 @@ public virtual Task DeleteAsync()
stack.ThrowIfNotLoggedIn();
ThrowIfUidEmpty();
- var service = new FetchDeleteService(stack.client.serializer, stack, resourcePath, "DELETE");
+ var service = new FetchDeleteService(stack, resourcePath, "DELETE");
return stack.client.InvokeAsync(service);
}
#region Throw Error
diff --git a/Contentstack.Management.Core/Models/ExtensionModel.cs b/Contentstack.Management.Core/Models/ExtensionModel.cs
index 51f7a15..11df489 100644
--- a/Contentstack.Management.Core/Models/ExtensionModel.cs
+++ b/Contentstack.Management.Core/Models/ExtensionModel.cs
@@ -1,34 +1,33 @@
-using Newtonsoft.Json;
-using System.Collections.Generic;
+using System.Collections.Generic;
+using System.Text.Json.Serialization;
namespace Contentstack.Management.Core.Models
{
- [JsonObject(ItemNullValueHandling = NullValueHandling.Ignore)]
public class ExtensionModel
{
- [JsonProperty(propertyName: "title")]
+ [JsonPropertyName("title")]
public string? Title { get; set; }
- [JsonProperty(propertyName: "data_type")]
+ [JsonPropertyName("data_type")]
public string? DataType { get; set; }
- [JsonProperty(propertyName: "tags")]
+ [JsonPropertyName("tags")]
public List? Tags { get; set; }
- [JsonProperty(propertyName: "src")]
+ [JsonPropertyName("src")]
public string? Src { get; set; }
- [JsonProperty(propertyName: "srcdoc")]
+ [JsonPropertyName("srcdoc")]
public string? Srcdoc { get; set; }
- [JsonProperty(propertyName: "type")]
+ [JsonPropertyName("type")]
public string? Type { get; set; }
- [JsonProperty(propertyName: "config")]
+ [JsonPropertyName("config")]
public string? Config { get; set; }
- [JsonProperty(propertyName: "multiple")]
+ [JsonPropertyName("multiple")]
public bool Multiple { get; set; }
- [JsonProperty(propertyName: "scope")]
+ [JsonPropertyName("scope")]
public ExtensionScope? Scope { get; set; }
}
public class ExtensionScope
{
- [JsonProperty(propertyName: "content_types")]
+ [JsonPropertyName("content_types")]
public List? ContentTypes { get; set; }
}
}
diff --git a/Contentstack.Management.Core/Models/LabelModel.cs b/Contentstack.Management.Core/Models/LabelModel.cs
index 0a5f372..7db530a 100644
--- a/Contentstack.Management.Core/Models/LabelModel.cs
+++ b/Contentstack.Management.Core/Models/LabelModel.cs
@@ -1,16 +1,15 @@
using System.Collections.Generic;
-using Newtonsoft.Json;
+using System.Text.Json.Serialization;
namespace Contentstack.Management.Core.Models
{
- [JsonObject(ItemNullValueHandling = NullValueHandling.Ignore)]
public class LabelModel
{
- [JsonProperty(propertyName: "name")]
+ [JsonPropertyName("name")]
public string? Name { get; set; }
- [JsonProperty(propertyName: "parent")]
+ [JsonPropertyName("parent")]
public List? Parent { get; set; }
- [JsonProperty(propertyName: "content_types")]
+ [JsonPropertyName("content_types")]
public List? ContentTypes { get; set; }
}
}
diff --git a/Contentstack.Management.Core/Models/OAuthAppAuthorizationResponse.cs b/Contentstack.Management.Core/Models/OAuthAppAuthorizationResponse.cs
index e8fa02d..17a1454 100644
--- a/Contentstack.Management.Core/Models/OAuthAppAuthorizationResponse.cs
+++ b/Contentstack.Management.Core/Models/OAuthAppAuthorizationResponse.cs
@@ -1,5 +1,4 @@
-using System;
-using Newtonsoft.Json;
+using System.Text.Json.Serialization;
namespace Contentstack.Management.Core.Models
{
@@ -8,8 +7,7 @@ namespace Contentstack.Management.Core.Models
///
public class OAuthAppAuthorizationResponse
{
-
- [JsonProperty("data")]
+ [JsonPropertyName("data")]
public OAuthAppAuthorizationData[]? Data { get; set; }
}
@@ -18,20 +16,16 @@ public class OAuthAppAuthorizationResponse
///
public class OAuthAppAuthorizationData
{
-
- [JsonProperty("authorization_uid")]
+ [JsonPropertyName("authorization_uid")]
public string? AuthorizationUid { get; set; }
-
- [JsonProperty("user")]
+ [JsonPropertyName("user")]
public OAuthUser? User { get; set; }
}
-
public class OAuthUser
{
-
- [JsonProperty("uid")]
+ [JsonPropertyName("uid")]
public string? Uid { get; set; }
}
}
diff --git a/Contentstack.Management.Core/Models/OAuthResponse.cs b/Contentstack.Management.Core/Models/OAuthResponse.cs
index 5d5b1a0..187172c 100644
--- a/Contentstack.Management.Core/Models/OAuthResponse.cs
+++ b/Contentstack.Management.Core/Models/OAuthResponse.cs
@@ -1,5 +1,4 @@
-using System;
-using Newtonsoft.Json;
+using System.Text.Json.Serialization;
namespace Contentstack.Management.Core.Models
{
@@ -8,24 +7,19 @@ namespace Contentstack.Management.Core.Models
///
public class OAuthResponse
{
-
- [JsonProperty("access_token")]
+ [JsonPropertyName("access_token")]
public string? AccessToken { get; set; }
-
- [JsonProperty("refresh_token")]
+ [JsonPropertyName("refresh_token")]
public string? RefreshToken { get; set; }
-
- [JsonProperty("expires_in")]
+ [JsonPropertyName("expires_in")]
public int ExpiresIn { get; set; }
-
- [JsonProperty("organization_uid")]
+ [JsonPropertyName("organization_uid")]
public string? OrganizationUid { get; set; }
-
- [JsonProperty("user_uid")]
+ [JsonPropertyName("user_uid")]
public string? UserUid { get; set; }
}
}
diff --git a/Contentstack.Management.Core/Models/RoleModel.cs b/Contentstack.Management.Core/Models/RoleModel.cs
index f8c3de1..9e657b2 100644
--- a/Contentstack.Management.Core/Models/RoleModel.cs
+++ b/Contentstack.Management.Core/Models/RoleModel.cs
@@ -1,5 +1,6 @@
using System.Collections.Generic;
using System.Text.Json.Serialization;
+
namespace Contentstack.Management.Core.Models
{
public class RoleModel
@@ -26,7 +27,7 @@ public class Rule
public bool Restrict { get; }
}
- public class ContentTypeRules: Rule
+ public class ContentTypeRules : Rule
{
[JsonPropertyName("module")]
public string Module { get; } = "content_type";
diff --git a/Contentstack.Management.Core/Models/Stack.cs b/Contentstack.Management.Core/Models/Stack.cs
index 12d0352..18750a4 100644
--- a/Contentstack.Management.Core/Models/Stack.cs
+++ b/Contentstack.Management.Core/Models/Stack.cs
@@ -663,7 +663,6 @@ public GlobalField GlobalField(string? uid = null, string? apiVersion = null)
return new GlobalField(this, uid, apiVersion);
}
- /*
///