microsoft / typespec

https://typespec.io/
MIT License
4.1k stars 193 forks source link

Should we include newly added api versions in older api version's OpenAPI spec emitter result #2715

Open qiaozha opened 9 months ago

qiaozha commented 9 months ago

See the typespec playground link in the OpenAPI3 emitter result, there's a v1.yaml and v2.yaml, and both of them have references to the apiVersion enum with value v1 and v2, I feel like it doesn't quite make sense to include v2 in v1's emitter result ? For example, there's an operation that is removed in v2, and in v1.yaml, it indeed should be here but what doesn't make sense to me is that the avaible apiVersions for this operation are both v1 and v2.

markcowl commented 9 months ago