From fc132f3a928d0a78e5a852a0a0001ef5f0f1bca5 Mon Sep 17 00:00:00 2001 From: Joel Kaasinen Date: Thu, 28 Nov 2024 09:56:02 +0200 Subject: [PATCH] doc: swagger reusable schema definitions supported only for malli --- doc/ring/swagger.md | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/doc/ring/swagger.md b/doc/ring/swagger.md index cece12089..05b2e4a7a 100644 --- a/doc/ring/swagger.md +++ b/doc/ring/swagger.md @@ -286,7 +286,17 @@ Example with: ; ("/common/ping" "/one/ping" "/two/ping" "/two/deep/ping") ``` -### TODO +## Reusable schema definitions + +Swagger supports having reusable schema definitions under the +`"definitions"` key. These can be reused in different parts of +swagger.json using the `"$ref": "#/definitions/Foo"` syntax. + +Reusable schema objects are generated for Malli `:ref`s and vars. +Currently (as of 0.7.2), reusable schema objects are **not** generated +for Plumatic Schema or Spec. + +## TOD * ClojureScript * example for [Macchiato](https://github.com/macchiato-framework)