Sha256: 300e2c264cdbd7987199168e785967a6a94ecff1cda6a005c77cd9e05c33cfe4
Contents?: true
Size: 784 Bytes
Versions: 17
Compression:
Stored size: 784 Bytes
Contents
require 'spec_helper' RSpec.describe Examples::Ids, type: :integration do include JSON::SchemaBuilder::RSpecHelper let(:schema_method){ :example } it_behaves_like 'a builder' do let(:expected_json) do { type: :object, required: [:user_id], properties: { user_id: { oneOf: [ { type: 'integer', minimum: 1 }, { type: 'string', pattern: '^[1-9]\d*$' } ] }, optional_id: { oneOf: [ { type: 'integer', minimum: 1 }, { type: 'string', pattern: '^[1-9]\d*$' }, { type: 'null' } ] }, an_id: id_schema, a_nullable_id: nullable_id_schema } } end end end
Version data entries
17 entries across 17 versions & 1 rubygems