Hi, i wonder what are the difference between update and sync schema? Trying to build or own cli with the api and as far as i can see update schema doesn’t do anything? Not really sure what happens when you sync a schema either…
Lets say i have two apps (local and dev) both contains the same schemas, fields and content. Now imagine im working on my local environment, i add a few fields in one of the schemas. Naturally i would like to update the schema with the same name on “dev” but when i do nothing happens, i get a 200 response but nothing got updated… If i instead do sync the content seem to disappear from dev.
If you take a look to the request sample you see that update only accepts a few properties: https://cloud.squidex.io/api/docs#operation/Schemas_PutSchema. Its basically this dialog:
The sync endpoint accepts a full schema definition and tries to make updates by removing or adding fields and so on. In your cli you probably want to use the sync endpoint.
Btw: It would be great if you could contribute to the CLI instead of writing your own.
Thank you for your fast reply as usual…
“Btw: It would be great if you could contribute to the CLI instead of writing your own.”
Unfortunately I don’t know any C# at all, i’m writing the cli in nodejs. Main reason to do it is to make it possible to sync/create more than one schema at a time.
Okay, I see. Good extension for the CLI as well.