Sha256: 6b3c7017cb24a2bfb7e4fbf9b560fcacc9bc88a0f479510deffa0897cac1bf89

Contents?: true

Size: 413 Bytes

Versions: 10

Compression:

Stored size: 413 Bytes

Contents

# frozen_string_literal: true

module GrapeSwagger
  class MockParser
    attr_reader :model, :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

10 entries across 10 versions & 2 rubygems

Version Path
grape-swagger-1.6.1 spec/support/mock_parser.rb
grape-swagger-1.6.0 spec/support/mock_parser.rb
gitlab-grape-swagger-1.5.0 spec/support/mock_parser.rb
grape-swagger-1.5.0 spec/support/mock_parser.rb
grape-swagger-1.4.2 spec/support/mock_parser.rb
grape-swagger-1.4.1 spec/support/mock_parser.rb
grape-swagger-1.4.0 spec/support/mock_parser.rb
grape-swagger-1.3.1 spec/support/mock_parser.rb
grape-swagger-1.3.0 spec/support/mock_parser.rb
grape-swagger-1.2.1 spec/support/mock_parser.rb