form_api 0.2.0 → 1.0.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (94) hide show
  1. checksums.yaml +4 -4
  2. data/.gitignore +1 -1
  3. data/{.swagger-codegen-ignore → .openapi-generator-ignore} +3 -3
  4. data/.openapi-generator/VERSION +1 -0
  5. data/.rubocop.yml +154 -0
  6. data/Gemfile.lock +15 -16
  7. data/README.md +30 -28
  8. data/Rakefile +2 -0
  9. data/docs/{InlineResponse422.md → AuthenticationError.md} +3 -3
  10. data/docs/{InlineResponse401.md → AuthenticationSuccessResponse.md} +2 -2
  11. data/docs/CombinedSubmission.md +14 -0
  12. data/docs/CombinedSubmissionData.md +11 -0
  13. data/docs/CreateCombinedSubmissionResponse.md +10 -0
  14. data/docs/CreateSubmissionBatchResponse.md +12 -0
  15. data/docs/CreateSubmissionData.md +12 -0
  16. data/docs/CreateSubmissionDataBatchRequest.md +13 -0
  17. data/docs/CreateSubmissionResponse.md +10 -0
  18. data/docs/CreateSubmissionResponse1.md +10 -0
  19. data/docs/{InlineResponse200.md → Error.md} +3 -2
  20. data/docs/{InlineResponse400.md → InvalidRequest.md} +3 -3
  21. data/docs/PDFApi.md +148 -64
  22. data/docs/Submission.md +16 -0
  23. data/docs/SubmissionBatch.md +16 -0
  24. data/docs/SubmissionBatchData.md +11 -0
  25. data/docs/Template.md +21 -0
  26. data/form_api.gemspec +6 -11
  27. data/git_push.sh +3 -3
  28. data/lib/form_api.rb +22 -15
  29. data/lib/form_api/api/client.rb +91 -38
  30. data/lib/form_api/api/pdf_api.rb +222 -109
  31. data/lib/form_api/api_client.rb +13 -13
  32. data/lib/form_api/api_error.rb +3 -3
  33. data/lib/form_api/configuration.rb +26 -5
  34. data/lib/form_api/models/{inline_response_201_1.rb → authentication_error.rb} +25 -29
  35. data/lib/form_api/models/{inline_response_200.rb → authentication_success_response.rb} +15 -24
  36. data/lib/form_api/models/{inline_response_201_combined_submission.rb → combined_submission.rb} +42 -66
  37. data/lib/form_api/models/{create_combined_submission_body.rb → combined_submission_data.rb} +13 -18
  38. data/lib/form_api/models/{inline_response_201.rb → create_combined_submission_response.rb} +37 -35
  39. data/lib/form_api/models/create_submission_batch_response.rb +257 -0
  40. data/lib/form_api/models/{create_submission_batch_body.rb → create_submission_data.rb} +32 -19
  41. data/lib/form_api/models/{create_submission_body.rb → create_submission_data_batch_request.rb} +45 -18
  42. data/lib/form_api/models/create_submission_response.rb +237 -0
  43. data/lib/form_api/models/create_submission_response1.rb +237 -0
  44. data/lib/form_api/models/{inline_response_400.rb → error.rb} +17 -21
  45. data/lib/form_api/models/{inline_response_422.rb → invalid_request.rb} +17 -21
  46. data/lib/form_api/models/{templatestemplate_idsubmissionsbatch_submission.rb → submission.rb} +40 -26
  47. data/lib/form_api/models/submission_batch.rb +291 -0
  48. data/lib/form_api/models/{inline_response_401.rb → submission_batch_data.rb} +48 -24
  49. data/lib/form_api/models/{inline_response_200_1.rb → template.rb} +88 -152
  50. data/lib/form_api/version.rb +4 -4
  51. data/spec/api/client_spec.rb +197 -23
  52. data/spec/api/pdf_api_spec.rb +168 -63
  53. data/spec/api_client_spec.rb +37 -37
  54. data/spec/configuration_spec.rb +11 -11
  55. data/spec/models/authentication_error_spec.rb +51 -0
  56. data/spec/models/authentication_success_response_spec.rb +45 -0
  57. data/spec/models/combined_submission_data_spec.rb +59 -0
  58. data/spec/models/combined_submission_spec.rb +81 -0
  59. data/spec/models/create_combined_submission_response_spec.rb +57 -0
  60. data/spec/models/create_submission_batch_response_spec.rb +69 -0
  61. data/spec/models/create_submission_data_batch_request_spec.rb +71 -0
  62. data/spec/models/create_submission_data_spec.rb +65 -0
  63. data/spec/models/create_submission_response1_spec.rb +57 -0
  64. data/spec/models/create_submission_response_spec.rb +57 -0
  65. data/spec/models/error_spec.rb +51 -0
  66. data/spec/models/invalid_request_spec.rb +51 -0
  67. data/spec/models/submission_batch_data_spec.rb +59 -0
  68. data/spec/models/submission_batch_spec.rb +93 -0
  69. data/spec/models/submission_spec.rb +93 -0
  70. data/spec/models/template_spec.rb +123 -0
  71. data/spec/spec_helper.rb +3 -14
  72. metadata +70 -95
  73. data/.swagger-codegen/VERSION +0 -1
  74. data/docs/CreateCombinedSubmissionBody.md +0 -11
  75. data/docs/CreateSubmissionBatchBody.md +0 -10
  76. data/docs/CreateSubmissionBody.md +0 -10
  77. data/docs/InlineResponse2001.md +0 -21
  78. data/docs/InlineResponse201.md +0 -9
  79. data/docs/InlineResponse2011.md +0 -9
  80. data/docs/InlineResponse201CombinedSubmission.md +0 -14
  81. data/docs/TemplatestemplateIdsubmissionsbatchSubmission.md +0 -14
  82. data/spec/models/create_combined_submission_body_spec.rb +0 -60
  83. data/spec/models/create_submission_batch_body_spec.rb +0 -54
  84. data/spec/models/create_submission_body_spec.rb +0 -54
  85. data/spec/models/inline_response_200_1_spec.rb +0 -124
  86. data/spec/models/inline_response_200_spec.rb +0 -46
  87. data/spec/models/inline_response_201_1_spec.rb +0 -52
  88. data/spec/models/inline_response_201_combined_submission_spec.rb +0 -82
  89. data/spec/models/inline_response_201_spec.rb +0 -52
  90. data/spec/models/inline_response_400_spec.rb +0 -52
  91. data/spec/models/inline_response_401_spec.rb +0 -42
  92. data/spec/models/inline_response_422_spec.rb +0 -52
  93. data/spec/models/templatestemplate_idsubmissionsbatch_submission_spec.rb +0 -82
  94. data/spec/vcr_cassettes/FormAPI_Client/should_generate_a_PDF_and_wait_for_the_submission_to_be_processed.yml +0 -127
