shale 0.3.0 → 0.3.1

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: f9396e5fcba6ff4e1f1566abe356270ef9ddbd8ce9171063f011feeb36d234e7
4
- data.tar.gz: 4495b40dca3e01b6ba908dfc6b7831aea3f1e2865423de59ced69db33ba633b8
3
+ metadata.gz: 36678c1f4afd6e0cf2d6a9a9e4b5becebf11e76404cb50dba7dc5269b5ca42cc
4
+ data.tar.gz: 51c6c94abafe1767c579c270e3c3cb4da2ca79a2a29a9d28ea6bfe09bc4b53fb
5
5
  SHA512:
6
- metadata.gz: 404737157189f2312b4e189d095899588495c8f80cf52f9bd5935358b2ec8bedbd98b0d7676c44641383109701d62377d3086b36342950d6fd657dbbba2d06b9
7
- data.tar.gz: '04818bdcac0290dfd96fbb0ebb1364350a444a9fc0533992d2cdf3bc3443e8afb4f00021346c66610400ddce12b4848c8bbed5c0bfb3835d40438c2b5acc1a6b'
6
+ metadata.gz: ea21dff00b6ea2663d20f9f377140250f78c29214a93f226047fe29d47680ae526652010ae268e4cf694ca1877cd8d19bfe8f0bbd767fa871fa80afaefee1c83
7
+ data.tar.gz: 414d45b7bcd2477bc276eee17c598efba40350e0234c32f783c73217bee65ae4260d07e8a7bcfc7f48e1f76c9af4852de1c1c109c5b807e99a945305e2de6286
data/CHANGELOG.md CHANGED
@@ -1,3 +1,8 @@
1
+ ## [0.3.1] - 2022-04-29
2
+
3
+ ### Changed
4
+ - Rename `id` -> `$id` and add info about supported JSON Schema dialect
5
+
1
6
  ## [0.3.0] - 2022-04-29
2
7
 
3
8
  ### Added
data/README.md CHANGED
@@ -613,16 +613,18 @@ Shale.xml_adapter = Shale::Adapter::Ox
613
613
 
614
614
  To generate JSON Schema from you Shale data model use:
615
615
 
616
+ :warning: Shale only supports **[Draft 2020-12](https://json-schema.org/draft/2020-12/schema)** JSON Schema
617
+
616
618
  ```ruby
617
619
  require 'shale/schema'
618
620
 
619
- Shale::Schema.to_json(Person, id: 'My ID', description: 'My description', pretty: true)
621
+ Shale::Schema.to_json(Person, id: 'http://foo.bar/schema/person', description: 'My description', pretty: true)
620
622
 
621
623
  # =>
622
624
  #
623
625
  # {
624
626
  # "$schema": "https://json-schema.org/draft/2020-12/schema",
625
- # "id": "My ID",
627
+ # "$id": "http://foo.bar/schema/person",
626
628
  # "description": "My description",
627
629
  # "$ref": "#/$defs/Person",
628
630
  # "$defs": {
@@ -685,7 +687,7 @@ Shale::Schema::JSON.register_json_type(MyEmailType, MyEmailJSONType)
685
687
 
686
688
  ### Generating XML Schema
687
689
 
688
- To generate XML Schema from you Shale data model use:
690
+ To generate XML Schema from your Shale data model use:
689
691
 
690
692
  ```ruby
691
693
  require 'shale/schema'
@@ -35,7 +35,7 @@ module Shale
35
35
  def as_json
36
36
  schema = {
37
37
  '$schema' => DIALECT,
38
- 'id' => @id,
38
+ '$id' => @id,
39
39
  'description' => @description,
40
40
  }
41
41
 
data/lib/shale/version.rb CHANGED
@@ -2,5 +2,5 @@
2
2
 
3
3
  module Shale
4
4
  # @api private
5
- VERSION = '0.3.0'
5
+ VERSION = '0.3.1'
6
6
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: shale
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.0
4
+ version: 0.3.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Kamil Giszczak
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2022-04-29 00:00:00.000000000 Z
11
+ date: 2022-05-10 00:00:00.000000000 Z
12
12
  dependencies: []
13
13
  description: Ruby object mapper and serializer for XML, JSON and YAML.
14
14
  email: