Merge pull request #312 from levidavidmurray/master

Update README.md
This commit is contained in:
Greg Myers 2020-08-21 17:07:12 +01:00 committed by GitHub
commit 6133179aa5
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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'
...