feat: Knowledge write#4372
Conversation
|
Adding the "do-not-merge/release-note-label-needed" label because no release-note block was detected, please follow our release note process to remove it. DetailsInstructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. |
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: The full list of commands accepted by this bot can be found here. DetailsNeeds approval from an approver in each of these files:Approvers can indicate their approval by writing |
| meta = serializers.DictField(required=False) | ||
| paragraphs = ParagraphInstanceSerializer(required=False, many=True, allow_null=True) | ||
|
|
||
|
|
There was a problem hiding this comment.
There are no significant irregularities in the provided KnowledgeWriteParamSerializer code. However, there is an issue with how the field names are being set.
In Django REST Framework (DRF) Serializer fields defined using the standard DRF attributes like label, max_length, and min_length should be used directly without setting the source attribute if you don't intend to change their default value during serialization. In this case, it seems all these properties are intended to match the Python variable names (name), so using them directly or omitting source=_('document name') would make more sense.
Additionally, consider adding validators or additional metadata handling if needed beyond basic type validation and constraints.
feat: Knowledge write