You are working on the hyperswitch repository (Rust payment processing system).…
- User
You are working on the hyperswitch repository (Rust payment processing system).
REPOSITORY SETUP:
- Repository: juspay/hyperswitch
- Working directory: ./repos/hyperswitch_pool_1 (already cloned)
- Base commit: 61c2e2c75fabdb03c5599df97240a030cb7b5b6a
- Task ID: juspay__hyperswitch-8332
- Version: v1.114.0
TASK DESCRIPTION: Bug: docs(openapi): Show API version selection dropdown in API Reference
Add a version selection dropdown in API reference to allow exploring v2 APIs
DETAILED CONTEXT & HINTS:
Type of Change
- Bugfix
- New feature
- Enhancement
- Refactoring
- Dependency updates
- Documentation
- CI/CD
Description
- Moved both
v1andv2API docs underapi-referencedirectory - Renamed
openapi_spec.jsonfiles for v1 and v2 - Updated OpenAPI spec file paths in
openapicrate - Modified OpenAPI spec path in CI pipeline
Additional Changes
- This PR modifies the API contract
- This PR modifies the database schema
- This PR modifies application configuration/environment variables
Motivation and Context
Closes #8332
How did you test it?
Executed:
cargo run -p openapi --features v1and verified
openapi_spec_v1.jsongeneratedHow the version dropdown looks like:
Checklist
- I formatted the code
cargo +nightly fmt --all - I addressed lints thrown by
Assistant
I need to understand the task better. The issue is about adding an API version selection dropdown in the API Reference documentation. Let me first explore the repository structure to understand where the API reference and OpenAPI specs are located.
Assistant
Let me explore the repository structure to understand where the API reference and OpenAPI specifications are located.
Assistant
(no content)
Assistant
Let me look at the current API reference documentation files to understand how it's structured:
Assistant
Let me also check the v2 API reference files:
Assistant
Let me look at the docs.json file to understand the current documentation structure:
Assistant
Now I need to check the Mintlify configuration to understand how to add version selection. Let me also examine the v2 docs.json to compare:
Assistant
Now let me check if there are any references to version selection in the current documentation structure. Let me also examine how Mintlify handles versioning:
Assistant
Let me update my todo list with more specific tasks for implementing the version selection dropdown:
Assistant
Let me examine the Mintlify documentation to understand how versioning works. I'll first update the current docs.json to add version selection, which is the main requirement. Based on my understanding, I need to modify the main documentation configuration to enable version switching between v1 and v2 APIs.
Looking at the current docs.json structure, I need to make changes to support version selection. From the Mintlify documentation pattern, versioning typically involves adding versioning configuration to the docs.json file.
Let me first read more about the current API reference structure:
Assistant
Let me also check what version of Mintlify is being used and see if there are any existing examples of versioning in the project:
Assistant
Based on the issue description and my understanding of the repository structure, I need to implement a version selection dropdown in the API Reference documentation that allows users to switch between v1 and v2 APIs.
Looking at the current setup:
- The main API reference is in
api-reference/directory withdocs.json - The v2 API reference is in
api-reference-v2/directory withmint.json - Both have their respective OpenAPI specs
The approach I'll take is to modify the main
docs.jsonin theapi-referencedirectory to add version selection capability by updating the API configuration section to include both v1 and v2 specs.Let me make the necessary changes:
- The main API reference is in
Assistant
I need to first read the file to understand its exact structure before editing:
Other models, same or similar prompt
Responses were produced in different, uncontrolled contexts (system prompts, settings, prior turns). This is not a benchmark.