cognee/cognee
hajdul88 622f8fa79e
chore: introduces 1 file upload in ontology endpoint (#1899)
<!-- .github/pull_request_template.md -->

## Description
This PR fixes the ontology upload endpoint by forcing 1 file upload at
the time. Tests are adjusted in both server start and ontology endpoint
unit test. API was tested.

Do not merge it together with
https://github.com/topoteretes/cognee/pull/1898 its either that or this
one.



## Type of Change
<!-- Please check the relevant option -->
- [x] Bug fix (non-breaking change that fixes an issue)
- [ ] New feature (non-breaking change that adds functionality)
- [ ] Breaking change (fix or feature that would cause existing
functionality to change)
- [ ] Documentation update
- [ ] Code refactoring
- [ ] Performance improvement
- [ ] Other (please specify):

## Screenshots/Videos (if applicable)
<!-- Add screenshots or videos to help explain your changes -->

## Pre-submission Checklist
<!-- Please check all boxes that apply before submitting your PR -->
- [x] **I have tested my changes thoroughly before submitting this PR**
- [x] **This PR contains minimal changes necessary to address the
issue/feature**
- [x] My code follows the project's coding standards and style
guidelines
- [x] I have added tests that prove my fix is effective or that my
feature works
- [x] I have added necessary documentation (if applicable)
- [x] All new and existing tests pass
- [x] I have searched existing PRs to ensure this change hasn't been
submitted already
- [x] I have linked any relevant issues in the description
- [x] My commits have clear and descriptive messages

## DCO Affirmation
I affirm that all code in every commit of this pull request conforms to
the terms of the Topoteretes Developer Certificate of Origin.


<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
## Summary by CodeRabbit

* **API Changes**
* Ontology upload now accepts exactly one file per request; field
renamed from "descriptions" to "description" and validated as a plain
string.
* Stricter form validation and tighter 400/500 error handling for
malformed submissions.

* **Tests**
* Tests converted to real HTTP-style interactions using a shared test
client and dependency overrides.
* Payloads now use plain string fields; added coverage for single-file
constraints and specific error responses.

* **Style**
  * Minor formatting cleanups with no functional impact.

<sub>✏️ Tip: You can customize this high-level summary in your review
settings.</sub>
<!-- end of auto-generated comment: release notes by coderabbit.ai -->
2025-12-15 18:30:35 +01:00
..
api chore: introduces 1 file upload in ontology endpoint (#1899) 2025-12-15 18:30:35 +01:00
cli feat: csv ingestion loader & chunk 2025-10-22 16:56:46 +08:00
eval_framework Merge branch 'main' into merge-main-vol7 2025-12-11 19:11:24 +01:00
exceptions Update deprecated Exception status codes 2025-10-22 17:38:41 +01:00
infrastructure feat: Add database deletion on dataset delete (#1893) 2025-12-15 18:15:48 +01:00
memify_pipelines feature: adds triplet embedding via memify (#1832) 2025-12-02 18:27:08 +01:00
modules feat: Add database deletion on dataset delete (#1893) 2025-12-15 18:15:48 +01:00
shared feat: add dataset database handler logic and neo4j/lancedb/kuzu handlers (#1776) 2025-12-11 14:15:20 +01:00
tasks merge dev 2025-12-15 17:06:20 +01:00
tests chore: introduces 1 file upload in ontology endpoint (#1899) 2025-12-15 18:30:35 +01:00
__init__.py feat: Add initial custom pipeline (#1716) 2025-11-04 17:58:34 +01:00
__main__.py
base_config.py Merge branch 'dev' into fix_issue_with_base_config 2025-10-29 11:42:25 +01:00
context_global_variables.py fix: Resolve DB caching issues when deleting databases 2025-12-03 18:05:47 +01:00
get_token.py
low_level.py
pipelines.py
root_dir.py fix: Add S3 URL handling in ensure_absolute_path function (#1438) 2025-09-18 11:47:34 +02:00
version.py