Sha256: 9735fad19e8b919e86ce40a31839d794dcfe5ce0292d064ebcb32a81b0827a01
Contents?: true
Size: 668 Bytes
Versions: 16
Compression:
Stored size: 668 Bytes
Contents
# frozen_string_literal: true require 'spec_helper' describe 'Boolean Params' do def app Class.new(Grape::API) do format :json params do requires :a_boolean, type: Virtus::Attribute::Boolean end post :splines do end add_swagger_documentation end end subject do get '/swagger_doc/splines' expect(last_response.status).to eq 200 body = JSON.parse last_response.body body['paths']['/splines']['post']['parameters'] end it 'converts boolean types' do expect(subject).to eq [ { 'in' => 'formData', 'name' => 'a_boolean', 'type' => 'boolean', 'required' => true } ] end end
Version data entries
16 entries across 16 versions & 1 rubygems