Squidex Client Library - Issue when updating a field type

I have…

  • [ X ] Checked the logs and have provided the logs if I found something suspicious there

I’m submitting a…

  • [ ] Regression (a behavior that stopped working in a new release)
  • [ ] Bug report
  • [ ] Performance issue
  • [ X ] Documentation issue or request

Current behavior

I’m trying to update a field through the client library that is set to an input type. We’re building a migration tool to migrate schemas and fields over to other apps.

This input type field has changed, so we have to update it inside of other apps. The problem is that I get this error when trying to update the field type:

"message": "Properties must be of type 'Squidex.Domain.Apps.Core.Schemas.StringFieldProperties\r\nParameter name: newProperties",

The code to do this update is:
await this.masterSchemasClient.PutFieldAsync(applicationName, schemaName, targetFieldId, updateDto);

The code works fine when it’s doing things like toggling off and on the required state. But when it comes to switching the type of input it breaks. Am I missing something here or is there another way to update the field type itself?

Environment

  • [ ] Self hosted with docker
  • [ X ] Self hosted with IIS
  • [ ] Self hosted with other version
  • [ ] Cloud version

Version: Latest

You cannot change field types. You have to delete and recreate it.

But there is a special Sync endpoint that can be used.

Here is how it implemented in the CLI: https://github.com/Squidex/squidex-samples/blob/master/cli/Squidex.CLI/Squidex.CLI/Commands/App_Schemas.cs#L84