aboutsummaryrefslogtreecommitdiff
path: root/example.api
diff options
context:
space:
mode:
Diffstat (limited to 'example.api')
-rw-r--r--example.api19
1 files changed, 19 insertions, 0 deletions
diff --git a/example.api b/example.api
new file mode 100644
index 0000000..37e08d8
--- /dev/null
+++ b/example.api
@@ -0,0 +1,19 @@
+Forum.Models.Post
+ +glyphs <Array<String>>
+ -id <UUID>
+ -created_at <Date>
+ -parent_id <UUID>
+ -text <String>
+ -author <Author>
+ // Comments are also
+ // Allowed in the middle
+ ~>textUpdated(text <String>)
+ ->authorUpdated(author <Author>)
+ <~textWillUpdate(text <String>)
+ <-postWillRender(post <Forum.Models.Post>)
+ +>authorUpdated(author <Author>)
+ <+textWillUpdate(text <String>)
+ ::getAll(parent_id <UUID>) => Promise<Array<Forum.Models.Post>> #> NotFoundError,DisplayError
+ ::get(id <UUID>) => Promise<Forum.Models.Post>
+ #update(text <String>) => Promise<void>
+ #transform([transformer] <Function<T>(T) => boolean>)