Sha256: 277f0f8c5c54e719b703fbd7178100edebca8491699f0878ec0babaa83e03f7a

Contents?: true

Size: 397 Bytes

Versions: 10

Compression:

Stored size: 397 Bytes

Contents

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

10 entries across 10 versions & 1 rubygems

Version Path
grape-swagger-0.26.1 spec/support/mock_parser.rb
grape-swagger-0.26.0 spec/support/mock_parser.rb
grape-swagger-0.25.3 spec/support/mock_parser.rb
grape-swagger-0.25.2 spec/support/mock_parser.rb
grape-swagger-0.25.1 spec/support/mock_parser.rb
grape-swagger-0.25.0 spec/support/mock_parser.rb
grape-swagger-0.24.0 spec/support/mock_parser.rb
grape-swagger-0.23.0 spec/support/mock_parser.rb
grape-swagger-0.22.0 spec/support/mock_parser.rb
grape-swagger-0.21.0 spec/support/mock_parser.rb