Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add code generation for primitive attributes with associated external type #70

Closed
bendbennett opened this issue Oct 18, 2023 · 1 comment · Fixed by #59
Closed

Add code generation for primitive attributes with associated external type #70

bendbennett opened this issue Oct 18, 2023 · 1 comment · Fixed by #59
Labels
enhancement New feature or request

Comments

@bendbennett
Copy link
Contributor

Currently, custom type and value types, and the To<....>()/From<....>() methods that are used to convert between Terraform Plugin Framework types and API types have only been implemented for list, map, set, single nested attributes, and list, set, single nested blocks.

Code generation should also produce custom type and value types, and the To<....>()/From<....>() methods for Bool, Float64, Int64, Number, and String attributes (refer to Generate custom type and value types and to/from methods for primitives for an example).

Related

@bendbennett bendbennett added the enhancement New feature or request label Oct 18, 2023
bendbennett added a commit that referenced this issue Oct 18, 2023
bendbennett added a commit that referenced this issue Oct 19, 2023
…es (#59)

* Refactoring to move generation of to/from functions to attributes and blocks

* Moving schema.gotmpl

* Renaming interface method

* Removing unneeded template variable

* Renaming method

* Renaming methods

* Inline function

* Renaming

* Adding tests for to/from method generated code

* Adding initial implementation of custom type and value types for data source bool attribute along with To/From method generation

* Updating data source attributes to use generated type and value type in schema and models if associated external type is defined

* Populating data source associated external type

* Setting up generation of custom type and value types and to/from functions for data source float64, int64, number, and string attributes

* Setting up generation of custom type and value types and to/from functions for provider and resource bool, float64, int64, number, and string attributes

* Adding test coverage for associated external type

* Temporarily using sha for codegen-spec

* Adding changelog (#70)

* Adding tests for custom string type and value, and to/from methods (#70)

* Using latest codegen-spec SHA from main (#70)
Copy link

I'm going to lock this issue because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues.
If you have found a problem that seems similar to this, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators May 22, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
enhancement New feature or request
Projects
None yet
1 participant