Files
zeekay 0c2f028a8c Generate the Swift client, which this copy did not carry
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.
2026-08-23 10:04:41 -07:00

44 lines
1.5 KiB
Swift

//
// Middleware.swift
//
// Generated by openapi-generator
// https://openapi-generator.tech
//
import Foundation
public struct Middleware: Sendable, Codable, ParameterConvertible, Hashable {
/** Config is the transform's parameters: redirectScheme takes scheme (default https) and permanent (\"true\" ⇒ 301, else 302); stripPrefix REQUIRES prefixes (comma-separated, first match wins); addPrefix REQUIRES prefix; headers is a header→value map set on the response. */
public var config: [String: String]?
/** ID identifies the transform within the org: [A-Za-z0-9-_.], at most 128 chars. A create that omits it gets a generated one. Routes reference it by this id. */
public var id: String?
/** Type is the transform: redirectScheme, stripPrefix, addPrefix or headers. */
public var type: String?
public init(config: [String: String]? = nil, id: String? = nil, type: String? = nil) {
self.config = config
self.id = id
self.type = type
}
public enum CodingKeys: String, CodingKey, CaseIterable {
case config
case id
case type
}
// Encodable protocol methods
public func encode(to encoder: Encoder) throws {
var container = encoder.container(keyedBy: CodingKeys.self)
try container.encodeIfPresent(config, forKey: .config)
try container.encodeIfPresent(id, forKey: .id)
try container.encodeIfPresent(type, forKey: .type)
}
}
@available(iOS 13, tvOS 13, watchOS 6, macOS 10.15, *)
extension Middleware: Identifiable {}