-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #22 from karlvr/refactor-naming
Refactor naming
- Loading branch information
Showing
10 changed files
with
163 additions
and
163 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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
{{!-- | ||
Output a reference to a function to transform the serialized request value to a JavaScript value. | ||
@param <this> CodegenSchema | ||
@param prefix the import prefix for the functions | ||
--}} | ||
{{#if (isBoolean)}} | ||
{{prefix}}booleanFromRequest | ||
{{~else if (isInteger)~}} | ||
{{prefix}}integerFromRequest | ||
{{~else if (isNumber)~}} | ||
{{prefix}}numberFromRequest | ||
{{~else if (isString)~}} | ||
{{prefix}}stringFromRequest | ||
{{~else if (isBinary)~}} | ||
{{prefix}}binaryFromRequest | ||
{{~else if (isFile)~}} | ||
{{prefix}}fileFromRequest | ||
{{~else if (isObject)~}} | ||
{{prefix}}model{{className nativeType.parentType}}FromRequest | ||
{{~else if (isArray)~}} | ||
{{prefix}}arrayFromRequest{{#if component.nullable}}WithNullable{{/if}}({{>frag/fromRequest component.schema prefix=prefix}}) | ||
{{~else if (isEnum)~}} | ||
{{prefix}}enum{{className nativeType.parentType}}FromRequest | ||
{{~else if (isDate)~}} | ||
{{prefix}}dateFromRequest | ||
{{~else if (isDateTime)~}} | ||
{{prefix}}dateTimeFromRequest | ||
{{~else if (isTime)~}} | ||
{{prefix}}timeFromRequest | ||
{{~else if (isMap)~}} | ||
{{prefix}}mapFromRequest({{>frag/fromRequest component.schema prefix=prefix}}) | ||
{{~else if (isInterface)~}} | ||
{{prefix}}model{{className nativeType.parentType}}FromRequest | ||
{{~else if (isOneOf)~}} | ||
{{prefix}}oneOf{{className nativeType.parentType}}FromRequest | ||
{{~else~}} | ||
{{prefix}}unsupportedFromRequest | ||
{{~/if}} |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
{{!-- | ||
Output a reference to a function to serialize the value to the form suitable for a response. | ||
@param <this> CodegenSchema | ||
@param prefix the import prefix for the functions | ||
--}} | ||
{{#if (isBoolean)}} | ||
{{prefix}}booleanToResponse | ||
{{~else if (isInteger)~}} | ||
{{prefix}}integerToResponse | ||
{{~else if (isNumber)~}} | ||
{{prefix}}numberToResponse | ||
{{~else if (isString)~}} | ||
{{prefix}}stringToResponse | ||
{{~else if (isBinary)~}} | ||
{{prefix}}binaryToResponse | ||
{{~else if (isObject)~}} | ||
{{prefix}}model{{className nativeType.parentType}}ToResponse | ||
{{~else if (isArray)~}} | ||
{{prefix}}arrayToResponse({{>frag/toResponse component.schema prefix=prefix}}) | ||
{{~else if (isEnum)~}} | ||
{{prefix}}enum{{className nativeType.parentType}}ToResponse | ||
{{~else if (isDate)~}} | ||
{{prefix}}dateToResponse | ||
{{~else if (isDateTime)~}} | ||
{{prefix}}dateTimeToResponse | ||
{{~else if (isTime)~}} | ||
{{prefix}}timeToResponse | ||
{{~else if (isMap)~}} | ||
{{prefix}}mapToResponse({{>frag/toResponse component.schema prefix=prefix}}) | ||
{{~else if (isInterface)~}} | ||
{{prefix}}model{{className nativeType.parentType}}ToResponse | ||
{{~else if (isOneOf)~}} | ||
{{prefix}}oneOf{{className nativeType.parentType}}ToResponse | ||
{{~else~}} | ||
{{prefix}}unsupportedToResponse | ||
{{~/if}} |
Oops, something went wrong.