diff options
Diffstat (limited to 'src/defendpoint.lisp')
-rw-r--r-- | src/defendpoint.lisp | 26 |
1 files changed, 14 insertions, 12 deletions
diff --git a/src/defendpoint.lisp b/src/defendpoint.lisp index 872c336..0ac9ec9 100644 --- a/src/defendpoint.lisp +++ b/src/defendpoint.lisp @@ -60,8 +60,9 @@ PART is either (getf kwargs :documentation ""))))) (defun expand-endpoint-class - (name method pathspec handle return + (name method pathspec handle &key + return supers parameters properties @@ -129,9 +130,9 @@ PART is either (:@ supers (:? <supers>)) (:@ method <method>) (:@ pathspec <pathspec>) - (:@ return (:? <return>)) - (:@ params (:? <parameters>)) - (:@ props (:? <properties>)) + ; (:@ return (:? <return>)) +; (:@ params (:? <parameters>)) +; (:@ props (:? <properties>)) (:@ options (:* <option>)) (:@ handle <handle>) (:eof)) @@ -140,10 +141,10 @@ PART is either method pathspec handle - return +; return :supers supers - :parameters params - :properties props +; :parameters params +; :properties props (a:alist-plist options))) (<supers> :match (:seq (:or= :using :extends) (:+ <classname>)) @@ -154,7 +155,7 @@ PART is either (<method> :match (:or= :get :post :put :patch :head :delete)) (<pathspec> - :match (:seq (:or= :to :from :at :route) (:+ <pathpart>)) + :match (:seq (:or= :to :route) (:+ <pathpart>)) :then second) (<pathpart> :match (:item) @@ -162,25 +163,26 @@ PART is either :note "REGEX or (KWD REGEX &optional PARSER)") (<parameters> :match (:seq (:= :parameters) (:+ <param>)) - :then second) + :then (cons :parameters (second <parameters>))) (<param> :match (:item) :if parameter-spec-p :note "(NAME TYPE &optional DOCSTRING)") (<properties> :match (:seq (:= :properties) (:+ <prop>)) - :then second) + :then (cons :properties (second <properties>))) (<prop> :match (:item) :if property-spec-p :note "(NAME TYPE &key DEFAULT DOCSTRING)") (<option> - :match (:or <doc> <metaclass> <var> + :match (:or <return> <parameters> <properties> + <doc> <metaclass> <var> <authenticate> <authorize>)) (<return> :match (:seq (:= :returns) (:@ mimetype (:item))) :if (stringp mimetype) - :then second + :then (cons :return (second <return>)) :note "The mimetype returned from this endpoint.") (<doc> :match (:seq (:= :documentation) (:@ doc (:item))) |