emasser 1.0.0 → 1.0.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.github/workflows/release.yml +6 -2
- data/.github/workflows/test-cli.yml +4 -5
- data/.gitignore +1 -0
- data/Gemfile +1 -1
- data/Gemfile.lock +26 -24
- data/README.md +4 -4
- data/emasser.gemspec +4 -3
- data/exe/emasser +0 -0
- data/lib/emasser/configuration.rb +1 -1
- data/lib/emasser/delete.rb +8 -8
- data/lib/emasser/get.rb +43 -43
- data/lib/emasser/post.rb +29 -29
- data/lib/emasser/put.rb +14 -14
- data/lib/emasser/version.rb +1 -1
- data/lib/emasser.rb +1 -1
- metadata +20 -400
- data/TAGS +0 -2393
- data/emass_client/eMASSRestOpenApi.yaml +0 -5698
- data/emass_client/ruby_client/.gitignore +0 -39
- data/emass_client/ruby_client/.rspec +0 -2
- data/emass_client/ruby_client/.rubocop.yml +0 -154
- data/emass_client/ruby_client/.swagger-codegen/VERSION +0 -1
- data/emass_client/ruby_client/.swagger-codegen-ignore +0 -23
- data/emass_client/ruby_client/Gemfile +0 -9
- data/emass_client/ruby_client/README.md +0 -1284
- data/emass_client/ruby_client/Rakefile +0 -8
- data/emass_client/ruby_client/docs/ArtifactsApi.md +0 -284
- data/emass_client/ruby_client/docs/ArtifactsDelete.md +0 -6
- data/emass_client/ruby_client/docs/ArtifactsDeleteInner.md +0 -7
- data/emass_client/ruby_client/docs/ArtifactsExportApi.md +0 -76
- data/emass_client/ruby_client/docs/ArtifactsGet.md +0 -20
- data/emass_client/ruby_client/docs/ArtifactsRequestPutBody.md +0 -16
- data/emass_client/ruby_client/docs/ArtifactsResponseDel.md +0 -8
- data/emass_client/ruby_client/docs/ArtifactsResponseDelData.md +0 -9
- data/emass_client/ruby_client/docs/ArtifactsResponseGet.md +0 -8
- data/emass_client/ruby_client/docs/ArtifactsResponsePutPost.md +0 -8
- data/emass_client/ruby_client/docs/CACApi.md +0 -140
- data/emass_client/ruby_client/docs/CMMCAssessmentsApi.md +0 -71
- data/emass_client/ruby_client/docs/CacGet.md +0 -13
- data/emass_client/ruby_client/docs/CacRequestPostBody.md +0 -8
- data/emass_client/ruby_client/docs/CacResponseGet.md +0 -8
- data/emass_client/ruby_client/docs/CacResponsePost.md +0 -8
- data/emass_client/ruby_client/docs/CacResponsePostData.md +0 -9
- data/emass_client/ruby_client/docs/CmmcGet.md +0 -19
- data/emass_client/ruby_client/docs/CmmcResponseGet.md +0 -8
- data/emass_client/ruby_client/docs/ConnectivityCcsd.md +0 -8
- data/emass_client/ruby_client/docs/ControlsApi.md +0 -140
- data/emass_client/ruby_client/docs/ControlsGet.md +0 -36
- data/emass_client/ruby_client/docs/ControlsPut.md +0 -9
- data/emass_client/ruby_client/docs/ControlsRequestPutBody.md +0 -29
- data/emass_client/ruby_client/docs/ControlsResponseGet.md +0 -8
- data/emass_client/ruby_client/docs/ControlsResponsePut.md +0 -8
- data/emass_client/ruby_client/docs/DefinitionTransitions.md +0 -9
- data/emass_client/ruby_client/docs/DeleteMilestone.md +0 -7
- data/emass_client/ruby_client/docs/DeletePoam.md +0 -7
- data/emass_client/ruby_client/docs/Empty200Response.md +0 -6
- data/emass_client/ruby_client/docs/Error.md +0 -8
- data/emass_client/ruby_client/docs/InstancesTransitions.md +0 -12
- data/emass_client/ruby_client/docs/MilestoneResponseGet.md +0 -8
- data/emass_client/ruby_client/docs/MilestoneResponsePost.md +0 -8
- data/emass_client/ruby_client/docs/MilestoneResponsePut.md +0 -8
- data/emass_client/ruby_client/docs/MilestonesApi.md +0 -350
- data/emass_client/ruby_client/docs/MilestonesDelete.md +0 -6
- data/emass_client/ruby_client/docs/MilestonesGet.md +0 -12
- data/emass_client/ruby_client/docs/MilestonesPost.md +0 -6
- data/emass_client/ruby_client/docs/MilestonesPut.md +0 -6
- data/emass_client/ruby_client/docs/MilestonesPutPostDelete.md +0 -11
- data/emass_client/ruby_client/docs/MilestonesRequestPostBody.md +0 -9
- data/emass_client/ruby_client/docs/MilestonesRequestPutBody.md +0 -9
- data/emass_client/ruby_client/docs/MilestonesRequiredPost.md +0 -8
- data/emass_client/ruby_client/docs/MilestonesRequiredPut.md +0 -9
- data/emass_client/ruby_client/docs/Model200.md +0 -7
- data/emass_client/ruby_client/docs/Model201.md +0 -7
- data/emass_client/ruby_client/docs/Model201Meta.md +0 -8
- data/emass_client/ruby_client/docs/Model400.md +0 -7
- data/emass_client/ruby_client/docs/Model400Meta.md +0 -8
- data/emass_client/ruby_client/docs/Model400Response.md +0 -7
- data/emass_client/ruby_client/docs/Model401.md +0 -7
- data/emass_client/ruby_client/docs/Model401Meta.md +0 -8
- data/emass_client/ruby_client/docs/Model403.md +0 -7
- data/emass_client/ruby_client/docs/Model403Meta.md +0 -8
- data/emass_client/ruby_client/docs/Model404.md +0 -8
- data/emass_client/ruby_client/docs/Model404Response.md +0 -7
- data/emass_client/ruby_client/docs/Model405.md +0 -7
- data/emass_client/ruby_client/docs/Model405Meta.md +0 -8
- data/emass_client/ruby_client/docs/Model411.md +0 -7
- data/emass_client/ruby_client/docs/Model411Meta.md +0 -8
- data/emass_client/ruby_client/docs/Model490.md +0 -7
- data/emass_client/ruby_client/docs/Model490Meta.md +0 -8
- data/emass_client/ruby_client/docs/Model500.md +0 -7
- data/emass_client/ruby_client/docs/Model500Meta.md +0 -8
- data/emass_client/ruby_client/docs/PACApi.md +0 -137
- data/emass_client/ruby_client/docs/POAMApi.md +0 -346
- data/emass_client/ruby_client/docs/PacGet.md +0 -14
- data/emass_client/ruby_client/docs/PacPost.md +0 -9
- data/emass_client/ruby_client/docs/PacRequestPostBody.md +0 -9
- data/emass_client/ruby_client/docs/PacResponseGet.md +0 -8
- data/emass_client/ruby_client/docs/PacResponsePost.md +0 -8
- data/emass_client/ruby_client/docs/PoamDelete.md +0 -6
- data/emass_client/ruby_client/docs/PoamGet.md +0 -39
- data/emass_client/ruby_client/docs/PoamPost.md +0 -6
- data/emass_client/ruby_client/docs/PoamPostPutDel.md +0 -10
- data/emass_client/ruby_client/docs/PoamPut.md +0 -6
- data/emass_client/ruby_client/docs/PoamRequestPostBody.md +0 -6
- data/emass_client/ruby_client/docs/PoamRequestPutBody.md +0 -6
- data/emass_client/ruby_client/docs/PoamRequiredPost.md +0 -32
- data/emass_client/ruby_client/docs/PoamRequiredPut.md +0 -35
- data/emass_client/ruby_client/docs/PoamResponseDelete.md +0 -8
- data/emass_client/ruby_client/docs/PoamResponseGet.md +0 -8
- data/emass_client/ruby_client/docs/PoamResponsePost.md +0 -8
- data/emass_client/ruby_client/docs/PoamResponsePut.md +0 -8
- data/emass_client/ruby_client/docs/Register.md +0 -8
- data/emass_client/ruby_client/docs/RegisterData.md +0 -7
- data/emass_client/ruby_client/docs/RegisterUserRequestPostBody.md +0 -7
- data/emass_client/ruby_client/docs/RegistrationApi.md +0 -71
- data/emass_client/ruby_client/docs/RoleCategory.md +0 -10
- data/emass_client/ruby_client/docs/Roles.md +0 -9
- data/emass_client/ruby_client/docs/Ssps.md +0 -9
- data/emass_client/ruby_client/docs/Stage.md +0 -8
- data/emass_client/ruby_client/docs/StaticCodeApplication.md +0 -12
- data/emass_client/ruby_client/docs/StaticCodeRequestPostBody.md +0 -6
- data/emass_client/ruby_client/docs/StaticCodeRequiredPost.md +0 -8
- data/emass_client/ruby_client/docs/StaticCodeRequiredPostApplication.md +0 -8
- data/emass_client/ruby_client/docs/StaticCodeScansApi.md +0 -73
- data/emass_client/ruby_client/docs/Success200Response.md +0 -8
- data/emass_client/ruby_client/docs/SystemIdArtifactsBody.md +0 -10
- data/emass_client/ruby_client/docs/SystemResponse.md +0 -8
- data/emass_client/ruby_client/docs/SystemRolesApi.md +0 -137
- data/emass_client/ruby_client/docs/SystemRolesCategoryResponse.md +0 -8
- data/emass_client/ruby_client/docs/SystemRolesResponse.md +0 -8
- data/emass_client/ruby_client/docs/SystemRolesResponseData.md +0 -8
- data/emass_client/ruby_client/docs/Systems.md +0 -70
- data/emass_client/ruby_client/docs/SystemsApi.md +0 -155
- data/emass_client/ruby_client/docs/Test.md +0 -8
- data/emass_client/ruby_client/docs/TestApi.md +0 -66
- data/emass_client/ruby_client/docs/TestData.md +0 -7
- data/emass_client/ruby_client/docs/TestResultsApi.md +0 -144
- data/emass_client/ruby_client/docs/TestResultsGet.md +0 -15
- data/emass_client/ruby_client/docs/TestResultsPost.md +0 -9
- data/emass_client/ruby_client/docs/TestResultsRequestPostBody.md +0 -11
- data/emass_client/ruby_client/docs/TestResultsResponseGet.md +0 -8
- data/emass_client/ruby_client/docs/TestResultsResponsePost.md +0 -8
- data/emass_client/ruby_client/docs/Users.md +0 -9
- data/emass_client/ruby_client/docs/WorkflowDefinitionGet.md +0 -11
- data/emass_client/ruby_client/docs/WorkflowDefinitionResponseGet.md +0 -8
- data/emass_client/ruby_client/docs/WorkflowDefinitionsApi.md +0 -74
- data/emass_client/ruby_client/docs/WorkflowInstancesApi.md +0 -146
- data/emass_client/ruby_client/docs/WorkflowInstancesGet.md +0 -16
- data/emass_client/ruby_client/docs/WorkflowInstancesResponseGet.md +0 -8
- data/emass_client/ruby_client/git_push.sh +0 -55
- data/emass_client/ruby_client/lib/swagger_client/api/artifacts_api.rb +0 -310
- data/emass_client/ruby_client/lib/swagger_client/api/artifacts_export_api.rb +0 -86
- data/emass_client/ruby_client/lib/swagger_client/api/cac_api.rb +0 -143
- data/emass_client/ruby_client/lib/swagger_client/api/cmmc_assessments_api.rb +0 -77
- data/emass_client/ruby_client/lib/swagger_client/api/controls_api.rb +0 -143
- data/emass_client/ruby_client/lib/swagger_client/api/milestones_api.rb +0 -366
- data/emass_client/ruby_client/lib/swagger_client/api/pac_api.rb +0 -140
- data/emass_client/ruby_client/lib/swagger_client/api/poam_api.rb +0 -345
- data/emass_client/ruby_client/lib/swagger_client/api/registration_api.rb +0 -78
- data/emass_client/ruby_client/lib/swagger_client/api/static_code_scans_api.rb +0 -84
- data/emass_client/ruby_client/lib/swagger_client/api/system_roles_api.rb +0 -150
- data/emass_client/ruby_client/lib/swagger_client/api/systems_api.rb +0 -162
- data/emass_client/ruby_client/lib/swagger_client/api/test_api.rb +0 -70
- data/emass_client/ruby_client/lib/swagger_client/api/test_results_api.rb +0 -149
- data/emass_client/ruby_client/lib/swagger_client/api/workflow_definitions_api.rb +0 -76
- data/emass_client/ruby_client/lib/swagger_client/api/workflow_instances_api.rb +0 -153
- data/emass_client/ruby_client/lib/swagger_client/api_client.rb +0 -389
- data/emass_client/ruby_client/lib/swagger_client/api_error.rb +0 -57
- data/emass_client/ruby_client/lib/swagger_client/configuration.rb +0 -224
- data/emass_client/ruby_client/lib/swagger_client/models/artifacts_delete.rb +0 -201
- data/emass_client/ruby_client/lib/swagger_client/models/artifacts_delete_inner.rb +0 -207
- data/emass_client/ruby_client/lib/swagger_client/models/artifacts_get.rb +0 -383
- data/emass_client/ruby_client/lib/swagger_client/models/artifacts_request_put_body.rb +0 -363
- data/emass_client/ruby_client/lib/swagger_client/models/artifacts_response_del.rb +0 -217
- data/emass_client/ruby_client/lib/swagger_client/models/artifacts_response_del_data.rb +0 -225
- data/emass_client/ruby_client/lib/swagger_client/models/artifacts_response_get.rb +0 -217
- data/emass_client/ruby_client/lib/swagger_client/models/artifacts_response_put_post.rb +0 -217
- data/emass_client/ruby_client/lib/swagger_client/models/cac_get.rb +0 -301
- data/emass_client/ruby_client/lib/swagger_client/models/cac_request_post_body.rb +0 -217
- data/emass_client/ruby_client/lib/swagger_client/models/cac_response_get.rb +0 -217
- data/emass_client/ruby_client/lib/swagger_client/models/cac_response_post.rb +0 -217
- data/emass_client/ruby_client/lib/swagger_client/models/cac_response_post_data.rb +0 -225
- data/emass_client/ruby_client/lib/swagger_client/models/cmmc_get.rb +0 -398
- data/emass_client/ruby_client/lib/swagger_client/models/cmmc_response_get.rb +0 -217
- data/emass_client/ruby_client/lib/swagger_client/models/connectivity_ccsd.rb +0 -217
- data/emass_client/ruby_client/lib/swagger_client/models/controls_get.rb +0 -663
- data/emass_client/ruby_client/lib/swagger_client/models/controls_put.rb +0 -227
- data/emass_client/ruby_client/lib/swagger_client/models/controls_request_put_body.rb +0 -606
- data/emass_client/ruby_client/lib/swagger_client/models/controls_response_get.rb +0 -217
- data/emass_client/ruby_client/lib/swagger_client/models/controls_response_put.rb +0 -217
- data/emass_client/ruby_client/lib/swagger_client/models/definition_transitions.rb +0 -274
- data/emass_client/ruby_client/lib/swagger_client/models/delete_milestone.rb +0 -212
- data/emass_client/ruby_client/lib/swagger_client/models/delete_poam.rb +0 -212
- data/emass_client/ruby_client/lib/swagger_client/models/empty200_response.rb +0 -197
- data/emass_client/ruby_client/lib/swagger_client/models/error.rb +0 -225
- data/emass_client/ruby_client/lib/swagger_client/models/instances_transitions.rb +0 -327
- data/emass_client/ruby_client/lib/swagger_client/models/milestone_response_get.rb +0 -217
- data/emass_client/ruby_client/lib/swagger_client/models/milestone_response_post.rb +0 -217
- data/emass_client/ruby_client/lib/swagger_client/models/milestone_response_put.rb +0 -217
- data/emass_client/ruby_client/lib/swagger_client/models/milestones_delete.rb +0 -197
- data/emass_client/ruby_client/lib/swagger_client/models/milestones_get.rb +0 -291
- data/emass_client/ruby_client/lib/swagger_client/models/milestones_post.rb +0 -197
- data/emass_client/ruby_client/lib/swagger_client/models/milestones_put.rb +0 -197
- data/emass_client/ruby_client/lib/swagger_client/models/milestones_put_post_delete.rb +0 -247
- data/emass_client/ruby_client/lib/swagger_client/models/milestones_request_post_body.rb +0 -242
- data/emass_client/ruby_client/lib/swagger_client/models/milestones_request_put_body.rb +0 -242
- data/emass_client/ruby_client/lib/swagger_client/models/milestones_required_post.rb +0 -227
- data/emass_client/ruby_client/lib/swagger_client/models/milestones_required_put.rb +0 -242
- data/emass_client/ruby_client/lib/swagger_client/models/model_200.rb +0 -208
- data/emass_client/ruby_client/lib/swagger_client/models/model_201.rb +0 -206
- data/emass_client/ruby_client/lib/swagger_client/models/model_201_meta.rb +0 -219
- data/emass_client/ruby_client/lib/swagger_client/models/model_400.rb +0 -206
- data/emass_client/ruby_client/lib/swagger_client/models/model_400_meta.rb +0 -219
- data/emass_client/ruby_client/lib/swagger_client/models/model_400_response.rb +0 -206
- data/emass_client/ruby_client/lib/swagger_client/models/model_401.rb +0 -206
- data/emass_client/ruby_client/lib/swagger_client/models/model_401_meta.rb +0 -219
- data/emass_client/ruby_client/lib/swagger_client/models/model_403.rb +0 -206
- data/emass_client/ruby_client/lib/swagger_client/models/model_403_meta.rb +0 -219
- data/emass_client/ruby_client/lib/swagger_client/models/model_404.rb +0 -219
- data/emass_client/ruby_client/lib/swagger_client/models/model_404_response.rb +0 -206
- data/emass_client/ruby_client/lib/swagger_client/models/model_405.rb +0 -206
- data/emass_client/ruby_client/lib/swagger_client/models/model_405_meta.rb +0 -219
- data/emass_client/ruby_client/lib/swagger_client/models/model_411.rb +0 -206
- data/emass_client/ruby_client/lib/swagger_client/models/model_411_meta.rb +0 -219
- data/emass_client/ruby_client/lib/swagger_client/models/model_490.rb +0 -206
- data/emass_client/ruby_client/lib/swagger_client/models/model_490_meta.rb +0 -219
- data/emass_client/ruby_client/lib/swagger_client/models/model_500.rb +0 -206
- data/emass_client/ruby_client/lib/swagger_client/models/model_500_meta.rb +0 -219
- data/emass_client/ruby_client/lib/swagger_client/models/pac_get.rb +0 -311
- data/emass_client/ruby_client/lib/swagger_client/models/pac_post.rb +0 -259
- data/emass_client/ruby_client/lib/swagger_client/models/pac_request_post_body.rb +0 -261
- data/emass_client/ruby_client/lib/swagger_client/models/pac_response_get.rb +0 -217
- data/emass_client/ruby_client/lib/swagger_client/models/pac_response_post.rb +0 -217
- data/emass_client/ruby_client/lib/swagger_client/models/poam_delete.rb +0 -197
- data/emass_client/ruby_client/lib/swagger_client/models/poam_get.rb +0 -646
- data/emass_client/ruby_client/lib/swagger_client/models/poam_post.rb +0 -197
- data/emass_client/ruby_client/lib/swagger_client/models/poam_post_put_del.rb +0 -237
- data/emass_client/ruby_client/lib/swagger_client/models/poam_put.rb +0 -197
- data/emass_client/ruby_client/lib/swagger_client/models/poam_request_post_body.rb +0 -197
- data/emass_client/ruby_client/lib/swagger_client/models/poam_request_put_body.rb +0 -197
- data/emass_client/ruby_client/lib/swagger_client/models/poam_required_post.rb +0 -564
- data/emass_client/ruby_client/lib/swagger_client/models/poam_required_put.rb +0 -594
- data/emass_client/ruby_client/lib/swagger_client/models/poam_response_delete.rb +0 -217
- data/emass_client/ruby_client/lib/swagger_client/models/poam_response_get.rb +0 -217
- data/emass_client/ruby_client/lib/swagger_client/models/poam_response_post.rb +0 -217
- data/emass_client/ruby_client/lib/swagger_client/models/poam_response_put.rb +0 -217
- data/emass_client/ruby_client/lib/swagger_client/models/register.rb +0 -215
- data/emass_client/ruby_client/lib/swagger_client/models/register_data.rb +0 -206
- data/emass_client/ruby_client/lib/swagger_client/models/register_user_request_post_body.rb +0 -211
- data/emass_client/ruby_client/lib/swagger_client/models/role_category.rb +0 -272
- data/emass_client/ruby_client/lib/swagger_client/models/roles.rb +0 -274
- data/emass_client/ruby_client/lib/swagger_client/models/ssps.rb +0 -227
- data/emass_client/ruby_client/lib/swagger_client/models/stage.rb +0 -252
- data/emass_client/ruby_client/lib/swagger_client/models/static_code_application.rb +0 -303
- data/emass_client/ruby_client/lib/swagger_client/models/static_code_request_post_body.rb +0 -197
- data/emass_client/ruby_client/lib/swagger_client/models/static_code_required_post.rb +0 -217
- data/emass_client/ruby_client/lib/swagger_client/models/static_code_required_post_application.rb +0 -217
- data/emass_client/ruby_client/lib/swagger_client/models/success200_response.rb +0 -217
- data/emass_client/ruby_client/lib/swagger_client/models/system_id_artifacts_body.rb +0 -284
- data/emass_client/ruby_client/lib/swagger_client/models/system_response.rb +0 -217
- data/emass_client/ruby_client/lib/swagger_client/models/system_roles_category_response.rb +0 -217
- data/emass_client/ruby_client/lib/swagger_client/models/system_roles_response.rb +0 -217
- data/emass_client/ruby_client/lib/swagger_client/models/system_roles_response_data.rb +0 -219
- data/emass_client/ruby_client/lib/swagger_client/models/systems.rb +0 -1137
- data/emass_client/ruby_client/lib/swagger_client/models/test.rb +0 -215
- data/emass_client/ruby_client/lib/swagger_client/models/test_data.rb +0 -206
- data/emass_client/ruby_client/lib/swagger_client/models/test_results_get.rb +0 -333
- data/emass_client/ruby_client/lib/swagger_client/models/test_results_post.rb +0 -227
- data/emass_client/ruby_client/lib/swagger_client/models/test_results_request_post_body.rb +0 -306
- data/emass_client/ruby_client/lib/swagger_client/models/test_results_response_get.rb +0 -217
- data/emass_client/ruby_client/lib/swagger_client/models/test_results_response_post.rb +0 -217
- data/emass_client/ruby_client/lib/swagger_client/models/users.rb +0 -224
- data/emass_client/ruby_client/lib/swagger_client/models/workflow_definition_get.rb +0 -282
- data/emass_client/ruby_client/lib/swagger_client/models/workflow_definition_response_get.rb +0 -217
- data/emass_client/ruby_client/lib/swagger_client/models/workflow_instances_get.rb +0 -368
- data/emass_client/ruby_client/lib/swagger_client/models/workflow_instances_response_get.rb +0 -217
- data/emass_client/ruby_client/lib/swagger_client/version.rb +0 -14
- data/emass_client/ruby_client/lib/swagger_client.rb +0 -161
- data/emass_client/ruby_client/spec/api/artifacts_api_spec.rb +0 -92
- data/emass_client/ruby_client/spec/api/artifacts_export_api_spec.rb +0 -48
- data/emass_client/ruby_client/spec/api/cac_api_spec.rb +0 -60
- data/emass_client/ruby_client/spec/api/cmmc_assessments_api_spec.rb +0 -46
- data/emass_client/ruby_client/spec/api/controls_api_spec.rb +0 -60
- data/emass_client/ruby_client/spec/api/milestones_api_spec.rb +0 -105
- data/emass_client/ruby_client/spec/api/pac_api_spec.rb +0 -59
- data/emass_client/ruby_client/spec/api/poam_api_spec.rb +0 -103
- data/emass_client/ruby_client/spec/api/registration_api_spec.rb +0 -46
- data/emass_client/ruby_client/spec/api/static_code_scans_api_spec.rb +0 -47
- data/emass_client/ruby_client/spec/api/system_roles_api_spec.rb +0 -60
- data/emass_client/ruby_client/spec/api/systems_api_spec.rb +0 -67
- data/emass_client/ruby_client/spec/api/test_api_spec.rb +0 -45
- data/emass_client/ruby_client/spec/api/test_results_api_spec.rb +0 -62
- data/emass_client/ruby_client/spec/api/workflow_definitions_api_spec.rb +0 -47
- data/emass_client/ruby_client/spec/api/workflow_instances_api_spec.rb +0 -63
- data/emass_client/ruby_client/spec/api_client_spec.rb +0 -225
- data/emass_client/ruby_client/spec/base_object_spec.rb +0 -109
- data/emass_client/ruby_client/spec/configuration_spec.rb +0 -41
- data/emass_client/ruby_client/spec/models/artifacts_delete_inner_spec.rb +0 -40
- data/emass_client/ruby_client/spec/models/artifacts_delete_spec.rb +0 -34
- data/emass_client/ruby_client/spec/models/artifacts_get_spec.rb +0 -126
- data/emass_client/ruby_client/spec/models/artifacts_request_put_body_spec.rb +0 -102
- data/emass_client/ruby_client/spec/models/artifacts_response_del_data_spec.rb +0 -52
- data/emass_client/ruby_client/spec/models/artifacts_response_del_spec.rb +0 -46
- data/emass_client/ruby_client/spec/models/artifacts_response_get_spec.rb +0 -46
- data/emass_client/ruby_client/spec/models/artifacts_response_put_post_spec.rb +0 -46
- data/emass_client/ruby_client/spec/models/cac_get_spec.rb +0 -80
- data/emass_client/ruby_client/spec/models/cac_request_post_body_spec.rb +0 -46
- data/emass_client/ruby_client/spec/models/cac_response_get_spec.rb +0 -46
- data/emass_client/ruby_client/spec/models/cac_response_post_data_spec.rb +0 -52
- data/emass_client/ruby_client/spec/models/cac_response_post_spec.rb +0 -46
- data/emass_client/ruby_client/spec/models/cmmc_get_spec.rb +0 -128
- data/emass_client/ruby_client/spec/models/cmmc_response_get_spec.rb +0 -46
- data/emass_client/ruby_client/spec/models/connectivity_ccsd_spec.rb +0 -46
- data/emass_client/ruby_client/spec/models/controls_get_spec.rb +0 -262
- data/emass_client/ruby_client/spec/models/controls_put_spec.rb +0 -52
- data/emass_client/ruby_client/spec/models/controls_request_put_body_spec.rb +0 -216
- data/emass_client/ruby_client/spec/models/controls_response_get_spec.rb +0 -46
- data/emass_client/ruby_client/spec/models/controls_response_put_spec.rb +0 -46
- data/emass_client/ruby_client/spec/models/definition_transitions_spec.rb +0 -64
- data/emass_client/ruby_client/spec/models/delete_milestone_spec.rb +0 -40
- data/emass_client/ruby_client/spec/models/delete_poam_spec.rb +0 -40
- data/emass_client/ruby_client/spec/models/empty200_response_spec.rb +0 -34
- data/emass_client/ruby_client/spec/models/error_spec.rb +0 -46
- data/emass_client/ruby_client/spec/models/instances_transitions_spec.rb +0 -86
- data/emass_client/ruby_client/spec/models/milestone_response_get_spec.rb +0 -46
- data/emass_client/ruby_client/spec/models/milestone_response_post_spec.rb +0 -46
- data/emass_client/ruby_client/spec/models/milestone_response_put_spec.rb +0 -46
- data/emass_client/ruby_client/spec/models/milestones_delete_spec.rb +0 -34
- data/emass_client/ruby_client/spec/models/milestones_get_spec.rb +0 -74
- data/emass_client/ruby_client/spec/models/milestones_post_spec.rb +0 -34
- data/emass_client/ruby_client/spec/models/milestones_put_post_delete_spec.rb +0 -64
- data/emass_client/ruby_client/spec/models/milestones_put_spec.rb +0 -34
- data/emass_client/ruby_client/spec/models/milestones_request_post_body_spec.rb +0 -52
- data/emass_client/ruby_client/spec/models/milestones_request_put_body_spec.rb +0 -52
- data/emass_client/ruby_client/spec/models/milestones_required_post_spec.rb +0 -46
- data/emass_client/ruby_client/spec/models/milestones_required_put_spec.rb +0 -52
- data/emass_client/ruby_client/spec/models/model_200_spec.rb +0 -40
- data/emass_client/ruby_client/spec/models/model_201_meta_spec.rb +0 -46
- data/emass_client/ruby_client/spec/models/model_201_spec.rb +0 -40
- data/emass_client/ruby_client/spec/models/model_400_meta_spec.rb +0 -46
- data/emass_client/ruby_client/spec/models/model_400_response_spec.rb +0 -40
- data/emass_client/ruby_client/spec/models/model_400_spec.rb +0 -40
- data/emass_client/ruby_client/spec/models/model_401_meta_spec.rb +0 -46
- data/emass_client/ruby_client/spec/models/model_401_spec.rb +0 -40
- data/emass_client/ruby_client/spec/models/model_403_meta_spec.rb +0 -46
- data/emass_client/ruby_client/spec/models/model_403_spec.rb +0 -40
- data/emass_client/ruby_client/spec/models/model_404_response_spec.rb +0 -40
- data/emass_client/ruby_client/spec/models/model_404_spec.rb +0 -46
- data/emass_client/ruby_client/spec/models/model_405_meta_spec.rb +0 -46
- data/emass_client/ruby_client/spec/models/model_405_spec.rb +0 -40
- data/emass_client/ruby_client/spec/models/model_411_meta_spec.rb +0 -46
- data/emass_client/ruby_client/spec/models/model_411_spec.rb +0 -40
- data/emass_client/ruby_client/spec/models/model_490_meta_spec.rb +0 -46
- data/emass_client/ruby_client/spec/models/model_490_spec.rb +0 -40
- data/emass_client/ruby_client/spec/models/model_500_meta_spec.rb +0 -46
- data/emass_client/ruby_client/spec/models/model_500_spec.rb +0 -40
- data/emass_client/ruby_client/spec/models/pac_get_spec.rb +0 -86
- data/emass_client/ruby_client/spec/models/pac_post_spec.rb +0 -56
- data/emass_client/ruby_client/spec/models/pac_request_post_body_spec.rb +0 -56
- data/emass_client/ruby_client/spec/models/pac_response_get_spec.rb +0 -46
- data/emass_client/ruby_client/spec/models/pac_response_post_spec.rb +0 -46
- data/emass_client/ruby_client/spec/models/poam_delete_spec.rb +0 -34
- data/emass_client/ruby_client/spec/models/poam_get_spec.rb +0 -264
- data/emass_client/ruby_client/spec/models/poam_post_put_del_spec.rb +0 -58
- data/emass_client/ruby_client/spec/models/poam_post_spec.rb +0 -34
- data/emass_client/ruby_client/spec/models/poam_put_spec.rb +0 -34
- data/emass_client/ruby_client/spec/models/poam_request_post_body_spec.rb +0 -34
- data/emass_client/ruby_client/spec/models/poam_request_put_body_spec.rb +0 -34
- data/emass_client/ruby_client/spec/models/poam_required_post_spec.rb +0 -218
- data/emass_client/ruby_client/spec/models/poam_required_put_spec.rb +0 -236
- data/emass_client/ruby_client/spec/models/poam_response_delete_spec.rb +0 -46
- data/emass_client/ruby_client/spec/models/poam_response_get_spec.rb +0 -46
- data/emass_client/ruby_client/spec/models/poam_response_post_spec.rb +0 -46
- data/emass_client/ruby_client/spec/models/poam_response_put_spec.rb +0 -46
- data/emass_client/ruby_client/spec/models/register_data_spec.rb +0 -40
- data/emass_client/ruby_client/spec/models/register_spec.rb +0 -46
- data/emass_client/ruby_client/spec/models/register_user_request_post_body_spec.rb +0 -40
- data/emass_client/ruby_client/spec/models/role_category_spec.rb +0 -62
- data/emass_client/ruby_client/spec/models/roles_spec.rb +0 -60
- data/emass_client/ruby_client/spec/models/ssps_spec.rb +0 -52
- data/emass_client/ruby_client/spec/models/stage_spec.rb +0 -50
- data/emass_client/ruby_client/spec/models/static_code_application_spec.rb +0 -78
- data/emass_client/ruby_client/spec/models/static_code_request_post_body_spec.rb +0 -34
- data/emass_client/ruby_client/spec/models/static_code_required_post_application_spec.rb +0 -46
- data/emass_client/ruby_client/spec/models/static_code_required_post_spec.rb +0 -46
- data/emass_client/ruby_client/spec/models/success200_response_spec.rb +0 -46
- data/emass_client/ruby_client/spec/models/system_id_artifacts_body_spec.rb +0 -66
- data/emass_client/ruby_client/spec/models/system_response_spec.rb +0 -46
- data/emass_client/ruby_client/spec/models/system_roles_category_response_spec.rb +0 -46
- data/emass_client/ruby_client/spec/models/system_roles_response_data_spec.rb +0 -46
- data/emass_client/ruby_client/spec/models/system_roles_response_spec.rb +0 -46
- data/emass_client/ruby_client/spec/models/systems_spec.rb +0 -510
- data/emass_client/ruby_client/spec/models/test_data_spec.rb +0 -40
- data/emass_client/ruby_client/spec/models/test_results_get_spec.rb +0 -96
- data/emass_client/ruby_client/spec/models/test_results_post_spec.rb +0 -52
- data/emass_client/ruby_client/spec/models/test_results_request_post_body_spec.rb +0 -68
- data/emass_client/ruby_client/spec/models/test_results_response_get_spec.rb +0 -46
- data/emass_client/ruby_client/spec/models/test_results_response_post_spec.rb +0 -46
- data/emass_client/ruby_client/spec/models/test_spec.rb +0 -46
- data/emass_client/ruby_client/spec/models/users_spec.rb +0 -52
- data/emass_client/ruby_client/spec/models/workflow_definition_get_spec.rb +0 -68
- data/emass_client/ruby_client/spec/models/workflow_definition_response_get_spec.rb +0 -46
- data/emass_client/ruby_client/spec/models/workflow_instances_get_spec.rb +0 -110
- data/emass_client/ruby_client/spec/models/workflow_instances_response_get_spec.rb +0 -46
- data/emass_client/ruby_client/spec/spec_helper.rb +0 -110
- data/emass_client/ruby_client/swagger_client.gemspec +0 -38
- data/emass_client/swagger-codegen/ruby_template/api_client.mustache +0 -384
- data/emass_client/swagger-codegen/ruby_template/api_info.mustache +0 -12
- data/emass_client/swagger-codegen/ruby_template/configuration.mustache +0 -234
- data/emass_client/swagger-codegen/ruby_template/gemspec.mustache +0 -37
@@ -1,110 +0,0 @@
|
|
1
|
-
=begin
|
2
|
-
#Enterprise Mission Assurance Support Service (eMASS)
|
3
|
-
|
4
|
-
#The Enterprise Mission Assurance Support Service (eMASS) Representational State Transfer (REST) Application Programming Interface (API) enables users to perform assessments and complete actions associated with system records. The `emasser` is a command-line interface (CLI) tool that implements all of the eMASS endpoints defined in the eMASS REST API v3.2, dated October 21, 2021.</br><br> <strong>Register CLI</strong></br> New users will need to register an API key with the eMASS development team prior to accessing the site for the first time. The eMASS REST API requires a client certificate (SSL/TLS, DoD PKI only) where {url}/api/register (POST) is used to register the client certificate.</br></br> Every call to the eMASS REST API will require the use of the agreed upon public key certificate and API key. The API key must be provided in the request header for all endpoint calls (api-key). If the service receives an untrusted certificate or API key, a 401 error response code will be returned along with an error message.</br></br> <strong>Available Request Headers:</strong></br> <table> <tr> <th align=left>key</th> <th align=left>Example Value</th> <th align=left>Description</th> </tr> <tr> <td>`api-key`</td> <td>api-key-provided-by-emass</td> <td>This API key must be provided in the request header for all endpoint calls</td> </tr> <tr> <td>`user-uid`</td> <td>USER.UID.KEY</td> <td>This User unique identifier key must be provided in the request header for all PUT, POST, and DELETE endpoint calls</td> </tr> <tr> <td></td><td></td> <td> Note: For DoD users this is the DoD ID Number (EIDIPI) on their DoD CAC </td> </tr> </table> </br><strong>Approve API Client for Actionable Requests</strong></br> Users are required to log-in to eMASS and grant permissions for a client to update data within eMASS on their behalf. This is only required for actionable requests (PUT, POST, DELETE). The Registration Endpoint and all GET requests can be accessed without completing this process with the correct permissions. Please note that leaving a field parameter blank (for PUT/POST requests) has the potential to clear information in the active eMASS records. To establish an account with eMASS and/or acquire an api-key/user-uid, contact one of the listed POC:
|
5
|
-
|
6
|
-
OpenAPI spec version: v3.2
|
7
|
-
Contact: disa.meade.id.mbx.emass-tier-iii-support@mail.mil
|
8
|
-
Generated by: https://github.com/swagger-api/swagger-codegen.git
|
9
|
-
Swagger Codegen version: 3.0.26
|
10
|
-
=end
|
11
|
-
|
12
|
-
# load the gem
|
13
|
-
require 'swagger_client'
|
14
|
-
|
15
|
-
# The following was generated by the `rspec --init` command. Conventionally, all
|
16
|
-
# specs live under a `spec` directory, which RSpec adds to the `$LOAD_PATH`.
|
17
|
-
# The generated `.rspec` file contains `--require spec_helper` which will cause
|
18
|
-
# this file to always be loaded, without a need to explicitly require it in any
|
19
|
-
# files.
|
20
|
-
#
|
21
|
-
# Given that it is always loaded, you are encouraged to keep this file as
|
22
|
-
# light-weight as possible. Requiring heavyweight dependencies from this file
|
23
|
-
# will add to the boot time of your test suite on EVERY test run, even for an
|
24
|
-
# individual file that may not need all of that loaded. Instead, consider making
|
25
|
-
# a separate helper file that requires the additional dependencies and performs
|
26
|
-
# the additional setup, and require it from the spec files that actually need
|
27
|
-
# it.
|
28
|
-
#
|
29
|
-
# The `.rspec` file also contains a few flags that are not defaults but that
|
30
|
-
# users commonly want.
|
31
|
-
#
|
32
|
-
# See http://rubydoc.info/gems/rspec-core/RSpec/Core/Configuration
|
33
|
-
RSpec.configure do |config|
|
34
|
-
# rspec-expectations config goes here. You can use an alternate
|
35
|
-
# assertion/expectation library such as wrong or the stdlib/minitest
|
36
|
-
# assertions if you prefer.
|
37
|
-
config.expect_with :rspec do |expectations|
|
38
|
-
# This option will default to `true` in RSpec 4. It makes the `description`
|
39
|
-
# and `failure_message` of custom matchers include text for helper methods
|
40
|
-
# defined using `chain`, e.g.:
|
41
|
-
# be_bigger_than(2).and_smaller_than(4).description
|
42
|
-
# # => "be bigger than 2 and smaller than 4"
|
43
|
-
# ...rather than:
|
44
|
-
# # => "be bigger than 2"
|
45
|
-
expectations.include_chain_clauses_in_custom_matcher_descriptions = true
|
46
|
-
end
|
47
|
-
|
48
|
-
# rspec-mocks config goes here. You can use an alternate test double
|
49
|
-
# library (such as bogus or mocha) by changing the `mock_with` option here.
|
50
|
-
config.mock_with :rspec do |mocks|
|
51
|
-
# Prevents you from mocking or stubbing a method that does not exist on
|
52
|
-
# a real object. This is generally recommended, and will default to
|
53
|
-
# `true` in RSpec 4.
|
54
|
-
mocks.verify_partial_doubles = true
|
55
|
-
end
|
56
|
-
|
57
|
-
# The settings below are suggested to provide a good initial experience
|
58
|
-
# with RSpec, but feel free to customize to your heart's content.
|
59
|
-
=begin
|
60
|
-
# These two settings work together to allow you to limit a spec run
|
61
|
-
# to individual examples or groups you care about by tagging them with
|
62
|
-
# `:focus` metadata. When nothing is tagged with `:focus`, all examples
|
63
|
-
# get run.
|
64
|
-
config.filter_run :focus
|
65
|
-
config.run_all_when_everything_filtered = true
|
66
|
-
|
67
|
-
# Allows RSpec to persist some state between runs in order to support
|
68
|
-
# the `--only-failures` and `--next-failure` CLI options. We recommend
|
69
|
-
# you configure your source control system to ignore this file.
|
70
|
-
config.example_status_persistence_file_path = "spec/examples.txt"
|
71
|
-
|
72
|
-
# Limits the available syntax to the non-monkey patched syntax that is
|
73
|
-
# recommended. For more details, see:
|
74
|
-
# - http://rspec.info/blog/2012/06/rspecs-new-expectation-syntax/
|
75
|
-
# - http://www.teaisaweso.me/blog/2013/05/27/rspecs-new-message-expectation-syntax/
|
76
|
-
# - http://rspec.info/blog/2014/05/notable-changes-in-rspec-3/#zero-monkey-patching-mode
|
77
|
-
config.disable_monkey_patching!
|
78
|
-
|
79
|
-
# This setting enables warnings. It's recommended, but in some cases may
|
80
|
-
# be too noisy due to issues in dependencies.
|
81
|
-
config.warnings = true
|
82
|
-
|
83
|
-
# Many RSpec users commonly either run the entire suite or an individual
|
84
|
-
# file, and it's useful to allow more verbose output when running an
|
85
|
-
# individual spec file.
|
86
|
-
if config.files_to_run.one?
|
87
|
-
# Use the documentation formatter for detailed output,
|
88
|
-
# unless a formatter has already been configured
|
89
|
-
# (e.g. via a command-line flag).
|
90
|
-
config.default_formatter = 'doc'
|
91
|
-
end
|
92
|
-
|
93
|
-
# Print the 10 slowest examples and example groups at the
|
94
|
-
# end of the spec run, to help surface which specs are running
|
95
|
-
# particularly slow.
|
96
|
-
config.profile_examples = 10
|
97
|
-
|
98
|
-
# Run specs in random order to surface order dependencies. If you find an
|
99
|
-
# order dependency and want to debug it, you can fix the order by providing
|
100
|
-
# the seed, which is printed after each run.
|
101
|
-
# --seed 1234
|
102
|
-
config.order = :random
|
103
|
-
|
104
|
-
# Seed global randomization in this process using the `--seed` CLI option.
|
105
|
-
# Setting this allows you to use `--seed` to deterministically reproduce
|
106
|
-
# test failures related to randomization by passing the same `--seed` value
|
107
|
-
# as the one that triggered the failure.
|
108
|
-
Kernel.srand config.seed
|
109
|
-
=end
|
110
|
-
end
|
@@ -1,38 +0,0 @@
|
|
1
|
-
# -*- encoding: utf-8 -*-
|
2
|
-
|
3
|
-
=begin
|
4
|
-
#Enterprise Mission Assurance Support Service (eMASS)
|
5
|
-
|
6
|
-
#The Enterprise Mission Assurance Support Service (eMASS) Representational State Transfer (REST) Application Programming Interface (API) enables users to perform assessments and complete actions associated with system records. The `emasser` is a command-line interface (CLI) tool that implements all of the eMASS endpoints defined in the eMASS REST API v3.2, dated October 21, 2021.</br><br> <strong>Register CLI</strong></br> New users will need to register an API key with the eMASS development team prior to accessing the site for the first time. The eMASS REST API requires a client certificate (SSL/TLS, DoD PKI only) where {url}/api/register (POST) is used to register the client certificate.</br></br> Every call to the eMASS REST API will require the use of the agreed upon public key certificate and API key. The API key must be provided in the request header for all endpoint calls (api-key). If the service receives an untrusted certificate or API key, a 401 error response code will be returned along with an error message.</br></br> <strong>Available Request Headers:</strong></br> <table> <tr> <th align=left>key</th> <th align=left>Example Value</th> <th align=left>Description</th> </tr> <tr> <td>`api-key`</td> <td>api-key-provided-by-emass</td> <td>This API key must be provided in the request header for all endpoint calls</td> </tr> <tr> <td>`user-uid`</td> <td>USER.UID.KEY</td> <td>This User unique identifier key must be provided in the request header for all PUT, POST, and DELETE endpoint calls</td> </tr> <tr> <td></td><td></td> <td> Note: For DoD users this is the DoD ID Number (EIDIPI) on their DoD CAC </td> </tr> </table> </br><strong>Approve API Client for Actionable Requests</strong></br> Users are required to log-in to eMASS and grant permissions for a client to update data within eMASS on their behalf. This is only required for actionable requests (PUT, POST, DELETE). The Registration Endpoint and all GET requests can be accessed without completing this process with the correct permissions. Please note that leaving a field parameter blank (for PUT/POST requests) has the potential to clear information in the active eMASS records. To establish an account with eMASS and/or acquire an api-key/user-uid, contact one of the listed POC:
|
7
|
-
|
8
|
-
OpenAPI spec version: v3.2
|
9
|
-
Contact: disa.meade.id.mbx.emass-tier-iii-support@mail.mil
|
10
|
-
Generated by: https://github.com/swagger-api/swagger-codegen.git
|
11
|
-
Swagger Codegen version: 3.0.26
|
12
|
-
=end
|
13
|
-
|
14
|
-
$:.push File.expand_path("../lib", __FILE__)
|
15
|
-
require "swagger_client/version"
|
16
|
-
|
17
|
-
Gem::Specification.new do |s|
|
18
|
-
s.name = "swagger_client"
|
19
|
-
s.version = SwaggerClient::VERSION
|
20
|
-
s.platform = Gem::Platform::RUBY
|
21
|
-
s.authors = ["Swagger-Codegen"]
|
22
|
-
s.email = ["disa.meade.id.mbx.emass-tier-iii-support@mail.mil"]
|
23
|
-
s.homepage = "https://github.com/swagger-api/swagger-codegen"
|
24
|
-
s.summary = "Enterprise Mission Assurance Support Service (eMASS) Ruby Gem"
|
25
|
-
s.description = "The Enterprise Mission Assurance Support Service (eMASS) Representational State Transfer (REST) Application Programming Interface (API) enables users to perform assessments and complete actions associated with system records. The `emasser` is a command-line interface (CLI) tool that implements all of the eMASS endpoints defined in the eMASS REST API v3.2, dated October 21, 2021.</br><br> <strong>Register CLI</strong></br> New users will need to register an API key with the eMASS development team prior to accessing the site for the first time. The eMASS REST API requires a client certificate (SSL/TLS, DoD PKI only) where {url}/api/register (POST) is used to register the client certificate.</br></br> Every call to the eMASS REST API will require the use of the agreed upon public key certificate and API key. The API key must be provided in the request header for all endpoint calls (api-key). If the service receives an untrusted certificate or API key, a 401 error response code will be returned along with an error message.</br></br> <strong>Available Request Headers:</strong></br> <table> <tr> <th align=left>key</th> <th align=left>Example Value</th> <th align=left>Description</th> </tr> <tr> <td>`api-key`</td> <td>api-key-provided-by-emass</td> <td>This API key must be provided in the request header for all endpoint calls</td> </tr> <tr> <td>`user-uid`</td> <td>USER.UID.KEY</td> <td>This User unique identifier key must be provided in the request header for all PUT, POST, and DELETE endpoint calls</td> </tr> <tr> <td></td><td></td> <td> Note: For DoD users this is the DoD ID Number (EIDIPI) on their DoD CAC </td> </tr> </table> </br><strong>Approve API Client for Actionable Requests</strong></br> Users are required to log-in to eMASS and grant permissions for a client to update data within eMASS on their behalf. This is only required for actionable requests (PUT, POST, DELETE). The Registration Endpoint and all GET requests can be accessed without completing this process with the correct permissions. Please note that leaving a field parameter blank (for PUT/POST requests) has the potential to clear information in the active eMASS records. To establish an account with eMASS and/or acquire an api-key/user-uid, contact one of the listed POC: "
|
26
|
-
s.license = "Unlicense"
|
27
|
-
s.required_ruby_version = ">= 1.9"
|
28
|
-
|
29
|
-
s.add_runtime_dependency 'typhoeus', '~> 1.0', '>= 1.0.1'
|
30
|
-
s.add_runtime_dependency 'json', '~> 2.1', '>= 2.1.0'
|
31
|
-
|
32
|
-
s.add_development_dependency 'rspec', '~> 3.6', '>= 3.6.0'
|
33
|
-
|
34
|
-
s.files = Dir.glob("**/*")
|
35
|
-
s.test_files = Dir.glob("spec/**/*")
|
36
|
-
s.executables = []
|
37
|
-
s.require_paths = ["lib"]
|
38
|
-
end
|
@@ -1,384 +0,0 @@
|
|
1
|
-
=begin
|
2
|
-
{{> api_info}}
|
3
|
-
=end
|
4
|
-
|
5
|
-
require 'date'
|
6
|
-
require 'json'
|
7
|
-
require 'logger'
|
8
|
-
require 'tempfile'
|
9
|
-
require 'typhoeus'
|
10
|
-
require 'uri'
|
11
|
-
|
12
|
-
module {{moduleName}}
|
13
|
-
class ApiClient
|
14
|
-
# The Configuration object holding settings to be used in the API client.
|
15
|
-
attr_accessor :config
|
16
|
-
|
17
|
-
# Defines the headers to be used in HTTP requests of all API calls by default.
|
18
|
-
#
|
19
|
-
# @return [Hash]
|
20
|
-
attr_accessor :default_headers
|
21
|
-
|
22
|
-
# Initializes the ApiClient
|
23
|
-
# @option config [Configuration] Configuration for initializing the object, default to Configuration.default
|
24
|
-
def initialize(config = Configuration.default)
|
25
|
-
@config = config
|
26
|
-
@user_agent = "{{#httpUserAgent}}{{{.}}}{{/httpUserAgent}}{{^httpUserAgent}}Swagger-Codegen/#{VERSION}/ruby{{/httpUserAgent}}"
|
27
|
-
@default_headers = {
|
28
|
-
'Content-Type' => 'application/json',
|
29
|
-
'User-Agent' => @user_agent
|
30
|
-
}
|
31
|
-
end
|
32
|
-
|
33
|
-
def self.default
|
34
|
-
@@default ||= ApiClient.new
|
35
|
-
end
|
36
|
-
|
37
|
-
# Call an API with given options.
|
38
|
-
#
|
39
|
-
# @return [Array<(Object, Integer, Hash)>] an array of 3 elements:
|
40
|
-
# the data deserialized from response body (could be nil), response status code and response headers.
|
41
|
-
def call_api(http_method, path, opts = {})
|
42
|
-
request = build_request(http_method, path, opts)
|
43
|
-
response = request.run
|
44
|
-
|
45
|
-
if @config.debugging
|
46
|
-
@config.logger.debug "HTTP response body ~BEGIN~\n#{response.body}\n~END~\n"
|
47
|
-
end
|
48
|
-
|
49
|
-
unless response.success?
|
50
|
-
if response.timed_out?
|
51
|
-
fail ApiError.new('Connection timed out')
|
52
|
-
elsif response.code == 0
|
53
|
-
# Errors from libcurl will be made visible here
|
54
|
-
fail ApiError.new(:code => 0,
|
55
|
-
:message => response.return_message)
|
56
|
-
else
|
57
|
-
fail ApiError.new(:code => response.code,
|
58
|
-
:response_headers => response.headers,
|
59
|
-
:response_body => response.body),
|
60
|
-
response.status_message
|
61
|
-
end
|
62
|
-
end
|
63
|
-
|
64
|
-
if opts[:return_type]
|
65
|
-
data = deserialize(response, opts[:return_type])
|
66
|
-
else
|
67
|
-
data = nil
|
68
|
-
end
|
69
|
-
return data, response.code, response.headers
|
70
|
-
end
|
71
|
-
|
72
|
-
# Builds the HTTP request
|
73
|
-
#
|
74
|
-
# @param [String] http_method HTTP method/verb (e.g. POST)
|
75
|
-
# @param [String] path URL path (e.g. /account/new)
|
76
|
-
# @option opts [Hash] :header_params Header parameters
|
77
|
-
# @option opts [Hash] :query_params Query parameters
|
78
|
-
# @option opts [Hash] :form_params Query parameters
|
79
|
-
# @option opts [Object] :body HTTP body (JSON/XML)
|
80
|
-
# @return [Typhoeus::Request] A Typhoeus Request
|
81
|
-
def build_request(http_method, path, opts = {})
|
82
|
-
url = build_request_url(path)
|
83
|
-
http_method = http_method.to_sym.downcase
|
84
|
-
|
85
|
-
header_params = @default_headers.merge(opts[:header_params] || {})
|
86
|
-
query_params = opts[:query_params] || {}
|
87
|
-
form_params = opts[:form_params] || {}
|
88
|
-
|
89
|
-
{{#hasAuthMethods}}
|
90
|
-
update_params_for_auth! header_params, query_params, opts[:auth_names]
|
91
|
-
{{/hasAuthMethods}}
|
92
|
-
|
93
|
-
# set ssl_verifyhosts option based on @config.verify_ssl_host (true/false)
|
94
|
-
_verify_ssl_host = @config.verify_ssl_host ? 2 : 0
|
95
|
-
|
96
|
-
req_opts = {
|
97
|
-
:method => http_method,
|
98
|
-
:headers => header_params,
|
99
|
-
:params => query_params,
|
100
|
-
:params_encoding => @config.params_encoding,
|
101
|
-
:timeout => @config.timeout,
|
102
|
-
:ssl_verifypeer => @config.verify_ssl,
|
103
|
-
:ssl_verifyhost => _verify_ssl_host,
|
104
|
-
:sslcert => @config.cert_file,
|
105
|
-
:sslkey => @config.key_file,
|
106
|
-
:verbose => @config.debugging,
|
107
|
-
:keypasswd => @config.key_password
|
108
|
-
}
|
109
|
-
|
110
|
-
# set custom cert, if provided
|
111
|
-
req_opts[:cainfo] = @config.ssl_ca_cert if @config.ssl_ca_cert
|
112
|
-
|
113
|
-
if [:post, :patch, :put, :delete].include?(http_method)
|
114
|
-
req_body = build_request_body(header_params, form_params, opts[:body])
|
115
|
-
req_opts.update :body => req_body
|
116
|
-
if @config.debugging
|
117
|
-
@config.logger.debug "HTTP request body param ~BEGIN~\n#{req_body}\n~END~\n"
|
118
|
-
end
|
119
|
-
end
|
120
|
-
|
121
|
-
request = Typhoeus::Request.new(url, req_opts)
|
122
|
-
download_file(request) if opts[:return_type] == 'File'
|
123
|
-
request
|
124
|
-
end
|
125
|
-
|
126
|
-
# Builds the HTTP request body
|
127
|
-
#
|
128
|
-
# @param [Hash] header_params Header parameters
|
129
|
-
# @param [Hash] form_params Query parameters
|
130
|
-
# @param [Object] body HTTP body (JSON/XML)
|
131
|
-
# @return [String] HTTP body data in the form of string
|
132
|
-
def build_request_body(header_params, form_params, body)
|
133
|
-
# http form
|
134
|
-
if header_params['Content-Type'] == 'application/x-www-form-urlencoded' ||
|
135
|
-
header_params['Content-Type'] == 'multipart/form-data'
|
136
|
-
data = {}
|
137
|
-
form_params.each do |key, value|
|
138
|
-
case value
|
139
|
-
when ::File, ::Array, nil
|
140
|
-
# let typhoeus handle File, Array and nil parameters
|
141
|
-
data[key] = value
|
142
|
-
else
|
143
|
-
data[key] = value.to_s
|
144
|
-
end
|
145
|
-
end
|
146
|
-
elsif body
|
147
|
-
data = body.is_a?(String) ? body : body.to_json
|
148
|
-
else
|
149
|
-
data = nil
|
150
|
-
end
|
151
|
-
data
|
152
|
-
end
|
153
|
-
|
154
|
-
# Check if the given MIME is a JSON MIME.
|
155
|
-
# JSON MIME examples:
|
156
|
-
# application/json
|
157
|
-
# application/json; charset=UTF8
|
158
|
-
# APPLICATION/JSON
|
159
|
-
# */*
|
160
|
-
# @param [String] mime MIME
|
161
|
-
# @return [Boolean] True if the MIME is application/json
|
162
|
-
def json_mime?(mime)
|
163
|
-
(mime == '*/*') || !(mime =~ /Application\/.*json(?!p)(;.*)?/i).nil?
|
164
|
-
end
|
165
|
-
|
166
|
-
# Deserialize the response to the given return type.
|
167
|
-
#
|
168
|
-
# @param [Response] response HTTP response
|
169
|
-
# @param [String] return_type some examples: "User", "Array<User>", "Hash<String, Integer>"
|
170
|
-
def deserialize(response, return_type)
|
171
|
-
body = response.body
|
172
|
-
|
173
|
-
# handle file downloading - return the File instance processed in request callbacks
|
174
|
-
# note that response body is empty when the file is written in chunks in request on_body callback
|
175
|
-
return @tempfile if return_type == 'File'
|
176
|
-
|
177
|
-
return nil if body.nil? || body.empty?
|
178
|
-
|
179
|
-
# return response body directly for String return type
|
180
|
-
return body if return_type == 'String'
|
181
|
-
|
182
|
-
# ensuring a default content type
|
183
|
-
content_type = response.headers['Content-Type'] || 'application/json'
|
184
|
-
|
185
|
-
fail "Content-Type is not supported: #{content_type}" unless json_mime?(content_type)
|
186
|
-
|
187
|
-
begin
|
188
|
-
data = JSON.parse("[#{body}]", :symbolize_names => true)[0]
|
189
|
-
rescue JSON::ParserError => e
|
190
|
-
if %w(String Date DateTime).include?(return_type)
|
191
|
-
data = body
|
192
|
-
else
|
193
|
-
raise e
|
194
|
-
end
|
195
|
-
end
|
196
|
-
|
197
|
-
convert_to_type data, return_type
|
198
|
-
end
|
199
|
-
|
200
|
-
# Convert data to the given return type.
|
201
|
-
# @param [Object] data Data to be converted
|
202
|
-
# @param [String] return_type Return type
|
203
|
-
# @return [Mixed] Data in a particular type
|
204
|
-
def convert_to_type(data, return_type)
|
205
|
-
return nil if data.nil?
|
206
|
-
case return_type
|
207
|
-
when 'String'
|
208
|
-
data.to_s
|
209
|
-
when 'Integer'
|
210
|
-
data.to_i
|
211
|
-
when 'Float'
|
212
|
-
data.to_f
|
213
|
-
when 'Boolean'
|
214
|
-
data == true
|
215
|
-
when 'DateTime'
|
216
|
-
# parse date time (expecting ISO 8601 format)
|
217
|
-
DateTime.parse data
|
218
|
-
when 'Date'
|
219
|
-
# parse date time (expecting ISO 8601 format)
|
220
|
-
Date.parse data
|
221
|
-
when 'Object'
|
222
|
-
# generic object (usually a Hash), return directly
|
223
|
-
data
|
224
|
-
when /\AArray<(.+)>\z/
|
225
|
-
# e.g. Array<Pet>
|
226
|
-
sub_type = $1
|
227
|
-
data.map { |item| convert_to_type(item, sub_type) }
|
228
|
-
when /\AHash\<String, (.+)\>\z/
|
229
|
-
# e.g. Hash<String, Integer>
|
230
|
-
sub_type = $1
|
231
|
-
{}.tap do |hash|
|
232
|
-
data.each { |k, v| hash[k] = convert_to_type(v, sub_type) }
|
233
|
-
end
|
234
|
-
else
|
235
|
-
# models, e.g. Pet
|
236
|
-
{{moduleName}}.const_get(return_type).build_from_hash(data)
|
237
|
-
end
|
238
|
-
end
|
239
|
-
|
240
|
-
# Save response body into a file in (the defined) temporary folder, using the filename
|
241
|
-
# from the "Content-Disposition" header if provided, otherwise a random filename.
|
242
|
-
# The response body is written to the file in chunks in order to handle files which
|
243
|
-
# size is larger than maximum Ruby String or even larger than the maximum memory a Ruby
|
244
|
-
# process can use.
|
245
|
-
#
|
246
|
-
# @see Configuration#temp_folder_path
|
247
|
-
def download_file(request)
|
248
|
-
tempfile = nil
|
249
|
-
encoding = nil
|
250
|
-
request.on_headers do |response|
|
251
|
-
content_disposition = response.headers['Content-Disposition']
|
252
|
-
if content_disposition && content_disposition =~ /filename=/i
|
253
|
-
filename = content_disposition[/filename=['"]?([^'"\s]+)['"]?/, 1]
|
254
|
-
prefix = sanitize_filename(filename)
|
255
|
-
else
|
256
|
-
prefix = 'download-'
|
257
|
-
end
|
258
|
-
prefix = prefix + '-' unless prefix.end_with?('-')
|
259
|
-
encoding = response.body.encoding
|
260
|
-
tempfile = Tempfile.open(prefix, @config.temp_folder_path, encoding: encoding)
|
261
|
-
@tempfile = tempfile
|
262
|
-
end
|
263
|
-
request.on_body do |chunk|
|
264
|
-
chunk.force_encoding(encoding)
|
265
|
-
tempfile.write(chunk)
|
266
|
-
end
|
267
|
-
request.on_complete do |response|
|
268
|
-
if tempfile
|
269
|
-
tempfile.close
|
270
|
-
@config.logger.info "Temp file written to #{tempfile.path}, please copy the file to a proper folder "\
|
271
|
-
"with e.g. `FileUtils.cp(tempfile.path, '/new/file/path')` otherwise the temp file "\
|
272
|
-
"will be deleted automatically with GC. It's also recommended to delete the temp file "\
|
273
|
-
"explicitly with `tempfile.delete`"
|
274
|
-
end
|
275
|
-
end
|
276
|
-
end
|
277
|
-
|
278
|
-
# Sanitize filename by removing path.
|
279
|
-
# e.g. ../../sun.gif becomes sun.gif
|
280
|
-
#
|
281
|
-
# @param [String] filename the filename to be sanitized
|
282
|
-
# @return [String] the sanitized filename
|
283
|
-
def sanitize_filename(filename)
|
284
|
-
filename.gsub(/.*[\/\\]/, '')
|
285
|
-
end
|
286
|
-
|
287
|
-
def build_request_url(path)
|
288
|
-
# Add leading and trailing slashes to path
|
289
|
-
path = "/#{path}".gsub(/\/+/, '/')
|
290
|
-
@config.base_url + path
|
291
|
-
end
|
292
|
-
|
293
|
-
# Update hearder and query params based on authentication settings.
|
294
|
-
#
|
295
|
-
# @param [Hash] header_params Header parameters
|
296
|
-
# @param [Hash] query_params Query parameters
|
297
|
-
# @param [String] auth_names Authentication scheme name
|
298
|
-
def update_params_for_auth!(header_params, query_params, auth_names)
|
299
|
-
Array(auth_names).each do |auth_name|
|
300
|
-
auth_setting = @config.auth_settings[auth_name]
|
301
|
-
next unless auth_setting
|
302
|
-
case auth_setting[:in]
|
303
|
-
when 'header' then header_params[auth_setting[:key]] = auth_setting[:value]
|
304
|
-
when 'query' then query_params[auth_setting[:key]] = auth_setting[:value]
|
305
|
-
else fail ArgumentError, 'Authentication token must be in `query` of `header`'
|
306
|
-
end
|
307
|
-
end
|
308
|
-
end
|
309
|
-
|
310
|
-
# Sets user agent in HTTP header
|
311
|
-
#
|
312
|
-
# @param [String] user_agent User agent (e.g. swagger-codegen/ruby/1.0.0)
|
313
|
-
def user_agent=(user_agent)
|
314
|
-
@user_agent = user_agent
|
315
|
-
@default_headers['User-Agent'] = @user_agent
|
316
|
-
end
|
317
|
-
|
318
|
-
# Return Accept header based on an array of accepts provided.
|
319
|
-
# @param [Array] accepts array for Accept
|
320
|
-
# @return [String] the Accept header (e.g. application/json)
|
321
|
-
def select_header_accept(accepts)
|
322
|
-
return nil if accepts.nil? || accepts.empty?
|
323
|
-
# use JSON when present, otherwise use all of the provided
|
324
|
-
json_accept = accepts.find { |s| json_mime?(s) }
|
325
|
-
json_accept || accepts.join(',')
|
326
|
-
end
|
327
|
-
|
328
|
-
# Return Content-Type header based on an array of content types provided.
|
329
|
-
# @param [Array] content_types array for Content-Type
|
330
|
-
# @return [String] the Content-Type header (e.g. application/json)
|
331
|
-
def select_header_content_type(content_types)
|
332
|
-
# use application/json by default
|
333
|
-
return 'application/json' if content_types.nil? || content_types.empty?
|
334
|
-
# use JSON when present, otherwise use the first one
|
335
|
-
json_content_type = content_types.find { |s| json_mime?(s) }
|
336
|
-
json_content_type || content_types.first
|
337
|
-
end
|
338
|
-
|
339
|
-
# Convert object (array, hash, object, etc) to JSON string.
|
340
|
-
# @param [Object] model object to be converted into JSON string
|
341
|
-
# @return [String] JSON string representation of the object
|
342
|
-
def object_to_http_body(model)
|
343
|
-
return model if model.nil? || model.is_a?(String)
|
344
|
-
local_body = nil
|
345
|
-
if model.is_a?(Array)
|
346
|
-
local_body = model.map { |m| object_to_hash(m) }
|
347
|
-
else
|
348
|
-
local_body = object_to_hash(model)
|
349
|
-
end
|
350
|
-
local_body.to_json
|
351
|
-
end
|
352
|
-
|
353
|
-
# Convert object(non-array) to hash.
|
354
|
-
# @param [Object] obj object to be converted into JSON string
|
355
|
-
# @return [String] JSON string representation of the object
|
356
|
-
def object_to_hash(obj)
|
357
|
-
if obj.respond_to?(:to_hash)
|
358
|
-
obj.to_hash
|
359
|
-
else
|
360
|
-
obj
|
361
|
-
end
|
362
|
-
end
|
363
|
-
|
364
|
-
# Build parameter value according to the given collection format.
|
365
|
-
# @param [String] collection_format one of :csv, :ssv, :tsv, :pipes and :multi
|
366
|
-
def build_collection_param(param, collection_format)
|
367
|
-
case collection_format
|
368
|
-
when :csv
|
369
|
-
param.join(',')
|
370
|
-
when :ssv
|
371
|
-
param.join(' ')
|
372
|
-
when :tsv
|
373
|
-
param.join("\t")
|
374
|
-
when :pipes
|
375
|
-
param.join('|')
|
376
|
-
when :multi
|
377
|
-
# return the array directly as typhoeus will handle it as expected
|
378
|
-
param
|
379
|
-
else
|
380
|
-
fail "unknown collection format: #{collection_format.inspect}"
|
381
|
-
end
|
382
|
-
end
|
383
|
-
end
|
384
|
-
end
|
@@ -1,12 +0,0 @@
|
|
1
|
-
{{#appName}}
|
2
|
-
#{{{appName}}}
|
3
|
-
|
4
|
-
{{/appName}}
|
5
|
-
{{#appDescription}}
|
6
|
-
#{{{appDescription}}}
|
7
|
-
|
8
|
-
{{/appDescription}}
|
9
|
-
{{#version}}OpenAPI spec version: {{version}}{{/version}}
|
10
|
-
{{#infoEmail}}Contact: {{{infoEmail}}}{{/infoEmail}}
|
11
|
-
Generated by: https://github.com/swagger-api/swagger-codegen.git
|
12
|
-
Swagger Codegen version: {{{generatorVersion}}}
|