Closed austinvalle closed 1 year ago
We'll need to share the TF_DEVEX_COMMIT_GITHUB_TOKEN
to this repository so the CI can be updated to access the private repo terraform-plugin-codegen-spec
@bflad Ready for review 👍🏻
Went through and decided to just leave the helper conversion functions for now. Alternatives are just duplicating all the element type logic for object attribute types, which I'll punt for now 😆
I added the GHA logic for GOPRIVATE
but the CI will be broken until those secrets are added 🤷🏻
Looks good to me 🚀
I'm not sure if this is helpful to say out loud, but one way to potentially think about element types and object attribute types is that they are both "type definitions" in the literal sense (what is the classification this value?) without additional metadata/behaviors that something like an "attribute definition" introduces. The element vs (unfortunately overloaded use of "attribute") attribute type terminology just happens to relate the context the type definition is living in. The specification necessarily leans towards the explicitness of Terraform's type system domain/terminology since that's the target of our interface, but if there are better namings/mappings as part of interfacing with other type systems like JSON Schema/OAS then by all means use what makes sense naming-wise for the code here. 👍
That is a helpful distinction, thank you!
For the CI, since we're still waiting on the helpdesk, I just created a repo secret and will come back and remove it once the org secret is available. CI looks good: https://github.com/hashicorp/terraform-plugin-codegen-openapi/actions/runs/5137092537/jobs/9272675494?pr=4
I'm going to lock this pull request because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active contributions. If you have found a problem that seems related to this change, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.
schema
->oas
mapper/datasource
->mapper
mapper/resource
->mapper
Only open item on this PR is the code related to ElementTypes, which for objects is an AttributeType. I opened https://github.com/hashicorp/terraform-plugin-codegen-spec/pull/8 that embeds said types, however the naming/structure introduces confusion to their intended meaning. Will revisit when I come back from vacation.This PR currently uses the spec as it's represented in the main branch of
terraform-plugin-codegen-spec
and all the tests look good 🥳### Local test run (since CI is broken without the PAT)
```bash $ git rev-parse HEAD 736809ee9760c11ea465238221b833bb445cfb31 $ go test ./... -v ? github.com/hashicorp/terraform-plugin-codegen-openapi/cmd/terraform-plugin-codegen-openapi [no test files] ? github.com/hashicorp/terraform-plugin-codegen-openapi/internal/mapper/util [no test files] === RUN TestGenerate_WithConfig === PAUSE TestGenerate_WithConfig === CONT TestGenerate_WithConfig === RUN TestGenerate_WithConfig/GitHub_v3_REST_API === PAUSE TestGenerate_WithConfig/GitHub_v3_REST_API === RUN TestGenerate_WithConfig/Swagger_Petstore_-_OpenAPI_3.0 === PAUSE TestGenerate_WithConfig/Swagger_Petstore_-_OpenAPI_3.0 === RUN TestGenerate_WithConfig/Scaleway_-_Instance_API === PAUSE TestGenerate_WithConfig/Scaleway_-_Instance_API === CONT TestGenerate_WithConfig/GitHub_v3_REST_API === CONT TestGenerate_WithConfig/Scaleway_-_Instance_API === CONT TestGenerate_WithConfig/Swagger_Petstore_-_OpenAPI_3.0 --- PASS: TestGenerate_WithConfig (0.00s) --- PASS: TestGenerate_WithConfig/Swagger_Petstore_-_OpenAPI_3.0 (0.01s) --- PASS: TestGenerate_WithConfig/Scaleway_-_Instance_API (0.12s) --- PASS: TestGenerate_WithConfig/GitHub_v3_REST_API (0.74s) PASS ok github.com/hashicorp/terraform-plugin-codegen-openapi/internal/cmd 1.193s === RUN TestParseConfig_Valid === PAUSE TestParseConfig_Valid === RUN TestParseConfig_Invalid === PAUSE TestParseConfig_Invalid === CONT TestParseConfig_Valid === RUN TestParseConfig_Valid/valid_single_resource === PAUSE TestParseConfig_Valid/valid_single_resource === RUN TestParseConfig_Valid/valid_single_data_source === PAUSE TestParseConfig_Valid/valid_single_data_source === RUN TestParseConfig_Valid/valid_combo_of_resources_and_data_sources === PAUSE TestParseConfig_Valid/valid_combo_of_resources_and_data_sources === CONT TestParseConfig_Valid/valid_single_resource === CONT TestParseConfig_Invalid === RUN TestParseConfig_Invalid/at_least_one_resource_or_data_source_required === PAUSE TestParseConfig_Invalid/at_least_one_resource_or_data_source_required === RUN TestParseConfig_Invalid/resource_-_invalid_update_-_method_required === PAUSE TestParseConfig_Invalid/resource_-_invalid_update_-_method_required === RUN TestParseConfig_Invalid/resource_-_invalid_delete_-_method_required === PAUSE TestParseConfig_Invalid/resource_-_invalid_delete_-_method_required === RUN TestParseConfig_Invalid/data_source_-_read_required === PAUSE TestParseConfig_Invalid/data_source_-_read_required === RUN TestParseConfig_Invalid/data_source_-_invalid_read_-_method_required === PAUSE TestParseConfig_Invalid/data_source_-_invalid_read_-_method_required === RUN TestParseConfig_Invalid/resource_-_invalid_create_-_path_required === PAUSE TestParseConfig_Invalid/resource_-_invalid_create_-_path_required === RUN TestParseConfig_Invalid/resource_-_invalid_create_-_method_required === PAUSE TestParseConfig_Invalid/resource_-_invalid_create_-_method_required === RUN TestParseConfig_Invalid/resource_-_invalid_read_-_method_required === PAUSE TestParseConfig_Invalid/resource_-_invalid_read_-_method_required === RUN TestParseConfig_Invalid/resource_-_invalid_delete_-_path_required === PAUSE TestParseConfig_Invalid/resource_-_invalid_delete_-_path_required === RUN TestParseConfig_Invalid/data_source_-_invalid_read_-_path_required === PAUSE TestParseConfig_Invalid/data_source_-_invalid_read_-_path_required === RUN TestParseConfig_Invalid/resource_-_create_required === PAUSE TestParseConfig_Invalid/resource_-_create_required === RUN TestParseConfig_Invalid/invalid_YAML === PAUSE TestParseConfig_Invalid/invalid_YAML === RUN TestParseConfig_Invalid/provider_-_name_required === PAUSE TestParseConfig_Invalid/provider_-_name_required === RUN TestParseConfig_Invalid/resource_-_read_required === PAUSE TestParseConfig_Invalid/resource_-_read_required === CONT TestParseConfig_Valid/valid_combo_of_resources_and_data_sources === RUN TestParseConfig_Invalid/resource_-_invalid_read_-_path_required === PAUSE TestParseConfig_Invalid/resource_-_invalid_read_-_path_required === CONT TestParseConfig_Valid/valid_single_data_source --- PASS: TestParseConfig_Valid (0.00s) --- PASS: TestParseConfig_Valid/valid_single_resource (0.00s) --- PASS: TestParseConfig_Valid/valid_combo_of_resources_and_data_sources (0.00s) --- PASS: TestParseConfig_Valid/valid_single_data_source (0.00s) === RUN TestParseConfig_Invalid/resource_-_invalid_update_-_path_required === PAUSE TestParseConfig_Invalid/resource_-_invalid_update_-_path_required === CONT TestParseConfig_Invalid/at_least_one_resource_or_data_source_required === CONT TestParseConfig_Invalid/resource_-_invalid_update_-_path_required === CONT TestParseConfig_Invalid/resource_-_invalid_read_-_path_required === CONT TestParseConfig_Invalid/resource_-_read_required === CONT TestParseConfig_Invalid/provider_-_name_required === CONT TestParseConfig_Invalid/resource_-_invalid_create_-_method_required === CONT TestParseConfig_Invalid/resource_-_invalid_read_-_method_required === CONT TestParseConfig_Invalid/resource_-_invalid_create_-_path_required === CONT TestParseConfig_Invalid/data_source_-_invalid_read_-_method_required === CONT TestParseConfig_Invalid/data_source_-_read_required === CONT TestParseConfig_Invalid/resource_-_invalid_delete_-_method_required === CONT TestParseConfig_Invalid/resource_-_invalid_update_-_method_required === CONT TestParseConfig_Invalid/data_source_-_invalid_read_-_path_required === CONT TestParseConfig_Invalid/invalid_YAML === CONT TestParseConfig_Invalid/resource_-_create_required === CONT TestParseConfig_Invalid/resource_-_invalid_delete_-_path_required --- PASS: TestParseConfig_Invalid (0.00s) --- PASS: TestParseConfig_Invalid/at_least_one_resource_or_data_source_required (0.00s) --- PASS: TestParseConfig_Invalid/resource_-_invalid_update_-_path_required (0.00s) --- PASS: TestParseConfig_Invalid/resource_-_invalid_read_-_path_required (0.00s) --- PASS: TestParseConfig_Invalid/resource_-_read_required (0.00s) --- PASS: TestParseConfig_Invalid/provider_-_name_required (0.00s) --- PASS: TestParseConfig_Invalid/resource_-_invalid_create_-_method_required (0.00s) --- PASS: TestParseConfig_Invalid/resource_-_invalid_read_-_method_required (0.00s) --- PASS: TestParseConfig_Invalid/resource_-_invalid_create_-_path_required (0.00s) --- PASS: TestParseConfig_Invalid/data_source_-_invalid_read_-_method_required (0.00s) --- PASS: TestParseConfig_Invalid/data_source_-_read_required (0.00s) --- PASS: TestParseConfig_Invalid/resource_-_invalid_delete_-_method_required (0.00s) --- PASS: TestParseConfig_Invalid/resource_-_invalid_update_-_method_required (0.00s) --- PASS: TestParseConfig_Invalid/data_source_-_invalid_read_-_path_required (0.00s) --- PASS: TestParseConfig_Invalid/invalid_YAML (0.00s) --- PASS: TestParseConfig_Invalid/resource_-_create_required (0.00s) --- PASS: TestParseConfig_Invalid/resource_-_invalid_delete_-_path_required (0.00s) PASS ok github.com/hashicorp/terraform-plugin-codegen-openapi/internal/config 1.201s === RUN Test_ConfigExplorer_FindResources === PAUSE Test_ConfigExplorer_FindResources === RUN Test_ConfigExplorer_FindDataSources === PAUSE Test_ConfigExplorer_FindDataSources === RUN Test_ConfigExplorer_FindProvider === PAUSE Test_ConfigExplorer_FindProvider === RUN Test_GuesstimatorExplorer_FindResources === PAUSE Test_GuesstimatorExplorer_FindResources === RUN Test_GuesstimatorExplorer_FindDataSources === PAUSE Test_GuesstimatorExplorer_FindDataSources === CONT Test_ConfigExplorer_FindResources === RUN Test_ConfigExplorer_FindResources/valid_CRUD_ops === PAUSE Test_ConfigExplorer_FindResources/valid_CRUD_ops === CONT Test_GuesstimatorExplorer_FindResources === CONT Test_ConfigExplorer_FindDataSources === RUN Test_ConfigExplorer_FindDataSources/valid_read_op_-_alternative_methods === PAUSE Test_ConfigExplorer_FindDataSources/valid_read_op_-_alternative_methods === CONT Test_GuesstimatorExplorer_FindDataSources === RUN Test_ConfigExplorer_FindResources/valid_alternative_CRUD_ops_-_options,_head,_patch,_trace === PAUSE Test_ConfigExplorer_FindResources/valid_alternative_CRUD_ops_-_options,_head,_patch,_trace === RUN Test_ConfigExplorer_FindResources/non-existent_paths_and_methods_are_ignored_ === CONT Test_ConfigExplorer_FindProvider === PAUSE Test_ConfigExplorer_FindResources/non-existent_paths_and_methods_are_ignored_ === CONT Test_ConfigExplorer_FindResources/valid_CRUD_ops === CONT Test_ConfigExplorer_FindResources/non-existent_paths_and_methods_are_ignored_ === RUN Test_ConfigExplorer_FindDataSources/non-existent_paths_and_methods_are_ignored_ === PAUSE Test_ConfigExplorer_FindDataSources/non-existent_paths_and_methods_are_ignored_ === RUN Test_ConfigExplorer_FindDataSources/valid_read_op === PAUSE Test_ConfigExplorer_FindDataSources/valid_read_op === CONT Test_ConfigExplorer_FindDataSources/valid_read_op_-_alternative_methods === CONT Test_ConfigExplorer_FindResources/valid_alternative_CRUD_ops_-_options,_head,_patch,_trace === CONT Test_ConfigExplorer_FindDataSources/valid_read_op === CONT Test_ConfigExplorer_FindDataSources/non-existent_paths_and_methods_are_ignored_ --- PASS: Test_ConfigExplorer_FindResources (0.00s) --- PASS: Test_ConfigExplorer_FindResources/non-existent_paths_and_methods_are_ignored_ (0.00s) --- PASS: Test_ConfigExplorer_FindResources/valid_alternative_CRUD_ops_-_options,_head,_patch,_trace (0.00s) --- PASS: Test_ConfigExplorer_FindResources/valid_CRUD_ops (0.00s) === RUN Test_GuesstimatorExplorer_FindDataSources/valid_flat_data_source_combo === RUN Test_GuesstimatorExplorer_FindResources/invalid_resource_combo_-_POST,DELETEbyID === PAUSE Test_GuesstimatorExplorer_FindDataSources/valid_flat_data_source_combo === RUN Test_ConfigExplorer_FindProvider/valid_provider_name_from_config --- PASS: Test_ConfigExplorer_FindDataSources (0.00s) --- PASS: Test_ConfigExplorer_FindDataSources/valid_read_op_-_alternative_methods (0.00s) --- PASS: Test_ConfigExplorer_FindDataSources/non-existent_paths_and_methods_are_ignored_ (0.00s) --- PASS: Test_ConfigExplorer_FindDataSources/valid_read_op (0.00s) === PAUSE Test_GuesstimatorExplorer_FindResources/invalid_resource_combo_-_POST,DELETEbyID === RUN Test_GuesstimatorExplorer_FindResources/invalid_resource_combo_-_GETbyID,DELETEbyID === PAUSE Test_GuesstimatorExplorer_FindResources/invalid_resource_combo_-_GETbyID,DELETEbyID === RUN Test_GuesstimatorExplorer_FindDataSources/valid_nested_data_source_combo === PAUSE Test_ConfigExplorer_FindProvider/valid_provider_name_from_config === CONT Test_ConfigExplorer_FindProvider/valid_provider_name_from_config === RUN Test_GuesstimatorExplorer_FindResources/invalid_resource_combo_-_GETbyID,POST === PAUSE Test_GuesstimatorExplorer_FindDataSources/valid_nested_data_source_combo === PAUSE Test_GuesstimatorExplorer_FindResources/invalid_resource_combo_-_GETbyID,POST === RUN Test_GuesstimatorExplorer_FindDataSources/valid_nested_with_id_data_source_combo --- PASS: Test_ConfigExplorer_FindProvider (0.00s) --- PASS: Test_ConfigExplorer_FindProvider/valid_provider_name_from_config (0.00s) === RUN Test_GuesstimatorExplorer_FindResources/invalid_resource_combo_-_no_ops === PAUSE Test_GuesstimatorExplorer_FindResources/invalid_resource_combo_-_no_ops === RUN Test_GuesstimatorExplorer_FindResources/valid_flat_resource_combo === PAUSE Test_GuesstimatorExplorer_FindResources/valid_flat_resource_combo === RUN Test_GuesstimatorExplorer_FindResources/valid_nested_resource_combo === PAUSE Test_GuesstimatorExplorer_FindResources/valid_nested_resource_combo === PAUSE Test_GuesstimatorExplorer_FindDataSources/valid_nested_with_id_data_source_combo === RUN Test_GuesstimatorExplorer_FindResources/valid_nested_with_id_resource_combo === PAUSE Test_GuesstimatorExplorer_FindResources/valid_nested_with_id_resource_combo === CONT Test_GuesstimatorExplorer_FindResources/invalid_resource_combo_-_POST,DELETEbyID === CONT Test_GuesstimatorExplorer_FindResources/invalid_resource_combo_-_GETbyID,POST === RUN Test_GuesstimatorExplorer_FindDataSources/invalid_data_source_combo_-_no_matching_ops === PAUSE Test_GuesstimatorExplorer_FindDataSources/invalid_data_source_combo_-_no_matching_ops === CONT Test_GuesstimatorExplorer_FindResources/valid_flat_resource_combo === RUN Test_GuesstimatorExplorer_FindDataSources/invalid_data_source_combo_-_no_ops === CONT Test_GuesstimatorExplorer_FindResources/valid_nested_resource_combo === PAUSE Test_GuesstimatorExplorer_FindDataSources/invalid_data_source_combo_-_no_ops === CONT Test_GuesstimatorExplorer_FindResources/invalid_resource_combo_-_no_ops === CONT Test_GuesstimatorExplorer_FindDataSources/valid_flat_data_source_combo === CONT Test_GuesstimatorExplorer_FindDataSources/valid_nested_data_source_combo === CONT Test_GuesstimatorExplorer_FindDataSources/invalid_data_source_combo_-_no_matching_ops === CONT Test_GuesstimatorExplorer_FindResources/valid_nested_with_id_resource_combo === CONT Test_GuesstimatorExplorer_FindResources/invalid_resource_combo_-_GETbyID,DELETEbyID --- PASS: Test_GuesstimatorExplorer_FindResources (0.00s) --- PASS: Test_GuesstimatorExplorer_FindResources/invalid_resource_combo_-_POST,DELETEbyID (0.00s) --- PASS: Test_GuesstimatorExplorer_FindResources/invalid_resource_combo_-_GETbyID,POST (0.00s) --- PASS: Test_GuesstimatorExplorer_FindResources/valid_flat_resource_combo (0.00s) --- PASS: Test_GuesstimatorExplorer_FindResources/invalid_resource_combo_-_no_ops (0.00s) --- PASS: Test_GuesstimatorExplorer_FindResources/valid_nested_resource_combo (0.00s) --- PASS: Test_GuesstimatorExplorer_FindResources/valid_nested_with_id_resource_combo (0.00s) --- PASS: Test_GuesstimatorExplorer_FindResources/invalid_resource_combo_-_GETbyID,DELETEbyID (0.00s) === CONT Test_GuesstimatorExplorer_FindDataSources/valid_nested_with_id_data_source_combo === CONT Test_GuesstimatorExplorer_FindDataSources/invalid_data_source_combo_-_no_ops --- PASS: Test_GuesstimatorExplorer_FindDataSources (0.00s) --- PASS: Test_GuesstimatorExplorer_FindDataSources/valid_flat_data_source_combo (0.00s) --- PASS: Test_GuesstimatorExplorer_FindDataSources/valid_nested_data_source_combo (0.00s) --- PASS: Test_GuesstimatorExplorer_FindDataSources/invalid_data_source_combo_-_no_matching_ops (0.00s) --- PASS: Test_GuesstimatorExplorer_FindDataSources/valid_nested_with_id_data_source_combo (0.00s) --- PASS: Test_GuesstimatorExplorer_FindDataSources/invalid_data_source_combo_-_no_ops (0.00s) PASS ok github.com/hashicorp/terraform-plugin-codegen-openapi/internal/explorer 0.779s === RUN TestDataSourceMapper_basic_merges === PAUSE TestDataSourceMapper_basic_merges === RUN TestResourceMapper_basic_merges === PAUSE TestResourceMapper_basic_merges === CONT TestDataSourceMapper_basic_merges === CONT TestResourceMapper_basic_merges === RUN TestDataSourceMapper_basic_merges/merge_primitives_across_all_ops === PAUSE TestDataSourceMapper_basic_merges/merge_primitives_across_all_ops === RUN TestDataSourceMapper_basic_merges/deep_merge_single_nested_object === PAUSE TestDataSourceMapper_basic_merges/deep_merge_single_nested_object === RUN TestDataSourceMapper_basic_merges/deep_merge_list_nested_array === PAUSE TestDataSourceMapper_basic_merges/deep_merge_list_nested_array === RUN TestResourceMapper_basic_merges/deep_merge_list_nested_array === RUN TestDataSourceMapper_basic_merges/deep_merge_list_array_with_object_element_types === PAUSE TestDataSourceMapper_basic_merges/deep_merge_list_array_with_object_element_types === PAUSE TestResourceMapper_basic_merges/deep_merge_list_nested_array === CONT TestDataSourceMapper_basic_merges/merge_primitives_across_all_ops === RUN TestResourceMapper_basic_merges/deep_merge_list_array_with_object_element_types === PAUSE TestResourceMapper_basic_merges/deep_merge_list_array_with_object_element_types === RUN TestResourceMapper_basic_merges/merge_primitives_across_all_ops === PAUSE TestResourceMapper_basic_merges/merge_primitives_across_all_ops === RUN TestResourceMapper_basic_merges/deep_merge_single_nested_object === PAUSE TestResourceMapper_basic_merges/deep_merge_single_nested_object === CONT TestResourceMapper_basic_merges/deep_merge_list_nested_array === CONT TestDataSourceMapper_basic_merges/deep_merge_list_nested_array === CONT TestDataSourceMapper_basic_merges/deep_merge_list_array_with_object_element_types === CONT TestResourceMapper_basic_merges/merge_primitives_across_all_ops === CONT TestDataSourceMapper_basic_merges/deep_merge_single_nested_object === CONT TestResourceMapper_basic_merges/deep_merge_list_array_with_object_element_types === CONT TestResourceMapper_basic_merges/deep_merge_single_nested_object --- PASS: TestDataSourceMapper_basic_merges (0.00s) --- PASS: TestDataSourceMapper_basic_merges/merge_primitives_across_all_ops (0.00s) --- PASS: TestDataSourceMapper_basic_merges/deep_merge_list_array_with_object_element_types (0.00s) --- PASS: TestDataSourceMapper_basic_merges/deep_merge_list_nested_array (0.00s) --- PASS: TestDataSourceMapper_basic_merges/deep_merge_single_nested_object (0.00s) --- PASS: TestResourceMapper_basic_merges (0.00s) --- PASS: TestResourceMapper_basic_merges/merge_primitives_across_all_ops (0.00s) --- PASS: TestResourceMapper_basic_merges/deep_merge_list_nested_array (0.00s) --- PASS: TestResourceMapper_basic_merges/deep_merge_list_array_with_object_element_types (0.00s) --- PASS: TestResourceMapper_basic_merges/deep_merge_single_nested_object (0.00s) PASS ok github.com/hashicorp/terraform-plugin-codegen-openapi/internal/mapper 0.608s === RUN TestBuildBoolResource === PAUSE TestBuildBoolResource === RUN TestBuildBoolDataSource === PAUSE TestBuildBoolDataSource === RUN TestBuildSchemaFromRequest === PAUSE TestBuildSchemaFromRequest === RUN TestBuildSchemaFromRequest_Errors === PAUSE TestBuildSchemaFromRequest_Errors === RUN TestBuildSchemaFromResponse === PAUSE TestBuildSchemaFromResponse === RUN TestBuildSchemaFromResponse_Errors === PAUSE TestBuildSchemaFromResponse_Errors === RUN TestBuildSchema_NullableMultiTypes === PAUSE TestBuildSchema_NullableMultiTypes === RUN TestBuildIntegerResource === PAUSE TestBuildIntegerResource === RUN TestBuildIntegerDataSource === PAUSE TestBuildIntegerDataSource === RUN TestBuildListResource === PAUSE TestBuildListResource === RUN TestBuildListDataSource === PAUSE TestBuildListDataSource === RUN TestBuildNumberResource === PAUSE TestBuildNumberResource === RUN TestBuildNumberDataSource === PAUSE TestBuildNumberDataSource === RUN TestBuildSingleNestedResource === PAUSE TestBuildSingleNestedResource === RUN TestBuildSingleNestedDataSource === PAUSE TestBuildSingleNestedDataSource === RUN TestBuildStringResource === PAUSE TestBuildStringResource === RUN TestBuildStringDataSource === PAUSE TestBuildStringDataSource === CONT TestBuildBoolResource === CONT TestBuildListResource === RUN TestBuildBoolResource/boolean_attributes === PAUSE TestBuildBoolResource/boolean_attributes === RUN TestBuildBoolResource/list_attributes_with_bool_element_type === PAUSE TestBuildBoolResource/list_attributes_with_bool_element_type === CONT TestBuildIntegerDataSource === CONT TestBuildIntegerResource === CONT TestBuildSchema_NullableMultiTypes === RUN TestBuildIntegerResource/int64_attributes === PAUSE TestBuildIntegerResource/int64_attributes === RUN TestBuildIntegerResource/list_attributes_with_int64_element_type === RUN TestBuildSchema_NullableMultiTypes/nullable_type_-_Type_array === PAUSE TestBuildIntegerResource/list_attributes_with_int64_element_type === CONT TestBuildNumberDataSource === CONT TestBuildSchemaFromResponse_Errors === PAUSE TestBuildSchema_NullableMultiTypes/nullable_type_-_Type_array === RUN TestBuildNumberDataSource/float64_attributes === RUN TestBuildSchemaFromResponse_Errors/nil_op === PAUSE TestBuildNumberDataSource/float64_attributes === PAUSE TestBuildSchemaFromResponse_Errors/nil_op === RUN TestBuildSchema_NullableMultiTypes/nullable_type_-_anyOf === RUN TestBuildSchemaFromResponse_Errors/nil_responses === CONT TestBuildSchemaFromRequest_Errors === RUN TestBuildNumberDataSource/number_attributes === CONT TestBuildSchemaFromRequest === RUN TestBuildSchemaFromRequest/default_to_application/json === PAUSE TestBuildSchemaFromResponse_Errors/nil_responses === CONT TestBuildSchemaFromResponse === RUN TestBuildSchemaFromResponse_Errors/empty_response_codes === CONT TestBuildBoolDataSource === RUN TestBuildSchemaFromResponse/fallback_to_success_code_and_any_media_type_in_sorted_order === PAUSE TestBuildSchemaFromResponse_Errors/empty_response_codes === PAUSE TestBuildSchemaFromResponse/fallback_to_success_code_and_any_media_type_in_sorted_order === RUN TestBuildSchemaFromResponse/default_to_200_and_application/json === PAUSE TestBuildSchemaFromResponse/default_to_200_and_application/json === RUN TestBuildBoolDataSource/list_attributes_with_bool_element_type === RUN TestBuildSchemaFromResponse/fallback_to_201_and_application/json === PAUSE TestBuildSchemaFromResponse/fallback_to_201_and_application/json === PAUSE TestBuildBoolDataSource/list_attributes_with_bool_element_type === RUN TestBuildIntegerDataSource/int64_attributes === PAUSE TestBuildSchema_NullableMultiTypes/nullable_type_-_anyOf === PAUSE TestBuildNumberDataSource/number_attributes === RUN TestBuildNumberDataSource/list_attributes_with_float64_element_type === PAUSE TestBuildNumberDataSource/list_attributes_with_float64_element_type === RUN TestBuildNumberDataSource/list_attributes_with_number_element_type === PAUSE TestBuildNumberDataSource/list_attributes_with_number_element_type === PAUSE TestBuildSchemaFromRequest/default_to_application/json === CONT TestBuildStringDataSource === RUN TestBuildSchemaFromRequest_Errors/nil_op === RUN TestBuildSchemaFromRequest/utilizes_other_media_types_in_sorted_order === RUN TestBuildStringDataSource/string_attributes === PAUSE TestBuildSchemaFromRequest_Errors/nil_op === PAUSE TestBuildStringDataSource/string_attributes === RUN TestBuildStringDataSource/list_attributes_with_string_element_type === CONT TestBuildNumberResource === PAUSE TestBuildStringDataSource/list_attributes_with_string_element_type === CONT TestBuildSingleNestedDataSource === RUN TestBuildSchemaFromRequest_Errors/nil_request_body === RUN TestBuildSingleNestedDataSource/single_nested_attributes === PAUSE TestBuildSchemaFromRequest_Errors/nil_request_body === PAUSE TestBuildSingleNestedDataSource/single_nested_attributes === RUN TestBuildBoolDataSource/boolean_attributes === PAUSE TestBuildBoolDataSource/boolean_attributes === PAUSE TestBuildIntegerDataSource/int64_attributes === RUN TestBuildSchema_NullableMultiTypes/nullable_type_-_oneOf === PAUSE TestBuildSchema_NullableMultiTypes/nullable_type_-_oneOf === PAUSE TestBuildSchemaFromRequest/utilizes_other_media_types_in_sorted_order === RUN TestBuildSchema_NullableMultiTypes/list_attributes_with_nullable_element_type_-_Type_array === PAUSE TestBuildSchema_NullableMultiTypes/list_attributes_with_nullable_element_type_-_Type_array === RUN TestBuildSchema_NullableMultiTypes/list_attributes_with_nullable_element_type_-_anyOf === PAUSE TestBuildSchema_NullableMultiTypes/list_attributes_with_nullable_element_type_-_anyOf === RUN TestBuildSchema_NullableMultiTypes/list_attributes_with_nullable_element_type_-_oneOf === PAUSE TestBuildSchema_NullableMultiTypes/list_attributes_with_nullable_element_type_-_oneOf === RUN TestBuildSchemaFromResponse_Errors/no_success_response_code_media_type_schemas === CONT TestBuildBoolResource/boolean_attributes === PAUSE TestBuildSchemaFromResponse_Errors/no_success_response_code_media_type_schemas === RUN TestBuildSchemaFromResponse_Errors/200_response_code_with_no_valid_schema === PAUSE TestBuildSchemaFromResponse_Errors/200_response_code_with_no_valid_schema === RUN TestBuildSchemaFromResponse_Errors/201_response_code_with_no_valid_schema === PAUSE TestBuildSchemaFromResponse_Errors/201_response_code_with_no_valid_schema === RUN TestBuildSchemaFromResponse_Errors/success_response_code_with_no_valid_schema === PAUSE TestBuildSchemaFromResponse_Errors/success_response_code_with_no_valid_schema === RUN TestBuildListResource/list_nested_attributes === PAUSE TestBuildListResource/list_nested_attributes === CONT TestBuildStringResource === RUN TestBuildListResource/list_attributes_with_list_and_nested_object_element_type === CONT TestBuildBoolResource/list_attributes_with_bool_element_type === RUN TestBuildStringResource/list_attributes_with_string_element_type === PAUSE TestBuildStringResource/list_attributes_with_string_element_type === RUN TestBuildStringResource/string_attributes === PAUSE TestBuildStringResource/string_attributes === RUN TestBuildSchemaFromRequest_Errors/empty_request_body_content === PAUSE TestBuildSchemaFromRequest_Errors/empty_request_body_content === CONT TestBuildSingleNestedResource === RUN TestBuildSchemaFromRequest_Errors/no_media_type_schemas === PAUSE TestBuildSchemaFromRequest_Errors/no_media_type_schemas === RUN TestBuildSingleNestedResource/single_nested_attributes === PAUSE TestBuildSingleNestedResource/single_nested_attributes === RUN TestBuildIntegerDataSource/list_attributes_with_int64_element_type === CONT TestBuildSchemaFromResponse/default_to_200_and_application/json === CONT TestBuildSchemaFromResponse/fallback_to_success_code_and_any_media_type_in_sorted_order --- PASS: TestBuildBoolResource (0.00s) --- PASS: TestBuildBoolResource/boolean_attributes (0.00s) --- PASS: TestBuildBoolResource/list_attributes_with_bool_element_type (0.00s) === CONT TestBuildIntegerResource/list_attributes_with_int64_element_type === RUN TestBuildSchemaFromRequest/utilizes_other_media_types_when_nil_schemas_in_priority_media_types === PAUSE TestBuildSchemaFromRequest/utilizes_other_media_types_when_nil_schemas_in_priority_media_types === PAUSE TestBuildListResource/list_attributes_with_list_and_nested_object_element_type === CONT TestBuildNumberDataSource/list_attributes_with_number_element_type === CONT TestBuildNumberDataSource/number_attributes === PAUSE TestBuildIntegerDataSource/list_attributes_with_int64_element_type === CONT TestBuildStringDataSource/string_attributes === RUN TestBuildNumberResource/list_attributes_with_float64_element_type === PAUSE TestBuildNumberResource/list_attributes_with_float64_element_type === CONT TestBuildListDataSource === RUN TestBuildNumberResource/list_attributes_with_number_element_type === CONT TestBuildBoolDataSource/boolean_attributes === RUN TestBuildListDataSource/list_attributes_with_list_and_nested_object_element_type === PAUSE TestBuildListDataSource/list_attributes_with_list_and_nested_object_element_type === CONT TestBuildSingleNestedDataSource/single_nested_attributes === PAUSE TestBuildNumberResource/list_attributes_with_number_element_type === CONT TestBuildSchema_NullableMultiTypes/nullable_type_-_Type_array === CONT TestBuildNumberDataSource/float64_attributes === RUN TestBuildNumberResource/float64_attributes === PAUSE TestBuildNumberResource/float64_attributes === RUN TestBuildNumberResource/number_attributes === PAUSE TestBuildNumberResource/number_attributes === CONT TestBuildSchema_NullableMultiTypes/nullable_type_-_oneOf === CONT TestBuildNumberDataSource/list_attributes_with_float64_element_type === CONT TestBuildStringDataSource/list_attributes_with_string_element_type === CONT TestBuildSchema_NullableMultiTypes/list_attributes_with_nullable_element_type_-_oneOf --- PASS: TestBuildNumberDataSource (0.00s) --- PASS: TestBuildNumberDataSource/list_attributes_with_number_element_type (0.00s) --- PASS: TestBuildNumberDataSource/number_attributes (0.00s) --- PASS: TestBuildNumberDataSource/float64_attributes (0.00s) --- PASS: TestBuildNumberDataSource/list_attributes_with_float64_element_type (0.00s) === CONT TestBuildSchema_NullableMultiTypes/list_attributes_with_nullable_element_type_-_anyOf === CONT TestBuildSchemaFromResponse_Errors/200_response_code_with_no_valid_schema --- PASS: TestBuildStringDataSource (0.00s) --- PASS: TestBuildStringDataSource/string_attributes (0.00s) --- PASS: TestBuildStringDataSource/list_attributes_with_string_element_type (0.00s) === CONT TestBuildSchemaFromResponse_Errors/success_response_code_with_no_valid_schema === CONT TestBuildSchemaFromResponse_Errors/201_response_code_with_no_valid_schema === CONT TestBuildSchemaFromResponse_Errors/empty_response_codes === CONT TestBuildBoolDataSource/list_attributes_with_bool_element_type === CONT TestBuildSchemaFromResponse_Errors/no_success_response_code_media_type_schemas === CONT TestBuildStringResource/list_attributes_with_string_element_type === CONT TestBuildStringResource/string_attributes --- PASS: TestBuildSingleNestedDataSource (0.00s) --- PASS: TestBuildSingleNestedDataSource/single_nested_attributes (0.00s) === CONT TestBuildSchemaFromResponse_Errors/nil_op === CONT TestBuildSchemaFromResponse_Errors/nil_responses === CONT TestBuildSingleNestedResource/single_nested_attributes === CONT TestBuildIntegerResource/int64_attributes === CONT TestBuildSchema_NullableMultiTypes/nullable_type_-_anyOf === CONT TestBuildListResource/list_nested_attributes === CONT TestBuildSchemaFromRequest/default_to_application/json === CONT TestBuildSchemaFromRequest_Errors/nil_op === CONT TestBuildSchemaFromRequest/utilizes_other_media_types_when_nil_schemas_in_priority_media_types === CONT TestBuildSchemaFromRequest/utilizes_other_media_types_in_sorted_order === RUN TestBuildListDataSource/list_nested_attributes === CONT TestBuildNumberResource/list_attributes_with_float64_element_type === PAUSE TestBuildListDataSource/list_nested_attributes === CONT TestBuildSchemaFromRequest_Errors/no_media_type_schemas === CONT TestBuildNumberResource/number_attributes === CONT TestBuildSchema_NullableMultiTypes/list_attributes_with_nullable_element_type_-_Type_array === CONT TestBuildNumberResource/list_attributes_with_number_element_type === CONT TestBuildListDataSource/list_attributes_with_list_and_nested_object_element_type === CONT TestBuildListDataSource/list_nested_attributes --- PASS: TestBuildStringResource (0.00s) --- PASS: TestBuildStringResource/string_attributes (0.00s) --- PASS: TestBuildStringResource/list_attributes_with_string_element_type (0.00s) --- PASS: TestBuildBoolDataSource (0.00s) --- PASS: TestBuildBoolDataSource/boolean_attributes (0.00s) --- PASS: TestBuildBoolDataSource/list_attributes_with_bool_element_type (0.00s) === CONT TestBuildSchemaFromRequest_Errors/nil_request_body --- PASS: TestBuildSchemaFromResponse_Errors (0.00s) --- PASS: TestBuildSchemaFromResponse_Errors/200_response_code_with_no_valid_schema (0.00s) --- PASS: TestBuildSchemaFromResponse_Errors/201_response_code_with_no_valid_schema (0.00s) --- PASS: TestBuildSchemaFromResponse_Errors/empty_response_codes (0.00s) --- PASS: TestBuildSchemaFromResponse_Errors/success_response_code_with_no_valid_schema (0.00s) --- PASS: TestBuildSchemaFromResponse_Errors/no_success_response_code_media_type_schemas (0.00s) --- PASS: TestBuildSchemaFromResponse_Errors/nil_op (0.00s) --- PASS: TestBuildSchemaFromResponse_Errors/nil_responses (0.00s) === CONT TestBuildSchemaFromResponse/fallback_to_201_and_application/json --- PASS: TestBuildSingleNestedResource (0.00s) --- PASS: TestBuildSingleNestedResource/single_nested_attributes (0.00s) --- PASS: TestBuildSchemaFromResponse (0.00s) --- PASS: TestBuildSchemaFromResponse/fallback_to_success_code_and_any_media_type_in_sorted_order (0.00s) --- PASS: TestBuildSchemaFromResponse/default_to_200_and_application/json (0.00s) --- PASS: TestBuildSchemaFromResponse/fallback_to_201_and_application/json (0.00s) === CONT TestBuildIntegerDataSource/int64_attributes --- PASS: TestBuildSchemaFromRequest (0.00s) --- PASS: TestBuildSchemaFromRequest/default_to_application/json (0.00s) --- PASS: TestBuildSchemaFromRequest/utilizes_other_media_types_when_nil_schemas_in_priority_media_types (0.00s) --- PASS: TestBuildSchemaFromRequest/utilizes_other_media_types_in_sorted_order (0.00s) --- PASS: TestBuildSchema_NullableMultiTypes (0.00s) --- PASS: TestBuildSchema_NullableMultiTypes/nullable_type_-_Type_array (0.00s) --- PASS: TestBuildSchema_NullableMultiTypes/nullable_type_-_oneOf (0.00s) --- PASS: TestBuildSchema_NullableMultiTypes/list_attributes_with_nullable_element_type_-_oneOf (0.00s) --- PASS: TestBuildSchema_NullableMultiTypes/list_attributes_with_nullable_element_type_-_anyOf (0.00s) --- PASS: TestBuildSchema_NullableMultiTypes/nullable_type_-_anyOf (0.00s) --- PASS: TestBuildSchema_NullableMultiTypes/list_attributes_with_nullable_element_type_-_Type_array (0.00s) --- PASS: TestBuildIntegerResource (0.00s) --- PASS: TestBuildIntegerResource/list_attributes_with_int64_element_type (0.00s) --- PASS: TestBuildIntegerResource/int64_attributes (0.00s) === CONT TestBuildListResource/list_attributes_with_list_and_nested_object_element_type --- PASS: TestBuildListDataSource (0.00s) --- PASS: TestBuildListDataSource/list_nested_attributes (0.00s) --- PASS: TestBuildListDataSource/list_attributes_with_list_and_nested_object_element_type (0.00s) === CONT TestBuildIntegerDataSource/list_attributes_with_int64_element_type === CONT TestBuildNumberResource/float64_attributes --- PASS: TestBuildIntegerDataSource (0.00s) --- PASS: TestBuildIntegerDataSource/int64_attributes (0.00s) --- PASS: TestBuildIntegerDataSource/list_attributes_with_int64_element_type (0.00s) === CONT TestBuildSchemaFromRequest_Errors/empty_request_body_content --- PASS: TestBuildSchemaFromRequest_Errors (0.00s) --- PASS: TestBuildSchemaFromRequest_Errors/nil_op (0.00s) --- PASS: TestBuildSchemaFromRequest_Errors/no_media_type_schemas (0.00s) --- PASS: TestBuildSchemaFromRequest_Errors/nil_request_body (0.00s) --- PASS: TestBuildSchemaFromRequest_Errors/empty_request_body_content (0.00s) --- PASS: TestBuildListResource (0.00s) --- PASS: TestBuildListResource/list_nested_attributes (0.00s) --- PASS: TestBuildListResource/list_attributes_with_list_and_nested_object_element_type (0.00s) --- PASS: TestBuildNumberResource (0.00s) --- PASS: TestBuildNumberResource/number_attributes (0.00s) --- PASS: TestBuildNumberResource/list_attributes_with_float64_element_type (0.00s) --- PASS: TestBuildNumberResource/list_attributes_with_number_element_type (0.00s) --- PASS: TestBuildNumberResource/float64_attributes (0.00s) PASS ok github.com/hashicorp/terraform-plugin-codegen-openapi/internal/mapper/oas 0.520s ```