-
Notifications
You must be signed in to change notification settings - Fork 13
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Support for dictionaries in HTTP body (request/response).
- Loading branch information
1 parent
7e6d60c
commit 879faa8
Showing
8 changed files
with
138 additions
and
21 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
// | ||
// https://mczachurski.dev | ||
// Copyright © 2021 Marcin Czachurski and the repository contributors. | ||
// Licensed under the MIT License. | ||
// | ||
|
||
/// Possible response types. | ||
public enum APIBodyType { | ||
/// HTTP body is a dictionary. Dictionary key is always String. Parameter is a type which is a value in dictionary. | ||
case dictionary(Any.Type) | ||
|
||
/// HTTP body is a object (or array of objects). Here we have to specify object defined in `APIObject` collection. | ||
case object(Any.Type, asCollection: Bool = false) | ||
|
||
/// HPPT body is a simple type (string, integer etc.) or array of simple types. | ||
case value(Any) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters