fix(api): fix schema for Imports Create to support XLS/base64 library upload payload DEV-2189#7150
fix(api): fix schema for Imports Create to support XLS/base64 library upload payload DEV-2189#7150Guitlle wants to merge 3 commits into
Conversation
|
| 'base64Encoded': serializers.CharField(required=False, allow_blank=True, allow_null=True), | ||
| 'library': serializers.BooleanField(required=False, allow_null=True), | ||
| 'desired_type': serializers.CharField(required=False, allow_blank=True, allow_null=True), | ||
| 'totalFiles': serializers.IntegerField(required=False, allow_null=True), |
There was a problem hiding this comment.
Naming inconsistency: snake_case
desired_type among camelCase fields
All other fields in this serializer use camelCase (base64Encoded, assetUid, totalFiles), but desired_type remains in snake_case. This inconsistency is now surfaced in the OpenAPI spec and in the generated TypeScript model. The view reads it as request.POST.get('desired_type', None), so the wire name must match — but it's worth confirming whether the intended public API name should be desiredType (camelCase) and the view updated to match, or if the inconsistency is intentional.
There was a problem hiding this comment.
@noliveleger I think it'd be the other way around, we'd have to convert the camel case names to snake case because that's how we do it in the rest of the API fields. What do you think? Should we leave it as is?
🗒️ Checklist
#Support Docs Updates, if any<type>(<scope>)<!>: <title> DEV-1234Front endand/orBack endorworkflow📣 Summary
Fixed the ImportCreateRequestSerializer schema definition to include the missing fields
base64Encoded,library,desired_type,totalFiles. The OpenAPI and Orval output files were updated to reflect this change.