lib/ecoportal/api/v2/page/component.rb in ecoportal-api-oozes-0.5.7 vs lib/ecoportal/api/v2/page/component.rb in ecoportal-api-oozes-0.5.8

- old
+ new

@@ -21,9 +21,16 @@ class_resolver :signature_field_class, "Ecoportal::API::V2::Page::Component::SignatureField" class_resolver :reference_field_class, "Ecoportal::API::V2::Page::Component::ReferenceField" class_resolver :law_field_class, "Ecoportal::API::V2::Page::Component::LawField" class << self + def new_doc(type:) + { + "id" => new_uuid, + "type" => type + } + end + def get_class(doc) if doc.is_a?(Hash) case doc["type"] when "tag_field" tag_field_class