sdksio-apimatic-sdk 3.0.0 → 3.0.1

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.
Files changed (95) hide show
  1. checksums.yaml +4 -4
  2. data/LICENSE +1 -1
  3. data/README.md +165 -77
  4. data/bin/console +15 -0
  5. data/lib/apimatic_api/api_helper.rb +10 -10
  6. data/lib/apimatic_api/client.rb +108 -96
  7. data/lib/apimatic_api/configuration.rb +198 -125
  8. data/lib/apimatic_api/controllers/api_validation_external_apis_controller.rb +90 -84
  9. data/lib/apimatic_api/controllers/api_validation_v2_external_apis_controller.rb +89 -0
  10. data/lib/apimatic_api/controllers/base_controller.rb +55 -66
  11. data/lib/apimatic_api/controllers/code_generation_external_apis_controller.rb +201 -178
  12. data/lib/apimatic_api/controllers/docs_portal_generation_async_controller.rb +110 -0
  13. data/lib/apimatic_api/controllers/docs_portal_management_controller.rb +56 -198
  14. data/lib/apimatic_api/controllers/sdk_generation_async_controller.rb +112 -0
  15. data/lib/apimatic_api/controllers/transformation_controller.rb +180 -174
  16. data/lib/apimatic_api/exceptions/api_exception.rb +21 -10
  17. data/lib/apimatic_api/exceptions/bad_request_response_sdk_exception.rb +46 -0
  18. data/lib/apimatic_api/exceptions/internal_server_error_response_exception.rb +46 -0
  19. data/lib/apimatic_api/exceptions/problem_details_exception.rb +74 -0
  20. data/lib/apimatic_api/exceptions/unauthorized_response_exception.rb +46 -0
  21. data/lib/apimatic_api/http/api_response.rb +19 -0
  22. data/lib/apimatic_api/http/auth/custom_header_authentication.rb +48 -38
  23. data/lib/apimatic_api/http/http_call_back.rb +10 -10
  24. data/lib/apimatic_api/http/http_method_enum.rb +10 -10
  25. data/lib/apimatic_api/http/http_request.rb +10 -10
  26. data/lib/apimatic_api/http/http_response.rb +10 -10
  27. data/lib/apimatic_api/http/proxy_settings.rb +22 -0
  28. data/lib/apimatic_api/logging/configuration/api_logging_configuration.rb +186 -0
  29. data/lib/apimatic_api/logging/sdk_logger.rb +17 -0
  30. data/lib/apimatic_api/models/accept.rb +26 -0
  31. data/lib/apimatic_api/models/api_validation_summary.rb +100 -75
  32. data/lib/apimatic_api/models/base_model.rb +110 -62
  33. data/lib/apimatic_api/models/content_type.rb +26 -0
  34. data/lib/apimatic_api/models/export_formats.rb +85 -60
  35. data/lib/apimatic_api/models/generate_sdk_via_url_request.rb +85 -59
  36. data/lib/apimatic_api/models/line_info.rb +105 -0
  37. data/lib/apimatic_api/models/links.rb +82 -0
  38. data/lib/apimatic_api/models/platforms.rb +57 -39
  39. data/lib/apimatic_api/models/portal_generation_async_response.rb +68 -0
  40. data/lib/apimatic_api/models/portal_generation_status_response.rb +70 -0
  41. data/lib/apimatic_api/models/sdk_generation_async_response.rb +68 -0
  42. data/lib/apimatic_api/models/sdk_generation_status_response.rb +70 -0
  43. data/lib/apimatic_api/models/sdk_languages.rb +56 -0
  44. data/lib/apimatic_api/models/status.rb +48 -0
  45. data/lib/apimatic_api/models/transform_via_url_request.rb +85 -60
  46. data/lib/apimatic_api/models/transformation.rb +180 -152
  47. data/lib/apimatic_api/models/user_code_generation.rb +167 -140
  48. data/lib/apimatic_api/models/validate_api_result.rb +82 -0
  49. data/lib/apimatic_api/models/validation_entry.rb +143 -0
  50. data/lib/apimatic_api/models/validation_summary.rb +145 -0
  51. data/lib/apimatic_api/utilities/date_time_helper.rb +11 -11
  52. data/lib/apimatic_api/utilities/file_wrapper.rb +28 -16
  53. data/lib/apimatic_api.rb +79 -86
  54. metadata +39 -89
  55. data/lib/apimatic_api/controllers/api_validation_imported_apis_controller.rb +0 -74
  56. data/lib/apimatic_api/controllers/apis_management_controller.rb +0 -260
  57. data/lib/apimatic_api/controllers/code_generation_imported_apis_controller.rb +0 -136
  58. data/lib/apimatic_api/models/api_entity.rb +0 -220
  59. data/lib/apimatic_api/models/api_entity_code_generation.rb +0 -131
  60. data/lib/apimatic_api/models/api_entity_identifier.rb +0 -48
  61. data/lib/apimatic_api/models/attributes.rb +0 -48
  62. data/lib/apimatic_api/models/auth_scope.rb +0 -75
  63. data/lib/apimatic_api/models/authentication.rb +0 -112
  64. data/lib/apimatic_api/models/code_gen_settings.rb +0 -541
  65. data/lib/apimatic_api/models/code_generation.rb +0 -122
  66. data/lib/apimatic_api/models/docs_validation_summary.rb +0 -75
  67. data/lib/apimatic_api/models/endpoints_group.rb +0 -57
  68. data/lib/apimatic_api/models/environment.rb +0 -79
  69. data/lib/apimatic_api/models/field.rb +0 -156
  70. data/lib/apimatic_api/models/generate_on_prem_portal_via_build_input_request_body.rb +0 -48
  71. data/lib/apimatic_api/models/generate_sdk_via_file_request_body.rb +0 -61
  72. data/lib/apimatic_api/models/import_api_version_via_url_request.rb +0 -64
  73. data/lib/apimatic_api/models/import_api_via_file_request_body.rb +0 -51
  74. data/lib/apimatic_api/models/import_api_via_url_request.rb +0 -49
  75. data/lib/apimatic_api/models/import_new_api_version_via_file_request_body.rb +0 -66
  76. data/lib/apimatic_api/models/import_validation_summary.rb +0 -75
  77. data/lib/apimatic_api/models/inplace_api_import_binary_file.rb +0 -51
  78. data/lib/apimatic_api/models/inplace_import_api_via_url_request.rb +0 -49
  79. data/lib/apimatic_api/models/meta_data.rb +0 -70
  80. data/lib/apimatic_api/models/parameter.rb +0 -165
  81. data/lib/apimatic_api/models/paramter_format_details.rb +0 -48
  82. data/lib/apimatic_api/models/platforms_template.rb +0 -49
  83. data/lib/apimatic_api/models/server.rb +0 -69
  84. data/lib/apimatic_api/models/server_configuration.rb +0 -105
  85. data/lib/apimatic_api/models/test_gen_settings.rb +0 -70
  86. data/lib/apimatic_api/models/transform_via_file_request_body.rb +0 -61
  87. data/lib/apimatic_api/models/user_code_generation_requirements.rb +0 -57
  88. data/lib/apimatic_api/models/validate_api_via_file_request_body.rb +0 -51
  89. data/test/controllers/controller_test_base.rb +0 -29
  90. data/test/controllers/test_api_validation_external_apis_controller.rb +0 -144
  91. data/test/controllers/test_api_validation_imported_apis_controller.rb +0 -2971
  92. data/test/controllers/test_code_generation_external_apis_controller.rb +0 -32
  93. data/test/controllers/test_docs_portal_management_controller.rb +0 -94
  94. data/test/controllers/test_transformation_controller.rb +0 -32
  95. data/test/http_response_catcher.rb +0 -19
