Skip to content

Commit

Permalink
[schema] better cookies, composite schemas
Browse files Browse the repository at this point in the history
  • Loading branch information
lispyclouds committed Jan 17, 2025
1 parent 85473db commit 5f7ddcd
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
3 changes: 2 additions & 1 deletion src/navi/impl.clj
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,8 @@
(apply merge-with into)
(wrap-map :path)
(wrap-map :query)
(wrap-map :header))
(wrap-map :header)
(wrap-map :cookie))
responses (-> (.getResponses op)
(update-kvs handle-response-key response->data))]
(cond-> {:handler (get handlers (.getOperationId op))}
Expand Down
5 changes: 4 additions & 1 deletion src/navi/transform.clj
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,10 @@
[(.getAnyOf schema) :or]

(< 0 (count (.getAllOf schema)))
[(.getAllOf schema) :and])]
[(.getAllOf schema) :and]

:else
(throw (IllegalArgumentException. "Unsupported composite schema. Use either anyOf, allOf")))]
(->> schemas
(map p/transform)
(into [compose-as]))))
Expand Down

0 comments on commit 5f7ddcd

Please sign in to comment.