Skip to content

Instantly share code, notes, and snippets.

@glennblock
Forked from anonymous/gist:4367099
Last active December 10, 2015 02:19
Show Gist options
  • Save glennblock/4367210 to your computer and use it in GitHub Desktop.
Save glennblock/4367210 to your computer and use it in GitHub Desktop.
namespace IssueDOM
{
public class Issue
{
public string Title { get; set; }
public string Description { get; set; }
public string State { get; set; }
//another option instead of generic link / rel is to just model them into the domain, for example for people you could
have a Person entity with the properties of a person. The spec defines what that means.
public Person[] People { get; set; }
//Isn't the fact that it is there a proof it's available?
public Link[] StateTransitions { get; set; }
public string[] Tags { get; set; } // Simple boolean tags
//don't like this name. If it's category, let's just call it category
public Category[] Categories { get; set; } // Selected values with a predefined domain
//can we call this just properties?
public KeyValuePair<string, string> Properties { get; set; } // Arbitrary key value pairs
public string[] Comments { get; set; }
public Event[] History { get; set; }
public Document[] Documents { get; set; }
}
//do we really need this at all. If we are making a new media type let's just back links in a domain specific fashion.
public class Link {
public string Rel { get; set; }
public string Href { get; set; }
public string Title { get; set; }
}
public class Comment {
public Link Author { get; set; }
public string Text { get; set; }
}
public class Category
{
public string Name { get; set; }
public string Value { get; set; }
public Link Domain { get; set; }
}
public class Event {
public DateTime When { get; set; }
public Link Who { get; set; }
public string What { get; set; }
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment