microsoft / microsoft/typespec
Ability to specify Map/Record key types/formats/patterns
Open
design:needed
triaged:core
- Dominant language
- Java
- Stars
- 5.9k
- Forks
- 394
- Avg merge
- 1d 23h
- Merged PRs (30d)
- 104
Description
I had asked for advice in this discussion #1626 and got pointed to creating an issue.
If you use
`alias MyMap = Record;`
You can't say anything about the keys. They are just `string` as far as I can tell.
I wanted to be able to put something like `@pattern("[a-f0-9]{10}")` on my keys.
Could also imagine: `@format("uuid") `
Hope that is detailed enough.
Contributor guide
Assessment
This issue has not been assessed yet.