From 5d0bce1242fe19003629f6fddd7ff97100cac540 Mon Sep 17 00:00:00 2001 From: Joel Kaasinen Date: Mon, 28 Aug 2023 17:49:23 +0300 Subject: [PATCH] doc: clarify :content-types in example/openapi --- examples/openapi/src/example/server.clj | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/examples/openapi/src/example/server.clj b/examples/openapi/src/example/server.clj index 9a1227a2..71233481 100644 --- a/examples/openapi/src/example/server.clj +++ b/examples/openapi/src/example/server.clj @@ -29,7 +29,6 @@ ["/pizza" {:get {:summary "Fetch a pizza | Multiple content-types, multiple examples" - :content-types ["application/json" "application/edn"] :responses {200 {:content {"application/json" {:description "Fetch a pizza as json" :schema [:map [:color :keyword] @@ -51,7 +50,6 @@ :body {:color :red :pineapple true}})} :post {:summary "Create a pizza | Multiple content-types, multiple examples" - :content-types ["application/json" "application/edn"] :request {:content {"application/json" {:description "Create a pizza using json" :schema [:map [:color :keyword] @@ -64,6 +62,8 @@ [:pineapple :boolean]] :examples {:purple {:value (pr-str {:color :purple :pineapple false})}}}}} + ;; Need to list content types explicitly because we use :default in :responses + :content-types ["application/json" "application/edn"] :responses {200 {:content {:default {:description "Success" :schema [:map [:success :boolean]] :example {:success true}}}}}