Class: Lutaml::Xsd::XsdBundler

Inherits:
Object
  • Object
show all
Defined in:
lib/lutaml/xsd/xsd_bundler.rb

Overview

Handles collection and bundling of XSD files for packages Manages schema location rewriting for portability

Instance Method Summary collapse

Instance Method Details

#collect_xsd_files(repository, config) ⇒ Hash

Collect XSD files to include in package

Parameters:

Returns:

  • (Hash)

    Map of source paths to package data Each value is a hash with:

    • package_path: Destination path in package

    • content: Rewritten XSD content (for include_all mode)



15
16
17
18
19
20
21
22
23
24
25
26
# File 'lib/lutaml/xsd/xsd_bundler.rb', line 15

def collect_xsd_files(repository, config)
  xsd_files = {}

  if config.include_all_xsds?
    collect_all_xsds(repository, xsd_files)
    rewrite_schema_locations(xsd_files, repository) if xsd_files.any?
  else
    collect_entry_point_xsds(repository, xsd_files)
  end

  xsd_files
end