diff --git a/lib/grape_fast_jsonapi/parser.rb b/lib/grape_fast_jsonapi/parser.rb index 9ddf91f..498e479 100644 --- a/lib/grape_fast_jsonapi/parser.rb +++ b/lib/grape_fast_jsonapi/parser.rb @@ -188,6 +188,14 @@ def boolean_example def uuid_example SecureRandom.uuid end + + def float_example + if defined? Faker + Faker::Number.decimal + else + rand(1..9999) / 10.0 + end + end end end end diff --git a/lib/grape_fast_jsonapi/version.rb b/lib/grape_fast_jsonapi/version.rb index f1ad4df..49514a3 100644 --- a/lib/grape_fast_jsonapi/version.rb +++ b/lib/grape_fast_jsonapi/version.rb @@ -2,6 +2,6 @@ module Grape module FastJsonapi - VERSION = '0.2.5'.freeze + VERSION = '0.2.6'.freeze end end