Skip to content
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

[swift5][client] improve docs for Data #9605

Merged
merged 1 commit into from
May 30, 2021
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
Original file line number Diff line number Diff line change
Expand Up @@ -1137,6 +1137,8 @@ public String constructExampleCode(CodegenParameter codegenParameter, HashMap<St
}
} else if ("URL".equals(codegenParameter.dataType)) { // URL
return "URL(string: \"https://example.com\")!";
} else if ("Data".equals(codegenParameter.dataType)) { // URL
return "Data([9, 8, 7])";
} else if ("Date".equals(codegenParameter.dataType)) { // date
return "Date()";
} else { // numeric
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -379,7 +379,7 @@ import PetstoreClient
let number = 987 // Double | None
let double = 987 // Double | None
let patternWithoutDelimiter = "patternWithoutDelimiter_example" // String | None
let byte = 987 // Data | None
let byte = Data([9, 8, 7]) // Data | None
let integer = 987 // Int | None (optional)
let int32 = 987 // Int | None (optional)
let int64 = 987 // Int64 | None (optional)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -379,7 +379,7 @@ import PetstoreClient
let number = 987 // Double | None
let double = 987 // Double | None
let patternWithoutDelimiter = "patternWithoutDelimiter_example" // String | None
let byte = 987 // Data | None
let byte = Data([9, 8, 7]) // Data | None
let integer = 987 // Int | None (optional)
let int32 = 987 // Int | None (optional)
let int64 = 987 // Int64 | None (optional)
Expand Down
2 changes: 1 addition & 1 deletion samples/client/petstore/swift5/default/docs/FakeAPI.md
Original file line number Diff line number Diff line change
Expand Up @@ -431,7 +431,7 @@ import PetstoreClient
let number = 987 // Double | None
let double = 987 // Double | None
let patternWithoutDelimiter = "patternWithoutDelimiter_example" // String | None
let byte = 987 // Data | None
let byte = Data([9, 8, 7]) // Data | None
let integer = 987 // Int | None (optional)
let int32 = 987 // Int | None (optional)
let int64 = 987 // Int64 | None (optional)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -384,7 +384,7 @@ let float = 987 // Float | None (optional)
let double = 987 // Double | None
let string = "string_example" // String | None (optional)
let patternWithoutDelimiter = "patternWithoutDelimiter_example" // String | None
let byte = 987 // Data | None
let byte = Data([9, 8, 7]) // Data | None
let binary = URL(string: "https://example.com")! // URL | None (optional)
let date = Date() // Date | None (optional)
let dateTime = Date() // Date | None (optional)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -379,7 +379,7 @@ import PetstoreClient
let number = 987 // Double | None
let double = 987 // Double | None
let patternWithoutDelimiter = "patternWithoutDelimiter_example" // String | None
let byte = 987 // Data | None
let byte = Data([9, 8, 7]) // Data | None
let integer = 987 // Int | None (optional)
let int32 = 987 // Int | None (optional)
let int64 = 987 // Int64 | None (optional)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -358,7 +358,7 @@ import PetstoreClient
let number = 987 // Double | None
let double = 987 // Double | None
let patternWithoutDelimiter = "patternWithoutDelimiter_example" // String | None
let byte = 987 // Data | None
let byte = Data([9, 8, 7]) // Data | None
let integer = 987 // Int | None (optional)
let int32 = 987 // Int | None (optional)
let int64 = 987 // Int64 | None (optional)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -379,7 +379,7 @@ import PetstoreClient
let number = 987 // Double | None
let double = 987 // Double | None
let patternWithoutDelimiter = "patternWithoutDelimiter_example" // String | None
let byte = 987 // Data | None
let byte = Data([9, 8, 7]) // Data | None
let integer = 987 // Int | None (optional)
let int32 = 987 // Int | None (optional)
let int64 = 987 // Int64 | None (optional)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -379,7 +379,7 @@ import PetstoreClient
let number = 987 // Double | None
let double = 987 // Double | None
let patternWithoutDelimiter = "patternWithoutDelimiter_example" // String | None
let byte = 987 // Data | None
let byte = Data([9, 8, 7]) // Data | None
let integer = 987 // Int | None (optional)
let int32 = 987 // Int | None (optional)
let int64 = 987 // Int64 | None (optional)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -315,7 +315,7 @@ import PetstoreClient
let number = 987 // Double | None
let double = 987 // Double | None
let patternWithoutDelimiter = "patternWithoutDelimiter_example" // String | None
let byte = 987 // Data | None
let byte = Data([9, 8, 7]) // Data | None
let integer = 987 // Int | None (optional)
let int32 = 987 // Int | None (optional)
let int64 = 987 // Int64 | None (optional)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -379,7 +379,7 @@ import PetstoreClient
let number = 987 // Double | None
let double = 987 // Double | None
let patternWithoutDelimiter = "patternWithoutDelimiter_example" // String | None
let byte = 987 // Data | None
let byte = Data([9, 8, 7]) // Data | None
let integer = 987 // Int | None (optional)
let int32 = 987 // Int | None (optional)
let int64 = 987 // Int64 | None (optional)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -379,7 +379,7 @@ import PetstoreClient
let number = 987 // Double | None
let double = 987 // Double | None
let patternWithoutDelimiter = "patternWithoutDelimiter_example" // String | None
let byte = 987 // Data | None
let byte = Data([9, 8, 7]) // Data | None
let integer = 987 // Int | None (optional)
let int32 = 987 // Int | None (optional)
let int64 = 987 // Int64 | None (optional)
Expand Down