class Lutaml::Hal::ModelRegister
def add_endpoint(id:, type:, url:, model:)
def add_endpoint(id:, type:, url:, model:) @models ||= {} raise "Model with ID #{id} already registered" if @models[id] if @models.values.any? { |m| m[:url] == url && m[:type] == type } raise "Duplicate URL pattern #{url} for type #{type}" end @models[id] = { id: id, type: type, url: url, model: model } end