From 2f0f999ed3a3a1dc1fe0d1ad5f06786a87574614 Mon Sep 17 00:00:00 2001 From: Francois Perrad Date: Fri, 15 Oct 2010 16:24:37 +0200 Subject: graphical representation (UML Class Diagram) of the Rx schema. png <-- dot <-- lua-Coat --- uml/api.lua | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) create mode 100644 uml/api.lua (limited to 'uml/api.lua') diff --git a/uml/api.lua b/uml/api.lua new file mode 100644 index 0000000..16f187a --- /dev/null +++ b/uml/api.lua @@ -0,0 +1,29 @@ + +require 'Coat' +require 'Coat.Types' + +class 'Method' + +has._method = { is = 'ro', isa = 'string', required = true } +has.path = { is = 'ro', isa = 'string', required = true } +has.expected = { is = 'ro', isa = 'table' } +has.required = { is = 'ro', isa = 'table' } +has.optional = { is = 'ro', isa = 'table' } +has.base_url = { is = 'ro', isa = 'string' } +has.description = { is = 'ro', isa = 'string' } +has.authentication = { is = 'ro', isa = 'boolean' } +has.format = { is = 'ro', isa = 'table' } + + +class 'API' + +has.name = { is = 'ro', isa = 'string', required = true } +has.methods = { is = 'ro', isa = 'table', required = true } +has.base_url = { is = 'ro', isa = 'string' } +has.description = { is = 'ro', isa = 'string' } +has.authentication = { is = 'ro', isa = 'boolean' } +has.version = { is = 'ro', isa = 'string' } +has.authority = { is = 'ro', isa = 'string' } +has.format = { is = 'ro', isa = 'table' } +has.meta = { is = 'ro', isa = 'table' } + -- cgit v1.2.3