swagger_autogenerate 1.2.0 → 1.2.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: '08b276dd458b54318a75f32c666d40840602065d89a8fa26e7ffac44341e0f15'
4
- data.tar.gz: bacd1e78fe71a2909d112901a9e6ba2900117b7e2a45522b1d25f11b542aa624
3
+ metadata.gz: f6f642d29cd299f7f2e7b32b7e87a89f6a6b0f037f11bd5c7bcabbfd56d34de1
4
+ data.tar.gz: 624631c39528ce4d096325dc638e2031363424124cc9922032005a44e26a2fd8
5
5
  SHA512:
6
- metadata.gz: 9f6c2c1c285f982a2677daf6d90040bed5682595fd65ee690ac2e01d188a37bc4afca6f4531fc4e8daad142dd5098a54d4dcb336c58ebc97e2ec305afba9eff7
7
- data.tar.gz: 4c5d8642ac585f043cab7193e3eb9fb7fbe3c027c41d6bcdae6b17b5f6b905a4559469db54f166a9014a4283f9c1d798968a30f18c1ee38160c4579985d5626a
6
+ metadata.gz: 2208abc4d89eac17e33f02f3c8a541ee9f68c6b1590ed93a7785ee941b9cc31e3b7fe3f74ad16689cf93639329fe85a30334651449ce7ace10699ef3ef4e1760
7
+ data.tar.gz: 8ef10a7cd712aa5114ac38395b189d84f7ec83fa9b05b64ac5ce0c8b5f7632d4cb33dea35d4cc4211c66471dae5f7ee6e15810fe7394951d1afd07ef0cd17154
data/CHANGELOG.md CHANGED
@@ -13,5 +13,6 @@
13
13
  ## [1.1.1] - 2024-06-26
14
14
  ## [1.1.2] - 2024-08-17
15
15
  ## [1.2.0] - 2024-09-08
16
+ ## [1.2.1] - 2024-09-08
16
17
 
17
18
  - Initial release
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- swagger_autogenerate (1.2.0)
4
+ swagger_autogenerate (1.2.1)
5
5
 
6
6
  GEM
7
7
  remote: https://rubygems.org/
@@ -303,13 +303,19 @@ module SwaggerAutogenerate
303
303
  { 'type' => 'array', 'items' => { 'oneOf' => item_schemas.uniq } }
304
304
  end
305
305
  when String
306
- { 'type' => 'string', 'example' => json }
306
+ if is_valid_date?(json)
307
+ { 'type' => 'Date', 'example' => json.to_date.to_s }
308
+ else
309
+ { 'type' => 'string', 'example' => json.to_s }
310
+ end
307
311
  when Integer
308
312
  { 'type' => 'integer', 'example' => json }
309
313
  when Float
310
314
  { 'type' => 'number', 'example' => json }
311
315
  when TrueClass, FalseClass
312
316
  { 'type' => 'boolean', 'example' => json }
317
+ when Date, Time, DateTime
318
+ { 'type' => 'Date', 'example' => json.to_date.to_s }
313
319
  else
314
320
  { 'type' => 'string', 'example' => json.to_s }
315
321
  end
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module SwaggerAutogenerate
4
- VERSION = "1.2.0"
4
+ VERSION = "1.2.1"
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: swagger_autogenerate
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.2.0
4
+ version: 1.2.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - MohammedBuraiah
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2024-09-08 00:00:00.000000000 Z
11
+ date: 2024-09-10 00:00:00.000000000 Z
12
12
  dependencies: []
13
13
  description: Generating Swagger YAML Automatically Based on Existing Test Cases in
14
14
  Ruby on Rails