From 2e29ddc1172fd549c2ecf235af7f580826a0147f Mon Sep 17 00:00:00 2001 From: Keebler408 <85420839+Keebler408@users.noreply.github.com> Date: Sun, 11 Jul 2021 18:07:46 -0500 Subject: [PATCH] Add response title information --- docs/spec-explained/responses.md | 3 +++ 1 file changed, 3 insertions(+) diff --git a/docs/spec-explained/responses.md b/docs/spec-explained/responses.md index b003cca8..878756e5 100644 --- a/docs/spec-explained/responses.md +++ b/docs/spec-explained/responses.md @@ -76,6 +76,8 @@ The `schema` keyword is used to describe the response body. A schema can define: * a primitive such as a number or string – used for plain text responses, * `file` (see [below](#response-that-returns-a-file)). +Optionally, `schema` can define a `title` with a descriptive name for the response type. `title` allows code generators to specify a meaningful result type name instead of generic names like result1. + Schema can be defined inline in the operation: ``` @@ -83,6 +85,7 @@ Schema can be defined inline in the operation: 200: description: A User object schema: + title: GetUserResponse type: object properties: id: