Skip to content

Commit 9274636

Browse files
Commit via running ake Sources/meta
1 parent c5849b3 commit 9274636

File tree

2 files changed

+57
-28
lines changed

2 files changed

+57
-28
lines changed

Sources/meta/Client.swift

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -42,15 +42,15 @@ public struct Client: APIProtocol {
4242
///
4343
/// Get Hypermedia links to resources accessible in GitHub's REST API
4444
///
45-
/// - Remark: HTTP `GET //`.
46-
/// - Remark: Generated from `#/paths////get(meta/root)`.
45+
/// - Remark: HTTP `GET /`.
46+
/// - Remark: Generated from `#/paths///get(meta/root)`.
4747
public func meta_sol_root(_ input: Operations.meta_sol_root.Input) async throws -> Operations.meta_sol_root.Output {
4848
try await client.send(
4949
input: input,
5050
forOperation: Operations.meta_sol_root.id,
5151
serializer: { input in
5252
let path = try converter.renderedPath(
53-
template: "//",
53+
template: "/",
5454
parameters: []
5555
)
5656
var request: HTTPTypes.HTTPRequest = .init(
@@ -358,16 +358,16 @@ public struct Client: APIProtocol {
358358
let chosenContentType = try converter.bestContentType(
359359
received: contentType,
360360
options: [
361-
"application/json"
361+
"text/plain"
362362
]
363363
)
364364
switch chosenContentType {
365-
case "application/json":
366-
body = try await converter.getResponseBodyAsJSON(
367-
Swift.String.self,
365+
case "text/plain":
366+
body = try converter.getResponseBodyAsBinary(
367+
OpenAPIRuntime.HTTPBody.self,
368368
from: responseBody,
369369
transforming: { value in
370-
.json(value)
370+
.plainText(value)
371371
}
372372
)
373373
default:

Sources/meta/Types.swift

Lines changed: 49 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,8 @@ public protocol APIProtocol: Sendable {
1515
///
1616
/// Get Hypermedia links to resources accessible in GitHub's REST API
1717
///
18-
/// - Remark: HTTP `GET //`.
19-
/// - Remark: Generated from `#/paths////get(meta/root)`.
18+
/// - Remark: HTTP `GET /`.
19+
/// - Remark: Generated from `#/paths///get(meta/root)`.
2020
func meta_sol_root(_ input: Operations.meta_sol_root.Input) async throws -> Operations.meta_sol_root.Output
2121
/// Get GitHub meta information
2222
///
@@ -61,8 +61,8 @@ extension APIProtocol {
6161
///
6262
/// Get Hypermedia links to resources accessible in GitHub's REST API
6363
///
64-
/// - Remark: HTTP `GET //`.
65-
/// - Remark: Generated from `#/paths////get(meta/root)`.
64+
/// - Remark: HTTP `GET /`.
65+
/// - Remark: Generated from `#/paths///get(meta/root)`.
6666
public func meta_sol_root(headers: Operations.meta_sol_root.Input.Headers = .init()) async throws -> Operations.meta_sol_root.Output {
6767
try await meta_sol_root(Operations.meta_sol_root.Input(headers: headers))
6868
}
@@ -461,6 +461,31 @@ public enum Components {
461461
public var packages: [Swift.String]?
462462
/// - Remark: Generated from `#/components/schemas/api-overview/domains/actions`.
463463
public var actions: [Swift.String]?
464+
/// - Remark: Generated from `#/components/schemas/api-overview/domains/actions_inbound`.
465+
public struct actions_inboundPayload: Codable, Hashable, Sendable {
466+
/// - Remark: Generated from `#/components/schemas/api-overview/domains/actions_inbound/full_domains`.
467+
public var full_domains: [Swift.String]?
468+
/// - Remark: Generated from `#/components/schemas/api-overview/domains/actions_inbound/wildcard_domains`.
469+
public var wildcard_domains: [Swift.String]?
470+
/// Creates a new `actions_inboundPayload`.
471+
///
472+
/// - Parameters:
473+
/// - full_domains:
474+
/// - wildcard_domains:
475+
public init(
476+
full_domains: [Swift.String]? = nil,
477+
wildcard_domains: [Swift.String]? = nil
478+
) {
479+
self.full_domains = full_domains
480+
self.wildcard_domains = wildcard_domains
481+
}
482+
public enum CodingKeys: String, CodingKey {
483+
case full_domains
484+
case wildcard_domains
485+
}
486+
}
487+
/// - Remark: Generated from `#/components/schemas/api-overview/domains/actions_inbound`.
488+
public var actions_inbound: Components.Schemas.api_hyphen_overview.domainsPayload.actions_inboundPayload?
464489
/// - Remark: Generated from `#/components/schemas/api-overview/domains/artifact_attestations`.
465490
public struct artifact_attestationsPayload: Codable, Hashable, Sendable {
466491
/// - Remark: Generated from `#/components/schemas/api-overview/domains/artifact_attestations/trust_domain`.
@@ -494,20 +519,23 @@ public enum Components {
494519
/// - copilot:
495520
/// - packages:
496521
/// - actions:
522+
/// - actions_inbound:
497523
/// - artifact_attestations:
498524
public init(
499525
website: [Swift.String]? = nil,
500526
codespaces: [Swift.String]? = nil,
501527
copilot: [Swift.String]? = nil,
502528
packages: [Swift.String]? = nil,
503529
actions: [Swift.String]? = nil,
530+
actions_inbound: Components.Schemas.api_hyphen_overview.domainsPayload.actions_inboundPayload? = nil,
504531
artifact_attestations: Components.Schemas.api_hyphen_overview.domainsPayload.artifact_attestationsPayload? = nil
505532
) {
506533
self.website = website
507534
self.codespaces = codespaces
508535
self.copilot = copilot
509536
self.packages = packages
510537
self.actions = actions
538+
self.actions_inbound = actions_inbound
511539
self.artifact_attestations = artifact_attestations
512540
}
513541
public enum CodingKeys: String, CodingKey {
@@ -516,6 +544,7 @@ public enum Components {
516544
case copilot
517545
case packages
518546
case actions
547+
case actions_inbound
519548
case artifact_attestations
520549
}
521550
}
@@ -648,8 +677,8 @@ public enum Operations {
648677
///
649678
/// Get Hypermedia links to resources accessible in GitHub's REST API
650679
///
651-
/// - Remark: HTTP `GET //`.
652-
/// - Remark: Generated from `#/paths////get(meta/root)`.
680+
/// - Remark: HTTP `GET /`.
681+
/// - Remark: Generated from `#/paths///get(meta/root)`.
653682
public enum meta_sol_root {
654683
public static let id: Swift.String = "meta/root"
655684
public struct Input: Sendable, Hashable {
@@ -704,7 +733,7 @@ public enum Operations {
704733
}
705734
/// Response
706735
///
707-
/// - Remark: Generated from `#/paths////get(meta/root)/responses/200`.
736+
/// - Remark: Generated from `#/paths///get(meta/root)/responses/200`.
708737
///
709738
/// HTTP response code: `200 ok`.
710739
case ok(Operations.meta_sol_root.Output.Ok)
@@ -1198,16 +1227,16 @@ public enum Operations {
11981227
public struct Ok: Sendable, Hashable {
11991228
/// - Remark: Generated from `#/paths/zen/GET/responses/200/content`.
12001229
@frozen public enum Body: Sendable, Hashable {
1201-
/// - Remark: Generated from `#/paths/zen/GET/responses/200/content/application\/json`.
1202-
case json(Swift.String)
1203-
/// The associated value of the enum case if `self` is `.json`.
1230+
/// - Remark: Generated from `#/paths/zen/GET/responses/200/content/text\/plain`.
1231+
case plainText(OpenAPIRuntime.HTTPBody)
1232+
/// The associated value of the enum case if `self` is `.plainText`.
12041233
///
1205-
/// - Throws: An error if `self` is not `.json`.
1206-
/// - SeeAlso: `.json`.
1207-
public var json: Swift.String {
1234+
/// - Throws: An error if `self` is not `.plainText`.
1235+
/// - SeeAlso: `.plainText`.
1236+
public var plainText: OpenAPIRuntime.HTTPBody {
12081237
get throws {
12091238
switch self {
1210-
case let .json(body):
1239+
case let .plainText(body):
12111240
return body
12121241
}
12131242
}
@@ -1252,12 +1281,12 @@ public enum Operations {
12521281
case undocumented(statusCode: Swift.Int, OpenAPIRuntime.UndocumentedPayload)
12531282
}
12541283
@frozen public enum AcceptableContentType: AcceptableProtocol {
1255-
case json
1284+
case plainText
12561285
case other(Swift.String)
12571286
public init?(rawValue: Swift.String) {
12581287
switch rawValue.lowercased() {
1259-
case "application/json":
1260-
self = .json
1288+
case "text/plain":
1289+
self = .plainText
12611290
default:
12621291
self = .other(rawValue)
12631292
}
@@ -1266,13 +1295,13 @@ public enum Operations {
12661295
switch self {
12671296
case let .other(string):
12681297
return string
1269-
case .json:
1270-
return "application/json"
1298+
case .plainText:
1299+
return "text/plain"
12711300
}
12721301
}
12731302
public static var allCases: [Self] {
12741303
[
1275-
.json
1304+
.plainText
12761305
]
12771306
}
12781307
}

0 commit comments

Comments
 (0)