prepare 0.27.0 (#598)
- updates dependencies - makes rubocop 0.48 happy
This commit is contained in:
		
							parent
							
								
									7b18dc9a2b
								
							
						
					
					
						commit
						1ede5c4f7f
					
				|  | @ -20,3 +20,6 @@ Metrics/MethodLength: | |||
| 
 | ||||
| Style/IndentHash: | ||||
|   EnforcedStyle: consistent | ||||
| 
 | ||||
| Style/FileName: | ||||
|   Enabled: false | ||||
|  |  | |||
|  | @ -48,15 +48,9 @@ Style/ClassVars: | |||
| Style/Documentation: | ||||
|   Enabled: false | ||||
| 
 | ||||
| # Offense count: 5 | ||||
| # Configuration parameters: ExpectMatchingDefinition, Regex, IgnoreExecutableScripts. | ||||
| Style/FileName: | ||||
| Style/MixinGrouping: | ||||
|   Exclude: | ||||
|     - 'lib/grape-swagger.rb' | ||||
|     - 'spec/swagger_v2/api_swagger_v2_definitions-models_spec.rb' | ||||
|     - 'spec/swagger_v2/api_swagger_v2_format-content_type_spec.rb' | ||||
|     - 'spec/swagger_v2/api_swagger_v2_type-format_spec.rb' | ||||
|     - 'spec/swagger_v2/grape-swagger_spec.rb' | ||||
|     - spec/**/* | ||||
| 
 | ||||
| # Offense count: 1 | ||||
| # Cop supports --auto-correct. | ||||
|  |  | |||
|  | @ -10,7 +10,7 @@ after_success: | |||
|   - bundle exec danger | ||||
| 
 | ||||
| rvm: | ||||
|   - 2.4.0 | ||||
|   - 2.4.1 | ||||
|   - 2.3.3 | ||||
| 
 | ||||
| env: | ||||
|  |  | |||
							
								
								
									
										12
									
								
								CHANGELOG.md
								
								
								
								
							
							
						
						
									
										12
									
								
								CHANGELOG.md
								
								
								
								
							|  | @ -2,6 +2,16 @@ | |||
| 
 | ||||
| #### Features | ||||
| 
 | ||||
| * Your contribution here. | ||||
| 
 | ||||
| #### Fixes | ||||
| 
 | ||||
| * Your contribution here. | ||||
| 
 | ||||
| ###  0.27.0 (March 27, 2014) | ||||
| 
 | ||||
| #### Features | ||||
| 
 | ||||
| * [#583](https://github.com/ruby-grape/grape-swagger/pull/583): Issue #582: document file response - [@LeFnord](https://github.com/LeFnord). | ||||
| * [#588](https://github.com/ruby-grape/grape-swagger/pull/588): Allow extension keys in Info object - [@mattyr](https://github.com/mattyr). | ||||
| * [#589](https://github.com/ruby-grape/grape-swagger/pull/589): Allow overriding tag definitions in Info object - [@mattyr](https://github.com/mattyr). | ||||
|  | @ -17,7 +27,7 @@ | |||
| 
 | ||||
| * Your contribution here. | ||||
| 
 | ||||
| ### 0.26.1 (February 3, 2014) | ||||
| ### 0.26.1 (February 3, 2017) | ||||
| 
 | ||||
| #### Features | ||||
| 
 | ||||
|  |  | |||
|  | @ -1 +1,3 @@ | |||
| # frozen_string_literal: true | ||||
| 
 | ||||
| danger.import_dangerfile(gem: 'ruby-grape-danger') | ||||
|  |  | |||
							
								
								
									
										6
									
								
								Gemfile
								
								
								
								
							
							
						
						
									
										6
									
								
								Gemfile
								
								
								
								
							|  | @ -1,4 +1,5 @@ | |||
| # frozen_string_literal: true | ||||
| 
 | ||||
| source 'http://rubygems.org' | ||||
| 
 | ||||
| ruby RUBY_VERSION | ||||
|  | @ -24,11 +25,12 @@ group :development, :test do | |||
|   gem 'rake' | ||||
|   gem 'rdoc' | ||||
|   gem 'rspec', '~> 3.0' | ||||
|   gem 'rubocop', '~> 0.46' | ||||
|   gem 'rubocop', '~> 0.47' | ||||
| end | ||||
| 
 | ||||
| group :test do | ||||
|   gem 'coveralls', require: false | ||||
|   gem 'grape-entity' | ||||
|   gem 'grape-entity', '~>0.5' | ||||
|   gem 'grape-swagger-entity' | ||||
|   gem 'ruby-grape-danger', '~> 0.1.1', require: false | ||||
|   gem 'simplecov', require: false | ||||
|  |  | |||
|  | @ -49,14 +49,9 @@ grape-swagger | swagger spec | grape                   | grape-entity | represen | |||
| --------------|--------------|-------------------------|--------------|---------------| | ||||
| 0.10.5        |     1.2      | >= 0.10.0 ... <= 0.14.0 |  < 0.5.0     | n/a           | | ||||
| 0.11.0        |     1.2      |               >= 0.16.2 |  < 0.5.0     | n/a           | | ||||
| 0.20.1        |     2.0      | >= 0.12.0 ... <= 0.14.0 | <= 0.5.1     | n/a           | | ||||
| 0.20.3        |     2.0      | >= 0.12.0 ... ~> 0.16.2 | ~> 0.5.1     | n/a           | | ||||
| 0.21.0        |     2.0      | >= 0.12.0 ... <= 0.16.2 | <= 0.5.1     | >= 2.4.1      | | ||||
| 0.23.0        |     2.0      | >= 0.12.0 ... <= 0.17.0 | <= 0.5.1     | >= 2.4.1      | | ||||
| 0.24.0        |     2.0      | >= 0.12.0 ... <= 0.18.0 | <= 0.5.1     | >= 2.4.1      | | ||||
| 0.25.0        |     2.0      | >= 0.14.0 ... <= 0.18.0 | <= 0.5.2     | >= 2.4.1      | | ||||
| 0.25.2        |     2.0      | >= 0.14.0 ... <= 0.18.0 | <= 0.6.0     | >= 2.4.1      | | ||||
| 0.26.0        |     2.0      | >= 0.16.2               | <= 0.6.1     | >= 2.4.1      | | ||||
| 0.27.0        |     2.0      | >= 0.16.2               | => 0.5.0     | >= 2.4.1      | | ||||
| 
 | ||||
| <a name="swagger-spec" /> | ||||
| ## Swagger-Spec | ||||
|  |  | |||
							
								
								
									
										2
									
								
								Rakefile
								
								
								
								
							
							
						
						
									
										2
									
								
								Rakefile
								
								
								
								
							|  | @ -18,4 +18,4 @@ RSpec::Core::RakeTask.new(:spec) | |||
| require 'rubocop/rake_task' | ||||
| RuboCop::RakeTask.new(:rubocop) | ||||
| 
 | ||||
| task default: [:spec, :rubocop] | ||||
| task default: %i(spec rubocop) | ||||
|  |  | |||
|  | @ -1,4 +1,5 @@ | |||
| # frozen_string_literal: true | ||||
| 
 | ||||
| $LOAD_PATH.push File.expand_path('../lib', __FILE__) | ||||
| require 'grape-swagger/version' | ||||
| 
 | ||||
|  |  | |||
|  | @ -1,4 +1,5 @@ | |||
| # frozen_string_literal: true | ||||
| 
 | ||||
| require 'grape' | ||||
| 
 | ||||
| require 'grape-swagger/version' | ||||
|  | @ -107,7 +108,7 @@ module Grape | |||
|               ns.options[:swagger][:nested] != false | ||||
|           end | ||||
| 
 | ||||
|           parent_standalone_namespaces = standalone_namespaces.reject { |ns_name, _| !name.start_with?(ns_name) } | ||||
|           parent_standalone_namespaces = standalone_namespaces.select { |ns_name, _| name.start_with?(ns_name) } | ||||
|           # add only to the main route | ||||
|           # if the namespace is not within any other namespace appearing as standalone resource | ||||
|           # rubocop:disable Style/Next | ||||
|  |  | |||
|  | @ -1,4 +1,5 @@ | |||
| # frozen_string_literal: true | ||||
| 
 | ||||
| require 'grape-swagger/doc_methods/status_codes' | ||||
| require 'grape-swagger/doc_methods/produces_consumes' | ||||
| require 'grape-swagger/doc_methods/data_type' | ||||
|  | @ -38,7 +39,7 @@ module GrapeSwagger | |||
|       class_variables_from(options) | ||||
| 
 | ||||
|       if formatter | ||||
|         [:format, :default_format, :default_error_formatter].each do |method| | ||||
|         %i(format default_format default_error_formatter).each do |method| | ||||
|           send(method, formatter) | ||||
|         end | ||||
|       end | ||||
|  |  | |||
|  | @ -1,4 +1,5 @@ | |||
| # frozen_string_literal: true | ||||
| 
 | ||||
| module GrapeSwagger | ||||
|   module DocMethods | ||||
|     class BuildModelDefinition | ||||
|  |  | |||
|  | @ -1,4 +1,5 @@ | |||
| # frozen_string_literal: true | ||||
| 
 | ||||
| module GrapeSwagger | ||||
|   module DocMethods | ||||
|     class DataType | ||||
|  |  | |||
|  | @ -1,4 +1,5 @@ | |||
| # frozen_string_literal: true | ||||
| 
 | ||||
| module GrapeSwagger | ||||
|   module DocMethods | ||||
|     class Extensions | ||||
|  |  | |||
|  | @ -1,4 +1,5 @@ | |||
| # frozen_string_literal: true | ||||
| 
 | ||||
| module GrapeSwagger | ||||
|   module DocMethods | ||||
|     class Headers | ||||
|  |  | |||
|  | @ -1,4 +1,5 @@ | |||
| # frozen_string_literal: true | ||||
| 
 | ||||
| module GrapeSwagger | ||||
|   module DocMethods | ||||
|     class MoveParams | ||||
|  | @ -197,7 +198,7 @@ module GrapeSwagger | |||
|         end | ||||
| 
 | ||||
|         def property_keys | ||||
|           [:type, :format, :description, :minimum, :maximum, :items] | ||||
|           %i(type format description minimum maximum items) | ||||
|         end | ||||
| 
 | ||||
|         def deletable?(param) | ||||
|  |  | |||
|  | @ -1,4 +1,5 @@ | |||
| # frozen_string_literal: true | ||||
| 
 | ||||
| module GrapeSwagger | ||||
|   module DocMethods | ||||
|     class OperationId | ||||
|  |  | |||
|  | @ -1,4 +1,5 @@ | |||
| # frozen_string_literal: true | ||||
| 
 | ||||
| module GrapeSwagger | ||||
|   module DocMethods | ||||
|     class OptionalObject | ||||
|  |  | |||
|  | @ -1,4 +1,5 @@ | |||
| # frozen_string_literal: true | ||||
| 
 | ||||
| module GrapeSwagger | ||||
|   module DocMethods | ||||
|     class ParseParams | ||||
|  |  | |||
|  | @ -1,4 +1,5 @@ | |||
| # frozen_string_literal: true | ||||
| 
 | ||||
| module GrapeSwagger | ||||
|   module DocMethods | ||||
|     class PathString | ||||
|  |  | |||
|  | @ -1,4 +1,5 @@ | |||
| # frozen_string_literal: true | ||||
| 
 | ||||
| module GrapeSwagger | ||||
|   module DocMethods | ||||
|     class ProducesConsumes | ||||
|  |  | |||
|  | @ -1,4 +1,5 @@ | |||
| # frozen_string_literal: true | ||||
| 
 | ||||
| module GrapeSwagger | ||||
|   module DocMethods | ||||
|     class StatusCodes | ||||
|  |  | |||
|  | @ -1,4 +1,5 @@ | |||
| # frozen_string_literal: true | ||||
| 
 | ||||
| module GrapeSwagger | ||||
|   module DocMethods | ||||
|     class TagNameDescription | ||||
|  |  | |||
|  | @ -1,4 +1,5 @@ | |||
| # frozen_string_literal: true | ||||
| 
 | ||||
| module GrapeSwagger | ||||
|   module DocMethods | ||||
|     class Version | ||||
|  |  | |||
|  | @ -1,4 +1,5 @@ | |||
| # frozen_string_literal: true | ||||
| 
 | ||||
| require 'active_support' | ||||
| require 'active_support/core_ext/string/inflections.rb' | ||||
| 
 | ||||
|  | @ -148,7 +149,7 @@ module Grape | |||
| 
 | ||||
|       mime_types = GrapeSwagger::DocMethods::ProducesConsumes.call(format) | ||||
| 
 | ||||
|       route_mime_types = [:formats, :content_types, :produces].map do |producer| | ||||
|       route_mime_types = %i(formats content_types produces).map do |producer| | ||||
|         possible = route.options[producer] | ||||
|         GrapeSwagger::DocMethods::ProducesConsumes.call(possible) if possible.present? | ||||
|       end.flatten.compact.uniq | ||||
|  | @ -161,7 +162,7 @@ module Grape | |||
|       if route.settings[:description] && route.settings[:description][:consumes] | ||||
|         format = route.settings[:description][:consumes] | ||||
|       end | ||||
|       mime_types = GrapeSwagger::DocMethods::ProducesConsumes.call(format) if [:post, :put].include?(method) | ||||
|       mime_types = GrapeSwagger::DocMethods::ProducesConsumes.call(format) if %i(post put).include?(method) | ||||
| 
 | ||||
|       mime_types | ||||
|     end | ||||
|  |  | |||
|  | @ -1,4 +1,5 @@ | |||
| # frozen_string_literal: true | ||||
| 
 | ||||
| module GrapeSwagger | ||||
|   module Errors | ||||
|     class UnregisteredParser < StandardError; end | ||||
|  |  | |||
|  | @ -1,4 +1,5 @@ | |||
| # frozen_string_literal: true | ||||
| 
 | ||||
| module GrapeSwagger | ||||
|   class ModelParsers | ||||
|     include Enumerable | ||||
|  |  | |||
|  | @ -1,4 +1,5 @@ | |||
| # frozen_string_literal: true | ||||
| 
 | ||||
| require 'rake' | ||||
| require 'rake/tasklib' | ||||
| require 'rack/test' | ||||
|  |  | |||
|  | @ -1,4 +1,5 @@ | |||
| # frozen_string_literal: true | ||||
| 
 | ||||
| module GrapeSwagger | ||||
|   VERSION = '0.26.1' | ||||
|   VERSION = '0.27.0' | ||||
| end | ||||
|  |  | |||
|  | @ -1,5 +1,6 @@ | |||
| # encoding: utf-8 | ||||
| # frozen_string_literal: true | ||||
| 
 | ||||
| require 'spec_helper' | ||||
| 
 | ||||
| describe 'describing versions' do | ||||
|  |  | |||
|  | @ -1,4 +1,5 @@ | |||
| # frozen_string_literal: true | ||||
| 
 | ||||
| require 'spec_helper' | ||||
| 
 | ||||
| describe '#427 nested entity given as string' do | ||||
|  |  | |||
|  | @ -1,4 +1,5 @@ | |||
| # frozen_string_literal: true | ||||
| 
 | ||||
| require 'spec_helper' | ||||
| 
 | ||||
| describe 'definition names' do | ||||
|  |  | |||
|  | @ -1,4 +1,5 @@ | |||
| # frozen_string_literal: true | ||||
| 
 | ||||
| require 'spec_helper' | ||||
| 
 | ||||
| describe '#532 allow custom format' do | ||||
|  |  | |||
|  | @ -1,4 +1,5 @@ | |||
| # frozen_string_literal: true | ||||
| 
 | ||||
| require 'spec_helper' | ||||
| 
 | ||||
| describe '#533 specify status codes' do | ||||
|  |  | |||
|  | @ -1,4 +1,5 @@ | |||
| # frozen_string_literal: true | ||||
| 
 | ||||
| require 'spec_helper' | ||||
| 
 | ||||
| describe '#537 enum values spec' do | ||||
|  | @ -6,7 +7,7 @@ describe '#537 enum values spec' do | |||
|     Class.new(Grape::API) do | ||||
|       namespace :issue_537 do | ||||
|         class Spec < Grape::Entity | ||||
|           expose :enum_property, documentation: { values: [:foo, :bar] } | ||||
|           expose :enum_property, documentation: { values: %i(foo bar) } | ||||
|           expose :enum_property_default, documentation: { values: %w(a b c), default: 'c' } | ||||
|           expose :own_format, documentation: { format: 'log' } | ||||
|         end | ||||
|  |  | |||
|  | @ -1,4 +1,5 @@ | |||
| # frozen_string_literal: true | ||||
| 
 | ||||
| require 'spec_helper' | ||||
| 
 | ||||
| describe '#539 post params given as array' do | ||||
|  |  | |||
|  | @ -1,4 +1,5 @@ | |||
| # frozen_string_literal: true | ||||
| 
 | ||||
| require 'spec_helper' | ||||
| 
 | ||||
| describe '#542 array of type in post params' do | ||||
|  |  | |||
|  | @ -1,4 +1,5 @@ | |||
| # frozen_string_literal: true | ||||
| 
 | ||||
| require 'spec_helper' | ||||
| 
 | ||||
| describe '#553 array of type in post/put params' do | ||||
|  |  | |||
|  | @ -1,4 +1,5 @@ | |||
| # frozen_string_literal: true | ||||
| 
 | ||||
| require 'spec_helper' | ||||
| 
 | ||||
| describe '#572 is_array is applied to all possible responses' do | ||||
|  |  | |||
|  | @ -1,4 +1,5 @@ | |||
| # frozen_string_literal: true | ||||
| 
 | ||||
| require 'spec_helper' | ||||
| 
 | ||||
| describe '#579 put / post parameters spec' do | ||||
|  |  | |||
|  | @ -1,4 +1,5 @@ | |||
| # frozen_string_literal: true | ||||
| 
 | ||||
| require 'spec_helper' | ||||
| 
 | ||||
| describe '#582 respond with a file' do | ||||
|  |  | |||
|  | @ -1,4 +1,5 @@ | |||
| # frozen_string_literal: true | ||||
| 
 | ||||
| require 'spec_helper' | ||||
| 
 | ||||
| describe '#587 process route with parameters delimited by dash' do | ||||
|  |  | |||
|  | @ -1,4 +1,5 @@ | |||
| # frozen_string_literal: true | ||||
| 
 | ||||
| require 'spec_helper' | ||||
| 
 | ||||
| describe GrapeSwagger::DocMethods::DataType do | ||||
|  |  | |||
|  | @ -1,4 +1,5 @@ | |||
| # frozen_string_literal: true | ||||
| 
 | ||||
| require 'spec_helper' | ||||
| 
 | ||||
| describe Grape::Endpoint do | ||||
|  |  | |||
|  | @ -1,4 +1,5 @@ | |||
| # frozen_string_literal: true | ||||
| 
 | ||||
| require 'spec_helper' | ||||
| 
 | ||||
| describe GrapeSwagger::DocMethods::Extensions do | ||||
|  |  | |||
|  | @ -1,4 +1,5 @@ | |||
| # frozen_string_literal: true | ||||
| 
 | ||||
| require 'spec_helper' | ||||
| 
 | ||||
| describe GrapeSwagger::ModelParsers do | ||||
|  |  | |||
|  | @ -1,4 +1,5 @@ | |||
| # frozen_string_literal: true | ||||
| 
 | ||||
| require 'spec_helper' | ||||
| 
 | ||||
| describe GrapeSwagger::DocMethods::MoveParams do | ||||
|  |  | |||
|  | @ -1,4 +1,5 @@ | |||
| # frozen_string_literal: true | ||||
| 
 | ||||
| require 'spec_helper' | ||||
| 
 | ||||
| RSpec.describe GrapeSwagger::Rake::OapiTasks do | ||||
|  |  | |||
|  | @ -1,4 +1,5 @@ | |||
| # frozen_string_literal: false | ||||
| 
 | ||||
| require 'spec_helper' | ||||
| 
 | ||||
| describe GrapeSwagger::DocMethods::OperationId do | ||||
|  |  | |||
|  | @ -1,4 +1,5 @@ | |||
| # frozen_string_literal: true | ||||
| 
 | ||||
| require 'spec_helper' | ||||
| 
 | ||||
| describe GrapeSwagger::DocMethods::OptionalObject do | ||||
|  |  | |||
|  | @ -1,4 +1,5 @@ | |||
| # frozen_string_literal: true | ||||
| 
 | ||||
| require 'spec_helper' | ||||
| 
 | ||||
| describe GrapeSwagger::DocMethods::ParseParams do | ||||
|  |  | |||
|  | @ -1,4 +1,5 @@ | |||
| # frozen_string_literal: true | ||||
| 
 | ||||
| require 'spec_helper' | ||||
| 
 | ||||
| describe GrapeSwagger::DocMethods::PathString do | ||||
|  |  | |||
|  | @ -1,4 +1,5 @@ | |||
| # frozen_string_literal: true | ||||
| 
 | ||||
| require 'spec_helper' | ||||
| 
 | ||||
| describe GrapeSwagger::DocMethods::ProducesConsumes do | ||||
|  |  | |||
|  | @ -1,4 +1,5 @@ | |||
| # frozen_string_literal: true | ||||
| 
 | ||||
| require 'spec_helper' | ||||
| 
 | ||||
| describe GrapeSwagger::DocMethods::TagNameDescription do | ||||
|  | @ -7,7 +8,7 @@ describe GrapeSwagger::DocMethods::TagNameDescription do | |||
|     subject { described_class.send(:build_memo, tag) } | ||||
| 
 | ||||
|     specify do | ||||
|       expect(subject.keys).to eql [:name, :description] | ||||
|       expect(subject.keys).to eql %i(name description) | ||||
|       expect(subject).to eql( | ||||
|         name: tag, | ||||
|         description: "Operations about #{tag.pluralize}" | ||||
|  |  | |||
|  | @ -1,4 +1,5 @@ | |||
| # frozen_string_literal: true | ||||
| 
 | ||||
| require 'spec_helper' | ||||
| 
 | ||||
| describe GrapeSwagger::DocMethods::Version do | ||||
|  | @ -8,7 +9,7 @@ describe GrapeSwagger::DocMethods::Version do | |||
|   describe 'grape 0.16.2 version' do | ||||
|     let(:version) { '[:v1, :v2]' } | ||||
|     it { is_expected.to be_a Array } | ||||
|     it { is_expected.to eql [:v1, :v2] } | ||||
|     it { is_expected.to eql %i(v1 v2) } | ||||
|   end | ||||
| 
 | ||||
|   describe 'newer grape versions' do | ||||
|  | @ -19,9 +20,9 @@ describe GrapeSwagger::DocMethods::Version do | |||
|     end | ||||
| 
 | ||||
|     describe 'as Array' do | ||||
|       let(:version) { [:v1, :v2] } | ||||
|       let(:version) { %i(v1 v2) } | ||||
|       it { is_expected.to be_a Array } | ||||
|       it { is_expected.to eql [:v1, :v2] } | ||||
|       it { is_expected.to eql %i(v1 v2) } | ||||
|     end | ||||
|   end | ||||
| end | ||||
|  |  | |||
|  | @ -1,4 +1,5 @@ | |||
| # frozen_string_literal: true | ||||
| 
 | ||||
| require 'simplecov' | ||||
| require 'coveralls' | ||||
| 
 | ||||
|  |  | |||
|  | @ -1,4 +1,5 @@ | |||
| # frozen_string_literal: true | ||||
| 
 | ||||
| class EmptyClass | ||||
| end | ||||
| 
 | ||||
|  |  | |||
|  | @ -1,4 +1,5 @@ | |||
| # frozen_string_literal: true | ||||
| 
 | ||||
| class GrapeVersion | ||||
|   class << self | ||||
|     def current_version | ||||
|  |  | |||
|  | @ -1,4 +1,5 @@ | |||
| # frozen_string_literal: true | ||||
| 
 | ||||
| module GrapeSwagger | ||||
|   class MockParser | ||||
|     attr_reader :model | ||||
|  |  | |||
|  | @ -1,4 +1,5 @@ | |||
| # frozen_string_literal: true | ||||
| 
 | ||||
| RSpec.shared_context 'entity swagger example' do | ||||
|   before :all do | ||||
|     module Entities | ||||
|  |  | |||
|  | @ -1,4 +1,5 @@ | |||
| # frozen_string_literal: true | ||||
| 
 | ||||
| RSpec.shared_context 'mock swagger example' do | ||||
|   before :all do | ||||
|     module Entities | ||||
|  |  | |||
|  | @ -1,4 +1,5 @@ | |||
| # frozen_string_literal: true | ||||
| 
 | ||||
| require 'representable/json' | ||||
| 
 | ||||
| RSpec.shared_context 'representable swagger example' do | ||||
|  |  | |||
|  | @ -1,4 +1,5 @@ | |||
| # frozen_string_literal: true | ||||
| 
 | ||||
| RSpec.shared_context 'namespace example' do | ||||
|   before :all do | ||||
|     module TheApi | ||||
|  |  | |||
|  | @ -1,4 +1,5 @@ | |||
| # frozen_string_literal: true | ||||
| 
 | ||||
| RSpec.shared_context 'the api paths/defs' do | ||||
|   let(:paths) do | ||||
|     { | ||||
|  |  | |||
|  | @ -1,4 +1,5 @@ | |||
| # frozen_string_literal: true | ||||
| 
 | ||||
| require 'spec_helper' | ||||
| 
 | ||||
| describe 'body parameter definitions' do | ||||
|  |  | |||
|  | @ -1,4 +1,5 @@ | |||
| # frozen_string_literal: true | ||||
| 
 | ||||
| require 'spec_helper' | ||||
| 
 | ||||
| describe 'definitions/models' do | ||||
|  |  | |||
|  | @ -1,4 +1,5 @@ | |||
| # frozen_string_literal: true | ||||
| 
 | ||||
| require 'spec_helper' | ||||
| 
 | ||||
| def details | ||||
|  |  | |||
|  | @ -1,4 +1,5 @@ | |||
| # frozen_string_literal: true | ||||
| 
 | ||||
| require 'spec_helper' | ||||
| 
 | ||||
| describe 'extensions' do | ||||
|  |  | |||
|  | @ -1,4 +1,5 @@ | |||
| # frozen_string_literal: true | ||||
| 
 | ||||
| require 'spec_helper' | ||||
| 
 | ||||
| describe 'format, content_type' do | ||||
|  |  | |||
|  | @ -1,4 +1,5 @@ | |||
| # frozen_string_literal: true | ||||
| 
 | ||||
| require 'spec_helper' | ||||
| 
 | ||||
| describe 'global configuration stuff' do | ||||
|  |  | |||
|  | @ -1,4 +1,5 @@ | |||
| # frozen_string_literal: true | ||||
| 
 | ||||
| require 'spec_helper' | ||||
| 
 | ||||
| describe 'document hash and array' do | ||||
|  |  | |||
|  | @ -1,4 +1,5 @@ | |||
| # frozen_string_literal: true | ||||
| 
 | ||||
| require 'spec_helper' | ||||
| 
 | ||||
| describe 'headers' do | ||||
|  |  | |||
|  | @ -1,4 +1,5 @@ | |||
| # frozen_string_literal: true | ||||
| 
 | ||||
| require 'spec_helper' | ||||
| 
 | ||||
| describe 'hide documentation path' do | ||||
|  |  | |||
|  | @ -1,4 +1,5 @@ | |||
| # frozen_string_literal: true | ||||
| 
 | ||||
| require 'spec_helper' | ||||
| 
 | ||||
| describe 'hidden flag enables a single endpoint parameter to be excluded from the documentation' do | ||||
|  |  | |||
|  | @ -1,4 +1,5 @@ | |||
| # frozen_string_literal: true | ||||
| 
 | ||||
| require 'spec_helper' | ||||
| 
 | ||||
| describe 'swagger spec v2.0' do | ||||
|  |  | |||
|  | @ -1,4 +1,5 @@ | |||
| # frozen_string_literal: true | ||||
| 
 | ||||
| require 'spec_helper' | ||||
| 
 | ||||
| describe 'swagger spec v2.0' do | ||||
|  |  | |||
|  | @ -1,4 +1,5 @@ | |||
| # frozen_string_literal: true | ||||
| 
 | ||||
| require 'spec_helper' | ||||
| 
 | ||||
| describe 'moving body/formData Params to definitions' do | ||||
|  |  | |||
|  | @ -1,4 +1,5 @@ | |||
| # frozen_string_literal: true | ||||
| 
 | ||||
| require 'spec_helper' | ||||
| 
 | ||||
| describe 'setting of param type, such as `query`, `path`, `formData`, `body`, `header`' do | ||||
|  |  | |||
|  | @ -1,4 +1,5 @@ | |||
| # frozen_string_literal: true | ||||
| 
 | ||||
| require 'spec_helper' | ||||
| 
 | ||||
| describe 'setting of param type, such as `query`, `path`, `formData`, `body`, `header`' do | ||||
|  |  | |||
|  | @ -1,4 +1,5 @@ | |||
| # frozen_string_literal: true | ||||
| 
 | ||||
| require 'spec_helper' | ||||
| 
 | ||||
| describe 'additional parameter settings' do | ||||
|  |  | |||
|  | @ -1,4 +1,5 @@ | |||
| # frozen_string_literal: true | ||||
| 
 | ||||
| require 'spec_helper' | ||||
| 
 | ||||
| describe 'response' do | ||||
|  |  | |||
|  | @ -1,4 +1,5 @@ | |||
| # frozen_string_literal: true | ||||
| 
 | ||||
| require 'spec_helper' | ||||
| 
 | ||||
| describe 'swagger spec v2.0' do | ||||
|  |  | |||
|  | @ -1,4 +1,5 @@ | |||
| # frozen_string_literal: true | ||||
| 
 | ||||
| require 'spec_helper' | ||||
| 
 | ||||
| # mapping of parameter types | ||||
|  |  | |||
|  | @ -1,4 +1,5 @@ | |||
| # frozen_string_literal: true | ||||
| 
 | ||||
| require 'spec_helper' | ||||
| 
 | ||||
| describe 'Boolean Params' do | ||||
|  |  | |||
|  | @ -1,4 +1,5 @@ | |||
| # frozen_string_literal: true | ||||
| 
 | ||||
| require 'spec_helper' | ||||
| # require 'grape_version' | ||||
| 
 | ||||
|  |  | |||
|  | @ -1,4 +1,5 @@ | |||
| # frozen_string_literal: true | ||||
| 
 | ||||
| require 'spec_helper' | ||||
| 
 | ||||
| describe 'details' do | ||||
|  |  | |||
|  | @ -1,4 +1,5 @@ | |||
| # frozen_string_literal: true | ||||
| 
 | ||||
| require 'spec_helper' | ||||
| 
 | ||||
| describe 'Grape::Endpoint#path_and_definitions' do | ||||
|  |  | |||
|  | @ -1,4 +1,5 @@ | |||
| # frozen_string_literal: true | ||||
| 
 | ||||
| require 'spec_helper' | ||||
| 
 | ||||
| describe 'Errors' do | ||||
|  |  | |||
|  | @ -1,4 +1,5 @@ | |||
| # frozen_string_literal: true | ||||
| 
 | ||||
| require 'spec_helper' | ||||
| 
 | ||||
| describe 'Float Params' do | ||||
|  |  | |||
|  | @ -1,4 +1,5 @@ | |||
| # frozen_string_literal: true | ||||
| 
 | ||||
| require 'spec_helper' | ||||
| 
 | ||||
| describe 'Form Params' do | ||||
|  | @ -34,7 +35,7 @@ describe 'Form Params' do | |||
|       params do | ||||
|         requires :id, type: Integer, desc: 'id of item' | ||||
|         requires :name, type: String, desc: 'name of item' | ||||
|         optional :conditions, type: Symbol, desc: 'conditions of item', values: [:one, :two] | ||||
|         optional :conditions, type: Symbol, desc: 'conditions of item', values: %i(one two) | ||||
|       end | ||||
|       post '/items/:id' do | ||||
|         {} | ||||
|  |  | |||
|  | @ -1,4 +1,5 @@ | |||
| # frozen_string_literal: true | ||||
| 
 | ||||
| require 'spec_helper' | ||||
| 
 | ||||
| describe Grape::API do | ||||
|  |  | |||
|  | @ -1,4 +1,5 @@ | |||
| # frozen_string_literal: true | ||||
| 
 | ||||
| require 'spec_helper' | ||||
| 
 | ||||
| describe 'a hide mounted api' do | ||||
|  |  | |||
|  | @ -1,4 +1,5 @@ | |||
| # frozen_string_literal: true | ||||
| 
 | ||||
| require 'spec_helper' | ||||
| 
 | ||||
| describe 'host in the swagger_doc' do | ||||
|  |  | |||
|  | @ -1,4 +1,5 @@ | |||
| # frozen_string_literal: true | ||||
| 
 | ||||
| require 'spec_helper' | ||||
| 
 | ||||
| describe 'docs mounted separately from api' do | ||||
|  |  | |||
|  | @ -1,4 +1,5 @@ | |||
| # frozen_string_literal: true | ||||
| 
 | ||||
| require 'spec_helper' | ||||
| 
 | ||||
| describe 'namespace tags check while using prefix and version' do | ||||
|  | @ -7,7 +8,7 @@ describe 'namespace tags check while using prefix and version' do | |||
|   before :all do | ||||
|     module TheApi | ||||
|       class NamespaceApi < Grape::API | ||||
|         version [:v1, :v2] | ||||
|         version %i(v1 v2) | ||||
|       end | ||||
| 
 | ||||
|       class CascadingVersionApi < Grape::API | ||||
|  |  | |||
|  | @ -1,4 +1,5 @@ | |||
| # frozen_string_literal: true | ||||
| 
 | ||||
| require 'spec_helper' | ||||
| 
 | ||||
| describe 'namespace tags check' do | ||||
|  |  | |||
|  | @ -1,4 +1,5 @@ | |||
| # frozen_string_literal: true | ||||
| 
 | ||||
| require 'spec_helper' | ||||
| 
 | ||||
| describe 'namespace' do | ||||
|  |  | |||
|  | @ -1,4 +1,5 @@ | |||
| # frozen_string_literal: true | ||||
| 
 | ||||
| require 'spec_helper' | ||||
| 
 | ||||
| describe 'a nicknamed mounted api' do | ||||
|  |  | |||
|  | @ -1,4 +1,5 @@ | |||
| # frozen_string_literal: true | ||||
| 
 | ||||
| require 'spec_helper' | ||||
| 
 | ||||
| describe 'an operation id api' do | ||||
|  |  | |||
|  | @ -1,4 +1,5 @@ | |||
| # frozen_string_literal: true | ||||
| 
 | ||||
| require 'spec_helper' | ||||
| 
 | ||||
| describe 'Params Multi Types' do | ||||
|  |  | |||
Some files were not shown because too many files have changed in this diff Show More
		Loading…
	
		Reference in New Issue