Skip to content

Commit 5f7ddcd

Browse files
committed
[schema] better cookies, composite schemas
1 parent 85473db commit 5f7ddcd

File tree

2 files changed

+6
-2
lines changed

2 files changed

+6
-2
lines changed

src/navi/impl.clj

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -118,7 +118,8 @@
118118
(apply merge-with into)
119119
(wrap-map :path)
120120
(wrap-map :query)
121-
(wrap-map :header))
121+
(wrap-map :header)
122+
(wrap-map :cookie))
122123
responses (-> (.getResponses op)
123124
(update-kvs handle-response-key response->data))]
124125
(cond-> {:handler (get handlers (.getOperationId op))}

src/navi/transform.clj

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,10 @@
7777
[(.getAnyOf schema) :or]
7878

7979
(< 0 (count (.getAllOf schema)))
80-
[(.getAllOf schema) :and])]
80+
[(.getAllOf schema) :and]
81+
82+
:else
83+
(throw (IllegalArgumentException. "Unsupported composite schema. Use either anyOf, allOf")))]
8184
(->> schemas
8285
(map p/transform)
8386
(into [compose-as]))))

0 commit comments

Comments
 (0)