contentful / contentful-management.js

JavaScript library for Contentful's Management API (node & browser)
https://contentful.github.io/contentful-management.js
MIT License
266 stars 98 forks source link

Bypass/relax field-validation on client.entry.publish(...) #2233

Open IPJT opened 5 months ago

IPJT commented 5 months ago

Hi,

I was just wondering if there is any way to relax/bypass field validation when publishing an entry using client.entry.publish(...)?

The App SDK has a skipUiValidation prop that can be set to true in the options object when running entry.publish(options): Promise<void> in order to bypass validation. I'm looking for something similar.

Also, I was wondering why I need to pass in the entry itself to the function. Why isn't the entryId enough?

await client.entry.publish(
  {
      spaceId: '<space_id>',
      environmentId: '<environment_id>',
      entryId: '<entry_id>',
  },
  { ...entry } //Why does it need this?
);

Thank you!