@@ -1,32 +0,0 @@
1
- # apimatic_api
2
- #
3
- # This file was automatically generated by APIMATIC v2.0
4
- # ( https://apimatic.io ).
5
-
6
- require_relative 'controller_test_base'
7
-
8
- class CodeGenerationExternalApisControllerTests < ControllerTestBase
9
- # Called only once for the class before any test has executed
10
- def setup
11
- setup_class
12
- @controller = @client.code_generation_external_apis
13
- @response_catcher = @controller.http_call_back
14
- end
15
-
16
- # Get a list of all SDK generations performed with external APIs via the Generate SDK endpoints.
17
- def test_list_all_code_generations_external
18
-
19
- # Perform the API call through the SDK function
20
- result = @controller.list_all_code_generations_external()
21
-
22
- # Test response code
23
- assert_equal(200, @response_catcher.response.status_code)
24
-
25
- # Test headers
26
- expected_headers = {}
27
- expected_headers['content-type'] = 'application/json'
28
-
29
- assert(ComparisonHelper.match_headers(expected_headers, @response_catcher.response.headers))
30
- end
31
-
32
- end
@@ -1,94 +0,0 @@
1
- # apimatic_api
2
- #
3
- # This file was automatically generated by APIMATIC v2.0
4
- # ( https://apimatic.io ).
5
-
6
- require_relative 'controller_test_base'
7
-
8
- class DocsPortalManagementControllerTests < ControllerTestBase
9
- # Called only once for the class before any test has executed
10
- def setup
11
- setup_class
12
- @controller = @client.docs_portal_management
13
- @response_catcher = @controller.http_call_back
14
- end
15
-
16
- # Publish artifacts for a Hosted Portal.
17
- #
18
- #This endpoint regenerates all the artifacts for a hosted portal and uploads them to APIMatic's cloud storage, from where the Portal fetches them. These artifacts include:
19
- #
20
- #1. SDKs
21
- #2. Docs
22
- #3. API Specification files
23
- #
24
- #Call this endpoint to update your Hosted Portal after you update an API Entity via any of the Import API Endpoints.
25
- #
26
- #__**Note: If you have an embedded portal against the same API Entity, artifacts for that portal will get updated as well.**__
27
- def test_publish_hosted_portal
28
- # Parameters for the API call
29
- api_entity_id = '5f87f8ab9615d38a2eb990ca'
30
-
31
- # Perform the API call through the SDK function
32
- @controller.publish_hosted_portal(api_entity_id)
33
-
34
- # Test response code
35
- assert_equal(200, @response_catcher.response.status_code)
36
- end
37
-
38
- # Publish artifacts for an Embedded Portal and get the Portal Embed script.
39
- #
40
- #This endpoint regenerates all the artifacts for an embedded portal and uploads them to APIMatic's cloud storage, from where the Portal fetches them. These artifacts include:
41
- #
42
- #1. SDKs
43
- #2. Docs
44
- #3. API Specification files
45
- #
46
- #Call this endpoint to update your Embedded Portal after you update an API Entity via any of the Import API Endpoints. This endpoint returns the Portal Embed script in the response.
47
- #
48
- #__**Note: If you have a hosted portal against the same API Entity, artifacts for that portal will get updated as well.**__
49
- def test_publish_embedded_portal
50
- # Parameters for the API call
51
- api_entity_id = '5f87f8ab9615d38a2eb990ca'
52
-
53
- # Perform the API call through the SDK function
54
- @controller.publish_embedded_portal(api_entity_id)
55
-
56
- # Test response code
57
- assert_equal(200, @response_catcher.response.status_code)
58
- end
59
-
60
- # Generate an On-premise Documentation Portal for an API Entity. This endpoint generates all artifacts for the Portal and packages them together into a zip file along with the required HTML, CSS and JS files. The generated artifacts include:
61
- #
62
- #1. SDKs
63
- #2. Docs
64
- #3. API Specification files
65
- #
66
- #The endpoint returns a zip file that contains a static Site and can be hosted on any Web Server.
67
- def test_generate_on_prem_portal_via_api_entity
68
- # Parameters for the API call
69
- api_entity_id = '5f87f8ab9615d38a2eb990ca'
70
-
71
- # Perform the API call through the SDK function
72
- @controller.generate_on_prem_portal_via_api_entity(api_entity_id)
73
-
74
- # Test response code
75
- assert_equal(200, @response_catcher.response.status_code)
76
- end
77
-
78
- # Unpublish a Hosted or Embedded Portal published for an API Entity. Calling this endpoint deletes all the published artifacts for a Portal from APIMatic's cloud storage.
79
- #
80
- #In case of a Hosted Portal, to completely remove the Portal, this endpoint needs to be called against all API versions that the Portal hosts.
81
- #
82
- #In case of an Embedded Portal, to completely remove the Portal, the user needs to manually remove the Portal Embed script from the embedding site.
83
- def test_unpublish_portal
84
- # Parameters for the API call
85
- api_entity_id = '5f87f8ab9615d38a2eb990ca'
86
-
87
- # Perform the API call through the SDK function
88
- @controller.unpublish_portal(api_entity_id)
89
-
90
- # Test response code
91
- assert_equal(200, @response_catcher.response.status_code)
92
- end
93
-
94
- end
@@ -1,32 +0,0 @@
1
- # apimatic_api
2
- #
3
- # This file was automatically generated by APIMATIC v2.0
4
- # ( https://apimatic.io ).
5
-
6
- require_relative 'controller_test_base'
7
-
8
- class TransformationControllerTests < ControllerTestBase
9
- # Called only once for the class before any test has executed
10
- def setup
11
- setup_class
12
- @controller = @client.transformation
13
- @response_catcher = @controller.http_call_back
14
- end
15
-
16
- # Get a list of all API transformations performed.
17
- def test_list_all_transformations
18
-
19
- # Perform the API call through the SDK function
20
- result = @controller.list_all_transformations()
21
-
22
- # Test response code
23
- assert_equal(200, @response_catcher.response.status_code)
24
-
25
- # Test headers
26
- expected_headers = {}
27
- expected_headers['content-type'] = 'application/json'
28
-
29
- assert(ComparisonHelper.match_headers(expected_headers, @response_catcher.response.headers))
30
- end
31
-
32
- end
@@ -1,19 +0,0 @@
1
- # apimatic_api
2
- #
3
- # This file was automatically generated by APIMATIC v2.0
4
- # ( https://apimatic.io ).
5
-
6
- class HttpResponseCatcher < ApimaticApi::HttpCallBack
7
- attr_accessor :response
8
-
9
- def on_before_request(request)
10
- end
11
-
12
- # Catching the response
13
- def on_after_response(response)
14
- @response = response
15
- end
16
- end
17
-
18
-
19
-