Skip to content

Update requests irredeemably result in a 422 validation error #51

@gaapt

Description

@gaapt

A simple request updating localized fields results in 422 errors.

The SDK forms payloads with wrongly formed fields insofar as it structures the updating property as null.

In the following example:

client = contentful_management.Client('TOKEN')
entry = client.entries('SpaceID').find('EntryID')
entry._fields['en-US']['name'] = 'test' 
entry.save()

The SDK generates a JSON payload with

 fields:    {   [-] 
         ...  
         null:  'test'
        }  

Instead of null, it should instead be generated name: 'test'. Because of this error, the Management API prompts a 422 Validation error.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions