fix invalid swagger json
CI / Test + coverage (push) Successful in 14s

This commit is contained in:
2026-09-19 06:22:49 -09:00
parent 2fcdb17fdd
commit 4e0ddb601d
2 changed files with 15 additions and 2 deletions
+3 -1
View File
@@ -22,7 +22,9 @@
(deftest swagger-spec-test
(let [resp (request :get "/swagger.json")]
(is (= 200 (:status resp)))
(is (re-find #"/api/ping" (slurp (:body resp))))))
(is (re-find #"/api/ping" (slurp (:body resp))))
(is (not (re-find #"\"definitions\":null" (slurp (:body (request :get "/swagger.json")))))
"a null `definitions` makes the spec invalid Swagger 2.0")))
(deftest unknown-route-test
(is (= 404 (:status (request :get "/nope")))))