Skip to content

Document: Add JSON format support - #993

Merged
vprashrex merged 2 commits into
mainfrom
chore/knoweldge-base-json
Jul 1, 2026
Merged

Document: Add JSON format support#993
vprashrex merged 2 commits into
mainfrom
chore/knoweldge-base-json

Conversation

@vprashrex

@vprashrexvprashrex commented Jul 1, 2026

Copy link
Copy Markdown
Collaborator

Issue

Closes#986

Summary

  • Previously Document doesn't support json format upload
  • Added JSON format mapping to EXTENSION_TO_FORMAT and FORMAT_TO_EXTENSION, so to support .json upload in document.

Checklist

Before submitting a pull request, please ensure that you mark these task.

  • Ran fastapi run --reload app/main.py or docker compose up in the repository root and test.
  • If you've fixed a bug or added code that is tested and has test cases.

@coderabbitai

coderabbitaiBot commented Jul 1, 2026

Copy link
Copy Markdown

Review Change Stack

📝 Walkthrough

Walkthrough

Two dictionary entries were added to the doctransform registry module, mapping the ".json" extension to the "json" format and vice versa, enabling the registry to recognize JSON files without raising an error.

Changes

JSON Format Registration

Layer / File(s)Summary
Add JSON extension/format mappings
backend/app/services/doctransform/registry.py
Adds .json"json" bidirectional entries to EXTENSION_TO_FORMAT and FORMAT_TO_EXTENSION, allowing .json files to be recognized without raising ValueError.

Estimated code review effort: 1 (Trivial) | ~2 minutes

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check nameStatusExplanation
Linked Issues check✅ PassedThe registry now recognizes .json files, which should stop JSON upload failures as requested in #986.
Out of Scope Changes check✅ PassedThe PR only adds JSON extension/format mappings and does not introduce unrelated changes.
Docstring Coverage✅ PassedNo functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Title check✅ PassedThe title clearly matches the main change: adding JSON format support for document uploads.
Description Check✅ PassedCheck skipped - CodeRabbit’s high-level summary is enabled.
✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch chore/knoweldge-base-json

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@github-actions

github-actionsBot commented Jul 1, 2026

Copy link
Copy Markdown

OpenAPI changes ⚪ No API surface changes

Note

This PR does not modify the API contract.

main58df4427 · generated by oasdiff

@vprashrexvprashrex changed the title chore(document): Add JSON format mapping to EXTENSION_TO_FORMAT and FORMAT_TO_EXTENSIONDocument: Add JSON format supportJul 1, 2026
@codecov

codecovBot commented Jul 1, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

@vprashrex
vprashrex merged commit 691914f into mainJul 1, 2026
4 checks passed
@vprashrex
vprashrex deleted the chore/knoweldge-base-json branch July 1, 2026 08:41
@github-actions

Copy link
Copy Markdown

🎉 This PR is included in version 1.2.2-main.1 🎉

The release is available on GitHub release

Your semantic-release bot 📦🚀

Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Kaapi: Enable .json file uploads

2 participants

@vprashrex@Ayush8923