ezags-xsd 2.2.0.1 → 2.2.0.2
Sign up to get free protection for your applications and to get access to all the features.
- data/app/mappers/get_act_records_request_mapper.rb +40 -0
- data/app/mappers/get_act_records_request_obj_mapper.rb +12 -0
- data/app/mappers/get_act_records_response_mapper.rb +40 -0
- data/app/mappers/get_act_records_response_obj_mapper.rb +33 -0
- data/app/mappers/reference_type_mapper.rb +2 -4
- data/bin/ezags-xsd +5 -0
- data/lib/ezags-xsd/version.rb +1 -1
- data/lib/ezags-xsd.rb +5 -3
- data/spec/mappers/get_act_records_request_mapper_spec.rb +18 -0
- data/spec/mappers/get_act_records_request_obj_mapper_spec.rb +17 -0
- data/spec/mappers/get_act_records_response_mapper_spec.rb +18 -0
- data/spec/mappers/get_act_records_response_obj_mapper_spec.rb +24 -0
- data/spec/mappers/reference_type_mapper_spec.rb +0 -1
- data/spec/spec_helper.rb +1 -0
- metadata +13 -1
@@ -0,0 +1,40 @@
|
|
1
|
+
# encoding: utf-8
|
2
|
+
|
3
|
+
class GetActRecordsRequestMapper
|
4
|
+
include XmlSchemaMapper
|
5
|
+
schema File.expand_path('../../vendor/ezags-protocols/retro/public/GetResultsService.xsd', File.dirname(__FILE__))
|
6
|
+
type 'GetActRecordsRequest'
|
7
|
+
|
8
|
+
# Служебный блок атрибутов СМЭВ
|
9
|
+
# @return [MessageTypeMapper]
|
10
|
+
# minOccurs: 1, maxOccurs: 1
|
11
|
+
attr_accessor :message
|
12
|
+
# @return [MessageDataMapper]
|
13
|
+
# minOccurs: 1, maxOccurs: 1
|
14
|
+
attr_accessor :message_data
|
15
|
+
|
16
|
+
class MessageData
|
17
|
+
include XmlSchemaMapper
|
18
|
+
schema File.expand_path('../../vendor/ezags-protocols/retro/public/GetResultsService.xsd', File.dirname(__FILE__))
|
19
|
+
annonymus_type 'GetActRecordsRequest::MessageData'
|
20
|
+
|
21
|
+
# @return [AppDataMapper]
|
22
|
+
# minOccurs: 1, maxOccurs: 1
|
23
|
+
attr_accessor :app_data
|
24
|
+
# Блок вложений
|
25
|
+
# @return [AppDocumentTypeMapper]
|
26
|
+
# minOccurs: 0, maxOccurs: 1
|
27
|
+
attr_accessor :app_document
|
28
|
+
end
|
29
|
+
|
30
|
+
class MessageData::AppData
|
31
|
+
include XmlSchemaMapper
|
32
|
+
schema File.expand_path('../../vendor/ezags-protocols/retro/public/GetResultsService.xsd', File.dirname(__FILE__))
|
33
|
+
annonymus_type 'GetActRecordsRequest::MessageData::AppData'
|
34
|
+
|
35
|
+
# @return [GetActRecordsRequestObjMapper]
|
36
|
+
# minOccurs: 1, maxOccurs: 1
|
37
|
+
attr_accessor :get_act_records_request_obj
|
38
|
+
end
|
39
|
+
|
40
|
+
end
|
@@ -0,0 +1,12 @@
|
|
1
|
+
# encoding: utf-8
|
2
|
+
|
3
|
+
class GetActRecordsRequestObjMapper
|
4
|
+
include XmlSchemaMapper
|
5
|
+
schema File.expand_path('../../vendor/ezags-protocols/retro/public/GetResultsService.xsd', File.dirname(__FILE__))
|
6
|
+
type 'GetActRecordsRequestObj'
|
7
|
+
|
8
|
+
# @return [String]
|
9
|
+
# minOccurs: 1, maxOccurs: 1
|
10
|
+
attr_accessor :task_id
|
11
|
+
|
12
|
+
end
|
@@ -0,0 +1,40 @@
|
|
1
|
+
# encoding: utf-8
|
2
|
+
|
3
|
+
class GetActRecordsResponseMapper
|
4
|
+
include XmlSchemaMapper
|
5
|
+
schema File.expand_path('../../vendor/ezags-protocols/retro/public/GetResultsService.xsd', File.dirname(__FILE__))
|
6
|
+
type 'GetActRecordsResponse'
|
7
|
+
|
8
|
+
# Служебный блок атрибутов СМЭВ
|
9
|
+
# @return [MessageTypeMapper]
|
10
|
+
# minOccurs: 1, maxOccurs: 1
|
11
|
+
attr_accessor :message
|
12
|
+
# @return [MessageDataMapper]
|
13
|
+
# minOccurs: 1, maxOccurs: 1
|
14
|
+
attr_accessor :message_data
|
15
|
+
|
16
|
+
class MessageData
|
17
|
+
include XmlSchemaMapper
|
18
|
+
schema File.expand_path('../../vendor/ezags-protocols/retro/public/GetResultsService.xsd', File.dirname(__FILE__))
|
19
|
+
annonymus_type 'GetActRecordsResponse::MessageData'
|
20
|
+
|
21
|
+
# @return [AppDataMapper]
|
22
|
+
# minOccurs: 1, maxOccurs: 1
|
23
|
+
attr_accessor :app_data
|
24
|
+
# Блок вложений
|
25
|
+
# @return [AppDocumentTypeMapper]
|
26
|
+
# minOccurs: 0, maxOccurs: 1
|
27
|
+
attr_accessor :app_document
|
28
|
+
end
|
29
|
+
|
30
|
+
class MessageData::AppData
|
31
|
+
include XmlSchemaMapper
|
32
|
+
schema File.expand_path('../../vendor/ezags-protocols/retro/public/GetResultsService.xsd', File.dirname(__FILE__))
|
33
|
+
annonymus_type 'GetActRecordsResponse::MessageData::AppData'
|
34
|
+
|
35
|
+
# @return [GetActRecordsResponseObjMapper]
|
36
|
+
# minOccurs: 1, maxOccurs: 1
|
37
|
+
attr_accessor :get_act_records_response_obj
|
38
|
+
end
|
39
|
+
|
40
|
+
end
|
@@ -0,0 +1,33 @@
|
|
1
|
+
# encoding: utf-8
|
2
|
+
|
3
|
+
class GetActRecordsResponseObjMapper
|
4
|
+
include XmlSchemaMapper
|
5
|
+
schema File.expand_path('../../vendor/ezags-protocols/retro/public/GetResultsService.xsd', File.dirname(__FILE__))
|
6
|
+
type 'GetActRecordsResponseObj'
|
7
|
+
|
8
|
+
# @return [SignedActRecordBirthMapper]
|
9
|
+
# minOccurs: 0, maxOccurs: Infinity
|
10
|
+
attr_accessor :signed_act_record_birth
|
11
|
+
# @return [SignedActRecordMarriageMapper]
|
12
|
+
# minOccurs: 0, maxOccurs: Infinity
|
13
|
+
attr_accessor :signed_act_record_marriage
|
14
|
+
# @return [SignedActRecordDivorceMapper]
|
15
|
+
# minOccurs: 0, maxOccurs: Infinity
|
16
|
+
attr_accessor :signed_act_record_divorce
|
17
|
+
# @return [SignedActRecordAdoptionMapper]
|
18
|
+
# minOccurs: 0, maxOccurs: Infinity
|
19
|
+
attr_accessor :signed_act_record_adoption
|
20
|
+
# @return [SignedActRecordFiliationMapper]
|
21
|
+
# minOccurs: 0, maxOccurs: Infinity
|
22
|
+
attr_accessor :signed_act_record_filiation
|
23
|
+
# @return [SignedActRecordNameChangeMapper]
|
24
|
+
# minOccurs: 0, maxOccurs: Infinity
|
25
|
+
attr_accessor :signed_act_record_name_change
|
26
|
+
# @return [SignedActRecordDeathMapper]
|
27
|
+
# minOccurs: 0, maxOccurs: Infinity
|
28
|
+
attr_accessor :signed_act_record_death
|
29
|
+
# @return [String]
|
30
|
+
# minOccurs: 0, maxOccurs: 1
|
31
|
+
attr_accessor :fault_message
|
32
|
+
|
33
|
+
end
|
@@ -1,12 +1,10 @@
|
|
1
1
|
# encoding: utf-8
|
2
|
+
# @note Перечисляемый тип: "справочники"
|
2
3
|
|
3
4
|
class ReferenceTypeMapper
|
4
5
|
include XmlSchemaMapper
|
5
6
|
schema File.expand_path('../../vendor/ezags-protocols/eZAGS/public/UploadService.xsd', File.dirname(__FILE__))
|
6
|
-
type '
|
7
|
+
type 'REFERENCE_TYPE'
|
7
8
|
|
8
|
-
# @return [String]
|
9
|
-
# minOccurs: 0, maxOccurs: 1
|
10
|
-
attr_accessor :include
|
11
9
|
|
12
10
|
end
|
data/bin/ezags-xsd
CHANGED
@@ -17,6 +17,7 @@ class CLI < Thor
|
|
17
17
|
|
18
18
|
desc 'update_all', 'update ezags xsd mappers'
|
19
19
|
def update_all
|
20
|
+
update_retro
|
20
21
|
update_order
|
21
22
|
update_upload
|
22
23
|
update_order_info
|
@@ -31,6 +32,10 @@ class CLI < Thor
|
|
31
32
|
end
|
32
33
|
end
|
33
34
|
|
35
|
+
def update_retro
|
36
|
+
@script.generate(xsd_path 'retro/public/GetResultsService.xsd')
|
37
|
+
end
|
38
|
+
|
34
39
|
def update_upload
|
35
40
|
@script.generate(xsd_path 'eZAGS/public/UploadService.xsd')
|
36
41
|
end
|
data/lib/ezags-xsd/version.rb
CHANGED
data/lib/ezags-xsd.rb
CHANGED
@@ -12,9 +12,11 @@ module Ezags
|
|
12
12
|
Pathname.new(File.expand_path('../../vendor/ezags-protocols', __FILE__))
|
13
13
|
end
|
14
14
|
|
15
|
-
|
16
|
-
|
17
|
-
|
15
|
+
if defined?(Rails) && defined?(Rails::Engine)
|
16
|
+
class Protocols < Rails::Engine
|
17
|
+
initializer "ezags.xsd.protocols.add_middleware" do |app|
|
18
|
+
app.middleware.use Ezags::Xsd::Middleware
|
19
|
+
end
|
18
20
|
end
|
19
21
|
end
|
20
22
|
end
|
@@ -0,0 +1,18 @@
|
|
1
|
+
require 'spec_helper'
|
2
|
+
require "xml_schema_mapper/test_builder"
|
3
|
+
|
4
|
+
# @attr Message [MessageType]
|
5
|
+
# @attr MessageData []
|
6
|
+
|
7
|
+
|
8
|
+
describe GetActRecordsRequestMapper do
|
9
|
+
|
10
|
+
include XmlSchemaMapper::TestBuilder::Helper
|
11
|
+
|
12
|
+
subject { build_described_mapper }
|
13
|
+
|
14
|
+
it "should be self-compatible xml <-> object" do
|
15
|
+
described_class.parse(subject.to_xml).to_xml.should eql subject.to_xml
|
16
|
+
end
|
17
|
+
|
18
|
+
end
|
@@ -0,0 +1,17 @@
|
|
1
|
+
require 'spec_helper'
|
2
|
+
require "xml_schema_mapper/test_builder"
|
3
|
+
|
4
|
+
# @attr taskId [string]
|
5
|
+
|
6
|
+
|
7
|
+
describe GetActRecordsRequestObjMapper do
|
8
|
+
|
9
|
+
include XmlSchemaMapper::TestBuilder::Helper
|
10
|
+
|
11
|
+
subject { build_described_mapper }
|
12
|
+
|
13
|
+
it "should be self-compatible xml <-> object" do
|
14
|
+
described_class.parse(subject.to_xml).to_xml.should eql subject.to_xml
|
15
|
+
end
|
16
|
+
|
17
|
+
end
|
@@ -0,0 +1,18 @@
|
|
1
|
+
require 'spec_helper'
|
2
|
+
require "xml_schema_mapper/test_builder"
|
3
|
+
|
4
|
+
# @attr Message [MessageType]
|
5
|
+
# @attr MessageData []
|
6
|
+
|
7
|
+
|
8
|
+
describe GetActRecordsResponseMapper do
|
9
|
+
|
10
|
+
include XmlSchemaMapper::TestBuilder::Helper
|
11
|
+
|
12
|
+
subject { build_described_mapper }
|
13
|
+
|
14
|
+
it "should be self-compatible xml <-> object" do
|
15
|
+
described_class.parse(subject.to_xml).to_xml.should eql subject.to_xml
|
16
|
+
end
|
17
|
+
|
18
|
+
end
|
@@ -0,0 +1,24 @@
|
|
1
|
+
require 'spec_helper'
|
2
|
+
require "xml_schema_mapper/test_builder"
|
3
|
+
|
4
|
+
# @attr signedActRecordBirth [SignedActRecordBirth]
|
5
|
+
# @attr signedActRecordMarriage [SignedActRecordMarriage]
|
6
|
+
# @attr signedActRecordDivorce [SignedActRecordDivorce]
|
7
|
+
# @attr signedActRecordAdoption [SignedActRecordAdoption]
|
8
|
+
# @attr signedActRecordFiliation [SignedActRecordFiliation]
|
9
|
+
# @attr signedActRecordNameChange [SignedActRecordNameChange]
|
10
|
+
# @attr signedActRecordDeath [SignedActRecordDeath]
|
11
|
+
# @attr faultMessage [string]
|
12
|
+
|
13
|
+
|
14
|
+
describe GetActRecordsResponseObjMapper do
|
15
|
+
|
16
|
+
include XmlSchemaMapper::TestBuilder::Helper
|
17
|
+
|
18
|
+
subject { build_described_mapper }
|
19
|
+
|
20
|
+
it "should be self-compatible xml <-> object" do
|
21
|
+
described_class.parse(subject.to_xml).to_xml.should eql subject.to_xml
|
22
|
+
end
|
23
|
+
|
24
|
+
end
|
data/spec/spec_helper.rb
CHANGED
metadata
CHANGED
@@ -2,7 +2,7 @@
|
|
2
2
|
name: ezags-xsd
|
3
3
|
version: !ruby/object:Gem::Version
|
4
4
|
prerelease:
|
5
|
-
version: 2.2.0.
|
5
|
+
version: 2.2.0.2
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
8
8
|
- Anton Sozontov
|
@@ -179,6 +179,10 @@ files:
|
|
179
179
|
- app/mappers/full_citizen_mapper.rb
|
180
180
|
- app/mappers/full_person_mapper.rb
|
181
181
|
- app/mappers/genders_mapper.rb
|
182
|
+
- app/mappers/get_act_records_request_mapper.rb
|
183
|
+
- app/mappers/get_act_records_request_obj_mapper.rb
|
184
|
+
- app/mappers/get_act_records_response_mapper.rb
|
185
|
+
- app/mappers/get_act_records_response_obj_mapper.rb
|
182
186
|
- app/mappers/get_free_time_request_mapper.rb
|
183
187
|
- app/mappers/get_free_time_request_obj_mapper.rb
|
184
188
|
- app/mappers/get_free_time_response_mapper.rb
|
@@ -526,6 +530,10 @@ files:
|
|
526
530
|
- spec/mappers/full_citizen_mapper_spec.rb
|
527
531
|
- spec/mappers/full_person_mapper_spec.rb
|
528
532
|
- spec/mappers/genders_mapper_spec.rb
|
533
|
+
- spec/mappers/get_act_records_request_mapper_spec.rb
|
534
|
+
- spec/mappers/get_act_records_request_obj_mapper_spec.rb
|
535
|
+
- spec/mappers/get_act_records_response_mapper_spec.rb
|
536
|
+
- spec/mappers/get_act_records_response_obj_mapper_spec.rb
|
529
537
|
- spec/mappers/get_free_time_request_mapper_spec.rb
|
530
538
|
- spec/mappers/get_free_time_request_obj_mapper_spec.rb
|
531
539
|
- spec/mappers/get_free_time_response_mapper_spec.rb
|
@@ -969,6 +977,10 @@ test_files:
|
|
969
977
|
- spec/mappers/full_citizen_mapper_spec.rb
|
970
978
|
- spec/mappers/full_person_mapper_spec.rb
|
971
979
|
- spec/mappers/genders_mapper_spec.rb
|
980
|
+
- spec/mappers/get_act_records_request_mapper_spec.rb
|
981
|
+
- spec/mappers/get_act_records_request_obj_mapper_spec.rb
|
982
|
+
- spec/mappers/get_act_records_response_mapper_spec.rb
|
983
|
+
- spec/mappers/get_act_records_response_obj_mapper_spec.rb
|
972
984
|
- spec/mappers/get_free_time_request_mapper_spec.rb
|
973
985
|
- spec/mappers/get_free_time_request_obj_mapper_spec.rb
|
974
986
|
- spec/mappers/get_free_time_response_mapper_spec.rb
|