diff --git a/.jazzy.yaml b/.jazzy.yaml index e441c43..d426103 100644 --- a/.jazzy.yaml +++ b/.jazzy.yaml @@ -1,6 +1,6 @@ module: KituraContracts -author: IBM -github_url: https://github.com/IBM-Swift/KituraContracts/ +author: IBM and Kitura project authors +github_url: https://github.com/Kitura/KituraContracts/ theme: fullwidth clean: true @@ -11,5 +11,5 @@ readme: README.md skip_undocumented: false hide_documentation_coverage: false -xcodebuild_arguments: [-project, KituraContracts.xcodeproj, -target, KituraContracts, LIBRARY_SEARCH_PATHS=.build/debug] +xcodebuild_arguments: [] diff --git a/.travis.yml b/.travis.yml index fbc25d1..4395f27 100644 --- a/.travis.yml +++ b/.travis.yml @@ -66,7 +66,7 @@ matrix: env: SWIFT_SNAPSHOT=$SWIFT_DEVELOPMENT_SNAPSHOT before_install: - - git clone https://github.com/IBM-Swift/Package-Builder.git + - git clone https://github.com/Kitura/Package-Builder.git script: - ./Package-Builder/build-package.sh -projectDir $TRAVIS_BUILD_DIR diff --git a/KituraContracts.podspec b/KituraContracts.podspec index fe4a85c..7fca2b5 100644 --- a/KituraContracts.podspec +++ b/KituraContracts.podspec @@ -1,9 +1,9 @@ Pod::Spec.new do |s| s.name = "KituraContracts" - s.version = "1.2.1" + s.version = "1.2.200" s.summary = "KituraContracts is a library containing type definitions shared by client and server code." - s.homepage = "https://github.com/IBM-Swift/KituraContracts" + s.homepage = "https://github.com/Kitura/KituraContracts" s.license = { :type => "Apache License, Version 2.0" } s.author = "IBM" s.module_name = 'KituraContracts' @@ -11,7 +11,7 @@ Pod::Spec.new do |s| s.ios.deployment_target = "10.0" s.tvos.deployment_target = "9.1" s.watchos.deployment_target = "2.0" - s.source = { :git => "https://github.com/IBM-Swift/KituraContracts.git", :tag => s.version } + s.source = { :git => "https://github.com/Kitura/KituraContracts.git", :tag => s.version } s.source_files = "Sources/**/*.swift" - s.dependency 'LoggerAPI', '~> 1.7' + s.dependency 'LoggerAPI', '~> 1.9' end diff --git a/README.md b/README.md index 3d955bb..bfa35e5 100644 --- a/README.md +++ b/README.md @@ -1,16 +1,16 @@

-Kitura +Kitura

