microsoft / microsoft/typespec

New built-in decorator to mark a known model

Open
#2,707 6 comments 0 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

Kinda a way to make a model nominal.

There is a few models that we have to have custom decorators to be able to check if it is that model. You cannot just do assignment check as it would work with structure comparaison.

For example we have `@embedingVector` to mark a special vector array. It might be better if we had a standard way to resolve those.

Something like

```
@nominal("Azure.Core.EmbeddingVector")
model EmbeddingVector is Array
```

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.