swagger-dsl 2.0.1 → 2.0.2

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: 2fdb0f1e88082ae965e4b6075a7dd8ef91efb750208b7f11fa5522a6be1f7144
4
- data.tar.gz: 3bf9c27d7202419ce13b5fce8296edf1fbbdcbc7c391a15bc7aecd580a358a61
3
+ metadata.gz: 0705c9ed69ca2d85b649a9303ffedf6994945ceb125223d83d2a69b41f25b6c4
4
+ data.tar.gz: 8c36b3e9c7a2cfa3d259ab601ace110a204305306e9456950a1589dd6ee04da3
5
5
  SHA512:
6
- metadata.gz: 84423580c60508efe85948381313f60b075b892869c730b6e1e86bf4418914edcdf08314910c25634ee86117262c106293c7613a0059a2e6b1d8ff29801cc6c8
7
- data.tar.gz: 413775b11c9556ce0366b0d61acd21aa63a445fbd6fc80e00cf6723527a93762ab80a45259734d84e5119a1f91e24337f4678ca021b9e6ab479b7bea06f5f6d4
6
+ metadata.gz: cb8144de2b171a95c8a8ed1bd0ad49c0ada18ef8e4c997824b3c829fe68202ee8c5163686aae8a2b3c1d24f0d518e0edc84207d021517107eaca70d39c34bc56
7
+ data.tar.gz: e66d3beadaada0b4623d7506a05a6ba8843fdf0f8f5229c0ea7e4eee81d7d3242cba700a77d2caa1e620ce0987294d1742a51718606c3668706dad990bcb6c1d
data/CHANGELOG.md CHANGED
@@ -1,5 +1,9 @@
1
1
  # CHANGELOG
2
2
 
3
+ ## 2.0.2
4
+
5
+ - fix: unique operation id
6
+
3
7
  ## 2.0.1
4
8
 
5
9
  - fix(brake): nested class naming
@@ -17,8 +17,6 @@ module Swagger
17
17
  end
18
18
 
19
19
  def swagger_define_path(action, format = :json, path: nil, method: nil, &block)
20
- operation_id = "#{name}##{action}"
21
-
22
20
  defaults = { action: action.to_s, controller: name.underscore.sub(/_controller$/, "") }
23
21
  route = Rails.application.routes.routes.routes.find { |r| r.required_defaults == defaults }
24
22
  unless route
@@ -32,6 +30,7 @@ module Swagger
32
30
  method = %w[put patch] if %w[put patch].include?(method)
33
31
  path ||= route.path.spec.to_s.sub("(.:format)", "").gsub(/:(\w+)/, "{\\1}")
34
32
 
33
+ operation_id = "#{name}##{action}.#{method}"
35
34
  operation = Swagger::DSL::Operation.new(operation_id, format: format, &block)
36
35
  Swagger::DSL.current["paths"][path] ||= {}
37
36
  Array(method).each { |single_method| Swagger::DSL.current["paths"][path][single_method] = operation }
@@ -1,5 +1,5 @@
1
1
  module Swagger
2
2
  class DSL < Hash
3
- VERSION = "2.0.1".freeze
3
+ VERSION = "2.0.2".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.1
4
+ version: 2.0.2
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.1
295
+ documentation_uri: https://www.rubydoc.info/gems/swagger-dsl/2.0.2
296
296
  post_install_message:
297
297
  rdoc_options: []
298
298
  require_paths: