Skip to content

Commit f71ac0c

Browse files
authored
Swift 6 updates (#33)
- Support Swift 6.1+ only - Reworked the whole API - Documentation & tests - Dropped plugin - Updated dependencies
1 parent 1628584 commit f71ac0c

253 files changed

Lines changed: 8086 additions & 3180 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.github/workflows/deployment.yml

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
name: Deployment
2+
3+
on:
4+
push:
5+
tags:
6+
- 'v*'
7+
- '[0-9]*'
8+
9+
jobs:
10+
11+
create-docc-and-deploy:
12+
uses: BinaryBirds/github-workflows/.github/workflows/docc_deploy.yml@main
13+
permissions:
14+
contents: read
15+
pages: write
16+
id-token: write

.github/workflows/run-checks.yml

Lines changed: 0 additions & 26 deletions
This file was deleted.

.github/workflows/run-tests.yml

Lines changed: 0 additions & 54 deletions
This file was deleted.

.github/workflows/testing.yml

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
name: Testing
2+
3+
on:
4+
pull_request:
5+
branches:
6+
- main
7+
8+
jobs:
9+
10+
swiftlang_checks:
11+
name: Swiftlang Checks
12+
uses: swiftlang/github-workflows/.github/workflows/soundness.yml@main
13+
with:
14+
license_header_check_project_name: "project"
15+
format_check_enabled : true
16+
broken_symlink_check_enabled : true
17+
unacceptable_language_check_enabled : true
18+
shell_check_enabled : true
19+
docs_check_enabled : false
20+
api_breakage_check_enabled : false
21+
license_header_check_enabled : false
22+
yamllint_check_enabled : false
23+
python_lint_check_enabled : false
24+
25+
bb_checks:
26+
name: BB Checks
27+
uses: BinaryBirds/github-workflows/.github/workflows/extra_soundness.yml@main
28+
with:
29+
local_swift_dependencies_check_enabled : true
30+
headers_check_enabled : true
31+
docc_warnings_check_enabled : true
32+
33+
swiftlang_tests:
34+
name: Swiftlang Tests
35+
uses: swiftlang/github-workflows/.github/workflows/swift_package_test.yml@main
36+
with:
37+
enable_windows_checks : false
38+
linux_build_command: "swift test --parallel --enable-code-coverage"
39+
linux_exclude_swift_versions: "[{\"swift_version\": \"5.8\"}, {\"swift_version\": \"5.9\"}, {\"swift_version\": \"5.10\"}, {\"swift_version\": \"nightly\"}, {\"swift_version\": \"nightly-main\"}, {\"swift_version\": \"6.0\"}, {\"swift_version\": \"nightly-6.0\"}, {\"swift_version\": \"nightly-6.1\"}, {\"swift_version\": \"nightly-6.3\"}]"

.swift-format

Lines changed: 60 additions & 54 deletions
Original file line numberDiff line numberDiff line change
@@ -1,58 +1,64 @@
11
{
2-
"fileScopedDeclarationPrivacy" : {
3-
"accessLevel" : "private"
2+
"version": 1,
3+
"lineLength": 80,
4+
"maximumBlankLines": 1,
5+
"fileScopedDeclarationPrivacy": {
6+
"accessLevel": "private"
47
},
5-
"indentation" : {
6-
"spaces" : 4
8+
"tabWidth": 4,
9+
"indentation": {
10+
"spaces": 4
711
},
8-
"indentConditionalCompilationBlocks" : false,
9-
"indentSwitchCaseLabels" : false,
10-
"lineBreakAroundMultilineExpressionChainComponents" : true,
11-
"lineBreakBeforeControlFlowKeywords" : true,
12-
"lineBreakBeforeEachArgument" : true,
13-
"lineBreakBeforeEachGenericRequirement" : true,
14-
"lineLength" : 80,
15-
"maximumBlankLines" : 1,
16-
"prioritizeKeepingFunctionOutputTogether" : false,
17-
"respectsExistingLineBreaks" : true,
18-
"rules" : {
19-
"AllPublicDeclarationsHaveDocumentation" : false,
20-
"AlwaysUseLowerCamelCase" : false,
21-
"AmbiguousTrailingClosureOverload" : true,
22-
"BeginDocumentationCommentWithOneLineSummary" : false,
23-
"DoNotUseSemicolons" : true,
24-
"DontRepeatTypeInStaticProperties" : false,
25-
"FileScopedDeclarationPrivacy" : true,
26-
"FullyIndirectEnum" : true,
27-
"GroupNumericLiterals" : true,
28-
"IdentifiersMustBeASCII" : true,
29-
"NeverForceUnwrap" : false,
30-
"NeverUseForceTry" : false,
31-
"NeverUseImplicitlyUnwrappedOptionals" : false,
32-
"NoAccessLevelOnExtensionDeclaration" : false,
33-
"NoAssignmentInExpressions" : true,
34-
"NoBlockComments" : true,
35-
"NoCasesWithOnlyFallthrough" : true,
36-
"NoEmptyTrailingClosureParentheses" : true,
37-
"NoLabelsInCasePatterns" : false,
38-
"NoLeadingUnderscores" : false,
39-
"NoParensAroundConditions" : true,
40-
"NoVoidReturnOnFunctionSignature" : true,
41-
"OneCasePerLine" : true,
42-
"OneVariableDeclarationPerLine" : true,
43-
"OnlyOneTrailingClosureArgument" : true,
44-
"OrderedImports" : false,
45-
"ReturnVoidInsteadOfEmptyTuple" : true,
46-
"UseEarlyExits" : false,
47-
"UseLetInEveryBoundCaseVariable" : false,
48-
"UseShorthandTypeNames" : true,
49-
"UseSingleLinePropertyGetter" : false,
50-
"UseSynthesizedInitializer" : true,
51-
"UseTripleSlashForDocumentationComments" : true,
52-
"UseWhereClausesInForLoops" : false,
53-
"ValidateDocumentationComments" : true
54-
},
55-
"spacesAroundRangeFormationOperators" : false,
56-
"tabWidth" : 4,
57-
"version" : 1
12+
"indentConditionalCompilationBlocks": false,
13+
"indentSwitchCaseLabels": false,
14+
"lineBreakAroundMultilineExpressionChainComponents": true,
15+
"lineBreakBeforeControlFlowKeywords": true,
16+
"lineBreakBeforeEachArgument": true,
17+
"lineBreakBeforeEachGenericRequirement": true,
18+
"prioritizeKeepingFunctionOutputTogether": false,
19+
"respectsExistingLineBreaks": true,
20+
"spacesAroundRangeFormationOperators": false,
21+
"multiElementCollectionTrailingCommas": true,
22+
"rules": {
23+
"AllPublicDeclarationsHaveDocumentation": false,
24+
"AlwaysUseLiteralForEmptyCollectionInit": true,
25+
"AlwaysUseLowerCamelCase": false,
26+
"AmbiguousTrailingClosureOverload": true,
27+
"BeginDocumentationCommentWithOneLineSummary": true,
28+
"DoNotUseSemicolons": true,
29+
"DontRepeatTypeInStaticProperties": true,
30+
"FileScopedDeclarationPrivacy": true,
31+
"FullyIndirectEnum": true,
32+
"GroupNumericLiterals": true,
33+
"IdentifiersMustBeASCII": true,
34+
"NeverForceUnwrap": false,
35+
"NeverUseForceTry": true,
36+
"NeverUseImplicitlyUnwrappedOptionals": true,
37+
"NoAccessLevelOnExtensionDeclaration": true,
38+
"NoAssignmentInExpressions": true,
39+
"NoBlockComments": true,
40+
"NoCasesWithOnlyFallthrough": true,
41+
"NoEmptyTrailingClosureParentheses": true,
42+
"NoLabelsInCasePatterns": true,
43+
"NoLeadingUnderscores": false,
44+
"NoParensAroundConditions": true,
45+
"NoPlaygroundLiterals": true,
46+
"NoVoidReturnOnFunctionSignature": true,
47+
"OmitExplicitReturns": true,
48+
"OneCasePerLine": true,
49+
"OneVariableDeclarationPerLine": true,
50+
"OnlyOneTrailingClosureArgument": true,
51+
"OrderedImports": true,
52+
"ReplaceForEachWithForLoop": true,
53+
"ReturnVoidInsteadOfEmptyTuple": true,
54+
"TypeNamesShouldBeCapitalized": true,
55+
"UseEarlyExits": true,
56+
"UseLetInEveryBoundCaseVariable": true,
57+
"UseShorthandTypeNames": true,
58+
"UseSingleLinePropertyGetter": true,
59+
"UseSynthesizedInitializer": true,
60+
"UseTripleSlashForDocumentationComments": true,
61+
"UseWhereClausesInForLoops": true,
62+
"ValidateDocumentationComments": true
63+
}
5864
}

.swiftformatignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Package.swift

.unacceptablelanguageignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
Tests/FeatherOpenAPITests/Petstore/Petstore.swift
2+
Petstore/openapi@3.0.yaml
3+
Petstore/openapi@3.1.yaml

AGENTS.md

Lines changed: 86 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,86 @@
1+
//
2+
// AGENTS.md
3+
// feather-openapi
4+
//
5+
// Created by Binary Birds on 2026. 01. 20..
6+
7+
# Repository Guidelines
8+
9+
This repository contains an project written with Swift 6. Please follow the guidelines below so that the development experience is built on modern, safe API usage.
10+
11+
12+
## Role
13+
14+
You are a **Senior Swift Engineer**, specializing in server-side Swift development, and related frameworks (Vapor, Hummingbird).
15+
16+
17+
## Core instructions
18+
19+
- Swift 6.2 or later, using modern Swift concurrency.
20+
- Do not introduce third-party frameworks without asking first.
21+
- Avoid Foundation unless requested.
22+
- Build system: Swift Package Manager.
23+
- Testing framework: Swift Testing (`swift test`).
24+
25+
26+
## Swift instructions
27+
28+
- Assume strict Swift concurrency rules are being applied.
29+
- Prefer Swift-native alternatives to Foundation methods where they exist, such as using `replacing("hello", with: "world")` with strings rather than `replacingOccurrences(of: "hello", with: "world")`.
30+
- Prefer modern Foundation API, if Foundation can not be avoided, for example `URL.documentsDirectory` to find the app’s documents directory, and `appending(path:)` to append strings to a URL.
31+
- Never use C-style number formatting such as `Text(String(format: "%.2f", abs(myNumber)))`; always use `Text(abs(change), format: .number.precision(.fractionLength(2)))` instead.
32+
- Prefer static member lookup to struct instances where possible, such as `.circle` rather than `Circle()`, and `.borderedProminent` rather than `BorderedProminentButtonStyle()`.
33+
- Never use old-style Grand Central Dispatch concurrency such as `DispatchQueue.main.async()`. If behavior like this is needed, always use modern Swift concurrency.
34+
- Avoid force unwraps and force `try` unless it is unrecoverable.
35+
- Never use `Task.sleep(nanoseconds:)`; always use `Task.sleep(for:)` instead.
36+
37+
38+
## Project structure
39+
40+
- Use a consistent project structure.
41+
- Follow strict naming conventions for types, properties, methods, and data models.
42+
- Break different types up into different Swift files rather than placing multiple structs, classes, or enums into a single file.
43+
- Write unit tests for core application logic.
44+
- Add code comments and documentation comments as needed.
45+
- If the project requires secrets such as API keys, never include them in the repository.
46+
47+
48+
## Build, Test, and Development Commands
49+
50+
- Preferred workflow: after any code change run `swift build` to rebuild the project, and run `swift test` when you actually need tests.
51+
52+
53+
## PR instructions
54+
55+
- If installed, make sure the `make format` & `make check` commands returns no warnings or errors before committing.
56+
57+
58+
## Coding Style & Naming Conventions
59+
60+
- Enforce formatting with the `make format` command.
61+
- Swift 6.2, prefer strict typing and small files (<500 LOC as a guardrail)
62+
- Naming: types UpperCamelCase; methods/properties lowerCamelCase; tests mirror subject names; avoid abbreviations except common GitHub/API terms.
63+
64+
65+
## Testing Guidelines
66+
67+
- Framework: Swift Testing via `swift test`. Name suites `<Thing>Tests` and functions `behavior()`.
68+
- Cover new logic. Use deterministic fixtures/mocks for data.
69+
- Run `swift test` before pushing; prefer adding tests alongside bug fixes.
70+
71+
72+
## Commit & Pull Request Guidelines
73+
74+
- Commit messages follow the existing short, imperative style; optional scoped prefixes. Keep them concise; present tense; no trailing period.
75+
- PRs: include a brief summary, linked issue ticket if any.
76+
77+
78+
## Security & Configuration Tips
79+
80+
- Keep GitHub App secrets/private key out of the repo;
81+
- Do not log tokens or traffic stats responses; prefer redacted diagnostics.
82+
83+
84+
## Agent-Specific Notes
85+
86+
- Reminder: ignore files you do not recognize (just list them); multiple agents often work here.

LICENSE

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
MIT License
22

33
Copyright (c) 2018-2022 Tibor Bödecs
4-
Copyright (c) 2022-2024 Binary Birds Ltd.
4+
Copyright (c) 2022-2026 Binary Birds Kft.
55

66
Permission is hereby granted, free of charge, to any person
77
obtaining a copy of this software and associated documentation

0 commit comments

Comments
 (0)