I'm running the API Platform schema type-generator, but struggling with a type that is defined in schema.org, but has no properties of its own (http://schema.org/Duration).
When I run vendor/bin/schema generate-types, I get
[error] The property "potentialAction" (type "Duration") has an unknown type. Add its type to the config file.
[warning] The property "identifier" (type "Duration") has several types. Using the first one ("URL") or possible options("URL", "Text").
My types config is:
types:
Thing:
properties:
name: ~
Duration: ~
Recipe:
properties:
cookTime: ~
recipeCuisine: ~
If I define one of the properties Duration inherits from a parent (Eg Thing->Name) it generates OK, but I'm not sure how to then set a duration property (presumably text) on it. Perhaps I've mixed up how to use/define types that have no properties of their own - is there a way of telling the schema 'This is just a single text value'?