lutaml-xsd 0.1.0 → 1.0.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (58) hide show
  1. checksums.yaml +4 -4
  2. data/.rubocop.yml +3 -0
  3. data/Gemfile +6 -0
  4. data/LICENSE.md +33 -0
  5. data/README.adoc +141 -0
  6. data/lib/lutaml/xsd/all.rb +24 -0
  7. data/lib/lutaml/xsd/annotation.rb +20 -0
  8. data/lib/lutaml/xsd/any.rb +26 -0
  9. data/lib/lutaml/xsd/any_attribute.rb +22 -0
  10. data/lib/lutaml/xsd/appinfo.rb +18 -0
  11. data/lib/lutaml/xsd/attribute.rb +34 -0
  12. data/lib/lutaml/xsd/attribute_group.rb +28 -0
  13. data/lib/lutaml/xsd/choice.rb +35 -0
  14. data/lib/lutaml/xsd/complex_content.rb +26 -0
  15. data/lib/lutaml/xsd/complex_type.rb +44 -0
  16. data/lib/lutaml/xsd/documentation.rb +20 -0
  17. data/lib/lutaml/xsd/element.rb +54 -0
  18. data/lib/lutaml/xsd/enumeration.rb +18 -0
  19. data/lib/lutaml/xsd/extension_complex_content.rb +34 -0
  20. data/lib/lutaml/xsd/extension_simple_content.rb +26 -0
  21. data/lib/lutaml/xsd/field.rb +18 -0
  22. data/lib/lutaml/xsd/fraction_digits.rb +22 -0
  23. data/lib/lutaml/xsd/glob.rb +63 -0
  24. data/lib/lutaml/xsd/group.rb +35 -0
  25. data/lib/lutaml/xsd/import.rb +26 -0
  26. data/lib/lutaml/xsd/include.rb +24 -0
  27. data/lib/lutaml/xsd/key.rb +25 -0
  28. data/lib/lutaml/xsd/keyref.rb +26 -0
  29. data/lib/lutaml/xsd/length.rb +20 -0
  30. data/lib/lutaml/xsd/list.rb +21 -0
  31. data/lib/lutaml/xsd/max_exclusive.rb +18 -0
  32. data/lib/lutaml/xsd/max_inclusive.rb +16 -0
  33. data/lib/lutaml/xsd/max_length.rb +18 -0
  34. data/lib/lutaml/xsd/min_exclusive.rb +18 -0
  35. data/lib/lutaml/xsd/min_inclusive.rb +16 -0
  36. data/lib/lutaml/xsd/min_length.rb +18 -0
  37. data/lib/lutaml/xsd/notation.rb +24 -0
  38. data/lib/lutaml/xsd/pattern.rb +18 -0
  39. data/lib/lutaml/xsd/redefine.rb +28 -0
  40. data/lib/lutaml/xsd/restriction_complex_content.rb +34 -0
  41. data/lib/lutaml/xsd/restriction_simple_content.rb +52 -0
  42. data/lib/lutaml/xsd/restriction_simple_type.rb +46 -0
  43. data/lib/lutaml/xsd/schema.rb +180 -0
  44. data/lib/lutaml/xsd/selector.rb +20 -0
  45. data/lib/lutaml/xsd/sequence.rb +34 -0
  46. data/lib/lutaml/xsd/simple_content.rb +24 -0
  47. data/lib/lutaml/xsd/simple_type.rb +28 -0
  48. data/lib/lutaml/xsd/total_digits.rb +22 -0
  49. data/lib/lutaml/xsd/union.rb +22 -0
  50. data/lib/lutaml/xsd/unique.rb +24 -0
  51. data/lib/lutaml/xsd/version.rb +1 -1
  52. data/lib/lutaml/xsd/white_space.rb +20 -0
  53. data/lib/lutaml/xsd/xsd.rb +16 -0
  54. data/lib/lutaml/xsd.rb +9 -7
  55. data/lutaml-xsd.gemspec +3 -0
  56. metadata +81 -6
  57. data/LICENSE.txt +0 -21
  58. data/README.md +0 -43
