diff --git a/README.md b/README.md index 247418d..2b95fbf 100644 --- a/README.md +++ b/README.md @@ -33,8 +33,8 @@ __NOTE__: It's early days so please be gentle when reporting issues :) As author path '/blogs' do post 'creates a new blog' do - consumes 'application/json' operation_description 'Detailed implementation notes for the create a new blog API endpoint' + consumes 'application/json' parameter :blog, in: :body, schema: { type: :object, properties: { diff --git a/spec/dummy/spec/integration/blogs_spec.rb b/spec/dummy/spec/integration/blogs_spec.rb index 5190797..27ce6ad 100644 --- a/spec/dummy/spec/integration/blogs_spec.rb +++ b/spec/dummy/spec/integration/blogs_spec.rb @@ -5,9 +5,9 @@ describe 'Blogs API', swagger_doc: 'v1/swagger.json' do path '/blogs' 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' 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: { :type => :object, :properties => { @@ -38,8 +38,8 @@ describe 'Blogs API', swagger_doc: 'v1/swagger.json' do path '/blogs/{id}' 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' + produces 'application/json' parameter :id, :in => :path, :type => :string response '200', 'blog found' do diff --git a/spec/swagger_rails/rspec/formatter_spec.rb b/spec/swagger_rails/rspec/formatter_spec.rb index 17f9e54..db34cad 100644 --- a/spec/swagger_rails/rspec/formatter_spec.rb +++ b/spec/swagger_rails/rspec/formatter_spec.rb @@ -9,9 +9,9 @@ RSpec.describe ::SwaggerRails::RSpec::Formatter do RSpec.describe('Ping API', swagger_doc: 'v1_api.json') do path('/ping') do post('checks if site is alive') do + operation_description('A very long description') consumes('application/json') produces('application/json') - operation_description('A very long description') response('200', '(OK) Site up and running') do run_test! end