Milestone: Schema Generation
This is part of a series of notes about code generating a Terraform Provider using OpenAPI
The milestone is complete when tfpgen can generate a fully mapped GetSchema function for any OpenAPI spec.
OpenAPI adheres to json data types, with several data formats to give further clues about their intended conversion:
| Type | Format | Terraform Plugin Framework Type (opens in a new tab) | Go data type |
|---|---|---|---|
| integer | int32 | Number | int |
| integer | int64 | Int64 | int64 |
| number | float | Number | float32 |
| number | double | Float64 | float64 |
| string | String | string | |
| string | byte | String | string |
| string | binary | String | string |
| string | byte | String | string |
| string | date | String | string |
| string | date-time | String | string |
| string | password | String (Sensitive) | string |
| boolean | Bool | bool | |
| array | List | [] | |
| object | (Nested Attributes) | (struct) |