microsoft / microsoft/typespec
[Bug]: OpenAPI 3.1: Server Variable's default now MUST exist in the enum values, if such values are defined (changed from SHOULD).
- Dominant language
- Java
- Stars
- 5.9k
- Forks
- 394
- Avg merge
- 1d 23h
- Merged PRs (30d)
- 104
Description
### Describe the bug
Server Variable's default now MUST exist in the enum values, if such values are defined (changed from SHOULD).
But the default value is always ''
### Reproduction
[Playground](https://typespec.io/playground/?c=aW1wb3J0ICJAdHlwZXNwZWMvaHR0cCI7CtIZcmVzdCI7CkBzZXJ2ZXIoIsQpczovL2V4YW1wbGUuY29tIiwgIlN0YW5kYXJkIGVuZHBvaW50IinJNAogIMk3e3Byb2plY3R9LnByaXZhdGUuzUnEK1DGGSDHKspSxB57CiAgIMgbOiAiYWFhYXNkZGRkIiB8ICJhc2RhIgogIH0Kx35pY2UoxDN0aXRsZTogIldpZGdldCBTxhsiLAp9KQpuYW1lc3BhY2UgRGVtb8cbOwoKdXNpbmcgVHlwZVNwZWMuSHR0cDvQFVJlc3Q7Cgo%3D&e=%40typespec%2Fopenapi3&options=%7B%22linterRuleSet%22%3A%7B%22extends%22%3A%5B%22%40typespec%2Fhttp%2Fall%22%5D%7D%2C%22options%22%3A%7B%22%40typespec%2Fopenapi3%22%3A%7B%22openapi-versions%22%3A%5B%223.1.0%22%2C%223.0.0%22%5D%7D%7D%7D)
### Checklist
- [x] Follow our [Code of Conduct](https://github.com/microsoft/typespec/blob/main/CODE_OF_CONDUCT.md)
- [x] Check that there isn't already an issue that request the same bug to avoid creating a duplicate.
- [x] Check that this is a concrete bug. For Q&A open a [GitHub Discussion](https://github.com/Microsoft/typespec/discussions).
- [x] The provided reproduction is a [minimal reproducible example](https://stackoverflow.com/help/minimal-reproducible-example) of the bug.
Contributor guide
Assessment
This issue has not been assessed yet.