mirror of
https://github.com/hanzoai/swift-sdk.git
synced 2026-10-30 18:20:19 +00:00
The forge tree held the package scaffolding and none of the generated sources — 2,435 files of APIs, Models and Infrastructure, including BaseAPI, were simply absent, so anything depending on this copy had a package that compiled to nothing usable. Generated from the current API document rather than reconciled with the other copy: a client is a function of the spec, so regenerating answers "which history wins" without anyone having to choose. .spec-lock records which document, so the next reader can tell.
81 lines
3.1 KiB
Swift
81 lines
3.1 KiB
Swift
//
|
|
// PublishKitIn.swift
|
|
//
|
|
// Generated by openapi-generator
|
|
// https://openapi-generator.tech
|
|
//
|
|
|
|
import Foundation
|
|
|
|
public struct PublishKitIn: Sendable, Codable, ParameterConvertible, Hashable {
|
|
|
|
/** Category groups the kit in the gallery browser. */
|
|
public var category: String?
|
|
/** Demo is the deployed site itself, when there is one. */
|
|
public var demo: String?
|
|
/** Description is the browse-card blurb, max 4096 characters. */
|
|
public var description: String?
|
|
/** Features are the highlights the card lists, at most 32. */
|
|
public var features: [String]?
|
|
/** Framework is the stack the kit is built on (\"Next.js 14\"). */
|
|
public var framework: String?
|
|
/** Preview is the still image the browse card renders, max 4096 characters. */
|
|
public var preview: String?
|
|
/** Slug is the kit's identity — lowercase alphanumeric with dashes, max 40. */
|
|
public var slug: String?
|
|
/** Source is the repository the kit is forked from, max 4096 characters. */
|
|
public var source: String?
|
|
/** Title is the display name. Required, max 200 characters. */
|
|
public var title: String?
|
|
/** UseCase is what the kit is for, in a phrase. */
|
|
public var useCase: String?
|
|
/** Variants are the shapes this kit ships in, at most 32; the fork picks one. */
|
|
public var variants: [Variant]?
|
|
|
|
public init(category: String? = nil, demo: String? = nil, description: String? = nil, features: [String]? = nil, framework: String? = nil, preview: String? = nil, slug: String? = nil, source: String? = nil, title: String? = nil, useCase: String? = nil, variants: [Variant]? = nil) {
|
|
self.category = category
|
|
self.demo = demo
|
|
self.description = description
|
|
self.features = features
|
|
self.framework = framework
|
|
self.preview = preview
|
|
self.slug = slug
|
|
self.source = source
|
|
self.title = title
|
|
self.useCase = useCase
|
|
self.variants = variants
|
|
}
|
|
|
|
public enum CodingKeys: String, CodingKey, CaseIterable {
|
|
case category
|
|
case demo
|
|
case description
|
|
case features
|
|
case framework
|
|
case preview
|
|
case slug
|
|
case source
|
|
case title
|
|
case useCase
|
|
case variants
|
|
}
|
|
|
|
// Encodable protocol methods
|
|
|
|
public func encode(to encoder: Encoder) throws {
|
|
var container = encoder.container(keyedBy: CodingKeys.self)
|
|
try container.encodeIfPresent(category, forKey: .category)
|
|
try container.encodeIfPresent(demo, forKey: .demo)
|
|
try container.encodeIfPresent(description, forKey: .description)
|
|
try container.encodeIfPresent(features, forKey: .features)
|
|
try container.encodeIfPresent(framework, forKey: .framework)
|
|
try container.encodeIfPresent(preview, forKey: .preview)
|
|
try container.encodeIfPresent(slug, forKey: .slug)
|
|
try container.encodeIfPresent(source, forKey: .source)
|
|
try container.encodeIfPresent(title, forKey: .title)
|
|
try container.encodeIfPresent(useCase, forKey: .useCase)
|
|
try container.encodeIfPresent(variants, forKey: .variants)
|
|
}
|
|
}
|
|
|