Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

/collections/{collection_id}/items POST requires id? #4

Open
p2004a opened this issue Nov 24, 2024 · 2 comments
Open

/collections/{collection_id}/items POST requires id? #4

p2004a opened this issue Nov 24, 2024 · 2 comments

Comments

@p2004a
Copy link

p2004a commented Nov 24, 2024

The id field is marked as required for the /collections/{collection_id}/items POST, but even the example in the schema definition doesn't have the id set, an my understanding is that id is assigned by WebFlow, not user.

That again has implications for the webflow js library.

@zplata
Copy link

zplata commented Nov 25, 2024

Hey @p2004a - thanks for raising. While the schema has id marked as required here, the property should have a readOnly attribute so that it isn't required on creation, and the latest version of the SDK should reflect this. Are you seeing otherwise?

@p2004a
Copy link
Author

p2004a commented Nov 25, 2024

You are totally right @zplata! I've missed the readOnly attribute. So it looks like it's a bug on the js SDK side and not spec as createItem takes CollectionItem that is fully shared between read and write paths, requiring (and allowing) the same fields.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants