Skip to content
This repository was archived by the owner on Jan 11, 2021. It is now read-only.
This repository was archived by the owner on Jan 11, 2021. It is now read-only.

GetProjectMeta exception due to bad deserializing #9

@Siderite

Description

@Siderite

The API works, it has access to a lot of stuff (i.e. projects) but when I read the project meta I receive an object that has expand equal to "projects", but the projects list empty. The output of the API seems to be similar to the structure of the IssueCreateMeta class, except for a new entry "avatarUrls" that appears in the output, but not in the class.
"projects": [{
"self": "https://...",
"id": "12201",
"key": "GSI",
"name": "My Project",
"avatarUrls": {
"16x16": "https://.../jira/secure/projectavatar?size=small&pid=12201&avatarId=26010",
"48x48": "https://.../jira/secure/projectavatar?pid=12201&avatarId=26010"
},
"issuetypes": [...]

I have tried to add it in ProjectMeta as a list of AvatarUrl:
[DataContract]
[Serializable]
public class AvatarUrl
{
[DataMember(Name = "16x16")]
public string square16 { get; set; }
[DataMember(Name = "48x48")]
public string square48 { get; set; }
}
, but it didn't work.
The exception is:
System.ArgumentOutOfRangeException was unhandled by user code
HResult=-2146233086
Message=Index was out of range. Must be non-negative and less than the size of the collection.
Parameter name: index
Source=mscorlib
ParamName=index
StackTrace:
at System.ThrowHelper.ThrowArgumentOutOfRangeException()
at System.Collections.Generic.List`1.get_Item(Int32 index)
at AnotherJiraRestClient.JiraClient.GetProjectMeta(String projectKey) in c:!Projects\JiraLog4netAppender\AnotherJiraRestClient\JiraClient.cs:line 183

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions