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
v2.yml, around line 16618:
required:
- id
- fieldData
- lastPublished
- lastUpdated
- createdOn
lastPublished:
type: string
format: date-string
readOnly: true
example: '2023-03-17T18:47:35.560Z'
description: The date the item was last published
Suggestion
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]
Summary
The Collection Item schema in
v2.ymldefineslastPublishedas a required, non-nullable string. In practice, the Webflow API returnsnullfor this field on unpublished items. It seems the schema should reflect this by marking the field as nullable.Location in the spec
v2.yml, around line 16618:Suggestion
Add
nullable: truetolastPublishedNote: The
customDomains[].lastPublishedproperty elsewhere in the spec already includesnullable: trueImpact
Code generators (e.g.
datamodel-codegen) produce a non-optionalstrfield from this schema, which causes validation errors when the API returnsnull: