Skip to content

Commit

Permalink
Merge branch 'master' into feature/PP9-9203-consolidating-docs
Browse files Browse the repository at this point in the history
  • Loading branch information
Marek Sajna committed Oct 10, 2019
2 parents fc2d6ac + 01e327d commit 0cefab5
Show file tree
Hide file tree
Showing 3 changed files with 96 additions and 120 deletions.
104 changes: 48 additions & 56 deletions src/Picturepark.SDK.V1.Contract/Contracts.Generated.cs
Original file line number Diff line number Diff line change
Expand Up @@ -20133,16 +20133,8 @@ public static ShareContent FromJson(string data)
public partial class ShareBasicCreateRequest : ShareBaseCreateRequest
{
/// <summary>List of external mail recipients which are no Picturepark users.</summary>
[Newtonsoft.Json.JsonProperty("recipientsEmail", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)]
public System.Collections.Generic.ICollection<UserEmail> RecipientsEmail { get; set; }

/// <summary>List of internal recipients which are Picturepark users.</summary>
[Newtonsoft.Json.JsonProperty("recipientsUser", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)]
public System.Collections.Generic.ICollection<User> RecipientsUser { get; set; }

/// <summary>List of user roles. All assignees of these roles receive the share.</summary>
[Newtonsoft.Json.JsonProperty("recipientsGroup", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)]
public System.Collections.Generic.ICollection<UserRole> RecipientsGroup { get; set; }
[Newtonsoft.Json.JsonProperty("recipientEmails", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)]
public System.Collections.Generic.ICollection<UserEmail> RecipientEmails { get; set; }

/// <summary>System language used for share (mail and detail page). en or de.</summary>
[Newtonsoft.Json.JsonProperty("languageCode", Required = Newtonsoft.Json.Required.Always)]
Expand All @@ -20161,52 +20153,6 @@ public static ShareBasicCreateRequest FromJson(string data)

}

