Merged
Conversation
Implement a complete mock server for testing 3Commas API integrations. The implementation follows the specification in mock_spec.md and uses oapi-codegen to generate types from the OpenAPI spec. Features: - 3 core API endpoints: ListBots, ListDeals, GetDeal - Rich bot event structure with action, coin, type, status, price, etc. - Thread-safe state management for bots and deals - Error simulation (rate limiting, 404s, custom errors) - Comprehensive test coverage - Usage examples and documentation Implementation details: - Uses oapi-codegen with include-operation-ids to generate only required endpoints - Custom types that override generated ones for richer testing capabilities - httptest-based server for easy integration testing - State management methods: AddBot, AddDeal, AddBotEvent, etc. All tests pass successfully.
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.
Implement a complete mock server for testing 3Commas API integrations. The implementation follows the specification in mock_spec.md and uses oapi-codegen to generate types from the OpenAPI spec.
Features:
Implementation details:
All tests pass successfully.