mirror of
https://github.com/ditkrg/rswag.git
synced 2026-01-23 06:16:42 +00:00
Update README.md
This commit is contained in:
parent
7ceedab4cb
commit
9727ec34b7
11
README.md
11
README.md
@ -516,6 +516,15 @@ config.swagger_docs = {
|
|||||||
thumbnail: { type: 'string', nullable: true }
|
thumbnail: { type: 'string', nullable: true }
|
||||||
},
|
},
|
||||||
required: %w[id title]
|
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
|
post 'Creates a blog' do
|
||||||
|
|
||||||
|
parameter name: :new_blog, in: :body, schema: { '$ref' => '#/components/schemas/new_blog' }
|
||||||
|
|
||||||
response 422, 'invalid request' do
|
response 422, 'invalid request' do
|
||||||
schema '$ref' => '#/components/schemas/errors_object'
|
schema '$ref' => '#/components/schemas/errors_object'
|
||||||
...
|
...
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user