@@ -0,0 +1,180 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Lutaml
4
+ module Xsd
5
+ # rubocop:disable Metrics/ClassLength
6
+ class Schema < Model::Serializable
7
+ attribute :id, :string
8
+ attribute :lang, :string
9
+ attribute :xmlns, :string
10
+ attribute :version, :string
11
+ attribute :imported, :boolean
12
+ attribute :final_default, :string
13
+ attribute :block_default, :string
14
+ attribute :target_namespace, :string
15
+ attribute :element_form_default, :string
16
+ attribute :attribute_form_default, :string
17
+ attribute :imports, Import, collection: true
18
+ attribute :includes, Include, collection: true
19
+
20
+ attribute :group, Group, collection: true
21
+ attribute :import, Import, collection: true
22
+ attribute :element, Element, collection: true
23
+ attribute :include, Include, collection: true
24
+ attribute :notation, Notation, collection: true
25
+ attribute :redefine, Redefine, collection: true
26
+ attribute :attribute, Attribute, collection: true
27
+ attribute :annotation, Annotation, collection: true
28
+ attribute :simple_type, SimpleType, collection: true
29
+ attribute :complex_type, ComplexType, collection: true
30
+ attribute :attribute_group, AttributeGroup, collection: true
31
+
32
+ xml do
33
+ root "schema", mixed: true
34
+ namespace "http://www.w3.org/2001/XMLSchema", "xsd"
35
+
36
+ map_element :group, to: :group
37
+ map_element :element, to: :element
38
+ map_element :redefine, to: :redefine
39
+ map_element :notation, to: :notation
40
+ map_element :attribute, to: :attribute
41
+ map_element :annotation, to: :annotation
42
+ map_element :simpleType, to: :simple_type
43
+ map_element :complexType, to: :complex_type
44
+ map_element :attributeGroup, to: :attribute_group
45
+ map_element :import, to: :import, with: { from: :import_from_schema, to: :import_to_schema }
46
+ map_element :include, to: :include, with: { from: :include_from_schema, to: :include_to_schema }
47
+
48
+ map_attribute :attributeFormDefault, to: :attribute_form_default
49
+ map_attribute :elementFormDefault, to: :element_form_default
50
+ map_attribute :targetNamespace, to: :target_namespace
51
+ map_attribute :finalDefault, to: :final_default
52
+ map_attribute :blockDefault, to: :block_default
53
+ map_attribute :version, to: :version
54
+ map_attribute :id, to: :id
55
+ map_attribute :lang, to: :lang
56
+ end
57
+
58
+ def import_from_schema(model, value)
59
+ value.each do |schema|
60
+ setup_import_and_include("import", model, schema, namespace: schema["attributes"]["namespace"])
61
+ end
62
+ end
63
+
64
+ def import_to_schema(model, parent, _doc)
65
+ return if model.imported
66
+
67
+ model.imported = true
68
+ model.imports.each do |imported_schema|
69
+ parent.add_child(imported_schema.to_xml)
70
+ end
71
+ end
72
+
73
+ def include_from_schema(model, value)
74
+ value.each do |schema|
75
+ setup_import_and_include("include", model, schema)
76
+ end
77
+ end
78
+
79
+ def include_to_schema(model, parent, _doc)
80
+ model.includes.each_with_index do |schema_hash, index|
81
+ parent.add_child(schema_hash.to_xml)
82
+ model.includes.delete_at(index)
83
+ end
84
+ end
85
+
86
+ private
87
+
88
+ def setup_import_and_include(klass, model, schema, args = {})
89
+ instance = init_instance_of(klass, schema["attributes"] || {}, args)
90
+ annotation_object(instance, schema)
91
+ model.send("#{klass}s") << instance
92
+ schema_path = instance.schema_path
93
+ return if self.class.in_progress?(schema_path) || schema_path.nil?
94
+
95
+ self.class.add_in_progress(schema_path)
96
+ model.send(klass) << insert_in_processed_schemas(instance)
97
+ self.class.remove_in_progress(schema_path)
98
+ end
99
+
100
+ def dig_schema_location(schema_hash)
101
+ schema_hash&.dig("__schema_location", :schema_location)
102
+ end
103
+
104
+ def schema_location?(schema_hash)
105
+ schema_hash&.dig("__schema_location")&.key?(:schema_location)
106
+ end
107
+
108
+ def init_instance_of(klass, schema_hash, args = {})
109
+ args[:id] = schema_hash["id"]
110
+ args[:schema_path] = dig_schema_location(schema_hash)
111
+ Lutaml::Xsd.const_get(klass.capitalize).new(**args)
112
+ end
113
+
114
+ def insert_in_processed_schemas(instance)
115
+ parsed_schema = schema_by_location_or_instance(instance)
116
+ return unless parsed_schema
117
+
118
+ self.class.schema_processed(instance.schema_path, parsed_schema)
119
+ parsed_schema
120
+ end
121
+
122
+ def schema_by_location_or_instance(instance)
123
+ schema_path = instance.schema_path
124
+ return unless schema_path && Glob.location?
125
+
126
+ self.class.processed_schemas[schema_path] ||
127
+ Lutaml::Xsd.parse(
128
+ instance.fetch_schema,
129
+ location: Glob.location,
130
+ nested_schema: true
131
+ )
132
+ end
133
+
134
+ def annotation_object(instance, schema)
135
+ elements = schema["elements"] || {}
136
+ annotation_key = elements.keys.find { |key| key.include?("annotation") }
137
+ return unless annotation_key
138
+
139
+ instance.annotation = Annotation.apply_mappings(elements[annotation_key], :xml)
140
+ end
141
+
142
+ class << self
143
+ def reset_processed_schemas
144
+ @processed_schemas = {}
145
+ end
146
+
147
+ def processed_schemas
148
+ @processed_schemas ||= {}
149
+ end
150
+
151
+ def schema_processed?(location)
152
+ processed_schemas[location]
153
+ end
154
+
155
+ def schema_processed(location, schema)
156
+ return if location.nil?
157
+
158
+ processed_schemas[location] = schema
159
+ end
160
+
161
+ def in_progress
162
+ @in_progress ||= []
163
+ end
164
+
165
+ def in_progress?(location)
166
+ in_progress.include?(location)
167
+ end
168
+
169
+ def add_in_progress(location)
170
+ in_progress << location
171
+ end
172
+
173
+ def remove_in_progress(location)
174
+ in_progress.delete(location)
175
+ end
176
+ end
177
+ end
178
+ # rubocop:enable Metrics/ClassLength
179
+ end
180
+ end
@@ -0,0 +1,20 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Lutaml
4
+ module Xsd
5
+ class Selector < Model::Serializable
6
+ attribute :id, :string
7
+ attribute :xpath, :string
8
+ attribute :annotation, Annotation
9
+
10
+ xml do
11
+ root "selector", mixed: true
12
+ namespace "http://www.w3.org/2001/XMLSchema", "xsd"
13
+
14
+ map_attribute :id, to: :id
15
+ map_attribute :xpath, to: :xpath
16
+ map_element :annotation, to: :annotation
17
+ end
18
+ end
19
+ end
20
+ end
@@ -0,0 +1,34 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Lutaml
4
+ module Xsd
5
+ class Choice < Model::Serializable; end
6
+
7
+ class Sequence < Model::Serializable
8
+ attribute :id, :string
9
+ attribute :min_occurs, :string
10
+ attribute :max_occurs, :string
11
+ attribute :annotation, Annotation
12
+ attribute :sequence, Sequence, collection: true
13
+ attribute :element, Element, collection: true
14
+ attribute :choice, Choice, collection: true
15
+ attribute :group, Group, collection: true
16
+ attribute :any, Any, collection: true
17
+
18
+ xml do
19
+ root "sequence", mixed: true
20
+ namespace "http://www.w3.org/2001/XMLSchema", "xsd"
21
+
22
+ map_attribute :id, to: :id
23
+ map_attribute :minOccurs, to: :min_occurs
24
+ map_attribute :maxOccurs, to: :max_occurs
25
+ map_element :annotation, to: :annotation
26
+ map_element :sequence, to: :sequence
27
+ map_element :element, to: :element
28
+ map_element :choice, to: :choice
29
+ map_element :group, to: :group
30
+ map_element :any, to: :any
31
+ end
32
+ end
33
+ end
34
+ end
@@ -0,0 +1,24 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Lutaml
4
+ module Xsd
5
+ class SimpleContent < Model::Serializable
6
+ attribute :id, :string
7
+ attribute :base, :string
8
+ attribute :annotation, Annotation
9
+ attribute :extension, ExtensionSimpleContent
10
+ attribute :restriction, RestrictionSimpleContent
11
+
12
+ xml do
13
+ root "simpleContent", mixed: true
14
+ namespace "http://www.w3.org/2001/XMLSchema", "xsd"
15
+
16
+ map_attribute :id, to: :id
17
+ map_attribute :base, to: :base
18
+ map_element :restriction, to: :restriction
19
+ map_element :annotation, to: :annotation
20
+ map_element :extension, to: :extension
21
+ end
22
+ end
23
+ end
24
+ end
@@ -0,0 +1,28 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Lutaml
4
+ module Xsd
5
+ class SimpleType < Model::Serializable
6
+ attribute :id, :string
7
+ attribute :name, :string
8
+ attribute :final, :string
9
+ attribute :list, List
10
+ attribute :union, Union
11
+ attribute :annotation, Annotation
12
+ attribute :restriction, RestrictionSimpleType
13
+
14
+ xml do
15
+ root "simpleType", mixed: true
16
+ namespace "http://www.w3.org/2001/XMLSchema", "xsd"
17
+
18
+ map_attribute :id, to: :id
19
+ map_attribute :name, to: :name
20
+ map_attribute :final, to: :final
21
+ map_element :list, to: :list
22
+ map_element :union, to: :union
23
+ map_element :annotation, to: :annotation
24
+ map_element :restriction, to: :restriction
25
+ end
26
+ end
27
+ end
28
+ end
@@ -0,0 +1,22 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Lutaml
4
+ module Xsd
5
+ class TotalDigits < Model::Serializable
6
+ attribute :id, :string
7
+ attribute :value, :string
8
+ attribute :fixed, :string
9
+ attribute :annotation, Annotation
10
+
11
+ xml do
12
+ root "totalDigits", mixed: true
13
+ namespace "http://www.w3.org/2001/XMLSchema", "xsd"
14
+
15
+ map_attribute :id, to: :id
16
+ map_attribute :value, to: :value
17
+ map_attribute :fixed, to: :fixed
18
+ map_element :annotation, to: :annotation
19
+ end
20
+ end
21
+ end
22
+ end
@@ -0,0 +1,22 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Lutaml
4
+ module Xsd
5
+ class Union < Model::Serializable
6
+ attribute :id, :string
7
+ attribute :member_types, :string, default: -> { "" }
8
+ attribute :annotation, Annotation
9
+ attribute :simple_type, SimpleType, collection: true
10
+
11
+ xml do
12
+ root "union", mixed: true
13
+ namespace "http://www.w3.org/2001/XMLSchema", "xsd"
14
+
15
+ map_attribute :id, to: :id
16
+ map_attribute :memberTypes, to: :member_types
17
+ map_element :annotation, to: :annotation
18
+ map_element :simpleType, to: :simple_type
19
+ end
20
+ end
21
+ end
22
+ end
@@ -0,0 +1,24 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Lutaml
4
+ module Xsd
5
+ class Unique < Model::Serializable
6
+ attribute :id, :string
7
+ attribute :name, :string
8
+ attribute :selector, Selector
9
+ attribute :annotation, Annotation
10
+ attribute :field, Field, collection: true
11
+
12
+ xml do
13
+ root "unique", mixed: true
14
+ namespace "http://www.w3.org/2001/XMLSchema", "xsd"
15
+
16
+ map_attribute :id, to: :id
17
+ map_attribute :name, to: :name
18
+ map_element :annotation, to: :annotation
19
+ map_element :selector, to: :selector
20
+ map_element :field, to: :field
21
+ end
22
+ end
23
+ end
24
+ end
@@ -2,6 +2,6 @@
2
2
 
