Skip to content

Commit

Permalink
finished refactoring, working on linting
Browse files Browse the repository at this point in the history
  • Loading branch information
leogdion committed Jan 10, 2024
1 parent 32a1ae3 commit eee96e9
Show file tree
Hide file tree
Showing 4 changed files with 314 additions and 398 deletions.
17 changes: 16 additions & 1 deletion .swiftlint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,21 @@ identifier_name:
excluded:
- id
- ok
- iv
- iTunes
- Access_hyphen_Control_hyphen_Allow_hyphen_Methods
- Access_hyphen_Control_hyphen_Allow_hyphen_Origin
- Cache_hyphen_Control
- X_hyphen_Data_hyphen_Location
- application_x_hyphen_plist
- text_html_charset_utf_hyphen_8
- X_hyphen_Frame_hyphen_Options
- Expires
- Location
type_name:
excluded:
- iTunes
- Ok
excluded:
- Tests
- DerivedData
Expand All @@ -20,7 +35,7 @@ disabled_rules:
custom_rules:
payload_disallow: # 1
name: "Payload Disallowed" # 2
regex: '\w+Payload' # 3
regex: '\\b(?!UndocumentedPayload\b)\w+Payload\b' # 3
capture_group: 0 # 4
message: "Do not use Payload for identifier." # 5
severity: error # 6
10 changes: 5 additions & 5 deletions Sources/IPSWDownloads/Client.swift
Original file line number Diff line number Diff line change
Expand Up @@ -1232,7 +1232,7 @@ public struct Client: APIProtocol {
switch chosenContentType {
case "application/json":
body = try await converter.getResponseBodyAsJSON(
Operations.identifierForModel.Output.Ok.Body.jsonPayload.self,
Components.Schemas.Model.self,
from: responseBody,
transforming: { value in
.json(value)
Expand Down Expand Up @@ -1420,7 +1420,7 @@ public struct Client: APIProtocol {
switch chosenContentType {
case "application/json":
body = try await converter.getResponseBodyAsJSON(
Operations.otaDocumentationForDeviceAndVersion.Output.NotFound.Body.jsonPayload.self,
Components.Schemas.NotFoundDetails.self,
from: responseBody,
transforming: { value in
.json(value)
Expand Down Expand Up @@ -1619,7 +1619,7 @@ public struct Client: APIProtocol {
switch chosenContentType {
case "application/json":
body = try await converter.getResponseBodyAsJSON(
Operations.otaInformationForIdentifierAndBuild.Output.Ok.Body.jsonPayload.self,
Components.Schemas.OTA.self,
from: responseBody,
transforming: { value in
.json(value)
Expand Down Expand Up @@ -1732,7 +1732,7 @@ public struct Client: APIProtocol {
switch chosenContentType {
case "application/json":
body = try await converter.getResponseBodyAsJSON(
Operations.otasForVersion.Output.Ok.Body.jsonPayload.self,
[OpenAPIRuntime.OpenAPIValueContainer].self,
from: responseBody,
transforming: { value in
.json(value)
Expand Down Expand Up @@ -1862,7 +1862,7 @@ public struct Client: APIProtocol {
switch chosenContentType {
case "application/json":
body = try await converter.getResponseBodyAsJSON(
Operations.releases.Output.Ok.Body.jsonPayload.self,
[OpenAPIRuntime.OpenAPIValueContainer].self,
from: responseBody,
transforming: { value in
.json(value)
Expand Down
Loading

0 comments on commit eee96e9

Please sign in to comment.