Module: Lutaml::Model::Schema

Defined in:
lib/lutaml/model/schema.rb,
lib/lutaml/model/schema/xsd_schema.rb,
lib/lutaml/model/schema/json_schema.rb,
lib/lutaml/model/schema/yaml_schema.rb,
lib/lutaml/model/schema/xml_compiler.rb,
lib/lutaml/model/schema/relaxng_schema.rb,
lib/lutaml/model/schema/json_schema_parser.rb,
lib/lutaml/model/schema/templates/simple_type.rb

Defined Under Namespace

Modules: Templates, XmlCompiler Classes: JsonSchema, JsonSchemaParser, RelaxngSchema, XsdSchema, YamlSchema

Class Method Summary collapse

Class Method Details

.from_xml(xml, options = {}) ⇒ Object



26
27
28
# File 'lib/lutaml/model/schema.rb', line 26

def self.from_xml(xml, options = {})
  XmlCompiler.to_models(xml, options)
end

.to_json(klass, options = {}) ⇒ Object



10
11
12
# File 'lib/lutaml/model/schema.rb', line 10

def self.to_json(klass, options = {})
  JsonSchema.generate(klass, options)
end

.to_relaxng(klass, options = {}) ⇒ Object



18
19
20
# File 'lib/lutaml/model/schema.rb', line 18

def self.to_relaxng(klass, options = {})
  RelaxngSchema.generate(klass, options)
end

.to_xsd(klass, options = {}) ⇒ Object



14
15
16
# File 'lib/lutaml/model/schema.rb', line 14

def self.to_xsd(klass, options = {})
  XsdSchema.generate(klass, options)
end

.to_yaml(klass, options = {}) ⇒ Object



22
23
24
# File 'lib/lutaml/model/schema.rb', line 22

def self.to_yaml(klass, options = {})
  YamlSchema.generate(klass, options)
end