Skip to content

Release - 1.1.1 #12

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 7 commits into from
May 12, 2022
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 JSONAPIMapper.podspec
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
Pod::Spec.new do |spec|
spec.name = 'JSONAPIMapper'
spec.summary = 'A Swift library for mapping JSON data'
spec.version = '1.1.0'
spec.version = '1.1.1'
spec.license = { :type => 'MIT' }
spec.homepage = 'https://github.com/nimblehq/JSONMapper'
spec.authors = { 'Nimble' => 'dev@nimblehq.co' }
Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ Once you have your Swift package set up, adding Alamofire as a dependency is as

```swift
dependencies: [
.package(url: "https://github.com/nimblehq/JSONMapper.git", .upToNextMajor(from: "1.1.0"))
.package(url: "https://github.com/nimblehq/JSONMapper.git", from: "1.1.1")
]
```

Expand All @@ -21,7 +21,7 @@ dependencies: [
JSONAPIMapper can be added to your project using CocoaPods 0.36 or later by adding the following line to your Podfile:

```ruby
pod 'JSONAPIMapper', '~> 1.1' (check releases to make sure this is the latest version)
pod 'JSONAPIMapper', '1.1.1'
```

## License
Expand Down
23 changes: 22 additions & 1 deletion Sources/JSONAPIMapper/Models/JSONAPIError.swift
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,12 @@ import Foundation
public struct JSONAPIError: Error, Decodable, Equatable {

public struct Source: Decodable, Equatable {
let parameter: String?

public let parameter: String?

public init(parameter: String? = nil) {
self.parameter = parameter
}
}

public let id: String?
Expand All @@ -20,6 +25,22 @@ public struct JSONAPIError: Error, Decodable, Equatable {
public let status: String?
/// application-specific error code
public let code: String?

public init(
id: String? = nil,
title: String? = nil,
detail: String? = nil,
source: Source? = nil,
status: String? = nil,
code: String? = nil
) {
self.id = id
self.title = title
self.detail = detail
self.source = source
self.status = status
self.code = code
}
}

/// JSON:API error object is sent as an array of errors.
Expand Down