This pull request includes several updates to the powerplatform_rest resource, focusing on enhancing the documentation, adding a new plan modifier, and improving the handling of API responses.
Documentation Updates:
Added id and output attributes to the powerplatform_rest resource documentation. (docs/resources/rest.md)
Introduced a nested schema for the output attribute, detailing its structure. (docs/resources/rest.md)
Removed duplicate id and output attributes from the read-only section. (docs/resources/rest.md)
Code Enhancements:
Added a new plan modifier ForceStringValueUnknownModifier to ensure synchronization of file attributes. (internal/powerplatform/modifiers/force_string_value_unknown_modifier.go)
Improved handling of API responses in SendOperation method to return an unknown object type on error. (internal/powerplatform/services/rest/api_rest.go) [1][2][3]
Updated the DataverseWebApiResource to handle create, read, update, and delete operations more robustly, including the use of the new plan modifier. (internal/powerplatform/services/rest/resource_rest.go) [1][2][3][4][5][6][7]
Test Updates:
Added a new responder to mock GET requests in unit tests. (internal/powerplatform/resource_rest_test.go)
These changes aim to enhance the functionality and reliability of the powerplatform_rest resource, ensuring better synchronization and error handling.
This pull request includes several updates to the
powerplatform_rest
resource, focusing on enhancing the documentation, adding a new plan modifier, and improving the handling of API responses.Documentation Updates:
id
andoutput
attributes to thepowerplatform_rest
resource documentation. (docs/resources/rest.md
)output
attribute, detailing its structure. (docs/resources/rest.md
)id
andoutput
attributes from the read-only section. (docs/resources/rest.md
)Code Enhancements:
ForceStringValueUnknownModifier
to ensure synchronization of file attributes. (internal/powerplatform/modifiers/force_string_value_unknown_modifier.go
)SendOperation
method to return an unknown object type on error. (internal/powerplatform/services/rest/api_rest.go
) [1] [2] [3]DataverseWebApiResource
to handle create, read, update, and delete operations more robustly, including the use of the new plan modifier. (internal/powerplatform/services/rest/resource_rest.go
) [1] [2] [3] [4] [5] [6] [7]Test Updates:
internal/powerplatform/resource_rest_test.go
)These changes aim to enhance the functionality and reliability of the
powerplatform_rest
resource, ensuring better synchronization and error handling.