From 9727ec34b731a1108f660dc2025d4ac290e32b60 Mon Sep 17 00:00:00 2001 From: Levi Murray Date: Sun, 3 May 2020 13:58:04 -0700 Subject: [PATCH] Update README.md --- README.md | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/README.md b/README.md index fd3f05c..8d6f040 100644 --- a/README.md +++ b/README.md @@ -516,6 +516,15 @@ config.swagger_docs = { thumbnail: { type: 'string', nullable: true } }, required: %w[id title] + }, + new_blog: { + type: 'object', + properties: { + title: { type: 'string' }, + content: { type: 'string', nullable: true }, + thumbnail: { type: 'string', format: 'binary', nullable: true } + }, + required: %w[title] } } } @@ -529,6 +538,8 @@ describe 'Blogs API' do post 'Creates a blog' do + parameter name: :new_blog, in: :body, schema: { '$ref' => '#/components/schemas/new_blog' } + response 422, 'invalid request' do schema '$ref' => '#/components/schemas/errors_object' ...