Module: Jimmy::SchemaCreation::Referencing
- Defined in:
- lib/swagger/dsl/json_schema/jimmy_patch.rb
Instance Method Summary collapse
Instance Method Details
#component(id) ⇒ Object
7 8 9 10 11 |
# File 'lib/swagger/dsl/json_schema/jimmy_patch.rb', line 7 def component(id) name = "#/components/schemas/#{id}" reference_name = Swagger::DSL.current.config.[:reference_name] reference_name ? reference_name.call(name) : name end |
#cref(*args, uri, &block) ⇒ Object
13 14 15 |
# File 'lib/swagger/dsl/json_schema/jimmy_patch.rb', line 13 def cref(*args, uri, &block) ref(*args, component(uri), &block) end |