Add Spector coverage for date-like extensible enum names#11142
Draft
Copilot wants to merge 5 commits into
Draft
Conversation
Co-authored-by: msyyc <70930885+msyyc@users.noreply.github.com>
Co-authored-by: msyyc <70930885+msyyc@users.noreply.github.com>
Co-authored-by: msyyc <70930885+msyyc@users.noreply.github.com>
Co-authored-by: msyyc <70930885+msyyc@users.noreply.github.com>
Copilot
AI
changed the title
[WIP] Add spector coverage for extensible enum with date/version-like names
Add Spector coverage for date-like extensible enum names
Jul 2, 2026
msyyc
reviewed
Jul 2, 2026
|
|
||
| @route("/string") | ||
| interface String { | ||
| @scenario |
Contributor
Author
There was a problem hiding this comment.
Validated commit 94d19fe: PR check runs show typespec - ci completed successfully. Local focused checks also pass: pnpm -r --filter "@typespec/http-specs..." build, pnpm --filter @typespec/http-specs validate-mock-apis, and Prettier for the changed files.
| } | ||
|
|
||
| @doc("Service API versions") | ||
| union ApiVersionExtensibleEnum { |
Member
There was a problem hiding this comment.
I think @iscai-msft was working on a generic special char spec somewehere, I don't think this test belong in this spec, same as we have a SpecialWords one we should have a SpecialChart one which covers those things.
Also api version doesn't make sense here from a core typespec http spec, this is just about having numbers and special chars
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The existing
type/enum/extensiblecoverage only used word-like enum member names, missing regressions where date/version-like names can be coerced when round-tripped through YAML.ApiVersionExtensibleEnumwith date-like member names and string values:Spector operations
GET/PUTcoverage for known and unknown API version values under/type/enum/extensible/api-version.Mock API coverage
"2020-01-01"and"2022-01-01".