Skip to content

Commit 695472c

Browse files
committed
Commit via running ake Sources/gitignore
1 parent 7da2c01 commit 695472c

File tree

2 files changed

+71
-46
lines changed

2 files changed

+71
-46
lines changed

Sources/gitignore/Client.swift

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -44,10 +44,10 @@ public struct Client: APIProtocol {
4444
///
4545
/// - Remark: HTTP `GET /gitignore/templates`.
4646
/// - Remark: Generated from `#/paths//gitignore/templates/get(gitignore/get-all-templates)`.
47-
public func gitignore_sol_get_hyphen_all_hyphen_templates(_ input: Operations.gitignore_sol_get_hyphen_all_hyphen_templates.Input) async throws -> Operations.gitignore_sol_get_hyphen_all_hyphen_templates.Output {
47+
public func gitignoreGetAllTemplates(_ input: Operations.GitignoreGetAllTemplates.Input) async throws -> Operations.GitignoreGetAllTemplates.Output {
4848
try await client.send(
4949
input: input,
50-
forOperation: Operations.gitignore_sol_get_hyphen_all_hyphen_templates.id,
50+
forOperation: Operations.GitignoreGetAllTemplates.id,
5151
serializer: { input in
5252
let path = try converter.renderedPath(
5353
template: "/gitignore/templates",
@@ -68,7 +68,7 @@ public struct Client: APIProtocol {
6868
switch response.status.code {
6969
case 200:
7070
let contentType = converter.extractContentTypeIfPresent(in: response.headerFields)
71-
let body: Operations.gitignore_sol_get_hyphen_all_hyphen_templates.Output.Ok.Body
71+
let body: Operations.GitignoreGetAllTemplates.Output.Ok.Body
7272
let chosenContentType = try converter.bestContentType(
7373
received: contentType,
7474
options: [
@@ -112,10 +112,10 @@ public struct Client: APIProtocol {
112112
///
113113
/// - Remark: HTTP `GET /gitignore/templates/{name}`.
114114
/// - Remark: Generated from `#/paths//gitignore/templates/{name}/get(gitignore/get-template)`.
115-
public func gitignore_sol_get_hyphen_template(_ input: Operations.gitignore_sol_get_hyphen_template.Input) async throws -> Operations.gitignore_sol_get_hyphen_template.Output {
115+
public func gitignoreGetTemplate(_ input: Operations.GitignoreGetTemplate.Input) async throws -> Operations.GitignoreGetTemplate.Output {
116116
try await client.send(
117117
input: input,
118-
forOperation: Operations.gitignore_sol_get_hyphen_template.id,
118+
forOperation: Operations.GitignoreGetTemplate.id,
119119
serializer: { input in
120120
let path = try converter.renderedPath(
121121
template: "/gitignore/templates/{}",
@@ -138,7 +138,7 @@ public struct Client: APIProtocol {
138138
switch response.status.code {
139139
case 200:
140140
let contentType = converter.extractContentTypeIfPresent(in: response.headerFields)
141-
let body: Operations.gitignore_sol_get_hyphen_template.Output.Ok.Body
141+
let body: Operations.GitignoreGetTemplate.Output.Ok.Body
142142
let chosenContentType = try converter.bestContentType(
143143
received: contentType,
144144
options: [
@@ -148,7 +148,7 @@ public struct Client: APIProtocol {
148148
switch chosenContentType {
149149
case "application/json":
150150
body = try await converter.getResponseBodyAsJSON(
151-
Components.Schemas.gitignore_hyphen_template.self,
151+
Components.Schemas.GitignoreTemplate.self,
152152
from: responseBody,
153153
transforming: { value in
154154
.json(value)

Sources/gitignore/Types.swift

Lines changed: 64 additions & 39 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ public protocol APIProtocol: Sendable {
1717
///
1818
/// - Remark: HTTP `GET /gitignore/templates`.
1919
/// - Remark: Generated from `#/paths//gitignore/templates/get(gitignore/get-all-templates)`.
20-
func gitignore_sol_get_hyphen_all_hyphen_templates(_ input: Operations.gitignore_sol_get_hyphen_all_hyphen_templates.Input) async throws -> Operations.gitignore_sol_get_hyphen_all_hyphen_templates.Output
20+
func gitignoreGetAllTemplates(_ input: Operations.GitignoreGetAllTemplates.Input) async throws -> Operations.GitignoreGetAllTemplates.Output
2121
/// Get a gitignore template
2222
///
2323
/// Get the content of a gitignore template.
@@ -28,7 +28,7 @@ public protocol APIProtocol: Sendable {
2828
///
2929
/// - Remark: HTTP `GET /gitignore/templates/{name}`.
3030
/// - Remark: Generated from `#/paths//gitignore/templates/{name}/get(gitignore/get-template)`.
31-
func gitignore_sol_get_hyphen_template(_ input: Operations.gitignore_sol_get_hyphen_template.Input) async throws -> Operations.gitignore_sol_get_hyphen_template.Output
31+
func gitignoreGetTemplate(_ input: Operations.GitignoreGetTemplate.Input) async throws -> Operations.GitignoreGetTemplate.Output
3232
}
3333

3434
/// Convenience overloads for operation inputs.
@@ -39,8 +39,8 @@ extension APIProtocol {
3939
///
4040
/// - Remark: HTTP `GET /gitignore/templates`.
4141
/// - Remark: Generated from `#/paths//gitignore/templates/get(gitignore/get-all-templates)`.
42-
public func gitignore_sol_get_hyphen_all_hyphen_templates(headers: Operations.gitignore_sol_get_hyphen_all_hyphen_templates.Input.Headers = .init()) async throws -> Operations.gitignore_sol_get_hyphen_all_hyphen_templates.Output {
43-
try await gitignore_sol_get_hyphen_all_hyphen_templates(Operations.gitignore_sol_get_hyphen_all_hyphen_templates.Input(headers: headers))
42+
public func gitignoreGetAllTemplates(headers: Operations.GitignoreGetAllTemplates.Input.Headers = .init()) async throws -> Operations.GitignoreGetAllTemplates.Output {
43+
try await gitignoreGetAllTemplates(Operations.GitignoreGetAllTemplates.Input(headers: headers))
4444
}
4545
/// Get a gitignore template
4646
///
@@ -52,11 +52,11 @@ extension APIProtocol {
5252
///
5353
/// - Remark: HTTP `GET /gitignore/templates/{name}`.
5454
/// - Remark: Generated from `#/paths//gitignore/templates/{name}/get(gitignore/get-template)`.
55-
public func gitignore_sol_get_hyphen_template(
56-
path: Operations.gitignore_sol_get_hyphen_template.Input.Path,
57-
headers: Operations.gitignore_sol_get_hyphen_template.Input.Headers = .init()
58-
) async throws -> Operations.gitignore_sol_get_hyphen_template.Output {
59-
try await gitignore_sol_get_hyphen_template(Operations.gitignore_sol_get_hyphen_template.Input(
55+
public func gitignoreGetTemplate(
56+
path: Operations.GitignoreGetTemplate.Input.Path,
57+
headers: Operations.GitignoreGetTemplate.Input.Headers = .init()
58+
) async throws -> Operations.GitignoreGetTemplate.Output {
59+
try await gitignoreGetTemplate(Operations.GitignoreGetTemplate.Input(
6060
path: path,
6161
headers: headers
6262
))
@@ -65,6 +65,15 @@ extension APIProtocol {
6565

6666
/// Server URLs defined in the OpenAPI document.
6767
public enum Servers {
68+
public enum Server1 {
69+
public static func url() throws -> Foundation.URL {
70+
try Foundation.URL(
71+
validatingOpenAPIServerURL: "https://api.github.com",
72+
variables: []
73+
)
74+
}
75+
}
76+
@available(*, deprecated, renamed: "Servers.Server1.url")
6877
public static func server1() throws -> Foundation.URL {
6978
try Foundation.URL(
7079
validatingOpenAPIServerURL: "https://api.github.com",
@@ -80,12 +89,12 @@ public enum Components {
8089
/// Gitignore Template
8190
///
8291
/// - Remark: Generated from `#/components/schemas/gitignore-template`.
83-
public struct gitignore_hyphen_template: Codable, Hashable, Sendable {
92+
public struct GitignoreTemplate: Codable, Hashable, Sendable {
8493
/// - Remark: Generated from `#/components/schemas/gitignore-template/name`.
8594
public var name: Swift.String
8695
/// - Remark: Generated from `#/components/schemas/gitignore-template/source`.
8796
public var source: Swift.String
88-
/// Creates a new `gitignore_hyphen_template`.
97+
/// Creates a new `GitignoreTemplate`.
8998
///
9099
/// - Parameters:
91100
/// - name:
@@ -109,8 +118,8 @@ public enum Components {
109118
public enum RequestBodies {}
110119
/// Types generated from the `#/components/responses` section of the OpenAPI document.
111120
public enum Responses {
112-
public struct not_modified: Sendable, Hashable {
113-
/// Creates a new `not_modified`.
121+
public struct NotModified: Sendable, Hashable {
122+
/// Creates a new `NotModified`.
114123
public init() {}
115124
}
116125
}
@@ -126,26 +135,26 @@ public enum Operations {
126135
///
127136
/// - Remark: HTTP `GET /gitignore/templates`.
128137
/// - Remark: Generated from `#/paths//gitignore/templates/get(gitignore/get-all-templates)`.
129-
public enum gitignore_sol_get_hyphen_all_hyphen_templates {
138+
public enum GitignoreGetAllTemplates {
130139
public static let id: Swift.String = "gitignore/get-all-templates"
131140
public struct Input: Sendable, Hashable {
132141
/// - Remark: Generated from `#/paths/gitignore/templates/GET/header`.
133142
public struct Headers: Sendable, Hashable {
134-
public var accept: [OpenAPIRuntime.AcceptHeaderContentType<Operations.gitignore_sol_get_hyphen_all_hyphen_templates.AcceptableContentType>]
143+
public var accept: [OpenAPIRuntime.AcceptHeaderContentType<Operations.GitignoreGetAllTemplates.AcceptableContentType>]
135144
/// Creates a new `Headers`.
136145
///
137146
/// - Parameters:
138147
/// - accept:
139-
public init(accept: [OpenAPIRuntime.AcceptHeaderContentType<Operations.gitignore_sol_get_hyphen_all_hyphen_templates.AcceptableContentType>] = .defaultValues()) {
148+
public init(accept: [OpenAPIRuntime.AcceptHeaderContentType<Operations.GitignoreGetAllTemplates.AcceptableContentType>] = .defaultValues()) {
140149
self.accept = accept
141150
}
142151
}
143-
public var headers: Operations.gitignore_sol_get_hyphen_all_hyphen_templates.Input.Headers
152+
public var headers: Operations.GitignoreGetAllTemplates.Input.Headers
144153
/// Creates a new `Input`.
145154
///
146155
/// - Parameters:
147156
/// - headers:
148-
public init(headers: Operations.gitignore_sol_get_hyphen_all_hyphen_templates.Input.Headers = .init()) {
157+
public init(headers: Operations.GitignoreGetAllTemplates.Input.Headers = .init()) {
149158
self.headers = headers
150159
}
151160
}
@@ -169,12 +178,12 @@ public enum Operations {
169178
}
170179
}
171180
/// Received HTTP response body
172-
public var body: Operations.gitignore_sol_get_hyphen_all_hyphen_templates.Output.Ok.Body
181+
public var body: Operations.GitignoreGetAllTemplates.Output.Ok.Body
173182
/// Creates a new `Ok`.
174183
///
175184
/// - Parameters:
176185
/// - body: Received HTTP response body
177-
public init(body: Operations.gitignore_sol_get_hyphen_all_hyphen_templates.Output.Ok.Body) {
186+
public init(body: Operations.GitignoreGetAllTemplates.Output.Ok.Body) {
178187
self.body = body
179188
}
180189
}
@@ -183,12 +192,12 @@ public enum Operations {
183192
/// - Remark: Generated from `#/paths//gitignore/templates/get(gitignore/get-all-templates)/responses/200`.
184193
///
185194
/// HTTP response code: `200 ok`.
186-
case ok(Operations.gitignore_sol_get_hyphen_all_hyphen_templates.Output.Ok)
195+
case ok(Operations.GitignoreGetAllTemplates.Output.Ok)
187196
/// The associated value of the enum case if `self` is `.ok`.
188197
///
189198
/// - Throws: An error if `self` is not `.ok`.
190199
/// - SeeAlso: `.ok`.
191-
public var ok: Operations.gitignore_sol_get_hyphen_all_hyphen_templates.Output.Ok {
200+
public var ok: Operations.GitignoreGetAllTemplates.Output.Ok {
192201
get throws {
193202
switch self {
194203
case let .ok(response):
@@ -206,12 +215,20 @@ public enum Operations {
206215
/// - Remark: Generated from `#/paths//gitignore/templates/get(gitignore/get-all-templates)/responses/304`.
207216
///
208217
/// HTTP response code: `304 notModified`.
209-
case notModified(Components.Responses.not_modified)
218+
case notModified(Components.Responses.NotModified)
219+
/// Not modified
220+
///
221+
/// - Remark: Generated from `#/paths//gitignore/templates/get(gitignore/get-all-templates)/responses/304`.
222+
///
223+
/// HTTP response code: `304 notModified`.
224+
public static var notModified: Self {
225+
.notModified(.init())
226+
}
210227
/// The associated value of the enum case if `self` is `.notModified`.
211228
///
212229
/// - Throws: An error if `self` is not `.notModified`.
213230
/// - SeeAlso: `.notModified`.
214-
public var notModified: Components.Responses.not_modified {
231+
public var notModified: Components.Responses.NotModified {
215232
get throws {
216233
switch self {
217234
case let .notModified(response):
@@ -265,7 +282,7 @@ public enum Operations {
265282
///
266283
/// - Remark: HTTP `GET /gitignore/templates/{name}`.
267284
/// - Remark: Generated from `#/paths//gitignore/templates/{name}/get(gitignore/get-template)`.
268-
public enum gitignore_sol_get_hyphen_template {
285+
public enum GitignoreGetTemplate {
269286
public static let id: Swift.String = "gitignore/get-template"
270287
public struct Input: Sendable, Hashable {
271288
/// - Remark: Generated from `#/paths/gitignore/templates/{name}/GET/path`.
@@ -280,27 +297,27 @@ public enum Operations {
280297
self.name = name
281298
}
282299
}
283-
public var path: Operations.gitignore_sol_get_hyphen_template.Input.Path
300+
public var path: Operations.GitignoreGetTemplate.Input.Path
284301
/// - Remark: Generated from `#/paths/gitignore/templates/{name}/GET/header`.
285302
public struct Headers: Sendable, Hashable {
286-
public var accept: [OpenAPIRuntime.AcceptHeaderContentType<Operations.gitignore_sol_get_hyphen_template.AcceptableContentType>]
303+
public var accept: [OpenAPIRuntime.AcceptHeaderContentType<Operations.GitignoreGetTemplate.AcceptableContentType>]
287304
/// Creates a new `Headers`.
288305
///
289306
/// - Parameters:
290307
/// - accept:
291-
public init(accept: [OpenAPIRuntime.AcceptHeaderContentType<Operations.gitignore_sol_get_hyphen_template.AcceptableContentType>] = .defaultValues()) {
308+
public init(accept: [OpenAPIRuntime.AcceptHeaderContentType<Operations.GitignoreGetTemplate.AcceptableContentType>] = .defaultValues()) {
292309
self.accept = accept
293310
}
294311
}
295-
public var headers: Operations.gitignore_sol_get_hyphen_template.Input.Headers
312+
public var headers: Operations.GitignoreGetTemplate.Input.Headers
296313
/// Creates a new `Input`.
297314
///
298315
/// - Parameters:
299316
/// - path:
300317
/// - headers:
301318
public init(
302-
path: Operations.gitignore_sol_get_hyphen_template.Input.Path,
303-
headers: Operations.gitignore_sol_get_hyphen_template.Input.Headers = .init()
319+
path: Operations.GitignoreGetTemplate.Input.Path,
320+
headers: Operations.GitignoreGetTemplate.Input.Headers = .init()
304321
) {
305322
self.path = path
306323
self.headers = headers
@@ -311,12 +328,12 @@ public enum Operations {
311328
/// - Remark: Generated from `#/paths/gitignore/templates/{name}/GET/responses/200/content`.
312329
@frozen public enum Body: Sendable, Hashable {
313330
/// - Remark: Generated from `#/paths/gitignore/templates/{name}/GET/responses/200/content/application\/json`.
314-
case json(Components.Schemas.gitignore_hyphen_template)
331+
case json(Components.Schemas.GitignoreTemplate)
315332
/// The associated value of the enum case if `self` is `.json`.
316333
///
317334
/// - Throws: An error if `self` is not `.json`.
318335
/// - SeeAlso: `.json`.
319-
public var json: Components.Schemas.gitignore_hyphen_template {
336+
public var json: Components.Schemas.GitignoreTemplate {
320337
get throws {
321338
switch self {
322339
case let .json(body):
@@ -326,12 +343,12 @@ public enum Operations {
326343
}
327344
}
328345
/// Received HTTP response body
329-
public var body: Operations.gitignore_sol_get_hyphen_template.Output.Ok.Body
346+
public var body: Operations.GitignoreGetTemplate.Output.Ok.Body
330347
/// Creates a new `Ok`.
331348
///
332349
/// - Parameters:
333350
/// - body: Received HTTP response body
334-
public init(body: Operations.gitignore_sol_get_hyphen_template.Output.Ok.Body) {
351+
public init(body: Operations.GitignoreGetTemplate.Output.Ok.Body) {
335352
self.body = body
336353
}
337354
}
@@ -340,12 +357,12 @@ public enum Operations {
340357
/// - Remark: Generated from `#/paths//gitignore/templates/{name}/get(gitignore/get-template)/responses/200`.
341358
///
342359
/// HTTP response code: `200 ok`.
343-
case ok(Operations.gitignore_sol_get_hyphen_template.Output.Ok)
360+
case ok(Operations.GitignoreGetTemplate.Output.Ok)
344361
/// The associated value of the enum case if `self` is `.ok`.
345362
///
346363
/// - Throws: An error if `self` is not `.ok`.
347364
/// - SeeAlso: `.ok`.
348-
public var ok: Operations.gitignore_sol_get_hyphen_template.Output.Ok {
365+
public var ok: Operations.GitignoreGetTemplate.Output.Ok {
349366
get throws {
350367
switch self {
351368
case let .ok(response):
@@ -363,12 +380,20 @@ public enum Operations {
363380
/// - Remark: Generated from `#/paths//gitignore/templates/{name}/get(gitignore/get-template)/responses/304`.
364381
///
365382
/// HTTP response code: `304 notModified`.
366-
case notModified(Components.Responses.not_modified)
383+
case notModified(Components.Responses.NotModified)
384+
/// Not modified
385+
///
386+
/// - Remark: Generated from `#/paths//gitignore/templates/{name}/get(gitignore/get-template)/responses/304`.
387+
///
388+
/// HTTP response code: `304 notModified`.
389+
public static var notModified: Self {
390+
.notModified(.init())
391+
}
367392
/// The associated value of the enum case if `self` is `.notModified`.
368393
///
369394
/// - Throws: An error if `self` is not `.notModified`.
370395
/// - SeeAlso: `.notModified`.
371-
public var notModified: Components.Responses.not_modified {
396+
public var notModified: Components.Responses.NotModified {
372397
get throws {
373398
switch self {
374399
case let .notModified(response):

0 commit comments

Comments
 (0)