minor reordering for readability

This commit is contained in:
richie 2016-08-19 15:22:33 -07:00
parent 4a025309aa
commit 19beb9e34d
3 changed files with 4 additions and 4 deletions

View File

@ -33,8 +33,8 @@ __NOTE__: It's early days so please be gentle when reporting issues :) As author
path '/blogs' do path '/blogs' do
post 'creates a new blog' do post 'creates a new blog' do
consumes 'application/json'
operation_description 'Detailed implementation notes for the create a new blog API endpoint' operation_description 'Detailed implementation notes for the create a new blog API endpoint'
consumes 'application/json'
parameter :blog, in: :body, schema: { parameter :blog, in: :body, schema: {
type: :object, type: :object,
properties: { properties: {

View File

@ -5,9 +5,9 @@ describe 'Blogs API', swagger_doc: 'v1/swagger.json' do
path '/blogs' do path '/blogs' do
post 'creates a new blog' do post 'creates a new blog' do
operation_description 'Creates a new blog. You can provide detailed description here which will show up in Implementation Notes.'
consumes 'application/json' consumes 'application/json'
produces 'application/json' produces 'application/json'
operation_description 'Creates a new blog. You can provide detailed description here which will show up in Implementation Notes.'
parameter :blog, :in => :body, schema: { parameter :blog, :in => :body, schema: {
:type => :object, :type => :object,
:properties => { :properties => {
@ -38,8 +38,8 @@ describe 'Blogs API', swagger_doc: 'v1/swagger.json' do
path '/blogs/{id}' do path '/blogs/{id}' do
get 'retrieves a specific blog' do get 'retrieves a specific blog' do
produces 'application/json'
operation_description 'For the id passed in the path, it searches and retrieves a blog against that id. If blog not found it returns a 404' operation_description 'For the id passed in the path, it searches and retrieves a blog against that id. If blog not found it returns a 404'
produces 'application/json'
parameter :id, :in => :path, :type => :string parameter :id, :in => :path, :type => :string
response '200', 'blog found' do response '200', 'blog found' do

View File

@ -9,9 +9,9 @@ RSpec.describe ::SwaggerRails::RSpec::Formatter do
RSpec.describe('Ping API', swagger_doc: 'v1_api.json') do RSpec.describe('Ping API', swagger_doc: 'v1_api.json') do
path('/ping') do path('/ping') do
post('checks if site is alive') do post('checks if site is alive') do
operation_description('A very long description')
consumes('application/json') consumes('application/json')
produces('application/json') produces('application/json')
operation_description('A very long description')
response('200', '(OK) Site up and running') do response('200', '(OK) Site up and running') do
run_test! run_test!
end end