# In a POST request: ... parameters: - in: body name: body schema: $ref: '#/definitions/animal' required: true ... # In a resonse: ... responses: 200: description: animal response schema: $ref: '#/definitions/animal' ... # and then create the animal definition: definitions: animal: description: animal properties: animalid: description: The animal ID type: integer animalname: description: The animal name type: string type: object required: [ 'animalid', 'animalname' ]