hashicorp / hashicorp/terraform-plugin-framework
Replace internal/reflect.isValidFieldName with internal/fwschema.IsValidAttributeName
Open
tech-debt
- Dominant language
- Go
- Stars
- 384
- Forks
- 107
- Avg merge
- 3m
- Merged PRs (30d)
- 1
Description
### Module version
```
v1.2.0
```
### Use-cases
There are multiple places in the internal logic, such as the `internal/reflect` package `isValidFieldName` function, which contain the checking logic for valid attribute names. The `internal/fwschema` implementation contains a pre-compiled regular expression, which may give a very slight performance bump since its called every time struct tags are handled, for example.
### Proposal
On the tin -- centralize logic to `internal/fwschema` since that should contain everything about "schemas".
Contributor guide
Assessment
This issue has not been assessed yet.