feat: implement proper API versioning strategy (/api/v1/) (#304)#369
Open
Harshithk951 wants to merge 5 commits into
Open
feat: implement proper API versioning strategy (/api/v1/) (#304)#369Harshithk951 wants to merge 5 commits into
Harshithk951 wants to merge 5 commits into
Conversation
Add comprehensive pytest coverage for the format_research_for_synthesis() helper function in synthesizer.py. Test cases: - test_correct_numbered_formatting: verifies sub-question numbering, source uppercasing, answer inclusion, and separator formatting - test_ignores_empty_answers: confirms entries with empty string or None answers are excluded from output - test_empty_input_list: validates empty list returns empty string - test_single_result: ensures no separator for single-item output - test_preserves_original_numbering: verifies skipped entries retain their original position numbers (not re-indexed) Uses unittest.mock.patch.dict to mock GROQ_API_KEY for CI-friendly execution without requiring a .env file. Closes viru0909-dev#286
- Add sanitizer.py with HTML stripping, prompt injection filtering, and URL validation - Harden LegalQuery Pydantic model with field validators for XSS and length checks - Sanitize user input before injecting into AI prompts (decomposer, synthesizer, deep research) - Add XssSanitizationFilter.java to escape HTML in all incoming JSON request bodies - Register XSS filter in SecurityConfig.java filter chain - Add 35 unit tests for sanitizer module (all passing) Closes viru0909-dev#309
…uery to retry wrapper
|
@Harshithk951 is attempting to deploy a commit to the CodeBlooded's projects Team on Vercel. A member of the Team first needs to authorize it. |
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
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.
Description
Fixes #304
This PR introduces a robust URI-based API versioning strategy to prevent breaking changes in the future, as discussed in the issue.
Changes Included
/api/v1) usingWebMvcConfigurerto automatically apply to all@RestControllers./apiprefix from all individual controller@RequestMappingannotations to maintain clean paths and avoid/api/v1/api/....src/services/api.js) and other direct API consumers to use the new/api/v1/endpoints.README.md.Testing Done
/api/v1base..github/workflows/deploy.ymlcompatibility (no changes needed as it triggers on push).