/// <summary>Represents a user role, which associates users with user rights.</summary>
[System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.0.23.0 (Newtonsoft.Json v11.0.0.0)")]
public partial class UserRole : UserRoleEditable
{
/// <summary>User role ID.</summary>
[Newtonsoft.Json.JsonProperty("id", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)]
public string Id { get; set; }

public string ToJson()
{
return Newtonsoft.Json.JsonConvert.SerializeObject(this);
}

public static UserRole FromJson(string data)
{
return Newtonsoft.Json.JsonConvert.DeserializeObject<UserRole>(data);
}

}

/// <summary>Represents a user role, which associates users with user rights.</summary>
[System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.0.23.0 (Newtonsoft.Json v11.0.0.0)")]
public partial class UserRoleEditable
{
/// <summary>Language specific user role names.</summary>
[Newtonsoft.Json.JsonProperty("names", Required = Newtonsoft.Json.Required.Always)]
[System.ComponentModel.DataAnnotations.Required]
public TranslatedStringDictionary Names { get; set; } = new TranslatedStringDictionary();

/// <summary>All user rights for this user role.</summary>
[Newtonsoft.Json.JsonProperty("userRights", Required = Newtonsoft.Json.Required.Always, ItemConverterType = typeof(Newtonsoft.Json.Converters.StringEnumConverter))]
[System.ComponentModel.DataAnnotations.Required]
public System.Collections.Generic.ICollection<UserRight> UserRights { get; set; } = new System.Collections.Generic.List<UserRight>();

public string ToJson()
{
return Newtonsoft.Json.JsonConvert.SerializeObject(this);
}

public static UserRoleEditable FromJson(string data)
{
return Newtonsoft.Json.JsonConvert.DeserializeObject<UserRoleEditable>(data);
}

}

/// <summary>Create request for embed share</summary>
[System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.0.23.0 (Newtonsoft.Json v11.0.0.0)")]
public partial class ShareEmbedCreateRequest : ShareBaseCreateRequest
Expand Down Expand Up @@ -21509,6 +21455,52 @@ public static UserUpdateRequest FromJson(string data)

}

/// <summary>Represents a user role, which associates users with user rights.</summary>
[System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.0.23.0 (Newtonsoft.Json v11.0.0.0)")]
public partial class UserRole : UserRoleEditable
{
/// <summary>User role ID.</summary>
[Newtonsoft.Json.JsonProperty("id", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)]
public string Id { get; set; }

public string ToJson()
{
return Newtonsoft.Json.JsonConvert.SerializeObject(this);
}

public static UserRole FromJson(string data)
{
return Newtonsoft.Json.JsonConvert.DeserializeObject<UserRole>(data);
}

}

/// <summary>Represents a user role, which associates users with user rights.</summary>
[System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.0.23.0 (Newtonsoft.Json v11.0.0.0)")]
public partial class UserRoleEditable
{
/// <summary>Language specific user role names.</summary>
[Newtonsoft.Json.JsonProperty("names", Required = Newtonsoft.Json.Required.Always)]
[System.ComponentModel.DataAnnotations.Required]
public TranslatedStringDictionary Names { get; set; } = new TranslatedStringDictionary();

/// <summary>All user rights for this user role.</summary>
[Newtonsoft.Json.JsonProperty("userRights", Required = Newtonsoft.Json.Required.Always, ItemConverterType = typeof(Newtonsoft.Json.Converters.StringEnumConverter))]
[System.ComponentModel.DataAnnotations.Required]
public System.Collections.Generic.ICollection<UserRight> UserRights { get; set; } = new System.Collections.Generic.List<UserRight>();

public string ToJson()
{
return Newtonsoft.Json.JsonConvert.SerializeObject(this);
}

public static UserRoleEditable FromJson(string data)
{
return Newtonsoft.Json.JsonConvert.DeserializeObject<UserRoleEditable>(data);
}

}

/// <summary>Holds information needed for user creation.</summary>
[System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.0.23.0 (Newtonsoft.Json v11.0.0.0)")]
public partial class UserCreateRequest
Expand Down
4 changes: 2 additions & 2 deletions src/Picturepark.SDK.V1.Tests/Clients/ShareTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,7 @@ public async Task ShouldCreateBasicShare()
Description = "Description of Basic share aaa",
ExpirationDate = new DateTime(2020, 12, 31),
Name = "Basic share aaa",
RecipientsEmail = new List<UserEmail>
RecipientEmails = new List<UserEmail>
{
_fixture.Configuration.EmailRecipient
},
Expand Down Expand Up @@ -158,7 +158,7 @@ public async Task ShouldCreateBasicShareWithWrongContentsAndFail()
Description = "Description of share with wrong content ids",
ExpirationDate = new DateTime(2020, 12, 31),
Name = "Share with wrong content ids",
RecipientsEmail = new List<UserEmail>
RecipientEmails = new List<UserEmail>
{
_fixture.Configuration.EmailRecipient
},
Expand Down
108 changes: 46 additions & 62 deletions swagger/PictureparkSwagger.json
Original file line number Diff line number Diff line change
Expand Up @@ -36292,30 +36292,14 @@
"languageCode"
],
"properties": {
"recipientsEmail": {
"recipientEmails": {
"type": "array",
"description": "List of external mail recipients which are no Picturepark users.",
"nullable": true,
"items": {
"$ref": "#/components/schemas/UserEmail"
}
},
"recipientsUser": {
"type": "array",
"description": "List of internal recipients which are Picturepark users.",
"nullable": true,
"items": {
"$ref": "#/components/schemas/User"
}
},
"recipientsGroup": {
"type": "array",
"description": "List of user roles. All assignees of these roles receive the share.",
"nullable": true,
"items": {
"$ref": "#/components/schemas/UserRole"
}
},
"languageCode": {
"type": "string",
"description": "System language used for share (mail and detail page). en or de.",
Expand All @@ -36325,51 +36309,6 @@
}
]
},
"UserRole": {
"allOf": [
{
"$ref": "#/components/schemas/UserRoleEditable"
},
{
"type": "object",
"description": "Represents a user role, which associates users with user rights.",
"additionalProperties": false,
"properties": {
"id": {
"type": "string",
"description": "User role ID.",
"nullable": true
}
}
}
]
},
"UserRoleEditable": {
"type": "object",
"description": "Represents a user role, which associates users with user rights.",
"additionalProperties": false,
"required": [
"names",
"userRights"
],
"properties": {
"names": {
"description": "Language specific user role names.",
"oneOf": [
{
"$ref": "#/components/schemas/TranslatedStringDictionary"
}
]
},
"userRights": {
"type": "array",
"description": "All user rights for this user role.",
"items": {
"$ref": "#/components/schemas/UserRight"
}
}
}
},
"ShareEmbedCreateRequest": {
"allOf": [
{
Expand Down Expand Up @@ -37854,6 +37793,51 @@
}
]
},
"UserRole": {
"allOf": [
{
"$ref": "#/components/schemas/UserRoleEditable"
},
{
"type": "object",
"description": "Represents a user role, which associates users with user rights.",
"additionalProperties": false,
"properties": {
"id": {
"type": "string",
"description": "User role ID.",
"nullable": true
}
}
}
]
},
"UserRoleEditable": {
"type": "object",
"description": "Represents a user role, which associates users with user rights.",
"additionalProperties": false,
"required": [
"names",
"userRights"
],
"properties": {
"names": {
"description": "Language specific user role names.",
"oneOf": [
{
"$ref": "#/components/schemas/TranslatedStringDictionary"
}
]
},
"userRights": {
"type": "array",
"description": "All user rights for this user role.",
"items": {
"$ref": "#/components/schemas/UserRight"
}
}
}
},
"UserCreateRequest": {
"type": "object",
"description": "Holds information needed for user creation.",
Expand Down

0 comments on commit 0cefab5

Please sign in to comment.