-
Notifications
You must be signed in to change notification settings - Fork 236
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Bug]: Property is lost in projected versions #3239
Comments
The problem seems to be we don't assume anymore that there it was added in v1 if it was removed after. |
Hm... this is made trickier by the fact that whether we treat the parent containing no version information as "this thing was always available" depends on a lot of assumptions:
The more special case assumptions we build in, the harder it will be to maintain the code. It may be better to simply be explicit here. |
being explicit was also my idea, if you have a |
Describe the bug
Let assume a service with 3 versions:
And a model has a property
Type
which is added in the first version, deleted in the 2nd version, and added back in the 3rd version:If I specify
api-version: "2022-06-01-preview"
, thenType
should be generated. But currently the compiler will returnExportedResource
withoutType
property.Reproduction
Check this playground: https://azure.github.io/typespec-azure/playground?c=aW1wb3J0ICJAdHlwZXNwZWMvcmVzdCI7DQrJGmF6dXJlLXRvb2xzL8gmLcYVY29yZd8sZWMtY2xpZW50LWdlbmVyYXRvcsk3DQp1c2luZyBUeXBlU3BlYy5IdHRwO9EWUmVzdNIWVmVyc2lvbmluZ8kcQcR%2BLkNvcmXTEy5Gb3VuZGF0aW9uc9QfVHJhaXTEGg0KQHNlcnZpY2Uoew0KICB0aXRsZTogIspxIiwNCn0pDQpAdsYTZWQoQXBpxyBzKQ0KbmFtZXNwYWNl9ACvLk9sZOYA0g0KZW51bSDLPCDFckB1c2VEZXBlbmRlbmN5KGdsb2JhbC7rAKzILy52MV8wX1ByZXZpZXdfMinEPXYyMDIyXzA2XzAxX3DGGjogIsQVLTA2LTAxLccV5ADFyzA5XzAxySg5LTAxxCDIHjEy004xMs9OfcRRQHJlc291cmNlKCLICnMiKQ0KbW9kZWwgUscT5wDodmlzaWJpbGl0ecQuYWTEKSAgaWQ6IHN0cuYB2sUoa2V52zDkAW7PMuQCfMsT5QCa5gCCRXjkAqtlZO4Ais1zICDoALpVcmnPWUByZW1vdu4B8S7rAUP4AJHfOMY4QGFkZNUj7QGAxSv%2FAOF0UGFyYW3oAk9xdWVy5QFBcHJvamVjdEZpbGXHYj%2FLRf8Ag%2FAAg9FXZWTEWUZvcm1hdNFY%2FwEAz1LHLlHEEOUAy99Q11D%2FAM31AM1tYXhMaW5lcz86IGludDMy7gFeTGlzdOoAlucBYS4uLlNlbGVjyxpldGVy%2FwFT%2FQCGQGRvYygiRmlsdGVyIHRoZeQCk3VsdCBsaXN0IOYEvMQWZ2l2ZW4gZXhwcmVzxFsu5gMSZsU4%2FwE0%2FwCL6QCLZXhwYW5kzE3lARBpbnRlcmbkBOToA0tPcOQF4MRWxjd0ZW5kc%2BwFY9IpPE5vUmVwZWF0YWJsZVJlcXVlc3RzICbEQMQBTm9Db25kacQrYWzVH%2BUGW8caSWQ%2BIHvnBIVvdXRlKCIv5wWh5AW0KewAs%2BoFjk9w5wMlcG9sbMUQ5wCcKPIAri5HZXTRFlN0YXR1czzIGCzxBGI%2B5QFQZcUWIGlz8wEvLkxvbmdSdW7kAJDIHkFjxBvRV%2BYCd9Nl5wHk5QIg1mXIE%2BQCw8tY7gLS5AK4c%2BUHCzzOGXM%2ByGP%2FAkfvAkdzaGFyZWRS5AGQxBBjcmVhdGX%2FAKJDxSVPclJlcGxhY2XpAK3pAIL%2FA1L%2FAIB0ZesBcP8BkusBkvwAln0%3D&e=%40azure-tools%2Ftypespec-autorest&options=%7B%7D
Checklist
The text was updated successfully, but these errors were encountered: