In this lesson, you will learn how to define HTTP POST operations for your Todo API server using Swagger. Creating the endpoint, passing the todo in the request body, and parsing the todo are all demonstrated.
You demonstrate how to send an object (i.e. a Todo) in a POST request, by using a schema and $ref to the definition.
How do you describe, in the YAML, just a simple string in the POST body, rather than a schema?
(Pardon me if you cover this in a later video)
Hi Raphi, This should work for you:
responses:
'200':
description: sample description
schema:
type: string