From 53999590f8ff34bd761b660cfa21fb26f3b7d1af Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ga=C3=ABl=20Jourdan-Weil?= Date: Thu, 21 Apr 2022 19:37:12 +0200 Subject: [PATCH] =?UTF-8?q?docs:=20=E2=9C=8F=EF=B8=8F=20Document=20how=20t?= =?UTF-8?q?o=20hide=20input/output=20from=20OpenAPI?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- doc/endpoint/ios.md | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/doc/endpoint/ios.md b/doc/endpoint/ios.md index 4efc76d131..8a8777184b 100644 --- a/doc/endpoint/ios.md +++ b/doc/endpoint/ios.md @@ -240,6 +240,19 @@ A fixed status code can be specified using the `statusCode(code)` output. Unless specified otherwise, successful responses are returned with the `200 OK` status code, and errors with `400 Bad Request`. For exception and decode failure handling, see [error handling](../server/errors.md). +## OpenAPI description + +### Hidden input/output + +It's possible to hide an input/output from the OpenAPI description using following syntax: + +```scala mdoc:silent:reset +import sttp.tapir._ + +val acceptHeader: EndpointInput[String] = header[String]("Accept").schema(_.copy(hidden = true)) +``` + + ## Next Read on about [one-of mappings](oneof.md).