microsoft_kiota_serialization_json 0.11.0 → 0.19.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/Gemfile +3 -1
- data/Rakefile +2 -2
- data/lib/microsoft_kiota_serialization_json/json_parse_node.rb +45 -34
- data/lib/microsoft_kiota_serialization_json/json_parse_node_factory.rb +2 -0
- data/lib/microsoft_kiota_serialization_json/json_serialization_writer.rb +93 -136
- data/lib/microsoft_kiota_serialization_json/json_serialization_writer_factory.rb +2 -0
- data/lib/microsoft_kiota_serialization_json/version.rb +1 -1
- data/lib/microsoft_kiota_serialization_json.rb +5 -5
- data/microsoft_kiota_serialization_json.gemspec +14 -17
- metadata +24 -51
- data/.github/CODEOWNERS +0 -1
- data/.github/copilot-instructions.md +0 -25
- data/.github/dependabot.yml +0 -20
- data/.github/policies/kiota-serialization-json-ruby-branch-protection.yml +0 -40
- data/.github/policies/resourceManagement.yml +0 -101
- data/.github/release-please.yml +0 -3
- data/.github/workflows/auto-merge-dependabot.yml +0 -33
- data/.github/workflows/code-ql.yml +0 -77
- data/.github/workflows/conflicting-pr-label.yml +0 -39
- data/.github/workflows/release-please-gha.yml +0 -49
- data/.github/workflows/release.yml +0 -36
- data/.github/workflows/ruby.yml +0 -48
- data/.gitignore +0 -58
- data/.release-please-manifest.json +0 -3
- data/CHANGELOG.md +0 -64
- data/CODE_OF_CONDUCT.md +0 -10
- data/CONTRIBUTING.md +0 -56
- data/LICENSE +0 -21
- data/README.md +0 -53
- data/SECURITY.md +0 -41
- data/SUPPORT.md +0 -25
- data/release-please-config.json +0 -15
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: cb3c8ad046e7bb462b1a2b8142285f7524652c456ebf4d829d1405a5be5cc735
|
|
4
|
+
data.tar.gz: 2f4c604480b717b808521d309b4788d304ffc4e6f40de4c103478a1a5efc9ff4
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: c564b6ba4b03e7a9f6a6881b8db19d7ba53a991176020f5d6cc16271a3de1129cf44a00460749232745adcef17e8bc08828f51c8d8b63b7d5137bb83cb6f2294
|
|
7
|
+
data.tar.gz: 6b52a93a107d2e90dd93d7c03cc9dc03a23f7cbafeb97ce8154cb23cacb70806988462ab95bb0b9a88f6c01e597cc548748db5cbccb3b0adbb0ea5c073eb8806
|
data/Gemfile
CHANGED
data/Rakefile
CHANGED
|
@@ -1,31 +1,38 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
1
3
|
require 'time'
|
|
2
4
|
require 'date'
|
|
3
5
|
require 'json'
|
|
4
6
|
require 'uuidtools'
|
|
5
7
|
require 'microsoft_kiota_abstractions'
|
|
6
8
|
|
|
7
|
-
|
|
8
9
|
module MicrosoftKiotaSerializationJson
|
|
9
10
|
class JsonParseNode
|
|
10
11
|
include MicrosoftKiotaAbstractions::ParseNode
|
|
12
|
+
|
|
11
13
|
def initialize(node)
|
|
12
14
|
@current_node = node
|
|
13
15
|
end
|
|
14
16
|
|
|
17
|
+
# The scalar readers answer only for the type they are named after and return nil otherwise,
|
|
18
|
+
# matching the dotnet and Python runtimes. Coercing instead would make every reader answer for
|
|
19
|
+
# every payload, which leaves a composed type unable to tell which member it holds.
|
|
15
20
|
def get_string_value
|
|
16
|
-
@current_node.
|
|
21
|
+
@current_node.is_a?(String) ? @current_node : nil
|
|
17
22
|
end
|
|
18
23
|
|
|
19
24
|
def get_boolean_value
|
|
20
|
-
@current_node
|
|
25
|
+
[true, false].include?(@current_node) ? @current_node : nil
|
|
21
26
|
end
|
|
22
27
|
|
|
23
28
|
def get_number_value
|
|
24
|
-
@current_node.
|
|
29
|
+
@current_node.is_a?(Integer) ? @current_node : nil
|
|
25
30
|
end
|
|
26
31
|
|
|
32
|
+
# Widened to Numeric because JSON writes a whole number without a fraction, so a float field can
|
|
33
|
+
# legitimately arrive as an Integer.
|
|
27
34
|
def get_float_value
|
|
28
|
-
@current_node.to_f
|
|
35
|
+
@current_node.is_a?(Numeric) ? @current_node.to_f : nil
|
|
29
36
|
end
|
|
30
37
|
|
|
31
38
|
def get_guid_value
|
|
@@ -36,52 +43,52 @@ module MicrosoftKiotaSerializationJson
|
|
|
36
43
|
Date.parse(@current_node)
|
|
37
44
|
end
|
|
38
45
|
|
|
39
|
-
def get_time_value
|
|
46
|
+
def get_time_value
|
|
40
47
|
Time.parse(@current_node)
|
|
41
48
|
end
|
|
42
49
|
|
|
43
|
-
def get_date_time_value
|
|
50
|
+
def get_date_time_value
|
|
44
51
|
DateTime.parse(@current_node)
|
|
45
52
|
end
|
|
46
53
|
|
|
47
|
-
def get_duration_value
|
|
54
|
+
def get_duration_value
|
|
48
55
|
MicrosoftKiotaAbstractions::ISODuration.new(@current_node)
|
|
49
56
|
end
|
|
50
57
|
|
|
58
|
+
# The generator passes the type as a class, except for booleans which it passes as a plain
|
|
59
|
+
# string. A `case` cannot dispatch on that: `when String` asks whether the type is an instance
|
|
60
|
+
# of String, and a class is an instance of Class, so every branch fell through to the string
|
|
61
|
+
# reader. A hash keys on the class object itself.
|
|
62
|
+
PRIMITIVE_READERS = {
|
|
63
|
+
String => :get_string_value,
|
|
64
|
+
Float => :get_float_value,
|
|
65
|
+
Integer => :get_number_value,
|
|
66
|
+
Date => :get_date_value,
|
|
67
|
+
DateTime => :get_date_time_value,
|
|
68
|
+
Time => :get_time_value,
|
|
69
|
+
MicrosoftKiotaAbstractions::ISODuration => :get_duration_value,
|
|
70
|
+
UUIDTools::UUID => :get_guid_value,
|
|
71
|
+
'boolean' => :get_boolean_value,
|
|
72
|
+
'Boolean' => :get_boolean_value
|
|
73
|
+
}.freeze
|
|
74
|
+
|
|
51
75
|
def get_collection_of_primitive_values(type)
|
|
76
|
+
reader = PRIMITIVE_READERS[type]
|
|
52
77
|
@current_node.map do |object|
|
|
53
78
|
next if object.nil?
|
|
79
|
+
# an untyped collection is generated as Object, which has no reader of its own; the parsed
|
|
80
|
+
# JSON scalar is already the value, so it passes through rather than being stringified
|
|
81
|
+
next object if reader.nil?
|
|
54
82
|
|
|
55
|
-
|
|
56
|
-
case type
|
|
57
|
-
when String
|
|
58
|
-
current_parse_node.get_string_value
|
|
59
|
-
when Float
|
|
60
|
-
current_parse_node.get_float_value
|
|
61
|
-
when Integer
|
|
62
|
-
current_parse_node.get_float_value
|
|
63
|
-
when "Boolean"
|
|
64
|
-
current_parse_node.get_float_value
|
|
65
|
-
when DateTime
|
|
66
|
-
current_parse_node.get_date_time_value
|
|
67
|
-
when Time
|
|
68
|
-
current_parse_node.get_time_value
|
|
69
|
-
when Date
|
|
70
|
-
current_parse_node.get_date_value
|
|
71
|
-
when MicrosoftKiotaAbstractions::ISODuration
|
|
72
|
-
current_parse_node.get_duration_value
|
|
73
|
-
when UUIDTools::UUID
|
|
74
|
-
current_parse_node.get_guid_value
|
|
75
|
-
else
|
|
76
|
-
current_parse_node.get_string_value
|
|
77
|
-
end
|
|
83
|
+
JsonParseNode.new(object).public_send(reader)
|
|
78
84
|
rescue StandardError => e
|
|
79
|
-
raise e.class,
|
|
85
|
+
raise e.class, "Failed to fetch #{type} type: #{e.message}"
|
|
80
86
|
end
|
|
81
87
|
end
|
|
82
88
|
|
|
83
89
|
def get_collection_of_object_values(factory)
|
|
84
90
|
raise StandardError, 'Factory cannot be null' if factory.nil?
|
|
91
|
+
|
|
85
92
|
@current_node.map do |object|
|
|
86
93
|
next if object.nil?
|
|
87
94
|
|
|
@@ -92,6 +99,7 @@ module MicrosoftKiotaSerializationJson
|
|
|
92
99
|
|
|
93
100
|
def get_object_value(factory)
|
|
94
101
|
raise StandardError, 'Factory cannot be null' if factory.nil?
|
|
102
|
+
|
|
95
103
|
item = factory.call(self)
|
|
96
104
|
assign_field_values(item)
|
|
97
105
|
item
|
|
@@ -110,13 +118,15 @@ module MicrosoftKiotaSerializationJson
|
|
|
110
118
|
elsif item.additional_data
|
|
111
119
|
item.additional_data[k] = v
|
|
112
120
|
else
|
|
113
|
-
item.additional_data = Hash.new(k => v)
|
|
121
|
+
item.additional_data = Hash.new({ k => v })
|
|
114
122
|
end
|
|
115
123
|
end
|
|
116
124
|
end
|
|
117
125
|
|
|
118
126
|
def get_enum_values(_type)
|
|
119
127
|
raw_values = get_string_value
|
|
128
|
+
return [] if raw_values.nil?
|
|
129
|
+
|
|
120
130
|
raw_values.split(',').map(&:strip)
|
|
121
131
|
end
|
|
122
132
|
|
|
@@ -127,8 +137,9 @@ module MicrosoftKiotaSerializationJson
|
|
|
127
137
|
|
|
128
138
|
def get_child_node(name)
|
|
129
139
|
raise StandardError, 'Name cannot be null' if name.nil? || name.empty?
|
|
140
|
+
|
|
130
141
|
raw_value = @current_node[name]
|
|
131
|
-
|
|
142
|
+
JsonParseNode.new(raw_value) if raw_value
|
|
132
143
|
end
|
|
133
144
|
end
|
|
134
145
|
end
|
|
@@ -1,183 +1,141 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
1
3
|
require 'time'
|
|
2
4
|
require 'date'
|
|
3
5
|
require 'json'
|
|
4
|
-
require
|
|
6
|
+
require 'uuidtools'
|
|
5
7
|
require 'microsoft_kiota_abstractions'
|
|
6
8
|
|
|
7
9
|
module MicrosoftKiotaSerializationJson
|
|
8
10
|
class JsonSerializationWriter
|
|
9
11
|
include MicrosoftKiotaAbstractions::SerializationWriter
|
|
10
|
-
@writer
|
|
11
12
|
|
|
12
|
-
def initialize
|
|
13
|
-
@writer =
|
|
13
|
+
def initialize
|
|
14
|
+
@writer = {}
|
|
15
|
+
@root_value = nil
|
|
16
|
+
@has_root_value = false
|
|
14
17
|
end
|
|
15
18
|
|
|
16
|
-
|
|
17
|
-
|
|
19
|
+
attr_reader :writer, :root_value
|
|
20
|
+
|
|
21
|
+
# A composed type whose selected member is a primitive serializes the scalar as the whole
|
|
22
|
+
# document rather than as a member of an object, so a nil key means "this is the root".
|
|
23
|
+
def set_root_value(value)
|
|
24
|
+
@root_value = value
|
|
25
|
+
@has_root_value = true
|
|
26
|
+
value
|
|
27
|
+
end
|
|
28
|
+
|
|
29
|
+
def root_value?
|
|
30
|
+
@has_root_value
|
|
18
31
|
end
|
|
19
32
|
|
|
20
33
|
def write_string_value(key, value)
|
|
21
|
-
if
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
return value.to_s
|
|
26
|
-
end
|
|
27
|
-
if !value
|
|
28
|
-
@writer[key] = nil
|
|
29
|
-
else
|
|
30
|
-
@writer[key] = value
|
|
31
|
-
end
|
|
34
|
+
raise StandardError, 'no key or value included in write_string_value(key, value)' if key.nil? && value.nil?
|
|
35
|
+
return set_root_value(value) if key.nil?
|
|
36
|
+
|
|
37
|
+
@writer[key] = value
|
|
32
38
|
end
|
|
33
39
|
|
|
34
40
|
def write_boolean_value(key, value)
|
|
35
|
-
if
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
if !key
|
|
39
|
-
return value
|
|
40
|
-
end
|
|
41
|
+
raise StandardError, 'no key or value included in write_boolean_value(key, value)' if key.nil? && value.nil?
|
|
42
|
+
return set_root_value(value) if key.nil?
|
|
43
|
+
|
|
41
44
|
@writer[key] = value
|
|
42
45
|
end
|
|
43
46
|
|
|
44
47
|
def write_number_value(key, value)
|
|
45
|
-
if
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
if !key
|
|
49
|
-
return value
|
|
50
|
-
end
|
|
48
|
+
raise StandardError, 'no key or value included in write_number_value(key, value)' if key.nil? && value.nil?
|
|
49
|
+
return set_root_value(value) if key.nil?
|
|
50
|
+
|
|
51
51
|
@writer[key] = value
|
|
52
52
|
end
|
|
53
53
|
|
|
54
54
|
def write_float_value(key, value)
|
|
55
|
-
if
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
if !key
|
|
59
|
-
return value
|
|
60
|
-
end
|
|
55
|
+
raise StandardError, 'no key or value included in write_float_value(key, value)' if key.nil? && value.nil?
|
|
56
|
+
return set_root_value(value) if key.nil?
|
|
57
|
+
|
|
61
58
|
@writer[key] = value
|
|
62
59
|
end
|
|
63
60
|
|
|
64
61
|
def write_guid_value(key, value)
|
|
65
|
-
if !key && !value
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
if
|
|
69
|
-
return value.to_s
|
|
70
|
-
end
|
|
71
|
-
if !value
|
|
72
|
-
@writer[key] = nil
|
|
73
|
-
else
|
|
74
|
-
@writer[key] = value.to_s
|
|
75
|
-
end
|
|
62
|
+
raise StandardError, 'no key or value included in write_guid_value(key, value)' if !key && !value
|
|
63
|
+
return value.to_s unless key
|
|
64
|
+
|
|
65
|
+
@writer[key] = (value.to_s if value)
|
|
76
66
|
end
|
|
77
67
|
|
|
78
68
|
def write_date_value(key, value)
|
|
79
|
-
if !key && !value
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
if
|
|
83
|
-
return value.strftime("%Y-%m-%d")
|
|
84
|
-
end
|
|
85
|
-
if !value
|
|
86
|
-
@writer[key] = nil
|
|
87
|
-
else
|
|
88
|
-
@writer[key] = value.strftime("%Y-%m-%d")
|
|
89
|
-
end
|
|
69
|
+
raise StandardError, 'no key or value included in write_date_value(key, value)' if !key && !value
|
|
70
|
+
return value.strftime('%Y-%m-%d') unless key
|
|
71
|
+
|
|
72
|
+
@writer[key] = (value.strftime('%Y-%m-%d') if value)
|
|
90
73
|
end
|
|
91
74
|
|
|
92
75
|
def write_time_value(key, value)
|
|
93
|
-
if !key && !value
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
if
|
|
97
|
-
return value.strftime("%H:%M:%S%Z")
|
|
98
|
-
end
|
|
99
|
-
if !value
|
|
100
|
-
@writer[key] = nil
|
|
101
|
-
else
|
|
102
|
-
@writer[key] = value.strftime("%H:%M:%S%Z")
|
|
103
|
-
end
|
|
76
|
+
raise StandardError, 'no key or value included in write_time_value(key, value)' if !key && !value
|
|
77
|
+
return value.strftime('%H:%M:%S%Z') unless key
|
|
78
|
+
|
|
79
|
+
@writer[key] = (value.strftime('%H:%M:%S%Z') if value)
|
|
104
80
|
end
|
|
105
81
|
|
|
106
82
|
def write_date_time_value(key, value)
|
|
107
|
-
if !key && !value
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
if
|
|
111
|
-
return value.strftime("%Y-%m-%dT%H:%M:%S%Z")
|
|
112
|
-
end
|
|
113
|
-
if !value
|
|
114
|
-
@writer[key] = nil
|
|
115
|
-
else
|
|
116
|
-
@writer[key] = value.strftime("%Y-%m-%dT%H:%M:%S%Z")
|
|
117
|
-
end
|
|
83
|
+
raise StandardError, 'no key or value included in write_date_time_value(key, value)' if !key && !value
|
|
84
|
+
return value.strftime('%Y-%m-%dT%H:%M:%S%Z') unless key
|
|
85
|
+
|
|
86
|
+
@writer[key] = (value.strftime('%Y-%m-%dT%H:%M:%S%Z') if value)
|
|
118
87
|
end
|
|
119
88
|
|
|
120
89
|
def write_duration_value(key, value)
|
|
121
|
-
if !key && !value
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
if
|
|
125
|
-
return value.string
|
|
126
|
-
end
|
|
127
|
-
if !value
|
|
128
|
-
@writer[key] = nil
|
|
129
|
-
else
|
|
130
|
-
@writer[key] = value.string
|
|
131
|
-
end
|
|
90
|
+
raise StandardError, 'no key or value included in write_duration_value(key, value)' if !key && !value
|
|
91
|
+
return value.string unless key
|
|
92
|
+
|
|
93
|
+
@writer[key] = (value.string if value)
|
|
132
94
|
end
|
|
133
95
|
|
|
134
96
|
def write_collection_of_primitive_values(key, values)
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
end
|
|
140
|
-
end
|
|
141
|
-
@writer[key] = values.map do |v|
|
|
142
|
-
self.write_any_value(key, v)
|
|
97
|
+
return unless values
|
|
98
|
+
unless key
|
|
99
|
+
return values.map do |v|
|
|
100
|
+
write_any_value(nil, v)
|
|
143
101
|
end
|
|
144
102
|
end
|
|
103
|
+
@writer[key] = values.map do |v|
|
|
104
|
+
write_any_value(key, v)
|
|
105
|
+
end
|
|
145
106
|
end
|
|
146
107
|
|
|
147
108
|
def write_collection_of_object_values(key, values)
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
@writer[key] = values.map { |v| object_value_hash(v) }
|
|
153
|
-
end
|
|
109
|
+
return unless values
|
|
110
|
+
return values.map { |v| write_object_value(nil, v) } unless key
|
|
111
|
+
|
|
112
|
+
@writer[key] = values.map { |v| object_value_hash(v) }
|
|
154
113
|
end
|
|
155
114
|
|
|
156
115
|
def write_object_value(key, value, *additional_values_to_merge)
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
116
|
+
values = [value, *additional_values_to_merge].compact
|
|
117
|
+
return if values.empty?
|
|
118
|
+
|
|
119
|
+
if key
|
|
120
|
+
@writer[key] = object_value_hash(*values)
|
|
121
|
+
else
|
|
122
|
+
values.each { |v| v.serialize(self) }
|
|
164
123
|
end
|
|
165
124
|
end
|
|
166
125
|
|
|
167
126
|
def write_enum_value(key, values)
|
|
168
|
-
|
|
127
|
+
write_string_value(key, values.to_s)
|
|
169
128
|
end
|
|
170
129
|
|
|
171
|
-
def get_serialized_content
|
|
172
|
-
|
|
130
|
+
def get_serialized_content
|
|
131
|
+
(@has_root_value ? @root_value : @writer).to_json # TODO: encode to byte array to stay content type agnostic
|
|
173
132
|
end
|
|
174
133
|
|
|
175
134
|
def write_additional_data(value)
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
end
|
|
135
|
+
return unless value
|
|
136
|
+
|
|
179
137
|
value.each do |x, y|
|
|
180
|
-
|
|
138
|
+
write_any_value(x, y)
|
|
181
139
|
end
|
|
182
140
|
end
|
|
183
141
|
|
|
@@ -186,7 +144,7 @@ module MicrosoftKiotaSerializationJson
|
|
|
186
144
|
def object_value_hash(value, *additional_values_to_merge)
|
|
187
145
|
temp = JsonSerializationWriter.new
|
|
188
146
|
value.serialize(temp)
|
|
189
|
-
additional_values_to_merge.each { |v| v
|
|
147
|
+
additional_values_to_merge.each { |v| v&.serialize(temp) }
|
|
190
148
|
temp.writer
|
|
191
149
|
end
|
|
192
150
|
|
|
@@ -194,35 +152,34 @@ module MicrosoftKiotaSerializationJson
|
|
|
194
152
|
|
|
195
153
|
def write_any_value(key, value)
|
|
196
154
|
if value
|
|
197
|
-
if
|
|
198
|
-
|
|
155
|
+
if !value.nil? == value
|
|
156
|
+
value
|
|
199
157
|
elsif value.instance_of? String
|
|
200
|
-
|
|
158
|
+
write_string_value(key, value)
|
|
201
159
|
elsif value.instance_of? Integer
|
|
202
|
-
|
|
160
|
+
write_number_value(key, value)
|
|
203
161
|
elsif value.instance_of? Float
|
|
204
|
-
|
|
162
|
+
write_float_value(key, value)
|
|
205
163
|
elsif value.instance_of? DateTime
|
|
206
|
-
|
|
164
|
+
write_date_time_value(key, value)
|
|
207
165
|
elsif value.instance_of? Time
|
|
208
|
-
|
|
166
|
+
write_time_value(key, value)
|
|
209
167
|
elsif value.instance_of? Date
|
|
210
|
-
|
|
168
|
+
write_date_value(key, value)
|
|
211
169
|
elsif value.instance_of? MicrosoftKiotaAbstractions::ISODuration
|
|
212
|
-
|
|
170
|
+
write_duration_value(key, value)
|
|
213
171
|
elsif value.instance_of? Array
|
|
214
|
-
|
|
172
|
+
write_collection_of_primitive_values(key, value)
|
|
215
173
|
elsif value.is_a? Object
|
|
216
|
-
|
|
174
|
+
value.to_s
|
|
217
175
|
else
|
|
218
|
-
raise StandardError, "encountered unknown value type during serialization #{value
|
|
176
|
+
raise StandardError, "encountered unknown value type during serialization #{value}"
|
|
219
177
|
end
|
|
220
178
|
else
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
end
|
|
179
|
+
raise StandardError, 'no key included when writing json property' unless key
|
|
180
|
+
|
|
181
|
+
@writer[key] = nil
|
|
182
|
+
|
|
226
183
|
end
|
|
227
184
|
end
|
|
228
185
|
end
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
# frozen_string_literal: true
|
|
2
2
|
|
|
3
|
-
require_relative
|
|
4
|
-
require_relative
|
|
5
|
-
require_relative
|
|
6
|
-
require_relative
|
|
7
|
-
require_relative
|
|
3
|
+
require_relative 'microsoft_kiota_serialization_json/json_parse_node'
|
|
4
|
+
require_relative 'microsoft_kiota_serialization_json/json_parse_node_factory'
|
|
5
|
+
require_relative 'microsoft_kiota_serialization_json/json_serialization_writer'
|
|
6
|
+
require_relative 'microsoft_kiota_serialization_json/json_serialization_writer_factory'
|
|
7
|
+
require_relative 'microsoft_kiota_serialization_json/version'
|
|
8
8
|
|
|
9
9
|
module MicrosoftKiotaSerializationJson
|
|
10
10
|
end
|
|
@@ -1,38 +1,35 @@
|
|
|
1
1
|
# frozen_string_literal: true
|
|
2
2
|
|
|
3
|
-
require_relative
|
|
3
|
+
require_relative 'lib/microsoft_kiota_serialization_json/version'
|
|
4
4
|
|
|
5
5
|
Gem::Specification.new do |spec|
|
|
6
|
-
spec.name =
|
|
6
|
+
spec.name = 'microsoft_kiota_serialization_json'
|
|
7
7
|
spec.version = MicrosoftKiotaSerializationJson::VERSION
|
|
8
8
|
spec.authors = 'Microsoft Corporation'
|
|
9
|
-
spec.email = 'graphsdkpub@microsoft.com'
|
|
9
|
+
spec.email = 'graphsdkpub+ruby@microsoft.com'
|
|
10
10
|
spec.description = 'Implementation of Kiota Serialization interfaces for JSON'
|
|
11
11
|
spec.summary = 'Microsoft Kiota Serialization - Ruby serialization for building library agnostic http client'
|
|
12
|
-
spec.homepage = 'https://microsoft.
|
|
12
|
+
spec.homepage = 'https://learn.microsoft.com/openapi/kiota/'
|
|
13
13
|
spec.license = 'MIT'
|
|
14
14
|
spec.metadata = {
|
|
15
|
-
'bug_tracker_uri' => 'https://github.com/microsoft/kiota-
|
|
16
|
-
'changelog_uri'
|
|
17
|
-
'homepage_uri'
|
|
18
|
-
'source_code_uri' => 'https://github.com/microsoft/kiota-serialization
|
|
19
|
-
'github_repo'
|
|
15
|
+
'bug_tracker_uri' => 'https://github.com/microsoft/kiota-ruby/issues',
|
|
16
|
+
'changelog_uri' => 'https://github.com/microsoft/kiota-ruby/blob/main/CHANGELOG.md',
|
|
17
|
+
'homepage_uri' => spec.homepage,
|
|
18
|
+
'source_code_uri' => 'https://github.com/microsoft/kiota-ruby/tree/main/components/serialization/json',
|
|
19
|
+
'github_repo' => 'ssh://github.com/microsoft/kiota-ruby',
|
|
20
|
+
'rubygems_mfa_required' => 'true'
|
|
20
21
|
}
|
|
21
|
-
spec.required_ruby_version =
|
|
22
|
+
spec.required_ruby_version = '>= 3.3.0'
|
|
22
23
|
|
|
23
|
-
# Specify which files should be added to the gem when it is released.
|
|
24
|
-
# The `git ls-files -z` loads the files in the RubyGem that have been added into git.
|
|
25
24
|
spec.files = Dir.chdir(File.expand_path(__dir__)) do
|
|
26
25
|
`git ls-files -z`.split("\x0").reject { |f| f.match(%r{\A(?:test|spec|features)/}) }
|
|
27
26
|
end
|
|
28
|
-
|
|
29
27
|
spec.bindir = 'bin'
|
|
30
28
|
spec.executables = spec.files.grep(%r{\Aexe/}) { |f| File.basename(f) }
|
|
31
29
|
spec.require_paths = ['lib']
|
|
32
|
-
|
|
33
|
-
spec.
|
|
34
|
-
spec.
|
|
35
|
-
spec.add_runtime_dependency 'json', '>= 2.6.3', '< 2.22.0'
|
|
30
|
+
spec.add_dependency 'json', '>= 2.6.3', '< 2.22.0'
|
|
31
|
+
spec.add_dependency 'microsoft_kiota_abstractions', MicrosoftKiotaSerializationJson::VERSION
|
|
32
|
+
spec.add_dependency 'uuidtools', '>= 2.2', '< 3.1'
|
|
36
33
|
spec.add_development_dependency 'rake', '~> 13.0'
|
|
37
34
|
spec.add_development_dependency 'rspec', '~> 3.0'
|
|
38
35
|
spec.add_development_dependency 'rubocop'
|