3
3
  module Lutaml
4
4
  module Xsd
5
- VERSION = "0.1.0"
5
+ VERSION = "1.0.1"
6
6
  end
7
7
  end
@@ -0,0 +1,20 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Lutaml
4
+ module Xsd
5
+ class WhiteSpace < Model::Serializable
6
+ attribute :id, :string
7
+ attribute :fixed, :string
8
+ attribute :value, :string
9
+
10
+ xml do
11
+ root "whiteSpace", mixed: true
12
+ namespace "http://www.w3.org/2001/XMLSchema", "xsd"
13
+
14
+ map_attribute :id, to: :id
15
+ map_attribute :fixed, to: :fixed
16
+ map_attribute :value, to: :value
17
+ end
18
+ end
19
+ end
20
+ end
@@ -0,0 +1,16 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Lutaml
4
+ module Xsd
5
+ class Error < StandardError; end
6
+
7
+ module_function
8
+
9
+ def parse(xsd, location: nil, nested_schema: false)
10
+ Schema.reset_processed_schemas unless nested_schema
11
+
12
+ Glob.path_or_url(location)
13
+ Schema.from_xml(xsd)
14
+ end
15
+ end
16
+ end
data/lib/lutaml/xsd.rb CHANGED
@@ -1,10 +1,12 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- require_relative "xsd/version"
3
+ require "zeitwerk"
4
+ require "lutaml/model"
5
+ require_relative "xsd/xsd"
4
6
 
