-
Notifications
You must be signed in to change notification settings - Fork 3
Open
Description
Summary
The Collection Item schema in v2.yml defines lastPublished as a required, non-nullable string. In practice, the Webflow API returns null for this field on unpublished items. It seems the schema should reflect this by marking the field as nullable.
Location in the spec
required:
- id
- fieldData
- lastPublished
- lastUpdated
- createdOnlastPublished:
type: string
format: date-string
readOnly: true
example: '2023-03-17T18:47:35.560Z'
description: The date the item was last publishedSuggestion
Add nullable: true to lastPublished
Note: The customDomains[].lastPublished property elsewhere in the spec already includes nullable: true
Impact
Code generators (e.g. datamodel-codegen) produce a non-optional str field from this schema, which causes validation errors when the API returns null:
Input should be a valid string [type=string_type, input_value=None, input_type=NoneType]
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels