blueprinter_schema 0.2.0 → 0.3.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 2400ee7efced7c677ae75e475d55dfc183f90ab6975780ba760b4d5c15f9e1f5
4
- data.tar.gz: ff2966e94b5c3b6c4ea153e44ab386eafe95afd70d30d7eb9f255ef2dae570c2
3
+ metadata.gz: bc07f2ba27532688748d728cfdb6ee4ae6d0c92a66b17d753519384ee8538f5b
4
+ data.tar.gz: 2add634f63f55305245acb2fb7d64438f7017d8ce6bdce9bb7626f59f186b66a
5
5
  SHA512:
6
- metadata.gz: a2479a8f99bf5b0bf2ba0662ad244999c2e4316fdbd0185b481ba390fc249118a9a364cbd805957938e8af389f29d513e566d9533ed57e37f8172cef8755e190
7
- data.tar.gz: ec7b9bcfa2f38a936d0a9600e01a3c0702e98db58468a9f10d0e2f5c80f658483ad5308c7ee582fad8ceeec6f6ab53d85245dc54331db327eb4c21ad487c941c
6
+ metadata.gz: 592881730764b7873f8ae95bc4de43942f3f8345c37327157b528b9b740706544c206b1ea84b3c41d430d8e6f389cd6699cf0a535797c07e4f2e82aa06c8aa33
7
+ data.tar.gz: 88163ad100fa9e310cb42c8b1dc9240b3aa09831b048e6215ddc6636cfea57ade49d452290ca01cd91a13f001e902fe8291ff17d8da63ad85a32d1abe470e7c4
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module BlueprinterSchema
4
- VERSION = '0.2.0'
4
+ VERSION = '0.3.0'
5
5
  end
@@ -50,6 +50,7 @@ module BlueprinterSchema
50
50
  end
51
51
 
52
52
  # rubocop:disable Metrics/MethodLength
53
+ # rubocop:disable Metrics/CyclomaticComplexity
53
54
  def ar_column_to_json_schema(column)
54
55
  case column.type
55
56
  when :string, :text
@@ -64,12 +65,15 @@ module BlueprinterSchema
64
65
  build_json_schema_type('string', column.null, 'date')
65
66
  when :datetime, :timestamp
66
67
  build_json_schema_type('string', column.null, 'date-time')
68
+ when :uuid
69
+ build_json_schema_type('string', column.null, 'uuid')
67
70
  else
68
71
  # Unknown column type, we don't know the schema type
69
72
  {}
70
73
  end
71
74
  end
72
75
  # rubocop:enable Metrics/MethodLength
76
+ # rubocop:enable Metrics/CyclomaticComplexity
73
77
 
74
78
  def build_json_schema_type(json_schema_type, nullable, format = nil)
75
79
  type = { 'type' => nullable ? [json_schema_type, 'null'] : json_schema_type }
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: blueprinter_schema
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.0
4
+ version: 0.3.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - thisismydesign