rails-openapi-gen 0.0.2 → 0.0.3
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/CHANGELOG.md +40 -0
- data/CLAUDE.md +17 -5
- data/README.md +25 -0
- data/lib/rails-openapi-gen/ast_nodes/array_node.rb +101 -0
- data/lib/rails-openapi-gen/ast_nodes/base_node.rb +139 -0
- data/lib/rails-openapi-gen/ast_nodes/comment_data.rb +180 -0
- data/lib/rails-openapi-gen/ast_nodes/node_factory.rb +206 -0
- data/lib/rails-openapi-gen/ast_nodes/object_node.rb +129 -0
- data/lib/rails-openapi-gen/ast_nodes/partial_node.rb +111 -0
- data/lib/rails-openapi-gen/ast_nodes/property_node.rb +74 -0
- data/lib/rails-openapi-gen/ast_nodes.rb +129 -0
- data/lib/rails-openapi-gen/configuration.rb +154 -22
- data/lib/rails-openapi-gen/debug_helpers.rb +185 -0
- data/lib/rails-openapi-gen/engine.rb +1 -1
- data/lib/rails-openapi-gen/generators/yaml_generator.rb +242 -27
- data/lib/rails-openapi-gen/generators.rb +5 -0
- data/lib/rails-openapi-gen/importer.rb +164 -145
- data/lib/rails-openapi-gen/parsers/comment_parser.rb +1 -1
- data/lib/rails-openapi-gen/parsers/comment_parsers/attribute_parser.rb +7 -7
- data/lib/rails-openapi-gen/parsers/comment_parsers/base_attribute_parser.rb +5 -9
- data/lib/rails-openapi-gen/parsers/comment_parsers/body_parser.rb +6 -6
- data/lib/rails-openapi-gen/parsers/comment_parsers/conditional_parser.rb +1 -1
- data/lib/rails-openapi-gen/parsers/comment_parsers/operation_parser.rb +5 -5
- data/lib/rails-openapi-gen/parsers/comment_parsers/param_parser.rb +6 -6
- data/lib/rails-openapi-gen/parsers/comment_parsers/query_parser.rb +6 -6
- data/lib/rails-openapi-gen/parsers/controller_parser.rb +64 -20
- data/lib/rails-openapi-gen/parsers/jbuilder/ast_parser.rb +914 -0
- data/lib/rails-openapi-gen/parsers/jbuilder/call_detectors/array_call_detector.rb +103 -0
- data/lib/rails-openapi-gen/parsers/jbuilder/call_detectors/base_detector.rb +107 -0
- data/lib/rails-openapi-gen/parsers/jbuilder/call_detectors/cache_call_detector.rb +112 -0
- data/lib/rails-openapi-gen/parsers/jbuilder/call_detectors/json_call_detector.rb +91 -0
- data/lib/rails-openapi-gen/parsers/jbuilder/call_detectors/key_format_detector.rb +27 -0
- data/lib/rails-openapi-gen/parsers/jbuilder/call_detectors/null_handling_detector.rb +27 -0
- data/lib/rails-openapi-gen/parsers/jbuilder/call_detectors/object_manipulation_detector.rb +27 -0
- data/lib/rails-openapi-gen/parsers/jbuilder/call_detectors/partial_call_detector.rb +125 -0
- data/lib/rails-openapi-gen/parsers/jbuilder/call_detectors.rb +95 -0
- data/lib/rails-openapi-gen/parsers/jbuilder/jbuilder_parser.rb +39 -0
- data/lib/rails-openapi-gen/parsers/jbuilder/operation_comment_parser.rb +26 -0
- data/lib/rails-openapi-gen/parsers/jbuilder/processors/array_processor.rb +266 -0
- data/lib/rails-openapi-gen/parsers/jbuilder/processors/base_processor.rb +235 -0
- data/lib/rails-openapi-gen/parsers/jbuilder/processors/composite_processor.rb +97 -0
- data/lib/rails-openapi-gen/parsers/jbuilder/processors/object_processor.rb +176 -0
- data/lib/rails-openapi-gen/parsers/jbuilder/processors/partial_processor.rb +69 -0
- data/lib/rails-openapi-gen/parsers/jbuilder/processors/property_processor.rb +68 -0
- data/lib/rails-openapi-gen/parsers/jbuilder/processors.rb +10 -0
- data/lib/rails-openapi-gen/parsers/jbuilder/property_comment_parser.rb +26 -0
- data/lib/rails-openapi-gen/parsers/jbuilder.rb +10 -0
- data/lib/rails-openapi-gen/parsers/routes_parser.rb +83 -9
- data/lib/rails-openapi-gen/parsers/template_processors/jbuilder_template_processor.rb +125 -131
- data/lib/rails-openapi-gen/parsers/template_processors/response_template_processor.rb +8 -12
- data/lib/rails-openapi-gen/parsers/template_processors.rb +6 -0
- data/lib/rails-openapi-gen/parsers.rb +9 -0
- data/lib/rails-openapi-gen/processors/ast_to_schema_processor.rb +226 -0
- data/lib/rails-openapi-gen/processors/base_processor.rb +124 -0
- data/lib/rails-openapi-gen/processors/component_schema_processor.rb +35 -0
- data/lib/rails-openapi-gen/processors/openapi_schema_processor.rb +218 -0
- data/lib/rails-openapi-gen/processors.rb +7 -0
- data/lib/rails-openapi-gen/railtie.rb +1 -1
- data/lib/rails-openapi-gen/tasks/openapi.rake +4 -4
- data/lib/rails-openapi-gen/version.rb +1 -1
- data/lib/rails-openapi-gen.rb +169 -196
- data/lib/tasks/openapi_import.rake +35 -36
- data/rails-openapi-gen.gemspec +6 -5
- metadata +62 -23
- data/lib/rails-openapi-gen/parsers/jbuilder_parser.rb +0 -529
metadata
CHANGED
@@ -1,43 +1,43 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: rails-openapi-gen
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- myzkey
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2025-07-
|
11
|
+
date: 2025-07-13 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
|
-
name:
|
14
|
+
name: parser
|
15
15
|
requirement: !ruby/object:Gem::Requirement
|
16
16
|
requirements:
|
17
|
-
- - "
|
17
|
+
- - "~>"
|
18
18
|
- !ruby/object:Gem::Version
|
19
|
-
version:
|
19
|
+
version: 3.1.0
|
20
20
|
type: :runtime
|
21
21
|
prerelease: false
|
22
22
|
version_requirements: !ruby/object:Gem::Requirement
|
23
23
|
requirements:
|
24
|
-
- - "
|
24
|
+
- - "~>"
|
25
25
|
- !ruby/object:Gem::Version
|
26
|
-
version:
|
26
|
+
version: 3.1.0
|
27
27
|
- !ruby/object:Gem::Dependency
|
28
|
-
name:
|
28
|
+
name: rails
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|
30
30
|
requirements:
|
31
|
-
- - "
|
31
|
+
- - ">="
|
32
32
|
- !ruby/object:Gem::Version
|
33
|
-
version: '
|
33
|
+
version: '6.0'
|
34
34
|
type: :runtime
|
35
35
|
prerelease: false
|
36
36
|
version_requirements: !ruby/object:Gem::Requirement
|
37
37
|
requirements:
|
38
|
-
- - "
|
38
|
+
- - ">="
|
39
39
|
- !ruby/object:Gem::Version
|
40
|
-
version: '
|
40
|
+
version: '6.0'
|
41
41
|
- !ruby/object:Gem::Dependency
|
42
42
|
name: yaml
|
43
43
|
requirement: !ruby/object:Gem::Requirement
|
@@ -53,47 +53,47 @@ dependencies:
|
|
53
53
|
- !ruby/object:Gem::Version
|
54
54
|
version: '0.2'
|
55
55
|
- !ruby/object:Gem::Dependency
|
56
|
-
name:
|
56
|
+
name: rake
|
57
57
|
requirement: !ruby/object:Gem::Requirement
|
58
58
|
requirements:
|
59
59
|
- - "~>"
|
60
60
|
- !ruby/object:Gem::Version
|
61
|
-
version: '
|
61
|
+
version: '13.0'
|
62
62
|
type: :development
|
63
63
|
prerelease: false
|
64
64
|
version_requirements: !ruby/object:Gem::Requirement
|
65
65
|
requirements:
|
66
66
|
- - "~>"
|
67
67
|
- !ruby/object:Gem::Version
|
68
|
-
version: '
|
68
|
+
version: '13.0'
|
69
69
|
- !ruby/object:Gem::Dependency
|
70
|
-
name:
|
70
|
+
name: rspec
|
71
71
|
requirement: !ruby/object:Gem::Requirement
|
72
72
|
requirements:
|
73
73
|
- - "~>"
|
74
74
|
- !ruby/object:Gem::Version
|
75
|
-
version: '
|
75
|
+
version: '3.12'
|
76
76
|
type: :development
|
77
77
|
prerelease: false
|
78
78
|
version_requirements: !ruby/object:Gem::Requirement
|
79
79
|
requirements:
|
80
80
|
- - "~>"
|
81
81
|
- !ruby/object:Gem::Version
|
82
|
-
version: '
|
82
|
+
version: '3.12'
|
83
83
|
- !ruby/object:Gem::Dependency
|
84
|
-
name:
|
84
|
+
name: rubocop
|
85
85
|
requirement: !ruby/object:Gem::Requirement
|
86
86
|
requirements:
|
87
87
|
- - "~>"
|
88
88
|
- !ruby/object:Gem::Version
|
89
|
-
version: '
|
89
|
+
version: '1.50'
|
90
90
|
type: :development
|
91
91
|
prerelease: false
|
92
92
|
version_requirements: !ruby/object:Gem::Requirement
|
93
93
|
requirements:
|
94
94
|
- - "~>"
|
95
95
|
- !ruby/object:Gem::Version
|
96
|
-
version: '
|
96
|
+
version: '1.50'
|
97
97
|
description: Generates OpenAPI specs from Rails apps by parsing routes, controllers,
|
98
98
|
and view templates with @openapi comment annotations
|
99
99
|
email:
|
@@ -102,13 +102,25 @@ executables: []
|
|
102
102
|
extensions: []
|
103
103
|
extra_rdoc_files: []
|
104
104
|
files:
|
105
|
+
- CHANGELOG.md
|
105
106
|
- CLAUDE.md
|
106
107
|
- README.md
|
107
108
|
- lib/rails-openapi-gen.rb
|
109
|
+
- lib/rails-openapi-gen/ast_nodes.rb
|
110
|
+
- lib/rails-openapi-gen/ast_nodes/array_node.rb
|
111
|
+
- lib/rails-openapi-gen/ast_nodes/base_node.rb
|
112
|
+
- lib/rails-openapi-gen/ast_nodes/comment_data.rb
|
113
|
+
- lib/rails-openapi-gen/ast_nodes/node_factory.rb
|
114
|
+
- lib/rails-openapi-gen/ast_nodes/object_node.rb
|
115
|
+
- lib/rails-openapi-gen/ast_nodes/partial_node.rb
|
116
|
+
- lib/rails-openapi-gen/ast_nodes/property_node.rb
|
108
117
|
- lib/rails-openapi-gen/configuration.rb
|
118
|
+
- lib/rails-openapi-gen/debug_helpers.rb
|
109
119
|
- lib/rails-openapi-gen/engine.rb
|
120
|
+
- lib/rails-openapi-gen/generators.rb
|
110
121
|
- lib/rails-openapi-gen/generators/yaml_generator.rb
|
111
122
|
- lib/rails-openapi-gen/importer.rb
|
123
|
+
- lib/rails-openapi-gen/parsers.rb
|
112
124
|
- lib/rails-openapi-gen/parsers/comment_parser.rb
|
113
125
|
- lib/rails-openapi-gen/parsers/comment_parsers/attribute_parser.rb
|
114
126
|
- lib/rails-openapi-gen/parsers/comment_parsers/base_attribute_parser.rb
|
@@ -118,10 +130,36 @@ files:
|
|
118
130
|
- lib/rails-openapi-gen/parsers/comment_parsers/param_parser.rb
|
119
131
|
- lib/rails-openapi-gen/parsers/comment_parsers/query_parser.rb
|
120
132
|
- lib/rails-openapi-gen/parsers/controller_parser.rb
|
121
|
-
- lib/rails-openapi-gen/parsers/
|
133
|
+
- lib/rails-openapi-gen/parsers/jbuilder.rb
|
134
|
+
- lib/rails-openapi-gen/parsers/jbuilder/ast_parser.rb
|
135
|
+
- lib/rails-openapi-gen/parsers/jbuilder/call_detectors.rb
|
136
|
+
- lib/rails-openapi-gen/parsers/jbuilder/call_detectors/array_call_detector.rb
|
137
|
+
- lib/rails-openapi-gen/parsers/jbuilder/call_detectors/base_detector.rb
|
138
|
+
- lib/rails-openapi-gen/parsers/jbuilder/call_detectors/cache_call_detector.rb
|
139
|
+
- lib/rails-openapi-gen/parsers/jbuilder/call_detectors/json_call_detector.rb
|
140
|
+
- lib/rails-openapi-gen/parsers/jbuilder/call_detectors/key_format_detector.rb
|
141
|
+
- lib/rails-openapi-gen/parsers/jbuilder/call_detectors/null_handling_detector.rb
|
142
|
+
- lib/rails-openapi-gen/parsers/jbuilder/call_detectors/object_manipulation_detector.rb
|
143
|
+
- lib/rails-openapi-gen/parsers/jbuilder/call_detectors/partial_call_detector.rb
|
144
|
+
- lib/rails-openapi-gen/parsers/jbuilder/jbuilder_parser.rb
|
145
|
+
- lib/rails-openapi-gen/parsers/jbuilder/operation_comment_parser.rb
|
146
|
+
- lib/rails-openapi-gen/parsers/jbuilder/processors.rb
|
147
|
+
- lib/rails-openapi-gen/parsers/jbuilder/processors/array_processor.rb
|
148
|
+
- lib/rails-openapi-gen/parsers/jbuilder/processors/base_processor.rb
|
149
|
+
- lib/rails-openapi-gen/parsers/jbuilder/processors/composite_processor.rb
|
150
|
+
- lib/rails-openapi-gen/parsers/jbuilder/processors/object_processor.rb
|
151
|
+
- lib/rails-openapi-gen/parsers/jbuilder/processors/partial_processor.rb
|
152
|
+
- lib/rails-openapi-gen/parsers/jbuilder/processors/property_processor.rb
|
153
|
+
- lib/rails-openapi-gen/parsers/jbuilder/property_comment_parser.rb
|
122
154
|
- lib/rails-openapi-gen/parsers/routes_parser.rb
|
155
|
+
- lib/rails-openapi-gen/parsers/template_processors.rb
|
123
156
|
- lib/rails-openapi-gen/parsers/template_processors/jbuilder_template_processor.rb
|
124
157
|
- lib/rails-openapi-gen/parsers/template_processors/response_template_processor.rb
|
158
|
+
- lib/rails-openapi-gen/processors.rb
|
159
|
+
- lib/rails-openapi-gen/processors/ast_to_schema_processor.rb
|
160
|
+
- lib/rails-openapi-gen/processors/base_processor.rb
|
161
|
+
- lib/rails-openapi-gen/processors/component_schema_processor.rb
|
162
|
+
- lib/rails-openapi-gen/processors/openapi_schema_processor.rb
|
125
163
|
- lib/rails-openapi-gen/railtie.rb
|
126
164
|
- lib/rails-openapi-gen/tasks/openapi.rake
|
127
165
|
- lib/rails-openapi-gen/version.rb
|
@@ -133,6 +171,7 @@ licenses:
|
|
133
171
|
metadata:
|
134
172
|
homepage_uri: https://github.com/myzkey/rails-openapi-gen
|
135
173
|
source_code_uri: https://github.com/myzkey/rails-openapi-gen
|
174
|
+
rubygems_mfa_required: 'true'
|
136
175
|
post_install_message:
|
137
176
|
rdoc_options: []
|
138
177
|
require_paths:
|
@@ -141,7 +180,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
141
180
|
requirements:
|
142
181
|
- - ">="
|
143
182
|
- !ruby/object:Gem::Version
|
144
|
-
version:
|
183
|
+
version: 3.0.0
|
145
184
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
146
185
|
requirements:
|
147
186
|
- - ">="
|