docs: propose sub-issues for multi-version API support plan (#1937)#1938
Merged
pmcelhaney merged 2 commits intomainfrom Apr 25, 2026
Merged
docs: propose sub-issues for multi-version API support plan (#1937)#1938pmcelhaney merged 2 commits intomainfrom
pmcelhaney merged 2 commits intomainfrom
Conversation
Agent-Logs-Url: https://github.com/counterfact/api-simulator/sessions/85086329-a680-4ae0-a304-b1d435a851b4 Co-authored-by: pmcelhaney <51504+pmcelhaney@users.noreply.github.com>
Copilot
AI
changed the title
[WIP] Add support for multiple versions of Petstore API
docs: propose sub-issues for multi-version API support plan (#1937)
Apr 25, 2026
pmcelhaney
approved these changes
Apr 25, 2026
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.
Summary
Issue #1937 asks for a documented implementation plan for multi-version API support (e.g.
group: my-api, version: v1+group: my-api, version: v2mounted at/<group>/<version>). This PR adds eight focused issue proposal files under.github/issue-proposals/— one per subsystem — that will be automatically converted into GitHub sub-issues on merge.Original Prompt
Given a spec like the following:
Counterfact should load both versions of the API. The server should host the APIs at
/<group>/<version>. For the most part, the generated code supporting these two APIs will be shared. TypeCoders except forOperationTypeCoderwill put their output in subdirectories according to the version property passed into them. (SchemaTypeCoderandResponseTypeCoderalready do that; the others will need to be updated.)OperationTypeCoderwill output code that maps to each of the versions. AVersionedtype will be created in a new file under./out/types/versions.ts.Create an issue that documents the overall approach for implementing multiple version support, including what changes will need to be made in the server, code generator, core / app code, the REPL, the scenarios, the documentation, etc. Do not write any code yet.
Manual acceptance tests
titleand bodyparentIssue: 1937Tasks
config-add-version-field-to-spec-config.md— add optionalversiontoSpecConfig; relax duplicate-group validation when versions differserver-route-group-version-url-prefixes.md— auto-derive/<group>/<version>prefix; keep explicitprefixoverridegenerator-version-subdirectories-for-remaining-coders.md— updateParametersTypeCoder,ResponsesTypeCoder,ParameterExportTypeCoderto mirror thetypes/<version>/…layout already used bySchemaTypeCoderandResponseTypeCodergenerator-operation-type-coder-version-map.md— emit per-version$-argument types undertypes/<version>/and a sharedHTTP_<METHOD>wrapper usingVersioned<…>at the shared pathgenerator-emit-versions-ts.md— generatetypes/versions.tswithVersionsunion,VersionsGTEordering map, andVersioned<T>utility typerepl-version-aware-context-routes-scenario.md— extendcontext.<group>.<version>,.scenario <group> <version> <path>, and tab completionscenarios-version-aware-loading.md— version-scoped scenario directory resolution with shared fallback; expose$.versionin startup scenariodocs-multiple-version-support.md— newdocs/features/multiple-versions.mdplus updates tousage.md,reference.md, and type JSDoc