Skip to content

Commit

Permalink
Merge pull request #2076 from gaeljw/gh2041
Browse files Browse the repository at this point in the history
docs: ✏️ Document how to hide input/output from OpenAPI
  • Loading branch information
adamw authored Apr 22, 2022
2 parents 0afe635 + 5399959 commit 1216c1a
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions doc/endpoint/ios.md
Original file line number Diff line number Diff line change
Expand Up @@ -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).

0 comments on commit 1216c1a

Please sign in to comment.