@@ -0,0 +1,57 @@
1
+ =begin
2
+ #API V1
3
+
4
+ #No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
5
+
6
+ OpenAPI spec version: v1
7
+
8
+ Generated by: https://openapi-generator.tech
9
+ OpenAPI Generator version: 3.3.0-SNAPSHOT
10
+
11
+ =end
12
+
13
+ require 'spec_helper'
14
+ require 'json'
15
+ require 'date'
16
+
17
+ # Unit tests for FormAPI::CreateCombinedSubmissionResponse
18
+ # Automatically generated by openapi-generator (https://openapi-generator.tech)
19
+ # Please update as you see appropriate
20
+ describe 'CreateCombinedSubmissionResponse' do
21
+ before do
22
+ # run before each test
23
+ @instance = FormAPI::CreateCombinedSubmissionResponse.new
24
+ end
25
+
26
+ after do
27
+ # run after each test
28
+ end
29
+
30
+ describe 'test an instance of CreateCombinedSubmissionResponse' do
31
+ it 'should create an instance of CreateCombinedSubmissionResponse' do
32
+ expect(@instance).to be_instance_of(FormAPI::CreateCombinedSubmissionResponse)
33
+ end
34
+ end
35
+ describe 'test attribute "combined_submission"' do
36
+ it 'should work' do
37
+ # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
38
+ end
39
+ end
40
+
41
+ describe 'test attribute "errors"' do
42
+ it 'should work' do
43
+ # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
44
+ end
45
+ end
46
+
47
+ describe 'test attribute "status"' do
48
+ it 'should work' do
49
+ # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
50
+ # validator = Petstore::EnumTest::EnumAttributeValidator.new('String', ["success", "error"])
51
+ # validator.allowable_values.each do |value|
52
+ # expect { @instance.status = value }.not_to raise_error
53
+ # end
54
+ end
55
+ end
56
+
57
+ end
@@ -0,0 +1,69 @@
1
+ =begin
2
+ #API V1
3
+
4
+ #No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
5
+
6
+ OpenAPI spec version: v1
7
+
8
+ Generated by: https://openapi-generator.tech
9
+ OpenAPI Generator version: 3.3.0-SNAPSHOT
10
+
11
+ =end
12
+
13
+ require 'spec_helper'
14
+ require 'json'
15
+ require 'date'
16
+
17
+ # Unit tests for FormAPI::CreateSubmissionBatchResponse
18
+ # Automatically generated by openapi-generator (https://openapi-generator.tech)
19
+ # Please update as you see appropriate
20
+ describe 'CreateSubmissionBatchResponse' do
21
+ before do
22
+ # run before each test
23
+ @instance = FormAPI::CreateSubmissionBatchResponse.new
24
+ end
25
+
26
+ after do
27
+ # run after each test
28
+ end
29
+
30
+ describe 'test an instance of CreateSubmissionBatchResponse' do
31
+ it 'should create an instance of CreateSubmissionBatchResponse' do
32
+ expect(@instance).to be_instance_of(FormAPI::CreateSubmissionBatchResponse)
33
+ end
34
+ end
35
+ describe 'test attribute "submission_batch"' do
36
+ it 'should work' do
37
+ # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
38
+ end
39
+ end
40
+
41
+ describe 'test attribute "submissions"' do
42
+ it 'should work' do
43
+ # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
44
+ end
45
+ end
46
+
47
+ describe 'test attribute "error"' do
48
+ it 'should work' do
49
+ # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
50
+ end
51
+ end
52
+
53
+ describe 'test attribute "errors"' do
54
+ it 'should work' do
55
+ # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
56
+ end
57
+ end
58
+
59
+ describe 'test attribute "status"' do
60
+ it 'should work' do
61
+ # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
62
+ # validator = Petstore::EnumTest::EnumAttributeValidator.new('String', ["success", "error"])
63
+ # validator.allowable_values.each do |value|
64
+ # expect { @instance.status = value }.not_to raise_error
65
+ # end
66
+ end
67
+ end
68
+
69
+ end
@@ -0,0 +1,71 @@
1
+ =begin
2
+ #API V1
3
+
4
+ #No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
5
+
6
+ OpenAPI spec version: v1
7
+
8
+ Generated by: https://openapi-generator.tech
9
+ OpenAPI Generator version: 3.3.0-SNAPSHOT
10
+
11
+ =end
12
+
13
+ require 'spec_helper'
14
+ require 'json'
15
+ require 'date'
16
+
17
+ # Unit tests for FormAPI::CreateSubmissionDataBatchRequest
18
+ # Automatically generated by openapi-generator (https://openapi-generator.tech)
19
+ # Please update as you see appropriate
20
+ describe 'CreateSubmissionDataBatchRequest' do
21
+ before do
22
+ # run before each test
23
+ @instance = FormAPI::CreateSubmissionDataBatchRequest.new
24
+ end
25
+
26
+ after do
27
+ # run after each test
28
+ end
29
+
30
+ describe 'test an instance of CreateSubmissionDataBatchRequest' do
31
+ it 'should create an instance of CreateSubmissionDataBatchRequest' do
32
+ expect(@instance).to be_instance_of(FormAPI::CreateSubmissionDataBatchRequest)
33
+ end
34
+ end
35
+ describe 'test attribute "template_id"' do
36
+ it 'should work' do
37
+ # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
38
+ end
39
+ end
40
+
41
+ describe 'test attribute "test"' do
42
+ it 'should work' do
43
+ # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
44
+ end
45
+ end
46
+
47
+ describe 'test attribute "data"' do
48
+ it 'should work' do
49
+ # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
50
+ end
51
+ end
52
+
53
+ describe 'test attribute "html"' do
54
+ it 'should work' do
55
+ # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
56
+ end
57
+ end
58
+
59
+ describe 'test attribute "css"' do
60
+ it 'should work' do
61
+ # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
62
+ end
63
+ end
64
+
65
+ describe 'test attribute "metadata"' do
66
+ it 'should work' do
67
+ # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
68
+ end
69
+ end
70
+
71
+ end
@@ -0,0 +1,65 @@
1
+ =begin
2
+ #API V1
3
+
4
+ #No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
5
+
6
+ OpenAPI spec version: v1
7
+
8
+ Generated by: https://openapi-generator.tech
9
+ OpenAPI Generator version: 3.3.0-SNAPSHOT
10
+
11
+ =end
12
+
13
+ require 'spec_helper'
14
+ require 'json'
15
+ require 'date'
16
+
17
+ # Unit tests for FormAPI::CreateSubmissionData
18
+ # Automatically generated by openapi-generator (https://openapi-generator.tech)
19
+ # Please update as you see appropriate
20
+ describe 'CreateSubmissionData' do
21
+ before do
22
+ # run before each test
23
+ @instance = FormAPI::CreateSubmissionData.new
24
+ end
25
+
26
+ after do
27
+ # run after each test
28
+ end
29
+
30
+ describe 'test an instance of CreateSubmissionData' do
31
+ it 'should create an instance of CreateSubmissionData' do
32
+ expect(@instance).to be_instance_of(FormAPI::CreateSubmissionData)
33
+ end
34
+ end
35
+ describe 'test attribute "test"' do
36
+ it 'should work' do
37
+ # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
38
+ end
39
+ end
40
+
41
+ describe 'test attribute "data"' do
42
+ it 'should work' do
43
+ # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
44
+ end
45
+ end
46
+
47
+ describe 'test attribute "html"' do
48
+ it 'should work' do
49
+ # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
50
+ end
51
+ end
52
+
53
+ describe 'test attribute "css"' do
54
+ it 'should work' do
55
+ # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
56
+ end
57
+ end
58
+
59
+ describe 'test attribute "metadata"' do
60
+ it 'should work' do
61
+ # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
62
+ end
63
+ end
64
+
65
+ end
@@ -0,0 +1,57 @@
1
+ =begin
2
+ #API V1
3
+
4
+ #No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
5
+
6
+ OpenAPI spec version: v1
7
+
8
+ Generated by: https://openapi-generator.tech
9
+ OpenAPI Generator version: 3.3.0-SNAPSHOT
10
+
11
+ =end
12
+
13
+ require 'spec_helper'
14
+ require 'json'
15
+ require 'date'
16
+
17
+ # Unit tests for FormAPI::CreateSubmissionResponse1
18
+ # Automatically generated by openapi-generator (https://openapi-generator.tech)
19
+ # Please update as you see appropriate
20
+ describe 'CreateSubmissionResponse1' do
21
+ before do
22
+ # run before each test
23
+ @instance = FormAPI::CreateSubmissionResponse1.new
24
+ end
25
+
26
+ after do
27
+ # run after each test
28
+ end
29
+
30
+ describe 'test an instance of CreateSubmissionResponse1' do
31
+ it 'should create an instance of CreateSubmissionResponse1' do
32
+ expect(@instance).to be_instance_of(FormAPI::CreateSubmissionResponse1)
33
+ end
34
+ end
35
+ describe 'test attribute "submission"' do
36
+ it 'should work' do
37
+ # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
38
+ end
39
+ end
40
+
41
+ describe 'test attribute "errors"' do
42
+ it 'should work' do
43
+ # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
44
+ end
45
+ end
46
+
47
+ describe 'test attribute "status"' do
48
+ it 'should work' do
49
+ # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
50
+ # validator = Petstore::EnumTest::EnumAttributeValidator.new('String', ["success", "error", "valid_but_not_saved"])
51
+ # validator.allowable_values.each do |value|
52
+ # expect { @instance.status = value }.not_to raise_error
53
+ # end
54
+ end
55
+ end
56
+
57
+ end
@@ -0,0 +1,57 @@
1
+ =begin
2
+ #API V1
3
+
4
+ #No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
5
+
6
+ OpenAPI spec version: v1
7
+
8
+ Generated by: https://openapi-generator.tech
9
+ OpenAPI Generator version: 3.3.0-SNAPSHOT
10
+
11
+ =end
12
+
13
+ require 'spec_helper'
14
+ require 'json'
15
+ require 'date'
16
+
17
+ # Unit tests for FormAPI::CreateSubmissionResponse
18
+ # Automatically generated by openapi-generator (https://openapi-generator.tech)
19
+ # Please update as you see appropriate
20
+ describe 'CreateSubmissionResponse' do
21
+ before do
22
+ # run before each test
23
+ @instance = FormAPI::CreateSubmissionResponse.new
24
+ end
25
+
26
+ after do
27
+ # run after each test
28
+ end
29
+
30
+ describe 'test an instance of CreateSubmissionResponse' do
31
+ it 'should create an instance of CreateSubmissionResponse' do
32
+ expect(@instance).to be_instance_of(FormAPI::CreateSubmissionResponse)
33
+ end
34
+ end
35
+ describe 'test attribute "submission"' do
36
+ it 'should work' do
37
+ # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
38
+ end
39
+ end
40
+
41
+ describe 'test attribute "errors"' do
42
+ it 'should work' do
43
+ # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
44
+ end
45
+ end
46
+
47
+ describe 'test attribute "status"' do
48
+ it 'should work' do
49
+ # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
50
+ # validator = Petstore::EnumTest::EnumAttributeValidator.new('String', ["success", "error"])
51
+ # validator.allowable_values.each do |value|
52
+ # expect { @instance.status = value }.not_to raise_error
53
+ # end
54
+ end
55
+ end
56
+
57
+ end
@@ -0,0 +1,51 @@
1
+ =begin
2
+ #API V1
3
+
4
+ #No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
5
+
6
+ OpenAPI spec version: v1
7
+
8
+ Generated by: https://openapi-generator.tech
9
+ OpenAPI Generator version: 3.3.0-SNAPSHOT
10
+
11
+ =end
12
+
13
+ require 'spec_helper'
14
+ require 'json'
15
+ require 'date'
16
+
17
+ # Unit tests for FormAPI::Error
18
+ # Automatically generated by openapi-generator (https://openapi-generator.tech)
19
+ # Please update as you see appropriate
20
+ describe 'Error' do
21
+ before do
22
+ # run before each test
23
+ @instance = FormAPI::Error.new
24
+ end
25
+
26
+ after do
27
+ # run after each test
28
+ end
29
+
30
+ describe 'test an instance of Error' do
31
+ it 'should create an instance of Error' do
32
+ expect(@instance).to be_instance_of(FormAPI::Error)
33
+ end
34
+ end
35
+ describe 'test attribute "status"' do
36
+ it 'should work' do
37
+ # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
38
+ # validator = Petstore::EnumTest::EnumAttributeValidator.new('String', ["error"])
39
+ # validator.allowable_values.each do |value|
40
+ # expect { @instance.status = value }.not_to raise_error
41
+ # end
42
+ end
43
+ end
44
+
45
+ describe 'test attribute "error"' do
46
+ it 'should work' do
47
+ # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
48
+ end
49
+ end
50
+
51
+ end
@@ -0,0 +1,51 @@
1
+ =begin
2
+ #API V1
3
+
4
+ #No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
5
+
6
+ OpenAPI spec version: v1
7
+
8
+ Generated by: https://openapi-generator.tech
9
+ OpenAPI Generator version: 3.3.0-SNAPSHOT
10
+
11
+ =end
12
+
13
+ require 'spec_helper'
14
+ require 'json'
15
+ require 'date'
16
+
17
+ # Unit tests for FormAPI::InvalidRequest
18
+ # Automatically generated by openapi-generator (https://openapi-generator.tech)
19
+ # Please update as you see appropriate
20
+ describe 'InvalidRequest' do
21
+ before do
22
+ # run before each test
23
+ @instance = FormAPI::InvalidRequest.new
24
+ end
25
+
26
+ after do
27
+ # run after each test
28
+ end
29
+
30
+ describe 'test an instance of InvalidRequest' do
31
+ it 'should create an instance of InvalidRequest' do
32
+ expect(@instance).to be_instance_of(FormAPI::InvalidRequest)
33
+ end
34
+ end
35
+ describe 'test attribute "status"' do
36
+ it 'should work' do
37
+ # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
38
+ # validator = Petstore::EnumTest::EnumAttributeValidator.new('String', ["error"])
39
+ # validator.allowable_values.each do |value|
40
+ # expect { @instance.status = value }.not_to raise_error
41
+ # end
42
+ end
43
+ end
44
+
45
+ describe 'test attribute "errors"' do
46
+ it 'should work' do
47
+ # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
48
+ end
49
+ end
50
+
51
+ end