Module: Labimotion::ParamHelpers
- Extended by:
- Grape::API::Helpers
- Defined in:
- lib/labimotion/helpers/param_helpers.rb
Overview
Generic Helpers
Instance Method Summary collapse
-
#create_element_params ⇒ Object
Element Params.
-
#upload_element_klass_params ⇒ Object
Element Klass Params.
-
#upload_segment_klass_params ⇒ Object
Segment Klass Params.
Instance Method Details
#create_element_params ⇒ Object
Element Params
45 46 47 48 49 50 51 52 53 54 |
# File 'lib/labimotion/helpers/param_helpers.rb', line 45 params :create_element_params do requires :element_klass, type: Hash requires :name, type: String optional :properties, type: Hash optional :properties_release, type: Hash optional :collection_id, type: Integer requires :container, type: Hash optional :user_labels, type: Array optional :segments, type: Array, desc: 'Segments' end |
#upload_element_klass_params ⇒ Object
Element Klass Params
10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 |
# File 'lib/labimotion/helpers/param_helpers.rb', line 10 params :upload_element_klass_params do requires :name, type: String, desc: 'Klass Name' optional :label, type: String, desc: 'Klass label' optional :desc, type: String, desc: 'Klass desc' optional :klass_prefix, type: String, desc: 'Klass klass_prefix' optional :icon_name, type: String, desc: 'Klass icon_name' requires :properties_template, type: Hash, desc: 'Klass template' optional :properties_release, type: Hash, desc: 'Klass release' optional :released_at, type: DateTime, desc: 'Klass released_at' requires :uuid, type: String, desc: 'Klass uuid' requires :place, type: Integer, desc: 'Klass place' requires :identifier, type: String, desc: 'Klass identifier' optional :sync_time, type: DateTime, desc: 'Klass sync_time' optional :version, type: String, desc: 'Klass version' end |
#upload_segment_klass_params ⇒ Object
Segment Klass Params
67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 |
# File 'lib/labimotion/helpers/param_helpers.rb', line 67 params :upload_segment_klass_params do requires :label, type: String, desc: 'Klass label' optional :desc, type: String, desc: 'Klass desc' requires :properties_template, type: Hash, desc: 'Klass template' optional :properties_release, type: Hash, desc: 'Klass release' optional :released_at, type: DateTime, desc: 'Klass released_at' requires :uuid, type: String, desc: 'Klass uuid' requires :place, type: Integer, desc: 'Klass place' requires :identifier, type: String, desc: 'Klass identifier' optional :sync_time, type: DateTime, desc: 'Klass sync_time' optional :version, type: String, desc: 'Klass version' requires :element_klass, type: Hash do use :upload_element_klass_params end end |