microsoft / microsoft/typespec

Ability to specify Map/Record key types/formats/patterns

Open
#2,842 9 comments 9 reactions 0 assignees View on GitHub
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

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.