Goal
Provide an API for creating a Siren entity from a domain object via the use of annotations.
Example
@Entity()
class Person() {
@Property()
givenName: string;
@Property()
familyName: string;
}
const p = new Person();
p.givenName = 'Neville';
p.familyName = 'Longbottom';
const json = Siren.stringify(p);
// json => {
// "class": ["Person"],
// "properties": {
// "givenName": "Neville",
// "familyName": "Longbottom"
// }
// }
MVP
- Generate entity from class
- Use class name as entity's class
- Include class properties as entity properties
- Generate a self link
Future
- Links
- Actions
- Alias entity class
- Alias property names
Goal
Provide an API for creating a Siren entity from a domain object via the use of annotations.
Example
MVP
Future