- + APIDoc - -Build Status - Master + +Build Status - Master macOS Linux @@ -24,18 +24,18 @@ ## Summary -KituraContracts is a library containing type definitions shared by client (e.g. [KituraKit](https://ibm-swift.github.io/KituraKit/)) and server (e.g. [Kitura](https://ibm-swift.github.io/Kitura)) code. These shared type definitions include [Codable Closure Aliases](https://ibm-swift.github.io/KituraContracts/Typealiases.html), [RequestError](https://ibm-swift.github.io/KituraContracts/Structs/RequestError.html), [QueryEncoder](https://ibm-swift.github.io/KituraContracts/Classes/QueryEncoder.html), [QueryDecoder](https://ibm-swift.github.io/KituraContracts/Classes/QueryDecoder.html), [Coder](https://ibm-swift.github.io/KituraContracts/Classes/Coder.html), [Identifier Protocol](https://ibm-swift.github.io/KituraContracts/Protocols/Identifier.html#/s:15KituraContracts10IdentifierP5valueSSv) and [Extensions](https://ibm-swift.github.io/KituraContracts/Extensions.html#/s:SS) to String and Int, which add conformity to the Identifier protocol. +KituraContracts is a library containing type definitions shared by client (e.g. [KituraKit](https://kitura.github.io/KituraKit/)) and server (e.g. [Kitura](https://kitura.github.io/Kitura)) code. These shared type definitions include [Codable Closure Aliases](https://kitura.github.io/KituraContracts/Typealiases.html), [RequestError](https://kitura.github.io/KituraContracts/Structs/RequestError.html), [QueryEncoder](https://kitura.github.io/KituraContracts/Classes/QueryEncoder.html), [QueryDecoder](https://kitura.github.io/KituraContracts/Classes/QueryDecoder.html), [Coder](https://kitura.github.io/KituraContracts/Classes/Coder.html), [Identifier Protocol](https://kitura.github.io/KituraContracts/Protocols/Identifier.html#/s:15KituraContracts10IdentifierP5valueSSv) and [Extensions](https://kitura.github.io/KituraContracts/Extensions.html#/s:SS) to String and Int, which add conformity to the Identifier protocol. ## Usage -KituraContracts represents the types and protocols that are common to both the [Kitura](https://github.com/IBM-Swift/Kitura) server and [KituraKit](https://github.com/IBM-Swift/KituraKit) client side library. If you are using Kitura or KituraKit, your project does not need to depend on KituraContracts explicitly. +KituraContracts represents the types and protocols that are common to both the [Kitura](https://github.com/Kitura/Kitura) server and [KituraKit](https://github.com/Kitura/KituraKit) client side library. If you are using Kitura or KituraKit, your project does not need to depend on KituraContracts explicitly. #### Add dependencies -Add the `KituraContracts` package to the dependencies within your application’s `Package.swift` file. Substitute `"x.x.x"` with the latest `KituraContracts` [release](https://github.com/IBM-Swift/KituraContracts/releases). +Add the `KituraContracts` package to the dependencies within your application’s `Package.swift` file. Substitute `"x.x.x"` with the latest `KituraContracts` [release](https://github.com/Kitura/KituraContracts/releases). ```swift -.package(url: "https://github.com/IBM-Swift/KituraContracts.git", from: "x.x.x") +.package(url: "https://github.com/Kitura/KituraContracts.git", from: "x.x.x") ``` Add `KituraContracts` to your target's dependencies: @@ -76,7 +76,7 @@ router.post("/users") { (user: User, respondWith: (User?, RequestError?) -> Void The 1.x.x releases were tested on macOS and Linux using the Swift 4.1 binaries. Please note that this is the default version of Swift that is included in [Xcode 9.3](https://developer.apple.com/xcode/). ## API Documentation -For more information visit our [API reference](https://ibm-swift.github.io/KituraContracts/index.html). +For more information visit our [API reference](https://kitura.github.io/KituraContracts/index.html). ## Community @@ -84,4 +84,4 @@ We love to talk server-side Swift and Kitura. Join our [Slack](http://swift-at-i ## License -This library is licensed under Apache 2.0. Full license text is available in [LICENSE](https://github.com/IBM-Swift/KituraContracts/blob/master/LICENSE). +This library is licensed under Apache 2.0. Full license text is available in [LICENSE](https://github.com/Kitura/KituraContracts/blob/master/LICENSE). diff --git a/Sources/KituraContracts/CodableQuery/Coder.swift b/Sources/KituraContracts/CodableQuery/Coder.swift index aadf7bb..7c84d30 100644 --- a/Sources/KituraContracts/CodableQuery/Coder.swift +++ b/Sources/KituraContracts/CodableQuery/Coder.swift @@ -17,7 +17,7 @@ import Foundation /** - Class defining shared resources for the [QueryDecoder](https://github.com/IBM-Swift/KituraContracts/blob/master/Sources/KituraContracts/CodableQuery/QueryDecoder.swift) and [QueryEncoder](https://github.com/IBM-Swift/KituraContracts/blob/master/Sources/KituraContracts/CodableQuery/QueryEncoder.swift). + Class defining shared resources for the [QueryDecoder](https://github.com/Kitura/KituraContracts/blob/master/Sources/KituraContracts/CodableQuery/QueryDecoder.swift) and [QueryEncoder](https://github.com/Kitura/KituraContracts/blob/master/Sources/KituraContracts/CodableQuery/QueryEncoder.swift). ### Usage Example: ### ````swift diff --git a/docs/Classes.html b/docs/Classes.html index b928b00..ff3a8ae 100644 --- a/docs/Classes.html +++ b/docs/Classes.html @@ -21,7 +21,7 @@

