Follow-up from a resolved bot thread on #412 (discussion), filed for durable tracking.
Defect (latent / currently dormant)
ruby/scripts/generate-types.rb emits deprecation reasons on a single comment line:
puts " # @deprecated #{schema['x-deprecated-reason'] || 'deprecated'}"
# ...and the per-attribute path:
puts " # @deprecated #{ps['x-deprecated-reason'] || 'deprecated'}"
If an x-deprecated-reason ever contains a newline, puts writes the later lines as bare Ruby source, producing a syntactically invalid types.rb. The reason is derived from OpenAPI descriptions without collapsing line breaks, so a multiline description would trigger this.
Why it isn't biting today
Scanned openapi.json: zero x-deprecated-reason values currently contain a newline, so rb-generate/rb-check are green. This is a robustness gap, not an active break.
Fix
Split the reason on \n and prefix every line with the comment leader (# / # @deprecated for the first, # for continuations), mirroring the Swift generator's deprecationDocLines treatment (added in #406). Add a generator unit test feeding a multiline reason.
Low priority — hardening only.
Follow-up from a resolved bot thread on #412 (discussion), filed for durable tracking.
Defect (latent / currently dormant)
ruby/scripts/generate-types.rbemits deprecation reasons on a single comment line:If an
x-deprecated-reasonever contains a newline,putswrites the later lines as bare Ruby source, producing a syntactically invalidtypes.rb. The reason is derived from OpenAPI descriptions without collapsing line breaks, so a multiline description would trigger this.Why it isn't biting today
Scanned
openapi.json: zerox-deprecated-reasonvalues currently contain a newline, sorb-generate/rb-checkare green. This is a robustness gap, not an active break.Fix
Split the reason on
\nand prefix every line with the comment leader (#/# @deprecatedfor the first,#for continuations), mirroring the Swift generator'sdeprecationDocLinestreatment (added in #406). Add a generator unit test feeding a multiline reason.Low priority — hardening only.