-
Notifications
You must be signed in to change notification settings - Fork 199
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]: OpenAPI3 does not output correct names for unions declared within a namespace #4122
Closed
4 tasks done
Labels
Comments
jacobroschen
added a commit
to jacobroschen/typespec
that referenced
this issue
Aug 8, 2024
jacobroschen
added a commit
to jacobroschen/typespec
that referenced
this issue
Aug 8, 2024
jacobroschen
added a commit
to jacobroschen/typespec
that referenced
this issue
Aug 8, 2024
jacobroschen
added a commit
to jacobroschen/typespec
that referenced
this issue
Aug 8, 2024
jacobroschen
added a commit
to jacobroschen/typespec
that referenced
this issue
Aug 8, 2024
jacobroschen
added a commit
to jacobroschen/typespec
that referenced
this issue
Aug 8, 2024
github-merge-queue bot
pushed a commit
that referenced
this issue
Aug 8, 2024
fix #4122 --------- Co-authored-by: Timothee Guerin <tiguerin@microsoft.com>
github-merge-queue bot
pushed a commit
that referenced
this issue
Aug 8, 2024
fix #4122 --------- Co-authored-by: Timothee Guerin <tiguerin@microsoft.com>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Describe the bug
Union
types do not follow the same naming rules as other types such asModel
when declared within a namespace. This appears to be a regression that was introduced in 0.51.0, specifically the conversion of OpenAPI3 to the EmitterFramework.0.50.x playground (correct)
0.51.x playground (incorrect)
This also contradicts the TypeSpec OpenAPI3 Emitter documentation, which states the following.
Tsp
Actual Specification
Note that the union
Foo
is not prefixed with its namespaceSpace1
when included incomponents.schemas
. I expected it to be included asSpace1.Foo
, likeSpace1.Bar
.Expected Specification
Reproduction
https://cadlplayground.z22.web.core.windows.net/?c=aW1wb3J0ICJAdHlwZXNwZWMvb3BlbmFwaTMiOw0KDQp1c2luZyBPcGVuQVBJxRJuYW1lc3BhY2UgU8QGMSB7DQogIG1vZGVsIEJhcsYPICBiYXI%2FOiBzdHJpbmc7xBN9xD0gIHVuaW9uIEZvb8gpZm9vOiBpbnQzMizHJ8UqQHNlcnZpY2XRcTLGOW9wIGNyZWF0ZShwMT86xhsxLkJhciwgcDLKEUZvbyk6IHt9Ow0KfQ%3D%3D&e=%40typespec%2Fopenapi3&options=%7B%7D
Checklist
The text was updated successfully, but these errors were encountered: