Skip to content

Commit

Permalink
Merge b1b78e1 into 467a04b
Browse files Browse the repository at this point in the history
  • Loading branch information
wboereboom committed Jun 14, 2022
2 parents 467a04b + b1b78e1 commit 72785e4
Show file tree
Hide file tree
Showing 3 changed files with 89 additions and 0 deletions.
27 changes: 27 additions & 0 deletions templates/typescript/licenseInfo.mustache
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
/*
* ######
* ######
* ############ ####( ###### #####. ###### ############ ############
* ############# #####( ###### #####. ###### ############# #############
* ###### #####( ###### #####. ###### ##### ###### ##### ######
* ###### ###### #####( ###### #####. ###### ##### ##### ##### ######
* ###### ###### #####( ###### #####. ###### ##### ##### ######
* ############# ############# ############# ############# ##### ######
* ############ ############ ############# ############ ##### ######
* ######
* #############
* ############
* Adyen NodeJS API Library
* Copyright (c) 2022 Adyen B.V.
* This file is open source and available under the MIT license.
* See the LICENSE file for more info.
*
* {{{appName}}}
*
* {{#version}}The version of the OpenAPI document: v{{{.}}}{{/version}}
* {{#infoEmail}}Contact: {{{.}}}{{/infoEmail}}
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
56 changes: 56 additions & 0 deletions templates/typescript/model.mustache
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
{{>licenseInfo}}
{{#models}}
{{#model}}
{{#tsImports}}
import { {{classname}} } from '{{filename}}';
{{/tsImports}}

{{#description}}
/**
* {{{description}}}
*/
{{/description}}
{{^isEnum}}
export class {{classname}} {{#parent}}extends {{{parent}}} {{/parent}}{
{{#vars}}

/**
{{#description}}
* {{{description}}}
{{/description}}
{{#deprecated}}
*
* @deprecated
{{/deprecated}}
*/
'{{name}}'{{^required}}?{{/required}}: {{#isEnum}}{{{datatypeWithEnum}}}{{/isEnum}}{{^isEnum}}{{{dataType}}}{{/isEnum}};
{{/vars}}
}

{{#hasEnums}}
export namespace {{classname}} {
{{#vars}}
{{#isEnum}}
export enum {{enumName}} {
{{#allowableValues}}
{{#enumVars}}
{{name}} = <any> {{{value}}}{{^-last}},{{/-last}}
{{/enumVars}}
{{/allowableValues}}
}
{{/isEnum}}
{{/vars}}
}
{{/hasEnums}}
{{/isEnum}}
{{#isEnum}}
export enum {{classname}} {
{{#allowableValues}}
{{#enumVars}}
{{name}} = <any> {{{value}}}{{^-last}},{{/-last}}
{{/enumVars}}
{{/allowableValues}}
}
{{/isEnum}}
{{/model}}
{{/models}}
6 changes: 6 additions & 0 deletions templates/typescript/models.mustache
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{{>licenseInfo}}
{{#models}}
{{#model}}
export * from '{{{ classFilename }}}';
{{/model}}
{{/models}}

0 comments on commit 72785e4

Please sign in to comment.