module BookshelfTemplate import "pkl:json" typealias Author = String | Listing typealias Format = "Hardcover" | "Paperback" typealias Categories = Listing class Book { isbn: String title: String author: Author afterword: String? publisher: String published: UInt16 subTitle: String? imprint: String? series: String? seriesNumber: UInt8? subSeries: String? subSeriesNumber: UInt8? yearReadOn: UInt16? pages: UInt16? edition: String? format: Format? categories: Categories? genre: String? } books: Listing output { renderer = new JsonRenderer { omitNullProperties = true } }