Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion AGENTS.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
// AGENTS.md
// feather-openapi
//
// Created by Binary Birds on 2026. 01. 20..
// Created by Binary Birds on 2026. 01. 20.

# Repository Guidelines

Expand Down
14 changes: 11 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,11 @@

The FeatherOpenAPI library makes it easy to define OpenAPI specifications using Swift in a type-safe way.

[![Release: 1.0.0-beta.6](https://img.shields.io/badge/Release-1%2E0%2E0--beta%2E6-F05138)](https://github.com/feather-framework/feather-openapi/releases/tag/1.0.0-beta.6)
[
![Release: 1.0.0-beta.7](https://img.shields.io/badge/Release-1%2E0%2E0--beta%2E7-F05138)
](
https://github.com/feather-framework/feather-openapi/releases/tag/1.0.0-beta.7
)

## Features

Expand Down Expand Up @@ -30,7 +34,7 @@ The FeatherOpenAPI library makes it easy to define OpenAPI specifications using
Use Swift Package Manager; add the dependency to your `Package.swift` file:

```swift
.package(url: "https://github.com/feather-framework/feather-openapi", exact: "1.0.0-beta.6"),
.package(url: "https://github.com/feather-framework/feather-openapi", exact: "1.0.0-beta.7"),
```

Then add `FeatherOpenAPI` to your target dependencies:
Expand All @@ -41,7 +45,11 @@ Then add `FeatherOpenAPI` to your target dependencies:

## Usage

[![DocC API documentation](https://img.shields.io/badge/DocC-API_documentation-F05138)](https://feather-framework.github.io/feather-openapi/)
[
![DocC API documentation](https://img.shields.io/badge/DocC-API_documentation-F05138)
](
https://feather-framework.github.io/feather-openapi/
)

API documentation is available at the following link.

Expand Down
2 changes: 1 addition & 1 deletion Sources/FeatherOpenAPI/Callback/CallbackID.swift
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
// CallbackID.swift
// feather-openapi
//
// Created by Tibor Bödecs on 2026. 01. 23..
// Created by Tibor Bödecs on 2026. 01. 23.
//

public struct CallbackID: Sendable, Equatable, Hashable, Codable {
Expand Down
2 changes: 1 addition & 1 deletion Sources/FeatherOpenAPI/Components/Components.swift
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
// Components.swift
// feather-openapi
//
// Created by Tibor Bödecs on 2026. 01. 23..
// Created by Tibor Bödecs on 2026. 01. 23.
//

import OpenAPIKit30
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
// ComponentsRepresentable.swift
// feather-openapi
//
// Created by Tibor Bödecs on 2026. 01. 21..
// Created by Tibor Bödecs on 2026. 01. 21.
//

import OpenAPIKit30
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
// OpenAPIComponentsRepresentable.swift
// feather-openapi
//
// Created by Tibor Bödecs on 2026. 01. 23..
// Created by Tibor Bödecs on 2026. 01. 23.
//

import OpenAPIKit30
Expand Down
2 changes: 1 addition & 1 deletion Sources/FeatherOpenAPI/Contact/ContactRepresentable.swift
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
// ContactRepresentable.swift
// feather-openapi
//
// Created by Tibor Bödecs on 2026. 01. 21..
// Created by Tibor Bödecs on 2026. 01. 21.
//

import OpenAPIKit30
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
// OpenAPIContactRepresentable.swift
// feather-openapi
//
// Created by Tibor Bödecs on 2026. 01. 23..
// Created by Tibor Bödecs on 2026. 01. 23.
//

import OpenAPIKit30
Expand Down
2 changes: 1 addition & 1 deletion Sources/FeatherOpenAPI/Content/Content.swift
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
// Content.swift
// feather-openapi
//
// Created by Tibor Bödecs on 2026. 01. 23..
// Created by Tibor Bödecs on 2026. 01. 23.
//

import OpenAPIKit30
Expand Down
2 changes: 1 addition & 1 deletion Sources/FeatherOpenAPI/Content/ContentMap.swift
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
// ContentMap.swift
// feather-openapi
//
// Created by Tibor Bödecs on 2026. 01. 23..
// Created by Tibor Bödecs on 2026. 01. 23.
//

import OpenAPIKit30
Expand Down
2 changes: 1 addition & 1 deletion Sources/FeatherOpenAPI/Content/ContentRepresentable.swift
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
// ContentRepresentable.swift
// feather-openapi
//
// Created by Tibor Bödecs on 2026. 01. 23..
// Created by Tibor Bödecs on 2026. 01. 23.
//

import OpenAPIKit30
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
// OpenAPIContentRepresentable.swift
// feather-openapi
//
// Created by Tibor Bödecs on 2026. 01. 21..
// Created by Tibor Bödecs on 2026. 01. 21.
//

import OpenAPIKit30
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
// DocumentRepresentable.swift
// feather-openapi
//
// Created by Tibor Bödecs on 2026. 01. 21..
// Created by Tibor Bödecs on 2026. 01. 21.
//

import OpenAPIKit30
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
// OpenAPIDocumentRepresentable.swift
// feather-openapi
//
// Created by Tibor Bödecs on 2026. 01. 23..
// Created by Tibor Bödecs on 2026. 01. 23.
//

import OpenAPIKit30
Expand Down
2 changes: 1 addition & 1 deletion Sources/FeatherOpenAPI/Example/ExampleID.swift
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
// ExampleID.swift
// feather-openapi
//
// Created by Tibor Bödecs on 2026. 01. 23..
// Created by Tibor Bödecs on 2026. 01. 23.
//

public struct ExampleID: Sendable, Equatable, Hashable, Codable {
Expand Down
2 changes: 1 addition & 1 deletion Sources/FeatherOpenAPI/Example/ExampleRepresentable.swift
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
// ExampleRepresentable.swift
// feather-openapi
//
// Created by Tibor Bödecs on 2026. 01. 21..
// Created by Tibor Bödecs on 2026. 01. 21.
//

import OpenAPIKit30
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
// OpenAPIExampleRepresentable.swift
// feather-openapi
//
// Created by Tibor Bödecs on 2026. 01. 23..
// Created by Tibor Bödecs on 2026. 01. 23.
//

import OpenAPIKit30
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
// ExternalDocsRepresentable.swift
// feather-openapi
//
// Created by Tibor Bödecs on 2026. 01. 21..
// Created by Tibor Bödecs on 2026. 01. 21.
//

import OpenAPIKit30
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
// OpenAPIExternalDocsRepresentable.swift
// feather-openapi
//
// Created by Tibor Bödecs on 2026. 01. 23..
// Created by Tibor Bödecs on 2026. 01. 23.
//

import OpenAPIKit30
Expand Down
2 changes: 1 addition & 1 deletion Sources/FeatherOpenAPI/Header/HeaderID.swift
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
// HeaderID.swift
// feather-openapi
//
// Created by Tibor Bödecs on 2026. 01. 23..
// Created by Tibor Bödecs on 2026. 01. 23.
//

public struct HeaderID: Sendable, Equatable, Hashable, Codable {
Expand Down
2 changes: 1 addition & 1 deletion Sources/FeatherOpenAPI/Header/HeaderMap.swift
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
// HeaderMap.swift
// feather-openapi
//
// Created by Tibor Bödecs on 2026. 01. 23..
// Created by Tibor Bödecs on 2026. 01. 23.
//

import OpenAPIKit30
Expand Down
2 changes: 1 addition & 1 deletion Sources/FeatherOpenAPI/Header/HeaderRepresentable.swift
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
// HeaderRepresentable.swift
// feather-openapi
//
// Created by Tibor Bödecs on 2026. 01. 21..
// Created by Tibor Bödecs on 2026. 01. 21.
//

import OpenAPIKit30
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
// OpenAPIHeaderRepresentable.swift
// feather-openapi
//
// Created by Tibor Bödecs on 2026. 01. 23..
// Created by Tibor Bödecs on 2026. 01. 23.
//

import OpenAPIKit30
Expand Down
2 changes: 1 addition & 1 deletion Sources/FeatherOpenAPI/Identifiable.swift
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
// Identifiable.swift
// feather-openapi
//
// Created by Tibor Bödecs on 2026. 01. 22..
// Created by Tibor Bödecs on 2026. 01. 22.
//

public protocol Identifiable: Sendable {
Expand Down
2 changes: 1 addition & 1 deletion Sources/FeatherOpenAPI/Info/InfoRepresentable.swift
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
// InfoRepresentable.swift
// feather-openapi
//
// Created by Tibor Bödecs on 2026. 01. 23..
// Created by Tibor Bödecs on 2026. 01. 23.
//

import OpenAPIKit30
Expand Down
2 changes: 1 addition & 1 deletion Sources/FeatherOpenAPI/Info/OpenAPIInfoRepresentable.swift
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
// OpenAPIInfoRepresentable.swift
// feather-openapi
//
// Created by Tibor Bödecs on 2026. 01. 21..
// Created by Tibor Bödecs on 2026. 01. 21.
//

import OpenAPIKit30
Expand Down
2 changes: 1 addition & 1 deletion Sources/FeatherOpenAPI/License/LicenseRepresentable.swift
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
// LicenseRepresentable.swift
// feather-openapi
//
// Created by Tibor Bödecs on 2026. 01. 21..
// Created by Tibor Bödecs on 2026. 01. 21.
//

import OpenAPIKit30
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
// OpenAPILicenseRepresentable.swift
// feather-openapi
//
// Created by Tibor Bödecs on 2026. 01. 23..
// Created by Tibor Bödecs on 2026. 01. 23.
//

import OpenAPIKit30
Expand Down
2 changes: 1 addition & 1 deletion Sources/FeatherOpenAPI/Link/LinkID.swift
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
// LinkID.swift
// feather-openapi
//
// Created by Tibor Bödecs on 2026. 01. 23..
// Created by Tibor Bödecs on 2026. 01. 23.
//

public struct LinkID: Sendable, Equatable, Hashable, Codable {
Expand Down
2 changes: 1 addition & 1 deletion Sources/FeatherOpenAPI/Link/OpenAPILinkRepresentable.swift
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
// OpenAPILinkRepresentable.swift
// feather-openapi
//
// Created by Tibor Bödecs on 2026. 01. 23..
// Created by Tibor Bödecs on 2026. 01. 23.
//

import OpenAPIKit30
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
// LocationRepresentable.swift
// feather-openapi
//
// Created by Tibor Bödecs on 2026. 01. 21..
// Created by Tibor Bödecs on 2026. 01. 21.
//

#if canImport(FoundationEssentials)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
// OpenAPILocationRepresentable.swift
// feather-openapi
//
// Created by Tibor Bödecs on 2026. 01. 23..
// Created by Tibor Bödecs on 2026. 01. 23.
//

#if canImport(FoundationEssentials)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
// OpenAPIOperationRepresentable.swift
// feather-openapi
//
// Created by Tibor Bödecs on 2026. 01. 23..
// Created by Tibor Bödecs on 2026. 01. 23.
//

import OpenAPIKit30
Expand Down
29 changes: 16 additions & 13 deletions Sources/FeatherOpenAPI/Operation/OperationRepresentable.swift
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
// OperationRepresentable.swift
// feather-openapi
//
// Created by Tibor Bödecs on 2026. 01. 21..
// Created by Tibor Bödecs on 2026. 01. 21.
//

import OpenAPIKit30
Expand Down Expand Up @@ -62,24 +62,27 @@ extension OperationRepresentable {
/// Default summary is `nil`.
public var summary: String? { nil }

/// Default operation identifier is `nil`.
public var operationId: String? { nil }
/// Default parameters are empty.
public var parameters: [ParameterRepresentable] { [] }

/// Computes a default operation identifier from the type name.
public static var operationId: String {
var components = String(reflecting: self)
public var operationId: String? {
let suffix = "Operation"
let operationTypeName = String(reflecting: type(of: self))
.split(separator: ".")
.dropFirst()
.filter { $0.hasSuffix(suffix) }
.map(String.init)
.joined(separator: "")
guard !operationTypeName.isEmpty else {
return nil
}

components.remove(at: 2)
if let last = components.popLast()?.lowercasedFirstLetter() {
components.insert(last, at: 0)
let typeName = operationTypeName.dropLast(suffix.count)
guard !typeName.isEmpty else {
return nil
}
return components.joined(separator: "")

return String(typeName).lowercasedFirstLetter()
}
/// Default parameters are empty.
public var parameters: [ParameterRepresentable] { [] }

/// Default request body is `nil`.
public var requestBody: RequestBodyRepresentable? { nil }
Expand Down
2 changes: 1 addition & 1 deletion Sources/FeatherOpenAPI/OrderedDictionary+Merge.swift
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
// OrderedDictionary+Merge.swift
// feather-openapi
//
// Created by Tibor Bödecs on 2026. 01. 25..
// Created by Tibor Bödecs on 2026. 01. 25.

import OpenAPIKit30

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
// OpenAPIParameterRepresentable.swift
// feather-openapi
//
// Created by Tibor Bödecs on 2026. 01. 23..
// Created by Tibor Bödecs on 2026. 01. 23.
//

import OpenAPIKit30
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
// ParameterID.swift
// feather-openapi
//
// Created by Tibor Bödecs on 2026. 01. 23..
// Created by Tibor Bödecs on 2026. 01. 23.
//

public struct ParameterID: Sendable, Equatable, Hashable, Codable {
Expand Down
Loading
Loading