microsoft / microsoft/typespec
OpenAPI and JSON Schema don't support tuple declarations
- Dominant language
- Java
- Stars
- 5.9k
- Forks
- 394
- Avg merge
- 1d 23h
- Merged PRs (30d)
- 104
Description
In this example, the `parts` property is declared as `[Part]`. This is incorrect syntax for an array -- it should be `Part[]` -- but the compiler silently ignores the problem and generates an empty schema for itmes.
[Playground Link](https://cadlplayground.z22.web.core.windows.net/?c=aW1wb3J0ICJAdHlwZXNwZWMvaHR0cCI7Cgp1c2luZyBUeXBlU3BlYy5IdHRwOwpAc2VydmljZSh7CiAgdGl0bGU6ICJXaWRnZXQgU8YbIiwKICB2ZXJzaW9uOiAiMS4wLjAiLAp9KQpuYW1lc3BhY2UgRGVtb8cvOwoKbW9kZWwgUGFydCDEV8QnOiBzdHJpbmc7Cn3IIMdmxCJAdmlzaWJpbGl0eSgicmVhZCIsICJ1cGRhdGUiKcQgcGF0aAogIGlkykgKICBwYXJ0czogW8RqXcVaQGVycm9yx2FFxAzFYGNvZGU6IGludDMyOwogIG1lc3NhZ%2B4AlEByb3V0ZSgiL3flAJdzIikKQHRhZyjnAQ3EEGludGVyZuQA78cUxVxA5ADF5AC0KOUApusApCk6xykgfOYAjMRp&e=%40typespec%2Fopenapi3&options=%7B%22linterRuleSet%22%3A%7B%22extends%22%3A%5B%22%40typespec%2Fhttp%2Fall%22%5D%7D%7D)
Contributor guide
Assessment
This issue has not been assessed yet.