schemable 0.1.0

Sign up to get free protection for your applications and to get access to all the features.
@@ -0,0 +1,13 @@
1
+ module SwaggerDefinitions
2
+ module CommonDefinitions
3
+ def self.aggregate
4
+ [
5
+ # Import definitions like this:
6
+ # Swagger::Definitions::Model.definitions
7
+
8
+ # Make sure in swagger_helper.rb's components section you have:
9
+ # schemas: SwaggerDefinitions::CommonDefinitions.aggregate
10
+ ].flatten.reduce({}, :merge)
11
+ end
12
+ end
13
+ end
@@ -0,0 +1,7 @@
1
+ module SerializersHelper
2
+ def serializers_map
3
+ {
4
+ # TheModel: V1::TheModelSerializer
5
+ }.freeze
6
+ end
7
+ end
data/schemable.gemspec ADDED
@@ -0,0 +1,37 @@
1
+ # frozen_string_literal: true
2
+
3
+ require_relative "lib/schemable/version"
4
+
5
+ Gem::Specification.new do |spec|
6
+ spec.name = "schemable"
7
+ spec.version = Schemable::VERSION
8
+ spec.authors = ["Muhammad Nawzad"]
9
+ spec.email = ["hama127n@gmail.com"]
10
+
11
+ spec.summary = "An opiniated Gem for Rails applications to auto generate schema in JSONAPI format."
12
+ spec.description = "The schemable gem is an opiniated Gem for Rails applications to auto generate schema for models in JSONAPI format. It is designed to work with rswag's swagger documentation since it can generate the schemas for it."
13
+ spec.homepage = "https://github.com/muhammadnawzad/schemable"
14
+ spec.license = "MIT"
15
+ spec.required_ruby_version = ">= 3.1.2"
16
+
17
+ spec.metadata["allowed_push_host"] = 'https://rubygems.org'
18
+
19
+ spec.metadata["homepage_uri"] = spec.homepage
20
+ spec.metadata["source_code_uri"] = 'https://github.com/muhammadnawzad/schemable'
21
+ spec.metadata["changelog_uri"] = 'https://github.com/muhammadnawzad/schemable/blob/main/CHANGELOG.md'
22
+
23
+
24
+ spec.files = Dir.chdir(__dir__) do
25
+ `git ls-files -z`.split("\x0").reject do |f|
26
+ (File.expand_path(f) == __FILE__) || f.start_with?(*%w[bin/ test/ spec/ features/ .git .circleci appveyor])
27
+ end
28
+ end
29
+ spec.bindir = "exe"
30
+ spec.executables = spec.files.grep(%r{\Aexe/}) { |f| File.basename(f) }
31
+ spec.require_paths = ["lib"]
32
+
33
+ spec.add_dependency "jsonapi-rails", "~> 0.4.1"
34
+ spec.add_dependency "factory_bot_rails", "~> 6.2.0"
35
+
36
+ spec.metadata['rubygems_mfa_required'] = 'true'
37
+ end
data/sig/schemable.rbs ADDED
@@ -0,0 +1,4 @@
1
+ module Schemable
2
+ VERSION: String
3
+ # See the writing guide of rbs: https://github.com/ruby/rbs#guides
4
+ end
metadata ADDED
@@ -0,0 +1,96 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: schemable
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.1.0
5
+ platform: ruby
6
+ authors:
7
+ - Muhammad Nawzad
8
+ autorequire:
9
+ bindir: exe
10
+ cert_chain: []
11
+ date: 2023-05-14 00:00:00.000000000 Z
12
+ dependencies:
13
+ - !ruby/object:Gem::Dependency
14
+ name: jsonapi-rails
15
+ requirement: !ruby/object:Gem::Requirement
16
+ requirements:
17
+ - - "~>"
18
+ - !ruby/object:Gem::Version
19
+ version: 0.4.1
20
+ type: :runtime
21
+ prerelease: false
22
+ version_requirements: !ruby/object:Gem::Requirement
23
+ requirements:
24
+ - - "~>"
25
+ - !ruby/object:Gem::Version
26
+ version: 0.4.1
27
+ - !ruby/object:Gem::Dependency
28
+ name: factory_bot_rails
29
+ requirement: !ruby/object:Gem::Requirement
30
+ requirements:
31
+ - - "~>"
32
+ - !ruby/object:Gem::Version
33
+ version: 6.2.0
34
+ type: :runtime
35
+ prerelease: false
36
+ version_requirements: !ruby/object:Gem::Requirement
37
+ requirements:
38
+ - - "~>"
39
+ - !ruby/object:Gem::Version
40
+ version: 6.2.0
41
+ description: The schemable gem is an opiniated Gem for Rails applications to auto
42
+ generate schema for models in JSONAPI format. It is designed to work with rswag's
43
+ swagger documentation since it can generate the schemas for it.
44
+ email:
45
+ - hama127n@gmail.com
46
+ executables: []
47
+ extensions: []
48
+ extra_rdoc_files: []
49
+ files:
50
+ - ".rspec"
51
+ - ".rubocop.yml"
52
+ - CHANGELOG.md
53
+ - CODE_OF_CONDUCT.md
54
+ - Gemfile
55
+ - Gemfile.lock
56
+ - LICENSE.txt
57
+ - README.md
58
+ - Rakefile
59
+ - lib/generators/schemable/install_generator.rb
60
+ - lib/generators/schemable/model_generator.rb
61
+ - lib/schemable.rb
62
+ - lib/schemable/version.rb
63
+ - lib/templates/common_definitions.rb
64
+ - lib/templates/serializers_helper.rb
65
+ - schemable.gemspec
66
+ - sig/schemable.rbs
67
+ homepage: https://github.com/muhammadnawzad/schemable
68
+ licenses:
69
+ - MIT
70
+ metadata:
71
+ allowed_push_host: https://rubygems.org
72
+ homepage_uri: https://github.com/muhammadnawzad/schemable
73
+ source_code_uri: https://github.com/muhammadnawzad/schemable
74
+ changelog_uri: https://github.com/muhammadnawzad/schemable/blob/main/CHANGELOG.md
75
+ rubygems_mfa_required: 'true'
76
+ post_install_message:
77
+ rdoc_options: []
78
+ require_paths:
79
+ - lib
80
+ required_ruby_version: !ruby/object:Gem::Requirement
81
+ requirements:
82
+ - - ">="
83
+ - !ruby/object:Gem::Version
84
+ version: 3.1.2
85
+ required_rubygems_version: !ruby/object:Gem::Requirement
86
+ requirements:
87
+ - - ">="
88
+ - !ruby/object:Gem::Version
89
+ version: '0'
90
+ requirements: []
91
+ rubygems_version: 3.4.1
92
+ signing_key:
93
+ specification_version: 4
94
+ summary: An opiniated Gem for Rails applications to auto generate schema in JSONAPI
95
+ format.
96
+ test_files: []