5
- module Lutaml
6
- module Xsd
7
- class Error < StandardError; end
8
- # Your code goes here...
9
- end
10
- end
7
+ Lutaml::Model::Config.xml_adapter_type = :nokogiri
8
+
9
+ loader = Zeitwerk::Loader.for_gem(warn_on_extra_files: true)
10
+ loader.push_dir("#{__dir__}/xsd", namespace: Lutaml::Xsd)
11
+ loader.ignore("#{__dir__}/lib/lutaml/xsd.rb")
12
+ loader.setup
data/lutaml-xsd.gemspec CHANGED
@@ -31,4 +31,7 @@ Gem::Specification.new do |spec|
31
31
  end
32
32
 
33
33
  spec.test_files = `git ls-files -- {spec}/*`.split("\n")
34
+
35
+ spec.add_dependency "lutaml-model", "~> 0.5"
36
+ spec.add_dependency "zeitwerk"
34
37
  end
metadata CHANGED
@@ -1,15 +1,43 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: lutaml-xsd
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0
4
+ version: 1.0.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ribose Inc.
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2024-11-19 00:00:00.000000000 Z
12
- dependencies: []
11
+ date: 2025-01-30 00:00:00.000000000 Z
12
+ dependencies:
13
+ - !ruby/object:Gem::Dependency
14
+ name: lutaml-model
15
+ requirement: !ruby/object:Gem::Requirement
16
+ requirements:
17
+ - - "~>"
18
+ - !ruby/object:Gem::Version
19
+ version: '0.5'
20
+ type: :runtime
21
+ prerelease: false
22
+ version_requirements: !ruby/object:Gem::Requirement
23
+ requirements:
24
+ - - "~>"
25
+ - !ruby/object:Gem::Version
26
+ version: '0.5'
27
+ - !ruby/object:Gem::Dependency
28
+ name: zeitwerk
29
+ requirement: !ruby/object:Gem::Requirement
30
+ requirements:
31
+ - - ">="
32
+ - !ruby/object:Gem::Version
33
+ version: '0'
34
+ type: :runtime
35
+ prerelease: false
36
+ version_requirements: !ruby/object:Gem::Requirement
37
+ requirements:
38
+ - - ">="
39
+ - !ruby/object:Gem::Version
40
+ version: '0'
13
41
  description: Parser and builder for XML Schema Definition (XSD) files.
