[swift5] fixes a bug encoding/decoding decimal#13589
Merged
4brunu merged 2 commits intoOpenAPITools:masterfrom Oct 5, 2022
Merged
[swift5] fixes a bug encoding/decoding decimal#135894brunu merged 2 commits intoOpenAPITools:masterfrom
4brunu merged 2 commits intoOpenAPITools:masterfrom
Conversation
4brunu
reviewed
Oct 4, 2022
4brunu
reviewed
Oct 4, 2022
| } | ||
| } | ||
|
|
||
| {{#nonPublicApi}}internal{{/nonPublicApi}}{{^nonPublicApi}}public{{/nonPublicApi}} mutating func encode(_ value: Decimal, forKey key: Self.Key) throws { |
Contributor
There was a problem hiding this comment.
@Feuerwerk can you please fix the indentation here?
Contributor
Author
There was a problem hiding this comment.
Of course, yes. Weird, i copied the indentations from the existing lines to match exactly the style. I will have a look.
4brunu
reviewed
Oct 4, 2022
| try encode(stringValue, forKey: key) | ||
| } | ||
|
|
||
| {{#nonPublicApi}}internal{{/nonPublicApi}}{{^nonPublicApi}}public{{/nonPublicApi}} mutating func encodeIfPresent(_ value: Decimal?, forKey key: Self.Key) throws { |
Contributor
There was a problem hiding this comment.
@Feuerwerk can you please fix the indentation here?
4brunu
reviewed
Oct 4, 2022
| return map | ||
| } | ||
|
|
||
| {{#nonPublicApi}}internal{{/nonPublicApi}}{{^nonPublicApi}}public{{/nonPublicApi}} func decode(_ type: Decimal.Type, forKey key: Self.Key) throws -> Decimal { |
Contributor
There was a problem hiding this comment.
@Feuerwerk can you please fix the indentation here?
4brunu
reviewed
Oct 4, 2022
| return decimalValue | ||
| } | ||
|
|
||
| {{#nonPublicApi}}internal{{/nonPublicApi}}{{^nonPublicApi}}public{{/nonPublicApi}} func decodeIfPresent(_ type: Decimal.Type, forKey key: Self.Key) throws -> Decimal? { |
Contributor
There was a problem hiding this comment.
@Feuerwerk can you please fix the indentation here?
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
@jgavris @ehyche @Edubits @jaz-ah @4brunu
Fixes the bug described in #13410
Tested with OpenAPI generator 6.2.1-snapshot and a Swift Client on iOS 14.7
All 3 commands (mvnw clean package, generate-samples.sh, export_docs_generators.sh) ran successfully.