Module: GrapeOAS::Constants::TypePatterns
- Defined in:
- lib/grape_oas/constants.rb
Overview
Regex patterns for Grape’s stringified type notations. Grape converts ‘type: [SomeClass]` to “[SomeClass]” and `type: [String, Integer]` to “[String, Integer]” for documentation.
Constant Summary collapse
- CONST_NAME =
/(?:::)?[A-Z]\w*(?:::[A-Z]\w*)*/- TYPED_ARRAY =
/\A\[(?<inner>#{CONST_NAME})\]\z/- MULTI_TYPE =
/\A\[(#{CONST_NAME}(?:,\s*#{CONST_NAME})+)\]\z/