14
42
  email:
15
43
  - open.source@ribose.com
@@ -25,13 +53,60 @@ files:
25
53
  - CHANGELOG.md
26
54
  - CODE_OF_CONDUCT.md
27
55
  - Gemfile
28
- - LICENSE.txt
29
- - README.md
56
+ - LICENSE.md
57
+ - README.adoc
30
58
  - Rakefile
31
59
  - bin/console
32
60
  - bin/setup
33
61
  - lib/lutaml/xsd.rb
62
+ - lib/lutaml/xsd/all.rb
63
+ - lib/lutaml/xsd/annotation.rb
64
+ - lib/lutaml/xsd/any.rb
65
+ - lib/lutaml/xsd/any_attribute.rb
66
+ - lib/lutaml/xsd/appinfo.rb
67
+ - lib/lutaml/xsd/attribute.rb
68
+ - lib/lutaml/xsd/attribute_group.rb
69
+ - lib/lutaml/xsd/choice.rb
70
+ - lib/lutaml/xsd/complex_content.rb
71
+ - lib/lutaml/xsd/complex_type.rb
72
+ - lib/lutaml/xsd/documentation.rb
73
+ - lib/lutaml/xsd/element.rb
74
+ - lib/lutaml/xsd/enumeration.rb
75
+ - lib/lutaml/xsd/extension_complex_content.rb
76
+ - lib/lutaml/xsd/extension_simple_content.rb
77
+ - lib/lutaml/xsd/field.rb
78
+ - lib/lutaml/xsd/fraction_digits.rb
79
+ - lib/lutaml/xsd/glob.rb
80
+ - lib/lutaml/xsd/group.rb
81
+ - lib/lutaml/xsd/import.rb
82
+ - lib/lutaml/xsd/include.rb
83
+ - lib/lutaml/xsd/key.rb
84
+ - lib/lutaml/xsd/keyref.rb
85
+ - lib/lutaml/xsd/length.rb
86
+ - lib/lutaml/xsd/list.rb
87
+ - lib/lutaml/xsd/max_exclusive.rb
88
+ - lib/lutaml/xsd/max_inclusive.rb
89
+ - lib/lutaml/xsd/max_length.rb
90
+ - lib/lutaml/xsd/min_exclusive.rb
91
+ - lib/lutaml/xsd/min_inclusive.rb
92
+ - lib/lutaml/xsd/min_length.rb
93
+ - lib/lutaml/xsd/notation.rb
94
+ - lib/lutaml/xsd/pattern.rb
95
+ - lib/lutaml/xsd/redefine.rb
96
+ - lib/lutaml/xsd/restriction_complex_content.rb
97
+ - lib/lutaml/xsd/restriction_simple_content.rb
98
+ - lib/lutaml/xsd/restriction_simple_type.rb
99
+ - lib/lutaml/xsd/schema.rb
100
+ - lib/lutaml/xsd/selector.rb
101
+ - lib/lutaml/xsd/sequence.rb
102
+ - lib/lutaml/xsd/simple_content.rb
103
+ - lib/lutaml/xsd/simple_type.rb
104
+ - lib/lutaml/xsd/total_digits.rb
105
+ - lib/lutaml/xsd/union.rb
106
+ - lib/lutaml/xsd/unique.rb
34
107
  - lib/lutaml/xsd/version.rb
