swagger-dsl 2.0.0 → 2.0.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: 0e4b01a3c2f9182385dc31cf96d36b19781fb69c58403642c410e36e8e5cf3e0
4
- data.tar.gz: ba787a1d0b03f8f214aca38482ad1e8dc7d9e7b9c8e7eea1c4d2e0432c9b4a4f
3
+ metadata.gz: 2fdb0f1e88082ae965e4b6075a7dd8ef91efb750208b7f11fa5522a6be1f7144
4
+ data.tar.gz: 3bf9c27d7202419ce13b5fce8296edf1fbbdcbc7c391a15bc7aecd580a358a61
5
5
  SHA512:
6
- metadata.gz: 103ae693a31e19ea4c0c786f5b2add798da809a473f9113e7b297d39275a139f7089b1c300bfe2c40895a713c2e6011a6188cb4e722d44ae983cb2ded6082996
7
- data.tar.gz: e8771d5f49a83fed9673a25e147d232920fc315affe95728a7293b7bdbf1d6a61ea6aa33c99c32dffa4c98dd1a43b46297008afc3b7b543fc254690cae58d9c9
6
+ metadata.gz: 84423580c60508efe85948381313f60b075b892869c730b6e1e86bf4418914edcdf08314910c25634ee86117262c106293c7613a0059a2e6b1d8ff29801cc6c8
7
+ data.tar.gz: 413775b11c9556ce0366b0d61acd21aa63a445fbd6fc80e00cf6723527a93762ab80a45259734d84e5119a1f91e24337f4678ca021b9e6ab479b7bea06f5f6d4
data/CHANGELOG.md CHANGED
@@ -1,5 +1,9 @@
1
1
  # CHANGELOG
2
2
 
3
+ ## 2.0.1
4
+
5
+ - fix(brake): nested class naming
6
+
3
7
  ## 2.0.0
4
8
 
5
9
  - fix(brake): adjust to OAS3 spec
@@ -18,7 +18,7 @@ module Swagger
18
18
  private
19
19
 
20
20
  def serializer_name(name)
21
- name.to_s.sub(/(?:Serializer)?$/, "Serializer")
21
+ name.to_s.gsub(/-/, '::').sub(/(?:Serializer)?$/, "Serializer")
22
22
  end
23
23
  end
24
24
  end
@@ -13,7 +13,7 @@ module Swagger
13
13
  )
14
14
  @inject_key = inject_key
15
15
  @default_dsl = default_dsl
16
- @dsl_options ||= { reference_name: ->(name) { name.sub(/Serializer$/, "") } }
16
+ @dsl_options ||= { reference_name: ->(name) { name.sub(/Serializer$/, "").gsub(/::/, '-') } }
17
17
  @eager = eager
18
18
  @default_required = default_required
19
19
  @lazy_define_paths = lazy_define_paths
@@ -5,7 +5,7 @@ module Swagger
5
5
  class DSL < Hash
6
6
  module Serializer
7
7
  def swagger(dsl: nil, &block)
8
- name = self.name.sub(/Serializer$/, "")
8
+ name = self.name.sub(/Serializer$/, "").gsub(/::/, '-')
9
9
  Swagger::DSL.current["components"]["schemas"][name] =
10
10
  Swagger::DSL::JsonSchema.by(dsl).dsl(&block).merge(Swagger::DSL.current.config.inject_key => name)
11
11
  end
@@ -1,5 +1,5 @@
1
1
  module Swagger
2
2
  class DSL < Hash
3
- VERSION = "2.0.0".freeze
3
+ VERSION = "2.0.1".freeze
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: swagger-dsl
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.0.0
4
+ version: 2.0.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Narazaka
@@ -292,7 +292,7 @@ metadata:
292
292
  homepage_uri: https://github.com/Narazaka/swagger-dsl
293
293
  source_code_uri: https://github.com/Narazaka/swagger-dsl.git
294
294
  changelog_uri: https://github.com/Narazaka/swagger-dsl/blob/master/CHANGELOG.md
295
- documentation_uri: https://www.rubydoc.info/gems/swagger-dsl/2.0.0
295
+ documentation_uri: https://www.rubydoc.info/gems/swagger-dsl/2.0.1
296
296
  post_install_message:
297
297
  rdoc_options: []
298
298
  require_paths: