Sha256: 239c0df5ab1da08de16fa05d776a2c40a16af1f462d9a8998ecb4a181c938099

Contents?: true

Size: 428 Bytes

Versions: 19

Compression:

Stored size: 428 Bytes

Contents

# frozen_string_literal: true

module GrapeSwagger
  class MockParser
    attr_reader :model
    attr_reader :endpoint

    def initialize(model, endpoint)
      @model = model
      @endpoint = endpoint
    end

    def call
      {
        mock_data: {
          type: :string,
          description: "it's a mock"
        }
      }
    end
  end
end

GrapeSwagger.model_parsers.register(GrapeSwagger::MockParser, OpenStruct)

Version data entries

19 entries across 19 versions & 1 rubygems

Version Path
grape-swagger-1.2.0 spec/support/mock_parser.rb
grape-swagger-1.1.0 spec/support/mock_parser.rb
grape-swagger-1.0.0 spec/support/mock_parser.rb
grape-swagger-0.34.2 spec/support/mock_parser.rb
grape-swagger-0.34.1 spec/support/mock_parser.rb
grape-swagger-0.34.0 spec/support/mock_parser.rb
grape-swagger-0.33.0 spec/support/mock_parser.rb
grape-swagger-0.32.1 spec/support/mock_parser.rb
grape-swagger-0.32.0 spec/support/mock_parser.rb
grape-swagger-0.31.1 spec/support/mock_parser.rb
grape-swagger-0.31.0 spec/support/mock_parser.rb
grape-swagger-0.30.1 spec/support/mock_parser.rb
grape-swagger-0.30.0 spec/support/mock_parser.rb
grape-swagger-0.29.0 spec/support/mock_parser.rb
grape-swagger-0.28.0 spec/support/mock_parser.rb
grape-swagger-0.27.3 spec/support/mock_parser.rb
grape-swagger-0.27.2 spec/support/mock_parser.rb
grape-swagger-0.27.1 spec/support/mock_parser.rb
grape-swagger-0.27.0 spec/support/mock_parser.rb