108
+ - lib/lutaml/xsd/white_space.rb
109
+ - lib/lutaml/xsd/xsd.rb
35
110
  - lutaml-xsd.gemspec
36
111
  - sig/lutaml/xsd.rbs
37
112
  homepage: https://github.com/lutaml/expressir
@@ -57,7 +132,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
57
132
  - !ruby/object:Gem::Version
58
133
  version: '0'
59
134
  requirements: []
60
- rubygems_version: 3.5.22
135
+ rubygems_version: 3.3.27
61
136
  signing_key:
62
137
  specification_version: 4
63
138
  summary: Library for XML Schema Definition (XSD) files
data/LICENSE.txt DELETED
@@ -1,21 +0,0 @@
1
- The MIT License (MIT)
2
-
3
- Copyright (c) 2024 suleman-uzair
4
-
5
- Permission is hereby granted, free of charge, to any person obtaining a copy
6
- of this software and associated documentation files (the "Software"), to deal
7
- in the Software without restriction, including without limitation the rights
8
- to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
- copies of the Software, and to permit persons to whom the Software is
10
- furnished to do so, subject to the following conditions:
11
-
12
- The above copyright notice and this permission notice shall be included in
13
- all copies or substantial portions of the Software.
14
-
15
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
- IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
- FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
- AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
- LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
- OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
21
- THE SOFTWARE.
data/README.md DELETED
@@ -1,43 +0,0 @@
1
- # Lutaml::Xsd
2
-
3
- TODO: Delete this and the text below, and describe your gem
4
-
5
- Welcome to your new gem! In this directory, you'll find the files you need to be able to package up your Ruby library into a gem. Put your Ruby code in the file `lib/lutaml/xsd`. To experiment with that code, run `bin/console` for an interactive prompt.
6
-
7
- ## Installation
8
-
9
- TODO: Replace `UPDATE_WITH_YOUR_GEM_NAME_IMMEDIATELY_AFTER_RELEASE_TO_RUBYGEMS_ORG` with your gem name right after releasing it to RubyGems.org. Please do not do it earlier due to security reasons. Alternatively, replace this section with instructions to install your gem from git if you don't plan to release to RubyGems.org.
10
-
11
- Install the gem and add to the application's Gemfile by executing:
12
-
13
- ```bash
14
- bundle add UPDATE_WITH_YOUR_GEM_NAME_IMMEDIATELY_AFTER_RELEASE_TO_RUBYGEMS_ORG
15
- ```
16
-
17
- If bundler is not being used to manage dependencies, install the gem by executing:
18
-
19
- ```bash
20
- gem install UPDATE_WITH_YOUR_GEM_NAME_IMMEDIATELY_AFTER_RELEASE_TO_RUBYGEMS_ORG
21
- ```
22
-
23
- ## Usage
24
-
25
- TODO: Write usage instructions here
26
-
27
- ## Development
28
-
29
- After checking out the repo, run `bin/setup` to install dependencies. Then, run `rake spec` to run the tests. You can also run `bin/console` for an interactive prompt that will allow you to experiment.
30
-
31
- To install this gem onto your local machine, run `bundle exec rake install`. To release a new version, update the version number in `version.rb`, and then run `bundle exec rake release`, which will create a git tag for the version, push git commits and the created tag, and push the `.gem` file to [rubygems.org](https://rubygems.org).
32
-
33
- ## Contributing
34
-
35
- Bug reports and pull requests are welcome on GitHub at https://github.com/[USERNAME]/lutaml-xsd. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the [code of conduct](https://github.com/[USERNAME]/lutaml-xsd/blob/master/CODE_OF_CONDUCT.md).
36
-
37
- ## License
38
-
39
- The gem is available as open source under the terms of the [MIT License](https://opensource.org/licenses/MIT).
40
-
41
- ## Code of Conduct
42
-
43
- Everyone interacting in the Lutaml::Xsd project's codebases, issue trackers, chat rooms and mailing lists is expected to follow the [code of conduct](https://github.com/[USERNAME]/lutaml-xsd/blob/master/CODE_OF_CONDUCT.md).