dry-swagger 0.6.1 → 0.7.0
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 +4 -4
- data/.gitignore +2 -1
- data/Gemfile.lock +1 -1
- data/README.md +1 -1
- data/lib/dry/swagger.rb +1 -0
- data/lib/dry/swagger/railtie.rb +15 -0
- data/lib/{tasks → dry/swagger/tasks}/configuration_generator.rake +2 -0
- data/lib/dry/swagger/version.rb +1 -1
- metadata +3 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: b6fef3fca461d0c5cfd951ae54bf8dff0051728aa97a4ab5918372f7821c4b38
|
4
|
+
data.tar.gz: 0e04e6c2f9701b801d1d53aa99d97b605cff32e4c491bdacc81fcf2a9f4ecfd7
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: eecb6dd9fff1e8c5fee20ea8a7d81f4090ea6617eb887eeb16b84757a9d41d9bfaee3c6584a149c34f30bf76e954337cac508a4fc698e1aaf1cfd8435edc1c6e
|
7
|
+
data.tar.gz: 826aa9737d2ae9ba26419662589d6f368d50f70198cadc34c0f8f037d3837298c541b07f3c9f4690d8c1d2fa9005d526b2d9d01b8f1120b8bff32666e3c0b24a
|
data/.gitignore
CHANGED
data/Gemfile.lock
CHANGED
data/README.md
CHANGED
@@ -312,7 +312,7 @@ You can also modify the fields by passing a block after the .call() method.
|
|
312
312
|
|
313
313
|
end.to_swagger()
|
314
314
|
|
315
|
-
##Custom Configuration For Your Project
|
315
|
+
## Custom Configuration For Your Project
|
316
316
|
You can override default configurations by changing the values in the `config/initializers/dry-swagger.rb` file generated from the rake command in the Installation section.
|
317
317
|
|
318
318
|
To modify the descriptions for the Contracts, modify the values in `config/locale/dry-swagger.yml`.
|
data/lib/dry/swagger.rb
CHANGED
@@ -0,0 +1,15 @@
|
|
1
|
+
require 'dry/swagger'
|
2
|
+
require 'rails'
|
3
|
+
|
4
|
+
module Dry
|
5
|
+
module Swagger
|
6
|
+
class Railtie < Rails::Railtie
|
7
|
+
railtie_name :"dry-swagger"
|
8
|
+
|
9
|
+
rake_tasks do
|
10
|
+
path = File.expand_path(__dir__)
|
11
|
+
Dir.glob("#{path}/tasks/**/*.rake").each { |f| load f }
|
12
|
+
end
|
13
|
+
end
|
14
|
+
end
|
15
|
+
end
|
@@ -4,6 +4,7 @@ namespace 'dry-swagger' do
|
|
4
4
|
desc 'Create a configuration file for Struct and Contract'
|
5
5
|
task :create_configuration_file do
|
6
6
|
FileUtils.mkdir_p "#{ Dir.pwd }/config/initializers/"
|
7
|
+
puts "Created #{ Dir.pwd }/config/initializers/dry-swagger.rb"
|
7
8
|
File.open("#{ Dir.pwd }/config/initializers/dry-swagger.rb", "w") { |file|
|
8
9
|
file.puts 'Dry::Swagger::Config::StructConfiguration.configuration do |config|
|
9
10
|
config.enable_required_validation = true
|
@@ -26,6 +27,7 @@ end'
|
|
26
27
|
desc 'Create a YAML file for Contract swagger field descriptions'
|
27
28
|
task :create_contract_descriptions_yaml do
|
28
29
|
FileUtils.mkdir_p "#{ Dir.pwd }/config/locales/"
|
30
|
+
puts "Created #{ Dir.pwd }/config/locales/dry-swagger.yml"
|
29
31
|
File.open("#{ Dir.pwd }/config/locales/dry-swagger.yml", "w") { |file|
|
30
32
|
file.puts 'en:
|
31
33
|
contract:
|
data/lib/dry/swagger/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: dry-swagger
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.7.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Jane-Terziev
|
@@ -39,10 +39,11 @@ files:
|
|
39
39
|
- lib/dry/swagger/documentation_generator.rb
|
40
40
|
- lib/dry/swagger/errors/missing_hash_schema_error.rb
|
41
41
|
- lib/dry/swagger/errors/missing_type_error.rb
|
42
|
+
- lib/dry/swagger/railtie.rb
|
42
43
|
- lib/dry/swagger/struct_parser.rb
|
44
|
+
- lib/dry/swagger/tasks/configuration_generator.rake
|
43
45
|
- lib/dry/swagger/types.rb
|
44
46
|
- lib/dry/swagger/version.rb
|
45
|
-
- lib/tasks/configuration_generator.rake
|
46
47
|
homepage: https://github.com/Jane-Terziev/dry-swagger
|
47
48
|
licenses:
|
48
49
|
- MIT
|