- KituraContracts Docs + KituraContracts 1.2.200 Docs (99% documented)

@@ -33,7 +33,7 @@

- + View on GitHub @@ -87,9 +87,6 @@

- @@ -111,6 +108,12 @@ + + @@ -129,6 +132,9 @@ + - - -
-
  • @@ -337,10 +339,6 @@

    Declaration

  • -
-
-
-
diff --git a/docs/Classes/Coder.html b/docs/Classes/Coder.html index 7109264..6ae09c4 100644 --- a/docs/Classes/Coder.html +++ b/docs/Classes/Coder.html @@ -21,7 +21,7 @@

- KituraContracts Docs + KituraContracts 1.2.200 Docs (99% documented)

@@ -33,7 +33,7 @@

- + View on GitHub @@ -87,9 +87,6 @@

- @@ -111,6 +108,12 @@ + + @@ -129,6 +132,9 @@ + +
  • +
    + + + + defaultDateFormatter + +
    +
    +
    +
    +
    +
    +

    The default DateFormatter used for encoding and decoding query parameters. It uses the “UTC” timezone and “yyyy-MM-dd’T'HH:mm:ssZ” date format.

    Usage Example:

    -
    let date = Coder().dateFormatter.date(from: "2017-10-31T16:15:56+0000")
    +
    let date = Coder.defaultDateFormatter.date(from: "2017-10-31T16:15:56+0000")
     
    @@ -287,7 +321,7 @@

    Usage Example:

    Declaration

    Swift

    -
    public let dateFormatter: DateFormatter
    +
    public static let defaultDateFormatter: DateFormatter
    @@ -308,7 +342,7 @@

    Declaration

    Initializes a Coder instance with a DateFormatter -using the UTC timezone and yyyy-MM-dd’T'HH:mm:ssZ date format.

    +using the “UTC” timezone and “yyyy-MM-dd’T'HH:mm:ssZ” date format.

    @@ -327,7 +361,7 @@

    Declaration

    - getFieldName(from:) + getFieldName(from:)
    @@ -360,8 +394,8 @@

    Declaration

    diff --git a/docs/Classes/QueryDecoder.html b/docs/Classes/QueryDecoder.html index 43d5ce6..4966ebd 100644 --- a/docs/Classes/QueryDecoder.html +++ b/docs/Classes/QueryDecoder.html @@ -21,7 +21,7 @@

    - KituraContracts Docs + KituraContracts 1.2.200 Docs (99% documented)

    @@ -33,7 +33,7 @@

    - + View on GitHub @@ -87,9 +87,6 @@

    - @@ -111,6 +108,12 @@ + + @@ -129,6 +132,9 @@ +
  • +
  • +
    + + + + UUID + +
    +
    +
    +
    +
    +
    + + See more +
    +
    +

    Declaration

    +
    +

    Swift

    +
    extension UUID: Identifier
    @@ -724,8 +778,8 @@

    Declaration

    diff --git a/docs/Extensions/Bool.html b/docs/Extensions/Bool.html index 5c13511..a698177 100644 --- a/docs/Extensions/Bool.html +++ b/docs/Extensions/Bool.html @@ -21,7 +21,7 @@

    - KituraContracts Docs + KituraContracts 1.2.200 Docs (99% documented)

    @@ -33,7 +33,7 @@

    - + View on GitHub @@ -87,9 +87,6 @@

    - @@ -111,6 +108,12 @@ + + @@ -129,6 +132,9 @@ +
  • - - -
    -
    diff --git a/docs/Extensions/UInt.html b/docs/Extensions/UInt.html index 13c7da1..b4457d7 100644 --- a/docs/Extensions/UInt.html +++ b/docs/Extensions/UInt.html @@ -21,7 +21,7 @@

    - KituraContracts Docs + KituraContracts 1.2.200 Docs (99% documented)

    @@ -33,7 +33,7 @@

    - + View on GitHub @@ -87,9 +87,6 @@

    - @@ -111,6 +108,12 @@ + + @@ -129,6 +132,9 @@ + - - -
    -
    • @@ -317,10 +319,6 @@

      Declaration

    • -
    -
    -
    -
    diff --git a/docs/Protocols/BodyDecoder.html b/docs/Protocols/BodyDecoder.html index 25a40f8..d905819 100644 --- a/docs/Protocols/BodyDecoder.html +++ b/docs/Protocols/BodyDecoder.html @@ -21,7 +21,7 @@

    - KituraContracts Docs + KituraContracts 1.2.200 Docs (99% documented)

    @@ -33,7 +33,7 @@

    - + View on GitHub @@ -87,9 +87,6 @@

    - @@ -111,6 +108,12 @@ + + @@ -129,6 +132,9 @@ +
    - - -
    -
    • @@ -471,7 +473,7 @@

      Usage Example:

      ?age=8
       
      -

      Note: The age=8 format is not an API but an implementation detail that could change in the future.

      +

      Note: The “age=8” format is not an API but an implementation detail that could change in the future.

      See more
      @@ -513,7 +515,7 @@

      Usage Example:

      ?age=8
       
      -

      Note: The age=8 format is not an API but an implementation detail that could change in the future.

      +

      Note: The “age=8” format is not an API but an implementation detail that could change in the future.

      See more
    @@ -555,7 +557,7 @@

    Usage Example:

    ?age=8
     
    -

    Note: The age=8 format is not an API but an implementation detail that could change in the future.

    +

    Note: The “age=8” format is not an API but an implementation detail that could change in the future.

    See more @@ -598,7 +600,7 @@

    Usage Example:

    ?age=8
     
    -

    Note: The age=8 format is not an API but an implementation detail that could change in the future.

    +

    Note: The “age=8” format is not an API but an implementation detail that could change in the future.

    See more @@ -640,7 +642,7 @@

    Usage Example:

    ?age=8,14
     
    -

    Note: The age=8,14 format is not an API but an implementation detail that could change in the future.

    +

    Note: The “age=8,14” format is not an API but an implementation detail that could change in the future.

    See more @@ -682,7 +684,7 @@

    Usage Example:

    ?age=8,14
     
    -

    Note: The age=8,14 format is not an API but an implementation detail that could change in the future.

    +

    Note: The “age=8,14” format is not an API but an implementation detail that could change in the future.

    See more @@ -705,8 +707,8 @@

    Declaration

    diff --git a/docs/Structs/BodyFormat.html b/docs/Structs/BodyFormat.html index 015ce9c..5584901 100644 --- a/docs/Structs/BodyFormat.html +++ b/docs/Structs/BodyFormat.html @@ -21,7 +21,7 @@

    - KituraContracts Docs + KituraContracts 1.2.200 Docs (99% documented)

    @@ -33,7 +33,7 @@

    - + View on GitHub @@ -87,9 +87,6 @@

    - @@ -111,6 +108,12 @@ + + @@ -129,6 +132,9 @@ + - - -
    -
    diff --git a/docs/Structs/RequestError/ErrorBody.html b/docs/Structs/RequestError/ErrorBody.html index 7926180..8447541 100644 --- a/docs/Structs/RequestError/ErrorBody.html +++ b/docs/Structs/RequestError/ErrorBody.html @@ -21,7 +21,7 @@

    - KituraContracts Docs + KituraContracts 1.2.200 Docs (99% documented)

    @@ -33,7 +33,7 @@

    - + View on GitHub @@ -87,9 +87,6 @@

    - @@ -111,6 +108,12 @@ + + @@ -129,6 +132,9 @@ + - - -
    -
    • @@ -337,10 +339,6 @@

      Declaration

    • -
    -
    -
    -
    diff --git a/docs/docsets/KituraContracts.docset/Contents/Resources/Documents/Classes/Coder.html b/docs/docsets/KituraContracts.docset/Contents/Resources/Documents/Classes/Coder.html index 7109264..6ae09c4 100644 --- a/docs/docsets/KituraContracts.docset/Contents/Resources/Documents/Classes/Coder.html +++ b/docs/docsets/KituraContracts.docset/Contents/Resources/Documents/Classes/Coder.html @@ -21,7 +21,7 @@

    - KituraContracts Docs + KituraContracts 1.2.200 Docs (99% documented)

    @@ -33,7 +33,7 @@

    - + View on GitHub @@ -87,9 +87,6 @@

    - @@ -111,6 +108,12 @@ + + @@ -129,6 +132,9 @@ + +
  • +
    + + + + defaultDateFormatter + +
    +
    +
    +
    +
    +
    +

    The default DateFormatter used for encoding and decoding query parameters. It uses the “UTC” timezone and “yyyy-MM-dd’T'HH:mm:ssZ” date format.

    Usage Example:

    -
    let date = Coder().dateFormatter.date(from: "2017-10-31T16:15:56+0000")
    +
    let date = Coder.defaultDateFormatter.date(from: "2017-10-31T16:15:56+0000")
     
    @@ -287,7 +321,7 @@

    Usage Example:

    Declaration

    Swift

    -
    public let dateFormatter: DateFormatter
    +
    public static let defaultDateFormatter: DateFormatter
    @@ -308,7 +342,7 @@

    Declaration

    Initializes a Coder instance with a DateFormatter -using the UTC timezone and yyyy-MM-dd’T'HH:mm:ssZ date format.

    +using the “UTC” timezone and “yyyy-MM-dd’T'HH:mm:ssZ” date format.

    @@ -327,7 +361,7 @@

    Declaration

    - getFieldName(from:) + getFieldName(from:)
    @@ -360,8 +394,8 @@

    Declaration

    diff --git a/docs/docsets/KituraContracts.docset/Contents/Resources/Documents/Classes/QueryDecoder.html b/docs/docsets/KituraContracts.docset/Contents/Resources/Documents/Classes/QueryDecoder.html index 43d5ce6..4966ebd 100644 --- a/docs/docsets/KituraContracts.docset/Contents/Resources/Documents/Classes/QueryDecoder.html +++ b/docs/docsets/KituraContracts.docset/Contents/Resources/Documents/Classes/QueryDecoder.html @@ -21,7 +21,7 @@

    - KituraContracts Docs + KituraContracts 1.2.200 Docs (99% documented)

    @@ -33,7 +33,7 @@

    - + View on GitHub @@ -87,9 +87,6 @@

    - @@ -111,6 +108,12 @@ + + @@ -129,6 +132,9 @@ +
  • +
  • +
    + + + + UUID + +
    +
    +
    +
    +
    +
    + + See more +
    +
    +

    Declaration

    +
    +

    Swift

    +
    extension UUID: Identifier
    @@ -724,8 +778,8 @@

    Declaration

    diff --git a/docs/docsets/KituraContracts.docset/Contents/Resources/Documents/Extensions/Bool.html b/docs/docsets/KituraContracts.docset/Contents/Resources/Documents/Extensions/Bool.html index 5c13511..a698177 100644 --- a/docs/docsets/KituraContracts.docset/Contents/Resources/Documents/Extensions/Bool.html +++ b/docs/docsets/KituraContracts.docset/Contents/Resources/Documents/Extensions/Bool.html @@ -21,7 +21,7 @@

    - KituraContracts Docs + KituraContracts 1.2.200 Docs (99% documented)

    @@ -33,7 +33,7 @@

    - + View on GitHub @@ -87,9 +87,6 @@

    - @@ -111,6 +108,12 @@ + + @@ -129,6 +132,9 @@ +
  • - - -
    -
    diff --git a/docs/docsets/KituraContracts.docset/Contents/Resources/Documents/Extensions/UInt.html b/docs/docsets/KituraContracts.docset/Contents/Resources/Documents/Extensions/UInt.html index 13c7da1..b4457d7 100644 --- a/docs/docsets/KituraContracts.docset/Contents/Resources/Documents/Extensions/UInt.html +++ b/docs/docsets/KituraContracts.docset/Contents/Resources/Documents/Extensions/UInt.html @@ -21,7 +21,7 @@

    - KituraContracts Docs + KituraContracts 1.2.200 Docs (99% documented)

    @@ -33,7 +33,7 @@

    - + View on GitHub @@ -87,9 +87,6 @@

    - @@ -111,6 +108,12 @@ + + @@ -129,6 +132,9 @@ + - - -
    -
    • @@ -317,10 +319,6 @@

      Declaration

    • -
    -
    -
    -
    diff --git a/docs/docsets/KituraContracts.docset/Contents/Resources/Documents/Protocols/BodyDecoder.html b/docs/docsets/KituraContracts.docset/Contents/Resources/Documents/Protocols/BodyDecoder.html index 25a40f8..d905819 100644 --- a/docs/docsets/KituraContracts.docset/Contents/Resources/Documents/Protocols/BodyDecoder.html +++ b/docs/docsets/KituraContracts.docset/Contents/Resources/Documents/Protocols/BodyDecoder.html @@ -21,7 +21,7 @@

    - KituraContracts Docs + KituraContracts 1.2.200 Docs (99% documented)

    @@ -33,7 +33,7 @@

    - + View on GitHub @@ -87,9 +87,6 @@

    - @@ -111,6 +108,12 @@ + + @@ -129,6 +132,9 @@ +
    - - -
    -
    • @@ -471,7 +473,7 @@

      Usage Example:

      ?age=8
       
      -

      Note: The age=8 format is not an API but an implementation detail that could change in the future.

      +

      Note: The “age=8” format is not an API but an implementation detail that could change in the future.

      See more
      @@ -513,7 +515,7 @@

      Usage Example:

      ?age=8
       
      -

      Note: The age=8 format is not an API but an implementation detail that could change in the future.

      +

      Note: The “age=8” format is not an API but an implementation detail that could change in the future.

      See more
    @@ -555,7 +557,7 @@

    Usage Example:

    ?age=8
     
    -

    Note: The age=8 format is not an API but an implementation detail that could change in the future.

    +

    Note: The “age=8” format is not an API but an implementation detail that could change in the future.

    See more @@ -598,7 +600,7 @@

    Usage Example:

    ?age=8
     
    -

    Note: The age=8 format is not an API but an implementation detail that could change in the future.

    +

    Note: The “age=8” format is not an API but an implementation detail that could change in the future.

    See more @@ -640,7 +642,7 @@

    Usage Example:

    ?age=8,14
     
    -

    Note: The age=8,14 format is not an API but an implementation detail that could change in the future.

    +

    Note: The “age=8,14” format is not an API but an implementation detail that could change in the future.

    See more @@ -682,7 +684,7 @@

    Usage Example:

    ?age=8,14
     
    -

    Note: The age=8,14 format is not an API but an implementation detail that could change in the future.

    +

    Note: The “age=8,14” format is not an API but an implementation detail that could change in the future.

    See more @@ -705,8 +707,8 @@

    Declaration

    diff --git a/docs/docsets/KituraContracts.docset/Contents/Resources/Documents/Structs/BodyFormat.html b/docs/docsets/KituraContracts.docset/Contents/Resources/Documents/Structs/BodyFormat.html index 015ce9c..5584901 100644 --- a/docs/docsets/KituraContracts.docset/Contents/Resources/Documents/Structs/BodyFormat.html +++ b/docs/docsets/KituraContracts.docset/Contents/Resources/Documents/Structs/BodyFormat.html @@ -21,7 +21,7 @@

    - KituraContracts Docs + KituraContracts 1.2.200 Docs (99% documented)

    @@ -33,7 +33,7 @@

    - + View on GitHub @@ -87,9 +87,6 @@

    - @@ -111,6 +108,12 @@ + + @@ -129,6 +132,9 @@ + - - -
    -
    diff --git a/docs/docsets/KituraContracts.docset/Contents/Resources/Documents/Structs/RequestError/ErrorBody.html b/docs/docsets/KituraContracts.docset/Contents/Resources/Documents/Structs/RequestError/ErrorBody.html index 7926180..8447541 100644 --- a/docs/docsets/KituraContracts.docset/Contents/Resources/Documents/Structs/RequestError/ErrorBody.html +++ b/docs/docsets/KituraContracts.docset/Contents/Resources/Documents/Structs/RequestError/ErrorBody.html @@ -21,7 +21,7 @@

    - KituraContracts Docs + KituraContracts 1.2.200 Docs (99% documented)

    @@ -33,7 +33,7 @@

    - + View on GitHub @@ -87,9 +87,6 @@

    - @@ -111,6 +108,12 @@ + + @@ -129,6 +132,9 @@ +