Versioning the type/format of a property #7361
-
Looking for a way to version the type/format of a property. model Product{
id: int32;
link: url;
} and v2 will be: model Product{
id: int64;
link: string; // This will remove the `format: uri` from the Open API spec v2
} P.S. I am just 1 day into TypeSpec, but searching online I couldn't really find a solution for this. I saw in another thread that versioning model descriptors was not supported, is it the same for changing types? #6020 |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
You can use Note however that using this will increase the complexity of your spec significantly specially if you start making non additive changes. |
Beta Was this translation helpful? Give feedback.
You can use
@typeChangedFrom
decorator from the versioning library https://typespec.io/docs/libraries/versioning/guide/.Note however that using this will increase the complexity of your spec significantly specially if you start making non additive changes.