swagger-dsl 1.2.1 → 1.3.0

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: 1ba3213fa4bee6bcf07aab60aea7b6761cf64a3bb15ead9f40fd9d5b35e12842
4
- data.tar.gz: 02b41c4c0890e96aa2bacfe71dfc96a9bb7cb809d65037f031a0e021b2b826a3
3
+ metadata.gz: a014577228f6444f0b6f6d4b3766d8231e280b4a8d099e1676f1d3711a832bab
4
+ data.tar.gz: a8495609f16a93e3af4dfacacafc400a3f14235836dc7b49e6907afafaa287c1
5
5
  SHA512:
6
- metadata.gz: ab9aa6f9a7227be6e379b406fc5ff88c90ebef26856b4f22dd7ee8e902394db97d079491f1a377aadf72081092627d3615c524d4042b214e783f93b5791f78e5
7
- data.tar.gz: ee5082bbf2f9acac4b3993aeccafbddfbbc3449d7d9977f5a3fce4cc1b7470f333b752a74c28d6b735fd5fb647175c83816576e6b6cbcf1ee0e5e679d0b5fc53
6
+ metadata.gz: d86adb4e85d2162ea20b5cee7f6bb99c3447a7e00a3d6ceb6d427c104e20d0819cb372664ebfcc7677c3d2854c445d5feb059ca8e56bca288e29b1f854b6ee62
7
+ data.tar.gz: b1235bc9d31acb7c2828c6e45bf3123f9f2a907079e4dee1c6008c4ebdb276d0f00ed724469dfde91f33eb2e9fc4bf030e809e14c712c255d15d99de55a91e7a
@@ -1,5 +1,9 @@
1
1
  # CHANGELOG
2
2
 
3
+ ## 1.3.0
4
+
5
+ - mod: put / patch both define
6
+
3
7
  ## 1.2.0
4
8
 
5
9
  - mod(brake): params default required
@@ -20,11 +20,14 @@ module Swagger
20
20
  if method.include?("|")
21
21
  raise NotExactMatch, "route matched but verb can be #{verb}! specify :method key like 'get'."
22
22
  end
23
+ method = ["put", "patch"] if ["put", "patch"].include?(method)
23
24
  path ||= route.path.spec.to_s.sub("(.:format)", "").gsub(/:(\w+)/, "{\\1}")
24
25
 
25
26
  operation = Swagger::DSL::Operation.new(operation_id, format: format, &block)
26
27
  Swagger::DSL.current["paths"][path] ||= {}
27
- Swagger::DSL.current["paths"][path][method] = operation
28
+ Array(method).each do |single_method|
29
+ Swagger::DSL.current["paths"][path][single_method] = operation
30
+ end
28
31
  end
29
32
 
30
33
  alias_method :oas3, :swagger
@@ -1,5 +1,5 @@
1
1
  module Swagger
2
2
  class DSL < Hash
3
- VERSION = "1.2.1".freeze
3
+ VERSION = "1.3.0".freeze
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: swagger-dsl
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.2.1
4
+ version: 1.3.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Narazaka
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2019-12-02 00:00:00.000000000 Z
11
+ date: 2019-12-03 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: jimmy
@@ -264,7 +264,7 @@ metadata:
264
264
  homepage_uri: https://github.com/Narazaka/swagger-dsl
265
265
  source_code_uri: https://github.com/Narazaka/swagger-dsl.git
266
266
  changelog_uri: https://github.com/Narazaka/swagger-dsl/blob/master/CHANGELOG.md
267
- documentation_uri: https://www.rubydoc.info/gems/swagger-dsl/1.2.1
267
+ documentation_uri: https://www.rubydoc.info/gems/swagger-dsl/1.3.0
268
268
  post_install_message:
269
269
  rdoc_options: []
270
270
  require_paths: