From 14cf8933e7174bf2329ceb2f667b72e173b05a2d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jo=C3=A3o=20Neto?= Date: Wed, 24 Aug 2022 16:06:17 +0200 Subject: [PATCH 01/23] Combine javascript and javascript-apollo generator functionality --- .../languages/JavascriptClientCodegen.java | 61 +++++++++---------- 1 file changed, 28 insertions(+), 33 deletions(-) diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/JavascriptClientCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/JavascriptClientCodegen.java index fcac1e9d60bb..706360a067af 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/JavascriptClientCodegen.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/JavascriptClientCodegen.java @@ -56,28 +56,8 @@ public class JavascriptClientCodegen extends DefaultCodegen implements CodegenCo public static final String USE_ES6 = "useES6"; public static final String NPM_REPOSITORY = "npmRepository"; - final String[][] JAVASCRIPT_SUPPORTING_FILES = { - new String[]{"package.mustache", "package.json"}, - // new String[]{"index.mustache", "src/index.js", }, - // new String[]{"ApiClient.mustache", "src/ApiClient.js"}, - new String[]{"git_push.sh.mustache", "git_push.sh"}, - new String[]{"README.mustache", "README.md"}, - new String[]{"mocha.opts", "mocha.opts"}, - new String[]{"travis.yml", ".travis.yml"}, - new String[]{"gitignore.mustache", ".gitignore"} - }; - - final String[][] JAVASCRIPT_ES6_SUPPORTING_FILES = { - new String[]{"package.mustache", "package.json"}, - // new String[]{"index.mustache", "src/index.js"}, - // new String[]{"ApiClient.mustache", "src/ApiClient.js"}, - new String[]{"git_push.sh.mustache", "git_push.sh"}, - new String[]{"README.mustache", "README.md"}, - new String[]{"mocha.opts", "mocha.opts"}, - new String[]{"travis.yml", ".travis.yml"}, - new String[]{".babelrc.mustache", ".babelrc"}, - new String[]{"gitignore.mustache", ".gitignore"} - }; + public static final String LIBRARY_JAVASCRIPT = "javascript"; + public static final String LIBRARY_APOLLO = "apollo"; protected String projectName; protected String moduleName; @@ -109,7 +89,7 @@ public JavascriptClientCodegen() { apiTemplateFiles.put("api.mustache", ".js"); apiTestTemplateFiles.put("api_test.mustache", ".js"); // subfolder Javascript/es6 - embeddedTemplateDir = templateDir = "Javascript" + File.separator + "es6"; + embeddedTemplateDir = templateDir = "Javascript"; apiPackage = "api"; modelPackage = "model"; modelDocTemplateFiles.put("model_doc.mustache", ".md"); @@ -207,6 +187,13 @@ public JavascriptClientCodegen() { .defaultValue(Boolean.TRUE.toString())); cliOptions.add(new CliOption(CodegenConstants.MODEL_PROPERTY_NAMING, CodegenConstants.MODEL_PROPERTY_NAMING_DESC).defaultValue("camelCase")); cliOptions.add(new CliOption(NPM_REPOSITORY, "Use this property to set an url your private npmRepo in the package.json")); + + supportedLibraries.put(LIBRARY_JAVASCRIPT, "JavaScript client library"); + supportedLibraries.put(LIBRARY_APOLLO, "Apollo REST DataSource"); + setLibrary(LIBRARY_JAVASCRIPT); + final CliOption library = new CliOption(CodegenConstants.LIBRARY, CodegenConstants.LIBRARY_DESC).defaultValue(LIBRARY_JAVASCRIPT); + library.setEnum(supportedLibraries); + cliOptions.add(library); } @Override @@ -275,6 +262,9 @@ public void processOpts() { if (additionalProperties.containsKey(NPM_REPOSITORY)) { setNpmRepository(((String) additionalProperties.get(NPM_REPOSITORY))); } + if (additionalProperties.containsKey(CodegenConstants.LIBRARY)) { + setLibrary((String) additionalProperties.get(CodegenConstants.LIBRARY)); + } } @Override @@ -344,18 +334,18 @@ public void preprocessOpenAPI(OpenAPI openAPI) { additionalProperties.put("apiDocPath", apiDocPath); additionalProperties.put("modelDocPath", modelDocPath); - String[][] supportingTemplateFiles = JAVASCRIPT_SUPPORTING_FILES; - if (useES6) { - supportingTemplateFiles = JAVASCRIPT_ES6_SUPPORTING_FILES; - } - - for (String[] supportingTemplateFile : supportingTemplateFiles) { - supportingFiles.add(new SupportingFile(supportingTemplateFile[0], "", supportingTemplateFile[1])); - } - + supportingFiles.add(new SupportingFile("package.mustache", "package.json")); + supportingFiles.add(new SupportingFile("git_push.sh.mustache", "git_push.sh")); + supportingFiles.add(new SupportingFile("README.mustache", "README.md")); + supportingFiles.add(new SupportingFile("mocha.opts", "mocha.opts")); + supportingFiles.add(new SupportingFile("travis.yml", ".travis.yml")); + supportingFiles.add(new SupportingFile("gitignore.mustache", ".gitignore")); supportingFiles.add(new SupportingFile("index.mustache", createPath(sourceFolder, invokerPackage), "index.js")); supportingFiles.add(new SupportingFile("ApiClient.mustache", createPath(sourceFolder, invokerPackage), "ApiClient.js")); + if (useES6) { + supportingFiles.add(new SupportingFile(".babelrc.mustache", ".babelrc")); + } } @Override @@ -1000,9 +990,14 @@ public OperationsMap postProcessOperationsWithModels(OperationsMap objs, List Date: Wed, 24 Aug 2022 16:07:07 +0200 Subject: [PATCH 02/23] Combine javascript and javascript-apollo templates --- .../Javascript/{es6 => }/.babelrc.mustache | 0 .../Javascript/{es6 => }/README.mustache | 0 .../Javascript/{es6 => }/api_doc.mustache | 0 .../Javascript/{es6 => }/enumClass.mustache | 0 .../Javascript/{es6 => }/git_push.sh.mustache | 0 .../Javascript/{es6 => }/gitignore.mustache | 0 .../Javascript/{es6 => }/index.mustache | 0 .../libraries/apollo/ApiClient.mustache | 306 ++++++++++++++++++ .../Javascript/libraries/apollo/api.mustache | 89 +++++ .../libraries/apollo/api_test.mustache | 52 +++ .../libraries/apollo/package.mustache | 52 +++ .../apollo/partial_model_generic.mustache | 82 +++++ .../javascript}/ApiClient.mustache | 0 .../javascript}/api.mustache | 0 .../javascript}/api_test.mustache | 0 .../javascript}/package.mustache | 0 .../partial_model_generic.mustache | 0 .../Javascript/{es6 => }/licenseInfo.mustache | 0 .../resources/Javascript/{es6 => }/mocha.opts | 0 .../Javascript/{es6 => }/model.mustache | 0 .../Javascript/{es6 => }/model_doc.mustache | 0 .../Javascript/{es6 => }/model_test.mustache | 0 .../partial_model_enum_class.mustache | 0 .../partial_model_inner_enum.mustache | 0 .../resources/Javascript/{es6 => }/travis.yml | 0 25 files changed, 581 insertions(+) rename modules/openapi-generator/src/main/resources/Javascript/{es6 => }/.babelrc.mustache (100%) rename modules/openapi-generator/src/main/resources/Javascript/{es6 => }/README.mustache (100%) rename modules/openapi-generator/src/main/resources/Javascript/{es6 => }/api_doc.mustache (100%) rename modules/openapi-generator/src/main/resources/Javascript/{es6 => }/enumClass.mustache (100%) rename modules/openapi-generator/src/main/resources/Javascript/{es6 => }/git_push.sh.mustache (100%) rename modules/openapi-generator/src/main/resources/Javascript/{es6 => }/gitignore.mustache (100%) rename modules/openapi-generator/src/main/resources/Javascript/{es6 => }/index.mustache (100%) create mode 100644 modules/openapi-generator/src/main/resources/Javascript/libraries/apollo/ApiClient.mustache create mode 100644 modules/openapi-generator/src/main/resources/Javascript/libraries/apollo/api.mustache create mode 100644 modules/openapi-generator/src/main/resources/Javascript/libraries/apollo/api_test.mustache create mode 100644 modules/openapi-generator/src/main/resources/Javascript/libraries/apollo/package.mustache create mode 100644 modules/openapi-generator/src/main/resources/Javascript/libraries/apollo/partial_model_generic.mustache rename modules/openapi-generator/src/main/resources/Javascript/{es6 => libraries/javascript}/ApiClient.mustache (100%) rename modules/openapi-generator/src/main/resources/Javascript/{es6 => libraries/javascript}/api.mustache (100%) rename modules/openapi-generator/src/main/resources/Javascript/{es6 => libraries/javascript}/api_test.mustache (100%) rename modules/openapi-generator/src/main/resources/Javascript/{es6 => libraries/javascript}/package.mustache (100%) rename modules/openapi-generator/src/main/resources/Javascript/{es6 => libraries/javascript}/partial_model_generic.mustache (100%) rename modules/openapi-generator/src/main/resources/Javascript/{es6 => }/licenseInfo.mustache (100%) rename modules/openapi-generator/src/main/resources/Javascript/{es6 => }/mocha.opts (100%) rename modules/openapi-generator/src/main/resources/Javascript/{es6 => }/model.mustache (100%) rename modules/openapi-generator/src/main/resources/Javascript/{es6 => }/model_doc.mustache (100%) rename modules/openapi-generator/src/main/resources/Javascript/{es6 => }/model_test.mustache (100%) rename modules/openapi-generator/src/main/resources/Javascript/{es6 => }/partial_model_enum_class.mustache (100%) rename modules/openapi-generator/src/main/resources/Javascript/{es6 => }/partial_model_inner_enum.mustache (100%) rename modules/openapi-generator/src/main/resources/Javascript/{es6 => }/travis.yml (100%) diff --git a/modules/openapi-generator/src/main/resources/Javascript/es6/.babelrc.mustache b/modules/openapi-generator/src/main/resources/Javascript/.babelrc.mustache similarity index 100% rename from modules/openapi-generator/src/main/resources/Javascript/es6/.babelrc.mustache rename to modules/openapi-generator/src/main/resources/Javascript/.babelrc.mustache diff --git a/modules/openapi-generator/src/main/resources/Javascript/es6/README.mustache b/modules/openapi-generator/src/main/resources/Javascript/README.mustache similarity index 100% rename from modules/openapi-generator/src/main/resources/Javascript/es6/README.mustache rename to modules/openapi-generator/src/main/resources/Javascript/README.mustache diff --git a/modules/openapi-generator/src/main/resources/Javascript/es6/api_doc.mustache b/modules/openapi-generator/src/main/resources/Javascript/api_doc.mustache similarity index 100% rename from modules/openapi-generator/src/main/resources/Javascript/es6/api_doc.mustache rename to modules/openapi-generator/src/main/resources/Javascript/api_doc.mustache diff --git a/modules/openapi-generator/src/main/resources/Javascript/es6/enumClass.mustache b/modules/openapi-generator/src/main/resources/Javascript/enumClass.mustache similarity index 100% rename from modules/openapi-generator/src/main/resources/Javascript/es6/enumClass.mustache rename to modules/openapi-generator/src/main/resources/Javascript/enumClass.mustache diff --git a/modules/openapi-generator/src/main/resources/Javascript/es6/git_push.sh.mustache b/modules/openapi-generator/src/main/resources/Javascript/git_push.sh.mustache similarity index 100% rename from modules/openapi-generator/src/main/resources/Javascript/es6/git_push.sh.mustache rename to modules/openapi-generator/src/main/resources/Javascript/git_push.sh.mustache diff --git a/modules/openapi-generator/src/main/resources/Javascript/es6/gitignore.mustache b/modules/openapi-generator/src/main/resources/Javascript/gitignore.mustache similarity index 100% rename from modules/openapi-generator/src/main/resources/Javascript/es6/gitignore.mustache rename to modules/openapi-generator/src/main/resources/Javascript/gitignore.mustache diff --git a/modules/openapi-generator/src/main/resources/Javascript/es6/index.mustache b/modules/openapi-generator/src/main/resources/Javascript/index.mustache similarity index 100% rename from modules/openapi-generator/src/main/resources/Javascript/es6/index.mustache rename to modules/openapi-generator/src/main/resources/Javascript/index.mustache diff --git a/modules/openapi-generator/src/main/resources/Javascript/libraries/apollo/ApiClient.mustache b/modules/openapi-generator/src/main/resources/Javascript/libraries/apollo/ApiClient.mustache new file mode 100644 index 000000000000..44d7eb3ded0a --- /dev/null +++ b/modules/openapi-generator/src/main/resources/Javascript/libraries/apollo/ApiClient.mustache @@ -0,0 +1,306 @@ +{{>licenseInfo}} + +import { RESTDataSource } from 'apollo-datasource-rest'; + +{{#emitJSDoc}}/** +* @module {{#invokerPackage}}{{.}}/{{/invokerPackage}}ApiClient +* @version {{projectVersion}} +*/ + +/** +* Manages low level client-server communications, parameter marshalling, etc. There should not be any need for an +* application to use this class directly - the *Api and model classes provide the public API for the service. +* @alias module:{{#invokerPackage}}{{.}}/{{/invokerPackage}}ApiClient +* @class +*/{{/emitJSDoc}} +export default class ApiClient extends RESTDataSource { + constructor(baseURL = '{{{basePath}}}') { + super() + + {{#emitJSDoc}}/** + * The base URL against which to resolve every API call's (relative) path. + * @type {String} + * @default {{{basePath}}} + */{{/emitJSDoc}} + this.baseURL = baseURL.replace(/\/+$/, ''); + + {{#emitJSDoc}}/** + * The authentication methods to be included for all API calls. + * @type {Array.} + */{{/emitJSDoc}}{{=< >=}} + this.authentications = { +<#authMethods> +<#isBasic> +<#isBasicBasic> + '': {type: 'basic'}<^-last>, + +<#isBasicBearer> + '': {type: 'bearer'}<^-last>,<#bearerFormat> // <&.> + + +<#isApiKey> + '': {type: 'apiKey', 'in': <#isKeyInHeader>'header'<^isKeyInHeader>'query', name: ''}<^-last>, + +<#isOAuth> + '': {type: 'oauth2'}<^-last>, + + + } + } + + paramToString(param) { + if (param == undefined || param == null) { + return ''; + } + if (param instanceof Date) { + return param.toJSON(); + } + + return param.toString(); + } + + parametrizePath(path, pathParams) { + return path.replace(/\{([\w-]+)\}/g, (fullMatch, key) => { + var value; + if (pathParams.hasOwnProperty(key)) { + value = this.paramToString(pathParams[key]); + } else { + value = fullMatch; + } + + return encodeURIComponent(value); + }); + } + + isFileParam(param) { + // fs.ReadStream in Node.js and Electron (but not in runtime like browserify) + if (typeof require === 'function') { + let fs; + try { + fs = require('fs'); + } catch (err) {} + if (fs && fs.ReadStream && param instanceof fs.ReadStream) { + return true; + } + } + + // Buffer in Node.js + if (typeof Buffer === 'function' && param instanceof Buffer) { + return true; + } + + // Blob in browser + if (typeof Blob === 'function' && param instanceof Blob) { + return true; + } + + // File in browser (it seems File object is also instance of Blob, but keep this for safe) + if (typeof File === 'function' && param instanceof File) { + return true; + } + + return false; + } + + normalizeParams(params) { + var newParams = {}; + for (var key in params) { + if (params.hasOwnProperty(key) && params[key] != undefined && params[key] != null) { + var value = params[key]; + if (this.isFileParam(value) || Array.isArray(value)) { + newParams[key] = value; + } else { + newParams[key] = this.paramToString(value); + } + } + } + + return newParams; + } + + buildCollectionParam(param, collectionFormat) { + if (param == null) { + return null; + } + switch (collectionFormat) { + case 'csv': + return param.map(this.paramToString).join(','); + case 'ssv': + return param.map(this.paramToString).join(' '); + case 'tsv': + return param.map(this.paramToString).join('\t'); + case 'pipes': + return param.map(this.paramToString).join('|'); + case 'multi': + //return the array directly as SuperAgent will handle it as expected + return param.map(this.paramToString); + default: + throw new Error('Unknown collection format: ' + collectionFormat); + } + } + + applyAuthOptions(fetchOptions, authNames) { + fetchOptions.headers = fetchOptions.headers || {}; + + authNames.forEach((authName) => { + var auth = this.authentications[authName]; + switch (auth.type) { + case 'basic': + if (auth.username || auth.password) { + fetchOptions.headers['Authorization'] = 'Basic ' + base64.encode(auth.username + ":" + auth.password); + } + + break; + case 'bearer': + case 'oauth2': + if (auth.accessToken) { + fetchOptions.headers['Authorization'] = 'Bearer ' + auth.accessToken; + } + + break; + case 'apiKey': + if (auth.apiKey) { + var data = {}; + if (auth.apiKeyPrefix) { + data[auth.name] = auth.apiKeyPrefix + ' ' + auth.apiKey; + } else { + data[auth.name] = auth.apiKey; + } + + if (auth['in'] === 'header') { + Object.assign(fetchOptions.headers, data); + } else { + Object.assign(fetchOptions.params, data); + } + } + + break; + default: + throw new Error('Unknown authentication type: ' + auth.type); + } + }); + } + + async callApi(path, httpMethod, pathParams, + queryParams, headerParams, formParams, bodyParam, authNames, + contentTypes, accepts, returnType, requestInit) { + + var parameterizedPath = this.parametrizePath(path, pathParams); + var fetchOptions = { + headers: headerParams, + params: queryParams + }; + + this.applyAuthOptions(fetchOptions, authNames); + + var body = null; + + if (bodyParam !== null && bodyParam !== undefined) { + body = bodyParam; + } else if (formParams !== null && formParams !== undefined) { + var _formParams = this.normalizeParams(formParams); + for (var key in _formParams) { + if (_formParams.hasOwnProperty(key)) { + body[key] = _formParams[key]; + } + } + } + + var response; + var httpMethodFn = httpMethod.toLowerCase(); + + if (httpMethodFn == 'get' || httpMethodFn == 'delete') { + response = await this[httpMethodFn](parameterizedPath, [], requestInit); + } else { + response = await this[httpMethodFn](parameterizedPath, body, requestInit) + } + + var convertedResponse = ApiClient.convertToType(response, returnType); + return convertedResponse; + } + + static parseDate(str) { + return new Date(str); + } + + static convertToType(data, type) { + if (data === null || data === undefined) + return data + + switch (type) { + case 'Boolean': + return Boolean(data); + case 'Integer': + return parseInt(data, 10); + case 'Number': + return parseFloat(data); + case 'String': + return String(data); + case 'Date': + return ApiClient.parseDate(String(data)); + case 'Blob': + return data; + default: + if (typeof type === "object") { + // generic object, return directly + return data; + } else if (typeof type.constructFromObject === 'function') { + // for model type like User and enum class + return type.constructFromObject(data); + } else if (Array.isArray(type)) { + // for array type like: ['String'] + var itemType = type[0]; + + return data.map((item) => { + return ApiClient.convertToType(item, itemType); + }); + } else if (typeof type === 'object') { + // for plain object type like: {'String': 'Integer'} + var keyType, valueType; + for (var k in type) { + if (type.hasOwnProperty(k)) { + keyType = k; + valueType = type[k]; + break; + } + } + + var result = {}; + for (var k in data) { + if (data.hasOwnProperty(k)) { + var key = ApiClient.convertToType(k, keyType); + var value = ApiClient.convertToType(data[k], valueType); + result[key] = value; + } + } + + return result; + } else { + // for unknown type, return the data directly + return data; + } + } + } + + static constructFromObject(data, obj, itemType) { + if (Array.isArray(data)) { + for (var i = 0; i < data.length; i++) { + if (data.hasOwnProperty(i)) + obj[i] = ApiClient.convertToType(data[i], itemType); + } + } else { + for (var k in data) { + if (data.hasOwnProperty(k)) + obj[k] = ApiClient.convertToType(data[k], itemType); + } + } + }; +} + +ApiClient.CollectionFormatEnum = { + CSV: ',', + SSV: ' ', + TSV: '\t', + PIPES: '|', + MULTI: 'multi' +}; diff --git a/modules/openapi-generator/src/main/resources/Javascript/libraries/apollo/api.mustache b/modules/openapi-generator/src/main/resources/Javascript/libraries/apollo/api.mustache new file mode 100644 index 000000000000..82ab5f8c99c7 --- /dev/null +++ b/modules/openapi-generator/src/main/resources/Javascript/libraries/apollo/api.mustache @@ -0,0 +1,89 @@ +{{>licenseInfo}} + +{{=< >=}} + +import ApiClient from "../ApiClient"; +<#imports>import <&import> from '../<#modelPackage><&modelPackage>/'; + + +<#emitJSDoc>/** +* service. +* @module <#invokerPackage><&invokerPackage>/<#apiPackage><&apiPackage>/ +* @version <&projectVersion> +*/ +export default class <&classname> extends ApiClient { + + <#emitJSDoc>/** + * Constructs a new <&classname>. <#description> + * + * @alias module:<#invokerPackage><&invokerPackage>/<#apiPackage><&apiPackage>/ + * @class + */ + constructor(baseURL = '<&basePath>') { + super(baseURL); + } + +<#operations><#operation><#emitJSDoc> + /**<#summary> + * <&summary><#notes> + * <¬es><#allParams><#required> + * @param {<&vendorExtensions.x-jsdoc-type>} <¶mName> <&description><#hasOptionalParams> + * @param {Object} opts Optional parameters<#allParams><^required> + * @param {<&vendorExtensions.x-jsdoc-type>} opts.<¶mName> <&description><#defaultValue> (default to <&.>) + * @param requestInit Dynamic configuration. @see {@link https://github.com/apollographql/apollo-server/pull/1277} + <=| |=>* @return {Promise|#returnType|<|&vendorExtensions.x-jsdoc-type|>|/returnType|}|=< >=| + */ + async () { + <#vendorExtensions.x-codegen-has-optional-params> + opts = opts || {}; + + let postBody = <#bodyParam><#required><^required>opts['']<^bodyParam>null; +<#allParams> +<#required> + // verify the required parameter '' is set + if ( === undefined || === null) { + throw new Error("Missing the required parameter '' when calling "); + } + + + + let pathParams = {<#pathParams> + '': <#required><^required>opts['']<^-last>, + }; + let queryParams = {<#queryParams> + '': <#collectionFormat>this.buildCollectionParam(<#required><^required>opts[''], '')<^collectionFormat><#required><^required>opts['']<^-last>, + }; + let headerParams = { + 'User-Agent': '<#httpUserAgent><.><^httpUserAgent>OpenAPI-Generator/<&projectVersion>/Javascript',<#headerParams> + '': <#required><^required>opts['']<^-last>, + }; + let formParams = {<#formParams> + '': <#collectionFormat>this.buildCollectionParam(<#required><^required>opts[''], '')<^collectionFormat><#required><^required>opts['']<^-last>, + }; + + let authNames = [<#authMethods>''<^-last>, ]; + let contentTypes = [<#consumes>'<& mediaType>'<^-last>, ]; + let accepts = [<#produces>'<& mediaType>'<^-last>, ]; + let returnType = <#vendorExtensions.x-return-type><&vendorExtensions.x-return-type><^vendorExtensions.x-return-type>null; + <#servers.0> + let basePaths = [<#servers>''<^-last>, ]; + let basePath = basePaths[0]; // by default use the first one in "servers" defined in OpenAPI + if (typeof opts['_base_path_index'] !== 'undefined') { + if (opts['_base_path_index'] >= basePaths.length || opts['_base_path_index'] < 0) { + throw new Error("Invalid index " + opts['_base_path_index'] + " when selecting the host settings. Must be less than " + basePaths.length); + } + basePath = basePaths[opts['_base_path_index']]; + } + + + + return this.callApi( + '<&path>', '', + pathParams, queryParams, headerParams, formParams, postBody, + authNames, contentTypes, accepts, returnType, requestInit + ); + } + + +} +<={{ }}=> diff --git a/modules/openapi-generator/src/main/resources/Javascript/libraries/apollo/api_test.mustache b/modules/openapi-generator/src/main/resources/Javascript/libraries/apollo/api_test.mustache new file mode 100644 index 000000000000..ec22d00bef6b --- /dev/null +++ b/modules/openapi-generator/src/main/resources/Javascript/libraries/apollo/api_test.mustache @@ -0,0 +1,52 @@ +{{>licenseInfo}} +(function(root, factory) { + if (typeof define === 'function' && define.amd) { + // AMD. + define(['expect.js', process.cwd()+'/src/{{#invokerPackage}}{{.}}/{{/invokerPackage}}index'], factory); + } else if (typeof module === 'object' && module.exports) { + // CommonJS-like environments that support module.exports, like Node. + factory(require('expect.js'), require(process.cwd()+'/src/{{#invokerPackage}}{{.}}/{{/invokerPackage}}index')); + } +}(this, function(expect, {{moduleName}}) { + 'use strict'; + + var instance; + + beforeEach(function() { + instance = new {{moduleName}}.{{classname}}(); + }); + + var getProperty = function(object, getter, property) { + // Use getter method if present; otherwise, get the property directly. + if (typeof object[getter] === 'function') + return object[getter](); + else + return object[property]; + } + + var setProperty = function(object, setter, property, value) { + // Use setter method if present; otherwise, set the property directly. + if (typeof object[setter] === 'function') + object[setter](value); + else + object[property] = value; + } + + describe('{{classname}}', function() { +{{#operations}} +{{#operation}} + describe('{{operationId}}', function() { + it('should call {{operationId}} successfully', function(done) { + //uncomment below and update the code to test {{operationId}} + //instance.{{operationId}}(function(error) { + // if (error) throw error; + //expect().to.be(); + //}); + done(); + }); + }); +{{/operation}} +{{/operations}} + }); + +})); diff --git a/modules/openapi-generator/src/main/resources/Javascript/libraries/apollo/package.mustache b/modules/openapi-generator/src/main/resources/Javascript/libraries/apollo/package.mustache new file mode 100644 index 000000000000..60e3876d46c8 --- /dev/null +++ b/modules/openapi-generator/src/main/resources/Javascript/libraries/apollo/package.mustache @@ -0,0 +1,52 @@ +{ + "name": "{{{projectName}}}", + "version": "{{{projectVersion}}}", + "description": "{{{projectDescription}}}", + "license": "{{licenseName}}", + "main": "dist{{#invokerPackage}}/{{.}}{{/invokerPackage}}/index.js", + "scripts": { + "build": "babel src -d dist", + "prepare": "npm run build", + "test": "mocha --require @babel/register --recursive" + }, + "browser": { + "fs": false + }, +{{#npmRepository}} + "publishConfig":{ + "registry":"{{npmRepository}}" + }, +{{/npmRepository}} + "dependencies": { + "@babel/cli": "^7.0.0", + "apollo-datasource-rest": "^3.6.1", + "superagent": "^5.3.0" + }, + "devDependencies": { + "@babel/core": "^7.0.0", + "@babel/plugin-proposal-class-properties": "^7.0.0", + "@babel/plugin-proposal-decorators": "^7.0.0", + "@babel/plugin-proposal-do-expressions": "^7.0.0", + "@babel/plugin-proposal-export-default-from": "^7.0.0", + "@babel/plugin-proposal-export-namespace-from": "^7.0.0", + "@babel/plugin-proposal-function-bind": "^7.0.0", + "@babel/plugin-proposal-function-sent": "^7.0.0", + "@babel/plugin-proposal-json-strings": "^7.0.0", + "@babel/plugin-proposal-logical-assignment-operators": "^7.0.0", + "@babel/plugin-proposal-nullish-coalescing-operator": "^7.0.0", + "@babel/plugin-proposal-numeric-separator": "^7.0.0", + "@babel/plugin-proposal-optional-chaining": "^7.0.0", + "@babel/plugin-proposal-pipeline-operator": "^7.0.0", + "@babel/plugin-proposal-throw-expressions": "^7.0.0", + "@babel/plugin-syntax-dynamic-import": "^7.0.0", + "@babel/plugin-syntax-import-meta": "^7.0.0", + "@babel/preset-env": "^7.0.0", + "@babel/register": "^7.0.0", + "expect.js": "^0.3.1", + "mocha": "^8.0.1", + "sinon": "^7.2.0" + }, + "files": [ + "dist" + ] +} diff --git a/modules/openapi-generator/src/main/resources/Javascript/libraries/apollo/partial_model_generic.mustache b/modules/openapi-generator/src/main/resources/Javascript/libraries/apollo/partial_model_generic.mustache new file mode 100644 index 000000000000..bc69d91c3423 --- /dev/null +++ b/modules/openapi-generator/src/main/resources/Javascript/libraries/apollo/partial_model_generic.mustache @@ -0,0 +1,82 @@ + +{{#models}}{{#model}}{{#emitJSDoc}}/** + * The {{classname}} model module. + * @module {{#invokerPackage}}{{.}}/{{/invokerPackage}}{{#modelPackage}}{{.}}/{{/modelPackage}}{{classname}} + * @version {{projectVersion}} + */{{/emitJSDoc}} +class {{classname}} {{#parent}}{{^parentModel}}{{#vendorExtensions.x-is-array}}extends Array {{/vendorExtensions.x-is-array}}{{/parentModel}}{{/parent}}{ + {{#vars}} + {{#emitJSDoc}}/** + * @member {{=< >=}}{<&vendorExtensions.x-jsdoc-type>}<={{ }}=> {{baseName}} + * @type {{=< >=}}{<&vendorExtensions.x-jsdoc-type>}<={{ }}=>{{#defaultValue}} + * @default {{{.}}}{{/defaultValue}} + */{{/emitJSDoc}} + {{baseName}}{{#defaultValue}} = {{{.}}}{{/defaultValue}}; + {{/vars}} + + {{#useInheritance}}{{#interfaceModels}}{{#allVars}}{{#emitJSDoc}}/** + * @member {{=< >=}}{<&vendorExtensions.x-jsdoc-type>}<={{ }}=> {{baseName}} + * @type {{=< >=}}{<&vendorExtensions.x-jsdoc-type>}<={{ }}=> + */{{/emitJSDoc}} + #{{baseName}}; + {{/allVars}}{{/interfaceModels}}{{/useInheritance}} + + {{#emitJSDoc}}/** + * Constructs a new {{classname}}.{{#description}} + * {{.}}{{/description}} + * @alias module:{{#invokerPackage}}{{.}}/{{/invokerPackage}}{{#modelPackage}}{{.}}/{{/modelPackage}}{{classname}}{{#useInheritance}}{{#parent}} + * @extends {{#parentModel}}module:{{#invokerPackage}}{{.}}/{{/invokerPackage}}{{#modelPackage}}{{.}}/{{/modelPackage}}{{classname}}{{/parentModel}}{{^parentModel}}{{#vendorExtensions.x-is-array}}Array{{/vendorExtensions.x-is-array}}{{#vendorExtensions.x-is-map}}Object{{/vendorExtensions.x-is-map}}{{/parentModel}}{{/parent}}{{#interfaces}} + * @implements module:{{#invokerPackage}}{{.}}/{{/invokerPackage}}{{#modelPackage}}{{.}}/{{/modelPackage}}{{.}}{{/interfaces}}{{/useInheritance}}{{#vendorExtensions.x-all-required}} + * @param {{name}} {{=< >=}}{<&vendorExtensions.x-jsdoc-type>}<={{ }}=> {{{description}}}{{/vendorExtensions.x-all-required}} + */{{/emitJSDoc}} + constructor({{#vendorExtensions.x-all-required}}{{name}}{{^-last}}, {{/-last}}{{/vendorExtensions.x-all-required}}) { {{#parent}}{{^parentModel}}{{#vendorExtensions.x-is-array}} + super(); + {{/vendorExtensions.x-is-array}}{{/parentModel}}{{/parent}}{{#useInheritance}} + {{#interfaceModels}}{{classname}}.initialize(this{{#vendorExtensions.x-all-required}}, {{name}}{{/vendorExtensions.x-all-required}});{{/interfaceModels}}{{/useInheritance}} + {{classname}}.initialize(this{{#vendorExtensions.x-all-required}}, {{name}}{{/vendorExtensions.x-all-required}}); + } + + {{#emitJSDoc}}/** + * Initializes the fields of this object. + * This method is used by the constructors of any subclasses, in order to implement multiple inheritance (mix-ins). + * Only for internal use. + */{{/emitJSDoc}} + static initialize(obj{{#vendorExtensions.x-all-required}}, {{name}}{{/vendorExtensions.x-all-required}}) { {{#vars}}{{#required}} + obj['{{baseName}}'] = {{name}};{{/required}}{{/vars}} + } + + {{#emitJSDoc}}/** + * Constructs a {{classname}} from a plain JavaScript object, optionally creating a new instance. + * Copies all relevant properties from data to obj if supplied or a new instance if not. + * @param {Object} data The plain JavaScript object bearing properties of interest. + * @param {{=< >=}}{module:<#invokerPackage>/<#modelPackage>/}<={{ }}=> obj Optional instance to populate. + * @return {{=< >=}}{module:<#invokerPackage>/<#modelPackage>/}<={{ }}=> The populated {{classname}} instance. + */{{/emitJSDoc}} + static constructFromObject(data, obj) { + if (data){{! TODO: support polymorphism: discriminator property on data determines class to instantiate.}} { + obj = obj || new {{classname}}();{{#parent}}{{^parentModel}} + + ApiClient.constructFromObject(data, obj, '{{vendorExtensions.x-item-type}}'); + {{/parentModel}}{{/parent}}{{#useInheritance}}{{#parentModel}} + {{classname}}.constructFromObject(data, obj);{{/parentModel}}{{#interfaces}} + {{.}}.constructFromObject(data, obj);{{/interfaces}}{{/useInheritance}} + + {{#vars}} + if (data.hasOwnProperty('{{baseName}}')) { + obj['{{baseName}}']{{{defaultValueWithParam}}} + } + {{/vars}} + } + return obj; + } + {{/model}} +} + +{{#vars}}{{#isEnum}}{{^isContainer}} +{{>partial_model_inner_enum}} +{{/isContainer}}{{/isEnum}}{{#items.isEnum}}{{#items}}{{^isContainer}} +{{>partial_model_inner_enum}} +{{/isContainer}}{{/items}}{{/items.isEnum}}{{/vars}} + +export default {{classname}}; +{{/models}} diff --git a/modules/openapi-generator/src/main/resources/Javascript/es6/ApiClient.mustache b/modules/openapi-generator/src/main/resources/Javascript/libraries/javascript/ApiClient.mustache similarity index 100% rename from modules/openapi-generator/src/main/resources/Javascript/es6/ApiClient.mustache rename to modules/openapi-generator/src/main/resources/Javascript/libraries/javascript/ApiClient.mustache diff --git a/modules/openapi-generator/src/main/resources/Javascript/es6/api.mustache b/modules/openapi-generator/src/main/resources/Javascript/libraries/javascript/api.mustache similarity index 100% rename from modules/openapi-generator/src/main/resources/Javascript/es6/api.mustache rename to modules/openapi-generator/src/main/resources/Javascript/libraries/javascript/api.mustache diff --git a/modules/openapi-generator/src/main/resources/Javascript/es6/api_test.mustache b/modules/openapi-generator/src/main/resources/Javascript/libraries/javascript/api_test.mustache similarity index 100% rename from modules/openapi-generator/src/main/resources/Javascript/es6/api_test.mustache rename to modules/openapi-generator/src/main/resources/Javascript/libraries/javascript/api_test.mustache diff --git a/modules/openapi-generator/src/main/resources/Javascript/es6/package.mustache b/modules/openapi-generator/src/main/resources/Javascript/libraries/javascript/package.mustache similarity index 100% rename from modules/openapi-generator/src/main/resources/Javascript/es6/package.mustache rename to modules/openapi-generator/src/main/resources/Javascript/libraries/javascript/package.mustache diff --git a/modules/openapi-generator/src/main/resources/Javascript/es6/partial_model_generic.mustache b/modules/openapi-generator/src/main/resources/Javascript/libraries/javascript/partial_model_generic.mustache similarity index 100% rename from modules/openapi-generator/src/main/resources/Javascript/es6/partial_model_generic.mustache rename to modules/openapi-generator/src/main/resources/Javascript/libraries/javascript/partial_model_generic.mustache diff --git a/modules/openapi-generator/src/main/resources/Javascript/es6/licenseInfo.mustache b/modules/openapi-generator/src/main/resources/Javascript/licenseInfo.mustache similarity index 100% rename from modules/openapi-generator/src/main/resources/Javascript/es6/licenseInfo.mustache rename to modules/openapi-generator/src/main/resources/Javascript/licenseInfo.mustache diff --git a/modules/openapi-generator/src/main/resources/Javascript/es6/mocha.opts b/modules/openapi-generator/src/main/resources/Javascript/mocha.opts similarity index 100% rename from modules/openapi-generator/src/main/resources/Javascript/es6/mocha.opts rename to modules/openapi-generator/src/main/resources/Javascript/mocha.opts diff --git a/modules/openapi-generator/src/main/resources/Javascript/es6/model.mustache b/modules/openapi-generator/src/main/resources/Javascript/model.mustache similarity index 100% rename from modules/openapi-generator/src/main/resources/Javascript/es6/model.mustache rename to modules/openapi-generator/src/main/resources/Javascript/model.mustache diff --git a/modules/openapi-generator/src/main/resources/Javascript/es6/model_doc.mustache b/modules/openapi-generator/src/main/resources/Javascript/model_doc.mustache similarity index 100% rename from modules/openapi-generator/src/main/resources/Javascript/es6/model_doc.mustache rename to modules/openapi-generator/src/main/resources/Javascript/model_doc.mustache diff --git a/modules/openapi-generator/src/main/resources/Javascript/es6/model_test.mustache b/modules/openapi-generator/src/main/resources/Javascript/model_test.mustache similarity index 100% rename from modules/openapi-generator/src/main/resources/Javascript/es6/model_test.mustache rename to modules/openapi-generator/src/main/resources/Javascript/model_test.mustache diff --git a/modules/openapi-generator/src/main/resources/Javascript/es6/partial_model_enum_class.mustache b/modules/openapi-generator/src/main/resources/Javascript/partial_model_enum_class.mustache similarity index 100% rename from modules/openapi-generator/src/main/resources/Javascript/es6/partial_model_enum_class.mustache rename to modules/openapi-generator/src/main/resources/Javascript/partial_model_enum_class.mustache diff --git a/modules/openapi-generator/src/main/resources/Javascript/es6/partial_model_inner_enum.mustache b/modules/openapi-generator/src/main/resources/Javascript/partial_model_inner_enum.mustache similarity index 100% rename from modules/openapi-generator/src/main/resources/Javascript/es6/partial_model_inner_enum.mustache rename to modules/openapi-generator/src/main/resources/Javascript/partial_model_inner_enum.mustache diff --git a/modules/openapi-generator/src/main/resources/Javascript/es6/travis.yml b/modules/openapi-generator/src/main/resources/Javascript/travis.yml similarity index 100% rename from modules/openapi-generator/src/main/resources/Javascript/es6/travis.yml rename to modules/openapi-generator/src/main/resources/Javascript/travis.yml From eeb7f2508bf3e0af19874c09e8c13ef56a3a6f01 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jo=C3=A3o=20Neto?= Date: Wed, 24 Aug 2022 16:07:21 +0200 Subject: [PATCH 03/23] update configs --- bin/configs/javascript-apollo.yaml | 7 +++++++ bin/configs/javascript-es6.yaml | 3 ++- bin/configs/javascript-promise-es6.yaml | 3 ++- 3 files changed, 11 insertions(+), 2 deletions(-) create mode 100644 bin/configs/javascript-apollo.yaml diff --git a/bin/configs/javascript-apollo.yaml b/bin/configs/javascript-apollo.yaml new file mode 100644 index 000000000000..74853eec57f6 --- /dev/null +++ b/bin/configs/javascript-apollo.yaml @@ -0,0 +1,7 @@ +generatorName: javascript +outputDir: samples/client/petstore/javascript-apollo +library: apollo +inputSpec: modules/openapi-generator/src/test/resources/3_0/javascript/petstore-with-fake-endpoints-models-for-testing.yaml +templateDir: modules/openapi-generator/src/main/resources/Javascript +additionalProperties: + appName: PetstoreClient diff --git a/bin/configs/javascript-es6.yaml b/bin/configs/javascript-es6.yaml index d561ad52c6cb..67f013b0c513 100644 --- a/bin/configs/javascript-es6.yaml +++ b/bin/configs/javascript-es6.yaml @@ -1,6 +1,7 @@ generatorName: javascript outputDir: samples/client/petstore/javascript-es6 +library: javascript inputSpec: modules/openapi-generator/src/test/resources/3_0/javascript/petstore-with-fake-endpoints-models-for-testing.yaml -templateDir: modules/openapi-generator/src/main/resources/Javascript/es6 +templateDir: modules/openapi-generator/src/main/resources/Javascript additionalProperties: appName: PetstoreClient diff --git a/bin/configs/javascript-promise-es6.yaml b/bin/configs/javascript-promise-es6.yaml index 6947fd704403..9ffae513eb89 100644 --- a/bin/configs/javascript-promise-es6.yaml +++ b/bin/configs/javascript-promise-es6.yaml @@ -1,7 +1,8 @@ generatorName: javascript outputDir: samples/client/petstore/javascript-promise-es6 +library: javascript inputSpec: modules/openapi-generator/src/test/resources/3_0/javascript/petstore-with-fake-endpoints-models-for-testing.yaml -templateDir: modules/openapi-generator/src/main/resources/Javascript/es6 +templateDir: modules/openapi-generator/src/main/resources/Javascript additionalProperties: usePromises: "true" appName: PetstoreClient From 8a94f886502edaf1cc8dd6d4bec6b915883e3897 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jo=C3=A3o=20Neto?= Date: Wed, 24 Aug 2022 16:07:37 +0200 Subject: [PATCH 04/23] deprecate javascript-apollo generator --- .../codegen/languages/JavascriptApolloClientCodegen.java | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/JavascriptApolloClientCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/JavascriptApolloClientCodegen.java index 39ba96500a70..111403b11256 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/JavascriptApolloClientCodegen.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/JavascriptApolloClientCodegen.java @@ -104,6 +104,10 @@ public JavascriptApolloClientCodegen() { modifyFeatureSet(features -> features.includeDocumentationFeatures(DocumentationFeature.Readme)); + generatorMetadata = GeneratorMetadata.newBuilder(generatorMetadata) + .stability(Stability.DEPRECATED) + .build(); + outputFolder = "generated-code/js"; modelTemplateFiles.put("model.mustache", ".js"); modelTestTemplateFiles.put("model_test.mustache", ".js"); From d94e86fdcb830f1a1ed154b812a4855c897ff280 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jo=C3=A3o=20Neto?= Date: Wed, 24 Aug 2022 16:08:14 +0200 Subject: [PATCH 05/23] bonus magic string deletion :sparkles: --- .../src/main/java/org/openapitools/codegen/DefaultCodegen.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/DefaultCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/DefaultCodegen.java index daf14d24aa6b..2a7570e4bb20 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/DefaultCodegen.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/DefaultCodegen.java @@ -5936,7 +5936,7 @@ protected CliOption buildLibraryCliOption(Map supportedLibraries for (String lib : supportedLibraries.keySet()) { sb.append("\n").append(lib).append(" - ").append(supportedLibraries.get(lib)); } - return new CliOption("library", sb.toString()); + return new CliOption(CodegenConstants.LIBRARY, sb.toString()); } /** From a0965ed5e76277947f21414495fffcd16f9acd91 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jo=C3=A3o=20Neto?= Date: Wed, 24 Aug 2022 16:11:14 +0200 Subject: [PATCH 06/23] update samples --- .../petstore/javascript-apollo/.babelrc | 33 + .../petstore/javascript-apollo/.gitignore | 33 + .../.openapi-generator/FILES | 134 +++ .../.openapi-generator/VERSION | 2 +- .../petstore/javascript-apollo/README.md | 109 ++- .../docs/AdditionalPropertiesClass.md | 10 + .../petstore/javascript-apollo/docs/Animal.md | 10 + .../javascript-apollo/docs/AnotherFakeApi.md | 54 ++ .../docs/ArrayOfArrayOfNumberOnly.md | 9 + .../docs/ArrayOfNumberOnly.md | 9 + .../javascript-apollo/docs/ArrayTest.md | 11 + .../javascript-apollo/docs/Capitalization.md | 14 + .../petstore/javascript-apollo/docs/Cat.md | 9 + .../javascript-apollo/docs/CatAllOf.md | 9 + .../javascript-apollo/docs/Category.md | 2 +- .../javascript-apollo/docs/ClassModel.md | 9 + .../petstore/javascript-apollo/docs/Client.md | 9 + .../javascript-apollo/docs/DefaultApi.md | 48 + .../docs/DeprecatedObject.md | 9 + .../petstore/javascript-apollo/docs/Dog.md | 9 + .../javascript-apollo/docs/DogAllOf.md | 9 + .../javascript-apollo/docs/EnumArrays.md | 32 + .../javascript-apollo/docs/EnumClass.md | 12 + .../javascript-apollo/docs/EnumTest.md | 64 ++ .../javascript-apollo/docs/FakeApi.md | 880 ++++++++++++++++++ .../docs/FakeClassnameTags123Api.md | 60 ++ .../petstore/javascript-apollo/docs/File.md | 9 + .../docs/FileSchemaTestClass.md | 10 + .../petstore/javascript-apollo/docs/Foo.md | 9 + .../docs/FooGetDefaultResponse.md | 9 + .../javascript-apollo/docs/FormatTest.md | 24 + .../javascript-apollo/docs/HasOnlyReadOnly.md | 10 + .../docs/HealthCheckResult.md | 9 + .../petstore/javascript-apollo/docs/List.md | 9 + .../javascript-apollo/docs/MapTest.md | 23 + ...dPropertiesAndAdditionalPropertiesClass.md | 11 + .../docs/Model200Response.md | 10 + .../petstore/javascript-apollo/docs/Name.md | 12 + .../javascript-apollo/docs/NullableClass.md | 20 + .../javascript-apollo/docs/NumberOnly.md | 9 + .../docs/ObjectWithDeprecatedFields.md | 12 + .../javascript-apollo/docs/OuterComposite.md | 11 + .../javascript-apollo/docs/OuterEnum.md | 12 + .../docs/OuterEnumDefaultValue.md | 12 + .../docs/OuterEnumInteger.md | 12 + .../docs/OuterEnumIntegerDefaultValue.md | 12 + .../docs/OuterObjectWithEnumProperty.md | 9 + .../petstore/javascript-apollo/docs/PetApi.md | 84 +- .../javascript-apollo/docs/ReadOnlyFirst.md | 10 + .../petstore/javascript-apollo/docs/Return.md | 9 + .../docs/SpecialModelName.md | 9 + .../javascript-apollo/docs/StoreApi.md | 18 +- .../javascript-apollo/docs/UserApi.md | 52 +- .../petstore/javascript-apollo/git_push.sh | 7 +- .../petstore/javascript-apollo/package.json | 33 +- .../javascript-apollo/src/ApiClient.js | 30 +- .../src/api/AnotherFakeApi.js | 73 ++ .../javascript-apollo/src/api/DefaultApi.js | 66 ++ .../javascript-apollo/src/api/FakeApi.js | 762 +++++++++++++++ .../src/api/FakeClassnameTags123Api.js | 73 ++ .../javascript-apollo/src/api/PetApi.js | 157 +++- .../javascript-apollo/src/api/StoreApi.js | 56 +- .../javascript-apollo/src/api/UserApi.js | 110 ++- .../petstore/javascript-apollo/src/index.js | 312 ++++++- .../src/model/AdditionalPropertiesClass.js | 77 ++ .../javascript-apollo/src/model/Animal.js | 80 ++ .../src/model/ApiResponse.js | 3 +- .../src/model/ArrayOfArrayOfNumberOnly.js | 69 ++ .../src/model/ArrayOfNumberOnly.js | 69 ++ .../javascript-apollo/src/model/ArrayTest.js | 86 ++ .../src/model/Capitalization.js | 109 +++ .../javascript-apollo/src/model/Cat.js | 93 ++ .../javascript-apollo/src/model/CatAllOf.js | 69 ++ .../javascript-apollo/src/model/Category.js | 14 +- .../javascript-apollo/src/model/ClassModel.js | 70 ++ .../javascript-apollo/src/model/Client.js | 69 ++ .../src/model/DeprecatedObject.js | 69 ++ .../javascript-apollo/src/model/Dog.js | 93 ++ .../javascript-apollo/src/model/DogAllOf.js | 69 ++ .../javascript-apollo/src/model/EnumArrays.js | 119 +++ .../javascript-apollo/src/model/EnumClass.js | 53 ++ .../javascript-apollo/src/model/EnumTest.js | 227 +++++ .../javascript-apollo/src/model/File.js | 70 ++ .../src/model/FileSchemaTestClass.js | 77 ++ .../javascript-apollo/src/model/Foo.js | 70 ++ .../src/model/FooGetDefaultResponse.js | 70 ++ .../javascript-apollo/src/model/FormatTest.js | 197 ++++ .../src/model/HasOnlyReadOnly.js | 77 ++ .../src/model/HealthCheckResult.js | 70 ++ .../javascript-apollo/src/model/List.js | 69 ++ .../javascript-apollo/src/model/MapTest.js | 114 +++ ...dPropertiesAndAdditionalPropertiesClass.js | 86 ++ .../src/model/Model200Response.js | 78 ++ .../javascript-apollo/src/model/Name.js | 96 ++ .../src/model/NullableClass.js | 161 ++++ .../javascript-apollo/src/model/NumberOnly.js | 69 ++ .../src/model/ObjectWithDeprecatedFields.js | 94 ++ .../javascript-apollo/src/model/Order.js | 7 +- .../src/model/OuterComposite.js | 85 ++ .../javascript-apollo/src/model/OuterEnum.js | 53 ++ .../src/model/OuterEnumDefaultValue.js | 53 ++ .../src/model/OuterEnumInteger.js | 53 ++ .../src/model/OuterEnumIntegerDefaultValue.js | 53 ++ .../src/model/OuterObjectWithEnumProperty.js | 72 ++ .../javascript-apollo/src/model/Pet.js | 31 +- .../src/model/ReadOnlyFirst.js | 77 ++ .../javascript-apollo/src/model/Return.js | 70 ++ .../src/model/SpecialModelName.js | 69 ++ .../javascript-apollo/src/model/Tag.js | 3 +- .../javascript-apollo/src/model/User.js | 3 +- .../test/api/AnotherFakeApi.spec.js | 60 ++ .../test/api/DefaultApi.spec.js | 60 ++ .../test/api/FakeApi.spec.js | 220 +++++ .../test/api/FakeClassnameTags123Api.spec.js | 60 ++ .../model/AdditionalPropertiesClass.spec.js | 71 ++ .../test/model/Animal.spec.js | 71 ++ .../model/ArrayOfArrayOfNumberOnly.spec.js | 65 ++ .../test/model/ArrayOfNumberOnly.spec.js | 65 ++ .../test/model/ArrayTest.spec.js | 77 ++ .../test/model/Capitalization.spec.js | 95 ++ .../javascript-apollo/test/model/Cat.spec.js | 65 ++ .../test/model/CatAllOf.spec.js | 65 ++ .../test/model/ClassModel.spec.js | 65 ++ .../test/model/Client.spec.js | 65 ++ .../test/model/DeprecatedObject.spec.js | 65 ++ .../javascript-apollo/test/model/Dog.spec.js | 65 ++ .../test/model/DogAllOf.spec.js | 65 ++ .../test/model/EnumArrays.spec.js | 71 ++ .../test/model/EnumClass.spec.js | 58 ++ .../test/model/EnumTest.spec.js | 107 +++ .../javascript-apollo/test/model/File.spec.js | 65 ++ .../test/model/FileSchemaTestClass.spec.js | 71 ++ .../javascript-apollo/test/model/Foo.spec.js | 65 ++ .../test/model/FooGetDefaultResponse.spec.js | 65 ++ .../test/model/FormatTest.spec.js | 155 +++ .../test/model/HasOnlyReadOnly.spec.js | 71 ++ .../test/model/HealthCheckResult.spec.js | 65 ++ .../javascript-apollo/test/model/List.spec.js | 65 ++ .../test/model/MapTest.spec.js | 83 ++ ...ertiesAndAdditionalPropertiesClass.spec.js | 77 ++ .../test/model/Model200Response.spec.js | 71 ++ .../javascript-apollo/test/model/Name.spec.js | 83 ++ .../test/model/NullableClass.spec.js | 131 +++ .../test/model/NumberOnly.spec.js | 65 ++ .../model/ObjectWithDeprecatedFields.spec.js | 83 ++ .../test/model/OuterComposite.spec.js | 77 ++ .../test/model/OuterEnum.spec.js | 58 ++ .../test/model/OuterEnumDefaultValue.spec.js | 58 ++ .../test/model/OuterEnumInteger.spec.js | 58 ++ .../OuterEnumIntegerDefaultValue.spec.js | 58 ++ .../model/OuterObjectWithEnumProperty.spec.js | 65 ++ .../test/model/ReadOnlyFirst.spec.js | 71 ++ .../test/model/Return.spec.js | 65 ++ .../test/model/SpecialModelName.spec.js | 65 ++ 154 files changed, 10279 insertions(+), 215 deletions(-) create mode 100644 samples/client/petstore/javascript-apollo/.babelrc create mode 100644 samples/client/petstore/javascript-apollo/.gitignore create mode 100644 samples/client/petstore/javascript-apollo/docs/AdditionalPropertiesClass.md create mode 100644 samples/client/petstore/javascript-apollo/docs/Animal.md create mode 100644 samples/client/petstore/javascript-apollo/docs/AnotherFakeApi.md create mode 100644 samples/client/petstore/javascript-apollo/docs/ArrayOfArrayOfNumberOnly.md create mode 100644 samples/client/petstore/javascript-apollo/docs/ArrayOfNumberOnly.md create mode 100644 samples/client/petstore/javascript-apollo/docs/ArrayTest.md create mode 100644 samples/client/petstore/javascript-apollo/docs/Capitalization.md create mode 100644 samples/client/petstore/javascript-apollo/docs/Cat.md create mode 100644 samples/client/petstore/javascript-apollo/docs/CatAllOf.md create mode 100644 samples/client/petstore/javascript-apollo/docs/ClassModel.md create mode 100644 samples/client/petstore/javascript-apollo/docs/Client.md create mode 100644 samples/client/petstore/javascript-apollo/docs/DefaultApi.md create mode 100644 samples/client/petstore/javascript-apollo/docs/DeprecatedObject.md create mode 100644 samples/client/petstore/javascript-apollo/docs/Dog.md create mode 100644 samples/client/petstore/javascript-apollo/docs/DogAllOf.md create mode 100644 samples/client/petstore/javascript-apollo/docs/EnumArrays.md create mode 100644 samples/client/petstore/javascript-apollo/docs/EnumClass.md create mode 100644 samples/client/petstore/javascript-apollo/docs/EnumTest.md create mode 100644 samples/client/petstore/javascript-apollo/docs/FakeApi.md create mode 100644 samples/client/petstore/javascript-apollo/docs/FakeClassnameTags123Api.md create mode 100644 samples/client/petstore/javascript-apollo/docs/File.md create mode 100644 samples/client/petstore/javascript-apollo/docs/FileSchemaTestClass.md create mode 100644 samples/client/petstore/javascript-apollo/docs/Foo.md create mode 100644 samples/client/petstore/javascript-apollo/docs/FooGetDefaultResponse.md create mode 100644 samples/client/petstore/javascript-apollo/docs/FormatTest.md create mode 100644 samples/client/petstore/javascript-apollo/docs/HasOnlyReadOnly.md create mode 100644 samples/client/petstore/javascript-apollo/docs/HealthCheckResult.md create mode 100644 samples/client/petstore/javascript-apollo/docs/List.md create mode 100644 samples/client/petstore/javascript-apollo/docs/MapTest.md create mode 100644 samples/client/petstore/javascript-apollo/docs/MixedPropertiesAndAdditionalPropertiesClass.md create mode 100644 samples/client/petstore/javascript-apollo/docs/Model200Response.md create mode 100644 samples/client/petstore/javascript-apollo/docs/Name.md create mode 100644 samples/client/petstore/javascript-apollo/docs/NullableClass.md create mode 100644 samples/client/petstore/javascript-apollo/docs/NumberOnly.md create mode 100644 samples/client/petstore/javascript-apollo/docs/ObjectWithDeprecatedFields.md create mode 100644 samples/client/petstore/javascript-apollo/docs/OuterComposite.md create mode 100644 samples/client/petstore/javascript-apollo/docs/OuterEnum.md create mode 100644 samples/client/petstore/javascript-apollo/docs/OuterEnumDefaultValue.md create mode 100644 samples/client/petstore/javascript-apollo/docs/OuterEnumInteger.md create mode 100644 samples/client/petstore/javascript-apollo/docs/OuterEnumIntegerDefaultValue.md create mode 100644 samples/client/petstore/javascript-apollo/docs/OuterObjectWithEnumProperty.md create mode 100644 samples/client/petstore/javascript-apollo/docs/ReadOnlyFirst.md create mode 100644 samples/client/petstore/javascript-apollo/docs/Return.md create mode 100644 samples/client/petstore/javascript-apollo/docs/SpecialModelName.md create mode 100644 samples/client/petstore/javascript-apollo/src/api/AnotherFakeApi.js create mode 100644 samples/client/petstore/javascript-apollo/src/api/DefaultApi.js create mode 100644 samples/client/petstore/javascript-apollo/src/api/FakeApi.js create mode 100644 samples/client/petstore/javascript-apollo/src/api/FakeClassnameTags123Api.js create mode 100644 samples/client/petstore/javascript-apollo/src/model/AdditionalPropertiesClass.js create mode 100644 samples/client/petstore/javascript-apollo/src/model/Animal.js create mode 100644 samples/client/petstore/javascript-apollo/src/model/ArrayOfArrayOfNumberOnly.js create mode 100644 samples/client/petstore/javascript-apollo/src/model/ArrayOfNumberOnly.js create mode 100644 samples/client/petstore/javascript-apollo/src/model/ArrayTest.js create mode 100644 samples/client/petstore/javascript-apollo/src/model/Capitalization.js create mode 100644 samples/client/petstore/javascript-apollo/src/model/Cat.js create mode 100644 samples/client/petstore/javascript-apollo/src/model/CatAllOf.js create mode 100644 samples/client/petstore/javascript-apollo/src/model/ClassModel.js create mode 100644 samples/client/petstore/javascript-apollo/src/model/Client.js create mode 100644 samples/client/petstore/javascript-apollo/src/model/DeprecatedObject.js create mode 100644 samples/client/petstore/javascript-apollo/src/model/Dog.js create mode 100644 samples/client/petstore/javascript-apollo/src/model/DogAllOf.js create mode 100644 samples/client/petstore/javascript-apollo/src/model/EnumArrays.js create mode 100644 samples/client/petstore/javascript-apollo/src/model/EnumClass.js create mode 100644 samples/client/petstore/javascript-apollo/src/model/EnumTest.js create mode 100644 samples/client/petstore/javascript-apollo/src/model/File.js create mode 100644 samples/client/petstore/javascript-apollo/src/model/FileSchemaTestClass.js create mode 100644 samples/client/petstore/javascript-apollo/src/model/Foo.js create mode 100644 samples/client/petstore/javascript-apollo/src/model/FooGetDefaultResponse.js create mode 100644 samples/client/petstore/javascript-apollo/src/model/FormatTest.js create mode 100644 samples/client/petstore/javascript-apollo/src/model/HasOnlyReadOnly.js create mode 100644 samples/client/petstore/javascript-apollo/src/model/HealthCheckResult.js create mode 100644 samples/client/petstore/javascript-apollo/src/model/List.js create mode 100644 samples/client/petstore/javascript-apollo/src/model/MapTest.js create mode 100644 samples/client/petstore/javascript-apollo/src/model/MixedPropertiesAndAdditionalPropertiesClass.js create mode 100644 samples/client/petstore/javascript-apollo/src/model/Model200Response.js create mode 100644 samples/client/petstore/javascript-apollo/src/model/Name.js create mode 100644 samples/client/petstore/javascript-apollo/src/model/NullableClass.js create mode 100644 samples/client/petstore/javascript-apollo/src/model/NumberOnly.js create mode 100644 samples/client/petstore/javascript-apollo/src/model/ObjectWithDeprecatedFields.js create mode 100644 samples/client/petstore/javascript-apollo/src/model/OuterComposite.js create mode 100644 samples/client/petstore/javascript-apollo/src/model/OuterEnum.js create mode 100644 samples/client/petstore/javascript-apollo/src/model/OuterEnumDefaultValue.js create mode 100644 samples/client/petstore/javascript-apollo/src/model/OuterEnumInteger.js create mode 100644 samples/client/petstore/javascript-apollo/src/model/OuterEnumIntegerDefaultValue.js create mode 100644 samples/client/petstore/javascript-apollo/src/model/OuterObjectWithEnumProperty.js create mode 100644 samples/client/petstore/javascript-apollo/src/model/ReadOnlyFirst.js create mode 100644 samples/client/petstore/javascript-apollo/src/model/Return.js create mode 100644 samples/client/petstore/javascript-apollo/src/model/SpecialModelName.js create mode 100644 samples/client/petstore/javascript-apollo/test/api/AnotherFakeApi.spec.js create mode 100644 samples/client/petstore/javascript-apollo/test/api/DefaultApi.spec.js create mode 100644 samples/client/petstore/javascript-apollo/test/api/FakeApi.spec.js create mode 100644 samples/client/petstore/javascript-apollo/test/api/FakeClassnameTags123Api.spec.js create mode 100644 samples/client/petstore/javascript-apollo/test/model/AdditionalPropertiesClass.spec.js create mode 100644 samples/client/petstore/javascript-apollo/test/model/Animal.spec.js create mode 100644 samples/client/petstore/javascript-apollo/test/model/ArrayOfArrayOfNumberOnly.spec.js create mode 100644 samples/client/petstore/javascript-apollo/test/model/ArrayOfNumberOnly.spec.js create mode 100644 samples/client/petstore/javascript-apollo/test/model/ArrayTest.spec.js create mode 100644 samples/client/petstore/javascript-apollo/test/model/Capitalization.spec.js create mode 100644 samples/client/petstore/javascript-apollo/test/model/Cat.spec.js create mode 100644 samples/client/petstore/javascript-apollo/test/model/CatAllOf.spec.js create mode 100644 samples/client/petstore/javascript-apollo/test/model/ClassModel.spec.js create mode 100644 samples/client/petstore/javascript-apollo/test/model/Client.spec.js create mode 100644 samples/client/petstore/javascript-apollo/test/model/DeprecatedObject.spec.js create mode 100644 samples/client/petstore/javascript-apollo/test/model/Dog.spec.js create mode 100644 samples/client/petstore/javascript-apollo/test/model/DogAllOf.spec.js create mode 100644 samples/client/petstore/javascript-apollo/test/model/EnumArrays.spec.js create mode 100644 samples/client/petstore/javascript-apollo/test/model/EnumClass.spec.js create mode 100644 samples/client/petstore/javascript-apollo/test/model/EnumTest.spec.js create mode 100644 samples/client/petstore/javascript-apollo/test/model/File.spec.js create mode 100644 samples/client/petstore/javascript-apollo/test/model/FileSchemaTestClass.spec.js create mode 100644 samples/client/petstore/javascript-apollo/test/model/Foo.spec.js create mode 100644 samples/client/petstore/javascript-apollo/test/model/FooGetDefaultResponse.spec.js create mode 100644 samples/client/petstore/javascript-apollo/test/model/FormatTest.spec.js create mode 100644 samples/client/petstore/javascript-apollo/test/model/HasOnlyReadOnly.spec.js create mode 100644 samples/client/petstore/javascript-apollo/test/model/HealthCheckResult.spec.js create mode 100644 samples/client/petstore/javascript-apollo/test/model/List.spec.js create mode 100644 samples/client/petstore/javascript-apollo/test/model/MapTest.spec.js create mode 100644 samples/client/petstore/javascript-apollo/test/model/MixedPropertiesAndAdditionalPropertiesClass.spec.js create mode 100644 samples/client/petstore/javascript-apollo/test/model/Model200Response.spec.js create mode 100644 samples/client/petstore/javascript-apollo/test/model/Name.spec.js create mode 100644 samples/client/petstore/javascript-apollo/test/model/NullableClass.spec.js create mode 100644 samples/client/petstore/javascript-apollo/test/model/NumberOnly.spec.js create mode 100644 samples/client/petstore/javascript-apollo/test/model/ObjectWithDeprecatedFields.spec.js create mode 100644 samples/client/petstore/javascript-apollo/test/model/OuterComposite.spec.js create mode 100644 samples/client/petstore/javascript-apollo/test/model/OuterEnum.spec.js create mode 100644 samples/client/petstore/javascript-apollo/test/model/OuterEnumDefaultValue.spec.js create mode 100644 samples/client/petstore/javascript-apollo/test/model/OuterEnumInteger.spec.js create mode 100644 samples/client/petstore/javascript-apollo/test/model/OuterEnumIntegerDefaultValue.spec.js create mode 100644 samples/client/petstore/javascript-apollo/test/model/OuterObjectWithEnumProperty.spec.js create mode 100644 samples/client/petstore/javascript-apollo/test/model/ReadOnlyFirst.spec.js create mode 100644 samples/client/petstore/javascript-apollo/test/model/Return.spec.js create mode 100644 samples/client/petstore/javascript-apollo/test/model/SpecialModelName.spec.js diff --git a/samples/client/petstore/javascript-apollo/.babelrc b/samples/client/petstore/javascript-apollo/.babelrc new file mode 100644 index 000000000000..c73df9d50b49 --- /dev/null +++ b/samples/client/petstore/javascript-apollo/.babelrc @@ -0,0 +1,33 @@ +{ + "presets": [ + "@babel/preset-env" + ], + "plugins": [ + "@babel/plugin-syntax-dynamic-import", + "@babel/plugin-syntax-import-meta", + "@babel/plugin-proposal-class-properties", + "@babel/plugin-proposal-json-strings", + [ + "@babel/plugin-proposal-decorators", + { + "legacy": true + } + ], + "@babel/plugin-proposal-function-sent", + "@babel/plugin-proposal-export-namespace-from", + "@babel/plugin-proposal-numeric-separator", + "@babel/plugin-proposal-throw-expressions", + "@babel/plugin-proposal-export-default-from", + "@babel/plugin-proposal-logical-assignment-operators", + "@babel/plugin-proposal-optional-chaining", + [ + "@babel/plugin-proposal-pipeline-operator", + { + "proposal": "minimal" + } + ], + "@babel/plugin-proposal-nullish-coalescing-operator", + "@babel/plugin-proposal-do-expressions", + "@babel/plugin-proposal-function-bind" + ] +} diff --git a/samples/client/petstore/javascript-apollo/.gitignore b/samples/client/petstore/javascript-apollo/.gitignore new file mode 100644 index 000000000000..e920c16718d1 --- /dev/null +++ b/samples/client/petstore/javascript-apollo/.gitignore @@ -0,0 +1,33 @@ +# Logs +logs +*.log +npm-debug.log* + +# Runtime data +pids +*.pid +*.seed + +# Directory for instrumented libs generated by jscoverage/JSCover +lib-cov + +# Coverage directory used by tools like istanbul +coverage + +# Grunt intermediate storage (http://gruntjs.com/creating-plugins#storing-task-files) +.grunt + +# node-waf configuration +.lock-wscript + +# Compiled binary addons (http://nodejs.org/api/addons.html) +build/Release + +# Dependency directory +node_modules + +# Optional npm cache directory +.npm + +# Optional REPL history +.node_repl_history diff --git a/samples/client/petstore/javascript-apollo/.openapi-generator/FILES b/samples/client/petstore/javascript-apollo/.openapi-generator/FILES index 0f0a74bb1ac3..367354b69524 100644 --- a/samples/client/petstore/javascript-apollo/.openapi-generator/FILES +++ b/samples/client/petstore/javascript-apollo/.openapi-generator/FILES @@ -1,10 +1,56 @@ +.babelrc +.gitignore .travis.yml README.md +docs/AdditionalPropertiesClass.md +docs/Animal.md +docs/AnotherFakeApi.md docs/ApiResponse.md +docs/ArrayOfArrayOfNumberOnly.md +docs/ArrayOfNumberOnly.md +docs/ArrayTest.md +docs/Capitalization.md +docs/Cat.md +docs/CatAllOf.md docs/Category.md +docs/ClassModel.md +docs/Client.md +docs/DefaultApi.md +docs/DeprecatedObject.md +docs/Dog.md +docs/DogAllOf.md +docs/EnumArrays.md +docs/EnumClass.md +docs/EnumTest.md +docs/FakeApi.md +docs/FakeClassnameTags123Api.md +docs/File.md +docs/FileSchemaTestClass.md +docs/Foo.md +docs/FooGetDefaultResponse.md +docs/FormatTest.md +docs/HasOnlyReadOnly.md +docs/HealthCheckResult.md +docs/List.md +docs/MapTest.md +docs/MixedPropertiesAndAdditionalPropertiesClass.md +docs/Model200Response.md +docs/Name.md +docs/NullableClass.md +docs/NumberOnly.md +docs/ObjectWithDeprecatedFields.md docs/Order.md +docs/OuterComposite.md +docs/OuterEnum.md +docs/OuterEnumDefaultValue.md +docs/OuterEnumInteger.md +docs/OuterEnumIntegerDefaultValue.md +docs/OuterObjectWithEnumProperty.md docs/Pet.md docs/PetApi.md +docs/ReadOnlyFirst.md +docs/Return.md +docs/SpecialModelName.md docs/StoreApi.md docs/Tag.md docs/User.md @@ -13,13 +59,101 @@ git_push.sh mocha.opts package.json src/ApiClient.js +src/api/AnotherFakeApi.js +src/api/DefaultApi.js +src/api/FakeApi.js +src/api/FakeClassnameTags123Api.js src/api/PetApi.js src/api/StoreApi.js src/api/UserApi.js src/index.js +src/model/AdditionalPropertiesClass.js +src/model/Animal.js src/model/ApiResponse.js +src/model/ArrayOfArrayOfNumberOnly.js +src/model/ArrayOfNumberOnly.js +src/model/ArrayTest.js +src/model/Capitalization.js +src/model/Cat.js +src/model/CatAllOf.js src/model/Category.js +src/model/ClassModel.js +src/model/Client.js +src/model/DeprecatedObject.js +src/model/Dog.js +src/model/DogAllOf.js +src/model/EnumArrays.js +src/model/EnumClass.js +src/model/EnumTest.js +src/model/File.js +src/model/FileSchemaTestClass.js +src/model/Foo.js +src/model/FooGetDefaultResponse.js +src/model/FormatTest.js +src/model/HasOnlyReadOnly.js +src/model/HealthCheckResult.js +src/model/List.js +src/model/MapTest.js +src/model/MixedPropertiesAndAdditionalPropertiesClass.js +src/model/Model200Response.js +src/model/Name.js +src/model/NullableClass.js +src/model/NumberOnly.js +src/model/ObjectWithDeprecatedFields.js src/model/Order.js +src/model/OuterComposite.js +src/model/OuterEnum.js +src/model/OuterEnumDefaultValue.js +src/model/OuterEnumInteger.js +src/model/OuterEnumIntegerDefaultValue.js +src/model/OuterObjectWithEnumProperty.js src/model/Pet.js +src/model/ReadOnlyFirst.js +src/model/Return.js +src/model/SpecialModelName.js src/model/Tag.js src/model/User.js +test/api/AnotherFakeApi.spec.js +test/api/DefaultApi.spec.js +test/api/FakeApi.spec.js +test/api/FakeClassnameTags123Api.spec.js +test/model/AdditionalPropertiesClass.spec.js +test/model/Animal.spec.js +test/model/ArrayOfArrayOfNumberOnly.spec.js +test/model/ArrayOfNumberOnly.spec.js +test/model/ArrayTest.spec.js +test/model/Capitalization.spec.js +test/model/Cat.spec.js +test/model/CatAllOf.spec.js +test/model/ClassModel.spec.js +test/model/Client.spec.js +test/model/DeprecatedObject.spec.js +test/model/Dog.spec.js +test/model/DogAllOf.spec.js +test/model/EnumArrays.spec.js +test/model/EnumClass.spec.js +test/model/EnumTest.spec.js +test/model/File.spec.js +test/model/FileSchemaTestClass.spec.js +test/model/Foo.spec.js +test/model/FooGetDefaultResponse.spec.js +test/model/FormatTest.spec.js +test/model/HasOnlyReadOnly.spec.js +test/model/HealthCheckResult.spec.js +test/model/List.spec.js +test/model/MapTest.spec.js +test/model/MixedPropertiesAndAdditionalPropertiesClass.spec.js +test/model/Model200Response.spec.js +test/model/Name.spec.js +test/model/NullableClass.spec.js +test/model/NumberOnly.spec.js +test/model/ObjectWithDeprecatedFields.spec.js +test/model/OuterComposite.spec.js +test/model/OuterEnum.spec.js +test/model/OuterEnumDefaultValue.spec.js +test/model/OuterEnumInteger.spec.js +test/model/OuterEnumIntegerDefaultValue.spec.js +test/model/OuterObjectWithEnumProperty.spec.js +test/model/ReadOnlyFirst.spec.js +test/model/Return.spec.js +test/model/SpecialModelName.spec.js diff --git a/samples/client/petstore/javascript-apollo/.openapi-generator/VERSION b/samples/client/petstore/javascript-apollo/.openapi-generator/VERSION index d99e7162d01f..66672d4e9d31 100644 --- a/samples/client/petstore/javascript-apollo/.openapi-generator/VERSION +++ b/samples/client/petstore/javascript-apollo/.openapi-generator/VERSION @@ -1 +1 @@ -5.0.0-SNAPSHOT \ No newline at end of file +6.1.0-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/javascript-apollo/README.md b/samples/client/petstore/javascript-apollo/README.md index 8b83e9a94597..2f7325ceebb0 100644 --- a/samples/client/petstore/javascript-apollo/README.md +++ b/samples/client/petstore/javascript-apollo/README.md @@ -1,12 +1,12 @@ # open_api_petstore OpenApiPetstore - JavaScript client for open_api_petstore -This is a sample server Petstore server. For this sample, you can use the api key `special-key` to test the authorization filters. +This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ This SDK is automatically generated by the [OpenAPI Generator](https://openapi-generator.tech) project: - API version: 1.0.0 - Package version: 1.0.0 -- Build package: org.openapitools.codegen.languages.JavascriptApolloClientCodegen +- Build package: org.openapitools.codegen.languages.JavascriptClientCodegen ## Installation @@ -100,30 +100,46 @@ Please follow the [installation](#installation) instruction and execute the foll ```javascript var OpenApiPetstore = require('open_api_petstore'); -var defaultClient = OpenApiPetstore.ApiClient.instance; -// Configure OAuth2 access token for authorization: petstore_auth -var petstore_auth = defaultClient.authentications['petstore_auth']; -petstore_auth.accessToken = "YOUR ACCESS TOKEN" -var api = new OpenApiPetstore.PetApi() -var body = new OpenApiPetstore.Pet(); // {Pet} Pet object that needs to be added to the store +var api = new OpenApiPetstore.AnotherFakeApi() +var client = new OpenApiPetstore.Client(); // {Client} client model var callback = function(error, data, response) { if (error) { console.error(error); } else { - console.log('API called successfully.'); + console.log('API called successfully. Returned data: ' + data); } }; -api.addPet(body, callback); +api.call123testSpecialTags(client, callback); ``` ## Documentation for API Endpoints -All URIs are relative to *http://petstore.swagger.io/v2* +All URIs are relative to *http://petstore.swagger.io:80/v2* Class | Method | HTTP request | Description ------------ | ------------- | ------------- | ------------- +*OpenApiPetstore.AnotherFakeApi* | [**call123testSpecialTags**](docs/AnotherFakeApi.md#call123testSpecialTags) | **PATCH** /another-fake/dummy | To test special tags +*OpenApiPetstore.DefaultApi* | [**fooGet**](docs/DefaultApi.md#fooGet) | **GET** /foo | +*OpenApiPetstore.FakeApi* | [**fakeHealthGet**](docs/FakeApi.md#fakeHealthGet) | **GET** /fake/health | Health check endpoint +*OpenApiPetstore.FakeApi* | [**fakeHttpSignatureTest**](docs/FakeApi.md#fakeHttpSignatureTest) | **GET** /fake/http-signature-test | test http signature authentication +*OpenApiPetstore.FakeApi* | [**fakeOuterBooleanSerialize**](docs/FakeApi.md#fakeOuterBooleanSerialize) | **POST** /fake/outer/boolean | +*OpenApiPetstore.FakeApi* | [**fakeOuterCompositeSerialize**](docs/FakeApi.md#fakeOuterCompositeSerialize) | **POST** /fake/outer/composite | +*OpenApiPetstore.FakeApi* | [**fakeOuterNumberSerialize**](docs/FakeApi.md#fakeOuterNumberSerialize) | **POST** /fake/outer/number | +*OpenApiPetstore.FakeApi* | [**fakeOuterStringSerialize**](docs/FakeApi.md#fakeOuterStringSerialize) | **POST** /fake/outer/string | +*OpenApiPetstore.FakeApi* | [**fakePropertyEnumIntegerSerialize**](docs/FakeApi.md#fakePropertyEnumIntegerSerialize) | **POST** /fake/property/enum-int | +*OpenApiPetstore.FakeApi* | [**testBodyWithBinary**](docs/FakeApi.md#testBodyWithBinary) | **PUT** /fake/body-with-binary | +*OpenApiPetstore.FakeApi* | [**testBodyWithFileSchema**](docs/FakeApi.md#testBodyWithFileSchema) | **PUT** /fake/body-with-file-schema | +*OpenApiPetstore.FakeApi* | [**testBodyWithQueryParams**](docs/FakeApi.md#testBodyWithQueryParams) | **PUT** /fake/body-with-query-params | +*OpenApiPetstore.FakeApi* | [**testClientModel**](docs/FakeApi.md#testClientModel) | **PATCH** /fake | To test \"client\" model +*OpenApiPetstore.FakeApi* | [**testEndpointParameters**](docs/FakeApi.md#testEndpointParameters) | **POST** /fake | Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 +*OpenApiPetstore.FakeApi* | [**testEnumParameters**](docs/FakeApi.md#testEnumParameters) | **GET** /fake | To test enum parameters +*OpenApiPetstore.FakeApi* | [**testGroupParameters**](docs/FakeApi.md#testGroupParameters) | **DELETE** /fake | Fake endpoint to test group parameters (optional) +*OpenApiPetstore.FakeApi* | [**testInlineAdditionalProperties**](docs/FakeApi.md#testInlineAdditionalProperties) | **POST** /fake/inline-additionalProperties | test inline additionalProperties +*OpenApiPetstore.FakeApi* | [**testJsonFormData**](docs/FakeApi.md#testJsonFormData) | **GET** /fake/jsonFormData | test json serialization of form data +*OpenApiPetstore.FakeApi* | [**testQueryParameterCollectionFormat**](docs/FakeApi.md#testQueryParameterCollectionFormat) | **PUT** /fake/test-query-parameters | +*OpenApiPetstore.FakeClassnameTags123Api* | [**testClassname**](docs/FakeClassnameTags123Api.md#testClassname) | **PATCH** /fake_classname_test | To test class name in snake case *OpenApiPetstore.PetApi* | [**addPet**](docs/PetApi.md#addPet) | **POST** /pet | Add a new pet to the store *OpenApiPetstore.PetApi* | [**deletePet**](docs/PetApi.md#deletePet) | **DELETE** /pet/{petId} | Deletes a pet *OpenApiPetstore.PetApi* | [**findPetsByStatus**](docs/PetApi.md#findPetsByStatus) | **GET** /pet/findByStatus | Finds Pets by status @@ -132,9 +148,10 @@ Class | Method | HTTP request | Description *OpenApiPetstore.PetApi* | [**updatePet**](docs/PetApi.md#updatePet) | **PUT** /pet | Update an existing pet *OpenApiPetstore.PetApi* | [**updatePetWithForm**](docs/PetApi.md#updatePetWithForm) | **POST** /pet/{petId} | Updates a pet in the store with form data *OpenApiPetstore.PetApi* | [**uploadFile**](docs/PetApi.md#uploadFile) | **POST** /pet/{petId}/uploadImage | uploads an image -*OpenApiPetstore.StoreApi* | [**deleteOrder**](docs/StoreApi.md#deleteOrder) | **DELETE** /store/order/{orderId} | Delete purchase order by ID +*OpenApiPetstore.PetApi* | [**uploadFileWithRequiredFile**](docs/PetApi.md#uploadFileWithRequiredFile) | **POST** /fake/{petId}/uploadImageWithRequiredFile | uploads an image (required) +*OpenApiPetstore.StoreApi* | [**deleteOrder**](docs/StoreApi.md#deleteOrder) | **DELETE** /store/order/{order_id} | Delete purchase order by ID *OpenApiPetstore.StoreApi* | [**getInventory**](docs/StoreApi.md#getInventory) | **GET** /store/inventory | Returns pet inventories by status -*OpenApiPetstore.StoreApi* | [**getOrderById**](docs/StoreApi.md#getOrderById) | **GET** /store/order/{orderId} | Find purchase order by ID +*OpenApiPetstore.StoreApi* | [**getOrderById**](docs/StoreApi.md#getOrderById) | **GET** /store/order/{order_id} | Find purchase order by ID *OpenApiPetstore.StoreApi* | [**placeOrder**](docs/StoreApi.md#placeOrder) | **POST** /store/order | Place an order for a pet *OpenApiPetstore.UserApi* | [**createUser**](docs/UserApi.md#createUser) | **POST** /user | Create user *OpenApiPetstore.UserApi* | [**createUsersWithArrayInput**](docs/UserApi.md#createUsersWithArrayInput) | **POST** /user/createWithArray | Creates list of users with given input array @@ -148,10 +165,50 @@ Class | Method | HTTP request | Description ## Documentation for Models + - [OpenApiPetstore.AdditionalPropertiesClass](docs/AdditionalPropertiesClass.md) + - [OpenApiPetstore.Animal](docs/Animal.md) - [OpenApiPetstore.ApiResponse](docs/ApiResponse.md) + - [OpenApiPetstore.ArrayOfArrayOfNumberOnly](docs/ArrayOfArrayOfNumberOnly.md) + - [OpenApiPetstore.ArrayOfNumberOnly](docs/ArrayOfNumberOnly.md) + - [OpenApiPetstore.ArrayTest](docs/ArrayTest.md) + - [OpenApiPetstore.Capitalization](docs/Capitalization.md) + - [OpenApiPetstore.Cat](docs/Cat.md) + - [OpenApiPetstore.CatAllOf](docs/CatAllOf.md) - [OpenApiPetstore.Category](docs/Category.md) + - [OpenApiPetstore.ClassModel](docs/ClassModel.md) + - [OpenApiPetstore.Client](docs/Client.md) + - [OpenApiPetstore.DeprecatedObject](docs/DeprecatedObject.md) + - [OpenApiPetstore.Dog](docs/Dog.md) + - [OpenApiPetstore.DogAllOf](docs/DogAllOf.md) + - [OpenApiPetstore.EnumArrays](docs/EnumArrays.md) + - [OpenApiPetstore.EnumClass](docs/EnumClass.md) + - [OpenApiPetstore.EnumTest](docs/EnumTest.md) + - [OpenApiPetstore.File](docs/File.md) + - [OpenApiPetstore.FileSchemaTestClass](docs/FileSchemaTestClass.md) + - [OpenApiPetstore.Foo](docs/Foo.md) + - [OpenApiPetstore.FooGetDefaultResponse](docs/FooGetDefaultResponse.md) + - [OpenApiPetstore.FormatTest](docs/FormatTest.md) + - [OpenApiPetstore.HasOnlyReadOnly](docs/HasOnlyReadOnly.md) + - [OpenApiPetstore.HealthCheckResult](docs/HealthCheckResult.md) + - [OpenApiPetstore.List](docs/List.md) + - [OpenApiPetstore.MapTest](docs/MapTest.md) + - [OpenApiPetstore.MixedPropertiesAndAdditionalPropertiesClass](docs/MixedPropertiesAndAdditionalPropertiesClass.md) + - [OpenApiPetstore.Model200Response](docs/Model200Response.md) + - [OpenApiPetstore.Name](docs/Name.md) + - [OpenApiPetstore.NullableClass](docs/NullableClass.md) + - [OpenApiPetstore.NumberOnly](docs/NumberOnly.md) + - [OpenApiPetstore.ObjectWithDeprecatedFields](docs/ObjectWithDeprecatedFields.md) - [OpenApiPetstore.Order](docs/Order.md) + - [OpenApiPetstore.OuterComposite](docs/OuterComposite.md) + - [OpenApiPetstore.OuterEnum](docs/OuterEnum.md) + - [OpenApiPetstore.OuterEnumDefaultValue](docs/OuterEnumDefaultValue.md) + - [OpenApiPetstore.OuterEnumInteger](docs/OuterEnumInteger.md) + - [OpenApiPetstore.OuterEnumIntegerDefaultValue](docs/OuterEnumIntegerDefaultValue.md) + - [OpenApiPetstore.OuterObjectWithEnumProperty](docs/OuterObjectWithEnumProperty.md) - [OpenApiPetstore.Pet](docs/Pet.md) + - [OpenApiPetstore.ReadOnlyFirst](docs/ReadOnlyFirst.md) + - [OpenApiPetstore.Return](docs/Return.md) + - [OpenApiPetstore.SpecialModelName](docs/SpecialModelName.md) - [OpenApiPetstore.Tag](docs/Tag.md) - [OpenApiPetstore.User](docs/User.md) @@ -169,6 +226,32 @@ Class | Method | HTTP request | Description +### api_key_query + + +- **Type**: API key +- **API key parameter name**: api_key_query +- **Location**: URL query string + + + +### bearer_test + +- **Type**: Bearer authentication (JWT) + + + +### http_basic_test + +- **Type**: HTTP basic authentication + + + +### http_signature_test + + + + ### petstore_auth diff --git a/samples/client/petstore/javascript-apollo/docs/AdditionalPropertiesClass.md b/samples/client/petstore/javascript-apollo/docs/AdditionalPropertiesClass.md new file mode 100644 index 000000000000..c85e85acd9e3 --- /dev/null +++ b/samples/client/petstore/javascript-apollo/docs/AdditionalPropertiesClass.md @@ -0,0 +1,10 @@ +# OpenApiPetstore.AdditionalPropertiesClass + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**mapProperty** | **{String: String}** | | [optional] +**mapOfMapProperty** | **{String: {String: String}}** | | [optional] + + diff --git a/samples/client/petstore/javascript-apollo/docs/Animal.md b/samples/client/petstore/javascript-apollo/docs/Animal.md new file mode 100644 index 000000000000..483c89a1ab30 --- /dev/null +++ b/samples/client/petstore/javascript-apollo/docs/Animal.md @@ -0,0 +1,10 @@ +# OpenApiPetstore.Animal + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**className** | **String** | | +**color** | **String** | | [optional] [default to 'red'] + + diff --git a/samples/client/petstore/javascript-apollo/docs/AnotherFakeApi.md b/samples/client/petstore/javascript-apollo/docs/AnotherFakeApi.md new file mode 100644 index 000000000000..ba01bd3e2a20 --- /dev/null +++ b/samples/client/petstore/javascript-apollo/docs/AnotherFakeApi.md @@ -0,0 +1,54 @@ +# OpenApiPetstore.AnotherFakeApi + +All URIs are relative to *http://petstore.swagger.io:80/v2* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**call123testSpecialTags**](AnotherFakeApi.md#call123testSpecialTags) | **PATCH** /another-fake/dummy | To test special tags + + + +## call123testSpecialTags + +> Client call123testSpecialTags(client) + +To test special tags + +To test special tags and operation ID starting with number + +### Example + +```javascript +import OpenApiPetstore from 'open_api_petstore'; + +let apiInstance = new OpenApiPetstore.AnotherFakeApi(); +let client = new OpenApiPetstore.Client(); // Client | client model +apiInstance.call123testSpecialTags(client, (error, data, response) => { + if (error) { + console.error(error); + } else { + console.log('API called successfully. Returned data: ' + data); + } +}); +``` + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **client** | [**Client**](Client.md)| client model | + +### Return type + +[**Client**](Client.md) + +### Authorization + +No authorization required + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + diff --git a/samples/client/petstore/javascript-apollo/docs/ArrayOfArrayOfNumberOnly.md b/samples/client/petstore/javascript-apollo/docs/ArrayOfArrayOfNumberOnly.md new file mode 100644 index 000000000000..c321c0985f3a --- /dev/null +++ b/samples/client/petstore/javascript-apollo/docs/ArrayOfArrayOfNumberOnly.md @@ -0,0 +1,9 @@ +# OpenApiPetstore.ArrayOfArrayOfNumberOnly + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**arrayArrayNumber** | **[[Number]]** | | [optional] + + diff --git a/samples/client/petstore/javascript-apollo/docs/ArrayOfNumberOnly.md b/samples/client/petstore/javascript-apollo/docs/ArrayOfNumberOnly.md new file mode 100644 index 000000000000..b83e136d978f --- /dev/null +++ b/samples/client/petstore/javascript-apollo/docs/ArrayOfNumberOnly.md @@ -0,0 +1,9 @@ +# OpenApiPetstore.ArrayOfNumberOnly + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**arrayNumber** | **[Number]** | | [optional] + + diff --git a/samples/client/petstore/javascript-apollo/docs/ArrayTest.md b/samples/client/petstore/javascript-apollo/docs/ArrayTest.md new file mode 100644 index 000000000000..711b53a520f5 --- /dev/null +++ b/samples/client/petstore/javascript-apollo/docs/ArrayTest.md @@ -0,0 +1,11 @@ +# OpenApiPetstore.ArrayTest + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**arrayOfString** | **[String]** | | [optional] +**arrayArrayOfInteger** | **[[Number]]** | | [optional] +**arrayArrayOfModel** | **[[ReadOnlyFirst]]** | | [optional] + + diff --git a/samples/client/petstore/javascript-apollo/docs/Capitalization.md b/samples/client/petstore/javascript-apollo/docs/Capitalization.md new file mode 100644 index 000000000000..3bbc5d491fc1 --- /dev/null +++ b/samples/client/petstore/javascript-apollo/docs/Capitalization.md @@ -0,0 +1,14 @@ +# OpenApiPetstore.Capitalization + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**smallCamel** | **String** | | [optional] +**capitalCamel** | **String** | | [optional] +**smallSnake** | **String** | | [optional] +**capitalSnake** | **String** | | [optional] +**sCAETHFlowPoints** | **String** | | [optional] +**ATT_NAME** | **String** | Name of the pet | [optional] + + diff --git a/samples/client/petstore/javascript-apollo/docs/Cat.md b/samples/client/petstore/javascript-apollo/docs/Cat.md new file mode 100644 index 000000000000..652bca4ed073 --- /dev/null +++ b/samples/client/petstore/javascript-apollo/docs/Cat.md @@ -0,0 +1,9 @@ +# OpenApiPetstore.Cat + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**declawed** | **Boolean** | | [optional] + + diff --git a/samples/client/petstore/javascript-apollo/docs/CatAllOf.md b/samples/client/petstore/javascript-apollo/docs/CatAllOf.md new file mode 100644 index 000000000000..3b8274c01202 --- /dev/null +++ b/samples/client/petstore/javascript-apollo/docs/CatAllOf.md @@ -0,0 +1,9 @@ +# OpenApiPetstore.CatAllOf + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**declawed** | **Boolean** | | [optional] + + diff --git a/samples/client/petstore/javascript-apollo/docs/Category.md b/samples/client/petstore/javascript-apollo/docs/Category.md index ee7e2ea0dfe3..2de44aa03ddc 100644 --- a/samples/client/petstore/javascript-apollo/docs/Category.md +++ b/samples/client/petstore/javascript-apollo/docs/Category.md @@ -5,6 +5,6 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **id** | **Number** | | [optional] -**name** | **String** | | [optional] +**name** | **String** | | [default to 'default-name'] diff --git a/samples/client/petstore/javascript-apollo/docs/ClassModel.md b/samples/client/petstore/javascript-apollo/docs/ClassModel.md new file mode 100644 index 000000000000..dd90930dade3 --- /dev/null +++ b/samples/client/petstore/javascript-apollo/docs/ClassModel.md @@ -0,0 +1,9 @@ +# OpenApiPetstore.ClassModel + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**_class** | **String** | | [optional] + + diff --git a/samples/client/petstore/javascript-apollo/docs/Client.md b/samples/client/petstore/javascript-apollo/docs/Client.md new file mode 100644 index 000000000000..1164b7043191 --- /dev/null +++ b/samples/client/petstore/javascript-apollo/docs/Client.md @@ -0,0 +1,9 @@ +# OpenApiPetstore.Client + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**client** | **String** | | [optional] + + diff --git a/samples/client/petstore/javascript-apollo/docs/DefaultApi.md b/samples/client/petstore/javascript-apollo/docs/DefaultApi.md new file mode 100644 index 000000000000..d24a241f9505 --- /dev/null +++ b/samples/client/petstore/javascript-apollo/docs/DefaultApi.md @@ -0,0 +1,48 @@ +# OpenApiPetstore.DefaultApi + +All URIs are relative to *http://petstore.swagger.io:80/v2* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**fooGet**](DefaultApi.md#fooGet) | **GET** /foo | + + + +## fooGet + +> FooGetDefaultResponse fooGet() + + + +### Example + +```javascript +import OpenApiPetstore from 'open_api_petstore'; + +let apiInstance = new OpenApiPetstore.DefaultApi(); +apiInstance.fooGet((error, data, response) => { + if (error) { + console.error(error); + } else { + console.log('API called successfully. Returned data: ' + data); + } +}); +``` + +### Parameters + +This endpoint does not need any parameter. + +### Return type + +[**FooGetDefaultResponse**](FooGetDefaultResponse.md) + +### Authorization + +No authorization required + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + diff --git a/samples/client/petstore/javascript-apollo/docs/DeprecatedObject.md b/samples/client/petstore/javascript-apollo/docs/DeprecatedObject.md new file mode 100644 index 000000000000..77fba12df111 --- /dev/null +++ b/samples/client/petstore/javascript-apollo/docs/DeprecatedObject.md @@ -0,0 +1,9 @@ +# OpenApiPetstore.DeprecatedObject + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**name** | **String** | | [optional] + + diff --git a/samples/client/petstore/javascript-apollo/docs/Dog.md b/samples/client/petstore/javascript-apollo/docs/Dog.md new file mode 100644 index 000000000000..fd3b9f7c77ce --- /dev/null +++ b/samples/client/petstore/javascript-apollo/docs/Dog.md @@ -0,0 +1,9 @@ +# OpenApiPetstore.Dog + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**breed** | **String** | | [optional] + + diff --git a/samples/client/petstore/javascript-apollo/docs/DogAllOf.md b/samples/client/petstore/javascript-apollo/docs/DogAllOf.md new file mode 100644 index 000000000000..8a6402940735 --- /dev/null +++ b/samples/client/petstore/javascript-apollo/docs/DogAllOf.md @@ -0,0 +1,9 @@ +# OpenApiPetstore.DogAllOf + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**breed** | **String** | | [optional] + + diff --git a/samples/client/petstore/javascript-apollo/docs/EnumArrays.md b/samples/client/petstore/javascript-apollo/docs/EnumArrays.md new file mode 100644 index 000000000000..4926385b3ff8 --- /dev/null +++ b/samples/client/petstore/javascript-apollo/docs/EnumArrays.md @@ -0,0 +1,32 @@ +# OpenApiPetstore.EnumArrays + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**justSymbol** | **String** | | [optional] +**arrayEnum** | **[String]** | | [optional] + + + +## Enum: JustSymbolEnum + + +* `GREATER_THAN_OR_EQUAL_TO` (value: `">="`) + +* `DOLLAR` (value: `"$"`) + + + + + +## Enum: [ArrayEnumEnum] + + +* `fish` (value: `"fish"`) + +* `crab` (value: `"crab"`) + + + + diff --git a/samples/client/petstore/javascript-apollo/docs/EnumClass.md b/samples/client/petstore/javascript-apollo/docs/EnumClass.md new file mode 100644 index 000000000000..cef9bb57a56c --- /dev/null +++ b/samples/client/petstore/javascript-apollo/docs/EnumClass.md @@ -0,0 +1,12 @@ +# OpenApiPetstore.EnumClass + +## Enum + + +* `_abc` (value: `"_abc"`) + +* `-efg` (value: `"-efg"`) + +* `(xyz)` (value: `"(xyz)"`) + + diff --git a/samples/client/petstore/javascript-apollo/docs/EnumTest.md b/samples/client/petstore/javascript-apollo/docs/EnumTest.md new file mode 100644 index 000000000000..b56c3c4cef63 --- /dev/null +++ b/samples/client/petstore/javascript-apollo/docs/EnumTest.md @@ -0,0 +1,64 @@ +# OpenApiPetstore.EnumTest + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**enumString** | **String** | | [optional] +**enumStringRequired** | **String** | | +**enumInteger** | **Number** | | [optional] +**enumNumber** | **Number** | | [optional] +**outerEnum** | [**OuterEnum**](OuterEnum.md) | | [optional] +**outerEnumInteger** | [**OuterEnumInteger**](OuterEnumInteger.md) | | [optional] +**outerEnumDefaultValue** | [**OuterEnumDefaultValue**](OuterEnumDefaultValue.md) | | [optional] +**outerEnumIntegerDefaultValue** | [**OuterEnumIntegerDefaultValue**](OuterEnumIntegerDefaultValue.md) | | [optional] + + + +## Enum: EnumStringEnum + + +* `UPPER` (value: `"UPPER"`) + +* `lower` (value: `"lower"`) + +* `empty` (value: `""`) + + + + + +## Enum: EnumStringRequiredEnum + + +* `UPPER` (value: `"UPPER"`) + +* `lower` (value: `"lower"`) + +* `empty` (value: `""`) + + + + + +## Enum: EnumIntegerEnum + + +* `1` (value: `1`) + +* `-1` (value: `-1`) + + + + + +## Enum: EnumNumberEnum + + +* `1.1` (value: `1.1`) + +* `-1.2` (value: `-1.2`) + + + + diff --git a/samples/client/petstore/javascript-apollo/docs/FakeApi.md b/samples/client/petstore/javascript-apollo/docs/FakeApi.md new file mode 100644 index 000000000000..5b76c0a7f503 --- /dev/null +++ b/samples/client/petstore/javascript-apollo/docs/FakeApi.md @@ -0,0 +1,880 @@ +# OpenApiPetstore.FakeApi + +All URIs are relative to *http://petstore.swagger.io:80/v2* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**fakeHealthGet**](FakeApi.md#fakeHealthGet) | **GET** /fake/health | Health check endpoint +[**fakeHttpSignatureTest**](FakeApi.md#fakeHttpSignatureTest) | **GET** /fake/http-signature-test | test http signature authentication +[**fakeOuterBooleanSerialize**](FakeApi.md#fakeOuterBooleanSerialize) | **POST** /fake/outer/boolean | +[**fakeOuterCompositeSerialize**](FakeApi.md#fakeOuterCompositeSerialize) | **POST** /fake/outer/composite | +[**fakeOuterNumberSerialize**](FakeApi.md#fakeOuterNumberSerialize) | **POST** /fake/outer/number | +[**fakeOuterStringSerialize**](FakeApi.md#fakeOuterStringSerialize) | **POST** /fake/outer/string | +[**fakePropertyEnumIntegerSerialize**](FakeApi.md#fakePropertyEnumIntegerSerialize) | **POST** /fake/property/enum-int | +[**testBodyWithBinary**](FakeApi.md#testBodyWithBinary) | **PUT** /fake/body-with-binary | +[**testBodyWithFileSchema**](FakeApi.md#testBodyWithFileSchema) | **PUT** /fake/body-with-file-schema | +[**testBodyWithQueryParams**](FakeApi.md#testBodyWithQueryParams) | **PUT** /fake/body-with-query-params | +[**testClientModel**](FakeApi.md#testClientModel) | **PATCH** /fake | To test \"client\" model +[**testEndpointParameters**](FakeApi.md#testEndpointParameters) | **POST** /fake | Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 +[**testEnumParameters**](FakeApi.md#testEnumParameters) | **GET** /fake | To test enum parameters +[**testGroupParameters**](FakeApi.md#testGroupParameters) | **DELETE** /fake | Fake endpoint to test group parameters (optional) +[**testInlineAdditionalProperties**](FakeApi.md#testInlineAdditionalProperties) | **POST** /fake/inline-additionalProperties | test inline additionalProperties +[**testJsonFormData**](FakeApi.md#testJsonFormData) | **GET** /fake/jsonFormData | test json serialization of form data +[**testQueryParameterCollectionFormat**](FakeApi.md#testQueryParameterCollectionFormat) | **PUT** /fake/test-query-parameters | + + + +## fakeHealthGet + +> HealthCheckResult fakeHealthGet() + +Health check endpoint + +### Example + +```javascript +import OpenApiPetstore from 'open_api_petstore'; + +let apiInstance = new OpenApiPetstore.FakeApi(); +apiInstance.fakeHealthGet((error, data, response) => { + if (error) { + console.error(error); + } else { + console.log('API called successfully. Returned data: ' + data); + } +}); +``` + +### Parameters + +This endpoint does not need any parameter. + +### Return type + +[**HealthCheckResult**](HealthCheckResult.md) + +### Authorization + +No authorization required + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + + +## fakeHttpSignatureTest + +> fakeHttpSignatureTest(pet, opts) + +test http signature authentication + +### Example + +```javascript +import OpenApiPetstore from 'open_api_petstore'; +let defaultClient = OpenApiPetstore.ApiClient.instance; + +let apiInstance = new OpenApiPetstore.FakeApi(); +let pet = new OpenApiPetstore.Pet(); // Pet | Pet object that needs to be added to the store +let opts = { + 'query1': "query1_example", // String | query parameter + 'header1': "header1_example" // String | header parameter +}; +apiInstance.fakeHttpSignatureTest(pet, opts, (error, data, response) => { + if (error) { + console.error(error); + } else { + console.log('API called successfully.'); + } +}); +``` + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **pet** | [**Pet**](Pet.md)| Pet object that needs to be added to the store | + **query1** | **String**| query parameter | [optional] + **header1** | **String**| header parameter | [optional] + +### Return type + +null (empty response body) + +### Authorization + +[http_signature_test](../README.md#http_signature_test) + +### HTTP request headers + +- **Content-Type**: application/json, application/xml +- **Accept**: Not defined + + +## fakeOuterBooleanSerialize + +> Boolean fakeOuterBooleanSerialize(opts) + + + +Test serialization of outer boolean types + +### Example + +```javascript +import OpenApiPetstore from 'open_api_petstore'; + +let apiInstance = new OpenApiPetstore.FakeApi(); +let opts = { + 'body': true // Boolean | Input boolean as post body +}; +apiInstance.fakeOuterBooleanSerialize(opts, (error, data, response) => { + if (error) { + console.error(error); + } else { + console.log('API called successfully. Returned data: ' + data); + } +}); +``` + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **body** | **Boolean**| Input boolean as post body | [optional] + +### Return type + +**Boolean** + +### Authorization + +No authorization required + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: */* + + +## fakeOuterCompositeSerialize + +> OuterComposite fakeOuterCompositeSerialize(opts) + + + +Test serialization of object with outer number type + +### Example + +```javascript +import OpenApiPetstore from 'open_api_petstore'; + +let apiInstance = new OpenApiPetstore.FakeApi(); +let opts = { + 'outerComposite': new OpenApiPetstore.OuterComposite() // OuterComposite | Input composite as post body +}; +apiInstance.fakeOuterCompositeSerialize(opts, (error, data, response) => { + if (error) { + console.error(error); + } else { + console.log('API called successfully. Returned data: ' + data); + } +}); +``` + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **outerComposite** | [**OuterComposite**](OuterComposite.md)| Input composite as post body | [optional] + +### Return type + +[**OuterComposite**](OuterComposite.md) + +### Authorization + +No authorization required + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: */* + + +## fakeOuterNumberSerialize + +> Number fakeOuterNumberSerialize(opts) + + + +Test serialization of outer number types + +### Example + +```javascript +import OpenApiPetstore from 'open_api_petstore'; + +let apiInstance = new OpenApiPetstore.FakeApi(); +let opts = { + 'body': 3.4 // Number | Input number as post body +}; +apiInstance.fakeOuterNumberSerialize(opts, (error, data, response) => { + if (error) { + console.error(error); + } else { + console.log('API called successfully. Returned data: ' + data); + } +}); +``` + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **body** | **Number**| Input number as post body | [optional] + +### Return type + +**Number** + +### Authorization + +No authorization required + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: */* + + +## fakeOuterStringSerialize + +> String fakeOuterStringSerialize(opts) + + + +Test serialization of outer string types + +### Example + +```javascript +import OpenApiPetstore from 'open_api_petstore'; + +let apiInstance = new OpenApiPetstore.FakeApi(); +let opts = { + 'body': "body_example" // String | Input string as post body +}; +apiInstance.fakeOuterStringSerialize(opts, (error, data, response) => { + if (error) { + console.error(error); + } else { + console.log('API called successfully. Returned data: ' + data); + } +}); +``` + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **body** | **String**| Input string as post body | [optional] + +### Return type + +**String** + +### Authorization + +No authorization required + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: */* + + +## fakePropertyEnumIntegerSerialize + +> OuterObjectWithEnumProperty fakePropertyEnumIntegerSerialize(outerObjectWithEnumProperty) + + + +Test serialization of enum (int) properties with examples + +### Example + +```javascript +import OpenApiPetstore from 'open_api_petstore'; + +let apiInstance = new OpenApiPetstore.FakeApi(); +let outerObjectWithEnumProperty = new OpenApiPetstore.OuterObjectWithEnumProperty(); // OuterObjectWithEnumProperty | Input enum (int) as post body +apiInstance.fakePropertyEnumIntegerSerialize(outerObjectWithEnumProperty, (error, data, response) => { + if (error) { + console.error(error); + } else { + console.log('API called successfully. Returned data: ' + data); + } +}); +``` + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **outerObjectWithEnumProperty** | [**OuterObjectWithEnumProperty**](OuterObjectWithEnumProperty.md)| Input enum (int) as post body | + +### Return type + +[**OuterObjectWithEnumProperty**](OuterObjectWithEnumProperty.md) + +### Authorization + +No authorization required + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: */* + + +## testBodyWithBinary + +> testBodyWithBinary(body) + + + +For this test, the body has to be a binary file. + +### Example + +```javascript +import OpenApiPetstore from 'open_api_petstore'; + +let apiInstance = new OpenApiPetstore.FakeApi(); +let body = "/path/to/file"; // File | image to upload +apiInstance.testBodyWithBinary(body, (error, data, response) => { + if (error) { + console.error(error); + } else { + console.log('API called successfully.'); + } +}); +``` + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **body** | **File**| image to upload | + +### Return type + +null (empty response body) + +### Authorization + +No authorization required + +### HTTP request headers + +- **Content-Type**: image/png +- **Accept**: Not defined + + +## testBodyWithFileSchema + +> testBodyWithFileSchema(fileSchemaTestClass) + + + +For this test, the body for this request must reference a schema named `File`. + +### Example + +```javascript +import OpenApiPetstore from 'open_api_petstore'; + +let apiInstance = new OpenApiPetstore.FakeApi(); +let fileSchemaTestClass = new OpenApiPetstore.FileSchemaTestClass(); // FileSchemaTestClass | +apiInstance.testBodyWithFileSchema(fileSchemaTestClass, (error, data, response) => { + if (error) { + console.error(error); + } else { + console.log('API called successfully.'); + } +}); +``` + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **fileSchemaTestClass** | [**FileSchemaTestClass**](FileSchemaTestClass.md)| | + +### Return type + +null (empty response body) + +### Authorization + +No authorization required + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: Not defined + + +## testBodyWithQueryParams + +> testBodyWithQueryParams(query, user) + + + +### Example + +```javascript +import OpenApiPetstore from 'open_api_petstore'; + +let apiInstance = new OpenApiPetstore.FakeApi(); +let query = "query_example"; // String | +let user = new OpenApiPetstore.User(); // User | +apiInstance.testBodyWithQueryParams(query, user, (error, data, response) => { + if (error) { + console.error(error); + } else { + console.log('API called successfully.'); + } +}); +``` + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **query** | **String**| | + **user** | [**User**](User.md)| | + +### Return type + +null (empty response body) + +### Authorization + +No authorization required + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: Not defined + + +## testClientModel + +> Client testClientModel(client) + +To test \"client\" model + +To test \"client\" model + +### Example + +```javascript +import OpenApiPetstore from 'open_api_petstore'; + +let apiInstance = new OpenApiPetstore.FakeApi(); +let client = new OpenApiPetstore.Client(); // Client | client model +apiInstance.testClientModel(client, (error, data, response) => { + if (error) { + console.error(error); + } else { + console.log('API called successfully. Returned data: ' + data); + } +}); +``` + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **client** | [**Client**](Client.md)| client model | + +### Return type + +[**Client**](Client.md) + +### Authorization + +No authorization required + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + + +## testEndpointParameters + +> testEndpointParameters(number, _double, patternWithoutDelimiter, _byte, opts) + +Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 + +Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 + +### Example + +```javascript +import OpenApiPetstore from 'open_api_petstore'; +let defaultClient = OpenApiPetstore.ApiClient.instance; +// Configure HTTP basic authorization: http_basic_test +let http_basic_test = defaultClient.authentications['http_basic_test']; +http_basic_test.username = 'YOUR USERNAME'; +http_basic_test.password = 'YOUR PASSWORD'; + +let apiInstance = new OpenApiPetstore.FakeApi(); +let number = 3.4; // Number | None +let _double = 3.4; // Number | None +let patternWithoutDelimiter = "patternWithoutDelimiter_example"; // String | None +let _byte = null; // Blob | None +let opts = { + 'integer': 56, // Number | None + 'int32': 56, // Number | None + 'int64': 789, // Number | None + '_float': 3.4, // Number | None + 'string': "string_example", // String | None + 'binary': "/path/to/file", // File | None + 'date': new Date("2013-10-20"), // Date | None + 'dateTime': new Date("2013-10-20T19:20:30+01:00"), // Date | None + 'password': "password_example", // String | None + 'callback': "callback_example" // String | None +}; +apiInstance.testEndpointParameters(number, _double, patternWithoutDelimiter, _byte, opts, (error, data, response) => { + if (error) { + console.error(error); + } else { + console.log('API called successfully.'); + } +}); +``` + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **number** | **Number**| None | + **_double** | **Number**| None | + **patternWithoutDelimiter** | **String**| None | + **_byte** | **Blob**| None | + **integer** | **Number**| None | [optional] + **int32** | **Number**| None | [optional] + **int64** | **Number**| None | [optional] + **_float** | **Number**| None | [optional] + **string** | **String**| None | [optional] + **binary** | **File**| None | [optional] + **date** | **Date**| None | [optional] + **dateTime** | **Date**| None | [optional] + **password** | **String**| None | [optional] + **callback** | **String**| None | [optional] + +### Return type + +null (empty response body) + +### Authorization + +[http_basic_test](../README.md#http_basic_test) + +### HTTP request headers + +- **Content-Type**: application/x-www-form-urlencoded +- **Accept**: Not defined + + +## testEnumParameters + +> testEnumParameters(opts) + +To test enum parameters + +To test enum parameters + +### Example + +```javascript +import OpenApiPetstore from 'open_api_petstore'; + +let apiInstance = new OpenApiPetstore.FakeApi(); +let opts = { + 'enumHeaderStringArray': ["'$'"], // [String] | Header parameter enum test (string array) + 'enumHeaderString': "'-efg'", // String | Header parameter enum test (string) + 'enumQueryStringArray': ["'$'"], // [String] | Query parameter enum test (string array) + 'enumQueryString': "'-efg'", // String | Query parameter enum test (string) + 'enumQueryInteger': 56, // Number | Query parameter enum test (double) + 'enumQueryDouble': 3.4, // Number | Query parameter enum test (double) + 'enumQueryModelArray': [new OpenApiPetstore.EnumClass()], // [EnumClass] | + 'enumFormStringArray': ["'$'"], // [String] | Form parameter enum test (string array) + 'enumFormString': "'-efg'" // String | Form parameter enum test (string) +}; +apiInstance.testEnumParameters(opts, (error, data, response) => { + if (error) { + console.error(error); + } else { + console.log('API called successfully.'); + } +}); +``` + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **enumHeaderStringArray** | [**[String]**](String.md)| Header parameter enum test (string array) | [optional] + **enumHeaderString** | **String**| Header parameter enum test (string) | [optional] [default to '-efg'] + **enumQueryStringArray** | [**[String]**](String.md)| Query parameter enum test (string array) | [optional] + **enumQueryString** | **String**| Query parameter enum test (string) | [optional] [default to '-efg'] + **enumQueryInteger** | **Number**| Query parameter enum test (double) | [optional] + **enumQueryDouble** | **Number**| Query parameter enum test (double) | [optional] + **enumQueryModelArray** | [**[EnumClass]**](EnumClass.md)| | [optional] + **enumFormStringArray** | [**[String]**](String.md)| Form parameter enum test (string array) | [optional] [default to '$'] + **enumFormString** | **String**| Form parameter enum test (string) | [optional] [default to '-efg'] + +### Return type + +null (empty response body) + +### Authorization + +No authorization required + +### HTTP request headers + +- **Content-Type**: application/x-www-form-urlencoded +- **Accept**: Not defined + + +## testGroupParameters + +> testGroupParameters(requiredStringGroup, requiredBooleanGroup, requiredInt64Group, opts) + +Fake endpoint to test group parameters (optional) + +Fake endpoint to test group parameters (optional) + +### Example + +```javascript +import OpenApiPetstore from 'open_api_petstore'; +let defaultClient = OpenApiPetstore.ApiClient.instance; +// Configure Bearer (JWT) access token for authorization: bearer_test +let bearer_test = defaultClient.authentications['bearer_test']; +bearer_test.accessToken = "YOUR ACCESS TOKEN" + +let apiInstance = new OpenApiPetstore.FakeApi(); +let requiredStringGroup = 56; // Number | Required String in group parameters +let requiredBooleanGroup = true; // Boolean | Required Boolean in group parameters +let requiredInt64Group = 789; // Number | Required Integer in group parameters +let opts = { + 'stringGroup': 56, // Number | String in group parameters + 'booleanGroup': true, // Boolean | Boolean in group parameters + 'int64Group': 789 // Number | Integer in group parameters +}; +apiInstance.testGroupParameters(requiredStringGroup, requiredBooleanGroup, requiredInt64Group, opts, (error, data, response) => { + if (error) { + console.error(error); + } else { + console.log('API called successfully.'); + } +}); +``` + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **requiredStringGroup** | **Number**| Required String in group parameters | + **requiredBooleanGroup** | **Boolean**| Required Boolean in group parameters | + **requiredInt64Group** | **Number**| Required Integer in group parameters | + **stringGroup** | **Number**| String in group parameters | [optional] + **booleanGroup** | **Boolean**| Boolean in group parameters | [optional] + **int64Group** | **Number**| Integer in group parameters | [optional] + +### Return type + +null (empty response body) + +### Authorization + +[bearer_test](../README.md#bearer_test) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: Not defined + + +## testInlineAdditionalProperties + +> testInlineAdditionalProperties(requestBody) + +test inline additionalProperties + + + +### Example + +```javascript +import OpenApiPetstore from 'open_api_petstore'; + +let apiInstance = new OpenApiPetstore.FakeApi(); +let requestBody = {key: "null"}; // {String: String} | request body +apiInstance.testInlineAdditionalProperties(requestBody, (error, data, response) => { + if (error) { + console.error(error); + } else { + console.log('API called successfully.'); + } +}); +``` + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **requestBody** | [**{String: String}**](String.md)| request body | + +### Return type + +null (empty response body) + +### Authorization + +No authorization required + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: Not defined + + +## testJsonFormData + +> testJsonFormData(param, param2) + +test json serialization of form data + + + +### Example + +```javascript +import OpenApiPetstore from 'open_api_petstore'; + +let apiInstance = new OpenApiPetstore.FakeApi(); +let param = "param_example"; // String | field1 +let param2 = "param2_example"; // String | field2 +apiInstance.testJsonFormData(param, param2, (error, data, response) => { + if (error) { + console.error(error); + } else { + console.log('API called successfully.'); + } +}); +``` + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **param** | **String**| field1 | + **param2** | **String**| field2 | + +### Return type + +null (empty response body) + +### Authorization + +No authorization required + +### HTTP request headers + +- **Content-Type**: application/x-www-form-urlencoded +- **Accept**: Not defined + + +## testQueryParameterCollectionFormat + +> testQueryParameterCollectionFormat(pipe, ioutil, http, url, context, allowEmpty, opts) + + + +To test the collection format in query parameters + +### Example + +```javascript +import OpenApiPetstore from 'open_api_petstore'; + +let apiInstance = new OpenApiPetstore.FakeApi(); +let pipe = ["null"]; // [String] | +let ioutil = ["null"]; // [String] | +let http = ["null"]; // [String] | +let url = ["null"]; // [String] | +let context = ["null"]; // [String] | +let allowEmpty = "allowEmpty_example"; // String | +let opts = { + 'language': {key: "null"} // {String: String} | +}; +apiInstance.testQueryParameterCollectionFormat(pipe, ioutil, http, url, context, allowEmpty, opts, (error, data, response) => { + if (error) { + console.error(error); + } else { + console.log('API called successfully.'); + } +}); +``` + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **pipe** | [**[String]**](String.md)| | + **ioutil** | [**[String]**](String.md)| | + **http** | [**[String]**](String.md)| | + **url** | [**[String]**](String.md)| | + **context** | [**[String]**](String.md)| | + **allowEmpty** | **String**| | + **language** | [**{String: String}**](String.md)| | [optional] + +### Return type + +null (empty response body) + +### Authorization + +No authorization required + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: Not defined + diff --git a/samples/client/petstore/javascript-apollo/docs/FakeClassnameTags123Api.md b/samples/client/petstore/javascript-apollo/docs/FakeClassnameTags123Api.md new file mode 100644 index 000000000000..142a911a3c94 --- /dev/null +++ b/samples/client/petstore/javascript-apollo/docs/FakeClassnameTags123Api.md @@ -0,0 +1,60 @@ +# OpenApiPetstore.FakeClassnameTags123Api + +All URIs are relative to *http://petstore.swagger.io:80/v2* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**testClassname**](FakeClassnameTags123Api.md#testClassname) | **PATCH** /fake_classname_test | To test class name in snake case + + + +## testClassname + +> Client testClassname(client) + +To test class name in snake case + +To test class name in snake case + +### Example + +```javascript +import OpenApiPetstore from 'open_api_petstore'; +let defaultClient = OpenApiPetstore.ApiClient.instance; +// Configure API key authorization: api_key_query +let api_key_query = defaultClient.authentications['api_key_query']; +api_key_query.apiKey = 'YOUR API KEY'; +// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) +//api_key_query.apiKeyPrefix = 'Token'; + +let apiInstance = new OpenApiPetstore.FakeClassnameTags123Api(); +let client = new OpenApiPetstore.Client(); // Client | client model +apiInstance.testClassname(client, (error, data, response) => { + if (error) { + console.error(error); + } else { + console.log('API called successfully. Returned data: ' + data); + } +}); +``` + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **client** | [**Client**](Client.md)| client model | + +### Return type + +[**Client**](Client.md) + +### Authorization + +[api_key_query](../README.md#api_key_query) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + diff --git a/samples/client/petstore/javascript-apollo/docs/File.md b/samples/client/petstore/javascript-apollo/docs/File.md new file mode 100644 index 000000000000..51162c3e0da3 --- /dev/null +++ b/samples/client/petstore/javascript-apollo/docs/File.md @@ -0,0 +1,9 @@ +# OpenApiPetstore.File + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**sourceURI** | **String** | Test capitalization | [optional] + + diff --git a/samples/client/petstore/javascript-apollo/docs/FileSchemaTestClass.md b/samples/client/petstore/javascript-apollo/docs/FileSchemaTestClass.md new file mode 100644 index 000000000000..6f28c4976f10 --- /dev/null +++ b/samples/client/petstore/javascript-apollo/docs/FileSchemaTestClass.md @@ -0,0 +1,10 @@ +# OpenApiPetstore.FileSchemaTestClass + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**file** | **File** | | [optional] +**files** | **[File]** | | [optional] + + diff --git a/samples/client/petstore/javascript-apollo/docs/Foo.md b/samples/client/petstore/javascript-apollo/docs/Foo.md new file mode 100644 index 000000000000..1e0c9a294c48 --- /dev/null +++ b/samples/client/petstore/javascript-apollo/docs/Foo.md @@ -0,0 +1,9 @@ +# OpenApiPetstore.Foo + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**bar** | **String** | | [optional] [default to 'bar'] + + diff --git a/samples/client/petstore/javascript-apollo/docs/FooGetDefaultResponse.md b/samples/client/petstore/javascript-apollo/docs/FooGetDefaultResponse.md new file mode 100644 index 000000000000..031b90608417 --- /dev/null +++ b/samples/client/petstore/javascript-apollo/docs/FooGetDefaultResponse.md @@ -0,0 +1,9 @@ +# OpenApiPetstore.FooGetDefaultResponse + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**string** | [**Foo**](Foo.md) | | [optional] + + diff --git a/samples/client/petstore/javascript-apollo/docs/FormatTest.md b/samples/client/petstore/javascript-apollo/docs/FormatTest.md new file mode 100644 index 000000000000..c1f26210e3ec --- /dev/null +++ b/samples/client/petstore/javascript-apollo/docs/FormatTest.md @@ -0,0 +1,24 @@ +# OpenApiPetstore.FormatTest + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**integer** | **Number** | | [optional] +**int32** | **Number** | | [optional] +**int64** | **Number** | | [optional] +**number** | **Number** | | +**_float** | **Number** | | [optional] +**_double** | **Number** | | [optional] +**decimal** | **Number** | | [optional] +**string** | **String** | | [optional] +**_byte** | **Blob** | | +**binary** | **File** | | [optional] +**date** | **Date** | | +**dateTime** | **Date** | | [optional] +**uuid** | **String** | | [optional] +**password** | **String** | | +**patternWithDigits** | **String** | A string that is a 10 digit number. Can have leading zeros. | [optional] +**patternWithDigitsAndDelimiter** | **String** | A string starting with 'image_' (case insensitive) and one to three digits following i.e. Image_01. | [optional] + + diff --git a/samples/client/petstore/javascript-apollo/docs/HasOnlyReadOnly.md b/samples/client/petstore/javascript-apollo/docs/HasOnlyReadOnly.md new file mode 100644 index 000000000000..bfe08a1baee2 --- /dev/null +++ b/samples/client/petstore/javascript-apollo/docs/HasOnlyReadOnly.md @@ -0,0 +1,10 @@ +# OpenApiPetstore.HasOnlyReadOnly + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**bar** | **String** | | [optional] [readonly] +**foo** | **String** | | [optional] [readonly] + + diff --git a/samples/client/petstore/javascript-apollo/docs/HealthCheckResult.md b/samples/client/petstore/javascript-apollo/docs/HealthCheckResult.md new file mode 100644 index 000000000000..bbb74ac6a0ae --- /dev/null +++ b/samples/client/petstore/javascript-apollo/docs/HealthCheckResult.md @@ -0,0 +1,9 @@ +# OpenApiPetstore.HealthCheckResult + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**nullableMessage** | **String** | | [optional] + + diff --git a/samples/client/petstore/javascript-apollo/docs/List.md b/samples/client/petstore/javascript-apollo/docs/List.md new file mode 100644 index 000000000000..aaaa082e6a5b --- /dev/null +++ b/samples/client/petstore/javascript-apollo/docs/List.md @@ -0,0 +1,9 @@ +# OpenApiPetstore.List + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**_123list** | **String** | | [optional] + + diff --git a/samples/client/petstore/javascript-apollo/docs/MapTest.md b/samples/client/petstore/javascript-apollo/docs/MapTest.md new file mode 100644 index 000000000000..9399adf75329 --- /dev/null +++ b/samples/client/petstore/javascript-apollo/docs/MapTest.md @@ -0,0 +1,23 @@ +# OpenApiPetstore.MapTest + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**mapMapOfString** | **{String: {String: String}}** | | [optional] +**mapOfEnumString** | **{String: String}** | | [optional] +**directMap** | **{String: Boolean}** | | [optional] +**indirectMap** | **{String: Boolean}** | | [optional] + + + +## Enum: {String: String} + + +* `UPPER` (value: `"UPPER"`) + +* `lower` (value: `"lower"`) + + + + diff --git a/samples/client/petstore/javascript-apollo/docs/MixedPropertiesAndAdditionalPropertiesClass.md b/samples/client/petstore/javascript-apollo/docs/MixedPropertiesAndAdditionalPropertiesClass.md new file mode 100644 index 000000000000..776d4b3ae052 --- /dev/null +++ b/samples/client/petstore/javascript-apollo/docs/MixedPropertiesAndAdditionalPropertiesClass.md @@ -0,0 +1,11 @@ +# OpenApiPetstore.MixedPropertiesAndAdditionalPropertiesClass + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**uuid** | **String** | | [optional] +**dateTime** | **Date** | | [optional] +**map** | [**{String: Animal}**](Animal.md) | | [optional] + + diff --git a/samples/client/petstore/javascript-apollo/docs/Model200Response.md b/samples/client/petstore/javascript-apollo/docs/Model200Response.md new file mode 100644 index 000000000000..45f7932a1be7 --- /dev/null +++ b/samples/client/petstore/javascript-apollo/docs/Model200Response.md @@ -0,0 +1,10 @@ +# OpenApiPetstore.Model200Response + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**name** | **Number** | | [optional] +**_class** | **String** | | [optional] + + diff --git a/samples/client/petstore/javascript-apollo/docs/Name.md b/samples/client/petstore/javascript-apollo/docs/Name.md new file mode 100644 index 000000000000..d9f2fbeb68ba --- /dev/null +++ b/samples/client/petstore/javascript-apollo/docs/Name.md @@ -0,0 +1,12 @@ +# OpenApiPetstore.Name + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**name** | **Number** | | +**snakeCase** | **Number** | | [optional] [readonly] +**property** | **String** | | [optional] +**_123number** | **Number** | | [optional] [readonly] + + diff --git a/samples/client/petstore/javascript-apollo/docs/NullableClass.md b/samples/client/petstore/javascript-apollo/docs/NullableClass.md new file mode 100644 index 000000000000..3460980270dd --- /dev/null +++ b/samples/client/petstore/javascript-apollo/docs/NullableClass.md @@ -0,0 +1,20 @@ +# OpenApiPetstore.NullableClass + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**integerProp** | **Number** | | [optional] +**numberProp** | **Number** | | [optional] +**booleanProp** | **Boolean** | | [optional] +**stringProp** | **String** | | [optional] +**dateProp** | **Date** | | [optional] +**datetimeProp** | **Date** | | [optional] +**arrayNullableProp** | **[Object]** | | [optional] +**arrayAndItemsNullableProp** | **[Object]** | | [optional] +**arrayItemsNullable** | **[Object]** | | [optional] +**objectNullableProp** | **{String: Object}** | | [optional] +**objectAndItemsNullableProp** | **{String: Object}** | | [optional] +**objectItemsNullable** | **{String: Object}** | | [optional] + + diff --git a/samples/client/petstore/javascript-apollo/docs/NumberOnly.md b/samples/client/petstore/javascript-apollo/docs/NumberOnly.md new file mode 100644 index 000000000000..65243600759d --- /dev/null +++ b/samples/client/petstore/javascript-apollo/docs/NumberOnly.md @@ -0,0 +1,9 @@ +# OpenApiPetstore.NumberOnly + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**justNumber** | **Number** | | [optional] + + diff --git a/samples/client/petstore/javascript-apollo/docs/ObjectWithDeprecatedFields.md b/samples/client/petstore/javascript-apollo/docs/ObjectWithDeprecatedFields.md new file mode 100644 index 000000000000..fe6ebba0b634 --- /dev/null +++ b/samples/client/petstore/javascript-apollo/docs/ObjectWithDeprecatedFields.md @@ -0,0 +1,12 @@ +# OpenApiPetstore.ObjectWithDeprecatedFields + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**uuid** | **String** | | [optional] +**id** | **Number** | | [optional] +**deprecatedRef** | [**DeprecatedObject**](DeprecatedObject.md) | | [optional] +**bars** | **[String]** | | [optional] + + diff --git a/samples/client/petstore/javascript-apollo/docs/OuterComposite.md b/samples/client/petstore/javascript-apollo/docs/OuterComposite.md new file mode 100644 index 000000000000..aea253a0dfe0 --- /dev/null +++ b/samples/client/petstore/javascript-apollo/docs/OuterComposite.md @@ -0,0 +1,11 @@ +# OpenApiPetstore.OuterComposite + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**myNumber** | **Number** | | [optional] +**myString** | **String** | | [optional] +**myBoolean** | **Boolean** | | [optional] + + diff --git a/samples/client/petstore/javascript-apollo/docs/OuterEnum.md b/samples/client/petstore/javascript-apollo/docs/OuterEnum.md new file mode 100644 index 000000000000..445d3f4074c8 --- /dev/null +++ b/samples/client/petstore/javascript-apollo/docs/OuterEnum.md @@ -0,0 +1,12 @@ +# OpenApiPetstore.OuterEnum + +## Enum + + +* `placed` (value: `"placed"`) + +* `approved` (value: `"approved"`) + +* `delivered` (value: `"delivered"`) + + diff --git a/samples/client/petstore/javascript-apollo/docs/OuterEnumDefaultValue.md b/samples/client/petstore/javascript-apollo/docs/OuterEnumDefaultValue.md new file mode 100644 index 000000000000..6da697f63689 --- /dev/null +++ b/samples/client/petstore/javascript-apollo/docs/OuterEnumDefaultValue.md @@ -0,0 +1,12 @@ +# OpenApiPetstore.OuterEnumDefaultValue + +## Enum + + +* `placed` (value: `"placed"`) + +* `approved` (value: `"approved"`) + +* `delivered` (value: `"delivered"`) + + diff --git a/samples/client/petstore/javascript-apollo/docs/OuterEnumInteger.md b/samples/client/petstore/javascript-apollo/docs/OuterEnumInteger.md new file mode 100644 index 000000000000..224989a0e6c7 --- /dev/null +++ b/samples/client/petstore/javascript-apollo/docs/OuterEnumInteger.md @@ -0,0 +1,12 @@ +# OpenApiPetstore.OuterEnumInteger + +## Enum + + +* `0` (value: `0`) + +* `1` (value: `1`) + +* `2` (value: `2`) + + diff --git a/samples/client/petstore/javascript-apollo/docs/OuterEnumIntegerDefaultValue.md b/samples/client/petstore/javascript-apollo/docs/OuterEnumIntegerDefaultValue.md new file mode 100644 index 000000000000..fffd3f8f315a --- /dev/null +++ b/samples/client/petstore/javascript-apollo/docs/OuterEnumIntegerDefaultValue.md @@ -0,0 +1,12 @@ +# OpenApiPetstore.OuterEnumIntegerDefaultValue + +## Enum + + +* `0` (value: `0`) + +* `1` (value: `1`) + +* `2` (value: `2`) + + diff --git a/samples/client/petstore/javascript-apollo/docs/OuterObjectWithEnumProperty.md b/samples/client/petstore/javascript-apollo/docs/OuterObjectWithEnumProperty.md new file mode 100644 index 000000000000..a16331e63a6f --- /dev/null +++ b/samples/client/petstore/javascript-apollo/docs/OuterObjectWithEnumProperty.md @@ -0,0 +1,9 @@ +# OpenApiPetstore.OuterObjectWithEnumProperty + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**value** | [**OuterEnumInteger**](OuterEnumInteger.md) | | + + diff --git a/samples/client/petstore/javascript-apollo/docs/PetApi.md b/samples/client/petstore/javascript-apollo/docs/PetApi.md index b08c6a321355..cce0be79c8c8 100644 --- a/samples/client/petstore/javascript-apollo/docs/PetApi.md +++ b/samples/client/petstore/javascript-apollo/docs/PetApi.md @@ -1,6 +1,6 @@ # OpenApiPetstore.PetApi -All URIs are relative to *http://petstore.swagger.io/v2* +All URIs are relative to *http://petstore.swagger.io:80/v2* Method | HTTP request | Description ------------- | ------------- | ------------- @@ -12,15 +12,18 @@ Method | HTTP request | Description [**updatePet**](PetApi.md#updatePet) | **PUT** /pet | Update an existing pet [**updatePetWithForm**](PetApi.md#updatePetWithForm) | **POST** /pet/{petId} | Updates a pet in the store with form data [**uploadFile**](PetApi.md#uploadFile) | **POST** /pet/{petId}/uploadImage | uploads an image +[**uploadFileWithRequiredFile**](PetApi.md#uploadFileWithRequiredFile) | **POST** /fake/{petId}/uploadImageWithRequiredFile | uploads an image (required) ## addPet -> addPet(body) +> addPet(pet) Add a new pet to the store + + ### Example ```javascript @@ -31,8 +34,8 @@ let petstore_auth = defaultClient.authentications['petstore_auth']; petstore_auth.accessToken = 'YOUR ACCESS TOKEN'; let apiInstance = new OpenApiPetstore.PetApi(); -let body = new OpenApiPetstore.Pet(); // Pet | Pet object that needs to be added to the store -apiInstance.addPet(body, (error, data, response) => { +let pet = new OpenApiPetstore.Pet(); // Pet | Pet object that needs to be added to the store +apiInstance.addPet(pet, (error, data, response) => { if (error) { console.error(error); } else { @@ -46,7 +49,7 @@ apiInstance.addPet(body, (error, data, response) => { Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **body** | [**Pet**](Pet.md)| Pet object that needs to be added to the store | + **pet** | [**Pet**](Pet.md)| Pet object that needs to be added to the store | ### Return type @@ -68,6 +71,8 @@ null (empty response body) Deletes a pet + + ### Example ```javascript @@ -264,10 +269,12 @@ Name | Type | Description | Notes ## updatePet -> updatePet(body) +> updatePet(pet) Update an existing pet + + ### Example ```javascript @@ -278,8 +285,8 @@ let petstore_auth = defaultClient.authentications['petstore_auth']; petstore_auth.accessToken = 'YOUR ACCESS TOKEN'; let apiInstance = new OpenApiPetstore.PetApi(); -let body = new OpenApiPetstore.Pet(); // Pet | Pet object that needs to be added to the store -apiInstance.updatePet(body, (error, data, response) => { +let pet = new OpenApiPetstore.Pet(); // Pet | Pet object that needs to be added to the store +apiInstance.updatePet(pet, (error, data, response) => { if (error) { console.error(error); } else { @@ -293,7 +300,7 @@ apiInstance.updatePet(body, (error, data, response) => { Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **body** | [**Pet**](Pet.md)| Pet object that needs to be added to the store | + **pet** | [**Pet**](Pet.md)| Pet object that needs to be added to the store | ### Return type @@ -315,6 +322,8 @@ null (empty response body) Updates a pet in the store with form data + + ### Example ```javascript @@ -368,6 +377,8 @@ null (empty response body) uploads an image + + ### Example ```javascript @@ -414,3 +425,58 @@ Name | Type | Description | Notes - **Content-Type**: multipart/form-data - **Accept**: application/json + +## uploadFileWithRequiredFile + +> ApiResponse uploadFileWithRequiredFile(petId, requiredFile, opts) + +uploads an image (required) + + + +### Example + +```javascript +import OpenApiPetstore from 'open_api_petstore'; +let defaultClient = OpenApiPetstore.ApiClient.instance; +// Configure OAuth2 access token for authorization: petstore_auth +let petstore_auth = defaultClient.authentications['petstore_auth']; +petstore_auth.accessToken = 'YOUR ACCESS TOKEN'; + +let apiInstance = new OpenApiPetstore.PetApi(); +let petId = 789; // Number | ID of pet to update +let requiredFile = "/path/to/file"; // File | file to upload +let opts = { + 'additionalMetadata': "additionalMetadata_example" // String | Additional data to pass to server +}; +apiInstance.uploadFileWithRequiredFile(petId, requiredFile, opts, (error, data, response) => { + if (error) { + console.error(error); + } else { + console.log('API called successfully. Returned data: ' + data); + } +}); +``` + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **petId** | **Number**| ID of pet to update | + **requiredFile** | **File**| file to upload | + **additionalMetadata** | **String**| Additional data to pass to server | [optional] + +### Return type + +[**ApiResponse**](ApiResponse.md) + +### Authorization + +[petstore_auth](../README.md#petstore_auth) + +### HTTP request headers + +- **Content-Type**: multipart/form-data +- **Accept**: application/json + diff --git a/samples/client/petstore/javascript-apollo/docs/ReadOnlyFirst.md b/samples/client/petstore/javascript-apollo/docs/ReadOnlyFirst.md new file mode 100644 index 000000000000..eee7a321d406 --- /dev/null +++ b/samples/client/petstore/javascript-apollo/docs/ReadOnlyFirst.md @@ -0,0 +1,10 @@ +# OpenApiPetstore.ReadOnlyFirst + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**bar** | **String** | | [optional] [readonly] +**baz** | **String** | | [optional] + + diff --git a/samples/client/petstore/javascript-apollo/docs/Return.md b/samples/client/petstore/javascript-apollo/docs/Return.md new file mode 100644 index 000000000000..94b747a28f2c --- /dev/null +++ b/samples/client/petstore/javascript-apollo/docs/Return.md @@ -0,0 +1,9 @@ +# OpenApiPetstore.Return + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**_return** | **Number** | | [optional] + + diff --git a/samples/client/petstore/javascript-apollo/docs/SpecialModelName.md b/samples/client/petstore/javascript-apollo/docs/SpecialModelName.md new file mode 100644 index 000000000000..f33678460bf3 --- /dev/null +++ b/samples/client/petstore/javascript-apollo/docs/SpecialModelName.md @@ -0,0 +1,9 @@ +# OpenApiPetstore.SpecialModelName + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**specialPropertyName** | **Number** | | [optional] + + diff --git a/samples/client/petstore/javascript-apollo/docs/StoreApi.md b/samples/client/petstore/javascript-apollo/docs/StoreApi.md index 35c9f90ca036..b7abc576af49 100644 --- a/samples/client/petstore/javascript-apollo/docs/StoreApi.md +++ b/samples/client/petstore/javascript-apollo/docs/StoreApi.md @@ -1,12 +1,12 @@ # OpenApiPetstore.StoreApi -All URIs are relative to *http://petstore.swagger.io/v2* +All URIs are relative to *http://petstore.swagger.io:80/v2* Method | HTTP request | Description ------------- | ------------- | ------------- -[**deleteOrder**](StoreApi.md#deleteOrder) | **DELETE** /store/order/{orderId} | Delete purchase order by ID +[**deleteOrder**](StoreApi.md#deleteOrder) | **DELETE** /store/order/{order_id} | Delete purchase order by ID [**getInventory**](StoreApi.md#getInventory) | **GET** /store/inventory | Returns pet inventories by status -[**getOrderById**](StoreApi.md#getOrderById) | **GET** /store/order/{orderId} | Find purchase order by ID +[**getOrderById**](StoreApi.md#getOrderById) | **GET** /store/order/{order_id} | Find purchase order by ID [**placeOrder**](StoreApi.md#placeOrder) | **POST** /store/order | Place an order for a pet @@ -150,18 +150,20 @@ No authorization required ## placeOrder -> Order placeOrder(body) +> Order placeOrder(order) Place an order for a pet + + ### Example ```javascript import OpenApiPetstore from 'open_api_petstore'; let apiInstance = new OpenApiPetstore.StoreApi(); -let body = new OpenApiPetstore.Order(); // Order | order placed for purchasing the pet -apiInstance.placeOrder(body, (error, data, response) => { +let order = new OpenApiPetstore.Order(); // Order | order placed for purchasing the pet +apiInstance.placeOrder(order, (error, data, response) => { if (error) { console.error(error); } else { @@ -175,7 +177,7 @@ apiInstance.placeOrder(body, (error, data, response) => { Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **body** | [**Order**](Order.md)| order placed for purchasing the pet | + **order** | [**Order**](Order.md)| order placed for purchasing the pet | ### Return type @@ -187,6 +189,6 @@ No authorization required ### HTTP request headers -- **Content-Type**: Not defined +- **Content-Type**: application/json - **Accept**: application/xml, application/json diff --git a/samples/client/petstore/javascript-apollo/docs/UserApi.md b/samples/client/petstore/javascript-apollo/docs/UserApi.md index 01e0bc048dbf..d3631acbfba9 100644 --- a/samples/client/petstore/javascript-apollo/docs/UserApi.md +++ b/samples/client/petstore/javascript-apollo/docs/UserApi.md @@ -1,6 +1,6 @@ # OpenApiPetstore.UserApi -All URIs are relative to *http://petstore.swagger.io/v2* +All URIs are relative to *http://petstore.swagger.io:80/v2* Method | HTTP request | Description ------------- | ------------- | ------------- @@ -17,7 +17,7 @@ Method | HTTP request | Description ## createUser -> createUser(body) +> createUser(user) Create user @@ -29,8 +29,8 @@ This can only be done by the logged in user. import OpenApiPetstore from 'open_api_petstore'; let apiInstance = new OpenApiPetstore.UserApi(); -let body = new OpenApiPetstore.User(); // User | Created user object -apiInstance.createUser(body, (error, data, response) => { +let user = new OpenApiPetstore.User(); // User | Created user object +apiInstance.createUser(user, (error, data, response) => { if (error) { console.error(error); } else { @@ -44,7 +44,7 @@ apiInstance.createUser(body, (error, data, response) => { Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **body** | [**User**](User.md)| Created user object | + **user** | [**User**](User.md)| Created user object | ### Return type @@ -56,24 +56,26 @@ No authorization required ### HTTP request headers -- **Content-Type**: Not defined +- **Content-Type**: application/json - **Accept**: Not defined ## createUsersWithArrayInput -> createUsersWithArrayInput(body) +> createUsersWithArrayInput(user) Creates list of users with given input array + + ### Example ```javascript import OpenApiPetstore from 'open_api_petstore'; let apiInstance = new OpenApiPetstore.UserApi(); -let body = [new OpenApiPetstore.User()]; // [User] | List of user object -apiInstance.createUsersWithArrayInput(body, (error, data, response) => { +let user = [new OpenApiPetstore.User()]; // [User] | List of user object +apiInstance.createUsersWithArrayInput(user, (error, data, response) => { if (error) { console.error(error); } else { @@ -87,7 +89,7 @@ apiInstance.createUsersWithArrayInput(body, (error, data, response) => { Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **body** | [**[User]**](User.md)| List of user object | + **user** | [**[User]**](User.md)| List of user object | ### Return type @@ -99,24 +101,26 @@ No authorization required ### HTTP request headers -- **Content-Type**: Not defined +- **Content-Type**: application/json - **Accept**: Not defined ## createUsersWithListInput -> createUsersWithListInput(body) +> createUsersWithListInput(user) Creates list of users with given input array + + ### Example ```javascript import OpenApiPetstore from 'open_api_petstore'; let apiInstance = new OpenApiPetstore.UserApi(); -let body = [new OpenApiPetstore.User()]; // [User] | List of user object -apiInstance.createUsersWithListInput(body, (error, data, response) => { +let user = [new OpenApiPetstore.User()]; // [User] | List of user object +apiInstance.createUsersWithListInput(user, (error, data, response) => { if (error) { console.error(error); } else { @@ -130,7 +134,7 @@ apiInstance.createUsersWithListInput(body, (error, data, response) => { Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **body** | [**[User]**](User.md)| List of user object | + **user** | [**[User]**](User.md)| List of user object | ### Return type @@ -142,7 +146,7 @@ No authorization required ### HTTP request headers -- **Content-Type**: Not defined +- **Content-Type**: application/json - **Accept**: Not defined @@ -197,6 +201,8 @@ No authorization required Get user by user name + + ### Example ```javascript @@ -240,6 +246,8 @@ No authorization required Logs user into the system + + ### Example ```javascript @@ -285,6 +293,8 @@ No authorization required Logs out current logged in user session + + ### Example ```javascript @@ -320,7 +330,7 @@ No authorization required ## updateUser -> updateUser(username, body) +> updateUser(username, user) Updated user @@ -333,8 +343,8 @@ import OpenApiPetstore from 'open_api_petstore'; let apiInstance = new OpenApiPetstore.UserApi(); let username = "username_example"; // String | name that need to be deleted -let body = new OpenApiPetstore.User(); // User | Updated user object -apiInstance.updateUser(username, body, (error, data, response) => { +let user = new OpenApiPetstore.User(); // User | Updated user object +apiInstance.updateUser(username, user, (error, data, response) => { if (error) { console.error(error); } else { @@ -349,7 +359,7 @@ apiInstance.updateUser(username, body, (error, data, response) => { Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **username** | **String**| name that need to be deleted | - **body** | [**User**](User.md)| Updated user object | + **user** | [**User**](User.md)| Updated user object | ### Return type @@ -361,6 +371,6 @@ No authorization required ### HTTP request headers -- **Content-Type**: Not defined +- **Content-Type**: application/json - **Accept**: Not defined diff --git a/samples/client/petstore/javascript-apollo/git_push.sh b/samples/client/petstore/javascript-apollo/git_push.sh index ced3be2b0c7b..f53a75d4fabe 100644 --- a/samples/client/petstore/javascript-apollo/git_push.sh +++ b/samples/client/petstore/javascript-apollo/git_push.sh @@ -1,7 +1,7 @@ #!/bin/sh # ref: https://help.github.com/articles/adding-an-existing-project-to-github-using-the-command-line/ # -# Usage example: /bin/sh ./git_push.sh wing328 openapi-pestore-perl "minor update" "gitlab.com" +# Usage example: /bin/sh ./git_push.sh wing328 openapi-petstore-perl "minor update" "gitlab.com" git_user_id=$1 git_repo_id=$2 @@ -38,14 +38,14 @@ git add . git commit -m "$release_note" # Sets the new remote -git_remote=`git remote` +git_remote=$(git remote) if [ "$git_remote" = "" ]; then # git remote not defined if [ "$GIT_TOKEN" = "" ]; then echo "[INFO] \$GIT_TOKEN (environment variable) is not set. Using the git credential in your environment." git remote add origin https://${git_host}/${git_user_id}/${git_repo_id}.git else - git remote add origin https://${git_user_id}:${GIT_TOKEN}@${git_host}/${git_user_id}/${git_repo_id}.git + git remote add origin https://${git_user_id}:"${GIT_TOKEN}"@${git_host}/${git_user_id}/${git_repo_id}.git fi fi @@ -55,4 +55,3 @@ git pull origin master # Pushes (Forces) the changes in the local repository up to the remote repository echo "Git pushing to https://${git_host}/${git_user_id}/${git_repo_id}.git" git push origin master 2>&1 | grep -v 'To https' - diff --git a/samples/client/petstore/javascript-apollo/package.json b/samples/client/petstore/javascript-apollo/package.json index 77e6db68c711..169d9433cf5a 100644 --- a/samples/client/petstore/javascript-apollo/package.json +++ b/samples/client/petstore/javascript-apollo/package.json @@ -1,24 +1,47 @@ { "name": "open_api_petstore", "version": "1.0.0", - "description": "This_is_a_sample_server_Petstore_server__For_this_sample_you_can_use_the_api_key_special_key_to_test_the_authorization_filters_", + "description": "This_spec_is_mainly_for_testing_Petstore_server_and_contains_fake_endpoints_models__Please_do_not_use_this_for_any_other_purpose__Special_characters___", "license": "Apache-2.0", - "main": "src/index.js", + "main": "dist/index.js", "scripts": { + "build": "babel src -d dist", + "prepare": "npm run build", "test": "mocha --require @babel/register --recursive" }, "browser": { "fs": false }, "dependencies": { - "apollo-datasource-rest": "^0.7.0" + "@babel/cli": "^7.0.0", + "apollo-datasource-rest": "^3.6.1", + "superagent": "^5.3.0" }, "devDependencies": { + "@babel/core": "^7.0.0", + "@babel/plugin-proposal-class-properties": "^7.0.0", + "@babel/plugin-proposal-decorators": "^7.0.0", + "@babel/plugin-proposal-do-expressions": "^7.0.0", + "@babel/plugin-proposal-export-default-from": "^7.0.0", + "@babel/plugin-proposal-export-namespace-from": "^7.0.0", + "@babel/plugin-proposal-function-bind": "^7.0.0", + "@babel/plugin-proposal-function-sent": "^7.0.0", + "@babel/plugin-proposal-json-strings": "^7.0.0", + "@babel/plugin-proposal-logical-assignment-operators": "^7.0.0", + "@babel/plugin-proposal-nullish-coalescing-operator": "^7.0.0", + "@babel/plugin-proposal-numeric-separator": "^7.0.0", + "@babel/plugin-proposal-optional-chaining": "^7.0.0", + "@babel/plugin-proposal-pipeline-operator": "^7.0.0", + "@babel/plugin-proposal-throw-expressions": "^7.0.0", + "@babel/plugin-syntax-dynamic-import": "^7.0.0", + "@babel/plugin-syntax-import-meta": "^7.0.0", + "@babel/preset-env": "^7.0.0", + "@babel/register": "^7.0.0", "expect.js": "^0.3.1", - "mocha": "^5.2.0", + "mocha": "^8.0.1", "sinon": "^7.2.0" }, "files": [ - "src" + "dist" ] } diff --git a/samples/client/petstore/javascript-apollo/src/ApiClient.js b/samples/client/petstore/javascript-apollo/src/ApiClient.js index d2d855b712aa..f9d78afa472f 100644 --- a/samples/client/petstore/javascript-apollo/src/ApiClient.js +++ b/samples/client/petstore/javascript-apollo/src/ApiClient.js @@ -1,6 +1,6 @@ /** * OpenAPI Petstore - * This is a sample server Petstore server. For this sample, you can use the api key `special-key` to test the authorization filters. + * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ * * The version of the OpenAPI document: 1.0.0 * @@ -12,7 +12,7 @@ */ -import RESTDataSource from 'apollo-datasource-rest'; +import { RESTDataSource } from 'apollo-datasource-rest'; /** * @module ApiClient @@ -26,15 +26,25 @@ import RESTDataSource from 'apollo-datasource-rest'; * @class */ export default class ApiClient extends RESTDataSource { - constructor() { + constructor(baseURL = 'http://petstore.swagger.io:80/v2') { super() - + + /** + * The base URL against which to resolve every API call's (relative) path. + * @type {String} + * @default http://petstore.swagger.io:80/v2 + */ + this.baseURL = baseURL.replace(/\/+$/, ''); + /** * The authentication methods to be included for all API calls. * @type {Array.} */ this.authentications = { 'api_key': {type: 'apiKey', 'in': 'header', name: 'api_key'}, + 'api_key_query': {type: 'apiKey', 'in': 'query', name: 'api_key_query'}, + 'bearer_test': {type: 'bearer'}, // JWT + 'http_basic_test': {type: 'basic'}, 'petstore_auth': {type: 'oauth2'} } } @@ -51,7 +61,7 @@ export default class ApiClient extends RESTDataSource { } parametrizePath(path, pathParams) { - return url.replace(/\{([\w-]+)\}/g, (fullMatch, key) => { + return path.replace(/\{([\w-]+)\}/g, (fullMatch, key) => { var value; if (pathParams.hasOwnProperty(key)) { value = this.paramToString(pathParams[key]); @@ -174,7 +184,7 @@ export default class ApiClient extends RESTDataSource { async callApi(path, httpMethod, pathParams, queryParams, headerParams, formParams, bodyParam, authNames, - returnType) { + contentTypes, accepts, returnType, requestInit) { var parameterizedPath = this.parametrizePath(path, pathParams); var fetchOptions = { @@ -185,7 +195,7 @@ export default class ApiClient extends RESTDataSource { this.applyAuthOptions(fetchOptions, authNames); var body = null; - + if (bodyParam !== null && bodyParam !== undefined) { body = bodyParam; } else if (formParams !== null && formParams !== undefined) { @@ -201,9 +211,9 @@ export default class ApiClient extends RESTDataSource { var httpMethodFn = httpMethod.toLowerCase(); if (httpMethodFn == 'get' || httpMethodFn == 'delete') { - response = await this[httpMethodFn](parameterizedPath, fetchOptions); + response = await this[httpMethodFn](parameterizedPath, [], requestInit); } else { - response = await this[httpMethodFn](parameterizedPath, body, fetchOptions) + response = await this[httpMethodFn](parameterizedPath, body, requestInit) } var convertedResponse = ApiClient.convertToType(response, returnType); @@ -232,7 +242,7 @@ export default class ApiClient extends RESTDataSource { case 'Blob': return data; default: - if (type === Object) { + if (typeof type === "object") { // generic object, return directly return data; } else if (typeof type.constructFromObject === 'function') { diff --git a/samples/client/petstore/javascript-apollo/src/api/AnotherFakeApi.js b/samples/client/petstore/javascript-apollo/src/api/AnotherFakeApi.js new file mode 100644 index 000000000000..fda166d2abf5 --- /dev/null +++ b/samples/client/petstore/javascript-apollo/src/api/AnotherFakeApi.js @@ -0,0 +1,73 @@ +/** + * OpenAPI Petstore + * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ + * + * The version of the OpenAPI document: 1.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + * + */ + + + +import ApiClient from "../ApiClient"; +import Client from '../model/Client'; + +/** +* AnotherFake service. +* @module api/AnotherFakeApi +* @version 1.0.0 +*/ +export default class AnotherFakeApi extends ApiClient { + + /** + * Constructs a new AnotherFakeApi. + * @alias module:api/AnotherFakeApi + * @class + */ + constructor(baseURL = 'http://petstore.swagger.io:80/v2') { + super(baseURL); + } + + + /** + * To test special tags + * To test special tags and operation ID starting with number + * @param {module:model/Client} client client model + * @param requestInit Dynamic configuration. @see {@link https://github.com/apollographql/apollo-server/pull/1277} + * @return {Promise} + */ + async call123testSpecialTags(client, requestInit) { + let postBody = client; + // verify the required parameter 'client' is set + if (client === undefined || client === null) { + throw new Error("Missing the required parameter 'client' when calling call123testSpecialTags"); + } + + let pathParams = { + }; + let queryParams = { + }; + let headerParams = { + 'User-Agent': 'OpenAPI-Generator/1.0.0/Javascript', + }; + let formParams = { + }; + + let authNames = []; + let contentTypes = ['application/json']; + let accepts = ['application/json']; + let returnType = Client; + + return this.callApi( + '/another-fake/dummy', 'PATCH', + pathParams, queryParams, headerParams, formParams, postBody, + authNames, contentTypes, accepts, returnType, requestInit + ); + } + + +} diff --git a/samples/client/petstore/javascript-apollo/src/api/DefaultApi.js b/samples/client/petstore/javascript-apollo/src/api/DefaultApi.js new file mode 100644 index 000000000000..6ff467614da4 --- /dev/null +++ b/samples/client/petstore/javascript-apollo/src/api/DefaultApi.js @@ -0,0 +1,66 @@ +/** + * OpenAPI Petstore + * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ + * + * The version of the OpenAPI document: 1.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + * + */ + + + +import ApiClient from "../ApiClient"; +import FooGetDefaultResponse from '../model/FooGetDefaultResponse'; + +/** +* Default service. +* @module api/DefaultApi +* @version 1.0.0 +*/ +export default class DefaultApi extends ApiClient { + + /** + * Constructs a new DefaultApi. + * @alias module:api/DefaultApi + * @class + */ + constructor(baseURL = 'http://petstore.swagger.io:80/v2') { + super(baseURL); + } + + + /** + * @param requestInit Dynamic configuration. @see {@link https://github.com/apollographql/apollo-server/pull/1277} + * @return {Promise} + */ + async fooGet(requestInit) { + let postBody = null; + + let pathParams = { + }; + let queryParams = { + }; + let headerParams = { + 'User-Agent': 'OpenAPI-Generator/1.0.0/Javascript', + }; + let formParams = { + }; + + let authNames = []; + let contentTypes = []; + let accepts = ['application/json']; + let returnType = FooGetDefaultResponse; + + return this.callApi( + '/foo', 'GET', + pathParams, queryParams, headerParams, formParams, postBody, + authNames, contentTypes, accepts, returnType, requestInit + ); + } + + +} diff --git a/samples/client/petstore/javascript-apollo/src/api/FakeApi.js b/samples/client/petstore/javascript-apollo/src/api/FakeApi.js new file mode 100644 index 000000000000..c29506203b19 --- /dev/null +++ b/samples/client/petstore/javascript-apollo/src/api/FakeApi.js @@ -0,0 +1,762 @@ +/** + * OpenAPI Petstore + * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ + * + * The version of the OpenAPI document: 1.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + * + */ + + + +import ApiClient from "../ApiClient"; +import Client from '../model/Client'; +import EnumClass from '../model/EnumClass'; +import FileSchemaTestClass from '../model/FileSchemaTestClass'; +import HealthCheckResult from '../model/HealthCheckResult'; +import OuterComposite from '../model/OuterComposite'; +import OuterObjectWithEnumProperty from '../model/OuterObjectWithEnumProperty'; +import Pet from '../model/Pet'; +import User from '../model/User'; + +/** +* Fake service. +* @module api/FakeApi +* @version 1.0.0 +*/ +export default class FakeApi extends ApiClient { + + /** + * Constructs a new FakeApi. + * @alias module:api/FakeApi + * @class + */ + constructor(baseURL = 'http://petstore.swagger.io:80/v2') { + super(baseURL); + } + + + /** + * Health check endpoint + * @param requestInit Dynamic configuration. @see {@link https://github.com/apollographql/apollo-server/pull/1277} + * @return {Promise} + */ + async fakeHealthGet(requestInit) { + let postBody = null; + + let pathParams = { + }; + let queryParams = { + }; + let headerParams = { + 'User-Agent': 'OpenAPI-Generator/1.0.0/Javascript', + }; + let formParams = { + }; + + let authNames = []; + let contentTypes = []; + let accepts = ['application/json']; + let returnType = HealthCheckResult; + + return this.callApi( + '/fake/health', 'GET', + pathParams, queryParams, headerParams, formParams, postBody, + authNames, contentTypes, accepts, returnType, requestInit + ); + } + + /** + * test http signature authentication + * @param {module:model/Pet} pet Pet object that needs to be added to the store + * @param {Object} opts Optional parameters + * @param {String} opts.query1 query parameter + * @param {String} opts.header1 header parameter + * @param requestInit Dynamic configuration. @see {@link https://github.com/apollographql/apollo-server/pull/1277} + * @return {Promise} + */ + async fakeHttpSignatureTest(pet, opts, requestInit) { + opts = opts || {}; + let postBody = pet; + // verify the required parameter 'pet' is set + if (pet === undefined || pet === null) { + throw new Error("Missing the required parameter 'pet' when calling fakeHttpSignatureTest"); + } + + let pathParams = { + }; + let queryParams = { + 'query_1': opts['query1'] + }; + let headerParams = { + 'User-Agent': 'OpenAPI-Generator/1.0.0/Javascript', + 'header_1': opts['header1'] + }; + let formParams = { + }; + + let authNames = ['http_signature_test']; + let contentTypes = ['application/json', 'application/xml']; + let accepts = []; + let returnType = null; + + return this.callApi( + '/fake/http-signature-test', 'GET', + pathParams, queryParams, headerParams, formParams, postBody, + authNames, contentTypes, accepts, returnType, requestInit + ); + } + + /** + * Test serialization of outer boolean types + * @param {Object} opts Optional parameters + * @param {Boolean} opts.body Input boolean as post body + * @param requestInit Dynamic configuration. @see {@link https://github.com/apollographql/apollo-server/pull/1277} + * @return {Promise} + */ + async fakeOuterBooleanSerialize(opts, requestInit) { + opts = opts || {}; + let postBody = opts['body']; + + let pathParams = { + }; + let queryParams = { + }; + let headerParams = { + 'User-Agent': 'OpenAPI-Generator/1.0.0/Javascript', + }; + let formParams = { + }; + + let authNames = []; + let contentTypes = ['application/json']; + let accepts = ['*/*']; + let returnType = 'Boolean'; + + return this.callApi( + '/fake/outer/boolean', 'POST', + pathParams, queryParams, headerParams, formParams, postBody, + authNames, contentTypes, accepts, returnType, requestInit + ); + } + + /** + * Test serialization of object with outer number type + * @param {Object} opts Optional parameters + * @param {module:model/OuterComposite} opts.outerComposite Input composite as post body + * @param requestInit Dynamic configuration. @see {@link https://github.com/apollographql/apollo-server/pull/1277} + * @return {Promise} + */ + async fakeOuterCompositeSerialize(opts, requestInit) { + opts = opts || {}; + let postBody = opts['outerComposite']; + + let pathParams = { + }; + let queryParams = { + }; + let headerParams = { + 'User-Agent': 'OpenAPI-Generator/1.0.0/Javascript', + }; + let formParams = { + }; + + let authNames = []; + let contentTypes = ['application/json']; + let accepts = ['*/*']; + let returnType = OuterComposite; + + return this.callApi( + '/fake/outer/composite', 'POST', + pathParams, queryParams, headerParams, formParams, postBody, + authNames, contentTypes, accepts, returnType, requestInit + ); + } + + /** + * Test serialization of outer number types + * @param {Object} opts Optional parameters + * @param {Number} opts.body Input number as post body + * @param requestInit Dynamic configuration. @see {@link https://github.com/apollographql/apollo-server/pull/1277} + * @return {Promise} + */ + async fakeOuterNumberSerialize(opts, requestInit) { + opts = opts || {}; + let postBody = opts['body']; + + let pathParams = { + }; + let queryParams = { + }; + let headerParams = { + 'User-Agent': 'OpenAPI-Generator/1.0.0/Javascript', + }; + let formParams = { + }; + + let authNames = []; + let contentTypes = ['application/json']; + let accepts = ['*/*']; + let returnType = 'Number'; + + return this.callApi( + '/fake/outer/number', 'POST', + pathParams, queryParams, headerParams, formParams, postBody, + authNames, contentTypes, accepts, returnType, requestInit + ); + } + + /** + * Test serialization of outer string types + * @param {Object} opts Optional parameters + * @param {String} opts.body Input string as post body + * @param requestInit Dynamic configuration. @see {@link https://github.com/apollographql/apollo-server/pull/1277} + * @return {Promise} + */ + async fakeOuterStringSerialize(opts, requestInit) { + opts = opts || {}; + let postBody = opts['body']; + + let pathParams = { + }; + let queryParams = { + }; + let headerParams = { + 'User-Agent': 'OpenAPI-Generator/1.0.0/Javascript', + }; + let formParams = { + }; + + let authNames = []; + let contentTypes = ['application/json']; + let accepts = ['*/*']; + let returnType = 'String'; + + return this.callApi( + '/fake/outer/string', 'POST', + pathParams, queryParams, headerParams, formParams, postBody, + authNames, contentTypes, accepts, returnType, requestInit + ); + } + + /** + * Test serialization of enum (int) properties with examples + * @param {module:model/OuterObjectWithEnumProperty} outerObjectWithEnumProperty Input enum (int) as post body + * @param requestInit Dynamic configuration. @see {@link https://github.com/apollographql/apollo-server/pull/1277} + * @return {Promise} + */ + async fakePropertyEnumIntegerSerialize(outerObjectWithEnumProperty, requestInit) { + let postBody = outerObjectWithEnumProperty; + // verify the required parameter 'outerObjectWithEnumProperty' is set + if (outerObjectWithEnumProperty === undefined || outerObjectWithEnumProperty === null) { + throw new Error("Missing the required parameter 'outerObjectWithEnumProperty' when calling fakePropertyEnumIntegerSerialize"); + } + + let pathParams = { + }; + let queryParams = { + }; + let headerParams = { + 'User-Agent': 'OpenAPI-Generator/1.0.0/Javascript', + }; + let formParams = { + }; + + let authNames = []; + let contentTypes = ['application/json']; + let accepts = ['*/*']; + let returnType = OuterObjectWithEnumProperty; + + return this.callApi( + '/fake/property/enum-int', 'POST', + pathParams, queryParams, headerParams, formParams, postBody, + authNames, contentTypes, accepts, returnType, requestInit + ); + } + + /** + * For this test, the body has to be a binary file. + * @param {File} body image to upload + * @param requestInit Dynamic configuration. @see {@link https://github.com/apollographql/apollo-server/pull/1277} + * @return {Promise} + */ + async testBodyWithBinary(body, requestInit) { + let postBody = body; + // verify the required parameter 'body' is set + if (body === undefined || body === null) { + throw new Error("Missing the required parameter 'body' when calling testBodyWithBinary"); + } + + let pathParams = { + }; + let queryParams = { + }; + let headerParams = { + 'User-Agent': 'OpenAPI-Generator/1.0.0/Javascript', + }; + let formParams = { + }; + + let authNames = []; + let contentTypes = ['image/png']; + let accepts = []; + let returnType = null; + + return this.callApi( + '/fake/body-with-binary', 'PUT', + pathParams, queryParams, headerParams, formParams, postBody, + authNames, contentTypes, accepts, returnType, requestInit + ); + } + + /** + * For this test, the body for this request must reference a schema named `File`. + * @param {module:model/FileSchemaTestClass} fileSchemaTestClass + * @param requestInit Dynamic configuration. @see {@link https://github.com/apollographql/apollo-server/pull/1277} + * @return {Promise} + */ + async testBodyWithFileSchema(fileSchemaTestClass, requestInit) { + let postBody = fileSchemaTestClass; + // verify the required parameter 'fileSchemaTestClass' is set + if (fileSchemaTestClass === undefined || fileSchemaTestClass === null) { + throw new Error("Missing the required parameter 'fileSchemaTestClass' when calling testBodyWithFileSchema"); + } + + let pathParams = { + }; + let queryParams = { + }; + let headerParams = { + 'User-Agent': 'OpenAPI-Generator/1.0.0/Javascript', + }; + let formParams = { + }; + + let authNames = []; + let contentTypes = ['application/json']; + let accepts = []; + let returnType = null; + + return this.callApi( + '/fake/body-with-file-schema', 'PUT', + pathParams, queryParams, headerParams, formParams, postBody, + authNames, contentTypes, accepts, returnType, requestInit + ); + } + + /** + * @param {String} query + * @param {module:model/User} user + * @param requestInit Dynamic configuration. @see {@link https://github.com/apollographql/apollo-server/pull/1277} + * @return {Promise} + */ + async testBodyWithQueryParams(query, user, requestInit) { + let postBody = user; + // verify the required parameter 'query' is set + if (query === undefined || query === null) { + throw new Error("Missing the required parameter 'query' when calling testBodyWithQueryParams"); + } + // verify the required parameter 'user' is set + if (user === undefined || user === null) { + throw new Error("Missing the required parameter 'user' when calling testBodyWithQueryParams"); + } + + let pathParams = { + }; + let queryParams = { + 'query': query + }; + let headerParams = { + 'User-Agent': 'OpenAPI-Generator/1.0.0/Javascript', + }; + let formParams = { + }; + + let authNames = []; + let contentTypes = ['application/json']; + let accepts = []; + let returnType = null; + + return this.callApi( + '/fake/body-with-query-params', 'PUT', + pathParams, queryParams, headerParams, formParams, postBody, + authNames, contentTypes, accepts, returnType, requestInit + ); + } + + /** + * To test \"client\" model + * To test \"client\" model + * @param {module:model/Client} client client model + * @param requestInit Dynamic configuration. @see {@link https://github.com/apollographql/apollo-server/pull/1277} + * @return {Promise} + */ + async testClientModel(client, requestInit) { + let postBody = client; + // verify the required parameter 'client' is set + if (client === undefined || client === null) { + throw new Error("Missing the required parameter 'client' when calling testClientModel"); + } + + let pathParams = { + }; + let queryParams = { + }; + let headerParams = { + 'User-Agent': 'OpenAPI-Generator/1.0.0/Javascript', + }; + let formParams = { + }; + + let authNames = []; + let contentTypes = ['application/json']; + let accepts = ['application/json']; + let returnType = Client; + + return this.callApi( + '/fake', 'PATCH', + pathParams, queryParams, headerParams, formParams, postBody, + authNames, contentTypes, accepts, returnType, requestInit + ); + } + + /** + * Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 + * Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 + * @param {Number} number None + * @param {Number} _double None + * @param {String} patternWithoutDelimiter None + * @param {Blob} _byte None + * @param {Object} opts Optional parameters + * @param {Number} opts.integer None + * @param {Number} opts.int32 None + * @param {Number} opts.int64 None + * @param {Number} opts._float None + * @param {String} opts.string None + * @param {File} opts.binary None + * @param {Date} opts.date None + * @param {Date} opts.dateTime None + * @param {String} opts.password None + * @param {String} opts.callback None + * @param requestInit Dynamic configuration. @see {@link https://github.com/apollographql/apollo-server/pull/1277} + * @return {Promise} + */ + async testEndpointParameters(number, _double, patternWithoutDelimiter, _byte, opts, requestInit) { + opts = opts || {}; + let postBody = null; + // verify the required parameter 'number' is set + if (number === undefined || number === null) { + throw new Error("Missing the required parameter 'number' when calling testEndpointParameters"); + } + // verify the required parameter '_double' is set + if (_double === undefined || _double === null) { + throw new Error("Missing the required parameter '_double' when calling testEndpointParameters"); + } + // verify the required parameter 'patternWithoutDelimiter' is set + if (patternWithoutDelimiter === undefined || patternWithoutDelimiter === null) { + throw new Error("Missing the required parameter 'patternWithoutDelimiter' when calling testEndpointParameters"); + } + // verify the required parameter '_byte' is set + if (_byte === undefined || _byte === null) { + throw new Error("Missing the required parameter '_byte' when calling testEndpointParameters"); + } + + let pathParams = { + }; + let queryParams = { + }; + let headerParams = { + 'User-Agent': 'OpenAPI-Generator/1.0.0/Javascript', + }; + let formParams = { + 'integer': opts['integer'], + 'int32': opts['int32'], + 'int64': opts['int64'], + 'number': number, + 'float': opts['_float'], + 'double': _double, + 'string': opts['string'], + 'pattern_without_delimiter': patternWithoutDelimiter, + 'byte': _byte, + 'binary': opts['binary'], + 'date': opts['date'], + 'dateTime': opts['dateTime'], + 'password': opts['password'], + 'callback': opts['callback'] + }; + + let authNames = ['http_basic_test']; + let contentTypes = ['application/x-www-form-urlencoded']; + let accepts = []; + let returnType = null; + + return this.callApi( + '/fake', 'POST', + pathParams, queryParams, headerParams, formParams, postBody, + authNames, contentTypes, accepts, returnType, requestInit + ); + } + + /** + * To test enum parameters + * To test enum parameters + * @param {Object} opts Optional parameters + * @param {Array.} opts.enumHeaderStringArray Header parameter enum test (string array) + * @param {module:model/String} opts.enumHeaderString Header parameter enum test (string) (default to '-efg') + * @param {Array.} opts.enumQueryStringArray Query parameter enum test (string array) + * @param {module:model/String} opts.enumQueryString Query parameter enum test (string) (default to '-efg') + * @param {module:model/Number} opts.enumQueryInteger Query parameter enum test (double) + * @param {module:model/Number} opts.enumQueryDouble Query parameter enum test (double) + * @param {Array.} opts.enumQueryModelArray + * @param {Array.} opts.enumFormStringArray Form parameter enum test (string array) (default to '$') + * @param {module:model/String} opts.enumFormString Form parameter enum test (string) (default to '-efg') + * @param requestInit Dynamic configuration. @see {@link https://github.com/apollographql/apollo-server/pull/1277} + * @return {Promise} + */ + async testEnumParameters(opts, requestInit) { + opts = opts || {}; + let postBody = null; + + let pathParams = { + }; + let queryParams = { + 'enum_query_string_array': this.buildCollectionParam(opts['enumQueryStringArray'], 'multi'), + 'enum_query_string': opts['enumQueryString'], + 'enum_query_integer': opts['enumQueryInteger'], + 'enum_query_double': opts['enumQueryDouble'], + 'enum_query_model_array': this.buildCollectionParam(opts['enumQueryModelArray'], 'multi') + }; + let headerParams = { + 'User-Agent': 'OpenAPI-Generator/1.0.0/Javascript', + 'enum_header_string_array': opts['enumHeaderStringArray'], + 'enum_header_string': opts['enumHeaderString'] + }; + let formParams = { + 'enum_form_string_array': this.buildCollectionParam(opts['enumFormStringArray'], 'csv'), + 'enum_form_string': opts['enumFormString'] + }; + + let authNames = []; + let contentTypes = ['application/x-www-form-urlencoded']; + let accepts = []; + let returnType = null; + + return this.callApi( + '/fake', 'GET', + pathParams, queryParams, headerParams, formParams, postBody, + authNames, contentTypes, accepts, returnType, requestInit + ); + } + + /** + * Fake endpoint to test group parameters (optional) + * Fake endpoint to test group parameters (optional) + * @param {Number} requiredStringGroup Required String in group parameters + * @param {Boolean} requiredBooleanGroup Required Boolean in group parameters + * @param {Number} requiredInt64Group Required Integer in group parameters + * @param {Object} opts Optional parameters + * @param {Number} opts.stringGroup String in group parameters + * @param {Boolean} opts.booleanGroup Boolean in group parameters + * @param {Number} opts.int64Group Integer in group parameters + * @param requestInit Dynamic configuration. @see {@link https://github.com/apollographql/apollo-server/pull/1277} + * @return {Promise} + */ + async testGroupParameters(requiredStringGroup, requiredBooleanGroup, requiredInt64Group, opts, requestInit) { + opts = opts || {}; + let postBody = null; + // verify the required parameter 'requiredStringGroup' is set + if (requiredStringGroup === undefined || requiredStringGroup === null) { + throw new Error("Missing the required parameter 'requiredStringGroup' when calling testGroupParameters"); + } + // verify the required parameter 'requiredBooleanGroup' is set + if (requiredBooleanGroup === undefined || requiredBooleanGroup === null) { + throw new Error("Missing the required parameter 'requiredBooleanGroup' when calling testGroupParameters"); + } + // verify the required parameter 'requiredInt64Group' is set + if (requiredInt64Group === undefined || requiredInt64Group === null) { + throw new Error("Missing the required parameter 'requiredInt64Group' when calling testGroupParameters"); + } + + let pathParams = { + }; + let queryParams = { + 'required_string_group': requiredStringGroup, + 'required_int64_group': requiredInt64Group, + 'string_group': opts['stringGroup'], + 'int64_group': opts['int64Group'] + }; + let headerParams = { + 'User-Agent': 'OpenAPI-Generator/1.0.0/Javascript', + 'required_boolean_group': requiredBooleanGroup, + 'boolean_group': opts['booleanGroup'] + }; + let formParams = { + }; + + let authNames = ['bearer_test']; + let contentTypes = []; + let accepts = []; + let returnType = null; + + return this.callApi( + '/fake', 'DELETE', + pathParams, queryParams, headerParams, formParams, postBody, + authNames, contentTypes, accepts, returnType, requestInit + ); + } + + /** + * test inline additionalProperties + * + * @param {Object.} requestBody request body + * @param requestInit Dynamic configuration. @see {@link https://github.com/apollographql/apollo-server/pull/1277} + * @return {Promise} + */ + async testInlineAdditionalProperties(requestBody, requestInit) { + let postBody = requestBody; + // verify the required parameter 'requestBody' is set + if (requestBody === undefined || requestBody === null) { + throw new Error("Missing the required parameter 'requestBody' when calling testInlineAdditionalProperties"); + } + + let pathParams = { + }; + let queryParams = { + }; + let headerParams = { + 'User-Agent': 'OpenAPI-Generator/1.0.0/Javascript', + }; + let formParams = { + }; + + let authNames = []; + let contentTypes = ['application/json']; + let accepts = []; + let returnType = null; + + return this.callApi( + '/fake/inline-additionalProperties', 'POST', + pathParams, queryParams, headerParams, formParams, postBody, + authNames, contentTypes, accepts, returnType, requestInit + ); + } + + /** + * test json serialization of form data + * + * @param {String} param field1 + * @param {String} param2 field2 + * @param requestInit Dynamic configuration. @see {@link https://github.com/apollographql/apollo-server/pull/1277} + * @return {Promise} + */ + async testJsonFormData(param, param2, requestInit) { + let postBody = null; + // verify the required parameter 'param' is set + if (param === undefined || param === null) { + throw new Error("Missing the required parameter 'param' when calling testJsonFormData"); + } + // verify the required parameter 'param2' is set + if (param2 === undefined || param2 === null) { + throw new Error("Missing the required parameter 'param2' when calling testJsonFormData"); + } + + let pathParams = { + }; + let queryParams = { + }; + let headerParams = { + 'User-Agent': 'OpenAPI-Generator/1.0.0/Javascript', + }; + let formParams = { + 'param': param, + 'param2': param2 + }; + + let authNames = []; + let contentTypes = ['application/x-www-form-urlencoded']; + let accepts = []; + let returnType = null; + + return this.callApi( + '/fake/jsonFormData', 'GET', + pathParams, queryParams, headerParams, formParams, postBody, + authNames, contentTypes, accepts, returnType, requestInit + ); + } + + /** + * To test the collection format in query parameters + * @param {Array.} pipe + * @param {Array.} ioutil + * @param {Array.} http + * @param {Array.} url + * @param {Array.} context + * @param {String} allowEmpty + * @param {Object} opts Optional parameters + * @param {Object.} opts.language + * @param requestInit Dynamic configuration. @see {@link https://github.com/apollographql/apollo-server/pull/1277} + * @return {Promise} + */ + async testQueryParameterCollectionFormat(pipe, ioutil, http, url, context, allowEmpty, opts, requestInit) { + opts = opts || {}; + let postBody = null; + // verify the required parameter 'pipe' is set + if (pipe === undefined || pipe === null) { + throw new Error("Missing the required parameter 'pipe' when calling testQueryParameterCollectionFormat"); + } + // verify the required parameter 'ioutil' is set + if (ioutil === undefined || ioutil === null) { + throw new Error("Missing the required parameter 'ioutil' when calling testQueryParameterCollectionFormat"); + } + // verify the required parameter 'http' is set + if (http === undefined || http === null) { + throw new Error("Missing the required parameter 'http' when calling testQueryParameterCollectionFormat"); + } + // verify the required parameter 'url' is set + if (url === undefined || url === null) { + throw new Error("Missing the required parameter 'url' when calling testQueryParameterCollectionFormat"); + } + // verify the required parameter 'context' is set + if (context === undefined || context === null) { + throw new Error("Missing the required parameter 'context' when calling testQueryParameterCollectionFormat"); + } + // verify the required parameter 'allowEmpty' is set + if (allowEmpty === undefined || allowEmpty === null) { + throw new Error("Missing the required parameter 'allowEmpty' when calling testQueryParameterCollectionFormat"); + } + + let pathParams = { + }; + let queryParams = { + 'pipe': this.buildCollectionParam(pipe, 'pipes'), + 'ioutil': this.buildCollectionParam(ioutil, 'csv'), + 'http': this.buildCollectionParam(http, 'ssv'), + 'url': this.buildCollectionParam(url, 'csv'), + 'context': this.buildCollectionParam(context, 'multi'), + 'language': opts['language'], + 'allowEmpty': allowEmpty + }; + let headerParams = { + 'User-Agent': 'OpenAPI-Generator/1.0.0/Javascript', + }; + let formParams = { + }; + + let authNames = []; + let contentTypes = []; + let accepts = []; + let returnType = null; + + return this.callApi( + '/fake/test-query-parameters', 'PUT', + pathParams, queryParams, headerParams, formParams, postBody, + authNames, contentTypes, accepts, returnType, requestInit + ); + } + + +} diff --git a/samples/client/petstore/javascript-apollo/src/api/FakeClassnameTags123Api.js b/samples/client/petstore/javascript-apollo/src/api/FakeClassnameTags123Api.js new file mode 100644 index 000000000000..f8bb2acbe2ef --- /dev/null +++ b/samples/client/petstore/javascript-apollo/src/api/FakeClassnameTags123Api.js @@ -0,0 +1,73 @@ +/** + * OpenAPI Petstore + * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ + * + * The version of the OpenAPI document: 1.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + * + */ + + + +import ApiClient from "../ApiClient"; +import Client from '../model/Client'; + +/** +* FakeClassnameTags123 service. +* @module api/FakeClassnameTags123Api +* @version 1.0.0 +*/ +export default class FakeClassnameTags123Api extends ApiClient { + + /** + * Constructs a new FakeClassnameTags123Api. + * @alias module:api/FakeClassnameTags123Api + * @class + */ + constructor(baseURL = 'http://petstore.swagger.io:80/v2') { + super(baseURL); + } + + + /** + * To test class name in snake case + * To test class name in snake case + * @param {module:model/Client} client client model + * @param requestInit Dynamic configuration. @see {@link https://github.com/apollographql/apollo-server/pull/1277} + * @return {Promise} + */ + async testClassname(client, requestInit) { + let postBody = client; + // verify the required parameter 'client' is set + if (client === undefined || client === null) { + throw new Error("Missing the required parameter 'client' when calling testClassname"); + } + + let pathParams = { + }; + let queryParams = { + }; + let headerParams = { + 'User-Agent': 'OpenAPI-Generator/1.0.0/Javascript', + }; + let formParams = { + }; + + let authNames = ['api_key_query']; + let contentTypes = ['application/json']; + let accepts = ['application/json']; + let returnType = Client; + + return this.callApi( + '/fake_classname_test', 'PATCH', + pathParams, queryParams, headerParams, formParams, postBody, + authNames, contentTypes, accepts, returnType, requestInit + ); + } + + +} diff --git a/samples/client/petstore/javascript-apollo/src/api/PetApi.js b/samples/client/petstore/javascript-apollo/src/api/PetApi.js index 916a6f72fdf8..d1e65785eb2d 100644 --- a/samples/client/petstore/javascript-apollo/src/api/PetApi.js +++ b/samples/client/petstore/javascript-apollo/src/api/PetApi.js @@ -1,6 +1,6 @@ /** * OpenAPI Petstore - * This is a sample server Petstore server. For this sample, you can use the api key `special-key` to test the authorization filters. + * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ * * The version of the OpenAPI document: 1.0.0 * @@ -29,22 +29,24 @@ export default class PetApi extends ApiClient { * @alias module:api/PetApi * @class */ - constructor() { - super(); - this.baseURL = null; + constructor(baseURL = 'http://petstore.swagger.io:80/v2') { + super(baseURL); } /** * Add a new pet to the store - * @param {Pet} body Pet object that needs to be added to the store + * + * @param {module:model/Pet} pet Pet object that needs to be added to the store + * @param requestInit Dynamic configuration. @see {@link https://github.com/apollographql/apollo-server/pull/1277} * @return {Promise} */ - async addPet(body) { - let postBody = body; - // verify the required parameter 'body' is set - if (body === undefined || body === null) { - throw new Error("Missing the required parameter 'body' when calling addPet"); + async addPet(pet, opts, requestInit) { + opts = opts || {}; + let postBody = pet; + // verify the required parameter 'pet' is set + if (pet === undefined || pet === null) { + throw new Error("Missing the required parameter 'pet' when calling addPet"); } let pathParams = { @@ -52,6 +54,7 @@ export default class PetApi extends ApiClient { let queryParams = { }; let headerParams = { + 'User-Agent': 'OpenAPI-Generator/1.0.0/Javascript', }; let formParams = { }; @@ -60,22 +63,33 @@ export default class PetApi extends ApiClient { let contentTypes = ['application/json', 'application/xml']; let accepts = []; let returnType = null; + let basePaths = ['http://petstore.swagger.io/v2', 'http://path-server-test.petstore.local/v2']; + let basePath = basePaths[0]; // by default use the first one in "servers" defined in OpenAPI + if (typeof opts['_base_path_index'] !== 'undefined') { + if (opts['_base_path_index'] >= basePaths.length || opts['_base_path_index'] < 0) { + throw new Error("Invalid index " + opts['_base_path_index'] + " when selecting the host settings. Must be less than " + basePaths.length); + } + basePath = basePaths[opts['_base_path_index']]; + } + return this.callApi( '/pet', 'POST', pathParams, queryParams, headerParams, formParams, postBody, - authNames, contentTypes, accepts, returnType + authNames, contentTypes, accepts, returnType, requestInit ); } /** * Deletes a pet + * * @param {Number} petId Pet id to delete * @param {Object} opts Optional parameters * @param {String} opts.apiKey + * @param requestInit Dynamic configuration. @see {@link https://github.com/apollographql/apollo-server/pull/1277} * @return {Promise} */ - async deletePet(petId, opts) { + async deletePet(petId, opts, requestInit) { opts = opts || {}; let postBody = null; // verify the required parameter 'petId' is set @@ -89,6 +103,7 @@ export default class PetApi extends ApiClient { let queryParams = { }; let headerParams = { + 'User-Agent': 'OpenAPI-Generator/1.0.0/Javascript', 'api_key': opts['apiKey'] }; let formParams = { @@ -102,17 +117,18 @@ export default class PetApi extends ApiClient { return this.callApi( '/pet/{petId}', 'DELETE', pathParams, queryParams, headerParams, formParams, postBody, - authNames, contentTypes, accepts, returnType + authNames, contentTypes, accepts, returnType, requestInit ); } /** * Finds Pets by status * Multiple status values can be provided with comma separated strings - * @param {Array.} status Status values that need to be considered for filter - * @return {Promise>} + * @param {Array.} status Status values that need to be considered for filter + * @param requestInit Dynamic configuration. @see {@link https://github.com/apollographql/apollo-server/pull/1277} + * @return {Promise>} */ - async findPetsByStatus(status) { + async findPetsByStatus(status, requestInit) { let postBody = null; // verify the required parameter 'status' is set if (status === undefined || status === null) { @@ -125,6 +141,7 @@ export default class PetApi extends ApiClient { 'status': this.buildCollectionParam(status, 'csv') }; let headerParams = { + 'User-Agent': 'OpenAPI-Generator/1.0.0/Javascript', }; let formParams = { }; @@ -137,7 +154,7 @@ export default class PetApi extends ApiClient { return this.callApi( '/pet/findByStatus', 'GET', pathParams, queryParams, headerParams, formParams, postBody, - authNames, contentTypes, accepts, returnType + authNames, contentTypes, accepts, returnType, requestInit ); } @@ -145,9 +162,10 @@ export default class PetApi extends ApiClient { * Finds Pets by tags * Multiple tags can be provided with comma separated strings. Use tag1, tag2, tag3 for testing. * @param {Array.} tags Tags to filter by - * @return {Promise>} + * @param requestInit Dynamic configuration. @see {@link https://github.com/apollographql/apollo-server/pull/1277} + * @return {Promise>} */ - async findPetsByTags(tags) { + async findPetsByTags(tags, requestInit) { let postBody = null; // verify the required parameter 'tags' is set if (tags === undefined || tags === null) { @@ -160,6 +178,7 @@ export default class PetApi extends ApiClient { 'tags': this.buildCollectionParam(tags, 'csv') }; let headerParams = { + 'User-Agent': 'OpenAPI-Generator/1.0.0/Javascript', }; let formParams = { }; @@ -172,7 +191,7 @@ export default class PetApi extends ApiClient { return this.callApi( '/pet/findByTags', 'GET', pathParams, queryParams, headerParams, formParams, postBody, - authNames, contentTypes, accepts, returnType + authNames, contentTypes, accepts, returnType, requestInit ); } @@ -180,9 +199,10 @@ export default class PetApi extends ApiClient { * Find pet by ID * Returns a single pet * @param {Number} petId ID of pet to return - * @return {Promise} + * @param requestInit Dynamic configuration. @see {@link https://github.com/apollographql/apollo-server/pull/1277} + * @return {Promise} */ - async getPetById(petId) { + async getPetById(petId, requestInit) { let postBody = null; // verify the required parameter 'petId' is set if (petId === undefined || petId === null) { @@ -195,6 +215,7 @@ export default class PetApi extends ApiClient { let queryParams = { }; let headerParams = { + 'User-Agent': 'OpenAPI-Generator/1.0.0/Javascript', }; let formParams = { }; @@ -207,20 +228,23 @@ export default class PetApi extends ApiClient { return this.callApi( '/pet/{petId}', 'GET', pathParams, queryParams, headerParams, formParams, postBody, - authNames, contentTypes, accepts, returnType + authNames, contentTypes, accepts, returnType, requestInit ); } /** * Update an existing pet - * @param {Pet} body Pet object that needs to be added to the store + * + * @param {module:model/Pet} pet Pet object that needs to be added to the store + * @param requestInit Dynamic configuration. @see {@link https://github.com/apollographql/apollo-server/pull/1277} * @return {Promise} */ - async updatePet(body) { - let postBody = body; - // verify the required parameter 'body' is set - if (body === undefined || body === null) { - throw new Error("Missing the required parameter 'body' when calling updatePet"); + async updatePet(pet, opts, requestInit) { + opts = opts || {}; + let postBody = pet; + // verify the required parameter 'pet' is set + if (pet === undefined || pet === null) { + throw new Error("Missing the required parameter 'pet' when calling updatePet"); } let pathParams = { @@ -228,6 +252,7 @@ export default class PetApi extends ApiClient { let queryParams = { }; let headerParams = { + 'User-Agent': 'OpenAPI-Generator/1.0.0/Javascript', }; let formParams = { }; @@ -236,23 +261,34 @@ export default class PetApi extends ApiClient { let contentTypes = ['application/json', 'application/xml']; let accepts = []; let returnType = null; + let basePaths = ['http://petstore.swagger.io/v2', 'http://path-server-test.petstore.local/v2']; + let basePath = basePaths[0]; // by default use the first one in "servers" defined in OpenAPI + if (typeof opts['_base_path_index'] !== 'undefined') { + if (opts['_base_path_index'] >= basePaths.length || opts['_base_path_index'] < 0) { + throw new Error("Invalid index " + opts['_base_path_index'] + " when selecting the host settings. Must be less than " + basePaths.length); + } + basePath = basePaths[opts['_base_path_index']]; + } + return this.callApi( '/pet', 'PUT', pathParams, queryParams, headerParams, formParams, postBody, - authNames, contentTypes, accepts, returnType + authNames, contentTypes, accepts, returnType, requestInit ); } /** * Updates a pet in the store with form data + * * @param {Number} petId ID of pet that needs to be updated * @param {Object} opts Optional parameters * @param {String} opts.name Updated name of the pet * @param {String} opts.status Updated status of the pet + * @param requestInit Dynamic configuration. @see {@link https://github.com/apollographql/apollo-server/pull/1277} * @return {Promise} */ - async updatePetWithForm(petId, opts) { + async updatePetWithForm(petId, opts, requestInit) { opts = opts || {}; let postBody = null; // verify the required parameter 'petId' is set @@ -266,6 +302,7 @@ export default class PetApi extends ApiClient { let queryParams = { }; let headerParams = { + 'User-Agent': 'OpenAPI-Generator/1.0.0/Javascript', }; let formParams = { 'name': opts['name'], @@ -280,19 +317,21 @@ export default class PetApi extends ApiClient { return this.callApi( '/pet/{petId}', 'POST', pathParams, queryParams, headerParams, formParams, postBody, - authNames, contentTypes, accepts, returnType + authNames, contentTypes, accepts, returnType, requestInit ); } /** * uploads an image + * * @param {Number} petId ID of pet to update * @param {Object} opts Optional parameters * @param {String} opts.additionalMetadata Additional data to pass to server * @param {File} opts.file file to upload - * @return {Promise} + * @param requestInit Dynamic configuration. @see {@link https://github.com/apollographql/apollo-server/pull/1277} + * @return {Promise} */ - async uploadFile(petId, opts) { + async uploadFile(petId, opts, requestInit) { opts = opts || {}; let postBody = null; // verify the required parameter 'petId' is set @@ -306,6 +345,7 @@ export default class PetApi extends ApiClient { let queryParams = { }; let headerParams = { + 'User-Agent': 'OpenAPI-Generator/1.0.0/Javascript', }; let formParams = { 'additionalMetadata': opts['additionalMetadata'], @@ -320,7 +360,54 @@ export default class PetApi extends ApiClient { return this.callApi( '/pet/{petId}/uploadImage', 'POST', pathParams, queryParams, headerParams, formParams, postBody, - authNames, contentTypes, accepts, returnType + authNames, contentTypes, accepts, returnType, requestInit + ); + } + + /** + * uploads an image (required) + * + * @param {Number} petId ID of pet to update + * @param {File} requiredFile file to upload + * @param {Object} opts Optional parameters + * @param {String} opts.additionalMetadata Additional data to pass to server + * @param requestInit Dynamic configuration. @see {@link https://github.com/apollographql/apollo-server/pull/1277} + * @return {Promise} + */ + async uploadFileWithRequiredFile(petId, requiredFile, opts, requestInit) { + opts = opts || {}; + let postBody = null; + // verify the required parameter 'petId' is set + if (petId === undefined || petId === null) { + throw new Error("Missing the required parameter 'petId' when calling uploadFileWithRequiredFile"); + } + // verify the required parameter 'requiredFile' is set + if (requiredFile === undefined || requiredFile === null) { + throw new Error("Missing the required parameter 'requiredFile' when calling uploadFileWithRequiredFile"); + } + + let pathParams = { + 'petId': petId + }; + let queryParams = { + }; + let headerParams = { + 'User-Agent': 'OpenAPI-Generator/1.0.0/Javascript', + }; + let formParams = { + 'additionalMetadata': opts['additionalMetadata'], + 'requiredFile': requiredFile + }; + + let authNames = ['petstore_auth']; + let contentTypes = ['multipart/form-data']; + let accepts = ['application/json']; + let returnType = ApiResponse; + + return this.callApi( + '/fake/{petId}/uploadImageWithRequiredFile', 'POST', + pathParams, queryParams, headerParams, formParams, postBody, + authNames, contentTypes, accepts, returnType, requestInit ); } diff --git a/samples/client/petstore/javascript-apollo/src/api/StoreApi.js b/samples/client/petstore/javascript-apollo/src/api/StoreApi.js index f39c063e6ca2..96c269f27ae3 100644 --- a/samples/client/petstore/javascript-apollo/src/api/StoreApi.js +++ b/samples/client/petstore/javascript-apollo/src/api/StoreApi.js @@ -1,6 +1,6 @@ /** * OpenAPI Petstore - * This is a sample server Petstore server. For this sample, you can use the api key `special-key` to test the authorization filters. + * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ * * The version of the OpenAPI document: 1.0.0 * @@ -28,9 +28,8 @@ export default class StoreApi extends ApiClient { * @alias module:api/StoreApi * @class */ - constructor() { - super(); - this.baseURL = null; + constructor(baseURL = 'http://petstore.swagger.io:80/v2') { + super(baseURL); } @@ -38,9 +37,10 @@ export default class StoreApi extends ApiClient { * Delete purchase order by ID * For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors * @param {String} orderId ID of the order that needs to be deleted + * @param requestInit Dynamic configuration. @see {@link https://github.com/apollographql/apollo-server/pull/1277} * @return {Promise} */ - async deleteOrder(orderId) { + async deleteOrder(orderId, requestInit) { let postBody = null; // verify the required parameter 'orderId' is set if (orderId === undefined || orderId === null) { @@ -48,11 +48,12 @@ export default class StoreApi extends ApiClient { } let pathParams = { - 'orderId': orderId + 'order_id': orderId }; let queryParams = { }; let headerParams = { + 'User-Agent': 'OpenAPI-Generator/1.0.0/Javascript', }; let formParams = { }; @@ -63,18 +64,19 @@ export default class StoreApi extends ApiClient { let returnType = null; return this.callApi( - '/store/order/{orderId}', 'DELETE', + '/store/order/{order_id}', 'DELETE', pathParams, queryParams, headerParams, formParams, postBody, - authNames, contentTypes, accepts, returnType + authNames, contentTypes, accepts, returnType, requestInit ); } /** * Returns pet inventories by status * Returns a map of status codes to quantities + * @param requestInit Dynamic configuration. @see {@link https://github.com/apollographql/apollo-server/pull/1277} * @return {Promise>} */ - async getInventory() { + async getInventory(requestInit) { let postBody = null; let pathParams = { @@ -82,6 +84,7 @@ export default class StoreApi extends ApiClient { let queryParams = { }; let headerParams = { + 'User-Agent': 'OpenAPI-Generator/1.0.0/Javascript', }; let formParams = { }; @@ -94,7 +97,7 @@ export default class StoreApi extends ApiClient { return this.callApi( '/store/inventory', 'GET', pathParams, queryParams, headerParams, formParams, postBody, - authNames, contentTypes, accepts, returnType + authNames, contentTypes, accepts, returnType, requestInit ); } @@ -102,9 +105,10 @@ export default class StoreApi extends ApiClient { * Find purchase order by ID * For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions * @param {Number} orderId ID of pet that needs to be fetched - * @return {Promise} + * @param requestInit Dynamic configuration. @see {@link https://github.com/apollographql/apollo-server/pull/1277} + * @return {Promise} */ - async getOrderById(orderId) { + async getOrderById(orderId, requestInit) { let postBody = null; // verify the required parameter 'orderId' is set if (orderId === undefined || orderId === null) { @@ -112,11 +116,12 @@ export default class StoreApi extends ApiClient { } let pathParams = { - 'orderId': orderId + 'order_id': orderId }; let queryParams = { }; let headerParams = { + 'User-Agent': 'OpenAPI-Generator/1.0.0/Javascript', }; let formParams = { }; @@ -127,22 +132,24 @@ export default class StoreApi extends ApiClient { let returnType = Order; return this.callApi( - '/store/order/{orderId}', 'GET', + '/store/order/{order_id}', 'GET', pathParams, queryParams, headerParams, formParams, postBody, - authNames, contentTypes, accepts, returnType + authNames, contentTypes, accepts, returnType, requestInit ); } /** * Place an order for a pet - * @param {Order} body order placed for purchasing the pet - * @return {Promise} + * + * @param {module:model/Order} order order placed for purchasing the pet + * @param requestInit Dynamic configuration. @see {@link https://github.com/apollographql/apollo-server/pull/1277} + * @return {Promise} */ - async placeOrder(body) { - let postBody = body; - // verify the required parameter 'body' is set - if (body === undefined || body === null) { - throw new Error("Missing the required parameter 'body' when calling placeOrder"); + async placeOrder(order, requestInit) { + let postBody = order; + // verify the required parameter 'order' is set + if (order === undefined || order === null) { + throw new Error("Missing the required parameter 'order' when calling placeOrder"); } let pathParams = { @@ -150,19 +157,20 @@ export default class StoreApi extends ApiClient { let queryParams = { }; let headerParams = { + 'User-Agent': 'OpenAPI-Generator/1.0.0/Javascript', }; let formParams = { }; let authNames = []; - let contentTypes = []; + let contentTypes = ['application/json']; let accepts = ['application/xml', 'application/json']; let returnType = Order; return this.callApi( '/store/order', 'POST', pathParams, queryParams, headerParams, formParams, postBody, - authNames, contentTypes, accepts, returnType + authNames, contentTypes, accepts, returnType, requestInit ); } diff --git a/samples/client/petstore/javascript-apollo/src/api/UserApi.js b/samples/client/petstore/javascript-apollo/src/api/UserApi.js index 9d8c47b9e014..36071c4a7810 100644 --- a/samples/client/petstore/javascript-apollo/src/api/UserApi.js +++ b/samples/client/petstore/javascript-apollo/src/api/UserApi.js @@ -1,6 +1,6 @@ /** * OpenAPI Petstore - * This is a sample server Petstore server. For this sample, you can use the api key `special-key` to test the authorization filters. + * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ * * The version of the OpenAPI document: 1.0.0 * @@ -28,23 +28,23 @@ export default class UserApi extends ApiClient { * @alias module:api/UserApi * @class */ - constructor() { - super(); - this.baseURL = null; + constructor(baseURL = 'http://petstore.swagger.io:80/v2') { + super(baseURL); } /** * Create user * This can only be done by the logged in user. - * @param {User} body Created user object + * @param {module:model/User} user Created user object + * @param requestInit Dynamic configuration. @see {@link https://github.com/apollographql/apollo-server/pull/1277} * @return {Promise} */ - async createUser(body) { - let postBody = body; - // verify the required parameter 'body' is set - if (body === undefined || body === null) { - throw new Error("Missing the required parameter 'body' when calling createUser"); + async createUser(user, requestInit) { + let postBody = user; + // verify the required parameter 'user' is set + if (user === undefined || user === null) { + throw new Error("Missing the required parameter 'user' when calling createUser"); } let pathParams = { @@ -52,32 +52,35 @@ export default class UserApi extends ApiClient { let queryParams = { }; let headerParams = { + 'User-Agent': 'OpenAPI-Generator/1.0.0/Javascript', }; let formParams = { }; let authNames = []; - let contentTypes = []; + let contentTypes = ['application/json']; let accepts = []; let returnType = null; return this.callApi( '/user', 'POST', pathParams, queryParams, headerParams, formParams, postBody, - authNames, contentTypes, accepts, returnType + authNames, contentTypes, accepts, returnType, requestInit ); } /** * Creates list of users with given input array - * @param {Array.} body List of user object + * + * @param {Array.} user List of user object + * @param requestInit Dynamic configuration. @see {@link https://github.com/apollographql/apollo-server/pull/1277} * @return {Promise} */ - async createUsersWithArrayInput(body) { - let postBody = body; - // verify the required parameter 'body' is set - if (body === undefined || body === null) { - throw new Error("Missing the required parameter 'body' when calling createUsersWithArrayInput"); + async createUsersWithArrayInput(user, requestInit) { + let postBody = user; + // verify the required parameter 'user' is set + if (user === undefined || user === null) { + throw new Error("Missing the required parameter 'user' when calling createUsersWithArrayInput"); } let pathParams = { @@ -85,32 +88,35 @@ export default class UserApi extends ApiClient { let queryParams = { }; let headerParams = { + 'User-Agent': 'OpenAPI-Generator/1.0.0/Javascript', }; let formParams = { }; let authNames = []; - let contentTypes = []; + let contentTypes = ['application/json']; let accepts = []; let returnType = null; return this.callApi( '/user/createWithArray', 'POST', pathParams, queryParams, headerParams, formParams, postBody, - authNames, contentTypes, accepts, returnType + authNames, contentTypes, accepts, returnType, requestInit ); } /** * Creates list of users with given input array - * @param {Array.} body List of user object + * + * @param {Array.} user List of user object + * @param requestInit Dynamic configuration. @see {@link https://github.com/apollographql/apollo-server/pull/1277} * @return {Promise} */ - async createUsersWithListInput(body) { - let postBody = body; - // verify the required parameter 'body' is set - if (body === undefined || body === null) { - throw new Error("Missing the required parameter 'body' when calling createUsersWithListInput"); + async createUsersWithListInput(user, requestInit) { + let postBody = user; + // verify the required parameter 'user' is set + if (user === undefined || user === null) { + throw new Error("Missing the required parameter 'user' when calling createUsersWithListInput"); } let pathParams = { @@ -118,19 +124,20 @@ export default class UserApi extends ApiClient { let queryParams = { }; let headerParams = { + 'User-Agent': 'OpenAPI-Generator/1.0.0/Javascript', }; let formParams = { }; let authNames = []; - let contentTypes = []; + let contentTypes = ['application/json']; let accepts = []; let returnType = null; return this.callApi( '/user/createWithList', 'POST', pathParams, queryParams, headerParams, formParams, postBody, - authNames, contentTypes, accepts, returnType + authNames, contentTypes, accepts, returnType, requestInit ); } @@ -138,9 +145,10 @@ export default class UserApi extends ApiClient { * Delete user * This can only be done by the logged in user. * @param {String} username The name that needs to be deleted + * @param requestInit Dynamic configuration. @see {@link https://github.com/apollographql/apollo-server/pull/1277} * @return {Promise} */ - async deleteUser(username) { + async deleteUser(username, requestInit) { let postBody = null; // verify the required parameter 'username' is set if (username === undefined || username === null) { @@ -153,6 +161,7 @@ export default class UserApi extends ApiClient { let queryParams = { }; let headerParams = { + 'User-Agent': 'OpenAPI-Generator/1.0.0/Javascript', }; let formParams = { }; @@ -165,16 +174,18 @@ export default class UserApi extends ApiClient { return this.callApi( '/user/{username}', 'DELETE', pathParams, queryParams, headerParams, formParams, postBody, - authNames, contentTypes, accepts, returnType + authNames, contentTypes, accepts, returnType, requestInit ); } /** * Get user by user name + * * @param {String} username The name that needs to be fetched. Use user1 for testing. - * @return {Promise} + * @param requestInit Dynamic configuration. @see {@link https://github.com/apollographql/apollo-server/pull/1277} + * @return {Promise} */ - async getUserByName(username) { + async getUserByName(username, requestInit) { let postBody = null; // verify the required parameter 'username' is set if (username === undefined || username === null) { @@ -187,6 +198,7 @@ export default class UserApi extends ApiClient { let queryParams = { }; let headerParams = { + 'User-Agent': 'OpenAPI-Generator/1.0.0/Javascript', }; let formParams = { }; @@ -199,17 +211,19 @@ export default class UserApi extends ApiClient { return this.callApi( '/user/{username}', 'GET', pathParams, queryParams, headerParams, formParams, postBody, - authNames, contentTypes, accepts, returnType + authNames, contentTypes, accepts, returnType, requestInit ); } /** * Logs user into the system + * * @param {String} username The user name for login * @param {String} password The password for login in clear text + * @param requestInit Dynamic configuration. @see {@link https://github.com/apollographql/apollo-server/pull/1277} * @return {Promise} */ - async loginUser(username, password) { + async loginUser(username, password, requestInit) { let postBody = null; // verify the required parameter 'username' is set if (username === undefined || username === null) { @@ -227,6 +241,7 @@ export default class UserApi extends ApiClient { 'password': password }; let headerParams = { + 'User-Agent': 'OpenAPI-Generator/1.0.0/Javascript', }; let formParams = { }; @@ -239,15 +254,17 @@ export default class UserApi extends ApiClient { return this.callApi( '/user/login', 'GET', pathParams, queryParams, headerParams, formParams, postBody, - authNames, contentTypes, accepts, returnType + authNames, contentTypes, accepts, returnType, requestInit ); } /** * Logs out current logged in user session + * + * @param requestInit Dynamic configuration. @see {@link https://github.com/apollographql/apollo-server/pull/1277} * @return {Promise} */ - async logoutUser() { + async logoutUser(requestInit) { let postBody = null; let pathParams = { @@ -255,6 +272,7 @@ export default class UserApi extends ApiClient { let queryParams = { }; let headerParams = { + 'User-Agent': 'OpenAPI-Generator/1.0.0/Javascript', }; let formParams = { }; @@ -267,7 +285,7 @@ export default class UserApi extends ApiClient { return this.callApi( '/user/logout', 'GET', pathParams, queryParams, headerParams, formParams, postBody, - authNames, contentTypes, accepts, returnType + authNames, contentTypes, accepts, returnType, requestInit ); } @@ -275,18 +293,19 @@ export default class UserApi extends ApiClient { * Updated user * This can only be done by the logged in user. * @param {String} username name that need to be deleted - * @param {User} body Updated user object + * @param {module:model/User} user Updated user object + * @param requestInit Dynamic configuration. @see {@link https://github.com/apollographql/apollo-server/pull/1277} * @return {Promise} */ - async updateUser(username, body) { - let postBody = body; + async updateUser(username, user, requestInit) { + let postBody = user; // verify the required parameter 'username' is set if (username === undefined || username === null) { throw new Error("Missing the required parameter 'username' when calling updateUser"); } - // verify the required parameter 'body' is set - if (body === undefined || body === null) { - throw new Error("Missing the required parameter 'body' when calling updateUser"); + // verify the required parameter 'user' is set + if (user === undefined || user === null) { + throw new Error("Missing the required parameter 'user' when calling updateUser"); } let pathParams = { @@ -295,19 +314,20 @@ export default class UserApi extends ApiClient { let queryParams = { }; let headerParams = { + 'User-Agent': 'OpenAPI-Generator/1.0.0/Javascript', }; let formParams = { }; let authNames = []; - let contentTypes = []; + let contentTypes = ['application/json']; let accepts = []; let returnType = null; return this.callApi( '/user/{username}', 'PUT', pathParams, queryParams, headerParams, formParams, postBody, - authNames, contentTypes, accepts, returnType + authNames, contentTypes, accepts, returnType, requestInit ); } diff --git a/samples/client/petstore/javascript-apollo/src/index.js b/samples/client/petstore/javascript-apollo/src/index.js index 71e74a18acea..a75a817c2602 100644 --- a/samples/client/petstore/javascript-apollo/src/index.js +++ b/samples/client/petstore/javascript-apollo/src/index.js @@ -1,6 +1,6 @@ /** * OpenAPI Petstore - * This is a sample server Petstore server. For this sample, you can use the api key `special-key` to test the authorization filters. + * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ * * The version of the OpenAPI document: 1.0.0 * @@ -13,19 +13,63 @@ import ApiClient from './ApiClient'; +import AdditionalPropertiesClass from './model/AdditionalPropertiesClass'; +import Animal from './model/Animal'; import ApiResponse from './model/ApiResponse'; +import ArrayOfArrayOfNumberOnly from './model/ArrayOfArrayOfNumberOnly'; +import ArrayOfNumberOnly from './model/ArrayOfNumberOnly'; +import ArrayTest from './model/ArrayTest'; +import Capitalization from './model/Capitalization'; +import Cat from './model/Cat'; +import CatAllOf from './model/CatAllOf'; import Category from './model/Category'; +import ClassModel from './model/ClassModel'; +import Client from './model/Client'; +import DeprecatedObject from './model/DeprecatedObject'; +import Dog from './model/Dog'; +import DogAllOf from './model/DogAllOf'; +import EnumArrays from './model/EnumArrays'; +import EnumClass from './model/EnumClass'; +import EnumTest from './model/EnumTest'; +import File from './model/File'; +import FileSchemaTestClass from './model/FileSchemaTestClass'; +import Foo from './model/Foo'; +import FooGetDefaultResponse from './model/FooGetDefaultResponse'; +import FormatTest from './model/FormatTest'; +import HasOnlyReadOnly from './model/HasOnlyReadOnly'; +import HealthCheckResult from './model/HealthCheckResult'; +import List from './model/List'; +import MapTest from './model/MapTest'; +import MixedPropertiesAndAdditionalPropertiesClass from './model/MixedPropertiesAndAdditionalPropertiesClass'; +import Model200Response from './model/Model200Response'; +import Name from './model/Name'; +import NullableClass from './model/NullableClass'; +import NumberOnly from './model/NumberOnly'; +import ObjectWithDeprecatedFields from './model/ObjectWithDeprecatedFields'; import Order from './model/Order'; +import OuterComposite from './model/OuterComposite'; +import OuterEnum from './model/OuterEnum'; +import OuterEnumDefaultValue from './model/OuterEnumDefaultValue'; +import OuterEnumInteger from './model/OuterEnumInteger'; +import OuterEnumIntegerDefaultValue from './model/OuterEnumIntegerDefaultValue'; +import OuterObjectWithEnumProperty from './model/OuterObjectWithEnumProperty'; import Pet from './model/Pet'; +import ReadOnlyFirst from './model/ReadOnlyFirst'; +import Return from './model/Return'; +import SpecialModelName from './model/SpecialModelName'; import Tag from './model/Tag'; import User from './model/User'; +import AnotherFakeApi from './api/AnotherFakeApi'; +import DefaultApi from './api/DefaultApi'; +import FakeApi from './api/FakeApi'; +import FakeClassnameTags123Api from './api/FakeClassnameTags123Api'; import PetApi from './api/PetApi'; import StoreApi from './api/StoreApi'; import UserApi from './api/UserApi'; /** -* This_is_a_sample_server_Petstore_server__For_this_sample_you_can_use_the_api_key_special_key_to_test_the_authorization_filters_.
+* This_spec_is_mainly_for_testing_Petstore_server_and_contains_fake_endpoints_models__Please_do_not_use_this_for_any_other_purpose__Special_characters___.
* The index module provides access to constructors for all the classes which comprise the public API. *

* An AMD (recommended!) or CommonJS application will generally do something equivalent to the following: @@ -62,30 +106,270 @@ export { */ ApiClient, + /** + * The AdditionalPropertiesClass model constructor. + * @property {module:model/AdditionalPropertiesClass} + */ + AdditionalPropertiesClass, + + /** + * The Animal model constructor. + * @property {module:model/Animal} + */ + Animal, + /** * The ApiResponse model constructor. * @property {module:model/ApiResponse} */ ApiResponse, + /** + * The ArrayOfArrayOfNumberOnly model constructor. + * @property {module:model/ArrayOfArrayOfNumberOnly} + */ + ArrayOfArrayOfNumberOnly, + + /** + * The ArrayOfNumberOnly model constructor. + * @property {module:model/ArrayOfNumberOnly} + */ + ArrayOfNumberOnly, + + /** + * The ArrayTest model constructor. + * @property {module:model/ArrayTest} + */ + ArrayTest, + + /** + * The Capitalization model constructor. + * @property {module:model/Capitalization} + */ + Capitalization, + + /** + * The Cat model constructor. + * @property {module:model/Cat} + */ + Cat, + + /** + * The CatAllOf model constructor. + * @property {module:model/CatAllOf} + */ + CatAllOf, + /** * The Category model constructor. * @property {module:model/Category} */ Category, + /** + * The ClassModel model constructor. + * @property {module:model/ClassModel} + */ + ClassModel, + + /** + * The Client model constructor. + * @property {module:model/Client} + */ + Client, + + /** + * The DeprecatedObject model constructor. + * @property {module:model/DeprecatedObject} + */ + DeprecatedObject, + + /** + * The Dog model constructor. + * @property {module:model/Dog} + */ + Dog, + + /** + * The DogAllOf model constructor. + * @property {module:model/DogAllOf} + */ + DogAllOf, + + /** + * The EnumArrays model constructor. + * @property {module:model/EnumArrays} + */ + EnumArrays, + + /** + * The EnumClass model constructor. + * @property {module:model/EnumClass} + */ + EnumClass, + + /** + * The EnumTest model constructor. + * @property {module:model/EnumTest} + */ + EnumTest, + + /** + * The File model constructor. + * @property {module:model/File} + */ + File, + + /** + * The FileSchemaTestClass model constructor. + * @property {module:model/FileSchemaTestClass} + */ + FileSchemaTestClass, + + /** + * The Foo model constructor. + * @property {module:model/Foo} + */ + Foo, + + /** + * The FooGetDefaultResponse model constructor. + * @property {module:model/FooGetDefaultResponse} + */ + FooGetDefaultResponse, + + /** + * The FormatTest model constructor. + * @property {module:model/FormatTest} + */ + FormatTest, + + /** + * The HasOnlyReadOnly model constructor. + * @property {module:model/HasOnlyReadOnly} + */ + HasOnlyReadOnly, + + /** + * The HealthCheckResult model constructor. + * @property {module:model/HealthCheckResult} + */ + HealthCheckResult, + + /** + * The List model constructor. + * @property {module:model/List} + */ + List, + + /** + * The MapTest model constructor. + * @property {module:model/MapTest} + */ + MapTest, + + /** + * The MixedPropertiesAndAdditionalPropertiesClass model constructor. + * @property {module:model/MixedPropertiesAndAdditionalPropertiesClass} + */ + MixedPropertiesAndAdditionalPropertiesClass, + + /** + * The Model200Response model constructor. + * @property {module:model/Model200Response} + */ + Model200Response, + + /** + * The Name model constructor. + * @property {module:model/Name} + */ + Name, + + /** + * The NullableClass model constructor. + * @property {module:model/NullableClass} + */ + NullableClass, + + /** + * The NumberOnly model constructor. + * @property {module:model/NumberOnly} + */ + NumberOnly, + + /** + * The ObjectWithDeprecatedFields model constructor. + * @property {module:model/ObjectWithDeprecatedFields} + */ + ObjectWithDeprecatedFields, + /** * The Order model constructor. * @property {module:model/Order} */ Order, + /** + * The OuterComposite model constructor. + * @property {module:model/OuterComposite} + */ + OuterComposite, + + /** + * The OuterEnum model constructor. + * @property {module:model/OuterEnum} + */ + OuterEnum, + + /** + * The OuterEnumDefaultValue model constructor. + * @property {module:model/OuterEnumDefaultValue} + */ + OuterEnumDefaultValue, + + /** + * The OuterEnumInteger model constructor. + * @property {module:model/OuterEnumInteger} + */ + OuterEnumInteger, + + /** + * The OuterEnumIntegerDefaultValue model constructor. + * @property {module:model/OuterEnumIntegerDefaultValue} + */ + OuterEnumIntegerDefaultValue, + + /** + * The OuterObjectWithEnumProperty model constructor. + * @property {module:model/OuterObjectWithEnumProperty} + */ + OuterObjectWithEnumProperty, + /** * The Pet model constructor. * @property {module:model/Pet} */ Pet, + /** + * The ReadOnlyFirst model constructor. + * @property {module:model/ReadOnlyFirst} + */ + ReadOnlyFirst, + + /** + * The Return model constructor. + * @property {module:model/Return} + */ + Return, + + /** + * The SpecialModelName model constructor. + * @property {module:model/SpecialModelName} + */ + SpecialModelName, + /** * The Tag model constructor. * @property {module:model/Tag} @@ -98,6 +382,30 @@ export { */ User, + /** + * The AnotherFakeApi service constructor. + * @property {module:api/AnotherFakeApi} + */ + AnotherFakeApi, + + /** + * The DefaultApi service constructor. + * @property {module:api/DefaultApi} + */ + DefaultApi, + + /** + * The FakeApi service constructor. + * @property {module:api/FakeApi} + */ + FakeApi, + + /** + * The FakeClassnameTags123Api service constructor. + * @property {module:api/FakeClassnameTags123Api} + */ + FakeClassnameTags123Api, + /** * The PetApi service constructor. * @property {module:api/PetApi} diff --git a/samples/client/petstore/javascript-apollo/src/model/AdditionalPropertiesClass.js b/samples/client/petstore/javascript-apollo/src/model/AdditionalPropertiesClass.js new file mode 100644 index 000000000000..400b475d0829 --- /dev/null +++ b/samples/client/petstore/javascript-apollo/src/model/AdditionalPropertiesClass.js @@ -0,0 +1,77 @@ +/** + * OpenAPI Petstore + * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ + * + * The version of the OpenAPI document: 1.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + * + */ + +import ApiClient from '../ApiClient'; + +/** + * The AdditionalPropertiesClass model module. + * @module model/AdditionalPropertiesClass + * @version 1.0.0 + */ +class AdditionalPropertiesClass { + /** + * @member {Object.} map_property + * @type {Object.} + */ + map_property; + /** + * @member {Object.>} map_of_map_property + * @type {Object.>} + */ + map_of_map_property; + + + + /** + * Constructs a new AdditionalPropertiesClass. + * @alias module:model/AdditionalPropertiesClass + */ + constructor() { + + AdditionalPropertiesClass.initialize(this); + } + + /** + * Initializes the fields of this object. + * This method is used by the constructors of any subclasses, in order to implement multiple inheritance (mix-ins). + * Only for internal use. + */ + static initialize(obj) { + } + + /** + * Constructs a AdditionalPropertiesClass from a plain JavaScript object, optionally creating a new instance. + * Copies all relevant properties from data to obj if supplied or a new instance if not. + * @param {Object} data The plain JavaScript object bearing properties of interest. + * @param {module:model/AdditionalPropertiesClass} obj Optional instance to populate. + * @return {module:model/AdditionalPropertiesClass} The populated AdditionalPropertiesClass instance. + */ + static constructFromObject(data, obj) { + if (data) { + obj = obj || new AdditionalPropertiesClass(); + + if (data.hasOwnProperty('map_property')) { + obj['map_property'] = ApiClient.convertToType(data['map_property'], {'String': 'String'}); + } + if (data.hasOwnProperty('map_of_map_property')) { + obj['map_of_map_property'] = ApiClient.convertToType(data['map_of_map_property'], {'String': {'String': 'String'}}); + } + } + return obj; + } +} + + + +export default AdditionalPropertiesClass; + diff --git a/samples/client/petstore/javascript-apollo/src/model/Animal.js b/samples/client/petstore/javascript-apollo/src/model/Animal.js new file mode 100644 index 000000000000..252d59681b20 --- /dev/null +++ b/samples/client/petstore/javascript-apollo/src/model/Animal.js @@ -0,0 +1,80 @@ +/** + * OpenAPI Petstore + * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ + * + * The version of the OpenAPI document: 1.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + * + */ + +import ApiClient from '../ApiClient'; + +/** + * The Animal model module. + * @module model/Animal + * @version 1.0.0 + */ +class Animal { + /** + * @member {String} className + * @type {String} + */ + className; + /** + * @member {String} color + * @type {String} + * @default 'red' + */ + color = 'red'; + + + + /** + * Constructs a new Animal. + * @alias module:model/Animal + * @param className {String} + */ + constructor(className) { + + Animal.initialize(this, className); + } + + /** + * Initializes the fields of this object. + * This method is used by the constructors of any subclasses, in order to implement multiple inheritance (mix-ins). + * Only for internal use. + */ + static initialize(obj, className) { + obj['className'] = className; + } + + /** + * Constructs a Animal from a plain JavaScript object, optionally creating a new instance. + * Copies all relevant properties from data to obj if supplied or a new instance if not. + * @param {Object} data The plain JavaScript object bearing properties of interest. + * @param {module:model/Animal} obj Optional instance to populate. + * @return {module:model/Animal} The populated Animal instance. + */ + static constructFromObject(data, obj) { + if (data) { + obj = obj || new Animal(); + + if (data.hasOwnProperty('className')) { + obj['className'] = ApiClient.convertToType(data['className'], 'String'); + } + if (data.hasOwnProperty('color')) { + obj['color'] = ApiClient.convertToType(data['color'], 'String'); + } + } + return obj; + } +} + + + +export default Animal; + diff --git a/samples/client/petstore/javascript-apollo/src/model/ApiResponse.js b/samples/client/petstore/javascript-apollo/src/model/ApiResponse.js index 751a48acedc0..d4cadbfa0f4f 100644 --- a/samples/client/petstore/javascript-apollo/src/model/ApiResponse.js +++ b/samples/client/petstore/javascript-apollo/src/model/ApiResponse.js @@ -1,6 +1,6 @@ /** * OpenAPI Petstore - * This is a sample server Petstore server. For this sample, you can use the api key `special-key` to test the authorization filters. + * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ * * The version of the OpenAPI document: 1.0.0 * @@ -39,7 +39,6 @@ class ApiResponse { /** * Constructs a new ApiResponse. - * Describes the result of uploading an image resource * @alias module:model/ApiResponse */ constructor() { diff --git a/samples/client/petstore/javascript-apollo/src/model/ArrayOfArrayOfNumberOnly.js b/samples/client/petstore/javascript-apollo/src/model/ArrayOfArrayOfNumberOnly.js new file mode 100644 index 000000000000..c41e2ef5544a --- /dev/null +++ b/samples/client/petstore/javascript-apollo/src/model/ArrayOfArrayOfNumberOnly.js @@ -0,0 +1,69 @@ +/** + * OpenAPI Petstore + * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ + * + * The version of the OpenAPI document: 1.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + * + */ + +import ApiClient from '../ApiClient'; + +/** + * The ArrayOfArrayOfNumberOnly model module. + * @module model/ArrayOfArrayOfNumberOnly + * @version 1.0.0 + */ +class ArrayOfArrayOfNumberOnly { + /** + * @member {Array.>} ArrayArrayNumber + * @type {Array.>} + */ + ArrayArrayNumber; + + + + /** + * Constructs a new ArrayOfArrayOfNumberOnly. + * @alias module:model/ArrayOfArrayOfNumberOnly + */ + constructor() { + + ArrayOfArrayOfNumberOnly.initialize(this); + } + + /** + * Initializes the fields of this object. + * This method is used by the constructors of any subclasses, in order to implement multiple inheritance (mix-ins). + * Only for internal use. + */ + static initialize(obj) { + } + + /** + * Constructs a ArrayOfArrayOfNumberOnly from a plain JavaScript object, optionally creating a new instance. + * Copies all relevant properties from data to obj if supplied or a new instance if not. + * @param {Object} data The plain JavaScript object bearing properties of interest. + * @param {module:model/ArrayOfArrayOfNumberOnly} obj Optional instance to populate. + * @return {module:model/ArrayOfArrayOfNumberOnly} The populated ArrayOfArrayOfNumberOnly instance. + */ + static constructFromObject(data, obj) { + if (data) { + obj = obj || new ArrayOfArrayOfNumberOnly(); + + if (data.hasOwnProperty('ArrayArrayNumber')) { + obj['ArrayArrayNumber'] = ApiClient.convertToType(data['ArrayArrayNumber'], [['Number']]); + } + } + return obj; + } +} + + + +export default ArrayOfArrayOfNumberOnly; + diff --git a/samples/client/petstore/javascript-apollo/src/model/ArrayOfNumberOnly.js b/samples/client/petstore/javascript-apollo/src/model/ArrayOfNumberOnly.js new file mode 100644 index 000000000000..1299eb8ab4f1 --- /dev/null +++ b/samples/client/petstore/javascript-apollo/src/model/ArrayOfNumberOnly.js @@ -0,0 +1,69 @@ +/** + * OpenAPI Petstore + * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ + * + * The version of the OpenAPI document: 1.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + * + */ + +import ApiClient from '../ApiClient'; + +/** + * The ArrayOfNumberOnly model module. + * @module model/ArrayOfNumberOnly + * @version 1.0.0 + */ +class ArrayOfNumberOnly { + /** + * @member {Array.} ArrayNumber + * @type {Array.} + */ + ArrayNumber; + + + + /** + * Constructs a new ArrayOfNumberOnly. + * @alias module:model/ArrayOfNumberOnly + */ + constructor() { + + ArrayOfNumberOnly.initialize(this); + } + + /** + * Initializes the fields of this object. + * This method is used by the constructors of any subclasses, in order to implement multiple inheritance (mix-ins). + * Only for internal use. + */ + static initialize(obj) { + } + + /** + * Constructs a ArrayOfNumberOnly from a plain JavaScript object, optionally creating a new instance. + * Copies all relevant properties from data to obj if supplied or a new instance if not. + * @param {Object} data The plain JavaScript object bearing properties of interest. + * @param {module:model/ArrayOfNumberOnly} obj Optional instance to populate. + * @return {module:model/ArrayOfNumberOnly} The populated ArrayOfNumberOnly instance. + */ + static constructFromObject(data, obj) { + if (data) { + obj = obj || new ArrayOfNumberOnly(); + + if (data.hasOwnProperty('ArrayNumber')) { + obj['ArrayNumber'] = ApiClient.convertToType(data['ArrayNumber'], ['Number']); + } + } + return obj; + } +} + + + +export default ArrayOfNumberOnly; + diff --git a/samples/client/petstore/javascript-apollo/src/model/ArrayTest.js b/samples/client/petstore/javascript-apollo/src/model/ArrayTest.js new file mode 100644 index 000000000000..04415c0f5268 --- /dev/null +++ b/samples/client/petstore/javascript-apollo/src/model/ArrayTest.js @@ -0,0 +1,86 @@ +/** + * OpenAPI Petstore + * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ + * + * The version of the OpenAPI document: 1.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + * + */ + +import ApiClient from '../ApiClient'; +import ReadOnlyFirst from './ReadOnlyFirst'; + +/** + * The ArrayTest model module. + * @module model/ArrayTest + * @version 1.0.0 + */ +class ArrayTest { + /** + * @member {Array.} array_of_string + * @type {Array.} + */ + array_of_string; + /** + * @member {Array.>} array_array_of_integer + * @type {Array.>} + */ + array_array_of_integer; + /** + * @member {Array.>} array_array_of_model + * @type {Array.>} + */ + array_array_of_model; + + + + /** + * Constructs a new ArrayTest. + * @alias module:model/ArrayTest + */ + constructor() { + + ArrayTest.initialize(this); + } + + /** + * Initializes the fields of this object. + * This method is used by the constructors of any subclasses, in order to implement multiple inheritance (mix-ins). + * Only for internal use. + */ + static initialize(obj) { + } + + /** + * Constructs a ArrayTest from a plain JavaScript object, optionally creating a new instance. + * Copies all relevant properties from data to obj if supplied or a new instance if not. + * @param {Object} data The plain JavaScript object bearing properties of interest. + * @param {module:model/ArrayTest} obj Optional instance to populate. + * @return {module:model/ArrayTest} The populated ArrayTest instance. + */ + static constructFromObject(data, obj) { + if (data) { + obj = obj || new ArrayTest(); + + if (data.hasOwnProperty('array_of_string')) { + obj['array_of_string'] = ApiClient.convertToType(data['array_of_string'], ['String']); + } + if (data.hasOwnProperty('array_array_of_integer')) { + obj['array_array_of_integer'] = ApiClient.convertToType(data['array_array_of_integer'], [['Number']]); + } + if (data.hasOwnProperty('array_array_of_model')) { + obj['array_array_of_model'] = ApiClient.convertToType(data['array_array_of_model'], [[ReadOnlyFirst]]); + } + } + return obj; + } +} + + + +export default ArrayTest; + diff --git a/samples/client/petstore/javascript-apollo/src/model/Capitalization.js b/samples/client/petstore/javascript-apollo/src/model/Capitalization.js new file mode 100644 index 000000000000..c46ebb5f7aa3 --- /dev/null +++ b/samples/client/petstore/javascript-apollo/src/model/Capitalization.js @@ -0,0 +1,109 @@ +/** + * OpenAPI Petstore + * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ + * + * The version of the OpenAPI document: 1.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + * + */ + +import ApiClient from '../ApiClient'; + +/** + * The Capitalization model module. + * @module model/Capitalization + * @version 1.0.0 + */ +class Capitalization { + /** + * @member {String} smallCamel + * @type {String} + */ + smallCamel; + /** + * @member {String} CapitalCamel + * @type {String} + */ + CapitalCamel; + /** + * @member {String} small_Snake + * @type {String} + */ + small_Snake; + /** + * @member {String} Capital_Snake + * @type {String} + */ + Capital_Snake; + /** + * @member {String} SCA_ETH_Flow_Points + * @type {String} + */ + SCA_ETH_Flow_Points; + /** + * @member {String} ATT_NAME + * @type {String} + */ + ATT_NAME; + + + + /** + * Constructs a new Capitalization. + * @alias module:model/Capitalization + */ + constructor() { + + Capitalization.initialize(this); + } + + /** + * Initializes the fields of this object. + * This method is used by the constructors of any subclasses, in order to implement multiple inheritance (mix-ins). + * Only for internal use. + */ + static initialize(obj) { + } + + /** + * Constructs a Capitalization from a plain JavaScript object, optionally creating a new instance. + * Copies all relevant properties from data to obj if supplied or a new instance if not. + * @param {Object} data The plain JavaScript object bearing properties of interest. + * @param {module:model/Capitalization} obj Optional instance to populate. + * @return {module:model/Capitalization} The populated Capitalization instance. + */ + static constructFromObject(data, obj) { + if (data) { + obj = obj || new Capitalization(); + + if (data.hasOwnProperty('smallCamel')) { + obj['smallCamel'] = ApiClient.convertToType(data['smallCamel'], 'String'); + } + if (data.hasOwnProperty('CapitalCamel')) { + obj['CapitalCamel'] = ApiClient.convertToType(data['CapitalCamel'], 'String'); + } + if (data.hasOwnProperty('small_Snake')) { + obj['small_Snake'] = ApiClient.convertToType(data['small_Snake'], 'String'); + } + if (data.hasOwnProperty('Capital_Snake')) { + obj['Capital_Snake'] = ApiClient.convertToType(data['Capital_Snake'], 'String'); + } + if (data.hasOwnProperty('SCA_ETH_Flow_Points')) { + obj['SCA_ETH_Flow_Points'] = ApiClient.convertToType(data['SCA_ETH_Flow_Points'], 'String'); + } + if (data.hasOwnProperty('ATT_NAME')) { + obj['ATT_NAME'] = ApiClient.convertToType(data['ATT_NAME'], 'String'); + } + } + return obj; + } +} + + + +export default Capitalization; + diff --git a/samples/client/petstore/javascript-apollo/src/model/Cat.js b/samples/client/petstore/javascript-apollo/src/model/Cat.js new file mode 100644 index 000000000000..337c38ea2920 --- /dev/null +++ b/samples/client/petstore/javascript-apollo/src/model/Cat.js @@ -0,0 +1,93 @@ +/** + * OpenAPI Petstore + * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ + * + * The version of the OpenAPI document: 1.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + * + */ + +import ApiClient from '../ApiClient'; +import Animal from './Animal'; +import CatAllOf from './CatAllOf'; + +/** + * The Cat model module. + * @module model/Cat + * @version 1.0.0 + */ +class Cat { + /** + * @member {Boolean} declawed + * @type {Boolean} + */ + declawed; + + /** + * @member {String} className + * @type {String} + */ + #className; + /** + * @member {String} color + * @type {String} + */ + #color; + /** + * @member {Boolean} declawed + * @type {Boolean} + */ + #declawed; + + + /** + * Constructs a new Cat. + * @alias module:model/Cat + * @extends module:model/Animal + * @implements module:model/Animal + * @implements module:model/CatAllOf + * @param className {String} + */ + constructor(className) { + Animal.initialize(this, className);CatAllOf.initialize(this); + Cat.initialize(this, className); + } + + /** + * Initializes the fields of this object. + * This method is used by the constructors of any subclasses, in order to implement multiple inheritance (mix-ins). + * Only for internal use. + */ + static initialize(obj, className) { + } + + /** + * Constructs a Cat from a plain JavaScript object, optionally creating a new instance. + * Copies all relevant properties from data to obj if supplied or a new instance if not. + * @param {Object} data The plain JavaScript object bearing properties of interest. + * @param {module:model/Cat} obj Optional instance to populate. + * @return {module:model/Cat} The populated Cat instance. + */ + static constructFromObject(data, obj) { + if (data) { + obj = obj || new Cat(); + Animal.constructFromObject(data, obj); + Animal.constructFromObject(data, obj); + CatAllOf.constructFromObject(data, obj); + + if (data.hasOwnProperty('declawed')) { + obj['declawed'] = ApiClient.convertToType(data['declawed'], 'Boolean'); + } + } + return obj; + } +} + + + +export default Cat; + diff --git a/samples/client/petstore/javascript-apollo/src/model/CatAllOf.js b/samples/client/petstore/javascript-apollo/src/model/CatAllOf.js new file mode 100644 index 000000000000..6531639ff404 --- /dev/null +++ b/samples/client/petstore/javascript-apollo/src/model/CatAllOf.js @@ -0,0 +1,69 @@ +/** + * OpenAPI Petstore + * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ + * + * The version of the OpenAPI document: 1.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + * + */ + +import ApiClient from '../ApiClient'; + +/** + * The CatAllOf model module. + * @module model/CatAllOf + * @version 1.0.0 + */ +class CatAllOf { + /** + * @member {Boolean} declawed + * @type {Boolean} + */ + declawed; + + + + /** + * Constructs a new CatAllOf. + * @alias module:model/CatAllOf + */ + constructor() { + + CatAllOf.initialize(this); + } + + /** + * Initializes the fields of this object. + * This method is used by the constructors of any subclasses, in order to implement multiple inheritance (mix-ins). + * Only for internal use. + */ + static initialize(obj) { + } + + /** + * Constructs a CatAllOf from a plain JavaScript object, optionally creating a new instance. + * Copies all relevant properties from data to obj if supplied or a new instance if not. + * @param {Object} data The plain JavaScript object bearing properties of interest. + * @param {module:model/CatAllOf} obj Optional instance to populate. + * @return {module:model/CatAllOf} The populated CatAllOf instance. + */ + static constructFromObject(data, obj) { + if (data) { + obj = obj || new CatAllOf(); + + if (data.hasOwnProperty('declawed')) { + obj['declawed'] = ApiClient.convertToType(data['declawed'], 'Boolean'); + } + } + return obj; + } +} + + + +export default CatAllOf; + diff --git a/samples/client/petstore/javascript-apollo/src/model/Category.js b/samples/client/petstore/javascript-apollo/src/model/Category.js index 9ab10c3a0aaf..e6165a921b1b 100644 --- a/samples/client/petstore/javascript-apollo/src/model/Category.js +++ b/samples/client/petstore/javascript-apollo/src/model/Category.js @@ -1,6 +1,6 @@ /** * OpenAPI Petstore - * This is a sample server Petstore server. For this sample, you can use the api key `special-key` to test the authorization filters. + * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ * * The version of the OpenAPI document: 1.0.0 * @@ -27,19 +27,20 @@ class Category { /** * @member {String} name * @type {String} + * @default 'default-name' */ - name; + name = 'default-name'; /** * Constructs a new Category. - * A category for a pet * @alias module:model/Category + * @param name {String} */ - constructor() { + constructor(name) { - Category.initialize(this); + Category.initialize(this, name); } /** @@ -47,7 +48,8 @@ class Category { * This method is used by the constructors of any subclasses, in order to implement multiple inheritance (mix-ins). * Only for internal use. */ - static initialize(obj) { + static initialize(obj, name) { + obj['name'] = name; } /** diff --git a/samples/client/petstore/javascript-apollo/src/model/ClassModel.js b/samples/client/petstore/javascript-apollo/src/model/ClassModel.js new file mode 100644 index 000000000000..a63b06762284 --- /dev/null +++ b/samples/client/petstore/javascript-apollo/src/model/ClassModel.js @@ -0,0 +1,70 @@ +/** + * OpenAPI Petstore + * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ + * + * The version of the OpenAPI document: 1.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + * + */ + +import ApiClient from '../ApiClient'; + +/** + * The ClassModel model module. + * @module model/ClassModel + * @version 1.0.0 + */ +class ClassModel { + /** + * @member {String} _class + * @type {String} + */ + _class; + + + + /** + * Constructs a new ClassModel. + * Model for testing model with \"_class\" property + * @alias module:model/ClassModel + */ + constructor() { + + ClassModel.initialize(this); + } + + /** + * Initializes the fields of this object. + * This method is used by the constructors of any subclasses, in order to implement multiple inheritance (mix-ins). + * Only for internal use. + */ + static initialize(obj) { + } + + /** + * Constructs a ClassModel from a plain JavaScript object, optionally creating a new instance. + * Copies all relevant properties from data to obj if supplied or a new instance if not. + * @param {Object} data The plain JavaScript object bearing properties of interest. + * @param {module:model/ClassModel} obj Optional instance to populate. + * @return {module:model/ClassModel} The populated ClassModel instance. + */ + static constructFromObject(data, obj) { + if (data) { + obj = obj || new ClassModel(); + + if (data.hasOwnProperty('_class')) { + obj['_class'] = ApiClient.convertToType(data['_class'], 'String'); + } + } + return obj; + } +} + + + +export default ClassModel; + diff --git a/samples/client/petstore/javascript-apollo/src/model/Client.js b/samples/client/petstore/javascript-apollo/src/model/Client.js new file mode 100644 index 000000000000..e3ee5bd8b1b4 --- /dev/null +++ b/samples/client/petstore/javascript-apollo/src/model/Client.js @@ -0,0 +1,69 @@ +/** + * OpenAPI Petstore + * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ + * + * The version of the OpenAPI document: 1.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + * + */ + +import ApiClient from '../ApiClient'; + +/** + * The Client model module. + * @module model/Client + * @version 1.0.0 + */ +class Client { + /** + * @member {String} client + * @type {String} + */ + client; + + + + /** + * Constructs a new Client. + * @alias module:model/Client + */ + constructor() { + + Client.initialize(this); + } + + /** + * Initializes the fields of this object. + * This method is used by the constructors of any subclasses, in order to implement multiple inheritance (mix-ins). + * Only for internal use. + */ + static initialize(obj) { + } + + /** + * Constructs a Client from a plain JavaScript object, optionally creating a new instance. + * Copies all relevant properties from data to obj if supplied or a new instance if not. + * @param {Object} data The plain JavaScript object bearing properties of interest. + * @param {module:model/Client} obj Optional instance to populate. + * @return {module:model/Client} The populated Client instance. + */ + static constructFromObject(data, obj) { + if (data) { + obj = obj || new Client(); + + if (data.hasOwnProperty('client')) { + obj['client'] = ApiClient.convertToType(data['client'], 'String'); + } + } + return obj; + } +} + + + +export default Client; + diff --git a/samples/client/petstore/javascript-apollo/src/model/DeprecatedObject.js b/samples/client/petstore/javascript-apollo/src/model/DeprecatedObject.js new file mode 100644 index 000000000000..c476369fe1c2 --- /dev/null +++ b/samples/client/petstore/javascript-apollo/src/model/DeprecatedObject.js @@ -0,0 +1,69 @@ +/** + * OpenAPI Petstore + * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ + * + * The version of the OpenAPI document: 1.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + * + */ + +import ApiClient from '../ApiClient'; + +/** + * The DeprecatedObject model module. + * @module model/DeprecatedObject + * @version 1.0.0 + */ +class DeprecatedObject { + /** + * @member {String} name + * @type {String} + */ + name; + + + + /** + * Constructs a new DeprecatedObject. + * @alias module:model/DeprecatedObject + */ + constructor() { + + DeprecatedObject.initialize(this); + } + + /** + * Initializes the fields of this object. + * This method is used by the constructors of any subclasses, in order to implement multiple inheritance (mix-ins). + * Only for internal use. + */ + static initialize(obj) { + } + + /** + * Constructs a DeprecatedObject from a plain JavaScript object, optionally creating a new instance. + * Copies all relevant properties from data to obj if supplied or a new instance if not. + * @param {Object} data The plain JavaScript object bearing properties of interest. + * @param {module:model/DeprecatedObject} obj Optional instance to populate. + * @return {module:model/DeprecatedObject} The populated DeprecatedObject instance. + */ + static constructFromObject(data, obj) { + if (data) { + obj = obj || new DeprecatedObject(); + + if (data.hasOwnProperty('name')) { + obj['name'] = ApiClient.convertToType(data['name'], 'String'); + } + } + return obj; + } +} + + + +export default DeprecatedObject; + diff --git a/samples/client/petstore/javascript-apollo/src/model/Dog.js b/samples/client/petstore/javascript-apollo/src/model/Dog.js new file mode 100644 index 000000000000..7620a859049e --- /dev/null +++ b/samples/client/petstore/javascript-apollo/src/model/Dog.js @@ -0,0 +1,93 @@ +/** + * OpenAPI Petstore + * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ + * + * The version of the OpenAPI document: 1.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + * + */ + +import ApiClient from '../ApiClient'; +import Animal from './Animal'; +import DogAllOf from './DogAllOf'; + +/** + * The Dog model module. + * @module model/Dog + * @version 1.0.0 + */ +class Dog { + /** + * @member {String} breed + * @type {String} + */ + breed; + + /** + * @member {String} className + * @type {String} + */ + #className; + /** + * @member {String} color + * @type {String} + */ + #color; + /** + * @member {String} breed + * @type {String} + */ + #breed; + + + /** + * Constructs a new Dog. + * @alias module:model/Dog + * @extends module:model/Animal + * @implements module:model/Animal + * @implements module:model/DogAllOf + * @param className {String} + */ + constructor(className) { + Animal.initialize(this, className);DogAllOf.initialize(this); + Dog.initialize(this, className); + } + + /** + * Initializes the fields of this object. + * This method is used by the constructors of any subclasses, in order to implement multiple inheritance (mix-ins). + * Only for internal use. + */ + static initialize(obj, className) { + } + + /** + * Constructs a Dog from a plain JavaScript object, optionally creating a new instance. + * Copies all relevant properties from data to obj if supplied or a new instance if not. + * @param {Object} data The plain JavaScript object bearing properties of interest. + * @param {module:model/Dog} obj Optional instance to populate. + * @return {module:model/Dog} The populated Dog instance. + */ + static constructFromObject(data, obj) { + if (data) { + obj = obj || new Dog(); + Animal.constructFromObject(data, obj); + Animal.constructFromObject(data, obj); + DogAllOf.constructFromObject(data, obj); + + if (data.hasOwnProperty('breed')) { + obj['breed'] = ApiClient.convertToType(data['breed'], 'String'); + } + } + return obj; + } +} + + + +export default Dog; + diff --git a/samples/client/petstore/javascript-apollo/src/model/DogAllOf.js b/samples/client/petstore/javascript-apollo/src/model/DogAllOf.js new file mode 100644 index 000000000000..938e2c95fe26 --- /dev/null +++ b/samples/client/petstore/javascript-apollo/src/model/DogAllOf.js @@ -0,0 +1,69 @@ +/** + * OpenAPI Petstore + * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ + * + * The version of the OpenAPI document: 1.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + * + */ + +import ApiClient from '../ApiClient'; + +/** + * The DogAllOf model module. + * @module model/DogAllOf + * @version 1.0.0 + */ +class DogAllOf { + /** + * @member {String} breed + * @type {String} + */ + breed; + + + + /** + * Constructs a new DogAllOf. + * @alias module:model/DogAllOf + */ + constructor() { + + DogAllOf.initialize(this); + } + + /** + * Initializes the fields of this object. + * This method is used by the constructors of any subclasses, in order to implement multiple inheritance (mix-ins). + * Only for internal use. + */ + static initialize(obj) { + } + + /** + * Constructs a DogAllOf from a plain JavaScript object, optionally creating a new instance. + * Copies all relevant properties from data to obj if supplied or a new instance if not. + * @param {Object} data The plain JavaScript object bearing properties of interest. + * @param {module:model/DogAllOf} obj Optional instance to populate. + * @return {module:model/DogAllOf} The populated DogAllOf instance. + */ + static constructFromObject(data, obj) { + if (data) { + obj = obj || new DogAllOf(); + + if (data.hasOwnProperty('breed')) { + obj['breed'] = ApiClient.convertToType(data['breed'], 'String'); + } + } + return obj; + } +} + + + +export default DogAllOf; + diff --git a/samples/client/petstore/javascript-apollo/src/model/EnumArrays.js b/samples/client/petstore/javascript-apollo/src/model/EnumArrays.js new file mode 100644 index 000000000000..eabc5835b4aa --- /dev/null +++ b/samples/client/petstore/javascript-apollo/src/model/EnumArrays.js @@ -0,0 +1,119 @@ +/** + * OpenAPI Petstore + * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ + * + * The version of the OpenAPI document: 1.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + * + */ + +import ApiClient from '../ApiClient'; + +/** + * The EnumArrays model module. + * @module model/EnumArrays + * @version 1.0.0 + */ +class EnumArrays { + /** + * @member {module:model/EnumArrays.JustSymbolEnum} just_symbol + * @type {module:model/EnumArrays.JustSymbolEnum} + */ + just_symbol; + /** + * @member {Array.} array_enum + * @type {Array.} + */ + array_enum; + + + + /** + * Constructs a new EnumArrays. + * @alias module:model/EnumArrays + */ + constructor() { + + EnumArrays.initialize(this); + } + + /** + * Initializes the fields of this object. + * This method is used by the constructors of any subclasses, in order to implement multiple inheritance (mix-ins). + * Only for internal use. + */ + static initialize(obj) { + } + + /** + * Constructs a EnumArrays from a plain JavaScript object, optionally creating a new instance. + * Copies all relevant properties from data to obj if supplied or a new instance if not. + * @param {Object} data The plain JavaScript object bearing properties of interest. + * @param {module:model/EnumArrays} obj Optional instance to populate. + * @return {module:model/EnumArrays} The populated EnumArrays instance. + */ + static constructFromObject(data, obj) { + if (data) { + obj = obj || new EnumArrays(); + + if (data.hasOwnProperty('just_symbol')) { + obj['just_symbol'] = ApiClient.convertToType(data['just_symbol'], 'String'); + } + if (data.hasOwnProperty('array_enum')) { + obj['array_enum'] = ApiClient.convertToType(data['array_enum'], ['String']); + } + } + return obj; + } +} + + +/** + * Allowed values for the just_symbol property. + * @enum {String} + * @readonly + */ +EnumArrays['JustSymbolEnum'] = { + + /** + * value: ">=" + * @const + */ + "GREATER_THAN_OR_EQUAL_TO": ">=", + + /** + * value: "$" + * @const + */ + "DOLLAR": "$" +}; + + +/** + * Allowed values for the arrayEnum property. + * @enum {String} + * @readonly + */ +EnumArrays['ArrayEnumEnum'] = { + + /** + * value: "fish" + * @const + */ + "fish": "fish", + + /** + * value: "crab" + * @const + */ + "crab": "crab" +}; + + + +export default EnumArrays; + diff --git a/samples/client/petstore/javascript-apollo/src/model/EnumClass.js b/samples/client/petstore/javascript-apollo/src/model/EnumClass.js new file mode 100644 index 000000000000..f0888e52d5ba --- /dev/null +++ b/samples/client/petstore/javascript-apollo/src/model/EnumClass.js @@ -0,0 +1,53 @@ +/** + * OpenAPI Petstore + * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ + * + * The version of the OpenAPI document: 1.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + * + */ + +import ApiClient from '../ApiClient'; +/** +* Enum class EnumClass. +* @enum {} +* @readonly +*/ +export default class EnumClass { + + /** + * value: "_abc" + * @const + */ + "_abc" = "_abc"; + + + /** + * value: "-efg" + * @const + */ + "-efg" = "-efg"; + + + /** + * value: "(xyz)" + * @const + */ + "(xyz)" = "(xyz)"; + + + + /** + * Returns a EnumClass enum value from a Javascript object name. + * @param {Object} data The plain JavaScript object containing the name of the enum value. + * @return {module:model/EnumClass} The enum EnumClass value. + */ + static constructFromObject(object) { + return object; + } +} + diff --git a/samples/client/petstore/javascript-apollo/src/model/EnumTest.js b/samples/client/petstore/javascript-apollo/src/model/EnumTest.js new file mode 100644 index 000000000000..2a9f6a7d9ae1 --- /dev/null +++ b/samples/client/petstore/javascript-apollo/src/model/EnumTest.js @@ -0,0 +1,227 @@ +/** + * OpenAPI Petstore + * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ + * + * The version of the OpenAPI document: 1.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + * + */ + +import ApiClient from '../ApiClient'; +import OuterEnum from './OuterEnum'; +import OuterEnumDefaultValue from './OuterEnumDefaultValue'; +import OuterEnumInteger from './OuterEnumInteger'; +import OuterEnumIntegerDefaultValue from './OuterEnumIntegerDefaultValue'; + +/** + * The EnumTest model module. + * @module model/EnumTest + * @version 1.0.0 + */ +class EnumTest { + /** + * @member {module:model/EnumTest.EnumStringEnum} enum_string + * @type {module:model/EnumTest.EnumStringEnum} + */ + enum_string; + /** + * @member {module:model/EnumTest.EnumStringRequiredEnum} enum_string_required + * @type {module:model/EnumTest.EnumStringRequiredEnum} + */ + enum_string_required; + /** + * @member {module:model/EnumTest.EnumIntegerEnum} enum_integer + * @type {module:model/EnumTest.EnumIntegerEnum} + */ + enum_integer; + /** + * @member {module:model/EnumTest.EnumNumberEnum} enum_number + * @type {module:model/EnumTest.EnumNumberEnum} + */ + enum_number; + /** + * @member {module:model/OuterEnum} outerEnum + * @type {module:model/OuterEnum} + */ + outerEnum; + /** + * @member {module:model/OuterEnumInteger} outerEnumInteger + * @type {module:model/OuterEnumInteger} + */ + outerEnumInteger; + /** + * @member {module:model/OuterEnumDefaultValue} outerEnumDefaultValue + * @type {module:model/OuterEnumDefaultValue} + */ + outerEnumDefaultValue; + /** + * @member {module:model/OuterEnumIntegerDefaultValue} outerEnumIntegerDefaultValue + * @type {module:model/OuterEnumIntegerDefaultValue} + */ + outerEnumIntegerDefaultValue; + + + + /** + * Constructs a new EnumTest. + * @alias module:model/EnumTest + * @param enumStringRequired {module:model/EnumTest.EnumStringRequiredEnum} + */ + constructor(enumStringRequired) { + + EnumTest.initialize(this, enumStringRequired); + } + + /** + * Initializes the fields of this object. + * This method is used by the constructors of any subclasses, in order to implement multiple inheritance (mix-ins). + * Only for internal use. + */ + static initialize(obj, enumStringRequired) { + obj['enum_string_required'] = enumStringRequired; + } + + /** + * Constructs a EnumTest from a plain JavaScript object, optionally creating a new instance. + * Copies all relevant properties from data to obj if supplied or a new instance if not. + * @param {Object} data The plain JavaScript object bearing properties of interest. + * @param {module:model/EnumTest} obj Optional instance to populate. + * @return {module:model/EnumTest} The populated EnumTest instance. + */ + static constructFromObject(data, obj) { + if (data) { + obj = obj || new EnumTest(); + + if (data.hasOwnProperty('enum_string')) { + obj['enum_string'] = ApiClient.convertToType(data['enum_string'], 'String'); + } + if (data.hasOwnProperty('enum_string_required')) { + obj['enum_string_required'] = ApiClient.convertToType(data['enum_string_required'], 'String'); + } + if (data.hasOwnProperty('enum_integer')) { + obj['enum_integer'] = ApiClient.convertToType(data['enum_integer'], 'Number'); + } + if (data.hasOwnProperty('enum_number')) { + obj['enum_number'] = ApiClient.convertToType(data['enum_number'], 'Number'); + } + if (data.hasOwnProperty('outerEnum')) { + obj['outerEnum'] = OuterEnum.constructFromObject(data['outerEnum']); + } + if (data.hasOwnProperty('outerEnumInteger')) { + obj['outerEnumInteger'] = OuterEnumInteger.constructFromObject(data['outerEnumInteger']); + } + if (data.hasOwnProperty('outerEnumDefaultValue')) { + obj['outerEnumDefaultValue'] = OuterEnumDefaultValue.constructFromObject(data['outerEnumDefaultValue']); + } + if (data.hasOwnProperty('outerEnumIntegerDefaultValue')) { + obj['outerEnumIntegerDefaultValue'] = OuterEnumIntegerDefaultValue.constructFromObject(data['outerEnumIntegerDefaultValue']); + } + } + return obj; + } +} + + +/** + * Allowed values for the enum_string property. + * @enum {String} + * @readonly + */ +EnumTest['EnumStringEnum'] = { + + /** + * value: "UPPER" + * @const + */ + "UPPER": "UPPER", + + /** + * value: "lower" + * @const + */ + "lower": "lower", + + /** + * value: "" + * @const + */ + "empty": "" +}; + + +/** + * Allowed values for the enum_string_required property. + * @enum {String} + * @readonly + */ +EnumTest['EnumStringRequiredEnum'] = { + + /** + * value: "UPPER" + * @const + */ + "UPPER": "UPPER", + + /** + * value: "lower" + * @const + */ + "lower": "lower", + + /** + * value: "" + * @const + */ + "empty": "" +}; + + +/** + * Allowed values for the enum_integer property. + * @enum {Number} + * @readonly + */ +EnumTest['EnumIntegerEnum'] = { + + /** + * value: 1 + * @const + */ + "1": 1, + + /** + * value: -1 + * @const + */ + "-1": -1 +}; + + +/** + * Allowed values for the enum_number property. + * @enum {Number} + * @readonly + */ +EnumTest['EnumNumberEnum'] = { + + /** + * value: 1.1 + * @const + */ + "1.1": 1.1, + + /** + * value: -1.2 + * @const + */ + "-1.2": -1.2 +}; + + + +export default EnumTest; + diff --git a/samples/client/petstore/javascript-apollo/src/model/File.js b/samples/client/petstore/javascript-apollo/src/model/File.js new file mode 100644 index 000000000000..53a726aa9360 --- /dev/null +++ b/samples/client/petstore/javascript-apollo/src/model/File.js @@ -0,0 +1,70 @@ +/** + * OpenAPI Petstore + * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ + * + * The version of the OpenAPI document: 1.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + * + */ + +import ApiClient from '../ApiClient'; + +/** + * The File model module. + * @module model/File + * @version 1.0.0 + */ +class File { + /** + * @member {String} sourceURI + * @type {String} + */ + sourceURI; + + + + /** + * Constructs a new File. + * Must be named `File` for test. + * @alias module:model/File + */ + constructor() { + + File.initialize(this); + } + + /** + * Initializes the fields of this object. + * This method is used by the constructors of any subclasses, in order to implement multiple inheritance (mix-ins). + * Only for internal use. + */ + static initialize(obj) { + } + + /** + * Constructs a File from a plain JavaScript object, optionally creating a new instance. + * Copies all relevant properties from data to obj if supplied or a new instance if not. + * @param {Object} data The plain JavaScript object bearing properties of interest. + * @param {module:model/File} obj Optional instance to populate. + * @return {module:model/File} The populated File instance. + */ + static constructFromObject(data, obj) { + if (data) { + obj = obj || new File(); + + if (data.hasOwnProperty('sourceURI')) { + obj['sourceURI'] = ApiClient.convertToType(data['sourceURI'], 'String'); + } + } + return obj; + } +} + + + +export default File; + diff --git a/samples/client/petstore/javascript-apollo/src/model/FileSchemaTestClass.js b/samples/client/petstore/javascript-apollo/src/model/FileSchemaTestClass.js new file mode 100644 index 000000000000..b883cbd09d2b --- /dev/null +++ b/samples/client/petstore/javascript-apollo/src/model/FileSchemaTestClass.js @@ -0,0 +1,77 @@ +/** + * OpenAPI Petstore + * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ + * + * The version of the OpenAPI document: 1.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + * + */ + +import ApiClient from '../ApiClient'; + +/** + * The FileSchemaTestClass model module. + * @module model/FileSchemaTestClass + * @version 1.0.0 + */ +class FileSchemaTestClass { + /** + * @member {File} file + * @type {File} + */ + file; + /** + * @member {Array.} files + * @type {Array.} + */ + files; + + + + /** + * Constructs a new FileSchemaTestClass. + * @alias module:model/FileSchemaTestClass + */ + constructor() { + + FileSchemaTestClass.initialize(this); + } + + /** + * Initializes the fields of this object. + * This method is used by the constructors of any subclasses, in order to implement multiple inheritance (mix-ins). + * Only for internal use. + */ + static initialize(obj) { + } + + /** + * Constructs a FileSchemaTestClass from a plain JavaScript object, optionally creating a new instance. + * Copies all relevant properties from data to obj if supplied or a new instance if not. + * @param {Object} data The plain JavaScript object bearing properties of interest. + * @param {module:model/FileSchemaTestClass} obj Optional instance to populate. + * @return {module:model/FileSchemaTestClass} The populated FileSchemaTestClass instance. + */ + static constructFromObject(data, obj) { + if (data) { + obj = obj || new FileSchemaTestClass(); + + if (data.hasOwnProperty('file')) { + obj['file'] = File.constructFromObject(data['file']); + } + if (data.hasOwnProperty('files')) { + obj['files'] = ApiClient.convertToType(data['files'], [File]); + } + } + return obj; + } +} + + + +export default FileSchemaTestClass; + diff --git a/samples/client/petstore/javascript-apollo/src/model/Foo.js b/samples/client/petstore/javascript-apollo/src/model/Foo.js new file mode 100644 index 000000000000..2805ed021816 --- /dev/null +++ b/samples/client/petstore/javascript-apollo/src/model/Foo.js @@ -0,0 +1,70 @@ +/** + * OpenAPI Petstore + * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ + * + * The version of the OpenAPI document: 1.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + * + */ + +import ApiClient from '../ApiClient'; + +/** + * The Foo model module. + * @module model/Foo + * @version 1.0.0 + */ +class Foo { + /** + * @member {String} bar + * @type {String} + * @default 'bar' + */ + bar = 'bar'; + + + + /** + * Constructs a new Foo. + * @alias module:model/Foo + */ + constructor() { + + Foo.initialize(this); + } + + /** + * Initializes the fields of this object. + * This method is used by the constructors of any subclasses, in order to implement multiple inheritance (mix-ins). + * Only for internal use. + */ + static initialize(obj) { + } + + /** + * Constructs a Foo from a plain JavaScript object, optionally creating a new instance. + * Copies all relevant properties from data to obj if supplied or a new instance if not. + * @param {Object} data The plain JavaScript object bearing properties of interest. + * @param {module:model/Foo} obj Optional instance to populate. + * @return {module:model/Foo} The populated Foo instance. + */ + static constructFromObject(data, obj) { + if (data) { + obj = obj || new Foo(); + + if (data.hasOwnProperty('bar')) { + obj['bar'] = ApiClient.convertToType(data['bar'], 'String'); + } + } + return obj; + } +} + + + +export default Foo; + diff --git a/samples/client/petstore/javascript-apollo/src/model/FooGetDefaultResponse.js b/samples/client/petstore/javascript-apollo/src/model/FooGetDefaultResponse.js new file mode 100644 index 000000000000..71ac27052632 --- /dev/null +++ b/samples/client/petstore/javascript-apollo/src/model/FooGetDefaultResponse.js @@ -0,0 +1,70 @@ +/** + * OpenAPI Petstore + * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ + * + * The version of the OpenAPI document: 1.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + * + */ + +import ApiClient from '../ApiClient'; +import Foo from './Foo'; + +/** + * The FooGetDefaultResponse model module. + * @module model/FooGetDefaultResponse + * @version 1.0.0 + */ +class FooGetDefaultResponse { + /** + * @member {module:model/Foo} string + * @type {module:model/Foo} + */ + string; + + + + /** + * Constructs a new FooGetDefaultResponse. + * @alias module:model/FooGetDefaultResponse + */ + constructor() { + + FooGetDefaultResponse.initialize(this); + } + + /** + * Initializes the fields of this object. + * This method is used by the constructors of any subclasses, in order to implement multiple inheritance (mix-ins). + * Only for internal use. + */ + static initialize(obj) { + } + + /** + * Constructs a FooGetDefaultResponse from a plain JavaScript object, optionally creating a new instance. + * Copies all relevant properties from data to obj if supplied or a new instance if not. + * @param {Object} data The plain JavaScript object bearing properties of interest. + * @param {module:model/FooGetDefaultResponse} obj Optional instance to populate. + * @return {module:model/FooGetDefaultResponse} The populated FooGetDefaultResponse instance. + */ + static constructFromObject(data, obj) { + if (data) { + obj = obj || new FooGetDefaultResponse(); + + if (data.hasOwnProperty('string')) { + obj['string'] = Foo.constructFromObject(data['string']); + } + } + return obj; + } +} + + + +export default FooGetDefaultResponse; + diff --git a/samples/client/petstore/javascript-apollo/src/model/FormatTest.js b/samples/client/petstore/javascript-apollo/src/model/FormatTest.js new file mode 100644 index 000000000000..c6f6622dfe5e --- /dev/null +++ b/samples/client/petstore/javascript-apollo/src/model/FormatTest.js @@ -0,0 +1,197 @@ +/** + * OpenAPI Petstore + * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ + * + * The version of the OpenAPI document: 1.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + * + */ + +import ApiClient from '../ApiClient'; + +/** + * The FormatTest model module. + * @module model/FormatTest + * @version 1.0.0 + */ +class FormatTest { + /** + * @member {Number} integer + * @type {Number} + */ + integer; + /** + * @member {Number} int32 + * @type {Number} + */ + int32; + /** + * @member {Number} int64 + * @type {Number} + */ + int64; + /** + * @member {Number} number + * @type {Number} + */ + number; + /** + * @member {Number} float + * @type {Number} + */ + float; + /** + * @member {Number} double + * @type {Number} + */ + double; + /** + * @member {Number} decimal + * @type {Number} + */ + decimal; + /** + * @member {String} string + * @type {String} + */ + string; + /** + * @member {Blob} byte + * @type {Blob} + */ + byte; + /** + * @member {File} binary + * @type {File} + */ + binary; + /** + * @member {Date} date + * @type {Date} + */ + date; + /** + * @member {Date} dateTime + * @type {Date} + */ + dateTime; + /** + * @member {String} uuid + * @type {String} + */ + uuid; + /** + * @member {String} password + * @type {String} + */ + password; + /** + * @member {String} pattern_with_digits + * @type {String} + */ + pattern_with_digits; + /** + * @member {String} pattern_with_digits_and_delimiter + * @type {String} + */ + pattern_with_digits_and_delimiter; + + + + /** + * Constructs a new FormatTest. + * @alias module:model/FormatTest + * @param number {Number} + * @param _byte {Blob} + * @param date {Date} + * @param password {String} + */ + constructor(number, _byte, date, password) { + + FormatTest.initialize(this, number, _byte, date, password); + } + + /** + * Initializes the fields of this object. + * This method is used by the constructors of any subclasses, in order to implement multiple inheritance (mix-ins). + * Only for internal use. + */ + static initialize(obj, number, _byte, date, password) { + obj['number'] = number; + obj['byte'] = _byte; + obj['date'] = date; + obj['password'] = password; + } + + /** + * Constructs a FormatTest from a plain JavaScript object, optionally creating a new instance. + * Copies all relevant properties from data to obj if supplied or a new instance if not. + * @param {Object} data The plain JavaScript object bearing properties of interest. + * @param {module:model/FormatTest} obj Optional instance to populate. + * @return {module:model/FormatTest} The populated FormatTest instance. + */ + static constructFromObject(data, obj) { + if (data) { + obj = obj || new FormatTest(); + + if (data.hasOwnProperty('integer')) { + obj['integer'] = ApiClient.convertToType(data['integer'], 'Number'); + } + if (data.hasOwnProperty('int32')) { + obj['int32'] = ApiClient.convertToType(data['int32'], 'Number'); + } + if (data.hasOwnProperty('int64')) { + obj['int64'] = ApiClient.convertToType(data['int64'], 'Number'); + } + if (data.hasOwnProperty('number')) { + obj['number'] = ApiClient.convertToType(data['number'], 'Number'); + } + if (data.hasOwnProperty('float')) { + obj['float'] = ApiClient.convertToType(data['float'], 'Number'); + } + if (data.hasOwnProperty('double')) { + obj['double'] = ApiClient.convertToType(data['double'], 'Number'); + } + if (data.hasOwnProperty('decimal')) { + obj['decimal'] = ApiClient.convertToType(data['decimal'], 'Number'); + } + if (data.hasOwnProperty('string')) { + obj['string'] = ApiClient.convertToType(data['string'], 'String'); + } + if (data.hasOwnProperty('byte')) { + obj['byte'] = ApiClient.convertToType(data['byte'], 'Blob'); + } + if (data.hasOwnProperty('binary')) { + obj['binary'] = ApiClient.convertToType(data['binary'], File); + } + if (data.hasOwnProperty('date')) { + obj['date'] = ApiClient.convertToType(data['date'], 'Date'); + } + if (data.hasOwnProperty('dateTime')) { + obj['dateTime'] = ApiClient.convertToType(data['dateTime'], 'Date'); + } + if (data.hasOwnProperty('uuid')) { + obj['uuid'] = ApiClient.convertToType(data['uuid'], 'String'); + } + if (data.hasOwnProperty('password')) { + obj['password'] = ApiClient.convertToType(data['password'], 'String'); + } + if (data.hasOwnProperty('pattern_with_digits')) { + obj['pattern_with_digits'] = ApiClient.convertToType(data['pattern_with_digits'], 'String'); + } + if (data.hasOwnProperty('pattern_with_digits_and_delimiter')) { + obj['pattern_with_digits_and_delimiter'] = ApiClient.convertToType(data['pattern_with_digits_and_delimiter'], 'String'); + } + } + return obj; + } +} + + + +export default FormatTest; + diff --git a/samples/client/petstore/javascript-apollo/src/model/HasOnlyReadOnly.js b/samples/client/petstore/javascript-apollo/src/model/HasOnlyReadOnly.js new file mode 100644 index 000000000000..213fab56e260 --- /dev/null +++ b/samples/client/petstore/javascript-apollo/src/model/HasOnlyReadOnly.js @@ -0,0 +1,77 @@ +/** + * OpenAPI Petstore + * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ + * + * The version of the OpenAPI document: 1.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + * + */ + +import ApiClient from '../ApiClient'; + +/** + * The HasOnlyReadOnly model module. + * @module model/HasOnlyReadOnly + * @version 1.0.0 + */ +class HasOnlyReadOnly { + /** + * @member {String} bar + * @type {String} + */ + bar; + /** + * @member {String} foo + * @type {String} + */ + foo; + + + + /** + * Constructs a new HasOnlyReadOnly. + * @alias module:model/HasOnlyReadOnly + */ + constructor() { + + HasOnlyReadOnly.initialize(this); + } + + /** + * Initializes the fields of this object. + * This method is used by the constructors of any subclasses, in order to implement multiple inheritance (mix-ins). + * Only for internal use. + */ + static initialize(obj) { + } + + /** + * Constructs a HasOnlyReadOnly from a plain JavaScript object, optionally creating a new instance. + * Copies all relevant properties from data to obj if supplied or a new instance if not. + * @param {Object} data The plain JavaScript object bearing properties of interest. + * @param {module:model/HasOnlyReadOnly} obj Optional instance to populate. + * @return {module:model/HasOnlyReadOnly} The populated HasOnlyReadOnly instance. + */ + static constructFromObject(data, obj) { + if (data) { + obj = obj || new HasOnlyReadOnly(); + + if (data.hasOwnProperty('bar')) { + obj['bar'] = ApiClient.convertToType(data['bar'], 'String'); + } + if (data.hasOwnProperty('foo')) { + obj['foo'] = ApiClient.convertToType(data['foo'], 'String'); + } + } + return obj; + } +} + + + +export default HasOnlyReadOnly; + diff --git a/samples/client/petstore/javascript-apollo/src/model/HealthCheckResult.js b/samples/client/petstore/javascript-apollo/src/model/HealthCheckResult.js new file mode 100644 index 000000000000..347404266656 --- /dev/null +++ b/samples/client/petstore/javascript-apollo/src/model/HealthCheckResult.js @@ -0,0 +1,70 @@ +/** + * OpenAPI Petstore + * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ + * + * The version of the OpenAPI document: 1.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + * + */ + +import ApiClient from '../ApiClient'; + +/** + * The HealthCheckResult model module. + * @module model/HealthCheckResult + * @version 1.0.0 + */ +class HealthCheckResult { + /** + * @member {String} NullableMessage + * @type {String} + */ + NullableMessage; + + + + /** + * Constructs a new HealthCheckResult. + * Just a string to inform instance is up and running. Make it nullable in hope to get it as pointer in generated model. + * @alias module:model/HealthCheckResult + */ + constructor() { + + HealthCheckResult.initialize(this); + } + + /** + * Initializes the fields of this object. + * This method is used by the constructors of any subclasses, in order to implement multiple inheritance (mix-ins). + * Only for internal use. + */ + static initialize(obj) { + } + + /** + * Constructs a HealthCheckResult from a plain JavaScript object, optionally creating a new instance. + * Copies all relevant properties from data to obj if supplied or a new instance if not. + * @param {Object} data The plain JavaScript object bearing properties of interest. + * @param {module:model/HealthCheckResult} obj Optional instance to populate. + * @return {module:model/HealthCheckResult} The populated HealthCheckResult instance. + */ + static constructFromObject(data, obj) { + if (data) { + obj = obj || new HealthCheckResult(); + + if (data.hasOwnProperty('NullableMessage')) { + obj['NullableMessage'] = ApiClient.convertToType(data['NullableMessage'], 'String'); + } + } + return obj; + } +} + + + +export default HealthCheckResult; + diff --git a/samples/client/petstore/javascript-apollo/src/model/List.js b/samples/client/petstore/javascript-apollo/src/model/List.js new file mode 100644 index 000000000000..cc2ab05c62fe --- /dev/null +++ b/samples/client/petstore/javascript-apollo/src/model/List.js @@ -0,0 +1,69 @@ +/** + * OpenAPI Petstore + * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ + * + * The version of the OpenAPI document: 1.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + * + */ + +import ApiClient from '../ApiClient'; + +/** + * The List model module. + * @module model/List + * @version 1.0.0 + */ +class List { + /** + * @member {String} 123-list + * @type {String} + */ + 123-list; + + + + /** + * Constructs a new List. + * @alias module:model/List + */ + constructor() { + + List.initialize(this); + } + + /** + * Initializes the fields of this object. + * This method is used by the constructors of any subclasses, in order to implement multiple inheritance (mix-ins). + * Only for internal use. + */ + static initialize(obj) { + } + + /** + * Constructs a List from a plain JavaScript object, optionally creating a new instance. + * Copies all relevant properties from data to obj if supplied or a new instance if not. + * @param {Object} data The plain JavaScript object bearing properties of interest. + * @param {module:model/List} obj Optional instance to populate. + * @return {module:model/List} The populated List instance. + */ + static constructFromObject(data, obj) { + if (data) { + obj = obj || new List(); + + if (data.hasOwnProperty('123-list')) { + obj['123-list'] = ApiClient.convertToType(data['123-list'], 'String'); + } + } + return obj; + } +} + + + +export default List; + diff --git a/samples/client/petstore/javascript-apollo/src/model/MapTest.js b/samples/client/petstore/javascript-apollo/src/model/MapTest.js new file mode 100644 index 000000000000..d693293a8052 --- /dev/null +++ b/samples/client/petstore/javascript-apollo/src/model/MapTest.js @@ -0,0 +1,114 @@ +/** + * OpenAPI Petstore + * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ + * + * The version of the OpenAPI document: 1.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + * + */ + +import ApiClient from '../ApiClient'; + +/** + * The MapTest model module. + * @module model/MapTest + * @version 1.0.0 + */ +class MapTest { + /** + * @member {Object.>} map_map_of_string + * @type {Object.>} + */ + map_map_of_string; + /** + * @member {Object.} map_of_enum_string + * @type {Object.} + */ + map_of_enum_string; + /** + * @member {Object.} direct_map + * @type {Object.} + */ + direct_map; + /** + * @member {Object.} indirect_map + * @type {Object.} + */ + indirect_map; + + + + /** + * Constructs a new MapTest. + * @alias module:model/MapTest + */ + constructor() { + + MapTest.initialize(this); + } + + /** + * Initializes the fields of this object. + * This method is used by the constructors of any subclasses, in order to implement multiple inheritance (mix-ins). + * Only for internal use. + */ + static initialize(obj) { + } + + /** + * Constructs a MapTest from a plain JavaScript object, optionally creating a new instance. + * Copies all relevant properties from data to obj if supplied or a new instance if not. + * @param {Object} data The plain JavaScript object bearing properties of interest. + * @param {module:model/MapTest} obj Optional instance to populate. + * @return {module:model/MapTest} The populated MapTest instance. + */ + static constructFromObject(data, obj) { + if (data) { + obj = obj || new MapTest(); + + if (data.hasOwnProperty('map_map_of_string')) { + obj['map_map_of_string'] = ApiClient.convertToType(data['map_map_of_string'], {'String': {'String': 'String'}}); + } + if (data.hasOwnProperty('map_of_enum_string')) { + obj['map_of_enum_string'] = ApiClient.convertToType(data['map_of_enum_string'], {'String': 'String'}); + } + if (data.hasOwnProperty('direct_map')) { + obj['direct_map'] = ApiClient.convertToType(data['direct_map'], {'String': 'Boolean'}); + } + if (data.hasOwnProperty('indirect_map')) { + obj['indirect_map'] = ApiClient.convertToType(data['indirect_map'], {'String': 'Boolean'}); + } + } + return obj; + } +} + + +/** + * Allowed values for the inner property. + * @enum {String} + * @readonly + */ +MapTest['InnerEnum'] = { + + /** + * value: "UPPER" + * @const + */ + "UPPER": "UPPER", + + /** + * value: "lower" + * @const + */ + "lower": "lower" +}; + + + +export default MapTest; + diff --git a/samples/client/petstore/javascript-apollo/src/model/MixedPropertiesAndAdditionalPropertiesClass.js b/samples/client/petstore/javascript-apollo/src/model/MixedPropertiesAndAdditionalPropertiesClass.js new file mode 100644 index 000000000000..44745a989fb5 --- /dev/null +++ b/samples/client/petstore/javascript-apollo/src/model/MixedPropertiesAndAdditionalPropertiesClass.js @@ -0,0 +1,86 @@ +/** + * OpenAPI Petstore + * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ + * + * The version of the OpenAPI document: 1.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + * + */ + +import ApiClient from '../ApiClient'; +import Animal from './Animal'; + +/** + * The MixedPropertiesAndAdditionalPropertiesClass model module. + * @module model/MixedPropertiesAndAdditionalPropertiesClass + * @version 1.0.0 + */ +class MixedPropertiesAndAdditionalPropertiesClass { + /** + * @member {String} uuid + * @type {String} + */ + uuid; + /** + * @member {Date} dateTime + * @type {Date} + */ + dateTime; + /** + * @member {Object.} map + * @type {Object.} + */ + map; + + + + /** + * Constructs a new MixedPropertiesAndAdditionalPropertiesClass. + * @alias module:model/MixedPropertiesAndAdditionalPropertiesClass + */ + constructor() { + + MixedPropertiesAndAdditionalPropertiesClass.initialize(this); + } + + /** + * Initializes the fields of this object. + * This method is used by the constructors of any subclasses, in order to implement multiple inheritance (mix-ins). + * Only for internal use. + */ + static initialize(obj) { + } + + /** + * Constructs a MixedPropertiesAndAdditionalPropertiesClass from a plain JavaScript object, optionally creating a new instance. + * Copies all relevant properties from data to obj if supplied or a new instance if not. + * @param {Object} data The plain JavaScript object bearing properties of interest. + * @param {module:model/MixedPropertiesAndAdditionalPropertiesClass} obj Optional instance to populate. + * @return {module:model/MixedPropertiesAndAdditionalPropertiesClass} The populated MixedPropertiesAndAdditionalPropertiesClass instance. + */ + static constructFromObject(data, obj) { + if (data) { + obj = obj || new MixedPropertiesAndAdditionalPropertiesClass(); + + if (data.hasOwnProperty('uuid')) { + obj['uuid'] = ApiClient.convertToType(data['uuid'], 'String'); + } + if (data.hasOwnProperty('dateTime')) { + obj['dateTime'] = ApiClient.convertToType(data['dateTime'], 'Date'); + } + if (data.hasOwnProperty('map')) { + obj['map'] = ApiClient.convertToType(data['map'], {'String': Animal}); + } + } + return obj; + } +} + + + +export default MixedPropertiesAndAdditionalPropertiesClass; + diff --git a/samples/client/petstore/javascript-apollo/src/model/Model200Response.js b/samples/client/petstore/javascript-apollo/src/model/Model200Response.js new file mode 100644 index 000000000000..09b5074cb7a8 --- /dev/null +++ b/samples/client/petstore/javascript-apollo/src/model/Model200Response.js @@ -0,0 +1,78 @@ +/** + * OpenAPI Petstore + * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ + * + * The version of the OpenAPI document: 1.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + * + */ + +import ApiClient from '../ApiClient'; + +/** + * The Model200Response model module. + * @module model/Model200Response + * @version 1.0.0 + */ +class Model200Response { + /** + * @member {Number} name + * @type {Number} + */ + name; + /** + * @member {String} class + * @type {String} + */ + class; + + + + /** + * Constructs a new Model200Response. + * Model for testing model name starting with number + * @alias module:model/Model200Response + */ + constructor() { + + Model200Response.initialize(this); + } + + /** + * Initializes the fields of this object. + * This method is used by the constructors of any subclasses, in order to implement multiple inheritance (mix-ins). + * Only for internal use. + */ + static initialize(obj) { + } + + /** + * Constructs a Model200Response from a plain JavaScript object, optionally creating a new instance. + * Copies all relevant properties from data to obj if supplied or a new instance if not. + * @param {Object} data The plain JavaScript object bearing properties of interest. + * @param {module:model/Model200Response} obj Optional instance to populate. + * @return {module:model/Model200Response} The populated Model200Response instance. + */ + static constructFromObject(data, obj) { + if (data) { + obj = obj || new Model200Response(); + + if (data.hasOwnProperty('name')) { + obj['name'] = ApiClient.convertToType(data['name'], 'Number'); + } + if (data.hasOwnProperty('class')) { + obj['class'] = ApiClient.convertToType(data['class'], 'String'); + } + } + return obj; + } +} + + + +export default Model200Response; + diff --git a/samples/client/petstore/javascript-apollo/src/model/Name.js b/samples/client/petstore/javascript-apollo/src/model/Name.js new file mode 100644 index 000000000000..a8652d87cf4f --- /dev/null +++ b/samples/client/petstore/javascript-apollo/src/model/Name.js @@ -0,0 +1,96 @@ +/** + * OpenAPI Petstore + * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ + * + * The version of the OpenAPI document: 1.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + * + */ + +import ApiClient from '../ApiClient'; + +/** + * The Name model module. + * @module model/Name + * @version 1.0.0 + */ +class Name { + /** + * @member {Number} name + * @type {Number} + */ + name; + /** + * @member {Number} snake_case + * @type {Number} + */ + snake_case; + /** + * @member {String} property + * @type {String} + */ + property; + /** + * @member {Number} 123Number + * @type {Number} + */ + 123Number; + + + + /** + * Constructs a new Name. + * Model for testing model name same as property name + * @alias module:model/Name + * @param name {Number} + */ + constructor(name) { + + Name.initialize(this, name); + } + + /** + * Initializes the fields of this object. + * This method is used by the constructors of any subclasses, in order to implement multiple inheritance (mix-ins). + * Only for internal use. + */ + static initialize(obj, name) { + obj['name'] = name; + } + + /** + * Constructs a Name from a plain JavaScript object, optionally creating a new instance. + * Copies all relevant properties from data to obj if supplied or a new instance if not. + * @param {Object} data The plain JavaScript object bearing properties of interest. + * @param {module:model/Name} obj Optional instance to populate. + * @return {module:model/Name} The populated Name instance. + */ + static constructFromObject(data, obj) { + if (data) { + obj = obj || new Name(); + + if (data.hasOwnProperty('name')) { + obj['name'] = ApiClient.convertToType(data['name'], 'Number'); + } + if (data.hasOwnProperty('snake_case')) { + obj['snake_case'] = ApiClient.convertToType(data['snake_case'], 'Number'); + } + if (data.hasOwnProperty('property')) { + obj['property'] = ApiClient.convertToType(data['property'], 'String'); + } + if (data.hasOwnProperty('123Number')) { + obj['123Number'] = ApiClient.convertToType(data['123Number'], 'Number'); + } + } + return obj; + } +} + + + +export default Name; + diff --git a/samples/client/petstore/javascript-apollo/src/model/NullableClass.js b/samples/client/petstore/javascript-apollo/src/model/NullableClass.js new file mode 100644 index 000000000000..3280b0f79782 --- /dev/null +++ b/samples/client/petstore/javascript-apollo/src/model/NullableClass.js @@ -0,0 +1,161 @@ +/** + * OpenAPI Petstore + * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ + * + * The version of the OpenAPI document: 1.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + * + */ + +import ApiClient from '../ApiClient'; + +/** + * The NullableClass model module. + * @module model/NullableClass + * @version 1.0.0 + */ +class NullableClass { + /** + * @member {Number} integer_prop + * @type {Number} + */ + integer_prop; + /** + * @member {Number} number_prop + * @type {Number} + */ + number_prop; + /** + * @member {Boolean} boolean_prop + * @type {Boolean} + */ + boolean_prop; + /** + * @member {String} string_prop + * @type {String} + */ + string_prop; + /** + * @member {Date} date_prop + * @type {Date} + */ + date_prop; + /** + * @member {Date} datetime_prop + * @type {Date} + */ + datetime_prop; + /** + * @member {Array.} array_nullable_prop + * @type {Array.} + */ + array_nullable_prop; + /** + * @member {Array.} array_and_items_nullable_prop + * @type {Array.} + */ + array_and_items_nullable_prop; + /** + * @member {Array.} array_items_nullable + * @type {Array.} + */ + array_items_nullable; + /** + * @member {Object.} object_nullable_prop + * @type {Object.} + */ + object_nullable_prop; + /** + * @member {Object.} object_and_items_nullable_prop + * @type {Object.} + */ + object_and_items_nullable_prop; + /** + * @member {Object.} object_items_nullable + * @type {Object.} + */ + object_items_nullable; + + + + /** + * Constructs a new NullableClass. + * @alias module:model/NullableClass + * @extends Object + */ + constructor() { + + NullableClass.initialize(this); + } + + /** + * Initializes the fields of this object. + * This method is used by the constructors of any subclasses, in order to implement multiple inheritance (mix-ins). + * Only for internal use. + */ + static initialize(obj) { + } + + /** + * Constructs a NullableClass from a plain JavaScript object, optionally creating a new instance. + * Copies all relevant properties from data to obj if supplied or a new instance if not. + * @param {Object} data The plain JavaScript object bearing properties of interest. + * @param {module:model/NullableClass} obj Optional instance to populate. + * @return {module:model/NullableClass} The populated NullableClass instance. + */ + static constructFromObject(data, obj) { + if (data) { + obj = obj || new NullableClass(); + + ApiClient.constructFromObject(data, obj, 'Object'); + + + if (data.hasOwnProperty('integer_prop')) { + obj['integer_prop'] = ApiClient.convertToType(data['integer_prop'], 'Number'); + } + if (data.hasOwnProperty('number_prop')) { + obj['number_prop'] = ApiClient.convertToType(data['number_prop'], 'Number'); + } + if (data.hasOwnProperty('boolean_prop')) { + obj['boolean_prop'] = ApiClient.convertToType(data['boolean_prop'], 'Boolean'); + } + if (data.hasOwnProperty('string_prop')) { + obj['string_prop'] = ApiClient.convertToType(data['string_prop'], 'String'); + } + if (data.hasOwnProperty('date_prop')) { + obj['date_prop'] = ApiClient.convertToType(data['date_prop'], 'Date'); + } + if (data.hasOwnProperty('datetime_prop')) { + obj['datetime_prop'] = ApiClient.convertToType(data['datetime_prop'], 'Date'); + } + if (data.hasOwnProperty('array_nullable_prop')) { + obj['array_nullable_prop'] = ApiClient.convertToType(data['array_nullable_prop'], [Object]); + } + if (data.hasOwnProperty('array_and_items_nullable_prop')) { + obj['array_and_items_nullable_prop'] = ApiClient.convertToType(data['array_and_items_nullable_prop'], [Object]); + } + if (data.hasOwnProperty('array_items_nullable')) { + obj['array_items_nullable'] = ApiClient.convertToType(data['array_items_nullable'], [Object]); + } + if (data.hasOwnProperty('object_nullable_prop')) { + obj['object_nullable_prop'] = ApiClient.convertToType(data['object_nullable_prop'], {'String': Object}); + } + if (data.hasOwnProperty('object_and_items_nullable_prop')) { + obj['object_and_items_nullable_prop'] = ApiClient.convertToType(data['object_and_items_nullable_prop'], {'String': Object}); + } + if (data.hasOwnProperty('object_items_nullable')) { + obj['object_items_nullable'] = ApiClient.convertToType(data['object_items_nullable'], {'String': Object}); + } + } + return obj; + } +} + + + +export default NullableClass; + diff --git a/samples/client/petstore/javascript-apollo/src/model/NumberOnly.js b/samples/client/petstore/javascript-apollo/src/model/NumberOnly.js new file mode 100644 index 000000000000..a0f97c404a02 --- /dev/null +++ b/samples/client/petstore/javascript-apollo/src/model/NumberOnly.js @@ -0,0 +1,69 @@ +/** + * OpenAPI Petstore + * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ + * + * The version of the OpenAPI document: 1.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + * + */ + +import ApiClient from '../ApiClient'; + +/** + * The NumberOnly model module. + * @module model/NumberOnly + * @version 1.0.0 + */ +class NumberOnly { + /** + * @member {Number} JustNumber + * @type {Number} + */ + JustNumber; + + + + /** + * Constructs a new NumberOnly. + * @alias module:model/NumberOnly + */ + constructor() { + + NumberOnly.initialize(this); + } + + /** + * Initializes the fields of this object. + * This method is used by the constructors of any subclasses, in order to implement multiple inheritance (mix-ins). + * Only for internal use. + */ + static initialize(obj) { + } + + /** + * Constructs a NumberOnly from a plain JavaScript object, optionally creating a new instance. + * Copies all relevant properties from data to obj if supplied or a new instance if not. + * @param {Object} data The plain JavaScript object bearing properties of interest. + * @param {module:model/NumberOnly} obj Optional instance to populate. + * @return {module:model/NumberOnly} The populated NumberOnly instance. + */ + static constructFromObject(data, obj) { + if (data) { + obj = obj || new NumberOnly(); + + if (data.hasOwnProperty('JustNumber')) { + obj['JustNumber'] = ApiClient.convertToType(data['JustNumber'], 'Number'); + } + } + return obj; + } +} + + + +export default NumberOnly; + diff --git a/samples/client/petstore/javascript-apollo/src/model/ObjectWithDeprecatedFields.js b/samples/client/petstore/javascript-apollo/src/model/ObjectWithDeprecatedFields.js new file mode 100644 index 000000000000..492ab8b1cced --- /dev/null +++ b/samples/client/petstore/javascript-apollo/src/model/ObjectWithDeprecatedFields.js @@ -0,0 +1,94 @@ +/** + * OpenAPI Petstore + * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ + * + * The version of the OpenAPI document: 1.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + * + */ + +import ApiClient from '../ApiClient'; +import DeprecatedObject from './DeprecatedObject'; + +/** + * The ObjectWithDeprecatedFields model module. + * @module model/ObjectWithDeprecatedFields + * @version 1.0.0 + */ +class ObjectWithDeprecatedFields { + /** + * @member {String} uuid + * @type {String} + */ + uuid; + /** + * @member {Number} id + * @type {Number} + */ + id; + /** + * @member {module:model/DeprecatedObject} deprecatedRef + * @type {module:model/DeprecatedObject} + */ + deprecatedRef; + /** + * @member {Array.} bars + * @type {Array.} + */ + bars; + + + + /** + * Constructs a new ObjectWithDeprecatedFields. + * @alias module:model/ObjectWithDeprecatedFields + */ + constructor() { + + ObjectWithDeprecatedFields.initialize(this); + } + + /** + * Initializes the fields of this object. + * This method is used by the constructors of any subclasses, in order to implement multiple inheritance (mix-ins). + * Only for internal use. + */ + static initialize(obj) { + } + + /** + * Constructs a ObjectWithDeprecatedFields from a plain JavaScript object, optionally creating a new instance. + * Copies all relevant properties from data to obj if supplied or a new instance if not. + * @param {Object} data The plain JavaScript object bearing properties of interest. + * @param {module:model/ObjectWithDeprecatedFields} obj Optional instance to populate. + * @return {module:model/ObjectWithDeprecatedFields} The populated ObjectWithDeprecatedFields instance. + */ + static constructFromObject(data, obj) { + if (data) { + obj = obj || new ObjectWithDeprecatedFields(); + + if (data.hasOwnProperty('uuid')) { + obj['uuid'] = ApiClient.convertToType(data['uuid'], 'String'); + } + if (data.hasOwnProperty('id')) { + obj['id'] = ApiClient.convertToType(data['id'], 'Number'); + } + if (data.hasOwnProperty('deprecatedRef')) { + obj['deprecatedRef'] = DeprecatedObject.constructFromObject(data['deprecatedRef']); + } + if (data.hasOwnProperty('bars')) { + obj['bars'] = ApiClient.convertToType(data['bars'], ['String']); + } + } + return obj; + } +} + + + +export default ObjectWithDeprecatedFields; + diff --git a/samples/client/petstore/javascript-apollo/src/model/Order.js b/samples/client/petstore/javascript-apollo/src/model/Order.js index 98d7ec7abea4..c1656f9e642a 100644 --- a/samples/client/petstore/javascript-apollo/src/model/Order.js +++ b/samples/client/petstore/javascript-apollo/src/model/Order.js @@ -1,6 +1,6 @@ /** * OpenAPI Petstore - * This is a sample server Petstore server. For this sample, you can use the api key `special-key` to test the authorization filters. + * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ * * The version of the OpenAPI document: 1.0.0 * @@ -40,8 +40,8 @@ class Order { */ shipDate; /** - * @member {Order.StatusEnum} status - * @type {Order.StatusEnum} + * @member {module:model/Order.StatusEnum} status + * @type {module:model/Order.StatusEnum} */ status; /** @@ -55,7 +55,6 @@ class Order { /** * Constructs a new Order. - * An order for a pets from the pet store * @alias module:model/Order */ constructor() { diff --git a/samples/client/petstore/javascript-apollo/src/model/OuterComposite.js b/samples/client/petstore/javascript-apollo/src/model/OuterComposite.js new file mode 100644 index 000000000000..f3cfe74ff484 --- /dev/null +++ b/samples/client/petstore/javascript-apollo/src/model/OuterComposite.js @@ -0,0 +1,85 @@ +/** + * OpenAPI Petstore + * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ + * + * The version of the OpenAPI document: 1.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + * + */ + +import ApiClient from '../ApiClient'; + +/** + * The OuterComposite model module. + * @module model/OuterComposite + * @version 1.0.0 + */ +class OuterComposite { + /** + * @member {Number} my_number + * @type {Number} + */ + my_number; + /** + * @member {String} my_string + * @type {String} + */ + my_string; + /** + * @member {Boolean} my_boolean + * @type {Boolean} + */ + my_boolean; + + + + /** + * Constructs a new OuterComposite. + * @alias module:model/OuterComposite + */ + constructor() { + + OuterComposite.initialize(this); + } + + /** + * Initializes the fields of this object. + * This method is used by the constructors of any subclasses, in order to implement multiple inheritance (mix-ins). + * Only for internal use. + */ + static initialize(obj) { + } + + /** + * Constructs a OuterComposite from a plain JavaScript object, optionally creating a new instance. + * Copies all relevant properties from data to obj if supplied or a new instance if not. + * @param {Object} data The plain JavaScript object bearing properties of interest. + * @param {module:model/OuterComposite} obj Optional instance to populate. + * @return {module:model/OuterComposite} The populated OuterComposite instance. + */ + static constructFromObject(data, obj) { + if (data) { + obj = obj || new OuterComposite(); + + if (data.hasOwnProperty('my_number')) { + obj['my_number'] = ApiClient.convertToType(data['my_number'], 'Number'); + } + if (data.hasOwnProperty('my_string')) { + obj['my_string'] = ApiClient.convertToType(data['my_string'], 'String'); + } + if (data.hasOwnProperty('my_boolean')) { + obj['my_boolean'] = ApiClient.convertToType(data['my_boolean'], 'Boolean'); + } + } + return obj; + } +} + + + +export default OuterComposite; + diff --git a/samples/client/petstore/javascript-apollo/src/model/OuterEnum.js b/samples/client/petstore/javascript-apollo/src/model/OuterEnum.js new file mode 100644 index 000000000000..12fdff98026b --- /dev/null +++ b/samples/client/petstore/javascript-apollo/src/model/OuterEnum.js @@ -0,0 +1,53 @@ +/** + * OpenAPI Petstore + * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ + * + * The version of the OpenAPI document: 1.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + * + */ + +import ApiClient from '../ApiClient'; +/** +* Enum class OuterEnum. +* @enum {} +* @readonly +*/ +export default class OuterEnum { + + /** + * value: "placed" + * @const + */ + "placed" = "placed"; + + + /** + * value: "approved" + * @const + */ + "approved" = "approved"; + + + /** + * value: "delivered" + * @const + */ + "delivered" = "delivered"; + + + + /** + * Returns a OuterEnum enum value from a Javascript object name. + * @param {Object} data The plain JavaScript object containing the name of the enum value. + * @return {module:model/OuterEnum} The enum OuterEnum value. + */ + static constructFromObject(object) { + return object; + } +} + diff --git a/samples/client/petstore/javascript-apollo/src/model/OuterEnumDefaultValue.js b/samples/client/petstore/javascript-apollo/src/model/OuterEnumDefaultValue.js new file mode 100644 index 000000000000..a65b1dd0a6be --- /dev/null +++ b/samples/client/petstore/javascript-apollo/src/model/OuterEnumDefaultValue.js @@ -0,0 +1,53 @@ +/** + * OpenAPI Petstore + * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ + * + * The version of the OpenAPI document: 1.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + * + */ + +import ApiClient from '../ApiClient'; +/** +* Enum class OuterEnumDefaultValue. +* @enum {} +* @readonly +*/ +export default class OuterEnumDefaultValue { + + /** + * value: "placed" + * @const + */ + "placed" = "placed"; + + + /** + * value: "approved" + * @const + */ + "approved" = "approved"; + + + /** + * value: "delivered" + * @const + */ + "delivered" = "delivered"; + + + + /** + * Returns a OuterEnumDefaultValue enum value from a Javascript object name. + * @param {Object} data The plain JavaScript object containing the name of the enum value. + * @return {module:model/OuterEnumDefaultValue} The enum OuterEnumDefaultValue value. + */ + static constructFromObject(object) { + return object; + } +} + diff --git a/samples/client/petstore/javascript-apollo/src/model/OuterEnumInteger.js b/samples/client/petstore/javascript-apollo/src/model/OuterEnumInteger.js new file mode 100644 index 000000000000..b6fc29568a02 --- /dev/null +++ b/samples/client/petstore/javascript-apollo/src/model/OuterEnumInteger.js @@ -0,0 +1,53 @@ +/** + * OpenAPI Petstore + * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ + * + * The version of the OpenAPI document: 1.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + * + */ + +import ApiClient from '../ApiClient'; +/** +* Enum class OuterEnumInteger. +* @enum {} +* @readonly +*/ +export default class OuterEnumInteger { + + /** + * value: 0 + * @const + */ + "0" = 0; + + + /** + * value: 1 + * @const + */ + "1" = 1; + + + /** + * value: 2 + * @const + */ + "2" = 2; + + + + /** + * Returns a OuterEnumInteger enum value from a Javascript object name. + * @param {Object} data The plain JavaScript object containing the name of the enum value. + * @return {module:model/OuterEnumInteger} The enum OuterEnumInteger value. + */ + static constructFromObject(object) { + return object; + } +} + diff --git a/samples/client/petstore/javascript-apollo/src/model/OuterEnumIntegerDefaultValue.js b/samples/client/petstore/javascript-apollo/src/model/OuterEnumIntegerDefaultValue.js new file mode 100644 index 000000000000..86a9d6b9467e --- /dev/null +++ b/samples/client/petstore/javascript-apollo/src/model/OuterEnumIntegerDefaultValue.js @@ -0,0 +1,53 @@ +/** + * OpenAPI Petstore + * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ + * + * The version of the OpenAPI document: 1.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + * + */ + +import ApiClient from '../ApiClient'; +/** +* Enum class OuterEnumIntegerDefaultValue. +* @enum {} +* @readonly +*/ +export default class OuterEnumIntegerDefaultValue { + + /** + * value: 0 + * @const + */ + "0" = 0; + + + /** + * value: 1 + * @const + */ + "1" = 1; + + + /** + * value: 2 + * @const + */ + "2" = 2; + + + + /** + * Returns a OuterEnumIntegerDefaultValue enum value from a Javascript object name. + * @param {Object} data The plain JavaScript object containing the name of the enum value. + * @return {module:model/OuterEnumIntegerDefaultValue} The enum OuterEnumIntegerDefaultValue value. + */ + static constructFromObject(object) { + return object; + } +} + diff --git a/samples/client/petstore/javascript-apollo/src/model/OuterObjectWithEnumProperty.js b/samples/client/petstore/javascript-apollo/src/model/OuterObjectWithEnumProperty.js new file mode 100644 index 000000000000..df9dc45a4d9e --- /dev/null +++ b/samples/client/petstore/javascript-apollo/src/model/OuterObjectWithEnumProperty.js @@ -0,0 +1,72 @@ +/** + * OpenAPI Petstore + * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ + * + * The version of the OpenAPI document: 1.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + * + */ + +import ApiClient from '../ApiClient'; +import OuterEnumInteger from './OuterEnumInteger'; + +/** + * The OuterObjectWithEnumProperty model module. + * @module model/OuterObjectWithEnumProperty + * @version 1.0.0 + */ +class OuterObjectWithEnumProperty { + /** + * @member {module:model/OuterEnumInteger} value + * @type {module:model/OuterEnumInteger} + */ + value; + + + + /** + * Constructs a new OuterObjectWithEnumProperty. + * @alias module:model/OuterObjectWithEnumProperty + * @param value {module:model/OuterEnumInteger} + */ + constructor(value) { + + OuterObjectWithEnumProperty.initialize(this, value); + } + + /** + * Initializes the fields of this object. + * This method is used by the constructors of any subclasses, in order to implement multiple inheritance (mix-ins). + * Only for internal use. + */ + static initialize(obj, value) { + obj['value'] = value; + } + + /** + * Constructs a OuterObjectWithEnumProperty from a plain JavaScript object, optionally creating a new instance. + * Copies all relevant properties from data to obj if supplied or a new instance if not. + * @param {Object} data The plain JavaScript object bearing properties of interest. + * @param {module:model/OuterObjectWithEnumProperty} obj Optional instance to populate. + * @return {module:model/OuterObjectWithEnumProperty} The populated OuterObjectWithEnumProperty instance. + */ + static constructFromObject(data, obj) { + if (data) { + obj = obj || new OuterObjectWithEnumProperty(); + + if (data.hasOwnProperty('value')) { + obj['value'] = OuterEnumInteger.constructFromObject(data['value']); + } + } + return obj; + } +} + + + +export default OuterObjectWithEnumProperty; + diff --git a/samples/client/petstore/javascript-apollo/src/model/Pet.js b/samples/client/petstore/javascript-apollo/src/model/Pet.js index 3bf2f9eef938..89395753fc3d 100644 --- a/samples/client/petstore/javascript-apollo/src/model/Pet.js +++ b/samples/client/petstore/javascript-apollo/src/model/Pet.js @@ -1,6 +1,6 @@ /** * OpenAPI Petstore - * This is a sample server Petstore server. For this sample, you can use the api key `special-key` to test the authorization filters. + * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ * * The version of the OpenAPI document: 1.0.0 * @@ -27,8 +27,8 @@ class Pet { */ id; /** - * @member {Category} category - * @type {Category} + * @member {module:model/Category} category + * @type {module:model/Category} */ category; /** @@ -37,26 +37,18 @@ class Pet { */ name; /** - * @member {Array.} photoUrls - * @type {Array.} + * @member {Array.} photoUrls + * @type {Array.} */ photoUrls; /** - * @member {Array.} tags - * @type {Array.} + * @member {Array.} tags + * @type {Array.} */ tags; /** - * @member {Pet.StatusEnum} status - * @type {Pet.StatusEnum} + * @member {module:model/Pet.StatusEnum} status + * @type {module:model/Pet.StatusEnum} */ status; @@ -64,12 +56,9 @@ class Pet { /** * Constructs a new Pet. - * A pet for sale in the pet store * @alias module:model/Pet * @param name {String} - * @param photoUrls {Array.} + * @param photoUrls {Array.} */ constructor(name, photoUrls) { diff --git a/samples/client/petstore/javascript-apollo/src/model/ReadOnlyFirst.js b/samples/client/petstore/javascript-apollo/src/model/ReadOnlyFirst.js new file mode 100644 index 000000000000..f23041eeb3b0 --- /dev/null +++ b/samples/client/petstore/javascript-apollo/src/model/ReadOnlyFirst.js @@ -0,0 +1,77 @@ +/** + * OpenAPI Petstore + * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ + * + * The version of the OpenAPI document: 1.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + * + */ + +import ApiClient from '../ApiClient'; + +/** + * The ReadOnlyFirst model module. + * @module model/ReadOnlyFirst + * @version 1.0.0 + */ +class ReadOnlyFirst { + /** + * @member {String} bar + * @type {String} + */ + bar; + /** + * @member {String} baz + * @type {String} + */ + baz; + + + + /** + * Constructs a new ReadOnlyFirst. + * @alias module:model/ReadOnlyFirst + */ + constructor() { + + ReadOnlyFirst.initialize(this); + } + + /** + * Initializes the fields of this object. + * This method is used by the constructors of any subclasses, in order to implement multiple inheritance (mix-ins). + * Only for internal use. + */ + static initialize(obj) { + } + + /** + * Constructs a ReadOnlyFirst from a plain JavaScript object, optionally creating a new instance. + * Copies all relevant properties from data to obj if supplied or a new instance if not. + * @param {Object} data The plain JavaScript object bearing properties of interest. + * @param {module:model/ReadOnlyFirst} obj Optional instance to populate. + * @return {module:model/ReadOnlyFirst} The populated ReadOnlyFirst instance. + */ + static constructFromObject(data, obj) { + if (data) { + obj = obj || new ReadOnlyFirst(); + + if (data.hasOwnProperty('bar')) { + obj['bar'] = ApiClient.convertToType(data['bar'], 'String'); + } + if (data.hasOwnProperty('baz')) { + obj['baz'] = ApiClient.convertToType(data['baz'], 'String'); + } + } + return obj; + } +} + + + +export default ReadOnlyFirst; + diff --git a/samples/client/petstore/javascript-apollo/src/model/Return.js b/samples/client/petstore/javascript-apollo/src/model/Return.js new file mode 100644 index 000000000000..c980f45f9696 --- /dev/null +++ b/samples/client/petstore/javascript-apollo/src/model/Return.js @@ -0,0 +1,70 @@ +/** + * OpenAPI Petstore + * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ + * + * The version of the OpenAPI document: 1.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + * + */ + +import ApiClient from '../ApiClient'; + +/** + * The Return model module. + * @module model/Return + * @version 1.0.0 + */ +class Return { + /** + * @member {Number} return + * @type {Number} + */ + return; + + + + /** + * Constructs a new Return. + * Model for testing reserved words + * @alias module:model/Return + */ + constructor() { + + Return.initialize(this); + } + + /** + * Initializes the fields of this object. + * This method is used by the constructors of any subclasses, in order to implement multiple inheritance (mix-ins). + * Only for internal use. + */ + static initialize(obj) { + } + + /** + * Constructs a Return from a plain JavaScript object, optionally creating a new instance. + * Copies all relevant properties from data to obj if supplied or a new instance if not. + * @param {Object} data The plain JavaScript object bearing properties of interest. + * @param {module:model/Return} obj Optional instance to populate. + * @return {module:model/Return} The populated Return instance. + */ + static constructFromObject(data, obj) { + if (data) { + obj = obj || new Return(); + + if (data.hasOwnProperty('return')) { + obj['return'] = ApiClient.convertToType(data['return'], 'Number'); + } + } + return obj; + } +} + + + +export default Return; + diff --git a/samples/client/petstore/javascript-apollo/src/model/SpecialModelName.js b/samples/client/petstore/javascript-apollo/src/model/SpecialModelName.js new file mode 100644 index 000000000000..d3b7e703a201 --- /dev/null +++ b/samples/client/petstore/javascript-apollo/src/model/SpecialModelName.js @@ -0,0 +1,69 @@ +/** + * OpenAPI Petstore + * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ + * + * The version of the OpenAPI document: 1.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + * + */ + +import ApiClient from '../ApiClient'; + +/** + * The SpecialModelName model module. + * @module model/SpecialModelName + * @version 1.0.0 + */ +class SpecialModelName { + /** + * @member {Number} $special[property.name] + * @type {Number} + */ + $special[property.name]; + + + + /** + * Constructs a new SpecialModelName. + * @alias module:model/SpecialModelName + */ + constructor() { + + SpecialModelName.initialize(this); + } + + /** + * Initializes the fields of this object. + * This method is used by the constructors of any subclasses, in order to implement multiple inheritance (mix-ins). + * Only for internal use. + */ + static initialize(obj) { + } + + /** + * Constructs a SpecialModelName from a plain JavaScript object, optionally creating a new instance. + * Copies all relevant properties from data to obj if supplied or a new instance if not. + * @param {Object} data The plain JavaScript object bearing properties of interest. + * @param {module:model/SpecialModelName} obj Optional instance to populate. + * @return {module:model/SpecialModelName} The populated SpecialModelName instance. + */ + static constructFromObject(data, obj) { + if (data) { + obj = obj || new SpecialModelName(); + + if (data.hasOwnProperty('$special[property.name]')) { + obj['$special[property.name]'] = ApiClient.convertToType(data['$special[property.name]'], 'Number'); + } + } + return obj; + } +} + + + +export default SpecialModelName; + diff --git a/samples/client/petstore/javascript-apollo/src/model/Tag.js b/samples/client/petstore/javascript-apollo/src/model/Tag.js index 5034feec6fd4..b0ab6fab4e05 100644 --- a/samples/client/petstore/javascript-apollo/src/model/Tag.js +++ b/samples/client/petstore/javascript-apollo/src/model/Tag.js @@ -1,6 +1,6 @@ /** * OpenAPI Petstore - * This is a sample server Petstore server. For this sample, you can use the api key `special-key` to test the authorization filters. + * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ * * The version of the OpenAPI document: 1.0.0 * @@ -34,7 +34,6 @@ class Tag { /** * Constructs a new Tag. - * A tag for a pet * @alias module:model/Tag */ constructor() { diff --git a/samples/client/petstore/javascript-apollo/src/model/User.js b/samples/client/petstore/javascript-apollo/src/model/User.js index 8c3d21f0edf2..c7ad286ccaa8 100644 --- a/samples/client/petstore/javascript-apollo/src/model/User.js +++ b/samples/client/petstore/javascript-apollo/src/model/User.js @@ -1,6 +1,6 @@ /** * OpenAPI Petstore - * This is a sample server Petstore server. For this sample, you can use the api key `special-key` to test the authorization filters. + * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ * * The version of the OpenAPI document: 1.0.0 * @@ -64,7 +64,6 @@ class User { /** * Constructs a new User. - * A User who is purchasing from the pet store * @alias module:model/User */ constructor() { diff --git a/samples/client/petstore/javascript-apollo/test/api/AnotherFakeApi.spec.js b/samples/client/petstore/javascript-apollo/test/api/AnotherFakeApi.spec.js new file mode 100644 index 000000000000..23737283854a --- /dev/null +++ b/samples/client/petstore/javascript-apollo/test/api/AnotherFakeApi.spec.js @@ -0,0 +1,60 @@ +/** + * OpenAPI Petstore + * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ + * + * The version of the OpenAPI document: 1.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + * + */ + +(function(root, factory) { + if (typeof define === 'function' && define.amd) { + // AMD. + define(['expect.js', process.cwd()+'/src/index'], factory); + } else if (typeof module === 'object' && module.exports) { + // CommonJS-like environments that support module.exports, like Node. + factory(require('expect.js'), require(process.cwd()+'/src/index')); + } +}(this, function(expect, OpenApiPetstore) { + 'use strict'; + + var instance; + + beforeEach(function() { + instance = new OpenApiPetstore.AnotherFakeApi(); + }); + + var getProperty = function(object, getter, property) { + // Use getter method if present; otherwise, get the property directly. + if (typeof object[getter] === 'function') + return object[getter](); + else + return object[property]; + } + + var setProperty = function(object, setter, property, value) { + // Use setter method if present; otherwise, set the property directly. + if (typeof object[setter] === 'function') + object[setter](value); + else + object[property] = value; + } + + describe('AnotherFakeApi', function() { + describe('call123testSpecialTags', function() { + it('should call call123testSpecialTags successfully', function(done) { + //uncomment below and update the code to test call123testSpecialTags + //instance.call123testSpecialTags(function(error) { + // if (error) throw error; + //expect().to.be(); + //}); + done(); + }); + }); + }); + +})); diff --git a/samples/client/petstore/javascript-apollo/test/api/DefaultApi.spec.js b/samples/client/petstore/javascript-apollo/test/api/DefaultApi.spec.js new file mode 100644 index 000000000000..bf1006e94306 --- /dev/null +++ b/samples/client/petstore/javascript-apollo/test/api/DefaultApi.spec.js @@ -0,0 +1,60 @@ +/** + * OpenAPI Petstore + * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ + * + * The version of the OpenAPI document: 1.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + * + */ + +(function(root, factory) { + if (typeof define === 'function' && define.amd) { + // AMD. + define(['expect.js', process.cwd()+'/src/index'], factory); + } else if (typeof module === 'object' && module.exports) { + // CommonJS-like environments that support module.exports, like Node. + factory(require('expect.js'), require(process.cwd()+'/src/index')); + } +}(this, function(expect, OpenApiPetstore) { + 'use strict'; + + var instance; + + beforeEach(function() { + instance = new OpenApiPetstore.DefaultApi(); + }); + + var getProperty = function(object, getter, property) { + // Use getter method if present; otherwise, get the property directly. + if (typeof object[getter] === 'function') + return object[getter](); + else + return object[property]; + } + + var setProperty = function(object, setter, property, value) { + // Use setter method if present; otherwise, set the property directly. + if (typeof object[setter] === 'function') + object[setter](value); + else + object[property] = value; + } + + describe('DefaultApi', function() { + describe('fooGet', function() { + it('should call fooGet successfully', function(done) { + //uncomment below and update the code to test fooGet + //instance.fooGet(function(error) { + // if (error) throw error; + //expect().to.be(); + //}); + done(); + }); + }); + }); + +})); diff --git a/samples/client/petstore/javascript-apollo/test/api/FakeApi.spec.js b/samples/client/petstore/javascript-apollo/test/api/FakeApi.spec.js new file mode 100644 index 000000000000..713e35ffe162 --- /dev/null +++ b/samples/client/petstore/javascript-apollo/test/api/FakeApi.spec.js @@ -0,0 +1,220 @@ +/** + * OpenAPI Petstore + * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ + * + * The version of the OpenAPI document: 1.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + * + */ + +(function(root, factory) { + if (typeof define === 'function' && define.amd) { + // AMD. + define(['expect.js', process.cwd()+'/src/index'], factory); + } else if (typeof module === 'object' && module.exports) { + // CommonJS-like environments that support module.exports, like Node. + factory(require('expect.js'), require(process.cwd()+'/src/index')); + } +}(this, function(expect, OpenApiPetstore) { + 'use strict'; + + var instance; + + beforeEach(function() { + instance = new OpenApiPetstore.FakeApi(); + }); + + var getProperty = function(object, getter, property) { + // Use getter method if present; otherwise, get the property directly. + if (typeof object[getter] === 'function') + return object[getter](); + else + return object[property]; + } + + var setProperty = function(object, setter, property, value) { + // Use setter method if present; otherwise, set the property directly. + if (typeof object[setter] === 'function') + object[setter](value); + else + object[property] = value; + } + + describe('FakeApi', function() { + describe('fakeHealthGet', function() { + it('should call fakeHealthGet successfully', function(done) { + //uncomment below and update the code to test fakeHealthGet + //instance.fakeHealthGet(function(error) { + // if (error) throw error; + //expect().to.be(); + //}); + done(); + }); + }); + describe('fakeHttpSignatureTest', function() { + it('should call fakeHttpSignatureTest successfully', function(done) { + //uncomment below and update the code to test fakeHttpSignatureTest + //instance.fakeHttpSignatureTest(function(error) { + // if (error) throw error; + //expect().to.be(); + //}); + done(); + }); + }); + describe('fakeOuterBooleanSerialize', function() { + it('should call fakeOuterBooleanSerialize successfully', function(done) { + //uncomment below and update the code to test fakeOuterBooleanSerialize + //instance.fakeOuterBooleanSerialize(function(error) { + // if (error) throw error; + //expect().to.be(); + //}); + done(); + }); + }); + describe('fakeOuterCompositeSerialize', function() { + it('should call fakeOuterCompositeSerialize successfully', function(done) { + //uncomment below and update the code to test fakeOuterCompositeSerialize + //instance.fakeOuterCompositeSerialize(function(error) { + // if (error) throw error; + //expect().to.be(); + //}); + done(); + }); + }); + describe('fakeOuterNumberSerialize', function() { + it('should call fakeOuterNumberSerialize successfully', function(done) { + //uncomment below and update the code to test fakeOuterNumberSerialize + //instance.fakeOuterNumberSerialize(function(error) { + // if (error) throw error; + //expect().to.be(); + //}); + done(); + }); + }); + describe('fakeOuterStringSerialize', function() { + it('should call fakeOuterStringSerialize successfully', function(done) { + //uncomment below and update the code to test fakeOuterStringSerialize + //instance.fakeOuterStringSerialize(function(error) { + // if (error) throw error; + //expect().to.be(); + //}); + done(); + }); + }); + describe('fakePropertyEnumIntegerSerialize', function() { + it('should call fakePropertyEnumIntegerSerialize successfully', function(done) { + //uncomment below and update the code to test fakePropertyEnumIntegerSerialize + //instance.fakePropertyEnumIntegerSerialize(function(error) { + // if (error) throw error; + //expect().to.be(); + //}); + done(); + }); + }); + describe('testBodyWithBinary', function() { + it('should call testBodyWithBinary successfully', function(done) { + //uncomment below and update the code to test testBodyWithBinary + //instance.testBodyWithBinary(function(error) { + // if (error) throw error; + //expect().to.be(); + //}); + done(); + }); + }); + describe('testBodyWithFileSchema', function() { + it('should call testBodyWithFileSchema successfully', function(done) { + //uncomment below and update the code to test testBodyWithFileSchema + //instance.testBodyWithFileSchema(function(error) { + // if (error) throw error; + //expect().to.be(); + //}); + done(); + }); + }); + describe('testBodyWithQueryParams', function() { + it('should call testBodyWithQueryParams successfully', function(done) { + //uncomment below and update the code to test testBodyWithQueryParams + //instance.testBodyWithQueryParams(function(error) { + // if (error) throw error; + //expect().to.be(); + //}); + done(); + }); + }); + describe('testClientModel', function() { + it('should call testClientModel successfully', function(done) { + //uncomment below and update the code to test testClientModel + //instance.testClientModel(function(error) { + // if (error) throw error; + //expect().to.be(); + //}); + done(); + }); + }); + describe('testEndpointParameters', function() { + it('should call testEndpointParameters successfully', function(done) { + //uncomment below and update the code to test testEndpointParameters + //instance.testEndpointParameters(function(error) { + // if (error) throw error; + //expect().to.be(); + //}); + done(); + }); + }); + describe('testEnumParameters', function() { + it('should call testEnumParameters successfully', function(done) { + //uncomment below and update the code to test testEnumParameters + //instance.testEnumParameters(function(error) { + // if (error) throw error; + //expect().to.be(); + //}); + done(); + }); + }); + describe('testGroupParameters', function() { + it('should call testGroupParameters successfully', function(done) { + //uncomment below and update the code to test testGroupParameters + //instance.testGroupParameters(function(error) { + // if (error) throw error; + //expect().to.be(); + //}); + done(); + }); + }); + describe('testInlineAdditionalProperties', function() { + it('should call testInlineAdditionalProperties successfully', function(done) { + //uncomment below and update the code to test testInlineAdditionalProperties + //instance.testInlineAdditionalProperties(function(error) { + // if (error) throw error; + //expect().to.be(); + //}); + done(); + }); + }); + describe('testJsonFormData', function() { + it('should call testJsonFormData successfully', function(done) { + //uncomment below and update the code to test testJsonFormData + //instance.testJsonFormData(function(error) { + // if (error) throw error; + //expect().to.be(); + //}); + done(); + }); + }); + describe('testQueryParameterCollectionFormat', function() { + it('should call testQueryParameterCollectionFormat successfully', function(done) { + //uncomment below and update the code to test testQueryParameterCollectionFormat + //instance.testQueryParameterCollectionFormat(function(error) { + // if (error) throw error; + //expect().to.be(); + //}); + done(); + }); + }); + }); + +})); diff --git a/samples/client/petstore/javascript-apollo/test/api/FakeClassnameTags123Api.spec.js b/samples/client/petstore/javascript-apollo/test/api/FakeClassnameTags123Api.spec.js new file mode 100644 index 000000000000..eb98207ec33f --- /dev/null +++ b/samples/client/petstore/javascript-apollo/test/api/FakeClassnameTags123Api.spec.js @@ -0,0 +1,60 @@ +/** + * OpenAPI Petstore + * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ + * + * The version of the OpenAPI document: 1.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + * + */ + +(function(root, factory) { + if (typeof define === 'function' && define.amd) { + // AMD. + define(['expect.js', process.cwd()+'/src/index'], factory); + } else if (typeof module === 'object' && module.exports) { + // CommonJS-like environments that support module.exports, like Node. + factory(require('expect.js'), require(process.cwd()+'/src/index')); + } +}(this, function(expect, OpenApiPetstore) { + 'use strict'; + + var instance; + + beforeEach(function() { + instance = new OpenApiPetstore.FakeClassnameTags123Api(); + }); + + var getProperty = function(object, getter, property) { + // Use getter method if present; otherwise, get the property directly. + if (typeof object[getter] === 'function') + return object[getter](); + else + return object[property]; + } + + var setProperty = function(object, setter, property, value) { + // Use setter method if present; otherwise, set the property directly. + if (typeof object[setter] === 'function') + object[setter](value); + else + object[property] = value; + } + + describe('FakeClassnameTags123Api', function() { + describe('testClassname', function() { + it('should call testClassname successfully', function(done) { + //uncomment below and update the code to test testClassname + //instance.testClassname(function(error) { + // if (error) throw error; + //expect().to.be(); + //}); + done(); + }); + }); + }); + +})); diff --git a/samples/client/petstore/javascript-apollo/test/model/AdditionalPropertiesClass.spec.js b/samples/client/petstore/javascript-apollo/test/model/AdditionalPropertiesClass.spec.js new file mode 100644 index 000000000000..4086c3a614b2 --- /dev/null +++ b/samples/client/petstore/javascript-apollo/test/model/AdditionalPropertiesClass.spec.js @@ -0,0 +1,71 @@ +/** + * OpenAPI Petstore + * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ + * + * The version of the OpenAPI document: 1.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + * + */ + +(function(root, factory) { + if (typeof define === 'function' && define.amd) { + // AMD. + define(['expect.js', process.cwd()+'/src/index'], factory); + } else if (typeof module === 'object' && module.exports) { + // CommonJS-like environments that support module.exports, like Node. + factory(require('expect.js'), require(process.cwd()+'/src/index')); + } else { + // Browser globals (root is window) + factory(root.expect, root.OpenApiPetstore); + } +}(this, function(expect, OpenApiPetstore) { + 'use strict'; + + var instance; + + beforeEach(function() { + instance = new OpenApiPetstore.AdditionalPropertiesClass(); + }); + + var getProperty = function(object, getter, property) { + // Use getter method if present; otherwise, get the property directly. + if (typeof object[getter] === 'function') + return object[getter](); + else + return object[property]; + } + + var setProperty = function(object, setter, property, value) { + // Use setter method if present; otherwise, set the property directly. + if (typeof object[setter] === 'function') + object[setter](value); + else + object[property] = value; + } + + describe('AdditionalPropertiesClass', function() { + it('should create an instance of AdditionalPropertiesClass', function() { + // uncomment below and update the code to test AdditionalPropertiesClass + //var instance = new OpenApiPetstore.AdditionalPropertiesClass(); + //expect(instance).to.be.a(OpenApiPetstore.AdditionalPropertiesClass); + }); + + it('should have the property mapProperty (base name: "map_property")', function() { + // uncomment below and update the code to test the property mapProperty + //var instance = new OpenApiPetstore.AdditionalPropertiesClass(); + //expect(instance).to.be(); + }); + + it('should have the property mapOfMapProperty (base name: "map_of_map_property")', function() { + // uncomment below and update the code to test the property mapOfMapProperty + //var instance = new OpenApiPetstore.AdditionalPropertiesClass(); + //expect(instance).to.be(); + }); + + }); + +})); diff --git a/samples/client/petstore/javascript-apollo/test/model/Animal.spec.js b/samples/client/petstore/javascript-apollo/test/model/Animal.spec.js new file mode 100644 index 000000000000..1fedba274c74 --- /dev/null +++ b/samples/client/petstore/javascript-apollo/test/model/Animal.spec.js @@ -0,0 +1,71 @@ +/** + * OpenAPI Petstore + * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ + * + * The version of the OpenAPI document: 1.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + * + */ + +(function(root, factory) { + if (typeof define === 'function' && define.amd) { + // AMD. + define(['expect.js', process.cwd()+'/src/index'], factory); + } else if (typeof module === 'object' && module.exports) { + // CommonJS-like environments that support module.exports, like Node. + factory(require('expect.js'), require(process.cwd()+'/src/index')); + } else { + // Browser globals (root is window) + factory(root.expect, root.OpenApiPetstore); + } +}(this, function(expect, OpenApiPetstore) { + 'use strict'; + + var instance; + + beforeEach(function() { + instance = new OpenApiPetstore.Animal(); + }); + + var getProperty = function(object, getter, property) { + // Use getter method if present; otherwise, get the property directly. + if (typeof object[getter] === 'function') + return object[getter](); + else + return object[property]; + } + + var setProperty = function(object, setter, property, value) { + // Use setter method if present; otherwise, set the property directly. + if (typeof object[setter] === 'function') + object[setter](value); + else + object[property] = value; + } + + describe('Animal', function() { + it('should create an instance of Animal', function() { + // uncomment below and update the code to test Animal + //var instance = new OpenApiPetstore.Animal(); + //expect(instance).to.be.a(OpenApiPetstore.Animal); + }); + + it('should have the property className (base name: "className")', function() { + // uncomment below and update the code to test the property className + //var instance = new OpenApiPetstore.Animal(); + //expect(instance).to.be(); + }); + + it('should have the property color (base name: "color")', function() { + // uncomment below and update the code to test the property color + //var instance = new OpenApiPetstore.Animal(); + //expect(instance).to.be(); + }); + + }); + +})); diff --git a/samples/client/petstore/javascript-apollo/test/model/ArrayOfArrayOfNumberOnly.spec.js b/samples/client/petstore/javascript-apollo/test/model/ArrayOfArrayOfNumberOnly.spec.js new file mode 100644 index 000000000000..4bdd2cd2cbcc --- /dev/null +++ b/samples/client/petstore/javascript-apollo/test/model/ArrayOfArrayOfNumberOnly.spec.js @@ -0,0 +1,65 @@ +/** + * OpenAPI Petstore + * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ + * + * The version of the OpenAPI document: 1.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + * + */ + +(function(root, factory) { + if (typeof define === 'function' && define.amd) { + // AMD. + define(['expect.js', process.cwd()+'/src/index'], factory); + } else if (typeof module === 'object' && module.exports) { + // CommonJS-like environments that support module.exports, like Node. + factory(require('expect.js'), require(process.cwd()+'/src/index')); + } else { + // Browser globals (root is window) + factory(root.expect, root.OpenApiPetstore); + } +}(this, function(expect, OpenApiPetstore) { + 'use strict'; + + var instance; + + beforeEach(function() { + instance = new OpenApiPetstore.ArrayOfArrayOfNumberOnly(); + }); + + var getProperty = function(object, getter, property) { + // Use getter method if present; otherwise, get the property directly. + if (typeof object[getter] === 'function') + return object[getter](); + else + return object[property]; + } + + var setProperty = function(object, setter, property, value) { + // Use setter method if present; otherwise, set the property directly. + if (typeof object[setter] === 'function') + object[setter](value); + else + object[property] = value; + } + + describe('ArrayOfArrayOfNumberOnly', function() { + it('should create an instance of ArrayOfArrayOfNumberOnly', function() { + // uncomment below and update the code to test ArrayOfArrayOfNumberOnly + //var instance = new OpenApiPetstore.ArrayOfArrayOfNumberOnly(); + //expect(instance).to.be.a(OpenApiPetstore.ArrayOfArrayOfNumberOnly); + }); + + it('should have the property arrayArrayNumber (base name: "ArrayArrayNumber")', function() { + // uncomment below and update the code to test the property arrayArrayNumber + //var instance = new OpenApiPetstore.ArrayOfArrayOfNumberOnly(); + //expect(instance).to.be(); + }); + + }); + +})); diff --git a/samples/client/petstore/javascript-apollo/test/model/ArrayOfNumberOnly.spec.js b/samples/client/petstore/javascript-apollo/test/model/ArrayOfNumberOnly.spec.js new file mode 100644 index 000000000000..a44c1a7ea17e --- /dev/null +++ b/samples/client/petstore/javascript-apollo/test/model/ArrayOfNumberOnly.spec.js @@ -0,0 +1,65 @@ +/** + * OpenAPI Petstore + * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ + * + * The version of the OpenAPI document: 1.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + * + */ + +(function(root, factory) { + if (typeof define === 'function' && define.amd) { + // AMD. + define(['expect.js', process.cwd()+'/src/index'], factory); + } else if (typeof module === 'object' && module.exports) { + // CommonJS-like environments that support module.exports, like Node. + factory(require('expect.js'), require(process.cwd()+'/src/index')); + } else { + // Browser globals (root is window) + factory(root.expect, root.OpenApiPetstore); + } +}(this, function(expect, OpenApiPetstore) { + 'use strict'; + + var instance; + + beforeEach(function() { + instance = new OpenApiPetstore.ArrayOfNumberOnly(); + }); + + var getProperty = function(object, getter, property) { + // Use getter method if present; otherwise, get the property directly. + if (typeof object[getter] === 'function') + return object[getter](); + else + return object[property]; + } + + var setProperty = function(object, setter, property, value) { + // Use setter method if present; otherwise, set the property directly. + if (typeof object[setter] === 'function') + object[setter](value); + else + object[property] = value; + } + + describe('ArrayOfNumberOnly', function() { + it('should create an instance of ArrayOfNumberOnly', function() { + // uncomment below and update the code to test ArrayOfNumberOnly + //var instance = new OpenApiPetstore.ArrayOfNumberOnly(); + //expect(instance).to.be.a(OpenApiPetstore.ArrayOfNumberOnly); + }); + + it('should have the property arrayNumber (base name: "ArrayNumber")', function() { + // uncomment below and update the code to test the property arrayNumber + //var instance = new OpenApiPetstore.ArrayOfNumberOnly(); + //expect(instance).to.be(); + }); + + }); + +})); diff --git a/samples/client/petstore/javascript-apollo/test/model/ArrayTest.spec.js b/samples/client/petstore/javascript-apollo/test/model/ArrayTest.spec.js new file mode 100644 index 000000000000..a6bbf95e2109 --- /dev/null +++ b/samples/client/petstore/javascript-apollo/test/model/ArrayTest.spec.js @@ -0,0 +1,77 @@ +/** + * OpenAPI Petstore + * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ + * + * The version of the OpenAPI document: 1.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + * + */ + +(function(root, factory) { + if (typeof define === 'function' && define.amd) { + // AMD. + define(['expect.js', process.cwd()+'/src/index'], factory); + } else if (typeof module === 'object' && module.exports) { + // CommonJS-like environments that support module.exports, like Node. + factory(require('expect.js'), require(process.cwd()+'/src/index')); + } else { + // Browser globals (root is window) + factory(root.expect, root.OpenApiPetstore); + } +}(this, function(expect, OpenApiPetstore) { + 'use strict'; + + var instance; + + beforeEach(function() { + instance = new OpenApiPetstore.ArrayTest(); + }); + + var getProperty = function(object, getter, property) { + // Use getter method if present; otherwise, get the property directly. + if (typeof object[getter] === 'function') + return object[getter](); + else + return object[property]; + } + + var setProperty = function(object, setter, property, value) { + // Use setter method if present; otherwise, set the property directly. + if (typeof object[setter] === 'function') + object[setter](value); + else + object[property] = value; + } + + describe('ArrayTest', function() { + it('should create an instance of ArrayTest', function() { + // uncomment below and update the code to test ArrayTest + //var instance = new OpenApiPetstore.ArrayTest(); + //expect(instance).to.be.a(OpenApiPetstore.ArrayTest); + }); + + it('should have the property arrayOfString (base name: "array_of_string")', function() { + // uncomment below and update the code to test the property arrayOfString + //var instance = new OpenApiPetstore.ArrayTest(); + //expect(instance).to.be(); + }); + + it('should have the property arrayArrayOfInteger (base name: "array_array_of_integer")', function() { + // uncomment below and update the code to test the property arrayArrayOfInteger + //var instance = new OpenApiPetstore.ArrayTest(); + //expect(instance).to.be(); + }); + + it('should have the property arrayArrayOfModel (base name: "array_array_of_model")', function() { + // uncomment below and update the code to test the property arrayArrayOfModel + //var instance = new OpenApiPetstore.ArrayTest(); + //expect(instance).to.be(); + }); + + }); + +})); diff --git a/samples/client/petstore/javascript-apollo/test/model/Capitalization.spec.js b/samples/client/petstore/javascript-apollo/test/model/Capitalization.spec.js new file mode 100644 index 000000000000..8f14fd583d51 --- /dev/null +++ b/samples/client/petstore/javascript-apollo/test/model/Capitalization.spec.js @@ -0,0 +1,95 @@ +/** + * OpenAPI Petstore + * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ + * + * The version of the OpenAPI document: 1.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + * + */ + +(function(root, factory) { + if (typeof define === 'function' && define.amd) { + // AMD. + define(['expect.js', process.cwd()+'/src/index'], factory); + } else if (typeof module === 'object' && module.exports) { + // CommonJS-like environments that support module.exports, like Node. + factory(require('expect.js'), require(process.cwd()+'/src/index')); + } else { + // Browser globals (root is window) + factory(root.expect, root.OpenApiPetstore); + } +}(this, function(expect, OpenApiPetstore) { + 'use strict'; + + var instance; + + beforeEach(function() { + instance = new OpenApiPetstore.Capitalization(); + }); + + var getProperty = function(object, getter, property) { + // Use getter method if present; otherwise, get the property directly. + if (typeof object[getter] === 'function') + return object[getter](); + else + return object[property]; + } + + var setProperty = function(object, setter, property, value) { + // Use setter method if present; otherwise, set the property directly. + if (typeof object[setter] === 'function') + object[setter](value); + else + object[property] = value; + } + + describe('Capitalization', function() { + it('should create an instance of Capitalization', function() { + // uncomment below and update the code to test Capitalization + //var instance = new OpenApiPetstore.Capitalization(); + //expect(instance).to.be.a(OpenApiPetstore.Capitalization); + }); + + it('should have the property smallCamel (base name: "smallCamel")', function() { + // uncomment below and update the code to test the property smallCamel + //var instance = new OpenApiPetstore.Capitalization(); + //expect(instance).to.be(); + }); + + it('should have the property capitalCamel (base name: "CapitalCamel")', function() { + // uncomment below and update the code to test the property capitalCamel + //var instance = new OpenApiPetstore.Capitalization(); + //expect(instance).to.be(); + }); + + it('should have the property smallSnake (base name: "small_Snake")', function() { + // uncomment below and update the code to test the property smallSnake + //var instance = new OpenApiPetstore.Capitalization(); + //expect(instance).to.be(); + }); + + it('should have the property capitalSnake (base name: "Capital_Snake")', function() { + // uncomment below and update the code to test the property capitalSnake + //var instance = new OpenApiPetstore.Capitalization(); + //expect(instance).to.be(); + }); + + it('should have the property sCAETHFlowPoints (base name: "SCA_ETH_Flow_Points")', function() { + // uncomment below and update the code to test the property sCAETHFlowPoints + //var instance = new OpenApiPetstore.Capitalization(); + //expect(instance).to.be(); + }); + + it('should have the property ATT_NAME (base name: "ATT_NAME")', function() { + // uncomment below and update the code to test the property ATT_NAME + //var instance = new OpenApiPetstore.Capitalization(); + //expect(instance).to.be(); + }); + + }); + +})); diff --git a/samples/client/petstore/javascript-apollo/test/model/Cat.spec.js b/samples/client/petstore/javascript-apollo/test/model/Cat.spec.js new file mode 100644 index 000000000000..a0c3551cbc60 --- /dev/null +++ b/samples/client/petstore/javascript-apollo/test/model/Cat.spec.js @@ -0,0 +1,65 @@ +/** + * OpenAPI Petstore + * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ + * + * The version of the OpenAPI document: 1.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + * + */ + +(function(root, factory) { + if (typeof define === 'function' && define.amd) { + // AMD. + define(['expect.js', process.cwd()+'/src/index'], factory); + } else if (typeof module === 'object' && module.exports) { + // CommonJS-like environments that support module.exports, like Node. + factory(require('expect.js'), require(process.cwd()+'/src/index')); + } else { + // Browser globals (root is window) + factory(root.expect, root.OpenApiPetstore); + } +}(this, function(expect, OpenApiPetstore) { + 'use strict'; + + var instance; + + beforeEach(function() { + instance = new OpenApiPetstore.Cat(); + }); + + var getProperty = function(object, getter, property) { + // Use getter method if present; otherwise, get the property directly. + if (typeof object[getter] === 'function') + return object[getter](); + else + return object[property]; + } + + var setProperty = function(object, setter, property, value) { + // Use setter method if present; otherwise, set the property directly. + if (typeof object[setter] === 'function') + object[setter](value); + else + object[property] = value; + } + + describe('Cat', function() { + it('should create an instance of Cat', function() { + // uncomment below and update the code to test Cat + //var instance = new OpenApiPetstore.Cat(); + //expect(instance).to.be.a(OpenApiPetstore.Cat); + }); + + it('should have the property declawed (base name: "declawed")', function() { + // uncomment below and update the code to test the property declawed + //var instance = new OpenApiPetstore.Cat(); + //expect(instance).to.be(); + }); + + }); + +})); diff --git a/samples/client/petstore/javascript-apollo/test/model/CatAllOf.spec.js b/samples/client/petstore/javascript-apollo/test/model/CatAllOf.spec.js new file mode 100644 index 000000000000..7e9f50eaddde --- /dev/null +++ b/samples/client/petstore/javascript-apollo/test/model/CatAllOf.spec.js @@ -0,0 +1,65 @@ +/** + * OpenAPI Petstore + * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ + * + * The version of the OpenAPI document: 1.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + * + */ + +(function(root, factory) { + if (typeof define === 'function' && define.amd) { + // AMD. + define(['expect.js', process.cwd()+'/src/index'], factory); + } else if (typeof module === 'object' && module.exports) { + // CommonJS-like environments that support module.exports, like Node. + factory(require('expect.js'), require(process.cwd()+'/src/index')); + } else { + // Browser globals (root is window) + factory(root.expect, root.OpenApiPetstore); + } +}(this, function(expect, OpenApiPetstore) { + 'use strict'; + + var instance; + + beforeEach(function() { + instance = new OpenApiPetstore.CatAllOf(); + }); + + var getProperty = function(object, getter, property) { + // Use getter method if present; otherwise, get the property directly. + if (typeof object[getter] === 'function') + return object[getter](); + else + return object[property]; + } + + var setProperty = function(object, setter, property, value) { + // Use setter method if present; otherwise, set the property directly. + if (typeof object[setter] === 'function') + object[setter](value); + else + object[property] = value; + } + + describe('CatAllOf', function() { + it('should create an instance of CatAllOf', function() { + // uncomment below and update the code to test CatAllOf + //var instance = new OpenApiPetstore.CatAllOf(); + //expect(instance).to.be.a(OpenApiPetstore.CatAllOf); + }); + + it('should have the property declawed (base name: "declawed")', function() { + // uncomment below and update the code to test the property declawed + //var instance = new OpenApiPetstore.CatAllOf(); + //expect(instance).to.be(); + }); + + }); + +})); diff --git a/samples/client/petstore/javascript-apollo/test/model/ClassModel.spec.js b/samples/client/petstore/javascript-apollo/test/model/ClassModel.spec.js new file mode 100644 index 000000000000..975308a1ceb5 --- /dev/null +++ b/samples/client/petstore/javascript-apollo/test/model/ClassModel.spec.js @@ -0,0 +1,65 @@ +/** + * OpenAPI Petstore + * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ + * + * The version of the OpenAPI document: 1.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + * + */ + +(function(root, factory) { + if (typeof define === 'function' && define.amd) { + // AMD. + define(['expect.js', process.cwd()+'/src/index'], factory); + } else if (typeof module === 'object' && module.exports) { + // CommonJS-like environments that support module.exports, like Node. + factory(require('expect.js'), require(process.cwd()+'/src/index')); + } else { + // Browser globals (root is window) + factory(root.expect, root.OpenApiPetstore); + } +}(this, function(expect, OpenApiPetstore) { + 'use strict'; + + var instance; + + beforeEach(function() { + instance = new OpenApiPetstore.ClassModel(); + }); + + var getProperty = function(object, getter, property) { + // Use getter method if present; otherwise, get the property directly. + if (typeof object[getter] === 'function') + return object[getter](); + else + return object[property]; + } + + var setProperty = function(object, setter, property, value) { + // Use setter method if present; otherwise, set the property directly. + if (typeof object[setter] === 'function') + object[setter](value); + else + object[property] = value; + } + + describe('ClassModel', function() { + it('should create an instance of ClassModel', function() { + // uncomment below and update the code to test ClassModel + //var instance = new OpenApiPetstore.ClassModel(); + //expect(instance).to.be.a(OpenApiPetstore.ClassModel); + }); + + it('should have the property _class (base name: "_class")', function() { + // uncomment below and update the code to test the property _class + //var instance = new OpenApiPetstore.ClassModel(); + //expect(instance).to.be(); + }); + + }); + +})); diff --git a/samples/client/petstore/javascript-apollo/test/model/Client.spec.js b/samples/client/petstore/javascript-apollo/test/model/Client.spec.js new file mode 100644 index 000000000000..c96ccac7e3a6 --- /dev/null +++ b/samples/client/petstore/javascript-apollo/test/model/Client.spec.js @@ -0,0 +1,65 @@ +/** + * OpenAPI Petstore + * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ + * + * The version of the OpenAPI document: 1.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + * + */ + +(function(root, factory) { + if (typeof define === 'function' && define.amd) { + // AMD. + define(['expect.js', process.cwd()+'/src/index'], factory); + } else if (typeof module === 'object' && module.exports) { + // CommonJS-like environments that support module.exports, like Node. + factory(require('expect.js'), require(process.cwd()+'/src/index')); + } else { + // Browser globals (root is window) + factory(root.expect, root.OpenApiPetstore); + } +}(this, function(expect, OpenApiPetstore) { + 'use strict'; + + var instance; + + beforeEach(function() { + instance = new OpenApiPetstore.Client(); + }); + + var getProperty = function(object, getter, property) { + // Use getter method if present; otherwise, get the property directly. + if (typeof object[getter] === 'function') + return object[getter](); + else + return object[property]; + } + + var setProperty = function(object, setter, property, value) { + // Use setter method if present; otherwise, set the property directly. + if (typeof object[setter] === 'function') + object[setter](value); + else + object[property] = value; + } + + describe('Client', function() { + it('should create an instance of Client', function() { + // uncomment below and update the code to test Client + //var instance = new OpenApiPetstore.Client(); + //expect(instance).to.be.a(OpenApiPetstore.Client); + }); + + it('should have the property client (base name: "client")', function() { + // uncomment below and update the code to test the property client + //var instance = new OpenApiPetstore.Client(); + //expect(instance).to.be(); + }); + + }); + +})); diff --git a/samples/client/petstore/javascript-apollo/test/model/DeprecatedObject.spec.js b/samples/client/petstore/javascript-apollo/test/model/DeprecatedObject.spec.js new file mode 100644 index 000000000000..072245e26f51 --- /dev/null +++ b/samples/client/petstore/javascript-apollo/test/model/DeprecatedObject.spec.js @@ -0,0 +1,65 @@ +/** + * OpenAPI Petstore + * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ + * + * The version of the OpenAPI document: 1.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + * + */ + +(function(root, factory) { + if (typeof define === 'function' && define.amd) { + // AMD. + define(['expect.js', process.cwd()+'/src/index'], factory); + } else if (typeof module === 'object' && module.exports) { + // CommonJS-like environments that support module.exports, like Node. + factory(require('expect.js'), require(process.cwd()+'/src/index')); + } else { + // Browser globals (root is window) + factory(root.expect, root.OpenApiPetstore); + } +}(this, function(expect, OpenApiPetstore) { + 'use strict'; + + var instance; + + beforeEach(function() { + instance = new OpenApiPetstore.DeprecatedObject(); + }); + + var getProperty = function(object, getter, property) { + // Use getter method if present; otherwise, get the property directly. + if (typeof object[getter] === 'function') + return object[getter](); + else + return object[property]; + } + + var setProperty = function(object, setter, property, value) { + // Use setter method if present; otherwise, set the property directly. + if (typeof object[setter] === 'function') + object[setter](value); + else + object[property] = value; + } + + describe('DeprecatedObject', function() { + it('should create an instance of DeprecatedObject', function() { + // uncomment below and update the code to test DeprecatedObject + //var instance = new OpenApiPetstore.DeprecatedObject(); + //expect(instance).to.be.a(OpenApiPetstore.DeprecatedObject); + }); + + it('should have the property name (base name: "name")', function() { + // uncomment below and update the code to test the property name + //var instance = new OpenApiPetstore.DeprecatedObject(); + //expect(instance).to.be(); + }); + + }); + +})); diff --git a/samples/client/petstore/javascript-apollo/test/model/Dog.spec.js b/samples/client/petstore/javascript-apollo/test/model/Dog.spec.js new file mode 100644 index 000000000000..709cbfa9fd3e --- /dev/null +++ b/samples/client/petstore/javascript-apollo/test/model/Dog.spec.js @@ -0,0 +1,65 @@ +/** + * OpenAPI Petstore + * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ + * + * The version of the OpenAPI document: 1.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + * + */ + +(function(root, factory) { + if (typeof define === 'function' && define.amd) { + // AMD. + define(['expect.js', process.cwd()+'/src/index'], factory); + } else if (typeof module === 'object' && module.exports) { + // CommonJS-like environments that support module.exports, like Node. + factory(require('expect.js'), require(process.cwd()+'/src/index')); + } else { + // Browser globals (root is window) + factory(root.expect, root.OpenApiPetstore); + } +}(this, function(expect, OpenApiPetstore) { + 'use strict'; + + var instance; + + beforeEach(function() { + instance = new OpenApiPetstore.Dog(); + }); + + var getProperty = function(object, getter, property) { + // Use getter method if present; otherwise, get the property directly. + if (typeof object[getter] === 'function') + return object[getter](); + else + return object[property]; + } + + var setProperty = function(object, setter, property, value) { + // Use setter method if present; otherwise, set the property directly. + if (typeof object[setter] === 'function') + object[setter](value); + else + object[property] = value; + } + + describe('Dog', function() { + it('should create an instance of Dog', function() { + // uncomment below and update the code to test Dog + //var instance = new OpenApiPetstore.Dog(); + //expect(instance).to.be.a(OpenApiPetstore.Dog); + }); + + it('should have the property breed (base name: "breed")', function() { + // uncomment below and update the code to test the property breed + //var instance = new OpenApiPetstore.Dog(); + //expect(instance).to.be(); + }); + + }); + +})); diff --git a/samples/client/petstore/javascript-apollo/test/model/DogAllOf.spec.js b/samples/client/petstore/javascript-apollo/test/model/DogAllOf.spec.js new file mode 100644 index 000000000000..0bb726203a5f --- /dev/null +++ b/samples/client/petstore/javascript-apollo/test/model/DogAllOf.spec.js @@ -0,0 +1,65 @@ +/** + * OpenAPI Petstore + * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ + * + * The version of the OpenAPI document: 1.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + * + */ + +(function(root, factory) { + if (typeof define === 'function' && define.amd) { + // AMD. + define(['expect.js', process.cwd()+'/src/index'], factory); + } else if (typeof module === 'object' && module.exports) { + // CommonJS-like environments that support module.exports, like Node. + factory(require('expect.js'), require(process.cwd()+'/src/index')); + } else { + // Browser globals (root is window) + factory(root.expect, root.OpenApiPetstore); + } +}(this, function(expect, OpenApiPetstore) { + 'use strict'; + + var instance; + + beforeEach(function() { + instance = new OpenApiPetstore.DogAllOf(); + }); + + var getProperty = function(object, getter, property) { + // Use getter method if present; otherwise, get the property directly. + if (typeof object[getter] === 'function') + return object[getter](); + else + return object[property]; + } + + var setProperty = function(object, setter, property, value) { + // Use setter method if present; otherwise, set the property directly. + if (typeof object[setter] === 'function') + object[setter](value); + else + object[property] = value; + } + + describe('DogAllOf', function() { + it('should create an instance of DogAllOf', function() { + // uncomment below and update the code to test DogAllOf + //var instance = new OpenApiPetstore.DogAllOf(); + //expect(instance).to.be.a(OpenApiPetstore.DogAllOf); + }); + + it('should have the property breed (base name: "breed")', function() { + // uncomment below and update the code to test the property breed + //var instance = new OpenApiPetstore.DogAllOf(); + //expect(instance).to.be(); + }); + + }); + +})); diff --git a/samples/client/petstore/javascript-apollo/test/model/EnumArrays.spec.js b/samples/client/petstore/javascript-apollo/test/model/EnumArrays.spec.js new file mode 100644 index 000000000000..bda0e3bcf483 --- /dev/null +++ b/samples/client/petstore/javascript-apollo/test/model/EnumArrays.spec.js @@ -0,0 +1,71 @@ +/** + * OpenAPI Petstore + * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ + * + * The version of the OpenAPI document: 1.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + * + */ + +(function(root, factory) { + if (typeof define === 'function' && define.amd) { + // AMD. + define(['expect.js', process.cwd()+'/src/index'], factory); + } else if (typeof module === 'object' && module.exports) { + // CommonJS-like environments that support module.exports, like Node. + factory(require('expect.js'), require(process.cwd()+'/src/index')); + } else { + // Browser globals (root is window) + factory(root.expect, root.OpenApiPetstore); + } +}(this, function(expect, OpenApiPetstore) { + 'use strict'; + + var instance; + + beforeEach(function() { + instance = new OpenApiPetstore.EnumArrays(); + }); + + var getProperty = function(object, getter, property) { + // Use getter method if present; otherwise, get the property directly. + if (typeof object[getter] === 'function') + return object[getter](); + else + return object[property]; + } + + var setProperty = function(object, setter, property, value) { + // Use setter method if present; otherwise, set the property directly. + if (typeof object[setter] === 'function') + object[setter](value); + else + object[property] = value; + } + + describe('EnumArrays', function() { + it('should create an instance of EnumArrays', function() { + // uncomment below and update the code to test EnumArrays + //var instance = new OpenApiPetstore.EnumArrays(); + //expect(instance).to.be.a(OpenApiPetstore.EnumArrays); + }); + + it('should have the property justSymbol (base name: "just_symbol")', function() { + // uncomment below and update the code to test the property justSymbol + //var instance = new OpenApiPetstore.EnumArrays(); + //expect(instance).to.be(); + }); + + it('should have the property arrayEnum (base name: "array_enum")', function() { + // uncomment below and update the code to test the property arrayEnum + //var instance = new OpenApiPetstore.EnumArrays(); + //expect(instance).to.be(); + }); + + }); + +})); diff --git a/samples/client/petstore/javascript-apollo/test/model/EnumClass.spec.js b/samples/client/petstore/javascript-apollo/test/model/EnumClass.spec.js new file mode 100644 index 000000000000..31924e83d573 --- /dev/null +++ b/samples/client/petstore/javascript-apollo/test/model/EnumClass.spec.js @@ -0,0 +1,58 @@ +/** + * OpenAPI Petstore + * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ + * + * The version of the OpenAPI document: 1.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + * + */ + +(function(root, factory) { + if (typeof define === 'function' && define.amd) { + // AMD. + define(['expect.js', process.cwd()+'/src/index'], factory); + } else if (typeof module === 'object' && module.exports) { + // CommonJS-like environments that support module.exports, like Node. + factory(require('expect.js'), require(process.cwd()+'/src/index')); + } else { + // Browser globals (root is window) + factory(root.expect, root.OpenApiPetstore); + } +}(this, function(expect, OpenApiPetstore) { + 'use strict'; + + var instance; + + beforeEach(function() { + }); + + var getProperty = function(object, getter, property) { + // Use getter method if present; otherwise, get the property directly. + if (typeof object[getter] === 'function') + return object[getter](); + else + return object[property]; + } + + var setProperty = function(object, setter, property, value) { + // Use setter method if present; otherwise, set the property directly. + if (typeof object[setter] === 'function') + object[setter](value); + else + object[property] = value; + } + + describe('EnumClass', function() { + it('should create an instance of EnumClass', function() { + // uncomment below and update the code to test EnumClass + //var instance = new OpenApiPetstore.EnumClass(); + //expect(instance).to.be.a(OpenApiPetstore.EnumClass); + }); + + }); + +})); diff --git a/samples/client/petstore/javascript-apollo/test/model/EnumTest.spec.js b/samples/client/petstore/javascript-apollo/test/model/EnumTest.spec.js new file mode 100644 index 000000000000..ee14bc9b9d5b --- /dev/null +++ b/samples/client/petstore/javascript-apollo/test/model/EnumTest.spec.js @@ -0,0 +1,107 @@ +/** + * OpenAPI Petstore + * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ + * + * The version of the OpenAPI document: 1.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + * + */ + +(function(root, factory) { + if (typeof define === 'function' && define.amd) { + // AMD. + define(['expect.js', process.cwd()+'/src/index'], factory); + } else if (typeof module === 'object' && module.exports) { + // CommonJS-like environments that support module.exports, like Node. + factory(require('expect.js'), require(process.cwd()+'/src/index')); + } else { + // Browser globals (root is window) + factory(root.expect, root.OpenApiPetstore); + } +}(this, function(expect, OpenApiPetstore) { + 'use strict'; + + var instance; + + beforeEach(function() { + instance = new OpenApiPetstore.EnumTest(); + }); + + var getProperty = function(object, getter, property) { + // Use getter method if present; otherwise, get the property directly. + if (typeof object[getter] === 'function') + return object[getter](); + else + return object[property]; + } + + var setProperty = function(object, setter, property, value) { + // Use setter method if present; otherwise, set the property directly. + if (typeof object[setter] === 'function') + object[setter](value); + else + object[property] = value; + } + + describe('EnumTest', function() { + it('should create an instance of EnumTest', function() { + // uncomment below and update the code to test EnumTest + //var instance = new OpenApiPetstore.EnumTest(); + //expect(instance).to.be.a(OpenApiPetstore.EnumTest); + }); + + it('should have the property enumString (base name: "enum_string")', function() { + // uncomment below and update the code to test the property enumString + //var instance = new OpenApiPetstore.EnumTest(); + //expect(instance).to.be(); + }); + + it('should have the property enumStringRequired (base name: "enum_string_required")', function() { + // uncomment below and update the code to test the property enumStringRequired + //var instance = new OpenApiPetstore.EnumTest(); + //expect(instance).to.be(); + }); + + it('should have the property enumInteger (base name: "enum_integer")', function() { + // uncomment below and update the code to test the property enumInteger + //var instance = new OpenApiPetstore.EnumTest(); + //expect(instance).to.be(); + }); + + it('should have the property enumNumber (base name: "enum_number")', function() { + // uncomment below and update the code to test the property enumNumber + //var instance = new OpenApiPetstore.EnumTest(); + //expect(instance).to.be(); + }); + + it('should have the property outerEnum (base name: "outerEnum")', function() { + // uncomment below and update the code to test the property outerEnum + //var instance = new OpenApiPetstore.EnumTest(); + //expect(instance).to.be(); + }); + + it('should have the property outerEnumInteger (base name: "outerEnumInteger")', function() { + // uncomment below and update the code to test the property outerEnumInteger + //var instance = new OpenApiPetstore.EnumTest(); + //expect(instance).to.be(); + }); + + it('should have the property outerEnumDefaultValue (base name: "outerEnumDefaultValue")', function() { + // uncomment below and update the code to test the property outerEnumDefaultValue + //var instance = new OpenApiPetstore.EnumTest(); + //expect(instance).to.be(); + }); + + it('should have the property outerEnumIntegerDefaultValue (base name: "outerEnumIntegerDefaultValue")', function() { + // uncomment below and update the code to test the property outerEnumIntegerDefaultValue + //var instance = new OpenApiPetstore.EnumTest(); + //expect(instance).to.be(); + }); + + }); + +})); diff --git a/samples/client/petstore/javascript-apollo/test/model/File.spec.js b/samples/client/petstore/javascript-apollo/test/model/File.spec.js new file mode 100644 index 000000000000..ac6fbb3de7a2 --- /dev/null +++ b/samples/client/petstore/javascript-apollo/test/model/File.spec.js @@ -0,0 +1,65 @@ +/** + * OpenAPI Petstore + * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ + * + * The version of the OpenAPI document: 1.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + * + */ + +(function(root, factory) { + if (typeof define === 'function' && define.amd) { + // AMD. + define(['expect.js', process.cwd()+'/src/index'], factory); + } else if (typeof module === 'object' && module.exports) { + // CommonJS-like environments that support module.exports, like Node. + factory(require('expect.js'), require(process.cwd()+'/src/index')); + } else { + // Browser globals (root is window) + factory(root.expect, root.OpenApiPetstore); + } +}(this, function(expect, OpenApiPetstore) { + 'use strict'; + + var instance; + + beforeEach(function() { + instance = new OpenApiPetstore.File(); + }); + + var getProperty = function(object, getter, property) { + // Use getter method if present; otherwise, get the property directly. + if (typeof object[getter] === 'function') + return object[getter](); + else + return object[property]; + } + + var setProperty = function(object, setter, property, value) { + // Use setter method if present; otherwise, set the property directly. + if (typeof object[setter] === 'function') + object[setter](value); + else + object[property] = value; + } + + describe('File', function() { + it('should create an instance of File', function() { + // uncomment below and update the code to test File + //var instance = new OpenApiPetstore.File(); + //expect(instance).to.be.a(OpenApiPetstore.File); + }); + + it('should have the property sourceURI (base name: "sourceURI")', function() { + // uncomment below and update the code to test the property sourceURI + //var instance = new OpenApiPetstore.File(); + //expect(instance).to.be(); + }); + + }); + +})); diff --git a/samples/client/petstore/javascript-apollo/test/model/FileSchemaTestClass.spec.js b/samples/client/petstore/javascript-apollo/test/model/FileSchemaTestClass.spec.js new file mode 100644 index 000000000000..2f0090897223 --- /dev/null +++ b/samples/client/petstore/javascript-apollo/test/model/FileSchemaTestClass.spec.js @@ -0,0 +1,71 @@ +/** + * OpenAPI Petstore + * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ + * + * The version of the OpenAPI document: 1.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + * + */ + +(function(root, factory) { + if (typeof define === 'function' && define.amd) { + // AMD. + define(['expect.js', process.cwd()+'/src/index'], factory); + } else if (typeof module === 'object' && module.exports) { + // CommonJS-like environments that support module.exports, like Node. + factory(require('expect.js'), require(process.cwd()+'/src/index')); + } else { + // Browser globals (root is window) + factory(root.expect, root.OpenApiPetstore); + } +}(this, function(expect, OpenApiPetstore) { + 'use strict'; + + var instance; + + beforeEach(function() { + instance = new OpenApiPetstore.FileSchemaTestClass(); + }); + + var getProperty = function(object, getter, property) { + // Use getter method if present; otherwise, get the property directly. + if (typeof object[getter] === 'function') + return object[getter](); + else + return object[property]; + } + + var setProperty = function(object, setter, property, value) { + // Use setter method if present; otherwise, set the property directly. + if (typeof object[setter] === 'function') + object[setter](value); + else + object[property] = value; + } + + describe('FileSchemaTestClass', function() { + it('should create an instance of FileSchemaTestClass', function() { + // uncomment below and update the code to test FileSchemaTestClass + //var instance = new OpenApiPetstore.FileSchemaTestClass(); + //expect(instance).to.be.a(OpenApiPetstore.FileSchemaTestClass); + }); + + it('should have the property file (base name: "file")', function() { + // uncomment below and update the code to test the property file + //var instance = new OpenApiPetstore.FileSchemaTestClass(); + //expect(instance).to.be(); + }); + + it('should have the property files (base name: "files")', function() { + // uncomment below and update the code to test the property files + //var instance = new OpenApiPetstore.FileSchemaTestClass(); + //expect(instance).to.be(); + }); + + }); + +})); diff --git a/samples/client/petstore/javascript-apollo/test/model/Foo.spec.js b/samples/client/petstore/javascript-apollo/test/model/Foo.spec.js new file mode 100644 index 000000000000..81491fc42c9d --- /dev/null +++ b/samples/client/petstore/javascript-apollo/test/model/Foo.spec.js @@ -0,0 +1,65 @@ +/** + * OpenAPI Petstore + * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ + * + * The version of the OpenAPI document: 1.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + * + */ + +(function(root, factory) { + if (typeof define === 'function' && define.amd) { + // AMD. + define(['expect.js', process.cwd()+'/src/index'], factory); + } else if (typeof module === 'object' && module.exports) { + // CommonJS-like environments that support module.exports, like Node. + factory(require('expect.js'), require(process.cwd()+'/src/index')); + } else { + // Browser globals (root is window) + factory(root.expect, root.OpenApiPetstore); + } +}(this, function(expect, OpenApiPetstore) { + 'use strict'; + + var instance; + + beforeEach(function() { + instance = new OpenApiPetstore.Foo(); + }); + + var getProperty = function(object, getter, property) { + // Use getter method if present; otherwise, get the property directly. + if (typeof object[getter] === 'function') + return object[getter](); + else + return object[property]; + } + + var setProperty = function(object, setter, property, value) { + // Use setter method if present; otherwise, set the property directly. + if (typeof object[setter] === 'function') + object[setter](value); + else + object[property] = value; + } + + describe('Foo', function() { + it('should create an instance of Foo', function() { + // uncomment below and update the code to test Foo + //var instance = new OpenApiPetstore.Foo(); + //expect(instance).to.be.a(OpenApiPetstore.Foo); + }); + + it('should have the property bar (base name: "bar")', function() { + // uncomment below and update the code to test the property bar + //var instance = new OpenApiPetstore.Foo(); + //expect(instance).to.be(); + }); + + }); + +})); diff --git a/samples/client/petstore/javascript-apollo/test/model/FooGetDefaultResponse.spec.js b/samples/client/petstore/javascript-apollo/test/model/FooGetDefaultResponse.spec.js new file mode 100644 index 000000000000..64c30673805d --- /dev/null +++ b/samples/client/petstore/javascript-apollo/test/model/FooGetDefaultResponse.spec.js @@ -0,0 +1,65 @@ +/** + * OpenAPI Petstore + * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ + * + * The version of the OpenAPI document: 1.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + * + */ + +(function(root, factory) { + if (typeof define === 'function' && define.amd) { + // AMD. + define(['expect.js', process.cwd()+'/src/index'], factory); + } else if (typeof module === 'object' && module.exports) { + // CommonJS-like environments that support module.exports, like Node. + factory(require('expect.js'), require(process.cwd()+'/src/index')); + } else { + // Browser globals (root is window) + factory(root.expect, root.OpenApiPetstore); + } +}(this, function(expect, OpenApiPetstore) { + 'use strict'; + + var instance; + + beforeEach(function() { + instance = new OpenApiPetstore.FooGetDefaultResponse(); + }); + + var getProperty = function(object, getter, property) { + // Use getter method if present; otherwise, get the property directly. + if (typeof object[getter] === 'function') + return object[getter](); + else + return object[property]; + } + + var setProperty = function(object, setter, property, value) { + // Use setter method if present; otherwise, set the property directly. + if (typeof object[setter] === 'function') + object[setter](value); + else + object[property] = value; + } + + describe('FooGetDefaultResponse', function() { + it('should create an instance of FooGetDefaultResponse', function() { + // uncomment below and update the code to test FooGetDefaultResponse + //var instance = new OpenApiPetstore.FooGetDefaultResponse(); + //expect(instance).to.be.a(OpenApiPetstore.FooGetDefaultResponse); + }); + + it('should have the property string (base name: "string")', function() { + // uncomment below and update the code to test the property string + //var instance = new OpenApiPetstore.FooGetDefaultResponse(); + //expect(instance).to.be(); + }); + + }); + +})); diff --git a/samples/client/petstore/javascript-apollo/test/model/FormatTest.spec.js b/samples/client/petstore/javascript-apollo/test/model/FormatTest.spec.js new file mode 100644 index 000000000000..6506a39d85fd --- /dev/null +++ b/samples/client/petstore/javascript-apollo/test/model/FormatTest.spec.js @@ -0,0 +1,155 @@ +/** + * OpenAPI Petstore + * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ + * + * The version of the OpenAPI document: 1.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + * + */ + +(function(root, factory) { + if (typeof define === 'function' && define.amd) { + // AMD. + define(['expect.js', process.cwd()+'/src/index'], factory); + } else if (typeof module === 'object' && module.exports) { + // CommonJS-like environments that support module.exports, like Node. + factory(require('expect.js'), require(process.cwd()+'/src/index')); + } else { + // Browser globals (root is window) + factory(root.expect, root.OpenApiPetstore); + } +}(this, function(expect, OpenApiPetstore) { + 'use strict'; + + var instance; + + beforeEach(function() { + instance = new OpenApiPetstore.FormatTest(); + }); + + var getProperty = function(object, getter, property) { + // Use getter method if present; otherwise, get the property directly. + if (typeof object[getter] === 'function') + return object[getter](); + else + return object[property]; + } + + var setProperty = function(object, setter, property, value) { + // Use setter method if present; otherwise, set the property directly. + if (typeof object[setter] === 'function') + object[setter](value); + else + object[property] = value; + } + + describe('FormatTest', function() { + it('should create an instance of FormatTest', function() { + // uncomment below and update the code to test FormatTest + //var instance = new OpenApiPetstore.FormatTest(); + //expect(instance).to.be.a(OpenApiPetstore.FormatTest); + }); + + it('should have the property integer (base name: "integer")', function() { + // uncomment below and update the code to test the property integer + //var instance = new OpenApiPetstore.FormatTest(); + //expect(instance).to.be(); + }); + + it('should have the property int32 (base name: "int32")', function() { + // uncomment below and update the code to test the property int32 + //var instance = new OpenApiPetstore.FormatTest(); + //expect(instance).to.be(); + }); + + it('should have the property int64 (base name: "int64")', function() { + // uncomment below and update the code to test the property int64 + //var instance = new OpenApiPetstore.FormatTest(); + //expect(instance).to.be(); + }); + + it('should have the property number (base name: "number")', function() { + // uncomment below and update the code to test the property number + //var instance = new OpenApiPetstore.FormatTest(); + //expect(instance).to.be(); + }); + + it('should have the property _float (base name: "float")', function() { + // uncomment below and update the code to test the property _float + //var instance = new OpenApiPetstore.FormatTest(); + //expect(instance).to.be(); + }); + + it('should have the property _double (base name: "double")', function() { + // uncomment below and update the code to test the property _double + //var instance = new OpenApiPetstore.FormatTest(); + //expect(instance).to.be(); + }); + + it('should have the property decimal (base name: "decimal")', function() { + // uncomment below and update the code to test the property decimal + //var instance = new OpenApiPetstore.FormatTest(); + //expect(instance).to.be(); + }); + + it('should have the property string (base name: "string")', function() { + // uncomment below and update the code to test the property string + //var instance = new OpenApiPetstore.FormatTest(); + //expect(instance).to.be(); + }); + + it('should have the property _byte (base name: "byte")', function() { + // uncomment below and update the code to test the property _byte + //var instance = new OpenApiPetstore.FormatTest(); + //expect(instance).to.be(); + }); + + it('should have the property binary (base name: "binary")', function() { + // uncomment below and update the code to test the property binary + //var instance = new OpenApiPetstore.FormatTest(); + //expect(instance).to.be(); + }); + + it('should have the property date (base name: "date")', function() { + // uncomment below and update the code to test the property date + //var instance = new OpenApiPetstore.FormatTest(); + //expect(instance).to.be(); + }); + + it('should have the property dateTime (base name: "dateTime")', function() { + // uncomment below and update the code to test the property dateTime + //var instance = new OpenApiPetstore.FormatTest(); + //expect(instance).to.be(); + }); + + it('should have the property uuid (base name: "uuid")', function() { + // uncomment below and update the code to test the property uuid + //var instance = new OpenApiPetstore.FormatTest(); + //expect(instance).to.be(); + }); + + it('should have the property password (base name: "password")', function() { + // uncomment below and update the code to test the property password + //var instance = new OpenApiPetstore.FormatTest(); + //expect(instance).to.be(); + }); + + it('should have the property patternWithDigits (base name: "pattern_with_digits")', function() { + // uncomment below and update the code to test the property patternWithDigits + //var instance = new OpenApiPetstore.FormatTest(); + //expect(instance).to.be(); + }); + + it('should have the property patternWithDigitsAndDelimiter (base name: "pattern_with_digits_and_delimiter")', function() { + // uncomment below and update the code to test the property patternWithDigitsAndDelimiter + //var instance = new OpenApiPetstore.FormatTest(); + //expect(instance).to.be(); + }); + + }); + +})); diff --git a/samples/client/petstore/javascript-apollo/test/model/HasOnlyReadOnly.spec.js b/samples/client/petstore/javascript-apollo/test/model/HasOnlyReadOnly.spec.js new file mode 100644 index 000000000000..e9ba0be44fee --- /dev/null +++ b/samples/client/petstore/javascript-apollo/test/model/HasOnlyReadOnly.spec.js @@ -0,0 +1,71 @@ +/** + * OpenAPI Petstore + * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ + * + * The version of the OpenAPI document: 1.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + * + */ + +(function(root, factory) { + if (typeof define === 'function' && define.amd) { + // AMD. + define(['expect.js', process.cwd()+'/src/index'], factory); + } else if (typeof module === 'object' && module.exports) { + // CommonJS-like environments that support module.exports, like Node. + factory(require('expect.js'), require(process.cwd()+'/src/index')); + } else { + // Browser globals (root is window) + factory(root.expect, root.OpenApiPetstore); + } +}(this, function(expect, OpenApiPetstore) { + 'use strict'; + + var instance; + + beforeEach(function() { + instance = new OpenApiPetstore.HasOnlyReadOnly(); + }); + + var getProperty = function(object, getter, property) { + // Use getter method if present; otherwise, get the property directly. + if (typeof object[getter] === 'function') + return object[getter](); + else + return object[property]; + } + + var setProperty = function(object, setter, property, value) { + // Use setter method if present; otherwise, set the property directly. + if (typeof object[setter] === 'function') + object[setter](value); + else + object[property] = value; + } + + describe('HasOnlyReadOnly', function() { + it('should create an instance of HasOnlyReadOnly', function() { + // uncomment below and update the code to test HasOnlyReadOnly + //var instance = new OpenApiPetstore.HasOnlyReadOnly(); + //expect(instance).to.be.a(OpenApiPetstore.HasOnlyReadOnly); + }); + + it('should have the property bar (base name: "bar")', function() { + // uncomment below and update the code to test the property bar + //var instance = new OpenApiPetstore.HasOnlyReadOnly(); + //expect(instance).to.be(); + }); + + it('should have the property foo (base name: "foo")', function() { + // uncomment below and update the code to test the property foo + //var instance = new OpenApiPetstore.HasOnlyReadOnly(); + //expect(instance).to.be(); + }); + + }); + +})); diff --git a/samples/client/petstore/javascript-apollo/test/model/HealthCheckResult.spec.js b/samples/client/petstore/javascript-apollo/test/model/HealthCheckResult.spec.js new file mode 100644 index 000000000000..25d9ecd929f0 --- /dev/null +++ b/samples/client/petstore/javascript-apollo/test/model/HealthCheckResult.spec.js @@ -0,0 +1,65 @@ +/** + * OpenAPI Petstore + * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ + * + * The version of the OpenAPI document: 1.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + * + */ + +(function(root, factory) { + if (typeof define === 'function' && define.amd) { + // AMD. + define(['expect.js', process.cwd()+'/src/index'], factory); + } else if (typeof module === 'object' && module.exports) { + // CommonJS-like environments that support module.exports, like Node. + factory(require('expect.js'), require(process.cwd()+'/src/index')); + } else { + // Browser globals (root is window) + factory(root.expect, root.OpenApiPetstore); + } +}(this, function(expect, OpenApiPetstore) { + 'use strict'; + + var instance; + + beforeEach(function() { + instance = new OpenApiPetstore.HealthCheckResult(); + }); + + var getProperty = function(object, getter, property) { + // Use getter method if present; otherwise, get the property directly. + if (typeof object[getter] === 'function') + return object[getter](); + else + return object[property]; + } + + var setProperty = function(object, setter, property, value) { + // Use setter method if present; otherwise, set the property directly. + if (typeof object[setter] === 'function') + object[setter](value); + else + object[property] = value; + } + + describe('HealthCheckResult', function() { + it('should create an instance of HealthCheckResult', function() { + // uncomment below and update the code to test HealthCheckResult + //var instance = new OpenApiPetstore.HealthCheckResult(); + //expect(instance).to.be.a(OpenApiPetstore.HealthCheckResult); + }); + + it('should have the property nullableMessage (base name: "NullableMessage")', function() { + // uncomment below and update the code to test the property nullableMessage + //var instance = new OpenApiPetstore.HealthCheckResult(); + //expect(instance).to.be(); + }); + + }); + +})); diff --git a/samples/client/petstore/javascript-apollo/test/model/List.spec.js b/samples/client/petstore/javascript-apollo/test/model/List.spec.js new file mode 100644 index 000000000000..675aa82c185c --- /dev/null +++ b/samples/client/petstore/javascript-apollo/test/model/List.spec.js @@ -0,0 +1,65 @@ +/** + * OpenAPI Petstore + * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ + * + * The version of the OpenAPI document: 1.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + * + */ + +(function(root, factory) { + if (typeof define === 'function' && define.amd) { + // AMD. + define(['expect.js', process.cwd()+'/src/index'], factory); + } else if (typeof module === 'object' && module.exports) { + // CommonJS-like environments that support module.exports, like Node. + factory(require('expect.js'), require(process.cwd()+'/src/index')); + } else { + // Browser globals (root is window) + factory(root.expect, root.OpenApiPetstore); + } +}(this, function(expect, OpenApiPetstore) { + 'use strict'; + + var instance; + + beforeEach(function() { + instance = new OpenApiPetstore.List(); + }); + + var getProperty = function(object, getter, property) { + // Use getter method if present; otherwise, get the property directly. + if (typeof object[getter] === 'function') + return object[getter](); + else + return object[property]; + } + + var setProperty = function(object, setter, property, value) { + // Use setter method if present; otherwise, set the property directly. + if (typeof object[setter] === 'function') + object[setter](value); + else + object[property] = value; + } + + describe('List', function() { + it('should create an instance of List', function() { + // uncomment below and update the code to test List + //var instance = new OpenApiPetstore.List(); + //expect(instance).to.be.a(OpenApiPetstore.List); + }); + + it('should have the property _123list (base name: "123-list")', function() { + // uncomment below and update the code to test the property _123list + //var instance = new OpenApiPetstore.List(); + //expect(instance).to.be(); + }); + + }); + +})); diff --git a/samples/client/petstore/javascript-apollo/test/model/MapTest.spec.js b/samples/client/petstore/javascript-apollo/test/model/MapTest.spec.js new file mode 100644 index 000000000000..4e7dabcc2137 --- /dev/null +++ b/samples/client/petstore/javascript-apollo/test/model/MapTest.spec.js @@ -0,0 +1,83 @@ +/** + * OpenAPI Petstore + * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ + * + * The version of the OpenAPI document: 1.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + * + */ + +(function(root, factory) { + if (typeof define === 'function' && define.amd) { + // AMD. + define(['expect.js', process.cwd()+'/src/index'], factory); + } else if (typeof module === 'object' && module.exports) { + // CommonJS-like environments that support module.exports, like Node. + factory(require('expect.js'), require(process.cwd()+'/src/index')); + } else { + // Browser globals (root is window) + factory(root.expect, root.OpenApiPetstore); + } +}(this, function(expect, OpenApiPetstore) { + 'use strict'; + + var instance; + + beforeEach(function() { + instance = new OpenApiPetstore.MapTest(); + }); + + var getProperty = function(object, getter, property) { + // Use getter method if present; otherwise, get the property directly. + if (typeof object[getter] === 'function') + return object[getter](); + else + return object[property]; + } + + var setProperty = function(object, setter, property, value) { + // Use setter method if present; otherwise, set the property directly. + if (typeof object[setter] === 'function') + object[setter](value); + else + object[property] = value; + } + + describe('MapTest', function() { + it('should create an instance of MapTest', function() { + // uncomment below and update the code to test MapTest + //var instance = new OpenApiPetstore.MapTest(); + //expect(instance).to.be.a(OpenApiPetstore.MapTest); + }); + + it('should have the property mapMapOfString (base name: "map_map_of_string")', function() { + // uncomment below and update the code to test the property mapMapOfString + //var instance = new OpenApiPetstore.MapTest(); + //expect(instance).to.be(); + }); + + it('should have the property mapOfEnumString (base name: "map_of_enum_string")', function() { + // uncomment below and update the code to test the property mapOfEnumString + //var instance = new OpenApiPetstore.MapTest(); + //expect(instance).to.be(); + }); + + it('should have the property directMap (base name: "direct_map")', function() { + // uncomment below and update the code to test the property directMap + //var instance = new OpenApiPetstore.MapTest(); + //expect(instance).to.be(); + }); + + it('should have the property indirectMap (base name: "indirect_map")', function() { + // uncomment below and update the code to test the property indirectMap + //var instance = new OpenApiPetstore.MapTest(); + //expect(instance).to.be(); + }); + + }); + +})); diff --git a/samples/client/petstore/javascript-apollo/test/model/MixedPropertiesAndAdditionalPropertiesClass.spec.js b/samples/client/petstore/javascript-apollo/test/model/MixedPropertiesAndAdditionalPropertiesClass.spec.js new file mode 100644 index 000000000000..2e72316a90a2 --- /dev/null +++ b/samples/client/petstore/javascript-apollo/test/model/MixedPropertiesAndAdditionalPropertiesClass.spec.js @@ -0,0 +1,77 @@ +/** + * OpenAPI Petstore + * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ + * + * The version of the OpenAPI document: 1.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + * + */ + +(function(root, factory) { + if (typeof define === 'function' && define.amd) { + // AMD. + define(['expect.js', process.cwd()+'/src/index'], factory); + } else if (typeof module === 'object' && module.exports) { + // CommonJS-like environments that support module.exports, like Node. + factory(require('expect.js'), require(process.cwd()+'/src/index')); + } else { + // Browser globals (root is window) + factory(root.expect, root.OpenApiPetstore); + } +}(this, function(expect, OpenApiPetstore) { + 'use strict'; + + var instance; + + beforeEach(function() { + instance = new OpenApiPetstore.MixedPropertiesAndAdditionalPropertiesClass(); + }); + + var getProperty = function(object, getter, property) { + // Use getter method if present; otherwise, get the property directly. + if (typeof object[getter] === 'function') + return object[getter](); + else + return object[property]; + } + + var setProperty = function(object, setter, property, value) { + // Use setter method if present; otherwise, set the property directly. + if (typeof object[setter] === 'function') + object[setter](value); + else + object[property] = value; + } + + describe('MixedPropertiesAndAdditionalPropertiesClass', function() { + it('should create an instance of MixedPropertiesAndAdditionalPropertiesClass', function() { + // uncomment below and update the code to test MixedPropertiesAndAdditionalPropertiesClass + //var instance = new OpenApiPetstore.MixedPropertiesAndAdditionalPropertiesClass(); + //expect(instance).to.be.a(OpenApiPetstore.MixedPropertiesAndAdditionalPropertiesClass); + }); + + it('should have the property uuid (base name: "uuid")', function() { + // uncomment below and update the code to test the property uuid + //var instance = new OpenApiPetstore.MixedPropertiesAndAdditionalPropertiesClass(); + //expect(instance).to.be(); + }); + + it('should have the property dateTime (base name: "dateTime")', function() { + // uncomment below and update the code to test the property dateTime + //var instance = new OpenApiPetstore.MixedPropertiesAndAdditionalPropertiesClass(); + //expect(instance).to.be(); + }); + + it('should have the property map (base name: "map")', function() { + // uncomment below and update the code to test the property map + //var instance = new OpenApiPetstore.MixedPropertiesAndAdditionalPropertiesClass(); + //expect(instance).to.be(); + }); + + }); + +})); diff --git a/samples/client/petstore/javascript-apollo/test/model/Model200Response.spec.js b/samples/client/petstore/javascript-apollo/test/model/Model200Response.spec.js new file mode 100644 index 000000000000..7cd4da5e51e2 --- /dev/null +++ b/samples/client/petstore/javascript-apollo/test/model/Model200Response.spec.js @@ -0,0 +1,71 @@ +/** + * OpenAPI Petstore + * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ + * + * The version of the OpenAPI document: 1.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + * + */ + +(function(root, factory) { + if (typeof define === 'function' && define.amd) { + // AMD. + define(['expect.js', process.cwd()+'/src/index'], factory); + } else if (typeof module === 'object' && module.exports) { + // CommonJS-like environments that support module.exports, like Node. + factory(require('expect.js'), require(process.cwd()+'/src/index')); + } else { + // Browser globals (root is window) + factory(root.expect, root.OpenApiPetstore); + } +}(this, function(expect, OpenApiPetstore) { + 'use strict'; + + var instance; + + beforeEach(function() { + instance = new OpenApiPetstore.Model200Response(); + }); + + var getProperty = function(object, getter, property) { + // Use getter method if present; otherwise, get the property directly. + if (typeof object[getter] === 'function') + return object[getter](); + else + return object[property]; + } + + var setProperty = function(object, setter, property, value) { + // Use setter method if present; otherwise, set the property directly. + if (typeof object[setter] === 'function') + object[setter](value); + else + object[property] = value; + } + + describe('Model200Response', function() { + it('should create an instance of Model200Response', function() { + // uncomment below and update the code to test Model200Response + //var instance = new OpenApiPetstore.Model200Response(); + //expect(instance).to.be.a(OpenApiPetstore.Model200Response); + }); + + it('should have the property name (base name: "name")', function() { + // uncomment below and update the code to test the property name + //var instance = new OpenApiPetstore.Model200Response(); + //expect(instance).to.be(); + }); + + it('should have the property _class (base name: "class")', function() { + // uncomment below and update the code to test the property _class + //var instance = new OpenApiPetstore.Model200Response(); + //expect(instance).to.be(); + }); + + }); + +})); diff --git a/samples/client/petstore/javascript-apollo/test/model/Name.spec.js b/samples/client/petstore/javascript-apollo/test/model/Name.spec.js new file mode 100644 index 000000000000..a88057711f2b --- /dev/null +++ b/samples/client/petstore/javascript-apollo/test/model/Name.spec.js @@ -0,0 +1,83 @@ +/** + * OpenAPI Petstore + * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ + * + * The version of the OpenAPI document: 1.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + * + */ + +(function(root, factory) { + if (typeof define === 'function' && define.amd) { + // AMD. + define(['expect.js', process.cwd()+'/src/index'], factory); + } else if (typeof module === 'object' && module.exports) { + // CommonJS-like environments that support module.exports, like Node. + factory(require('expect.js'), require(process.cwd()+'/src/index')); + } else { + // Browser globals (root is window) + factory(root.expect, root.OpenApiPetstore); + } +}(this, function(expect, OpenApiPetstore) { + 'use strict'; + + var instance; + + beforeEach(function() { + instance = new OpenApiPetstore.Name(); + }); + + var getProperty = function(object, getter, property) { + // Use getter method if present; otherwise, get the property directly. + if (typeof object[getter] === 'function') + return object[getter](); + else + return object[property]; + } + + var setProperty = function(object, setter, property, value) { + // Use setter method if present; otherwise, set the property directly. + if (typeof object[setter] === 'function') + object[setter](value); + else + object[property] = value; + } + + describe('Name', function() { + it('should create an instance of Name', function() { + // uncomment below and update the code to test Name + //var instance = new OpenApiPetstore.Name(); + //expect(instance).to.be.a(OpenApiPetstore.Name); + }); + + it('should have the property name (base name: "name")', function() { + // uncomment below and update the code to test the property name + //var instance = new OpenApiPetstore.Name(); + //expect(instance).to.be(); + }); + + it('should have the property snakeCase (base name: "snake_case")', function() { + // uncomment below and update the code to test the property snakeCase + //var instance = new OpenApiPetstore.Name(); + //expect(instance).to.be(); + }); + + it('should have the property property (base name: "property")', function() { + // uncomment below and update the code to test the property property + //var instance = new OpenApiPetstore.Name(); + //expect(instance).to.be(); + }); + + it('should have the property _123number (base name: "123Number")', function() { + // uncomment below and update the code to test the property _123number + //var instance = new OpenApiPetstore.Name(); + //expect(instance).to.be(); + }); + + }); + +})); diff --git a/samples/client/petstore/javascript-apollo/test/model/NullableClass.spec.js b/samples/client/petstore/javascript-apollo/test/model/NullableClass.spec.js new file mode 100644 index 000000000000..602a172777f0 --- /dev/null +++ b/samples/client/petstore/javascript-apollo/test/model/NullableClass.spec.js @@ -0,0 +1,131 @@ +/** + * OpenAPI Petstore + * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ + * + * The version of the OpenAPI document: 1.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + * + */ + +(function(root, factory) { + if (typeof define === 'function' && define.amd) { + // AMD. + define(['expect.js', process.cwd()+'/src/index'], factory); + } else if (typeof module === 'object' && module.exports) { + // CommonJS-like environments that support module.exports, like Node. + factory(require('expect.js'), require(process.cwd()+'/src/index')); + } else { + // Browser globals (root is window) + factory(root.expect, root.OpenApiPetstore); + } +}(this, function(expect, OpenApiPetstore) { + 'use strict'; + + var instance; + + beforeEach(function() { + instance = new OpenApiPetstore.NullableClass(); + }); + + var getProperty = function(object, getter, property) { + // Use getter method if present; otherwise, get the property directly. + if (typeof object[getter] === 'function') + return object[getter](); + else + return object[property]; + } + + var setProperty = function(object, setter, property, value) { + // Use setter method if present; otherwise, set the property directly. + if (typeof object[setter] === 'function') + object[setter](value); + else + object[property] = value; + } + + describe('NullableClass', function() { + it('should create an instance of NullableClass', function() { + // uncomment below and update the code to test NullableClass + //var instance = new OpenApiPetstore.NullableClass(); + //expect(instance).to.be.a(OpenApiPetstore.NullableClass); + }); + + it('should have the property integerProp (base name: "integer_prop")', function() { + // uncomment below and update the code to test the property integerProp + //var instance = new OpenApiPetstore.NullableClass(); + //expect(instance).to.be(); + }); + + it('should have the property numberProp (base name: "number_prop")', function() { + // uncomment below and update the code to test the property numberProp + //var instance = new OpenApiPetstore.NullableClass(); + //expect(instance).to.be(); + }); + + it('should have the property booleanProp (base name: "boolean_prop")', function() { + // uncomment below and update the code to test the property booleanProp + //var instance = new OpenApiPetstore.NullableClass(); + //expect(instance).to.be(); + }); + + it('should have the property stringProp (base name: "string_prop")', function() { + // uncomment below and update the code to test the property stringProp + //var instance = new OpenApiPetstore.NullableClass(); + //expect(instance).to.be(); + }); + + it('should have the property dateProp (base name: "date_prop")', function() { + // uncomment below and update the code to test the property dateProp + //var instance = new OpenApiPetstore.NullableClass(); + //expect(instance).to.be(); + }); + + it('should have the property datetimeProp (base name: "datetime_prop")', function() { + // uncomment below and update the code to test the property datetimeProp + //var instance = new OpenApiPetstore.NullableClass(); + //expect(instance).to.be(); + }); + + it('should have the property arrayNullableProp (base name: "array_nullable_prop")', function() { + // uncomment below and update the code to test the property arrayNullableProp + //var instance = new OpenApiPetstore.NullableClass(); + //expect(instance).to.be(); + }); + + it('should have the property arrayAndItemsNullableProp (base name: "array_and_items_nullable_prop")', function() { + // uncomment below and update the code to test the property arrayAndItemsNullableProp + //var instance = new OpenApiPetstore.NullableClass(); + //expect(instance).to.be(); + }); + + it('should have the property arrayItemsNullable (base name: "array_items_nullable")', function() { + // uncomment below and update the code to test the property arrayItemsNullable + //var instance = new OpenApiPetstore.NullableClass(); + //expect(instance).to.be(); + }); + + it('should have the property objectNullableProp (base name: "object_nullable_prop")', function() { + // uncomment below and update the code to test the property objectNullableProp + //var instance = new OpenApiPetstore.NullableClass(); + //expect(instance).to.be(); + }); + + it('should have the property objectAndItemsNullableProp (base name: "object_and_items_nullable_prop")', function() { + // uncomment below and update the code to test the property objectAndItemsNullableProp + //var instance = new OpenApiPetstore.NullableClass(); + //expect(instance).to.be(); + }); + + it('should have the property objectItemsNullable (base name: "object_items_nullable")', function() { + // uncomment below and update the code to test the property objectItemsNullable + //var instance = new OpenApiPetstore.NullableClass(); + //expect(instance).to.be(); + }); + + }); + +})); diff --git a/samples/client/petstore/javascript-apollo/test/model/NumberOnly.spec.js b/samples/client/petstore/javascript-apollo/test/model/NumberOnly.spec.js new file mode 100644 index 000000000000..a39e26134eda --- /dev/null +++ b/samples/client/petstore/javascript-apollo/test/model/NumberOnly.spec.js @@ -0,0 +1,65 @@ +/** + * OpenAPI Petstore + * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ + * + * The version of the OpenAPI document: 1.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + * + */ + +(function(root, factory) { + if (typeof define === 'function' && define.amd) { + // AMD. + define(['expect.js', process.cwd()+'/src/index'], factory); + } else if (typeof module === 'object' && module.exports) { + // CommonJS-like environments that support module.exports, like Node. + factory(require('expect.js'), require(process.cwd()+'/src/index')); + } else { + // Browser globals (root is window) + factory(root.expect, root.OpenApiPetstore); + } +}(this, function(expect, OpenApiPetstore) { + 'use strict'; + + var instance; + + beforeEach(function() { + instance = new OpenApiPetstore.NumberOnly(); + }); + + var getProperty = function(object, getter, property) { + // Use getter method if present; otherwise, get the property directly. + if (typeof object[getter] === 'function') + return object[getter](); + else + return object[property]; + } + + var setProperty = function(object, setter, property, value) { + // Use setter method if present; otherwise, set the property directly. + if (typeof object[setter] === 'function') + object[setter](value); + else + object[property] = value; + } + + describe('NumberOnly', function() { + it('should create an instance of NumberOnly', function() { + // uncomment below and update the code to test NumberOnly + //var instance = new OpenApiPetstore.NumberOnly(); + //expect(instance).to.be.a(OpenApiPetstore.NumberOnly); + }); + + it('should have the property justNumber (base name: "JustNumber")', function() { + // uncomment below and update the code to test the property justNumber + //var instance = new OpenApiPetstore.NumberOnly(); + //expect(instance).to.be(); + }); + + }); + +})); diff --git a/samples/client/petstore/javascript-apollo/test/model/ObjectWithDeprecatedFields.spec.js b/samples/client/petstore/javascript-apollo/test/model/ObjectWithDeprecatedFields.spec.js new file mode 100644 index 000000000000..b190adcca3fd --- /dev/null +++ b/samples/client/petstore/javascript-apollo/test/model/ObjectWithDeprecatedFields.spec.js @@ -0,0 +1,83 @@ +/** + * OpenAPI Petstore + * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ + * + * The version of the OpenAPI document: 1.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + * + */ + +(function(root, factory) { + if (typeof define === 'function' && define.amd) { + // AMD. + define(['expect.js', process.cwd()+'/src/index'], factory); + } else if (typeof module === 'object' && module.exports) { + // CommonJS-like environments that support module.exports, like Node. + factory(require('expect.js'), require(process.cwd()+'/src/index')); + } else { + // Browser globals (root is window) + factory(root.expect, root.OpenApiPetstore); + } +}(this, function(expect, OpenApiPetstore) { + 'use strict'; + + var instance; + + beforeEach(function() { + instance = new OpenApiPetstore.ObjectWithDeprecatedFields(); + }); + + var getProperty = function(object, getter, property) { + // Use getter method if present; otherwise, get the property directly. + if (typeof object[getter] === 'function') + return object[getter](); + else + return object[property]; + } + + var setProperty = function(object, setter, property, value) { + // Use setter method if present; otherwise, set the property directly. + if (typeof object[setter] === 'function') + object[setter](value); + else + object[property] = value; + } + + describe('ObjectWithDeprecatedFields', function() { + it('should create an instance of ObjectWithDeprecatedFields', function() { + // uncomment below and update the code to test ObjectWithDeprecatedFields + //var instance = new OpenApiPetstore.ObjectWithDeprecatedFields(); + //expect(instance).to.be.a(OpenApiPetstore.ObjectWithDeprecatedFields); + }); + + it('should have the property uuid (base name: "uuid")', function() { + // uncomment below and update the code to test the property uuid + //var instance = new OpenApiPetstore.ObjectWithDeprecatedFields(); + //expect(instance).to.be(); + }); + + it('should have the property id (base name: "id")', function() { + // uncomment below and update the code to test the property id + //var instance = new OpenApiPetstore.ObjectWithDeprecatedFields(); + //expect(instance).to.be(); + }); + + it('should have the property deprecatedRef (base name: "deprecatedRef")', function() { + // uncomment below and update the code to test the property deprecatedRef + //var instance = new OpenApiPetstore.ObjectWithDeprecatedFields(); + //expect(instance).to.be(); + }); + + it('should have the property bars (base name: "bars")', function() { + // uncomment below and update the code to test the property bars + //var instance = new OpenApiPetstore.ObjectWithDeprecatedFields(); + //expect(instance).to.be(); + }); + + }); + +})); diff --git a/samples/client/petstore/javascript-apollo/test/model/OuterComposite.spec.js b/samples/client/petstore/javascript-apollo/test/model/OuterComposite.spec.js new file mode 100644 index 000000000000..1ef9599b2dc6 --- /dev/null +++ b/samples/client/petstore/javascript-apollo/test/model/OuterComposite.spec.js @@ -0,0 +1,77 @@ +/** + * OpenAPI Petstore + * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ + * + * The version of the OpenAPI document: 1.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + * + */ + +(function(root, factory) { + if (typeof define === 'function' && define.amd) { + // AMD. + define(['expect.js', process.cwd()+'/src/index'], factory); + } else if (typeof module === 'object' && module.exports) { + // CommonJS-like environments that support module.exports, like Node. + factory(require('expect.js'), require(process.cwd()+'/src/index')); + } else { + // Browser globals (root is window) + factory(root.expect, root.OpenApiPetstore); + } +}(this, function(expect, OpenApiPetstore) { + 'use strict'; + + var instance; + + beforeEach(function() { + instance = new OpenApiPetstore.OuterComposite(); + }); + + var getProperty = function(object, getter, property) { + // Use getter method if present; otherwise, get the property directly. + if (typeof object[getter] === 'function') + return object[getter](); + else + return object[property]; + } + + var setProperty = function(object, setter, property, value) { + // Use setter method if present; otherwise, set the property directly. + if (typeof object[setter] === 'function') + object[setter](value); + else + object[property] = value; + } + + describe('OuterComposite', function() { + it('should create an instance of OuterComposite', function() { + // uncomment below and update the code to test OuterComposite + //var instance = new OpenApiPetstore.OuterComposite(); + //expect(instance).to.be.a(OpenApiPetstore.OuterComposite); + }); + + it('should have the property myNumber (base name: "my_number")', function() { + // uncomment below and update the code to test the property myNumber + //var instance = new OpenApiPetstore.OuterComposite(); + //expect(instance).to.be(); + }); + + it('should have the property myString (base name: "my_string")', function() { + // uncomment below and update the code to test the property myString + //var instance = new OpenApiPetstore.OuterComposite(); + //expect(instance).to.be(); + }); + + it('should have the property myBoolean (base name: "my_boolean")', function() { + // uncomment below and update the code to test the property myBoolean + //var instance = new OpenApiPetstore.OuterComposite(); + //expect(instance).to.be(); + }); + + }); + +})); diff --git a/samples/client/petstore/javascript-apollo/test/model/OuterEnum.spec.js b/samples/client/petstore/javascript-apollo/test/model/OuterEnum.spec.js new file mode 100644 index 000000000000..16e8d6147932 --- /dev/null +++ b/samples/client/petstore/javascript-apollo/test/model/OuterEnum.spec.js @@ -0,0 +1,58 @@ +/** + * OpenAPI Petstore + * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ + * + * The version of the OpenAPI document: 1.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + * + */ + +(function(root, factory) { + if (typeof define === 'function' && define.amd) { + // AMD. + define(['expect.js', process.cwd()+'/src/index'], factory); + } else if (typeof module === 'object' && module.exports) { + // CommonJS-like environments that support module.exports, like Node. + factory(require('expect.js'), require(process.cwd()+'/src/index')); + } else { + // Browser globals (root is window) + factory(root.expect, root.OpenApiPetstore); + } +}(this, function(expect, OpenApiPetstore) { + 'use strict'; + + var instance; + + beforeEach(function() { + }); + + var getProperty = function(object, getter, property) { + // Use getter method if present; otherwise, get the property directly. + if (typeof object[getter] === 'function') + return object[getter](); + else + return object[property]; + } + + var setProperty = function(object, setter, property, value) { + // Use setter method if present; otherwise, set the property directly. + if (typeof object[setter] === 'function') + object[setter](value); + else + object[property] = value; + } + + describe('OuterEnum', function() { + it('should create an instance of OuterEnum', function() { + // uncomment below and update the code to test OuterEnum + //var instance = new OpenApiPetstore.OuterEnum(); + //expect(instance).to.be.a(OpenApiPetstore.OuterEnum); + }); + + }); + +})); diff --git a/samples/client/petstore/javascript-apollo/test/model/OuterEnumDefaultValue.spec.js b/samples/client/petstore/javascript-apollo/test/model/OuterEnumDefaultValue.spec.js new file mode 100644 index 000000000000..213f8de637ff --- /dev/null +++ b/samples/client/petstore/javascript-apollo/test/model/OuterEnumDefaultValue.spec.js @@ -0,0 +1,58 @@ +/** + * OpenAPI Petstore + * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ + * + * The version of the OpenAPI document: 1.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + * + */ + +(function(root, factory) { + if (typeof define === 'function' && define.amd) { + // AMD. + define(['expect.js', process.cwd()+'/src/index'], factory); + } else if (typeof module === 'object' && module.exports) { + // CommonJS-like environments that support module.exports, like Node. + factory(require('expect.js'), require(process.cwd()+'/src/index')); + } else { + // Browser globals (root is window) + factory(root.expect, root.OpenApiPetstore); + } +}(this, function(expect, OpenApiPetstore) { + 'use strict'; + + var instance; + + beforeEach(function() { + }); + + var getProperty = function(object, getter, property) { + // Use getter method if present; otherwise, get the property directly. + if (typeof object[getter] === 'function') + return object[getter](); + else + return object[property]; + } + + var setProperty = function(object, setter, property, value) { + // Use setter method if present; otherwise, set the property directly. + if (typeof object[setter] === 'function') + object[setter](value); + else + object[property] = value; + } + + describe('OuterEnumDefaultValue', function() { + it('should create an instance of OuterEnumDefaultValue', function() { + // uncomment below and update the code to test OuterEnumDefaultValue + //var instance = new OpenApiPetstore.OuterEnumDefaultValue(); + //expect(instance).to.be.a(OpenApiPetstore.OuterEnumDefaultValue); + }); + + }); + +})); diff --git a/samples/client/petstore/javascript-apollo/test/model/OuterEnumInteger.spec.js b/samples/client/petstore/javascript-apollo/test/model/OuterEnumInteger.spec.js new file mode 100644 index 000000000000..50c8b78c5f73 --- /dev/null +++ b/samples/client/petstore/javascript-apollo/test/model/OuterEnumInteger.spec.js @@ -0,0 +1,58 @@ +/** + * OpenAPI Petstore + * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ + * + * The version of the OpenAPI document: 1.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + * + */ + +(function(root, factory) { + if (typeof define === 'function' && define.amd) { + // AMD. + define(['expect.js', process.cwd()+'/src/index'], factory); + } else if (typeof module === 'object' && module.exports) { + // CommonJS-like environments that support module.exports, like Node. + factory(require('expect.js'), require(process.cwd()+'/src/index')); + } else { + // Browser globals (root is window) + factory(root.expect, root.OpenApiPetstore); + } +}(this, function(expect, OpenApiPetstore) { + 'use strict'; + + var instance; + + beforeEach(function() { + }); + + var getProperty = function(object, getter, property) { + // Use getter method if present; otherwise, get the property directly. + if (typeof object[getter] === 'function') + return object[getter](); + else + return object[property]; + } + + var setProperty = function(object, setter, property, value) { + // Use setter method if present; otherwise, set the property directly. + if (typeof object[setter] === 'function') + object[setter](value); + else + object[property] = value; + } + + describe('OuterEnumInteger', function() { + it('should create an instance of OuterEnumInteger', function() { + // uncomment below and update the code to test OuterEnumInteger + //var instance = new OpenApiPetstore.OuterEnumInteger(); + //expect(instance).to.be.a(OpenApiPetstore.OuterEnumInteger); + }); + + }); + +})); diff --git a/samples/client/petstore/javascript-apollo/test/model/OuterEnumIntegerDefaultValue.spec.js b/samples/client/petstore/javascript-apollo/test/model/OuterEnumIntegerDefaultValue.spec.js new file mode 100644 index 000000000000..af3dab311961 --- /dev/null +++ b/samples/client/petstore/javascript-apollo/test/model/OuterEnumIntegerDefaultValue.spec.js @@ -0,0 +1,58 @@ +/** + * OpenAPI Petstore + * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ + * + * The version of the OpenAPI document: 1.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + * + */ + +(function(root, factory) { + if (typeof define === 'function' && define.amd) { + // AMD. + define(['expect.js', process.cwd()+'/src/index'], factory); + } else if (typeof module === 'object' && module.exports) { + // CommonJS-like environments that support module.exports, like Node. + factory(require('expect.js'), require(process.cwd()+'/src/index')); + } else { + // Browser globals (root is window) + factory(root.expect, root.OpenApiPetstore); + } +}(this, function(expect, OpenApiPetstore) { + 'use strict'; + + var instance; + + beforeEach(function() { + }); + + var getProperty = function(object, getter, property) { + // Use getter method if present; otherwise, get the property directly. + if (typeof object[getter] === 'function') + return object[getter](); + else + return object[property]; + } + + var setProperty = function(object, setter, property, value) { + // Use setter method if present; otherwise, set the property directly. + if (typeof object[setter] === 'function') + object[setter](value); + else + object[property] = value; + } + + describe('OuterEnumIntegerDefaultValue', function() { + it('should create an instance of OuterEnumIntegerDefaultValue', function() { + // uncomment below and update the code to test OuterEnumIntegerDefaultValue + //var instance = new OpenApiPetstore.OuterEnumIntegerDefaultValue(); + //expect(instance).to.be.a(OpenApiPetstore.OuterEnumIntegerDefaultValue); + }); + + }); + +})); diff --git a/samples/client/petstore/javascript-apollo/test/model/OuterObjectWithEnumProperty.spec.js b/samples/client/petstore/javascript-apollo/test/model/OuterObjectWithEnumProperty.spec.js new file mode 100644 index 000000000000..9f7afbfd3977 --- /dev/null +++ b/samples/client/petstore/javascript-apollo/test/model/OuterObjectWithEnumProperty.spec.js @@ -0,0 +1,65 @@ +/** + * OpenAPI Petstore + * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ + * + * The version of the OpenAPI document: 1.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + * + */ + +(function(root, factory) { + if (typeof define === 'function' && define.amd) { + // AMD. + define(['expect.js', process.cwd()+'/src/index'], factory); + } else if (typeof module === 'object' && module.exports) { + // CommonJS-like environments that support module.exports, like Node. + factory(require('expect.js'), require(process.cwd()+'/src/index')); + } else { + // Browser globals (root is window) + factory(root.expect, root.OpenApiPetstore); + } +}(this, function(expect, OpenApiPetstore) { + 'use strict'; + + var instance; + + beforeEach(function() { + instance = new OpenApiPetstore.OuterObjectWithEnumProperty(); + }); + + var getProperty = function(object, getter, property) { + // Use getter method if present; otherwise, get the property directly. + if (typeof object[getter] === 'function') + return object[getter](); + else + return object[property]; + } + + var setProperty = function(object, setter, property, value) { + // Use setter method if present; otherwise, set the property directly. + if (typeof object[setter] === 'function') + object[setter](value); + else + object[property] = value; + } + + describe('OuterObjectWithEnumProperty', function() { + it('should create an instance of OuterObjectWithEnumProperty', function() { + // uncomment below and update the code to test OuterObjectWithEnumProperty + //var instance = new OpenApiPetstore.OuterObjectWithEnumProperty(); + //expect(instance).to.be.a(OpenApiPetstore.OuterObjectWithEnumProperty); + }); + + it('should have the property value (base name: "value")', function() { + // uncomment below and update the code to test the property value + //var instance = new OpenApiPetstore.OuterObjectWithEnumProperty(); + //expect(instance).to.be(); + }); + + }); + +})); diff --git a/samples/client/petstore/javascript-apollo/test/model/ReadOnlyFirst.spec.js b/samples/client/petstore/javascript-apollo/test/model/ReadOnlyFirst.spec.js new file mode 100644 index 000000000000..a9be118d2f2d --- /dev/null +++ b/samples/client/petstore/javascript-apollo/test/model/ReadOnlyFirst.spec.js @@ -0,0 +1,71 @@ +/** + * OpenAPI Petstore + * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ + * + * The version of the OpenAPI document: 1.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + * + */ + +(function(root, factory) { + if (typeof define === 'function' && define.amd) { + // AMD. + define(['expect.js', process.cwd()+'/src/index'], factory); + } else if (typeof module === 'object' && module.exports) { + // CommonJS-like environments that support module.exports, like Node. + factory(require('expect.js'), require(process.cwd()+'/src/index')); + } else { + // Browser globals (root is window) + factory(root.expect, root.OpenApiPetstore); + } +}(this, function(expect, OpenApiPetstore) { + 'use strict'; + + var instance; + + beforeEach(function() { + instance = new OpenApiPetstore.ReadOnlyFirst(); + }); + + var getProperty = function(object, getter, property) { + // Use getter method if present; otherwise, get the property directly. + if (typeof object[getter] === 'function') + return object[getter](); + else + return object[property]; + } + + var setProperty = function(object, setter, property, value) { + // Use setter method if present; otherwise, set the property directly. + if (typeof object[setter] === 'function') + object[setter](value); + else + object[property] = value; + } + + describe('ReadOnlyFirst', function() { + it('should create an instance of ReadOnlyFirst', function() { + // uncomment below and update the code to test ReadOnlyFirst + //var instance = new OpenApiPetstore.ReadOnlyFirst(); + //expect(instance).to.be.a(OpenApiPetstore.ReadOnlyFirst); + }); + + it('should have the property bar (base name: "bar")', function() { + // uncomment below and update the code to test the property bar + //var instance = new OpenApiPetstore.ReadOnlyFirst(); + //expect(instance).to.be(); + }); + + it('should have the property baz (base name: "baz")', function() { + // uncomment below and update the code to test the property baz + //var instance = new OpenApiPetstore.ReadOnlyFirst(); + //expect(instance).to.be(); + }); + + }); + +})); diff --git a/samples/client/petstore/javascript-apollo/test/model/Return.spec.js b/samples/client/petstore/javascript-apollo/test/model/Return.spec.js new file mode 100644 index 000000000000..75aae37c745d --- /dev/null +++ b/samples/client/petstore/javascript-apollo/test/model/Return.spec.js @@ -0,0 +1,65 @@ +/** + * OpenAPI Petstore + * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ + * + * The version of the OpenAPI document: 1.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + * + */ + +(function(root, factory) { + if (typeof define === 'function' && define.amd) { + // AMD. + define(['expect.js', process.cwd()+'/src/index'], factory); + } else if (typeof module === 'object' && module.exports) { + // CommonJS-like environments that support module.exports, like Node. + factory(require('expect.js'), require(process.cwd()+'/src/index')); + } else { + // Browser globals (root is window) + factory(root.expect, root.OpenApiPetstore); + } +}(this, function(expect, OpenApiPetstore) { + 'use strict'; + + var instance; + + beforeEach(function() { + instance = new OpenApiPetstore.Return(); + }); + + var getProperty = function(object, getter, property) { + // Use getter method if present; otherwise, get the property directly. + if (typeof object[getter] === 'function') + return object[getter](); + else + return object[property]; + } + + var setProperty = function(object, setter, property, value) { + // Use setter method if present; otherwise, set the property directly. + if (typeof object[setter] === 'function') + object[setter](value); + else + object[property] = value; + } + + describe('Return', function() { + it('should create an instance of Return', function() { + // uncomment below and update the code to test Return + //var instance = new OpenApiPetstore.Return(); + //expect(instance).to.be.a(OpenApiPetstore.Return); + }); + + it('should have the property _return (base name: "return")', function() { + // uncomment below and update the code to test the property _return + //var instance = new OpenApiPetstore.Return(); + //expect(instance).to.be(); + }); + + }); + +})); diff --git a/samples/client/petstore/javascript-apollo/test/model/SpecialModelName.spec.js b/samples/client/petstore/javascript-apollo/test/model/SpecialModelName.spec.js new file mode 100644 index 000000000000..8b6e95c76f5d --- /dev/null +++ b/samples/client/petstore/javascript-apollo/test/model/SpecialModelName.spec.js @@ -0,0 +1,65 @@ +/** + * OpenAPI Petstore + * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ + * + * The version of the OpenAPI document: 1.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + * + */ + +(function(root, factory) { + if (typeof define === 'function' && define.amd) { + // AMD. + define(['expect.js', process.cwd()+'/src/index'], factory); + } else if (typeof module === 'object' && module.exports) { + // CommonJS-like environments that support module.exports, like Node. + factory(require('expect.js'), require(process.cwd()+'/src/index')); + } else { + // Browser globals (root is window) + factory(root.expect, root.OpenApiPetstore); + } +}(this, function(expect, OpenApiPetstore) { + 'use strict'; + + var instance; + + beforeEach(function() { + instance = new OpenApiPetstore.SpecialModelName(); + }); + + var getProperty = function(object, getter, property) { + // Use getter method if present; otherwise, get the property directly. + if (typeof object[getter] === 'function') + return object[getter](); + else + return object[property]; + } + + var setProperty = function(object, setter, property, value) { + // Use setter method if present; otherwise, set the property directly. + if (typeof object[setter] === 'function') + object[setter](value); + else + object[property] = value; + } + + describe('SpecialModelName', function() { + it('should create an instance of SpecialModelName', function() { + // uncomment below and update the code to test SpecialModelName + //var instance = new OpenApiPetstore.SpecialModelName(); + //expect(instance).to.be.a(OpenApiPetstore.SpecialModelName); + }); + + it('should have the property specialPropertyName (base name: "$special[property.name]")', function() { + // uncomment below and update the code to test the property specialPropertyName + //var instance = new OpenApiPetstore.SpecialModelName(); + //expect(instance).to.be(); + }); + + }); + +})); From 6aa52c6d7f44c56193e7130efb6a611e1ec16ca2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jo=C3=A3o=20Neto?= Date: Wed, 24 Aug 2022 16:12:14 +0200 Subject: [PATCH 07/23] update generator docs --- docs/generators/javascript-apollo.md | 2 +- docs/generators/javascript.md | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/docs/generators/javascript-apollo.md b/docs/generators/javascript-apollo.md index 814a0c82c79d..e128d136e24c 100644 --- a/docs/generators/javascript-apollo.md +++ b/docs/generators/javascript-apollo.md @@ -7,7 +7,7 @@ title: Documentation for the javascript-apollo Generator | Property | Value | Notes | | -------- | ----- | ----- | | generator name | javascript-apollo | pass this to the generate command after -g | -| generator stability | STABLE | | +| generator stability | DEPRECATED | | | generator type | CLIENT | | | generator language | Javascript | | | generator default templating engine | mustache | | diff --git a/docs/generators/javascript.md b/docs/generators/javascript.md index 5c1c2b4724ef..b9259f14ab6a 100644 --- a/docs/generators/javascript.md +++ b/docs/generators/javascript.md @@ -28,6 +28,7 @@ These options may be applied as additional-properties (cli) or configOptions (pl |hideGenerationTimestamp|Hides the generation timestamp when files are generated.| |true| |invokerPackage|root package for generated code| |null| |legacyDiscriminatorBehavior|Set to false for generators with better support for discriminators. (Python, Java, Go, PowerShell, C#have this enabled by default).|
**true**
The mapping in the discriminator includes descendent schemas that allOf inherit from self and the discriminator mapping schemas in the OAS document.
**false**
The mapping in the discriminator includes any descendent schemas that allOf inherit from self, any oneOf schemas, any anyOf schemas, any x-discriminator-values, and the discriminator mapping schemas in the OAS document AND Codegen validates that oneOf and anyOf schemas contain the required discriminator and throws an error if the discriminator is missing.
|true| +|library|library template (sub-template)|
**javascript**
JavaScript client library
**apollo**
Apollo REST DataSource
|javascript| |licenseName|name of the license the project uses (Default: using info.license.name)| |null| |modelPackage|package for generated models| |null| |modelPropertyNaming|Naming convention for the property: 'camelCase', 'PascalCase', 'snake_case' and 'original', which keeps the original name| |camelCase| From c15dc10a84981e80164f6908f3ef79085bbb31d2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jo=C3=A3o=20Neto?= Date: Wed, 24 Aug 2022 16:33:10 +0200 Subject: [PATCH 08/23] fix: include .babelrc in apollo generation --- .../openapitools/codegen/languages/JavascriptClientCodegen.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/JavascriptClientCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/JavascriptClientCodegen.java index 706360a067af..4567668b1b04 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/JavascriptClientCodegen.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/JavascriptClientCodegen.java @@ -343,7 +343,7 @@ public void preprocessOpenAPI(OpenAPI openAPI) { supportingFiles.add(new SupportingFile("index.mustache", createPath(sourceFolder, invokerPackage), "index.js")); supportingFiles.add(new SupportingFile("ApiClient.mustache", createPath(sourceFolder, invokerPackage), "ApiClient.js")); - if (useES6) { + if (useES6 || LIBRARY_APOLLO.equals(library)) { supportingFiles.add(new SupportingFile(".babelrc.mustache", ".babelrc")); } } From e33fdbc732242e734fd74891627c1d78b16e1de2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jo=C3=A3o=20Neto?= Date: Wed, 24 Aug 2022 22:24:25 +0200 Subject: [PATCH 09/23] update samples --- docs/generators.md | 2 +- .../.openapi-generator/FILES | 44 ------------------- 2 files changed, 1 insertion(+), 45 deletions(-) diff --git a/docs/generators.md b/docs/generators.md index bf7f034e0803..7a029b16b2aa 100644 --- a/docs/generators.md +++ b/docs/generators.md @@ -34,7 +34,7 @@ The following generators are available: * [java](generators/java.md) * [java-micronaut-client (beta)](generators/java-micronaut-client.md) * [javascript](generators/javascript.md) -* [javascript-apollo](generators/javascript-apollo.md) +* [javascript-apollo (deprecated)](generators/javascript-apollo.md) * [javascript-closure-angular](generators/javascript-closure-angular.md) * [javascript-flowtyped](generators/javascript-flowtyped.md) * [jaxrs-cxf-client](generators/jaxrs-cxf-client.md) diff --git a/samples/client/petstore/javascript-apollo/.openapi-generator/FILES b/samples/client/petstore/javascript-apollo/.openapi-generator/FILES index 367354b69524..0440bb2716cb 100644 --- a/samples/client/petstore/javascript-apollo/.openapi-generator/FILES +++ b/samples/client/petstore/javascript-apollo/.openapi-generator/FILES @@ -113,47 +113,3 @@ src/model/Return.js src/model/SpecialModelName.js src/model/Tag.js src/model/User.js -test/api/AnotherFakeApi.spec.js -test/api/DefaultApi.spec.js -test/api/FakeApi.spec.js -test/api/FakeClassnameTags123Api.spec.js -test/model/AdditionalPropertiesClass.spec.js -test/model/Animal.spec.js -test/model/ArrayOfArrayOfNumberOnly.spec.js -test/model/ArrayOfNumberOnly.spec.js -test/model/ArrayTest.spec.js -test/model/Capitalization.spec.js -test/model/Cat.spec.js -test/model/CatAllOf.spec.js -test/model/ClassModel.spec.js -test/model/Client.spec.js -test/model/DeprecatedObject.spec.js -test/model/Dog.spec.js -test/model/DogAllOf.spec.js -test/model/EnumArrays.spec.js -test/model/EnumClass.spec.js -test/model/EnumTest.spec.js -test/model/File.spec.js -test/model/FileSchemaTestClass.spec.js -test/model/Foo.spec.js -test/model/FooGetDefaultResponse.spec.js -test/model/FormatTest.spec.js -test/model/HasOnlyReadOnly.spec.js -test/model/HealthCheckResult.spec.js -test/model/List.spec.js -test/model/MapTest.spec.js -test/model/MixedPropertiesAndAdditionalPropertiesClass.spec.js -test/model/Model200Response.spec.js -test/model/Name.spec.js -test/model/NullableClass.spec.js -test/model/NumberOnly.spec.js -test/model/ObjectWithDeprecatedFields.spec.js -test/model/OuterComposite.spec.js -test/model/OuterEnum.spec.js -test/model/OuterEnumDefaultValue.spec.js -test/model/OuterEnumInteger.spec.js -test/model/OuterEnumIntegerDefaultValue.spec.js -test/model/OuterObjectWithEnumProperty.spec.js -test/model/ReadOnlyFirst.spec.js -test/model/Return.spec.js -test/model/SpecialModelName.spec.js From 7423d3aa603e7e854bcda2b0d38b3ef61aefefd8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jo=C3=A3o=20Neto?= Date: Wed, 24 Aug 2022 22:58:02 +0200 Subject: [PATCH 10/23] update samples --- samples/client/petstore/javascript-apollo/package.json | 2 +- samples/client/petstore/javascript-apollo/src/index.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/samples/client/petstore/javascript-apollo/package.json b/samples/client/petstore/javascript-apollo/package.json index 169d9433cf5a..2749e3884516 100644 --- a/samples/client/petstore/javascript-apollo/package.json +++ b/samples/client/petstore/javascript-apollo/package.json @@ -1,7 +1,7 @@ { "name": "open_api_petstore", "version": "1.0.0", - "description": "This_spec_is_mainly_for_testing_Petstore_server_and_contains_fake_endpoints_models__Please_do_not_use_this_for_any_other_purpose__Special_characters___", + "description": "This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\", "license": "Apache-2.0", "main": "dist/index.js", "scripts": { diff --git a/samples/client/petstore/javascript-apollo/src/index.js b/samples/client/petstore/javascript-apollo/src/index.js index a75a817c2602..474899d9c513 100644 --- a/samples/client/petstore/javascript-apollo/src/index.js +++ b/samples/client/petstore/javascript-apollo/src/index.js @@ -69,7 +69,7 @@ import UserApi from './api/UserApi'; /** -* This_spec_is_mainly_for_testing_Petstore_server_and_contains_fake_endpoints_models__Please_do_not_use_this_for_any_other_purpose__Special_characters___.
+* This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\.
* The index module provides access to constructors for all the classes which comprise the public API. *

* An AMD (recommended!) or CommonJS application will generally do something equivalent to the following: From 3e44113257a1bf7b9e42739ddb51744c09d2afcc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jo=C3=A3o=20Neto?= Date: Thu, 25 Aug 2022 10:14:58 +0200 Subject: [PATCH 11/23] rename javascript-apollo to javascript-apollo-deprecated --- .../codegen/languages/JavascriptApolloClientCodegen.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/JavascriptApolloClientCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/JavascriptApolloClientCodegen.java index 111403b11256..686542b76176 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/JavascriptApolloClientCodegen.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/JavascriptApolloClientCodegen.java @@ -221,7 +221,7 @@ public CodegenType getTag() { @Override public String getName() { - return "javascript-apollo"; + return "javascript-apollo-deprecated"; } @Override From 05d8e396109856bbaeff0b0eeb59f2e3f7e96fba Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jo=C3=A3o=20Neto?= Date: Thu, 25 Aug 2022 10:59:05 +0200 Subject: [PATCH 12/23] fix javascript apollo library template Apollo library now uses the partial_model_generic template file from the ES6 library, as it includes many fixes and improvements (including handling models with ill-named attributes) --- .../apollo/partial_model_generic.mustache | 82 ------------------- .../partial_model_generic.mustache | 0 2 files changed, 82 deletions(-) delete mode 100644 modules/openapi-generator/src/main/resources/Javascript/libraries/apollo/partial_model_generic.mustache rename modules/openapi-generator/src/main/resources/Javascript/{libraries/javascript => }/partial_model_generic.mustache (100%) diff --git a/modules/openapi-generator/src/main/resources/Javascript/libraries/apollo/partial_model_generic.mustache b/modules/openapi-generator/src/main/resources/Javascript/libraries/apollo/partial_model_generic.mustache deleted file mode 100644 index bc69d91c3423..000000000000 --- a/modules/openapi-generator/src/main/resources/Javascript/libraries/apollo/partial_model_generic.mustache +++ /dev/null @@ -1,82 +0,0 @@ - -{{#models}}{{#model}}{{#emitJSDoc}}/** - * The {{classname}} model module. - * @module {{#invokerPackage}}{{.}}/{{/invokerPackage}}{{#modelPackage}}{{.}}/{{/modelPackage}}{{classname}} - * @version {{projectVersion}} - */{{/emitJSDoc}} -class {{classname}} {{#parent}}{{^parentModel}}{{#vendorExtensions.x-is-array}}extends Array {{/vendorExtensions.x-is-array}}{{/parentModel}}{{/parent}}{ - {{#vars}} - {{#emitJSDoc}}/** - * @member {{=< >=}}{<&vendorExtensions.x-jsdoc-type>}<={{ }}=> {{baseName}} - * @type {{=< >=}}{<&vendorExtensions.x-jsdoc-type>}<={{ }}=>{{#defaultValue}} - * @default {{{.}}}{{/defaultValue}} - */{{/emitJSDoc}} - {{baseName}}{{#defaultValue}} = {{{.}}}{{/defaultValue}}; - {{/vars}} - - {{#useInheritance}}{{#interfaceModels}}{{#allVars}}{{#emitJSDoc}}/** - * @member {{=< >=}}{<&vendorExtensions.x-jsdoc-type>}<={{ }}=> {{baseName}} - * @type {{=< >=}}{<&vendorExtensions.x-jsdoc-type>}<={{ }}=> - */{{/emitJSDoc}} - #{{baseName}}; - {{/allVars}}{{/interfaceModels}}{{/useInheritance}} - - {{#emitJSDoc}}/** - * Constructs a new {{classname}}.{{#description}} - * {{.}}{{/description}} - * @alias module:{{#invokerPackage}}{{.}}/{{/invokerPackage}}{{#modelPackage}}{{.}}/{{/modelPackage}}{{classname}}{{#useInheritance}}{{#parent}} - * @extends {{#parentModel}}module:{{#invokerPackage}}{{.}}/{{/invokerPackage}}{{#modelPackage}}{{.}}/{{/modelPackage}}{{classname}}{{/parentModel}}{{^parentModel}}{{#vendorExtensions.x-is-array}}Array{{/vendorExtensions.x-is-array}}{{#vendorExtensions.x-is-map}}Object{{/vendorExtensions.x-is-map}}{{/parentModel}}{{/parent}}{{#interfaces}} - * @implements module:{{#invokerPackage}}{{.}}/{{/invokerPackage}}{{#modelPackage}}{{.}}/{{/modelPackage}}{{.}}{{/interfaces}}{{/useInheritance}}{{#vendorExtensions.x-all-required}} - * @param {{name}} {{=< >=}}{<&vendorExtensions.x-jsdoc-type>}<={{ }}=> {{{description}}}{{/vendorExtensions.x-all-required}} - */{{/emitJSDoc}} - constructor({{#vendorExtensions.x-all-required}}{{name}}{{^-last}}, {{/-last}}{{/vendorExtensions.x-all-required}}) { {{#parent}}{{^parentModel}}{{#vendorExtensions.x-is-array}} - super(); - {{/vendorExtensions.x-is-array}}{{/parentModel}}{{/parent}}{{#useInheritance}} - {{#interfaceModels}}{{classname}}.initialize(this{{#vendorExtensions.x-all-required}}, {{name}}{{/vendorExtensions.x-all-required}});{{/interfaceModels}}{{/useInheritance}} - {{classname}}.initialize(this{{#vendorExtensions.x-all-required}}, {{name}}{{/vendorExtensions.x-all-required}}); - } - - {{#emitJSDoc}}/** - * Initializes the fields of this object. - * This method is used by the constructors of any subclasses, in order to implement multiple inheritance (mix-ins). - * Only for internal use. - */{{/emitJSDoc}} - static initialize(obj{{#vendorExtensions.x-all-required}}, {{name}}{{/vendorExtensions.x-all-required}}) { {{#vars}}{{#required}} - obj['{{baseName}}'] = {{name}};{{/required}}{{/vars}} - } - - {{#emitJSDoc}}/** - * Constructs a {{classname}} from a plain JavaScript object, optionally creating a new instance. - * Copies all relevant properties from data to obj if supplied or a new instance if not. - * @param {Object} data The plain JavaScript object bearing properties of interest. - * @param {{=< >=}}{module:<#invokerPackage>/<#modelPackage>/}<={{ }}=> obj Optional instance to populate. - * @return {{=< >=}}{module:<#invokerPackage>/<#modelPackage>/}<={{ }}=> The populated {{classname}} instance. - */{{/emitJSDoc}} - static constructFromObject(data, obj) { - if (data){{! TODO: support polymorphism: discriminator property on data determines class to instantiate.}} { - obj = obj || new {{classname}}();{{#parent}}{{^parentModel}} - - ApiClient.constructFromObject(data, obj, '{{vendorExtensions.x-item-type}}'); - {{/parentModel}}{{/parent}}{{#useInheritance}}{{#parentModel}} - {{classname}}.constructFromObject(data, obj);{{/parentModel}}{{#interfaces}} - {{.}}.constructFromObject(data, obj);{{/interfaces}}{{/useInheritance}} - - {{#vars}} - if (data.hasOwnProperty('{{baseName}}')) { - obj['{{baseName}}']{{{defaultValueWithParam}}} - } - {{/vars}} - } - return obj; - } - {{/model}} -} - -{{#vars}}{{#isEnum}}{{^isContainer}} -{{>partial_model_inner_enum}} -{{/isContainer}}{{/isEnum}}{{#items.isEnum}}{{#items}}{{^isContainer}} -{{>partial_model_inner_enum}} -{{/isContainer}}{{/items}}{{/items.isEnum}}{{/vars}} - -export default {{classname}}; -{{/models}} diff --git a/modules/openapi-generator/src/main/resources/Javascript/libraries/javascript/partial_model_generic.mustache b/modules/openapi-generator/src/main/resources/Javascript/partial_model_generic.mustache similarity index 100% rename from modules/openapi-generator/src/main/resources/Javascript/libraries/javascript/partial_model_generic.mustache rename to modules/openapi-generator/src/main/resources/Javascript/partial_model_generic.mustache From fc813c49edb28b313435c7598f6d47375b055cd0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jo=C3=A3o=20Neto?= Date: Thu, 25 Aug 2022 11:03:37 +0200 Subject: [PATCH 13/23] update samples --- .../src/model/AdditionalPropertiesClass.js | 28 +-- .../javascript-apollo/src/model/Animal.js | 30 ++-- .../src/model/ApiResponse.js | 38 ++-- .../src/model/ArrayOfArrayOfNumberOnly.js | 18 +- .../src/model/ArrayOfNumberOnly.js | 18 +- .../javascript-apollo/src/model/ArrayTest.js | 38 ++-- .../src/model/Capitalization.js | 69 +++---- .../javascript-apollo/src/model/Cat.js | 48 ++--- .../javascript-apollo/src/model/CatAllOf.js | 18 +- .../javascript-apollo/src/model/Category.js | 32 ++-- .../javascript-apollo/src/model/ClassModel.js | 18 +- .../javascript-apollo/src/model/Client.js | 18 +- .../src/model/DeprecatedObject.js | 18 +- .../javascript-apollo/src/model/Dog.js | 48 ++--- .../javascript-apollo/src/model/DogAllOf.js | 18 +- .../javascript-apollo/src/model/EnumArrays.js | 28 +-- .../javascript-apollo/src/model/EnumTest.js | 88 ++++----- .../javascript-apollo/src/model/File.js | 19 +- .../src/model/FileSchemaTestClass.js | 28 +-- .../javascript-apollo/src/model/Foo.js | 20 ++- .../src/model/FooGetDefaultResponse.js | 18 +- .../javascript-apollo/src/model/FormatTest.js | 170 +++++++++--------- .../src/model/HasOnlyReadOnly.js | 28 +-- .../src/model/HealthCheckResult.js | 18 +- .../javascript-apollo/src/model/List.js | 18 +- .../javascript-apollo/src/model/MapTest.js | 48 ++--- ...dPropertiesAndAdditionalPropertiesClass.js | 38 ++-- .../src/model/Model200Response.js | 28 +-- .../javascript-apollo/src/model/Name.js | 48 ++--- .../src/model/NullableClass.js | 128 ++++++------- .../javascript-apollo/src/model/NumberOnly.js | 18 +- .../src/model/ObjectWithDeprecatedFields.js | 48 ++--- .../javascript-apollo/src/model/Order.js | 71 ++++---- .../src/model/OuterComposite.js | 38 ++-- .../src/model/OuterObjectWithEnumProperty.js | 18 +- .../javascript-apollo/src/model/Pet.js | 69 +++---- .../src/model/ReadOnlyFirst.js | 28 +-- .../javascript-apollo/src/model/Return.js | 18 +- .../src/model/SpecialModelName.js | 18 +- .../javascript-apollo/src/model/Tag.js | 28 +-- .../javascript-apollo/src/model/User.js | 89 ++++----- 41 files changed, 857 insertions(+), 768 deletions(-) diff --git a/samples/client/petstore/javascript-apollo/src/model/AdditionalPropertiesClass.js b/samples/client/petstore/javascript-apollo/src/model/AdditionalPropertiesClass.js index 400b475d0829..d6d83cca284f 100644 --- a/samples/client/petstore/javascript-apollo/src/model/AdditionalPropertiesClass.js +++ b/samples/client/petstore/javascript-apollo/src/model/AdditionalPropertiesClass.js @@ -19,19 +19,6 @@ import ApiClient from '../ApiClient'; * @version 1.0.0 */ class AdditionalPropertiesClass { - /** - * @member {Object.} map_property - * @type {Object.} - */ - map_property; - /** - * @member {Object.>} map_of_map_property - * @type {Object.>} - */ - map_of_map_property; - - - /** * Constructs a new AdditionalPropertiesClass. * @alias module:model/AdditionalPropertiesClass @@ -69,8 +56,23 @@ class AdditionalPropertiesClass { } return obj; } + + } +/** + * @member {Object.} map_property + */ +AdditionalPropertiesClass.prototype['map_property'] = undefined; + +/** + * @member {Object.>} map_of_map_property + */ +AdditionalPropertiesClass.prototype['map_of_map_property'] = undefined; + + + + export default AdditionalPropertiesClass; diff --git a/samples/client/petstore/javascript-apollo/src/model/Animal.js b/samples/client/petstore/javascript-apollo/src/model/Animal.js index 252d59681b20..7cb9017160b2 100644 --- a/samples/client/petstore/javascript-apollo/src/model/Animal.js +++ b/samples/client/petstore/javascript-apollo/src/model/Animal.js @@ -19,20 +19,6 @@ import ApiClient from '../ApiClient'; * @version 1.0.0 */ class Animal { - /** - * @member {String} className - * @type {String} - */ - className; - /** - * @member {String} color - * @type {String} - * @default 'red' - */ - color = 'red'; - - - /** * Constructs a new Animal. * @alias module:model/Animal @@ -72,8 +58,24 @@ class Animal { } return obj; } + + } +/** + * @member {String} className + */ +Animal.prototype['className'] = undefined; + +/** + * @member {String} color + * @default 'red' + */ +Animal.prototype['color'] = 'red'; + + + + export default Animal; diff --git a/samples/client/petstore/javascript-apollo/src/model/ApiResponse.js b/samples/client/petstore/javascript-apollo/src/model/ApiResponse.js index d4cadbfa0f4f..f5af17fdf82d 100644 --- a/samples/client/petstore/javascript-apollo/src/model/ApiResponse.js +++ b/samples/client/petstore/javascript-apollo/src/model/ApiResponse.js @@ -19,24 +19,6 @@ import ApiClient from '../ApiClient'; * @version 1.0.0 */ class ApiResponse { - /** - * @member {Number} code - * @type {Number} - */ - code; - /** - * @member {String} type - * @type {String} - */ - type; - /** - * @member {String} message - * @type {String} - */ - message; - - - /** * Constructs a new ApiResponse. * @alias module:model/ApiResponse @@ -77,8 +59,28 @@ class ApiResponse { } return obj; } + + } +/** + * @member {Number} code + */ +ApiResponse.prototype['code'] = undefined; + +/** + * @member {String} type + */ +ApiResponse.prototype['type'] = undefined; + +/** + * @member {String} message + */ +ApiResponse.prototype['message'] = undefined; + + + + export default ApiResponse; diff --git a/samples/client/petstore/javascript-apollo/src/model/ArrayOfArrayOfNumberOnly.js b/samples/client/petstore/javascript-apollo/src/model/ArrayOfArrayOfNumberOnly.js index c41e2ef5544a..eadd7db414b1 100644 --- a/samples/client/petstore/javascript-apollo/src/model/ArrayOfArrayOfNumberOnly.js +++ b/samples/client/petstore/javascript-apollo/src/model/ArrayOfArrayOfNumberOnly.js @@ -19,14 +19,6 @@ import ApiClient from '../ApiClient'; * @version 1.0.0 */ class ArrayOfArrayOfNumberOnly { - /** - * @member {Array.>} ArrayArrayNumber - * @type {Array.>} - */ - ArrayArrayNumber; - - - /** * Constructs a new ArrayOfArrayOfNumberOnly. * @alias module:model/ArrayOfArrayOfNumberOnly @@ -61,8 +53,18 @@ class ArrayOfArrayOfNumberOnly { } return obj; } + + } +/** + * @member {Array.>} ArrayArrayNumber + */ +ArrayOfArrayOfNumberOnly.prototype['ArrayArrayNumber'] = undefined; + + + + export default ArrayOfArrayOfNumberOnly; diff --git a/samples/client/petstore/javascript-apollo/src/model/ArrayOfNumberOnly.js b/samples/client/petstore/javascript-apollo/src/model/ArrayOfNumberOnly.js index 1299eb8ab4f1..1145a62630d2 100644 --- a/samples/client/petstore/javascript-apollo/src/model/ArrayOfNumberOnly.js +++ b/samples/client/petstore/javascript-apollo/src/model/ArrayOfNumberOnly.js @@ -19,14 +19,6 @@ import ApiClient from '../ApiClient'; * @version 1.0.0 */ class ArrayOfNumberOnly { - /** - * @member {Array.} ArrayNumber - * @type {Array.} - */ - ArrayNumber; - - - /** * Constructs a new ArrayOfNumberOnly. * @alias module:model/ArrayOfNumberOnly @@ -61,8 +53,18 @@ class ArrayOfNumberOnly { } return obj; } + + } +/** + * @member {Array.} ArrayNumber + */ +ArrayOfNumberOnly.prototype['ArrayNumber'] = undefined; + + + + export default ArrayOfNumberOnly; diff --git a/samples/client/petstore/javascript-apollo/src/model/ArrayTest.js b/samples/client/petstore/javascript-apollo/src/model/ArrayTest.js index 04415c0f5268..18bc925308a3 100644 --- a/samples/client/petstore/javascript-apollo/src/model/ArrayTest.js +++ b/samples/client/petstore/javascript-apollo/src/model/ArrayTest.js @@ -20,24 +20,6 @@ import ReadOnlyFirst from './ReadOnlyFirst'; * @version 1.0.0 */ class ArrayTest { - /** - * @member {Array.} array_of_string - * @type {Array.} - */ - array_of_string; - /** - * @member {Array.>} array_array_of_integer - * @type {Array.>} - */ - array_array_of_integer; - /** - * @member {Array.>} array_array_of_model - * @type {Array.>} - */ - array_array_of_model; - - - /** * Constructs a new ArrayTest. * @alias module:model/ArrayTest @@ -78,8 +60,28 @@ class ArrayTest { } return obj; } + + } +/** + * @member {Array.} array_of_string + */ +ArrayTest.prototype['array_of_string'] = undefined; + +/** + * @member {Array.>} array_array_of_integer + */ +ArrayTest.prototype['array_array_of_integer'] = undefined; + +/** + * @member {Array.>} array_array_of_model + */ +ArrayTest.prototype['array_array_of_model'] = undefined; + + + + export default ArrayTest; diff --git a/samples/client/petstore/javascript-apollo/src/model/Capitalization.js b/samples/client/petstore/javascript-apollo/src/model/Capitalization.js index c46ebb5f7aa3..63b14361fee4 100644 --- a/samples/client/petstore/javascript-apollo/src/model/Capitalization.js +++ b/samples/client/petstore/javascript-apollo/src/model/Capitalization.js @@ -19,39 +19,6 @@ import ApiClient from '../ApiClient'; * @version 1.0.0 */ class Capitalization { - /** - * @member {String} smallCamel - * @type {String} - */ - smallCamel; - /** - * @member {String} CapitalCamel - * @type {String} - */ - CapitalCamel; - /** - * @member {String} small_Snake - * @type {String} - */ - small_Snake; - /** - * @member {String} Capital_Snake - * @type {String} - */ - Capital_Snake; - /** - * @member {String} SCA_ETH_Flow_Points - * @type {String} - */ - SCA_ETH_Flow_Points; - /** - * @member {String} ATT_NAME - * @type {String} - */ - ATT_NAME; - - - /** * Constructs a new Capitalization. * @alias module:model/Capitalization @@ -101,8 +68,44 @@ class Capitalization { } return obj; } + + } +/** + * @member {String} smallCamel + */ +Capitalization.prototype['smallCamel'] = undefined; + +/** + * @member {String} CapitalCamel + */ +Capitalization.prototype['CapitalCamel'] = undefined; + +/** + * @member {String} small_Snake + */ +Capitalization.prototype['small_Snake'] = undefined; + +/** + * @member {String} Capital_Snake + */ +Capitalization.prototype['Capital_Snake'] = undefined; + +/** + * @member {String} SCA_ETH_Flow_Points + */ +Capitalization.prototype['SCA_ETH_Flow_Points'] = undefined; + +/** + * Name of the pet + * @member {String} ATT_NAME + */ +Capitalization.prototype['ATT_NAME'] = undefined; + + + + export default Capitalization; diff --git a/samples/client/petstore/javascript-apollo/src/model/Cat.js b/samples/client/petstore/javascript-apollo/src/model/Cat.js index 337c38ea2920..d18ce94e70e7 100644 --- a/samples/client/petstore/javascript-apollo/src/model/Cat.js +++ b/samples/client/petstore/javascript-apollo/src/model/Cat.js @@ -21,29 +21,6 @@ import CatAllOf from './CatAllOf'; * @version 1.0.0 */ class Cat { - /** - * @member {Boolean} declawed - * @type {Boolean} - */ - declawed; - - /** - * @member {String} className - * @type {String} - */ - #className; - /** - * @member {String} color - * @type {String} - */ - #color; - /** - * @member {Boolean} declawed - * @type {Boolean} - */ - #declawed; - - /** * Constructs a new Cat. * @alias module:model/Cat @@ -85,8 +62,33 @@ class Cat { } return obj; } + + } +/** + * @member {Boolean} declawed + */ +Cat.prototype['declawed'] = undefined; + + +// Implement Animal interface: +/** + * @member {String} className + */ +Animal.prototype['className'] = undefined; +/** + * @member {String} color + * @default 'red' + */ +Animal.prototype['color'] = 'red'; +// Implement CatAllOf interface: +/** + * @member {Boolean} declawed + */ +CatAllOf.prototype['declawed'] = undefined; + + export default Cat; diff --git a/samples/client/petstore/javascript-apollo/src/model/CatAllOf.js b/samples/client/petstore/javascript-apollo/src/model/CatAllOf.js index 6531639ff404..c71ea7129b05 100644 --- a/samples/client/petstore/javascript-apollo/src/model/CatAllOf.js +++ b/samples/client/petstore/javascript-apollo/src/model/CatAllOf.js @@ -19,14 +19,6 @@ import ApiClient from '../ApiClient'; * @version 1.0.0 */ class CatAllOf { - /** - * @member {Boolean} declawed - * @type {Boolean} - */ - declawed; - - - /** * Constructs a new CatAllOf. * @alias module:model/CatAllOf @@ -61,8 +53,18 @@ class CatAllOf { } return obj; } + + } +/** + * @member {Boolean} declawed + */ +CatAllOf.prototype['declawed'] = undefined; + + + + export default CatAllOf; diff --git a/samples/client/petstore/javascript-apollo/src/model/Category.js b/samples/client/petstore/javascript-apollo/src/model/Category.js index e6165a921b1b..557e8e186206 100644 --- a/samples/client/petstore/javascript-apollo/src/model/Category.js +++ b/samples/client/petstore/javascript-apollo/src/model/Category.js @@ -19,20 +19,6 @@ import ApiClient from '../ApiClient'; * @version 1.0.0 */ class Category { - /** - * @member {Number} id - * @type {Number} - */ - id; - /** - * @member {String} name - * @type {String} - * @default 'default-name' - */ - name = 'default-name'; - - - /** * Constructs a new Category. * @alias module:model/Category @@ -49,7 +35,7 @@ class Category { * Only for internal use. */ static initialize(obj, name) { - obj['name'] = name; + obj['name'] = name || 'default-name'; } /** @@ -72,8 +58,24 @@ class Category { } return obj; } + + } +/** + * @member {Number} id + */ +Category.prototype['id'] = undefined; + +/** + * @member {String} name + * @default 'default-name' + */ +Category.prototype['name'] = 'default-name'; + + + + export default Category; diff --git a/samples/client/petstore/javascript-apollo/src/model/ClassModel.js b/samples/client/petstore/javascript-apollo/src/model/ClassModel.js index a63b06762284..ee1f14177778 100644 --- a/samples/client/petstore/javascript-apollo/src/model/ClassModel.js +++ b/samples/client/petstore/javascript-apollo/src/model/ClassModel.js @@ -19,14 +19,6 @@ import ApiClient from '../ApiClient'; * @version 1.0.0 */ class ClassModel { - /** - * @member {String} _class - * @type {String} - */ - _class; - - - /** * Constructs a new ClassModel. * Model for testing model with \"_class\" property @@ -62,8 +54,18 @@ class ClassModel { } return obj; } + + } +/** + * @member {String} _class + */ +ClassModel.prototype['_class'] = undefined; + + + + export default ClassModel; diff --git a/samples/client/petstore/javascript-apollo/src/model/Client.js b/samples/client/petstore/javascript-apollo/src/model/Client.js index e3ee5bd8b1b4..8521c85043bb 100644 --- a/samples/client/petstore/javascript-apollo/src/model/Client.js +++ b/samples/client/petstore/javascript-apollo/src/model/Client.js @@ -19,14 +19,6 @@ import ApiClient from '../ApiClient'; * @version 1.0.0 */ class Client { - /** - * @member {String} client - * @type {String} - */ - client; - - - /** * Constructs a new Client. * @alias module:model/Client @@ -61,8 +53,18 @@ class Client { } return obj; } + + } +/** + * @member {String} client + */ +Client.prototype['client'] = undefined; + + + + export default Client; diff --git a/samples/client/petstore/javascript-apollo/src/model/DeprecatedObject.js b/samples/client/petstore/javascript-apollo/src/model/DeprecatedObject.js index c476369fe1c2..c3298d50200f 100644 --- a/samples/client/petstore/javascript-apollo/src/model/DeprecatedObject.js +++ b/samples/client/petstore/javascript-apollo/src/model/DeprecatedObject.js @@ -19,14 +19,6 @@ import ApiClient from '../ApiClient'; * @version 1.0.0 */ class DeprecatedObject { - /** - * @member {String} name - * @type {String} - */ - name; - - - /** * Constructs a new DeprecatedObject. * @alias module:model/DeprecatedObject @@ -61,8 +53,18 @@ class DeprecatedObject { } return obj; } + + } +/** + * @member {String} name + */ +DeprecatedObject.prototype['name'] = undefined; + + + + export default DeprecatedObject; diff --git a/samples/client/petstore/javascript-apollo/src/model/Dog.js b/samples/client/petstore/javascript-apollo/src/model/Dog.js index 7620a859049e..b101feecd321 100644 --- a/samples/client/petstore/javascript-apollo/src/model/Dog.js +++ b/samples/client/petstore/javascript-apollo/src/model/Dog.js @@ -21,29 +21,6 @@ import DogAllOf from './DogAllOf'; * @version 1.0.0 */ class Dog { - /** - * @member {String} breed - * @type {String} - */ - breed; - - /** - * @member {String} className - * @type {String} - */ - #className; - /** - * @member {String} color - * @type {String} - */ - #color; - /** - * @member {String} breed - * @type {String} - */ - #breed; - - /** * Constructs a new Dog. * @alias module:model/Dog @@ -85,8 +62,33 @@ class Dog { } return obj; } + + } +/** + * @member {String} breed + */ +Dog.prototype['breed'] = undefined; + + +// Implement Animal interface: +/** + * @member {String} className + */ +Animal.prototype['className'] = undefined; +/** + * @member {String} color + * @default 'red' + */ +Animal.prototype['color'] = 'red'; +// Implement DogAllOf interface: +/** + * @member {String} breed + */ +DogAllOf.prototype['breed'] = undefined; + + export default Dog; diff --git a/samples/client/petstore/javascript-apollo/src/model/DogAllOf.js b/samples/client/petstore/javascript-apollo/src/model/DogAllOf.js index 938e2c95fe26..58ecede61267 100644 --- a/samples/client/petstore/javascript-apollo/src/model/DogAllOf.js +++ b/samples/client/petstore/javascript-apollo/src/model/DogAllOf.js @@ -19,14 +19,6 @@ import ApiClient from '../ApiClient'; * @version 1.0.0 */ class DogAllOf { - /** - * @member {String} breed - * @type {String} - */ - breed; - - - /** * Constructs a new DogAllOf. * @alias module:model/DogAllOf @@ -61,8 +53,18 @@ class DogAllOf { } return obj; } + + } +/** + * @member {String} breed + */ +DogAllOf.prototype['breed'] = undefined; + + + + export default DogAllOf; diff --git a/samples/client/petstore/javascript-apollo/src/model/EnumArrays.js b/samples/client/petstore/javascript-apollo/src/model/EnumArrays.js index eabc5835b4aa..7fe64e3111a5 100644 --- a/samples/client/petstore/javascript-apollo/src/model/EnumArrays.js +++ b/samples/client/petstore/javascript-apollo/src/model/EnumArrays.js @@ -19,19 +19,6 @@ import ApiClient from '../ApiClient'; * @version 1.0.0 */ class EnumArrays { - /** - * @member {module:model/EnumArrays.JustSymbolEnum} just_symbol - * @type {module:model/EnumArrays.JustSymbolEnum} - */ - just_symbol; - /** - * @member {Array.} array_enum - * @type {Array.} - */ - array_enum; - - - /** * Constructs a new EnumArrays. * @alias module:model/EnumArrays @@ -69,8 +56,23 @@ class EnumArrays { } return obj; } + + } +/** + * @member {module:model/EnumArrays.JustSymbolEnum} just_symbol + */ +EnumArrays.prototype['just_symbol'] = undefined; + +/** + * @member {Array.} array_enum + */ +EnumArrays.prototype['array_enum'] = undefined; + + + + /** * Allowed values for the just_symbol property. diff --git a/samples/client/petstore/javascript-apollo/src/model/EnumTest.js b/samples/client/petstore/javascript-apollo/src/model/EnumTest.js index 2a9f6a7d9ae1..dc684b7c26b1 100644 --- a/samples/client/petstore/javascript-apollo/src/model/EnumTest.js +++ b/samples/client/petstore/javascript-apollo/src/model/EnumTest.js @@ -23,49 +23,6 @@ import OuterEnumIntegerDefaultValue from './OuterEnumIntegerDefaultValue'; * @version 1.0.0 */ class EnumTest { - /** - * @member {module:model/EnumTest.EnumStringEnum} enum_string - * @type {module:model/EnumTest.EnumStringEnum} - */ - enum_string; - /** - * @member {module:model/EnumTest.EnumStringRequiredEnum} enum_string_required - * @type {module:model/EnumTest.EnumStringRequiredEnum} - */ - enum_string_required; - /** - * @member {module:model/EnumTest.EnumIntegerEnum} enum_integer - * @type {module:model/EnumTest.EnumIntegerEnum} - */ - enum_integer; - /** - * @member {module:model/EnumTest.EnumNumberEnum} enum_number - * @type {module:model/EnumTest.EnumNumberEnum} - */ - enum_number; - /** - * @member {module:model/OuterEnum} outerEnum - * @type {module:model/OuterEnum} - */ - outerEnum; - /** - * @member {module:model/OuterEnumInteger} outerEnumInteger - * @type {module:model/OuterEnumInteger} - */ - outerEnumInteger; - /** - * @member {module:model/OuterEnumDefaultValue} outerEnumDefaultValue - * @type {module:model/OuterEnumDefaultValue} - */ - outerEnumDefaultValue; - /** - * @member {module:model/OuterEnumIntegerDefaultValue} outerEnumIntegerDefaultValue - * @type {module:model/OuterEnumIntegerDefaultValue} - */ - outerEnumIntegerDefaultValue; - - - /** * Constructs a new EnumTest. * @alias module:model/EnumTest @@ -123,8 +80,53 @@ class EnumTest { } return obj; } + + } +/** + * @member {module:model/EnumTest.EnumStringEnum} enum_string + */ +EnumTest.prototype['enum_string'] = undefined; + +/** + * @member {module:model/EnumTest.EnumStringRequiredEnum} enum_string_required + */ +EnumTest.prototype['enum_string_required'] = undefined; + +/** + * @member {module:model/EnumTest.EnumIntegerEnum} enum_integer + */ +EnumTest.prototype['enum_integer'] = undefined; + +/** + * @member {module:model/EnumTest.EnumNumberEnum} enum_number + */ +EnumTest.prototype['enum_number'] = undefined; + +/** + * @member {module:model/OuterEnum} outerEnum + */ +EnumTest.prototype['outerEnum'] = undefined; + +/** + * @member {module:model/OuterEnumInteger} outerEnumInteger + */ +EnumTest.prototype['outerEnumInteger'] = undefined; + +/** + * @member {module:model/OuterEnumDefaultValue} outerEnumDefaultValue + */ +EnumTest.prototype['outerEnumDefaultValue'] = undefined; + +/** + * @member {module:model/OuterEnumIntegerDefaultValue} outerEnumIntegerDefaultValue + */ +EnumTest.prototype['outerEnumIntegerDefaultValue'] = undefined; + + + + /** * Allowed values for the enum_string property. diff --git a/samples/client/petstore/javascript-apollo/src/model/File.js b/samples/client/petstore/javascript-apollo/src/model/File.js index 53a726aa9360..12b51b87d897 100644 --- a/samples/client/petstore/javascript-apollo/src/model/File.js +++ b/samples/client/petstore/javascript-apollo/src/model/File.js @@ -19,14 +19,6 @@ import ApiClient from '../ApiClient'; * @version 1.0.0 */ class File { - /** - * @member {String} sourceURI - * @type {String} - */ - sourceURI; - - - /** * Constructs a new File. * Must be named `File` for test. @@ -62,8 +54,19 @@ class File { } return obj; } + + } +/** + * Test capitalization + * @member {String} sourceURI + */ +File.prototype['sourceURI'] = undefined; + + + + export default File; diff --git a/samples/client/petstore/javascript-apollo/src/model/FileSchemaTestClass.js b/samples/client/petstore/javascript-apollo/src/model/FileSchemaTestClass.js index b883cbd09d2b..b6fe9e90ece2 100644 --- a/samples/client/petstore/javascript-apollo/src/model/FileSchemaTestClass.js +++ b/samples/client/petstore/javascript-apollo/src/model/FileSchemaTestClass.js @@ -19,19 +19,6 @@ import ApiClient from '../ApiClient'; * @version 1.0.0 */ class FileSchemaTestClass { - /** - * @member {File} file - * @type {File} - */ - file; - /** - * @member {Array.} files - * @type {Array.} - */ - files; - - - /** * Constructs a new FileSchemaTestClass. * @alias module:model/FileSchemaTestClass @@ -69,8 +56,23 @@ class FileSchemaTestClass { } return obj; } + + } +/** + * @member {File} file + */ +FileSchemaTestClass.prototype['file'] = undefined; + +/** + * @member {Array.} files + */ +FileSchemaTestClass.prototype['files'] = undefined; + + + + export default FileSchemaTestClass; diff --git a/samples/client/petstore/javascript-apollo/src/model/Foo.js b/samples/client/petstore/javascript-apollo/src/model/Foo.js index 2805ed021816..3e4477b805b9 100644 --- a/samples/client/petstore/javascript-apollo/src/model/Foo.js +++ b/samples/client/petstore/javascript-apollo/src/model/Foo.js @@ -19,15 +19,6 @@ import ApiClient from '../ApiClient'; * @version 1.0.0 */ class Foo { - /** - * @member {String} bar - * @type {String} - * @default 'bar' - */ - bar = 'bar'; - - - /** * Constructs a new Foo. * @alias module:model/Foo @@ -62,8 +53,19 @@ class Foo { } return obj; } + + } +/** + * @member {String} bar + * @default 'bar' + */ +Foo.prototype['bar'] = 'bar'; + + + + export default Foo; diff --git a/samples/client/petstore/javascript-apollo/src/model/FooGetDefaultResponse.js b/samples/client/petstore/javascript-apollo/src/model/FooGetDefaultResponse.js index 71ac27052632..ab3558a04150 100644 --- a/samples/client/petstore/javascript-apollo/src/model/FooGetDefaultResponse.js +++ b/samples/client/petstore/javascript-apollo/src/model/FooGetDefaultResponse.js @@ -20,14 +20,6 @@ import Foo from './Foo'; * @version 1.0.0 */ class FooGetDefaultResponse { - /** - * @member {module:model/Foo} string - * @type {module:model/Foo} - */ - string; - - - /** * Constructs a new FooGetDefaultResponse. * @alias module:model/FooGetDefaultResponse @@ -62,8 +54,18 @@ class FooGetDefaultResponse { } return obj; } + + } +/** + * @member {module:model/Foo} string + */ +FooGetDefaultResponse.prototype['string'] = undefined; + + + + export default FooGetDefaultResponse; diff --git a/samples/client/petstore/javascript-apollo/src/model/FormatTest.js b/samples/client/petstore/javascript-apollo/src/model/FormatTest.js index c6f6622dfe5e..00ee3533d060 100644 --- a/samples/client/petstore/javascript-apollo/src/model/FormatTest.js +++ b/samples/client/petstore/javascript-apollo/src/model/FormatTest.js @@ -19,89 +19,6 @@ import ApiClient from '../ApiClient'; * @version 1.0.0 */ class FormatTest { - /** - * @member {Number} integer - * @type {Number} - */ - integer; - /** - * @member {Number} int32 - * @type {Number} - */ - int32; - /** - * @member {Number} int64 - * @type {Number} - */ - int64; - /** - * @member {Number} number - * @type {Number} - */ - number; - /** - * @member {Number} float - * @type {Number} - */ - float; - /** - * @member {Number} double - * @type {Number} - */ - double; - /** - * @member {Number} decimal - * @type {Number} - */ - decimal; - /** - * @member {String} string - * @type {String} - */ - string; - /** - * @member {Blob} byte - * @type {Blob} - */ - byte; - /** - * @member {File} binary - * @type {File} - */ - binary; - /** - * @member {Date} date - * @type {Date} - */ - date; - /** - * @member {Date} dateTime - * @type {Date} - */ - dateTime; - /** - * @member {String} uuid - * @type {String} - */ - uuid; - /** - * @member {String} password - * @type {String} - */ - password; - /** - * @member {String} pattern_with_digits - * @type {String} - */ - pattern_with_digits; - /** - * @member {String} pattern_with_digits_and_delimiter - * @type {String} - */ - pattern_with_digits_and_delimiter; - - - /** * Constructs a new FormatTest. * @alias module:model/FormatTest @@ -189,8 +106,95 @@ class FormatTest { } return obj; } + + } +/** + * @member {Number} integer + */ +FormatTest.prototype['integer'] = undefined; + +/** + * @member {Number} int32 + */ +FormatTest.prototype['int32'] = undefined; + +/** + * @member {Number} int64 + */ +FormatTest.prototype['int64'] = undefined; + +/** + * @member {Number} number + */ +FormatTest.prototype['number'] = undefined; + +/** + * @member {Number} float + */ +FormatTest.prototype['float'] = undefined; + +/** + * @member {Number} double + */ +FormatTest.prototype['double'] = undefined; + +/** + * @member {Number} decimal + */ +FormatTest.prototype['decimal'] = undefined; + +/** + * @member {String} string + */ +FormatTest.prototype['string'] = undefined; + +/** + * @member {Blob} byte + */ +FormatTest.prototype['byte'] = undefined; + +/** + * @member {File} binary + */ +FormatTest.prototype['binary'] = undefined; + +/** + * @member {Date} date + */ +FormatTest.prototype['date'] = undefined; + +/** + * @member {Date} dateTime + */ +FormatTest.prototype['dateTime'] = undefined; + +/** + * @member {String} uuid + */ +FormatTest.prototype['uuid'] = undefined; + +/** + * @member {String} password + */ +FormatTest.prototype['password'] = undefined; + +/** + * A string that is a 10 digit number. Can have leading zeros. + * @member {String} pattern_with_digits + */ +FormatTest.prototype['pattern_with_digits'] = undefined; + +/** + * A string starting with 'image_' (case insensitive) and one to three digits following i.e. Image_01. + * @member {String} pattern_with_digits_and_delimiter + */ +FormatTest.prototype['pattern_with_digits_and_delimiter'] = undefined; + + + + export default FormatTest; diff --git a/samples/client/petstore/javascript-apollo/src/model/HasOnlyReadOnly.js b/samples/client/petstore/javascript-apollo/src/model/HasOnlyReadOnly.js index 213fab56e260..57c9173723e7 100644 --- a/samples/client/petstore/javascript-apollo/src/model/HasOnlyReadOnly.js +++ b/samples/client/petstore/javascript-apollo/src/model/HasOnlyReadOnly.js @@ -19,19 +19,6 @@ import ApiClient from '../ApiClient'; * @version 1.0.0 */ class HasOnlyReadOnly { - /** - * @member {String} bar - * @type {String} - */ - bar; - /** - * @member {String} foo - * @type {String} - */ - foo; - - - /** * Constructs a new HasOnlyReadOnly. * @alias module:model/HasOnlyReadOnly @@ -69,8 +56,23 @@ class HasOnlyReadOnly { } return obj; } + + } +/** + * @member {String} bar + */ +HasOnlyReadOnly.prototype['bar'] = undefined; + +/** + * @member {String} foo + */ +HasOnlyReadOnly.prototype['foo'] = undefined; + + + + export default HasOnlyReadOnly; diff --git a/samples/client/petstore/javascript-apollo/src/model/HealthCheckResult.js b/samples/client/petstore/javascript-apollo/src/model/HealthCheckResult.js index 347404266656..2dd62c2a267b 100644 --- a/samples/client/petstore/javascript-apollo/src/model/HealthCheckResult.js +++ b/samples/client/petstore/javascript-apollo/src/model/HealthCheckResult.js @@ -19,14 +19,6 @@ import ApiClient from '../ApiClient'; * @version 1.0.0 */ class HealthCheckResult { - /** - * @member {String} NullableMessage - * @type {String} - */ - NullableMessage; - - - /** * Constructs a new HealthCheckResult. * Just a string to inform instance is up and running. Make it nullable in hope to get it as pointer in generated model. @@ -62,8 +54,18 @@ class HealthCheckResult { } return obj; } + + } +/** + * @member {String} NullableMessage + */ +HealthCheckResult.prototype['NullableMessage'] = undefined; + + + + export default HealthCheckResult; diff --git a/samples/client/petstore/javascript-apollo/src/model/List.js b/samples/client/petstore/javascript-apollo/src/model/List.js index cc2ab05c62fe..18d6a258491a 100644 --- a/samples/client/petstore/javascript-apollo/src/model/List.js +++ b/samples/client/petstore/javascript-apollo/src/model/List.js @@ -19,14 +19,6 @@ import ApiClient from '../ApiClient'; * @version 1.0.0 */ class List { - /** - * @member {String} 123-list - * @type {String} - */ - 123-list; - - - /** * Constructs a new List. * @alias module:model/List @@ -61,8 +53,18 @@ class List { } return obj; } + + } +/** + * @member {String} 123-list + */ +List.prototype['123-list'] = undefined; + + + + export default List; diff --git a/samples/client/petstore/javascript-apollo/src/model/MapTest.js b/samples/client/petstore/javascript-apollo/src/model/MapTest.js index d693293a8052..3113ad56bd4e 100644 --- a/samples/client/petstore/javascript-apollo/src/model/MapTest.js +++ b/samples/client/petstore/javascript-apollo/src/model/MapTest.js @@ -19,29 +19,6 @@ import ApiClient from '../ApiClient'; * @version 1.0.0 */ class MapTest { - /** - * @member {Object.>} map_map_of_string - * @type {Object.>} - */ - map_map_of_string; - /** - * @member {Object.} map_of_enum_string - * @type {Object.} - */ - map_of_enum_string; - /** - * @member {Object.} direct_map - * @type {Object.} - */ - direct_map; - /** - * @member {Object.} indirect_map - * @type {Object.} - */ - indirect_map; - - - /** * Constructs a new MapTest. * @alias module:model/MapTest @@ -85,8 +62,33 @@ class MapTest { } return obj; } + + } +/** + * @member {Object.>} map_map_of_string + */ +MapTest.prototype['map_map_of_string'] = undefined; + +/** + * @member {Object.} map_of_enum_string + */ +MapTest.prototype['map_of_enum_string'] = undefined; + +/** + * @member {Object.} direct_map + */ +MapTest.prototype['direct_map'] = undefined; + +/** + * @member {Object.} indirect_map + */ +MapTest.prototype['indirect_map'] = undefined; + + + + /** * Allowed values for the inner property. diff --git a/samples/client/petstore/javascript-apollo/src/model/MixedPropertiesAndAdditionalPropertiesClass.js b/samples/client/petstore/javascript-apollo/src/model/MixedPropertiesAndAdditionalPropertiesClass.js index 44745a989fb5..7cd9ca844f9e 100644 --- a/samples/client/petstore/javascript-apollo/src/model/MixedPropertiesAndAdditionalPropertiesClass.js +++ b/samples/client/petstore/javascript-apollo/src/model/MixedPropertiesAndAdditionalPropertiesClass.js @@ -20,24 +20,6 @@ import Animal from './Animal'; * @version 1.0.0 */ class MixedPropertiesAndAdditionalPropertiesClass { - /** - * @member {String} uuid - * @type {String} - */ - uuid; - /** - * @member {Date} dateTime - * @type {Date} - */ - dateTime; - /** - * @member {Object.} map - * @type {Object.} - */ - map; - - - /** * Constructs a new MixedPropertiesAndAdditionalPropertiesClass. * @alias module:model/MixedPropertiesAndAdditionalPropertiesClass @@ -78,8 +60,28 @@ class MixedPropertiesAndAdditionalPropertiesClass { } return obj; } + + } +/** + * @member {String} uuid + */ +MixedPropertiesAndAdditionalPropertiesClass.prototype['uuid'] = undefined; + +/** + * @member {Date} dateTime + */ +MixedPropertiesAndAdditionalPropertiesClass.prototype['dateTime'] = undefined; + +/** + * @member {Object.} map + */ +MixedPropertiesAndAdditionalPropertiesClass.prototype['map'] = undefined; + + + + export default MixedPropertiesAndAdditionalPropertiesClass; diff --git a/samples/client/petstore/javascript-apollo/src/model/Model200Response.js b/samples/client/petstore/javascript-apollo/src/model/Model200Response.js index 09b5074cb7a8..88daaba2ebb0 100644 --- a/samples/client/petstore/javascript-apollo/src/model/Model200Response.js +++ b/samples/client/petstore/javascript-apollo/src/model/Model200Response.js @@ -19,19 +19,6 @@ import ApiClient from '../ApiClient'; * @version 1.0.0 */ class Model200Response { - /** - * @member {Number} name - * @type {Number} - */ - name; - /** - * @member {String} class - * @type {String} - */ - class; - - - /** * Constructs a new Model200Response. * Model for testing model name starting with number @@ -70,8 +57,23 @@ class Model200Response { } return obj; } + + } +/** + * @member {Number} name + */ +Model200Response.prototype['name'] = undefined; + +/** + * @member {String} class + */ +Model200Response.prototype['class'] = undefined; + + + + export default Model200Response; diff --git a/samples/client/petstore/javascript-apollo/src/model/Name.js b/samples/client/petstore/javascript-apollo/src/model/Name.js index a8652d87cf4f..740d4bad15b3 100644 --- a/samples/client/petstore/javascript-apollo/src/model/Name.js +++ b/samples/client/petstore/javascript-apollo/src/model/Name.js @@ -19,29 +19,6 @@ import ApiClient from '../ApiClient'; * @version 1.0.0 */ class Name { - /** - * @member {Number} name - * @type {Number} - */ - name; - /** - * @member {Number} snake_case - * @type {Number} - */ - snake_case; - /** - * @member {String} property - * @type {String} - */ - property; - /** - * @member {Number} 123Number - * @type {Number} - */ - 123Number; - - - /** * Constructs a new Name. * Model for testing model name same as property name @@ -88,8 +65,33 @@ class Name { } return obj; } + + } +/** + * @member {Number} name + */ +Name.prototype['name'] = undefined; + +/** + * @member {Number} snake_case + */ +Name.prototype['snake_case'] = undefined; + +/** + * @member {String} property + */ +Name.prototype['property'] = undefined; + +/** + * @member {Number} 123Number + */ +Name.prototype['123Number'] = undefined; + + + + export default Name; diff --git a/samples/client/petstore/javascript-apollo/src/model/NullableClass.js b/samples/client/petstore/javascript-apollo/src/model/NullableClass.js index 3280b0f79782..12a0f2509b6c 100644 --- a/samples/client/petstore/javascript-apollo/src/model/NullableClass.js +++ b/samples/client/petstore/javascript-apollo/src/model/NullableClass.js @@ -19,69 +19,6 @@ import ApiClient from '../ApiClient'; * @version 1.0.0 */ class NullableClass { - /** - * @member {Number} integer_prop - * @type {Number} - */ - integer_prop; - /** - * @member {Number} number_prop - * @type {Number} - */ - number_prop; - /** - * @member {Boolean} boolean_prop - * @type {Boolean} - */ - boolean_prop; - /** - * @member {String} string_prop - * @type {String} - */ - string_prop; - /** - * @member {Date} date_prop - * @type {Date} - */ - date_prop; - /** - * @member {Date} datetime_prop - * @type {Date} - */ - datetime_prop; - /** - * @member {Array.} array_nullable_prop - * @type {Array.} - */ - array_nullable_prop; - /** - * @member {Array.} array_and_items_nullable_prop - * @type {Array.} - */ - array_and_items_nullable_prop; - /** - * @member {Array.} array_items_nullable - * @type {Array.} - */ - array_items_nullable; - /** - * @member {Object.} object_nullable_prop - * @type {Object.} - */ - object_nullable_prop; - /** - * @member {Object.} object_and_items_nullable_prop - * @type {Object.} - */ - object_and_items_nullable_prop; - /** - * @member {Object.} object_items_nullable - * @type {Object.} - */ - object_items_nullable; - - - /** * Constructs a new NullableClass. * @alias module:model/NullableClass @@ -153,8 +90,73 @@ class NullableClass { } return obj; } + + } +/** + * @member {Number} integer_prop + */ +NullableClass.prototype['integer_prop'] = undefined; + +/** + * @member {Number} number_prop + */ +NullableClass.prototype['number_prop'] = undefined; + +/** + * @member {Boolean} boolean_prop + */ +NullableClass.prototype['boolean_prop'] = undefined; + +/** + * @member {String} string_prop + */ +NullableClass.prototype['string_prop'] = undefined; + +/** + * @member {Date} date_prop + */ +NullableClass.prototype['date_prop'] = undefined; + +/** + * @member {Date} datetime_prop + */ +NullableClass.prototype['datetime_prop'] = undefined; + +/** + * @member {Array.} array_nullable_prop + */ +NullableClass.prototype['array_nullable_prop'] = undefined; + +/** + * @member {Array.} array_and_items_nullable_prop + */ +NullableClass.prototype['array_and_items_nullable_prop'] = undefined; + +/** + * @member {Array.} array_items_nullable + */ +NullableClass.prototype['array_items_nullable'] = undefined; + +/** + * @member {Object.} object_nullable_prop + */ +NullableClass.prototype['object_nullable_prop'] = undefined; + +/** + * @member {Object.} object_and_items_nullable_prop + */ +NullableClass.prototype['object_and_items_nullable_prop'] = undefined; + +/** + * @member {Object.} object_items_nullable + */ +NullableClass.prototype['object_items_nullable'] = undefined; + + + + export default NullableClass; diff --git a/samples/client/petstore/javascript-apollo/src/model/NumberOnly.js b/samples/client/petstore/javascript-apollo/src/model/NumberOnly.js index a0f97c404a02..449e08bd9a98 100644 --- a/samples/client/petstore/javascript-apollo/src/model/NumberOnly.js +++ b/samples/client/petstore/javascript-apollo/src/model/NumberOnly.js @@ -19,14 +19,6 @@ import ApiClient from '../ApiClient'; * @version 1.0.0 */ class NumberOnly { - /** - * @member {Number} JustNumber - * @type {Number} - */ - JustNumber; - - - /** * Constructs a new NumberOnly. * @alias module:model/NumberOnly @@ -61,8 +53,18 @@ class NumberOnly { } return obj; } + + } +/** + * @member {Number} JustNumber + */ +NumberOnly.prototype['JustNumber'] = undefined; + + + + export default NumberOnly; diff --git a/samples/client/petstore/javascript-apollo/src/model/ObjectWithDeprecatedFields.js b/samples/client/petstore/javascript-apollo/src/model/ObjectWithDeprecatedFields.js index 492ab8b1cced..a3d0d4009430 100644 --- a/samples/client/petstore/javascript-apollo/src/model/ObjectWithDeprecatedFields.js +++ b/samples/client/petstore/javascript-apollo/src/model/ObjectWithDeprecatedFields.js @@ -20,29 +20,6 @@ import DeprecatedObject from './DeprecatedObject'; * @version 1.0.0 */ class ObjectWithDeprecatedFields { - /** - * @member {String} uuid - * @type {String} - */ - uuid; - /** - * @member {Number} id - * @type {Number} - */ - id; - /** - * @member {module:model/DeprecatedObject} deprecatedRef - * @type {module:model/DeprecatedObject} - */ - deprecatedRef; - /** - * @member {Array.} bars - * @type {Array.} - */ - bars; - - - /** * Constructs a new ObjectWithDeprecatedFields. * @alias module:model/ObjectWithDeprecatedFields @@ -86,8 +63,33 @@ class ObjectWithDeprecatedFields { } return obj; } + + } +/** + * @member {String} uuid + */ +ObjectWithDeprecatedFields.prototype['uuid'] = undefined; + +/** + * @member {Number} id + */ +ObjectWithDeprecatedFields.prototype['id'] = undefined; + +/** + * @member {module:model/DeprecatedObject} deprecatedRef + */ +ObjectWithDeprecatedFields.prototype['deprecatedRef'] = undefined; + +/** + * @member {Array.} bars + */ +ObjectWithDeprecatedFields.prototype['bars'] = undefined; + + + + export default ObjectWithDeprecatedFields; diff --git a/samples/client/petstore/javascript-apollo/src/model/Order.js b/samples/client/petstore/javascript-apollo/src/model/Order.js index c1656f9e642a..1d28748e822c 100644 --- a/samples/client/petstore/javascript-apollo/src/model/Order.js +++ b/samples/client/petstore/javascript-apollo/src/model/Order.js @@ -19,40 +19,6 @@ import ApiClient from '../ApiClient'; * @version 1.0.0 */ class Order { - /** - * @member {Number} id - * @type {Number} - */ - id; - /** - * @member {Number} petId - * @type {Number} - */ - petId; - /** - * @member {Number} quantity - * @type {Number} - */ - quantity; - /** - * @member {Date} shipDate - * @type {Date} - */ - shipDate; - /** - * @member {module:model/Order.StatusEnum} status - * @type {module:model/Order.StatusEnum} - */ - status; - /** - * @member {Boolean} complete - * @type {Boolean} - * @default false - */ - complete = false; - - - /** * Constructs a new Order. * @alias module:model/Order @@ -102,8 +68,45 @@ class Order { } return obj; } + + } +/** + * @member {Number} id + */ +Order.prototype['id'] = undefined; + +/** + * @member {Number} petId + */ +Order.prototype['petId'] = undefined; + +/** + * @member {Number} quantity + */ +Order.prototype['quantity'] = undefined; + +/** + * @member {Date} shipDate + */ +Order.prototype['shipDate'] = undefined; + +/** + * Order Status + * @member {module:model/Order.StatusEnum} status + */ +Order.prototype['status'] = undefined; + +/** + * @member {Boolean} complete + * @default false + */ +Order.prototype['complete'] = false; + + + + /** * Allowed values for the status property. diff --git a/samples/client/petstore/javascript-apollo/src/model/OuterComposite.js b/samples/client/petstore/javascript-apollo/src/model/OuterComposite.js index f3cfe74ff484..cc4ed6c172d9 100644 --- a/samples/client/petstore/javascript-apollo/src/model/OuterComposite.js +++ b/samples/client/petstore/javascript-apollo/src/model/OuterComposite.js @@ -19,24 +19,6 @@ import ApiClient from '../ApiClient'; * @version 1.0.0 */ class OuterComposite { - /** - * @member {Number} my_number - * @type {Number} - */ - my_number; - /** - * @member {String} my_string - * @type {String} - */ - my_string; - /** - * @member {Boolean} my_boolean - * @type {Boolean} - */ - my_boolean; - - - /** * Constructs a new OuterComposite. * @alias module:model/OuterComposite @@ -77,8 +59,28 @@ class OuterComposite { } return obj; } + + } +/** + * @member {Number} my_number + */ +OuterComposite.prototype['my_number'] = undefined; + +/** + * @member {String} my_string + */ +OuterComposite.prototype['my_string'] = undefined; + +/** + * @member {Boolean} my_boolean + */ +OuterComposite.prototype['my_boolean'] = undefined; + + + + export default OuterComposite; diff --git a/samples/client/petstore/javascript-apollo/src/model/OuterObjectWithEnumProperty.js b/samples/client/petstore/javascript-apollo/src/model/OuterObjectWithEnumProperty.js index df9dc45a4d9e..d2ef0e043715 100644 --- a/samples/client/petstore/javascript-apollo/src/model/OuterObjectWithEnumProperty.js +++ b/samples/client/petstore/javascript-apollo/src/model/OuterObjectWithEnumProperty.js @@ -20,14 +20,6 @@ import OuterEnumInteger from './OuterEnumInteger'; * @version 1.0.0 */ class OuterObjectWithEnumProperty { - /** - * @member {module:model/OuterEnumInteger} value - * @type {module:model/OuterEnumInteger} - */ - value; - - - /** * Constructs a new OuterObjectWithEnumProperty. * @alias module:model/OuterObjectWithEnumProperty @@ -64,8 +56,18 @@ class OuterObjectWithEnumProperty { } return obj; } + + } +/** + * @member {module:model/OuterEnumInteger} value + */ +OuterObjectWithEnumProperty.prototype['value'] = undefined; + + + + export default OuterObjectWithEnumProperty; diff --git a/samples/client/petstore/javascript-apollo/src/model/Pet.js b/samples/client/petstore/javascript-apollo/src/model/Pet.js index 89395753fc3d..b88e5d869f62 100644 --- a/samples/client/petstore/javascript-apollo/src/model/Pet.js +++ b/samples/client/petstore/javascript-apollo/src/model/Pet.js @@ -21,39 +21,6 @@ import Tag from './Tag'; * @version 1.0.0 */ class Pet { - /** - * @member {Number} id - * @type {Number} - */ - id; - /** - * @member {module:model/Category} category - * @type {module:model/Category} - */ - category; - /** - * @member {String} name - * @type {String} - */ - name; - /** - * @member {Array.} photoUrls - * @type {Array.} - */ - photoUrls; - /** - * @member {Array.} tags - * @type {Array.} - */ - tags; - /** - * @member {module:model/Pet.StatusEnum} status - * @type {module:model/Pet.StatusEnum} - */ - status; - - - /** * Constructs a new Pet. * @alias module:model/Pet @@ -107,8 +74,44 @@ class Pet { } return obj; } + + } +/** + * @member {Number} id + */ +Pet.prototype['id'] = undefined; + +/** + * @member {module:model/Category} category + */ +Pet.prototype['category'] = undefined; + +/** + * @member {String} name + */ +Pet.prototype['name'] = undefined; + +/** + * @member {Array.} photoUrls + */ +Pet.prototype['photoUrls'] = undefined; + +/** + * @member {Array.} tags + */ +Pet.prototype['tags'] = undefined; + +/** + * pet status in the store + * @member {module:model/Pet.StatusEnum} status + */ +Pet.prototype['status'] = undefined; + + + + /** * Allowed values for the status property. diff --git a/samples/client/petstore/javascript-apollo/src/model/ReadOnlyFirst.js b/samples/client/petstore/javascript-apollo/src/model/ReadOnlyFirst.js index f23041eeb3b0..8e2a39cf2aeb 100644 --- a/samples/client/petstore/javascript-apollo/src/model/ReadOnlyFirst.js +++ b/samples/client/petstore/javascript-apollo/src/model/ReadOnlyFirst.js @@ -19,19 +19,6 @@ import ApiClient from '../ApiClient'; * @version 1.0.0 */ class ReadOnlyFirst { - /** - * @member {String} bar - * @type {String} - */ - bar; - /** - * @member {String} baz - * @type {String} - */ - baz; - - - /** * Constructs a new ReadOnlyFirst. * @alias module:model/ReadOnlyFirst @@ -69,8 +56,23 @@ class ReadOnlyFirst { } return obj; } + + } +/** + * @member {String} bar + */ +ReadOnlyFirst.prototype['bar'] = undefined; + +/** + * @member {String} baz + */ +ReadOnlyFirst.prototype['baz'] = undefined; + + + + export default ReadOnlyFirst; diff --git a/samples/client/petstore/javascript-apollo/src/model/Return.js b/samples/client/petstore/javascript-apollo/src/model/Return.js index c980f45f9696..304ebb46f045 100644 --- a/samples/client/petstore/javascript-apollo/src/model/Return.js +++ b/samples/client/petstore/javascript-apollo/src/model/Return.js @@ -19,14 +19,6 @@ import ApiClient from '../ApiClient'; * @version 1.0.0 */ class Return { - /** - * @member {Number} return - * @type {Number} - */ - return; - - - /** * Constructs a new Return. * Model for testing reserved words @@ -62,8 +54,18 @@ class Return { } return obj; } + + } +/** + * @member {Number} return + */ +Return.prototype['return'] = undefined; + + + + export default Return; diff --git a/samples/client/petstore/javascript-apollo/src/model/SpecialModelName.js b/samples/client/petstore/javascript-apollo/src/model/SpecialModelName.js index d3b7e703a201..45ba7d7ea09c 100644 --- a/samples/client/petstore/javascript-apollo/src/model/SpecialModelName.js +++ b/samples/client/petstore/javascript-apollo/src/model/SpecialModelName.js @@ -19,14 +19,6 @@ import ApiClient from '../ApiClient'; * @version 1.0.0 */ class SpecialModelName { - /** - * @member {Number} $special[property.name] - * @type {Number} - */ - $special[property.name]; - - - /** * Constructs a new SpecialModelName. * @alias module:model/SpecialModelName @@ -61,8 +53,18 @@ class SpecialModelName { } return obj; } + + } +/** + * @member {Number} $special[property.name] + */ +SpecialModelName.prototype['$special[property.name]'] = undefined; + + + + export default SpecialModelName; diff --git a/samples/client/petstore/javascript-apollo/src/model/Tag.js b/samples/client/petstore/javascript-apollo/src/model/Tag.js index b0ab6fab4e05..3330530c0c23 100644 --- a/samples/client/petstore/javascript-apollo/src/model/Tag.js +++ b/samples/client/petstore/javascript-apollo/src/model/Tag.js @@ -19,19 +19,6 @@ import ApiClient from '../ApiClient'; * @version 1.0.0 */ class Tag { - /** - * @member {Number} id - * @type {Number} - */ - id; - /** - * @member {String} name - * @type {String} - */ - name; - - - /** * Constructs a new Tag. * @alias module:model/Tag @@ -69,8 +56,23 @@ class Tag { } return obj; } + + } +/** + * @member {Number} id + */ +Tag.prototype['id'] = undefined; + +/** + * @member {String} name + */ +Tag.prototype['name'] = undefined; + + + + export default Tag; diff --git a/samples/client/petstore/javascript-apollo/src/model/User.js b/samples/client/petstore/javascript-apollo/src/model/User.js index c7ad286ccaa8..473bf7c78bc4 100644 --- a/samples/client/petstore/javascript-apollo/src/model/User.js +++ b/samples/client/petstore/javascript-apollo/src/model/User.js @@ -19,49 +19,6 @@ import ApiClient from '../ApiClient'; * @version 1.0.0 */ class User { - /** - * @member {Number} id - * @type {Number} - */ - id; - /** - * @member {String} username - * @type {String} - */ - username; - /** - * @member {String} firstName - * @type {String} - */ - firstName; - /** - * @member {String} lastName - * @type {String} - */ - lastName; - /** - * @member {String} email - * @type {String} - */ - email; - /** - * @member {String} password - * @type {String} - */ - password; - /** - * @member {String} phone - * @type {String} - */ - phone; - /** - * @member {Number} userStatus - * @type {Number} - */ - userStatus; - - - /** * Constructs a new User. * @alias module:model/User @@ -117,8 +74,54 @@ class User { } return obj; } + + } +/** + * @member {Number} id + */ +User.prototype['id'] = undefined; + +/** + * @member {String} username + */ +User.prototype['username'] = undefined; + +/** + * @member {String} firstName + */ +User.prototype['firstName'] = undefined; + +/** + * @member {String} lastName + */ +User.prototype['lastName'] = undefined; + +/** + * @member {String} email + */ +User.prototype['email'] = undefined; + +/** + * @member {String} password + */ +User.prototype['password'] = undefined; + +/** + * @member {String} phone + */ +User.prototype['phone'] = undefined; + +/** + * User Status + * @member {Number} userStatus + */ +User.prototype['userStatus'] = undefined; + + + + export default User; From d4a644a753525508134ab0781fe16c32da5eebac Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jo=C3=A3o=20Neto?= Date: Thu, 25 Aug 2022 11:03:41 +0200 Subject: [PATCH 14/23] Create javascript-apollo-deprecated.md --- .../javascript-apollo-deprecated.md | 274 ++++++++++++++++++ 1 file changed, 274 insertions(+) create mode 100644 docs/generators/javascript-apollo-deprecated.md diff --git a/docs/generators/javascript-apollo-deprecated.md b/docs/generators/javascript-apollo-deprecated.md new file mode 100644 index 000000000000..ffc30f726ab0 --- /dev/null +++ b/docs/generators/javascript-apollo-deprecated.md @@ -0,0 +1,274 @@ +--- +title: Documentation for the javascript-apollo-deprecated Generator +--- + +## METADATA + +| Property | Value | Notes | +| -------- | ----- | ----- | +| generator name | javascript-apollo-deprecated | pass this to the generate command after -g | +| generator stability | DEPRECATED | | +| generator type | CLIENT | | +| generator language | Javascript | | +| generator default templating engine | mustache | | +| helpTxt | Generates a JavaScript client library (beta) using Apollo RESTDatasource. | | + +## CONFIG OPTIONS +These options may be applied as additional-properties (cli) or configOptions (plugins). Refer to [configuration docs](https://openapi-generator.tech/docs/configuration) for more details. + +| Option | Description | Values | Default | +| ------ | ----------- | ------ | ------- | +|allowUnicodeIdentifiers|boolean, toggles whether unicode identifiers are allowed in names or not, default is false| |false| +|apiPackage|package for generated api classes| |null| +|disallowAdditionalPropertiesIfNotPresent|If false, the 'additionalProperties' implementation (set to true by default) is compliant with the OAS and JSON schema specifications. If true (default), keep the old (incorrect) behaviour that 'additionalProperties' is set to false by default.|
**false**
The 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications.
**true**
Keep the old (incorrect) behaviour that 'additionalProperties' is set to false by default.
|true| +|emitJSDoc|generate JSDoc comments| |true| +|emitModelMethods|generate getters and setters for model properties| |false| +|ensureUniqueParams|Whether to ensure parameter names are unique in an operation (rename parameters that are not).| |true| +|enumUnknownDefaultCase|If the server adds new enum cases, that are unknown by an old spec/client, the client will fail to parse the network response.With this option enabled, each enum will have a new case, 'unknown_default_open_api', so that when the server sends an enum case that is not known by the client/spec, they can safely fallback to this case.|
**false**
No changes to the enum's are made, this is the default option.
**true**
With this option enabled, each enum will have a new case, 'unknown_default_open_api', so that when the enum case sent by the server is not known by the client/spec, can safely be decoded to this case.
|false| +|hideGenerationTimestamp|Hides the generation timestamp when files are generated.| |true| +|invokerPackage|root package for generated code| |null| +|legacyDiscriminatorBehavior|Set to false for generators with better support for discriminators. (Python, Java, Go, PowerShell, C#have this enabled by default).|
**true**
The mapping in the discriminator includes descendent schemas that allOf inherit from self and the discriminator mapping schemas in the OAS document.
**false**
The mapping in the discriminator includes any descendent schemas that allOf inherit from self, any oneOf schemas, any anyOf schemas, any x-discriminator-values, and the discriminator mapping schemas in the OAS document AND Codegen validates that oneOf and anyOf schemas contain the required discriminator and throws an error if the discriminator is missing.
|true| +|licenseName|name of the license the project uses (Default: using info.license.name)| |null| +|modelPackage|package for generated models| |null| +|modelPropertyNaming|Naming convention for the property: 'camelCase', 'PascalCase', 'snake_case' and 'original', which keeps the original name| |camelCase| +|moduleName|module name for AMD, Node or globals (Default: generated from <projectName>)| |null| +|npmRepository|Use this property to set an url your private npmRepo in the package.json| |null| +|prependFormOrBodyParameters|Add form or body parameters to the beginning of the parameter list.| |false| +|projectDescription|description of the project (Default: using info.description or "Client library of <projectName>")| |null| +|projectName|name of the project (Default: generated from info.title or "openapi-js-client")| |null| +|projectVersion|version of the project (Default: using info.version or "1.0.0")| |null| +|sortModelPropertiesByRequiredFlag|Sort model properties to place required parameters before optional parameters.| |true| +|sortParamsByRequiredFlag|Sort method arguments to place required parameters before optional parameters.| |true| +|sourceFolder|source folder for generated code| |src| +|useInheritance|use JavaScript prototype chains & delegation for inheritance| |true| +|usePromises|use Promises as return values from the client API, instead of superagent callbacks| |false| + +## IMPORT MAPPING + +| Type/Alias | Imports | +| ---------- | ------- | + + +## INSTANTIATION TYPES + +| Type/Alias | Instantiated By | +| ---------- | --------------- | +|array|Array| +|list|Array| +|map|Object| +|set|Array| + + +## LANGUAGE PRIMITIVES + +
    +
  • Array
  • +
  • Blob
  • +
  • Boolean
  • +
  • Date
  • +
  • File
  • +
  • Number
  • +
  • Object
  • +
  • String
  • +
+ +## RESERVED WORDS + +
    +
  • Array
  • +
  • Date
  • +
  • Infinity
  • +
  • Math
  • +
  • NaN
  • +
  • Number
  • +
  • Object
  • +
  • String
  • +
  • abstract
  • +
  • arguments
  • +
  • boolean
  • +
  • break
  • +
  • byte
  • +
  • case
  • +
  • catch
  • +
  • char
  • +
  • class
  • +
  • const
  • +
  • continue
  • +
  • debugger
  • +
  • default
  • +
  • delete
  • +
  • do
  • +
  • double
  • +
  • else
  • +
  • enum
  • +
  • eval
  • +
  • export
  • +
  • extends
  • +
  • false
  • +
  • final
  • +
  • finally
  • +
  • float
  • +
  • for
  • +
  • function
  • +
  • goto
  • +
  • hasOwnProperty
  • +
  • if
  • +
  • implements
  • +
  • import
  • +
  • in
  • +
  • instanceof
  • +
  • int
  • +
  • interface
  • +
  • isFinite
  • +
  • isNaN
  • +
  • isPrototypeOf
  • +
  • let
  • +
  • long
  • +
  • native
  • +
  • new
  • +
  • null
  • +
  • package
  • +
  • private
  • +
  • protected
  • +
  • prototype
  • +
  • public
  • +
  • return
  • +
  • short
  • +
  • static
  • +
  • super
  • +
  • switch
  • +
  • synchronized
  • +
  • this
  • +
  • throw
  • +
  • throws
  • +
  • toString
  • +
  • transient
  • +
  • true
  • +
  • try
  • +
  • typeof
  • +
  • undefined
  • +
  • valueOf
  • +
  • var
  • +
  • void
  • +
  • volatile
  • +
  • while
  • +
  • with
  • +
  • yield
  • +
+ +## FEATURE SET + + +### Client Modification Feature +| Name | Supported | Defined By | +| ---- | --------- | ---------- | +|BasePath|✗|ToolingExtension +|Authorizations|✗|ToolingExtension +|UserAgent|✗|ToolingExtension +|MockServer|✗|ToolingExtension + +### Data Type Feature +| Name | Supported | Defined By | +| ---- | --------- | ---------- | +|Custom|✗|OAS2,OAS3 +|Int32|✓|OAS2,OAS3 +|Int64|✓|OAS2,OAS3 +|Float|✓|OAS2,OAS3 +|Double|✓|OAS2,OAS3 +|Decimal|✓|ToolingExtension +|String|✓|OAS2,OAS3 +|Byte|✓|OAS2,OAS3 +|Binary|✓|OAS2,OAS3 +|Boolean|✓|OAS2,OAS3 +|Date|✓|OAS2,OAS3 +|DateTime|✓|OAS2,OAS3 +|Password|✓|OAS2,OAS3 +|File|✓|OAS2 +|Uuid|✗| +|Array|✓|OAS2,OAS3 +|Null|✗|OAS3 +|AnyType|✗|OAS2,OAS3 +|Object|✓|OAS2,OAS3 +|Maps|✓|ToolingExtension +|CollectionFormat|✓|OAS2 +|CollectionFormatMulti|✓|OAS2 +|Enum|✓|OAS2,OAS3 +|ArrayOfEnum|✓|ToolingExtension +|ArrayOfModel|✓|ToolingExtension +|ArrayOfCollectionOfPrimitives|✓|ToolingExtension +|ArrayOfCollectionOfModel|✓|ToolingExtension +|ArrayOfCollectionOfEnum|✓|ToolingExtension +|MapOfEnum|✓|ToolingExtension +|MapOfModel|✓|ToolingExtension +|MapOfCollectionOfPrimitives|✓|ToolingExtension +|MapOfCollectionOfModel|✓|ToolingExtension +|MapOfCollectionOfEnum|✓|ToolingExtension + +### Documentation Feature +| Name | Supported | Defined By | +| ---- | --------- | ---------- | +|Readme|✓|ToolingExtension +|Model|✓|ToolingExtension +|Api|✓|ToolingExtension + +### Global Feature +| Name | Supported | Defined By | +| ---- | --------- | ---------- | +|Host|✓|OAS2,OAS3 +|BasePath|✓|OAS2,OAS3 +|Info|✓|OAS2,OAS3 +|Schemes|✗|OAS2,OAS3 +|PartialSchemes|✓|OAS2,OAS3 +|Consumes|✓|OAS2 +|Produces|✓|OAS2 +|ExternalDocumentation|✓|OAS2,OAS3 +|Examples|✓|OAS2,OAS3 +|XMLStructureDefinitions|✗|OAS2,OAS3 +|MultiServer|✗|OAS3 +|ParameterizedServer|✗|OAS3 +|ParameterStyling|✗|OAS3 +|Callbacks|✓|OAS3 +|LinkObjects|✗|OAS3 + +### Parameter Feature +| Name | Supported | Defined By | +| ---- | --------- | ---------- | +|Path|✓|OAS2,OAS3 +|Query|✓|OAS2,OAS3 +|Header|✓|OAS2,OAS3 +|Body|✓|OAS2 +|FormUnencoded|✓|OAS2 +|FormMultipart|✓|OAS2 +|Cookie|✓|OAS3 + +### Schema Support Feature +| Name | Supported | Defined By | +| ---- | --------- | ---------- | +|Simple|✓|OAS2,OAS3 +|Composite|✓|OAS2,OAS3 +|Polymorphism|✓|OAS2,OAS3 +|Union|✗|OAS3 +|allOf|✗|OAS2,OAS3 +|anyOf|✗|OAS3 +|oneOf|✗|OAS3 +|not|✗|OAS3 + +### Security Feature +| Name | Supported | Defined By | +| ---- | --------- | ---------- | +|BasicAuth|✓|OAS2,OAS3 +|ApiKey|✓|OAS2,OAS3 +|OpenIDConnect|✗|OAS3 +|BearerToken|✓|OAS3 +|OAuth2_Implicit|✓|OAS2,OAS3 +|OAuth2_Password|✓|OAS2,OAS3 +|OAuth2_ClientCredentials|✓|OAS2,OAS3 +|OAuth2_AuthorizationCode|✓|OAS2,OAS3 + +### Wire Format Feature +| Name | Supported | Defined By | +| ---- | --------- | ---------- | +|JSON|✓|OAS2,OAS3 +|XML|✓|OAS2,OAS3 +|PROTOBUF|✗|ToolingExtension +|Custom|✗|OAS2,OAS3 From 6889903a35224c8a2ab4866ed43866cfec11edcb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jo=C3=A3o=20Neto?= Date: Thu, 25 Aug 2022 11:22:26 +0200 Subject: [PATCH 15/23] Updated javascript generator template's gitignore Updates .gitignore with that from https://github.com/github/gitignore/blob/main/Node.gitignore Main reason for the update is to ignore the 'dist' folder with compiled files by default. --- .../resources/Javascript/gitignore.mustache | 105 +++++++++++++++++- .../petstore/javascript-apollo/.gitignore | 105 +++++++++++++++++- .../client/petstore/javascript-es6/.gitignore | 105 +++++++++++++++++- .../javascript-promise-es6/.gitignore | 105 +++++++++++++++++- 4 files changed, 404 insertions(+), 16 deletions(-) diff --git a/modules/openapi-generator/src/main/resources/Javascript/gitignore.mustache b/modules/openapi-generator/src/main/resources/Javascript/gitignore.mustache index e920c16718d1..6a7d6d8ef6a9 100644 --- a/modules/openapi-generator/src/main/resources/Javascript/gitignore.mustache +++ b/modules/openapi-generator/src/main/resources/Javascript/gitignore.mustache @@ -2,32 +2,129 @@ logs *.log npm-debug.log* +yarn-debug.log* +yarn-error.log* +lerna-debug.log* +.pnpm-debug.log* + +# Diagnostic reports (https://nodejs.org/api/report.html) +report.[0-9]*.[0-9]*.[0-9]*.[0-9]*.json # Runtime data pids *.pid *.seed +*.pid.lock # Directory for instrumented libs generated by jscoverage/JSCover lib-cov # Coverage directory used by tools like istanbul coverage +*.lcov + +# nyc test coverage +.nyc_output -# Grunt intermediate storage (http://gruntjs.com/creating-plugins#storing-task-files) +# Grunt intermediate storage (https://gruntjs.com/creating-plugins#storing-task-files) .grunt +# Bower dependency directory (https://bower.io/) +bower_components + # node-waf configuration .lock-wscript -# Compiled binary addons (http://nodejs.org/api/addons.html) +# Compiled binary addons (https://nodejs.org/api/addons.html) build/Release -# Dependency directory -node_modules +# Dependency directories +node_modules/ +jspm_packages/ + +# Snowpack dependency directory (https://snowpack.dev/) +web_modules/ + +# TypeScript cache +*.tsbuildinfo # Optional npm cache directory .npm +# Optional eslint cache +.eslintcache + +# Optional stylelint cache +.stylelintcache + +# Microbundle cache +.rpt2_cache/ +.rts2_cache_cjs/ +.rts2_cache_es/ +.rts2_cache_umd/ + # Optional REPL history .node_repl_history + +# Output of 'npm pack' +*.tgz + +# Yarn Integrity file +.yarn-integrity + +# dotenv environment variable files +.env +.env.development.local +.env.test.local +.env.production.local +.env.local + +# parcel-bundler cache (https://parceljs.org/) +.cache +.parcel-cache + +# Next.js build output +.next +out + +# Nuxt.js build / generate output +.nuxt +dist + +# Gatsby files +.cache/ +# Comment in the public line in if your project uses Gatsby and not Next.js +# https://nextjs.org/blog/next-9-1#public-directory-support +# public + +# vuepress build output +.vuepress/dist + +# vuepress v2.x temp and cache directory +.temp +.cache + +# Docusaurus cache and generated files +.docusaurus + +# Serverless directories +.serverless/ + +# FuseBox cache +.fusebox/ + +# DynamoDB Local files +.dynamodb/ + +# TernJS port file +.tern-port + +# Stores VSCode versions used for testing VSCode extensions +.vscode-test + +# yarn v2 +.yarn/cache +.yarn/unplugged +.yarn/build-state.yml +.yarn/install-state.gz +.pnp.* \ No newline at end of file diff --git a/samples/client/petstore/javascript-apollo/.gitignore b/samples/client/petstore/javascript-apollo/.gitignore index e920c16718d1..6a7d6d8ef6a9 100644 --- a/samples/client/petstore/javascript-apollo/.gitignore +++ b/samples/client/petstore/javascript-apollo/.gitignore @@ -2,32 +2,129 @@ logs *.log npm-debug.log* +yarn-debug.log* +yarn-error.log* +lerna-debug.log* +.pnpm-debug.log* + +# Diagnostic reports (https://nodejs.org/api/report.html) +report.[0-9]*.[0-9]*.[0-9]*.[0-9]*.json # Runtime data pids *.pid *.seed +*.pid.lock # Directory for instrumented libs generated by jscoverage/JSCover lib-cov # Coverage directory used by tools like istanbul coverage +*.lcov + +# nyc test coverage +.nyc_output -# Grunt intermediate storage (http://gruntjs.com/creating-plugins#storing-task-files) +# Grunt intermediate storage (https://gruntjs.com/creating-plugins#storing-task-files) .grunt +# Bower dependency directory (https://bower.io/) +bower_components + # node-waf configuration .lock-wscript -# Compiled binary addons (http://nodejs.org/api/addons.html) +# Compiled binary addons (https://nodejs.org/api/addons.html) build/Release -# Dependency directory -node_modules +# Dependency directories +node_modules/ +jspm_packages/ + +# Snowpack dependency directory (https://snowpack.dev/) +web_modules/ + +# TypeScript cache +*.tsbuildinfo # Optional npm cache directory .npm +# Optional eslint cache +.eslintcache + +# Optional stylelint cache +.stylelintcache + +# Microbundle cache +.rpt2_cache/ +.rts2_cache_cjs/ +.rts2_cache_es/ +.rts2_cache_umd/ + # Optional REPL history .node_repl_history + +# Output of 'npm pack' +*.tgz + +# Yarn Integrity file +.yarn-integrity + +# dotenv environment variable files +.env +.env.development.local +.env.test.local +.env.production.local +.env.local + +# parcel-bundler cache (https://parceljs.org/) +.cache +.parcel-cache + +# Next.js build output +.next +out + +# Nuxt.js build / generate output +.nuxt +dist + +# Gatsby files +.cache/ +# Comment in the public line in if your project uses Gatsby and not Next.js +# https://nextjs.org/blog/next-9-1#public-directory-support +# public + +# vuepress build output +.vuepress/dist + +# vuepress v2.x temp and cache directory +.temp +.cache + +# Docusaurus cache and generated files +.docusaurus + +# Serverless directories +.serverless/ + +# FuseBox cache +.fusebox/ + +# DynamoDB Local files +.dynamodb/ + +# TernJS port file +.tern-port + +# Stores VSCode versions used for testing VSCode extensions +.vscode-test + +# yarn v2 +.yarn/cache +.yarn/unplugged +.yarn/build-state.yml +.yarn/install-state.gz +.pnp.* \ No newline at end of file diff --git a/samples/client/petstore/javascript-es6/.gitignore b/samples/client/petstore/javascript-es6/.gitignore index e920c16718d1..6a7d6d8ef6a9 100644 --- a/samples/client/petstore/javascript-es6/.gitignore +++ b/samples/client/petstore/javascript-es6/.gitignore @@ -2,32 +2,129 @@ logs *.log npm-debug.log* +yarn-debug.log* +yarn-error.log* +lerna-debug.log* +.pnpm-debug.log* + +# Diagnostic reports (https://nodejs.org/api/report.html) +report.[0-9]*.[0-9]*.[0-9]*.[0-9]*.json # Runtime data pids *.pid *.seed +*.pid.lock # Directory for instrumented libs generated by jscoverage/JSCover lib-cov # Coverage directory used by tools like istanbul coverage +*.lcov + +# nyc test coverage +.nyc_output -# Grunt intermediate storage (http://gruntjs.com/creating-plugins#storing-task-files) +# Grunt intermediate storage (https://gruntjs.com/creating-plugins#storing-task-files) .grunt +# Bower dependency directory (https://bower.io/) +bower_components + # node-waf configuration .lock-wscript -# Compiled binary addons (http://nodejs.org/api/addons.html) +# Compiled binary addons (https://nodejs.org/api/addons.html) build/Release -# Dependency directory -node_modules +# Dependency directories +node_modules/ +jspm_packages/ + +# Snowpack dependency directory (https://snowpack.dev/) +web_modules/ + +# TypeScript cache +*.tsbuildinfo # Optional npm cache directory .npm +# Optional eslint cache +.eslintcache + +# Optional stylelint cache +.stylelintcache + +# Microbundle cache +.rpt2_cache/ +.rts2_cache_cjs/ +.rts2_cache_es/ +.rts2_cache_umd/ + # Optional REPL history .node_repl_history + +# Output of 'npm pack' +*.tgz + +# Yarn Integrity file +.yarn-integrity + +# dotenv environment variable files +.env +.env.development.local +.env.test.local +.env.production.local +.env.local + +# parcel-bundler cache (https://parceljs.org/) +.cache +.parcel-cache + +# Next.js build output +.next +out + +# Nuxt.js build / generate output +.nuxt +dist + +# Gatsby files +.cache/ +# Comment in the public line in if your project uses Gatsby and not Next.js +# https://nextjs.org/blog/next-9-1#public-directory-support +# public + +# vuepress build output +.vuepress/dist + +# vuepress v2.x temp and cache directory +.temp +.cache + +# Docusaurus cache and generated files +.docusaurus + +# Serverless directories +.serverless/ + +# FuseBox cache +.fusebox/ + +# DynamoDB Local files +.dynamodb/ + +# TernJS port file +.tern-port + +# Stores VSCode versions used for testing VSCode extensions +.vscode-test + +# yarn v2 +.yarn/cache +.yarn/unplugged +.yarn/build-state.yml +.yarn/install-state.gz +.pnp.* \ No newline at end of file diff --git a/samples/client/petstore/javascript-promise-es6/.gitignore b/samples/client/petstore/javascript-promise-es6/.gitignore index e920c16718d1..6a7d6d8ef6a9 100644 --- a/samples/client/petstore/javascript-promise-es6/.gitignore +++ b/samples/client/petstore/javascript-promise-es6/.gitignore @@ -2,32 +2,129 @@ logs *.log npm-debug.log* +yarn-debug.log* +yarn-error.log* +lerna-debug.log* +.pnpm-debug.log* + +# Diagnostic reports (https://nodejs.org/api/report.html) +report.[0-9]*.[0-9]*.[0-9]*.[0-9]*.json # Runtime data pids *.pid *.seed +*.pid.lock # Directory for instrumented libs generated by jscoverage/JSCover lib-cov # Coverage directory used by tools like istanbul coverage +*.lcov + +# nyc test coverage +.nyc_output -# Grunt intermediate storage (http://gruntjs.com/creating-plugins#storing-task-files) +# Grunt intermediate storage (https://gruntjs.com/creating-plugins#storing-task-files) .grunt +# Bower dependency directory (https://bower.io/) +bower_components + # node-waf configuration .lock-wscript -# Compiled binary addons (http://nodejs.org/api/addons.html) +# Compiled binary addons (https://nodejs.org/api/addons.html) build/Release -# Dependency directory -node_modules +# Dependency directories +node_modules/ +jspm_packages/ + +# Snowpack dependency directory (https://snowpack.dev/) +web_modules/ + +# TypeScript cache +*.tsbuildinfo # Optional npm cache directory .npm +# Optional eslint cache +.eslintcache + +# Optional stylelint cache +.stylelintcache + +# Microbundle cache +.rpt2_cache/ +.rts2_cache_cjs/ +.rts2_cache_es/ +.rts2_cache_umd/ + # Optional REPL history .node_repl_history + +# Output of 'npm pack' +*.tgz + +# Yarn Integrity file +.yarn-integrity + +# dotenv environment variable files +.env +.env.development.local +.env.test.local +.env.production.local +.env.local + +# parcel-bundler cache (https://parceljs.org/) +.cache +.parcel-cache + +# Next.js build output +.next +out + +# Nuxt.js build / generate output +.nuxt +dist + +# Gatsby files +.cache/ +# Comment in the public line in if your project uses Gatsby and not Next.js +# https://nextjs.org/blog/next-9-1#public-directory-support +# public + +# vuepress build output +.vuepress/dist + +# vuepress v2.x temp and cache directory +.temp +.cache + +# Docusaurus cache and generated files +.docusaurus + +# Serverless directories +.serverless/ + +# FuseBox cache +.fusebox/ + +# DynamoDB Local files +.dynamodb/ + +# TernJS port file +.tern-port + +# Stores VSCode versions used for testing VSCode extensions +.vscode-test + +# yarn v2 +.yarn/cache +.yarn/unplugged +.yarn/build-state.yml +.yarn/install-state.gz +.pnp.* \ No newline at end of file From a4ed1c6696d8a439e6ac6fe4fc1c7e94699c74bc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jo=C3=A3o=20Neto?= Date: Thu, 25 Aug 2022 11:27:55 +0200 Subject: [PATCH 16/23] javascript generator: merge api_test template files The only difference is that Apollo is not designed for browser, so having a "if(browser)" check is useless, but doesn't hurt. --- .../javascript => }/api_test.mustache | 0 .../libraries/apollo/api_test.mustache | 52 ------------------- 2 files changed, 52 deletions(-) rename modules/openapi-generator/src/main/resources/Javascript/{libraries/javascript => }/api_test.mustache (100%) delete mode 100644 modules/openapi-generator/src/main/resources/Javascript/libraries/apollo/api_test.mustache diff --git a/modules/openapi-generator/src/main/resources/Javascript/libraries/javascript/api_test.mustache b/modules/openapi-generator/src/main/resources/Javascript/api_test.mustache similarity index 100% rename from modules/openapi-generator/src/main/resources/Javascript/libraries/javascript/api_test.mustache rename to modules/openapi-generator/src/main/resources/Javascript/api_test.mustache diff --git a/modules/openapi-generator/src/main/resources/Javascript/libraries/apollo/api_test.mustache b/modules/openapi-generator/src/main/resources/Javascript/libraries/apollo/api_test.mustache deleted file mode 100644 index ec22d00bef6b..000000000000 --- a/modules/openapi-generator/src/main/resources/Javascript/libraries/apollo/api_test.mustache +++ /dev/null @@ -1,52 +0,0 @@ -{{>licenseInfo}} -(function(root, factory) { - if (typeof define === 'function' && define.amd) { - // AMD. - define(['expect.js', process.cwd()+'/src/{{#invokerPackage}}{{.}}/{{/invokerPackage}}index'], factory); - } else if (typeof module === 'object' && module.exports) { - // CommonJS-like environments that support module.exports, like Node. - factory(require('expect.js'), require(process.cwd()+'/src/{{#invokerPackage}}{{.}}/{{/invokerPackage}}index')); - } -}(this, function(expect, {{moduleName}}) { - 'use strict'; - - var instance; - - beforeEach(function() { - instance = new {{moduleName}}.{{classname}}(); - }); - - var getProperty = function(object, getter, property) { - // Use getter method if present; otherwise, get the property directly. - if (typeof object[getter] === 'function') - return object[getter](); - else - return object[property]; - } - - var setProperty = function(object, setter, property, value) { - // Use setter method if present; otherwise, set the property directly. - if (typeof object[setter] === 'function') - object[setter](value); - else - object[property] = value; - } - - describe('{{classname}}', function() { -{{#operations}} -{{#operation}} - describe('{{operationId}}', function() { - it('should call {{operationId}} successfully', function(done) { - //uncomment below and update the code to test {{operationId}} - //instance.{{operationId}}(function(error) { - // if (error) throw error; - //expect().to.be(); - //}); - done(); - }); - }); -{{/operation}} -{{/operations}} - }); - -})); From f7f85ddcde5fac6be439d65718b4110ecec20dde Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jo=C3=A3o=20Neto?= Date: Thu, 25 Aug 2022 12:18:55 +0200 Subject: [PATCH 17/23] update docs --- docs/generators.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/generators.md b/docs/generators.md index 7a029b16b2aa..31ec676958ec 100644 --- a/docs/generators.md +++ b/docs/generators.md @@ -34,7 +34,7 @@ The following generators are available: * [java](generators/java.md) * [java-micronaut-client (beta)](generators/java-micronaut-client.md) * [javascript](generators/javascript.md) -* [javascript-apollo (deprecated)](generators/javascript-apollo.md) +* [javascript-apollo-deprecated (deprecated)](generators/javascript-apollo-deprecated.md) * [javascript-closure-angular](generators/javascript-closure-angular.md) * [javascript-flowtyped](generators/javascript-flowtyped.md) * [jaxrs-cxf-client](generators/jaxrs-cxf-client.md) From 90b57073a55d1c2c20f517f61b24ba0d9924e176 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jo=C3=A3o=20Neto?= Date: Fri, 26 Aug 2022 11:35:04 +0200 Subject: [PATCH 18/23] cleanup --- .../petstore/javascript/package-lock.json | 364 ------------------ 1 file changed, 364 deletions(-) delete mode 100644 samples/client/petstore/javascript/package-lock.json diff --git a/samples/client/petstore/javascript/package-lock.json b/samples/client/petstore/javascript/package-lock.json deleted file mode 100644 index ffa052e5d076..000000000000 --- a/samples/client/petstore/javascript/package-lock.json +++ /dev/null @@ -1,364 +0,0 @@ -{ - "name": "open_api_petstore", - "version": "1.0.0", - "lockfileVersion": 1, - "requires": true, - "dependencies": { - "asynckit": { - "version": "0.4.0", - "resolved": "https://artifactory.sri.com/artifactory/api/npm/Sunflower-NPM-all/asynckit/-/asynckit-0.4.0.tgz", - "integrity": "sha1-x57Zf380y48robyXkLzDZkdLS3k=" - }, - "combined-stream": { - "version": "1.0.6", - "resolved": "https://artifactory.sri.com/artifactory/api/npm/Sunflower-NPM-all/combined-stream/-/combined-stream-1.0.6.tgz", - "integrity": "sha1-cj599ugBrFYTETp+RFqbactjKBg=", - "requires": { - "delayed-stream": "~1.0.0" - } - }, - "commander": { - "version": "2.3.0", - "resolved": "https://artifactory.sri.com/artifactory/api/npm/Sunflower-NPM-all/commander/-/commander-2.3.0.tgz", - "integrity": "sha1-/UMOiJgy7DU7ms0d4hfBHLPu+HM=", - "dev": true - }, - "component-emitter": { - "version": "1.2.1", - "resolved": "https://artifactory.sri.com/artifactory/api/npm/Sunflower-NPM-all/component-emitter/-/component-emitter-1.2.1.tgz", - "integrity": "sha1-E3kY1teCg/ffemt8WmPhQOaUJeY=" - }, - "cookiejar": { - "version": "2.1.2", - "resolved": "https://artifactory.sri.com/artifactory/api/npm/Sunflower-NPM-all/cookiejar/-/cookiejar-2.1.2.tgz", - "integrity": "sha1-3YojVTB1L5iPmghE8/xYnjERElw=" - }, - "core-util-is": { - "version": "1.0.2", - "resolved": "https://artifactory.sri.com/artifactory/api/npm/Sunflower-NPM-all/core-util-is/-/core-util-is-1.0.2.tgz", - "integrity": "sha1-tf1UIgqivFq1eqtxQMlAdUUDwac=" - }, - "debug": { - "version": "3.1.0", - "resolved": "https://artifactory.sri.com/artifactory/api/npm/Sunflower-NPM-all/debug/-/debug-3.1.0.tgz", - "integrity": "sha1-W7WgZyYotkFJVmuhaBnmFRjGcmE=", - "requires": { - "ms": "2.0.0" - } - }, - "delayed-stream": { - "version": "1.0.0", - "resolved": "https://artifactory.sri.com/artifactory/api/npm/Sunflower-NPM-all/delayed-stream/-/delayed-stream-1.0.0.tgz", - "integrity": "sha1-3zrhmayt+31ECqrgsp4icrJOxhk=" - }, - "diff": { - "version": "1.4.0", - "resolved": "https://artifactory.sri.com/artifactory/api/npm/Sunflower-NPM-all/diff/-/diff-1.4.0.tgz", - "integrity": "sha1-fyjS657nsVqX79ic5j3P2qPMur8=", - "dev": true - }, - "escape-string-regexp": { - "version": "1.0.2", - "resolved": "https://artifactory.sri.com/artifactory/api/npm/Sunflower-NPM-all/escape-string-regexp/-/escape-string-regexp-1.0.2.tgz", - "integrity": "sha1-Tbwv5nTnGUnK8/smlc5/LcHZqNE=", - "dev": true - }, - "expect.js": { - "version": "0.3.1", - "resolved": "https://registry.npmjs.org/expect.js/-/expect.js-0.3.1.tgz", - "integrity": "sha1-sKWaDS7/VDdUTr8M6qYBWEHQm1s=", - "dev": true - }, - "extend": { - "version": "3.0.2", - "resolved": "https://artifactory.sri.com/artifactory/api/npm/Sunflower-NPM-all/extend/-/extend-3.0.2.tgz", - "integrity": "sha1-+LETa0Bx+9jrFAr/hYsQGewpFfo=" - }, - "form-data": { - "version": "2.3.2", - "resolved": "https://artifactory.sri.com/artifactory/api/npm/Sunflower-NPM-all/form-data/-/form-data-2.3.2.tgz", - "integrity": "sha1-SXBJi+YEwgwAXU9cI67NIda0kJk=", - "requires": { - "asynckit": "^0.4.0", - "combined-stream": "1.0.6", - "mime-types": "^2.1.12" - } - }, - "formatio": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/formatio/-/formatio-1.1.1.tgz", - "integrity": "sha1-XtPM1jZVEJc4NGXZlhmRAOhhYek=", - "dev": true, - "requires": { - "samsam": "~1.1" - } - }, - "formidable": { - "version": "1.2.1", - "resolved": "https://artifactory.sri.com/artifactory/api/npm/Sunflower-NPM-all/formidable/-/formidable-1.2.1.tgz", - "integrity": "sha1-cPt8oCkO5v+WEJBBX0s989IIJlk=" - }, - "glob": { - "version": "3.2.3", - "resolved": "https://registry.npmjs.org/glob/-/glob-3.2.3.tgz", - "integrity": "sha1-4xPusknHr/qlxHUoaw4RW1mDlGc=", - "dev": true, - "requires": { - "graceful-fs": "~2.0.0", - "inherits": "2", - "minimatch": "~0.2.11" - } - }, - "graceful-fs": { - "version": "2.0.3", - "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-2.0.3.tgz", - "integrity": "sha1-fNLNsiiko/Nule+mzBQt59GhNtA=", - "dev": true - }, - "growl": { - "version": "1.8.1", - "resolved": "https://registry.npmjs.org/growl/-/growl-1.8.1.tgz", - "integrity": "sha1-Sy3sjZB+k9szZiTc7AGDUC+MlCg=", - "dev": true - }, - "inherits": { - "version": "2.0.3", - "resolved": "https://artifactory.sri.com/artifactory/api/npm/Sunflower-NPM-all/inherits/-/inherits-2.0.3.tgz", - "integrity": "sha1-Yzwsg+PaQqUC9SRmAiSA9CCCYd4=" - }, - "isarray": { - "version": "1.0.0", - "resolved": "https://artifactory.sri.com/artifactory/api/npm/Sunflower-NPM-all/isarray/-/isarray-1.0.0.tgz", - "integrity": "sha1-u5NdSFgsuhaMBoNJV6VKPgcSTxE=" - }, - "jade": { - "version": "0.26.3", - "resolved": "https://artifactory.sri.com/artifactory/api/npm/Sunflower-NPM-all/jade/-/jade-0.26.3.tgz", - "integrity": "sha1-jxDXl32NefL2/4YqgbBRPMslaGw=", - "dev": true, - "requires": { - "commander": "0.6.1", - "mkdirp": "0.3.0" - }, - "dependencies": { - "commander": { - "version": "0.6.1", - "resolved": "https://artifactory.sri.com/artifactory/api/npm/Sunflower-NPM-all/commander/-/commander-0.6.1.tgz", - "integrity": "sha1-+mihT2qUXVTbvlDYzbMyDp47GgY=", - "dev": true - }, - "mkdirp": { - "version": "0.3.0", - "resolved": "https://artifactory.sri.com/artifactory/api/npm/Sunflower-NPM-all/mkdirp/-/mkdirp-0.3.0.tgz", - "integrity": "sha1-G79asbqCevI1dRQ0kEJkVfSB/h4=", - "dev": true - } - } - }, - "lolex": { - "version": "1.3.2", - "resolved": "https://registry.npmjs.org/lolex/-/lolex-1.3.2.tgz", - "integrity": "sha1-fD2mL/yzDw9agKJWbKJORdigHzE=", - "dev": true - }, - "lru-cache": { - "version": "2.7.3", - "resolved": "https://artifactory.sri.com/artifactory/api/npm/Sunflower-NPM-all/lru-cache/-/lru-cache-2.7.3.tgz", - "integrity": "sha1-bUUk6LlV+V1PW1iFHOId1y+06VI=", - "dev": true - }, - "methods": { - "version": "1.1.2", - "resolved": "https://artifactory.sri.com/artifactory/api/npm/Sunflower-NPM-all/methods/-/methods-1.1.2.tgz", - "integrity": "sha1-VSmk1nZUE07cxSZmVoNbD4Ua/O4=" - }, - "mime": { - "version": "1.6.0", - "resolved": "https://artifactory.sri.com/artifactory/api/npm/Sunflower-NPM-all/mime/-/mime-1.6.0.tgz", - "integrity": "sha1-Ms2eXGRVO9WNGaVor0Uqz/BJgbE=" - }, - "mime-db": { - "version": "1.35.0", - "resolved": "https://artifactory.sri.com/artifactory/api/npm/Sunflower-NPM-all/mime-db/-/mime-db-1.35.0.tgz", - "integrity": "sha1-BWnWV0ZkkSg3CWY603mpm5DZq0c=" - }, - "mime-types": { - "version": "2.1.19", - "resolved": "https://artifactory.sri.com/artifactory/api/npm/Sunflower-NPM-all/mime-types/-/mime-types-2.1.19.tgz", - "integrity": "sha1-ceRkU3p++BwV8tudl+kT/A/2BvA=", - "requires": { - "mime-db": "~1.35.0" - } - }, - "minimatch": { - "version": "0.2.14", - "resolved": "https://artifactory.sri.com/artifactory/api/npm/Sunflower-NPM-all/minimatch/-/minimatch-0.2.14.tgz", - "integrity": "sha1-x054BXT2PG+aCQ6Q775u9TpqdWo=", - "dev": true, - "requires": { - "lru-cache": "2", - "sigmund": "~1.0.0" - } - }, - "minimist": { - "version": "0.0.8", - "resolved": "https://artifactory.sri.com/artifactory/api/npm/Sunflower-NPM-all/minimist/-/minimist-0.0.8.tgz", - "integrity": "sha1-hX/Kv8M5fSYluCKCYuhqp6ARsF0=", - "dev": true - }, - "mkdirp": { - "version": "0.5.0", - "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-0.5.0.tgz", - "integrity": "sha1-HXMHam35hs2TROFecfzAWkyavxI=", - "dev": true, - "requires": { - "minimist": "0.0.8" - } - }, - "mocha": { - "version": "2.3.4", - "resolved": "https://registry.npmjs.org/mocha/-/mocha-2.3.4.tgz", - "integrity": "sha1-himm+wRPLSJapLgaKuLQAWmesmY=", - "dev": true, - "requires": { - "commander": "2.3.0", - "debug": "2.2.0", - "diff": "1.4.0", - "escape-string-regexp": "1.0.2", - "glob": "3.2.3", - "growl": "1.8.1", - "jade": "0.26.3", - "mkdirp": "0.5.0", - "supports-color": "1.2.0" - }, - "dependencies": { - "debug": { - "version": "2.2.0", - "resolved": "https://artifactory.sri.com/artifactory/api/npm/Sunflower-NPM-all/debug/-/debug-2.2.0.tgz", - "integrity": "sha1-+HBX6ZWxofauaklgZkE3vFbwOdo=", - "dev": true, - "requires": { - "ms": "0.7.1" - } - }, - "ms": { - "version": "0.7.1", - "resolved": "https://artifactory.sri.com/artifactory/api/npm/Sunflower-NPM-all/ms/-/ms-0.7.1.tgz", - "integrity": "sha1-nNE8A62/8ltl7/3nzoZO6VIBcJg=", - "dev": true - } - } - }, - "ms": { - "version": "2.0.0", - "resolved": "https://artifactory.sri.com/artifactory/api/npm/Sunflower-NPM-all/ms/-/ms-2.0.0.tgz", - "integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g=" - }, - "process-nextick-args": { - "version": "2.0.0", - "resolved": "https://artifactory.sri.com/artifactory/api/npm/Sunflower-NPM-all/process-nextick-args/-/process-nextick-args-2.0.0.tgz", - "integrity": "sha1-o31zL0JxtKsa0HDTVQjoKQeI/6o=" - }, - "qs": { - "version": "6.5.2", - "resolved": "https://artifactory.sri.com/artifactory/api/npm/Sunflower-NPM-all/qs/-/qs-6.5.2.tgz", - "integrity": "sha1-yzroBuh0BERYTvFUzo7pjUA/PjY=" - }, - "readable-stream": { - "version": "2.3.6", - "resolved": "https://artifactory.sri.com/artifactory/api/npm/Sunflower-NPM-all/readable-stream/-/readable-stream-2.3.6.tgz", - "integrity": "sha1-sRwn2IuP8fvgcGQ8+UsMea4bCq8=", - "requires": { - "core-util-is": "~1.0.0", - "inherits": "~2.0.3", - "isarray": "~1.0.0", - "process-nextick-args": "~2.0.0", - "safe-buffer": "~5.1.1", - "string_decoder": "~1.1.1", - "util-deprecate": "~1.0.1" - } - }, - "safe-buffer": { - "version": "5.1.2", - "resolved": "https://artifactory.sri.com/artifactory/api/npm/Sunflower-NPM-all/safe-buffer/-/safe-buffer-5.1.2.tgz", - "integrity": "sha1-mR7GnSluAxN0fVm9/St0XDX4go0=" - }, - "samsam": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/samsam/-/samsam-1.1.2.tgz", - "integrity": "sha1-vsEf3IOp/aBjQBIQ5AF2wwJNFWc=", - "dev": true - }, - "sigmund": { - "version": "1.0.1", - "resolved": "https://artifactory.sri.com/artifactory/api/npm/Sunflower-NPM-all/sigmund/-/sigmund-1.0.1.tgz", - "integrity": "sha1-P/IfGYytIXX587eBhT/ZTQ0ZtZA=", - "dev": true - }, - "sinon": { - "version": "1.17.3", - "resolved": "https://registry.npmjs.org/sinon/-/sinon-1.17.3.tgz", - "integrity": "sha1-RNZLx0jQI4gARsFUPO/Oo0xH0X4=", - "dev": true, - "requires": { - "formatio": "1.1.1", - "lolex": "1.3.2", - "samsam": "1.1.2", - "util": ">=0.10.3 <1" - } - }, - "string_decoder": { - "version": "1.1.1", - "resolved": "https://artifactory.sri.com/artifactory/api/npm/Sunflower-NPM-all/string_decoder/-/string_decoder-1.1.1.tgz", - "integrity": "sha1-nPFhG6YmhdcDCunkujQUnDrwP8g=", - "requires": { - "safe-buffer": "~5.1.0" - } - }, - "superagent": { - "version": "3.7.0", - "resolved": "https://artifactory.sri.com/artifactory/api/npm/Sunflower-NPM-all/superagent/-/superagent-3.7.0.tgz", - "integrity": "sha1-vVi/3iy8UwWtucy7bay6GECGKdY=", - "requires": { - "component-emitter": "^1.2.0", - "cookiejar": "^2.1.0", - "debug": "^3.1.0", - "extend": "^3.0.0", - "form-data": "^2.3.1", - "formidable": "^1.1.1", - "methods": "^1.1.1", - "mime": "^1.4.1", - "qs": "^6.5.1", - "readable-stream": "^2.0.5" - } - }, - "supports-color": { - "version": "1.2.0", - "resolved": "https://artifactory.sri.com/artifactory/api/npm/Sunflower-NPM-all/supports-color/-/supports-color-1.2.0.tgz", - "integrity": "sha1-/x7R5hFp0Gs88tWI4YixjYhH4X4=", - "dev": true - }, - "util": { - "version": "0.10.3", - "resolved": "https://artifactory.sri.com/artifactory/api/npm/Sunflower-NPM-all/util/-/util-0.10.3.tgz", - "integrity": "sha1-evsa/lCAUkZInj23/g7TeTNqwPk=", - "dev": true, - "requires": { - "inherits": "2.0.1" - }, - "dependencies": { - "inherits": { - "version": "2.0.1", - "resolved": "https://artifactory.sri.com/artifactory/api/npm/Sunflower-NPM-all/inherits/-/inherits-2.0.1.tgz", - "integrity": "sha1-sX0I0ya0Qj5Wjv9xn5GwscvfafE=", - "dev": true - } - } - }, - "util-deprecate": { - "version": "1.0.2", - "resolved": "https://artifactory.sri.com/artifactory/api/npm/Sunflower-NPM-all/util-deprecate/-/util-deprecate-1.0.2.tgz", - "integrity": "sha1-RQ1Nyfpw3nMnYvvS1KKJgUGaDM8=" - } - } -} From 532b49388a0b09aed34993ff99c7a096bd5a6a15 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jo=C3=A3o=20Neto?= Date: Fri, 26 Aug 2022 21:02:07 +0200 Subject: [PATCH 19/23] avoid possible config clash --- bin/configs/unmaintained/javascript-apollo.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bin/configs/unmaintained/javascript-apollo.yaml b/bin/configs/unmaintained/javascript-apollo.yaml index c462a622208d..f903bfe8efa8 100644 --- a/bin/configs/unmaintained/javascript-apollo.yaml +++ b/bin/configs/unmaintained/javascript-apollo.yaml @@ -1,5 +1,5 @@ generatorName: javascript-apollo -outputDir: samples/client/petstore/javascript-apollo +outputDir: samples/client/petstore/javascript-apollo-unmaintained inputSpec: modules/openapi-generator/src/test/resources/2_0/petstore.yaml templateDir: modules/openapi-generator/src/main/resources/Javascript-Apollo additionalProperties: From a1aec3f5d572423feede8e162fc22b1b08bfce9a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jo=C3=A3o=20Neto?= Date: Fri, 26 Aug 2022 21:43:05 +0200 Subject: [PATCH 20/23] update javascript-apollo sample --- .../.openapi-generator/FILES | 54 ++++++++++++++ .../test/api/AnotherFakeApi.spec.js | 3 + .../test/api/DefaultApi.spec.js | 3 + .../test/api/FakeApi.spec.js | 3 + .../test/api/FakeClassnameTags123Api.spec.js | 3 + .../javascript-apollo/test/api/PetApi.spec.js | 71 ++++++++++++------- .../test/api/StoreApi.spec.js | 61 +++++++++------- .../test/api/UserApi.spec.js | 61 +++++++++------- .../test/model/ApiResponse.spec.js | 10 +-- .../test/model/Category.spec.js | 8 +-- .../test/model/Order.spec.js | 16 ++--- .../javascript-apollo/test/model/Pet.spec.js | 16 ++--- .../javascript-apollo/test/model/Tag.spec.js | 8 +-- .../javascript-apollo/test/model/User.spec.js | 20 +++--- 14 files changed, 223 insertions(+), 114 deletions(-) diff --git a/samples/client/petstore/javascript-apollo/.openapi-generator/FILES b/samples/client/petstore/javascript-apollo/.openapi-generator/FILES index 0440bb2716cb..b05863cb83d6 100644 --- a/samples/client/petstore/javascript-apollo/.openapi-generator/FILES +++ b/samples/client/petstore/javascript-apollo/.openapi-generator/FILES @@ -1,5 +1,6 @@ .babelrc .gitignore +.openapi-generator-ignore .travis.yml README.md docs/AdditionalPropertiesClass.md @@ -113,3 +114,56 @@ src/model/Return.js src/model/SpecialModelName.js src/model/Tag.js src/model/User.js +test/api/AnotherFakeApi.spec.js +test/api/DefaultApi.spec.js +test/api/FakeApi.spec.js +test/api/FakeClassnameTags123Api.spec.js +test/api/PetApi.spec.js +test/api/StoreApi.spec.js +test/api/UserApi.spec.js +test/model/AdditionalPropertiesClass.spec.js +test/model/Animal.spec.js +test/model/ApiResponse.spec.js +test/model/ArrayOfArrayOfNumberOnly.spec.js +test/model/ArrayOfNumberOnly.spec.js +test/model/ArrayTest.spec.js +test/model/Capitalization.spec.js +test/model/Cat.spec.js +test/model/CatAllOf.spec.js +test/model/Category.spec.js +test/model/ClassModel.spec.js +test/model/Client.spec.js +test/model/DeprecatedObject.spec.js +test/model/Dog.spec.js +test/model/DogAllOf.spec.js +test/model/EnumArrays.spec.js +test/model/EnumClass.spec.js +test/model/EnumTest.spec.js +test/model/File.spec.js +test/model/FileSchemaTestClass.spec.js +test/model/Foo.spec.js +test/model/FooGetDefaultResponse.spec.js +test/model/FormatTest.spec.js +test/model/HasOnlyReadOnly.spec.js +test/model/HealthCheckResult.spec.js +test/model/List.spec.js +test/model/MapTest.spec.js +test/model/MixedPropertiesAndAdditionalPropertiesClass.spec.js +test/model/Model200Response.spec.js +test/model/Name.spec.js +test/model/NullableClass.spec.js +test/model/NumberOnly.spec.js +test/model/ObjectWithDeprecatedFields.spec.js +test/model/Order.spec.js +test/model/OuterComposite.spec.js +test/model/OuterEnum.spec.js +test/model/OuterEnumDefaultValue.spec.js +test/model/OuterEnumInteger.spec.js +test/model/OuterEnumIntegerDefaultValue.spec.js +test/model/OuterObjectWithEnumProperty.spec.js +test/model/Pet.spec.js +test/model/ReadOnlyFirst.spec.js +test/model/Return.spec.js +test/model/SpecialModelName.spec.js +test/model/Tag.spec.js +test/model/User.spec.js diff --git a/samples/client/petstore/javascript-apollo/test/api/AnotherFakeApi.spec.js b/samples/client/petstore/javascript-apollo/test/api/AnotherFakeApi.spec.js index 23737283854a..3212de66056c 100644 --- a/samples/client/petstore/javascript-apollo/test/api/AnotherFakeApi.spec.js +++ b/samples/client/petstore/javascript-apollo/test/api/AnotherFakeApi.spec.js @@ -18,6 +18,9 @@ } else if (typeof module === 'object' && module.exports) { // CommonJS-like environments that support module.exports, like Node. factory(require('expect.js'), require(process.cwd()+'/src/index')); + } else { + // Browser globals (root is window) + factory(root.expect, root.OpenApiPetstore); } }(this, function(expect, OpenApiPetstore) { 'use strict'; diff --git a/samples/client/petstore/javascript-apollo/test/api/DefaultApi.spec.js b/samples/client/petstore/javascript-apollo/test/api/DefaultApi.spec.js index bf1006e94306..34ef8d5c2e0c 100644 --- a/samples/client/petstore/javascript-apollo/test/api/DefaultApi.spec.js +++ b/samples/client/petstore/javascript-apollo/test/api/DefaultApi.spec.js @@ -18,6 +18,9 @@ } else if (typeof module === 'object' && module.exports) { // CommonJS-like environments that support module.exports, like Node. factory(require('expect.js'), require(process.cwd()+'/src/index')); + } else { + // Browser globals (root is window) + factory(root.expect, root.OpenApiPetstore); } }(this, function(expect, OpenApiPetstore) { 'use strict'; diff --git a/samples/client/petstore/javascript-apollo/test/api/FakeApi.spec.js b/samples/client/petstore/javascript-apollo/test/api/FakeApi.spec.js index 713e35ffe162..9ecfa421cb6b 100644 --- a/samples/client/petstore/javascript-apollo/test/api/FakeApi.spec.js +++ b/samples/client/petstore/javascript-apollo/test/api/FakeApi.spec.js @@ -18,6 +18,9 @@ } else if (typeof module === 'object' && module.exports) { // CommonJS-like environments that support module.exports, like Node. factory(require('expect.js'), require(process.cwd()+'/src/index')); + } else { + // Browser globals (root is window) + factory(root.expect, root.OpenApiPetstore); } }(this, function(expect, OpenApiPetstore) { 'use strict'; diff --git a/samples/client/petstore/javascript-apollo/test/api/FakeClassnameTags123Api.spec.js b/samples/client/petstore/javascript-apollo/test/api/FakeClassnameTags123Api.spec.js index eb98207ec33f..ebe401b08d9a 100644 --- a/samples/client/petstore/javascript-apollo/test/api/FakeClassnameTags123Api.spec.js +++ b/samples/client/petstore/javascript-apollo/test/api/FakeClassnameTags123Api.spec.js @@ -18,6 +18,9 @@ } else if (typeof module === 'object' && module.exports) { // CommonJS-like environments that support module.exports, like Node. factory(require('expect.js'), require(process.cwd()+'/src/index')); + } else { + // Browser globals (root is window) + factory(root.expect, root.OpenApiPetstore); } }(this, function(expect, OpenApiPetstore) { 'use strict'; diff --git a/samples/client/petstore/javascript-apollo/test/api/PetApi.spec.js b/samples/client/petstore/javascript-apollo/test/api/PetApi.spec.js index c6fb54c6251f..16591a407d97 100644 --- a/samples/client/petstore/javascript-apollo/test/api/PetApi.spec.js +++ b/samples/client/petstore/javascript-apollo/test/api/PetApi.spec.js @@ -1,6 +1,6 @@ /** * OpenAPI Petstore - * This is a sample server Petstore server. For this sample, you can use the api key `special-key` to test the authorization filters. + * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ * * The version of the OpenAPI document: 1.0.0 * @@ -11,34 +11,43 @@ * */ -// CommonJS-like environments that support module.exports, like Node. -factory(require('expect.js'), require(process.cwd()+'/src/index')); +(function(root, factory) { + if (typeof define === 'function' && define.amd) { + // AMD. + define(['expect.js', process.cwd()+'/src/index'], factory); + } else if (typeof module === 'object' && module.exports) { + // CommonJS-like environments that support module.exports, like Node. + factory(require('expect.js'), require(process.cwd()+'/src/index')); + } else { + // Browser globals (root is window) + factory(root.expect, root.OpenApiPetstore); + } +}(this, function(expect, OpenApiPetstore) { + 'use strict'; -'use strict'; + var instance; -var instance; + beforeEach(function() { + instance = new OpenApiPetstore.PetApi(); + }); -beforeEach(function() { - instance = new OpenApiPetstore.PetApi(); -}); + var getProperty = function(object, getter, property) { + // Use getter method if present; otherwise, get the property directly. + if (typeof object[getter] === 'function') + return object[getter](); + else + return object[property]; + } -var getProperty = function(object, getter, property) { - // Use getter method if present; otherwise, get the property directly. - if (typeof object[getter] === 'function') - return object[getter](); - else - return object[property]; -} + var setProperty = function(object, setter, property, value) { + // Use setter method if present; otherwise, set the property directly. + if (typeof object[setter] === 'function') + object[setter](value); + else + object[property] = value; + } -var setProperty = function(object, setter, property, value) { - // Use setter method if present; otherwise, set the property directly. - if (typeof object[setter] === 'function') - object[setter](value); - else - object[property] = value; -} - -describe('PetApi', function() { + describe('PetApi', function() { describe('addPet', function() { it('should call addPet successfully', function(done) { //uncomment below and update the code to test addPet @@ -119,4 +128,16 @@ describe('PetApi', function() { done(); }); }); -}); \ No newline at end of file + describe('uploadFileWithRequiredFile', function() { + it('should call uploadFileWithRequiredFile successfully', function(done) { + //uncomment below and update the code to test uploadFileWithRequiredFile + //instance.uploadFileWithRequiredFile(function(error) { + // if (error) throw error; + //expect().to.be(); + //}); + done(); + }); + }); + }); + +})); diff --git a/samples/client/petstore/javascript-apollo/test/api/StoreApi.spec.js b/samples/client/petstore/javascript-apollo/test/api/StoreApi.spec.js index 02b07e6b14c1..2ad9823032b7 100644 --- a/samples/client/petstore/javascript-apollo/test/api/StoreApi.spec.js +++ b/samples/client/petstore/javascript-apollo/test/api/StoreApi.spec.js @@ -1,6 +1,6 @@ /** * OpenAPI Petstore - * This is a sample server Petstore server. For this sample, you can use the api key `special-key` to test the authorization filters. + * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ * * The version of the OpenAPI document: 1.0.0 * @@ -11,34 +11,43 @@ * */ -// CommonJS-like environments that support module.exports, like Node. -factory(require('expect.js'), require(process.cwd()+'/src/index')); +(function(root, factory) { + if (typeof define === 'function' && define.amd) { + // AMD. + define(['expect.js', process.cwd()+'/src/index'], factory); + } else if (typeof module === 'object' && module.exports) { + // CommonJS-like environments that support module.exports, like Node. + factory(require('expect.js'), require(process.cwd()+'/src/index')); + } else { + // Browser globals (root is window) + factory(root.expect, root.OpenApiPetstore); + } +}(this, function(expect, OpenApiPetstore) { + 'use strict'; -'use strict'; + var instance; -var instance; + beforeEach(function() { + instance = new OpenApiPetstore.StoreApi(); + }); -beforeEach(function() { - instance = new OpenApiPetstore.StoreApi(); -}); + var getProperty = function(object, getter, property) { + // Use getter method if present; otherwise, get the property directly. + if (typeof object[getter] === 'function') + return object[getter](); + else + return object[property]; + } -var getProperty = function(object, getter, property) { - // Use getter method if present; otherwise, get the property directly. - if (typeof object[getter] === 'function') - return object[getter](); - else - return object[property]; -} + var setProperty = function(object, setter, property, value) { + // Use setter method if present; otherwise, set the property directly. + if (typeof object[setter] === 'function') + object[setter](value); + else + object[property] = value; + } -var setProperty = function(object, setter, property, value) { - // Use setter method if present; otherwise, set the property directly. - if (typeof object[setter] === 'function') - object[setter](value); - else - object[property] = value; -} - -describe('StoreApi', function() { + describe('StoreApi', function() { describe('deleteOrder', function() { it('should call deleteOrder successfully', function(done) { //uncomment below and update the code to test deleteOrder @@ -79,4 +88,6 @@ describe('StoreApi', function() { done(); }); }); -}); \ No newline at end of file + }); + +})); diff --git a/samples/client/petstore/javascript-apollo/test/api/UserApi.spec.js b/samples/client/petstore/javascript-apollo/test/api/UserApi.spec.js index 0fd8669f38c6..feab9370b16f 100644 --- a/samples/client/petstore/javascript-apollo/test/api/UserApi.spec.js +++ b/samples/client/petstore/javascript-apollo/test/api/UserApi.spec.js @@ -1,6 +1,6 @@ /** * OpenAPI Petstore - * This is a sample server Petstore server. For this sample, you can use the api key `special-key` to test the authorization filters. + * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ * * The version of the OpenAPI document: 1.0.0 * @@ -11,34 +11,43 @@ * */ -// CommonJS-like environments that support module.exports, like Node. -factory(require('expect.js'), require(process.cwd()+'/src/index')); +(function(root, factory) { + if (typeof define === 'function' && define.amd) { + // AMD. + define(['expect.js', process.cwd()+'/src/index'], factory); + } else if (typeof module === 'object' && module.exports) { + // CommonJS-like environments that support module.exports, like Node. + factory(require('expect.js'), require(process.cwd()+'/src/index')); + } else { + // Browser globals (root is window) + factory(root.expect, root.OpenApiPetstore); + } +}(this, function(expect, OpenApiPetstore) { + 'use strict'; -'use strict'; + var instance; -var instance; + beforeEach(function() { + instance = new OpenApiPetstore.UserApi(); + }); -beforeEach(function() { - instance = new OpenApiPetstore.UserApi(); -}); + var getProperty = function(object, getter, property) { + // Use getter method if present; otherwise, get the property directly. + if (typeof object[getter] === 'function') + return object[getter](); + else + return object[property]; + } -var getProperty = function(object, getter, property) { - // Use getter method if present; otherwise, get the property directly. - if (typeof object[getter] === 'function') - return object[getter](); - else - return object[property]; -} + var setProperty = function(object, setter, property, value) { + // Use setter method if present; otherwise, set the property directly. + if (typeof object[setter] === 'function') + object[setter](value); + else + object[property] = value; + } -var setProperty = function(object, setter, property, value) { - // Use setter method if present; otherwise, set the property directly. - if (typeof object[setter] === 'function') - object[setter](value); - else - object[property] = value; -} - -describe('UserApi', function() { + describe('UserApi', function() { describe('createUser', function() { it('should call createUser successfully', function(done) { //uncomment below and update the code to test createUser @@ -119,4 +128,6 @@ describe('UserApi', function() { done(); }); }); -}); \ No newline at end of file + }); + +})); diff --git a/samples/client/petstore/javascript-apollo/test/model/ApiResponse.spec.js b/samples/client/petstore/javascript-apollo/test/model/ApiResponse.spec.js index a3b74c77ee6e..47716b7a5228 100644 --- a/samples/client/petstore/javascript-apollo/test/model/ApiResponse.spec.js +++ b/samples/client/petstore/javascript-apollo/test/model/ApiResponse.spec.js @@ -1,6 +1,6 @@ /** * OpenAPI Petstore - * This is a sample server Petstore server. For this sample, you can use the api key `special-key` to test the authorization filters. + * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ * * The version of the OpenAPI document: 1.0.0 * @@ -50,25 +50,25 @@ describe('ApiResponse', function() { it('should create an instance of ApiResponse', function() { // uncomment below and update the code to test ApiResponse - //var instane = new OpenApiPetstore.ApiResponse(); + //var instance = new OpenApiPetstore.ApiResponse(); //expect(instance).to.be.a(OpenApiPetstore.ApiResponse); }); it('should have the property code (base name: "code")', function() { // uncomment below and update the code to test the property code - //var instane = new OpenApiPetstore.ApiResponse(); + //var instance = new OpenApiPetstore.ApiResponse(); //expect(instance).to.be(); }); it('should have the property type (base name: "type")', function() { // uncomment below and update the code to test the property type - //var instane = new OpenApiPetstore.ApiResponse(); + //var instance = new OpenApiPetstore.ApiResponse(); //expect(instance).to.be(); }); it('should have the property message (base name: "message")', function() { // uncomment below and update the code to test the property message - //var instane = new OpenApiPetstore.ApiResponse(); + //var instance = new OpenApiPetstore.ApiResponse(); //expect(instance).to.be(); }); diff --git a/samples/client/petstore/javascript-apollo/test/model/Category.spec.js b/samples/client/petstore/javascript-apollo/test/model/Category.spec.js index e044cfcc3c82..c0e132b02604 100644 --- a/samples/client/petstore/javascript-apollo/test/model/Category.spec.js +++ b/samples/client/petstore/javascript-apollo/test/model/Category.spec.js @@ -1,6 +1,6 @@ /** * OpenAPI Petstore - * This is a sample server Petstore server. For this sample, you can use the api key `special-key` to test the authorization filters. + * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ * * The version of the OpenAPI document: 1.0.0 * @@ -50,19 +50,19 @@ describe('Category', function() { it('should create an instance of Category', function() { // uncomment below and update the code to test Category - //var instane = new OpenApiPetstore.Category(); + //var instance = new OpenApiPetstore.Category(); //expect(instance).to.be.a(OpenApiPetstore.Category); }); it('should have the property id (base name: "id")', function() { // uncomment below and update the code to test the property id - //var instane = new OpenApiPetstore.Category(); + //var instance = new OpenApiPetstore.Category(); //expect(instance).to.be(); }); it('should have the property name (base name: "name")', function() { // uncomment below and update the code to test the property name - //var instane = new OpenApiPetstore.Category(); + //var instance = new OpenApiPetstore.Category(); //expect(instance).to.be(); }); diff --git a/samples/client/petstore/javascript-apollo/test/model/Order.spec.js b/samples/client/petstore/javascript-apollo/test/model/Order.spec.js index 15908bf24c19..88564e2bc626 100644 --- a/samples/client/petstore/javascript-apollo/test/model/Order.spec.js +++ b/samples/client/petstore/javascript-apollo/test/model/Order.spec.js @@ -1,6 +1,6 @@ /** * OpenAPI Petstore - * This is a sample server Petstore server. For this sample, you can use the api key `special-key` to test the authorization filters. + * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ * * The version of the OpenAPI document: 1.0.0 * @@ -50,43 +50,43 @@ describe('Order', function() { it('should create an instance of Order', function() { // uncomment below and update the code to test Order - //var instane = new OpenApiPetstore.Order(); + //var instance = new OpenApiPetstore.Order(); //expect(instance).to.be.a(OpenApiPetstore.Order); }); it('should have the property id (base name: "id")', function() { // uncomment below and update the code to test the property id - //var instane = new OpenApiPetstore.Order(); + //var instance = new OpenApiPetstore.Order(); //expect(instance).to.be(); }); it('should have the property petId (base name: "petId")', function() { // uncomment below and update the code to test the property petId - //var instane = new OpenApiPetstore.Order(); + //var instance = new OpenApiPetstore.Order(); //expect(instance).to.be(); }); it('should have the property quantity (base name: "quantity")', function() { // uncomment below and update the code to test the property quantity - //var instane = new OpenApiPetstore.Order(); + //var instance = new OpenApiPetstore.Order(); //expect(instance).to.be(); }); it('should have the property shipDate (base name: "shipDate")', function() { // uncomment below and update the code to test the property shipDate - //var instane = new OpenApiPetstore.Order(); + //var instance = new OpenApiPetstore.Order(); //expect(instance).to.be(); }); it('should have the property status (base name: "status")', function() { // uncomment below and update the code to test the property status - //var instane = new OpenApiPetstore.Order(); + //var instance = new OpenApiPetstore.Order(); //expect(instance).to.be(); }); it('should have the property complete (base name: "complete")', function() { // uncomment below and update the code to test the property complete - //var instane = new OpenApiPetstore.Order(); + //var instance = new OpenApiPetstore.Order(); //expect(instance).to.be(); }); diff --git a/samples/client/petstore/javascript-apollo/test/model/Pet.spec.js b/samples/client/petstore/javascript-apollo/test/model/Pet.spec.js index 5b2164280857..7b2f4cf121a0 100644 --- a/samples/client/petstore/javascript-apollo/test/model/Pet.spec.js +++ b/samples/client/petstore/javascript-apollo/test/model/Pet.spec.js @@ -1,6 +1,6 @@ /** * OpenAPI Petstore - * This is a sample server Petstore server. For this sample, you can use the api key `special-key` to test the authorization filters. + * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ * * The version of the OpenAPI document: 1.0.0 * @@ -50,43 +50,43 @@ describe('Pet', function() { it('should create an instance of Pet', function() { // uncomment below and update the code to test Pet - //var instane = new OpenApiPetstore.Pet(); + //var instance = new OpenApiPetstore.Pet(); //expect(instance).to.be.a(OpenApiPetstore.Pet); }); it('should have the property id (base name: "id")', function() { // uncomment below and update the code to test the property id - //var instane = new OpenApiPetstore.Pet(); + //var instance = new OpenApiPetstore.Pet(); //expect(instance).to.be(); }); it('should have the property category (base name: "category")', function() { // uncomment below and update the code to test the property category - //var instane = new OpenApiPetstore.Pet(); + //var instance = new OpenApiPetstore.Pet(); //expect(instance).to.be(); }); it('should have the property name (base name: "name")', function() { // uncomment below and update the code to test the property name - //var instane = new OpenApiPetstore.Pet(); + //var instance = new OpenApiPetstore.Pet(); //expect(instance).to.be(); }); it('should have the property photoUrls (base name: "photoUrls")', function() { // uncomment below and update the code to test the property photoUrls - //var instane = new OpenApiPetstore.Pet(); + //var instance = new OpenApiPetstore.Pet(); //expect(instance).to.be(); }); it('should have the property tags (base name: "tags")', function() { // uncomment below and update the code to test the property tags - //var instane = new OpenApiPetstore.Pet(); + //var instance = new OpenApiPetstore.Pet(); //expect(instance).to.be(); }); it('should have the property status (base name: "status")', function() { // uncomment below and update the code to test the property status - //var instane = new OpenApiPetstore.Pet(); + //var instance = new OpenApiPetstore.Pet(); //expect(instance).to.be(); }); diff --git a/samples/client/petstore/javascript-apollo/test/model/Tag.spec.js b/samples/client/petstore/javascript-apollo/test/model/Tag.spec.js index 2a4de4f11766..7832664c4f02 100644 --- a/samples/client/petstore/javascript-apollo/test/model/Tag.spec.js +++ b/samples/client/petstore/javascript-apollo/test/model/Tag.spec.js @@ -1,6 +1,6 @@ /** * OpenAPI Petstore - * This is a sample server Petstore server. For this sample, you can use the api key `special-key` to test the authorization filters. + * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ * * The version of the OpenAPI document: 1.0.0 * @@ -50,19 +50,19 @@ describe('Tag', function() { it('should create an instance of Tag', function() { // uncomment below and update the code to test Tag - //var instane = new OpenApiPetstore.Tag(); + //var instance = new OpenApiPetstore.Tag(); //expect(instance).to.be.a(OpenApiPetstore.Tag); }); it('should have the property id (base name: "id")', function() { // uncomment below and update the code to test the property id - //var instane = new OpenApiPetstore.Tag(); + //var instance = new OpenApiPetstore.Tag(); //expect(instance).to.be(); }); it('should have the property name (base name: "name")', function() { // uncomment below and update the code to test the property name - //var instane = new OpenApiPetstore.Tag(); + //var instance = new OpenApiPetstore.Tag(); //expect(instance).to.be(); }); diff --git a/samples/client/petstore/javascript-apollo/test/model/User.spec.js b/samples/client/petstore/javascript-apollo/test/model/User.spec.js index b089f3f38ff2..44d541dc64d3 100644 --- a/samples/client/petstore/javascript-apollo/test/model/User.spec.js +++ b/samples/client/petstore/javascript-apollo/test/model/User.spec.js @@ -1,6 +1,6 @@ /** * OpenAPI Petstore - * This is a sample server Petstore server. For this sample, you can use the api key `special-key` to test the authorization filters. + * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ * * The version of the OpenAPI document: 1.0.0 * @@ -50,55 +50,55 @@ describe('User', function() { it('should create an instance of User', function() { // uncomment below and update the code to test User - //var instane = new OpenApiPetstore.User(); + //var instance = new OpenApiPetstore.User(); //expect(instance).to.be.a(OpenApiPetstore.User); }); it('should have the property id (base name: "id")', function() { // uncomment below and update the code to test the property id - //var instane = new OpenApiPetstore.User(); + //var instance = new OpenApiPetstore.User(); //expect(instance).to.be(); }); it('should have the property username (base name: "username")', function() { // uncomment below and update the code to test the property username - //var instane = new OpenApiPetstore.User(); + //var instance = new OpenApiPetstore.User(); //expect(instance).to.be(); }); it('should have the property firstName (base name: "firstName")', function() { // uncomment below and update the code to test the property firstName - //var instane = new OpenApiPetstore.User(); + //var instance = new OpenApiPetstore.User(); //expect(instance).to.be(); }); it('should have the property lastName (base name: "lastName")', function() { // uncomment below and update the code to test the property lastName - //var instane = new OpenApiPetstore.User(); + //var instance = new OpenApiPetstore.User(); //expect(instance).to.be(); }); it('should have the property email (base name: "email")', function() { // uncomment below and update the code to test the property email - //var instane = new OpenApiPetstore.User(); + //var instance = new OpenApiPetstore.User(); //expect(instance).to.be(); }); it('should have the property password (base name: "password")', function() { // uncomment below and update the code to test the property password - //var instane = new OpenApiPetstore.User(); + //var instance = new OpenApiPetstore.User(); //expect(instance).to.be(); }); it('should have the property phone (base name: "phone")', function() { // uncomment below and update the code to test the property phone - //var instane = new OpenApiPetstore.User(); + //var instance = new OpenApiPetstore.User(); //expect(instance).to.be(); }); it('should have the property userStatus (base name: "userStatus")', function() { // uncomment below and update the code to test the property userStatus - //var instane = new OpenApiPetstore.User(); + //var instance = new OpenApiPetstore.User(); //expect(instance).to.be(); }); From e8b4299fc1658cf1f1e794a706e69fe2e0b0c4da Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jo=C3=A3o=20Neto?= Date: Fri, 26 Aug 2022 21:45:04 +0200 Subject: [PATCH 21/23] update javascript-es6 sample I kept the pom.xml from before --- .../javascript-es6/.openapi-generator-ignore | 6 +- .../javascript-es6/.openapi-generator/FILES | 54 +++ .../javascript-es6/docs/AnimalFarm.md | 7 - .../docs/Fake_classname_tags123Api.md | 59 --- .../javascript-es6/docs/InlineObject.md | 10 - .../javascript-es6/docs/InlineObject1.md | 10 - .../javascript-es6/docs/InlineObject2.md | 34 -- .../javascript-es6/docs/InlineObject3.md | 22 - .../javascript-es6/docs/InlineObject4.md | 10 - .../javascript-es6/docs/InlineObject5.md | 10 - .../docs/InlineResponseDefault.md | 9 - .../javascript-es6/docs/ModelReturn.md | 9 - .../javascript-es6/docs/OuterBoolean.md | 7 - .../javascript-es6/docs/OuterNumber.md | 7 - .../javascript-es6/docs/OuterString.md | 7 - .../javascript-es6/docs/SingleRefType.md | 10 - .../javascript-es6/docs/StringBooleanMap.md | 7 - .../javascript-es6/docs/TypeHolderDefault.md | 12 - .../javascript-es6/docs/TypeHolderExample.md | 12 - .../javascript-es6/src/model/AnimalFarm.js | 70 --- .../javascript-es6/src/model/InlineObject.js | 81 ---- .../javascript-es6/src/model/InlineObject1.js | 81 ---- .../javascript-es6/src/model/InlineObject2.js | 130 ------ .../javascript-es6/src/model/InlineObject3.js | 197 -------- .../javascript-es6/src/model/InlineObject4.js | 85 ---- .../javascript-es6/src/model/InlineObject5.js | 83 ---- .../src/model/InlineResponseDefault.js | 72 --- .../javascript-es6/src/model/ModelReturn.js | 72 --- .../javascript-es6/src/model/SingleRefType.js | 46 -- .../src/model/StringBooleanMap.js | 67 --- .../src/model/TypeHolderDefault.js | 115 ----- .../src/model/TypeHolderExample.js | 113 ----- .../javascript-es6/test/ApiClientTest.js | 423 ------------------ .../test/api/AnotherFakeApi.spec.js | 14 +- .../test/api/DefaultApi.spec.js | 6 +- .../javascript-es6/test/api/FakeApi.spec.js | 76 +++- .../test/api/FakeClassnameTags123Api.spec.js | 6 +- .../javascript-es6/test/api/PetApi.spec.js | 69 +-- .../javascript-es6/test/api/StoreApi.spec.js | 6 +- .../javascript-es6/test/api/UserApi.spec.js | 6 +- .../model/AdditionalPropertiesClass.spec.js | 12 +- .../javascript-es6/test/model/Animal.spec.js | 12 +- .../test/model/ApiResponse.spec.js | 14 +- .../model/ArrayOfArrayOfNumberOnly.spec.js | 10 +- .../test/model/ArrayOfNumberOnly.spec.js | 10 +- .../test/model/ArrayTest.spec.js | 14 +- .../test/model/Capitalization.spec.js | 20 +- .../javascript-es6/test/model/Cat.spec.js | 10 +- .../test/model/CatAllOf.spec.js | 4 +- .../test/model/Category.spec.js | 12 +- .../test/model/ClassModel.spec.js | 10 +- .../javascript-es6/test/model/Client.spec.js | 10 +- .../test/model/DeprecatedObject.spec.js | 2 +- .../javascript-es6/test/model/Dog.spec.js | 10 +- .../test/model/DogAllOf.spec.js | 4 +- .../test/model/EnumArrays.spec.js | 12 +- .../test/model/EnumClass.spec.js | 8 +- .../test/model/EnumTest.spec.js | 36 +- .../javascript-es6/test/model/File.spec.js | 10 +- .../test/model/FileSchemaTestClass.spec.js | 12 +- .../javascript-es6/test/model/Foo.spec.js | 10 +- .../test/model/FormatTest.spec.js | 64 ++- .../test/model/HasOnlyReadOnly.spec.js | 12 +- .../test/model/HealthCheckResult.spec.js | 10 +- .../javascript-es6/test/model/List.spec.js | 10 +- .../javascript-es6/test/model/MapTest.spec.js | 24 +- ...ertiesAndAdditionalPropertiesClass.spec.js | 14 +- .../test/model/Model200Response.spec.js | 12 +- .../javascript-es6/test/model/Name.spec.js | 16 +- .../test/model/NullableClass.spec.js | 26 +- .../test/model/NumberOnly.spec.js | 10 +- .../model/ObjectWithDeprecatedFields.spec.js | 2 +- .../javascript-es6/test/model/Order.spec.js | 20 +- .../test/model/OuterComposite.spec.js | 14 +- .../test/model/OuterEnum.spec.js | 8 +- .../test/model/OuterEnumDefaultValue.spec.js | 8 +- .../test/model/OuterEnumInteger.spec.js | 8 +- .../OuterEnumIntegerDefaultValue.spec.js | 8 +- .../model/OuterObjectWithEnumProperty.spec.js | 2 +- .../javascript-es6/test/model/Pet.spec.js | 20 +- .../test/model/ReadOnlyFirst.spec.js | 12 +- .../javascript-es6/test/model/Return.spec.js | 2 +- .../test/model/SingleRefType.spec.js | 58 --- .../test/model/SpecialModelName.spec.js | 10 +- .../javascript-es6/test/model/Tag.spec.js | 12 +- .../javascript-es6/test/model/User.spec.js | 24 +- .../javascript-es6/test/run_tests.html | 45 -- 87 files changed, 483 insertions(+), 2330 deletions(-) delete mode 100644 samples/client/petstore/javascript-es6/docs/AnimalFarm.md delete mode 100644 samples/client/petstore/javascript-es6/docs/Fake_classname_tags123Api.md delete mode 100644 samples/client/petstore/javascript-es6/docs/InlineObject.md delete mode 100644 samples/client/petstore/javascript-es6/docs/InlineObject1.md delete mode 100644 samples/client/petstore/javascript-es6/docs/InlineObject2.md delete mode 100644 samples/client/petstore/javascript-es6/docs/InlineObject3.md delete mode 100644 samples/client/petstore/javascript-es6/docs/InlineObject4.md delete mode 100644 samples/client/petstore/javascript-es6/docs/InlineObject5.md delete mode 100644 samples/client/petstore/javascript-es6/docs/InlineResponseDefault.md delete mode 100644 samples/client/petstore/javascript-es6/docs/ModelReturn.md delete mode 100644 samples/client/petstore/javascript-es6/docs/OuterBoolean.md delete mode 100644 samples/client/petstore/javascript-es6/docs/OuterNumber.md delete mode 100644 samples/client/petstore/javascript-es6/docs/OuterString.md delete mode 100644 samples/client/petstore/javascript-es6/docs/SingleRefType.md delete mode 100644 samples/client/petstore/javascript-es6/docs/StringBooleanMap.md delete mode 100644 samples/client/petstore/javascript-es6/docs/TypeHolderDefault.md delete mode 100644 samples/client/petstore/javascript-es6/docs/TypeHolderExample.md delete mode 100644 samples/client/petstore/javascript-es6/src/model/AnimalFarm.js delete mode 100644 samples/client/petstore/javascript-es6/src/model/InlineObject.js delete mode 100644 samples/client/petstore/javascript-es6/src/model/InlineObject1.js delete mode 100644 samples/client/petstore/javascript-es6/src/model/InlineObject2.js delete mode 100644 samples/client/petstore/javascript-es6/src/model/InlineObject3.js delete mode 100644 samples/client/petstore/javascript-es6/src/model/InlineObject4.js delete mode 100644 samples/client/petstore/javascript-es6/src/model/InlineObject5.js delete mode 100644 samples/client/petstore/javascript-es6/src/model/InlineResponseDefault.js delete mode 100644 samples/client/petstore/javascript-es6/src/model/ModelReturn.js delete mode 100644 samples/client/petstore/javascript-es6/src/model/SingleRefType.js delete mode 100644 samples/client/petstore/javascript-es6/src/model/StringBooleanMap.js delete mode 100644 samples/client/petstore/javascript-es6/src/model/TypeHolderDefault.js delete mode 100644 samples/client/petstore/javascript-es6/src/model/TypeHolderExample.js delete mode 100644 samples/client/petstore/javascript-es6/test/ApiClientTest.js delete mode 100644 samples/client/petstore/javascript-es6/test/model/SingleRefType.spec.js delete mode 100644 samples/client/petstore/javascript-es6/test/run_tests.html diff --git a/samples/client/petstore/javascript-es6/.openapi-generator-ignore b/samples/client/petstore/javascript-es6/.openapi-generator-ignore index c5fa491b4c55..7484ee590a38 100644 --- a/samples/client/petstore/javascript-es6/.openapi-generator-ignore +++ b/samples/client/petstore/javascript-es6/.openapi-generator-ignore @@ -1,11 +1,11 @@ -# Swagger Codegen Ignore -# Generated by swagger-codegen https://github.com/swagger-api/swagger-codegen +# OpenAPI Generator Ignore +# Generated by openapi-generator https://github.com/openapitools/openapi-generator # Use this file to prevent files from being overwritten by the generator. # The patterns follow closely to .gitignore or .dockerignore. # As an example, the C# client generator defines ApiClient.cs. -# You can make changes and tell Swagger Codgen to ignore just this file by uncommenting the following line: +# You can make changes and tell OpenAPI Generator to ignore just this file by uncommenting the following line: #ApiClient.cs # You can match any string of characters against a directory, file or extension with a single asterisk (*): diff --git a/samples/client/petstore/javascript-es6/.openapi-generator/FILES b/samples/client/petstore/javascript-es6/.openapi-generator/FILES index 0440bb2716cb..b05863cb83d6 100644 --- a/samples/client/petstore/javascript-es6/.openapi-generator/FILES +++ b/samples/client/petstore/javascript-es6/.openapi-generator/FILES @@ -1,5 +1,6 @@ .babelrc .gitignore +.openapi-generator-ignore .travis.yml README.md docs/AdditionalPropertiesClass.md @@ -113,3 +114,56 @@ src/model/Return.js src/model/SpecialModelName.js src/model/Tag.js src/model/User.js +test/api/AnotherFakeApi.spec.js +test/api/DefaultApi.spec.js +test/api/FakeApi.spec.js +test/api/FakeClassnameTags123Api.spec.js +test/api/PetApi.spec.js +test/api/StoreApi.spec.js +test/api/UserApi.spec.js +test/model/AdditionalPropertiesClass.spec.js +test/model/Animal.spec.js +test/model/ApiResponse.spec.js +test/model/ArrayOfArrayOfNumberOnly.spec.js +test/model/ArrayOfNumberOnly.spec.js +test/model/ArrayTest.spec.js +test/model/Capitalization.spec.js +test/model/Cat.spec.js +test/model/CatAllOf.spec.js +test/model/Category.spec.js +test/model/ClassModel.spec.js +test/model/Client.spec.js +test/model/DeprecatedObject.spec.js +test/model/Dog.spec.js +test/model/DogAllOf.spec.js +test/model/EnumArrays.spec.js +test/model/EnumClass.spec.js +test/model/EnumTest.spec.js +test/model/File.spec.js +test/model/FileSchemaTestClass.spec.js +test/model/Foo.spec.js +test/model/FooGetDefaultResponse.spec.js +test/model/FormatTest.spec.js +test/model/HasOnlyReadOnly.spec.js +test/model/HealthCheckResult.spec.js +test/model/List.spec.js +test/model/MapTest.spec.js +test/model/MixedPropertiesAndAdditionalPropertiesClass.spec.js +test/model/Model200Response.spec.js +test/model/Name.spec.js +test/model/NullableClass.spec.js +test/model/NumberOnly.spec.js +test/model/ObjectWithDeprecatedFields.spec.js +test/model/Order.spec.js +test/model/OuterComposite.spec.js +test/model/OuterEnum.spec.js +test/model/OuterEnumDefaultValue.spec.js +test/model/OuterEnumInteger.spec.js +test/model/OuterEnumIntegerDefaultValue.spec.js +test/model/OuterObjectWithEnumProperty.spec.js +test/model/Pet.spec.js +test/model/ReadOnlyFirst.spec.js +test/model/Return.spec.js +test/model/SpecialModelName.spec.js +test/model/Tag.spec.js +test/model/User.spec.js diff --git a/samples/client/petstore/javascript-es6/docs/AnimalFarm.md b/samples/client/petstore/javascript-es6/docs/AnimalFarm.md deleted file mode 100644 index ab153513ca9a..000000000000 --- a/samples/client/petstore/javascript-es6/docs/AnimalFarm.md +++ /dev/null @@ -1,7 +0,0 @@ -# OpenApiPetstore.AnimalFarm - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - - diff --git a/samples/client/petstore/javascript-es6/docs/Fake_classname_tags123Api.md b/samples/client/petstore/javascript-es6/docs/Fake_classname_tags123Api.md deleted file mode 100644 index dfe4d0735fe4..000000000000 --- a/samples/client/petstore/javascript-es6/docs/Fake_classname_tags123Api.md +++ /dev/null @@ -1,59 +0,0 @@ -# SwaggerPetstore.Fake_classname_tags123Api - -All URIs are relative to *http://petstore.swagger.io:80/v2* - -Method | HTTP request | Description -------------- | ------------- | ------------- -[**testClassname**](Fake_classname_tags123Api.md#testClassname) | **PATCH** /fake_classname_test | To test class name in snake case - - - -# **testClassname** -> Client testClassname(body) - -To test class name in snake case - -### Example -```javascript -import SwaggerPetstore from 'swagger_petstore'; -let defaultClient = SwaggerPetstore.ApiClient.instance; - -// Configure API key authorization: api_key_query -let api_key_query = defaultClient.authentications['api_key_query']; -api_key_query.apiKey = 'YOUR API KEY'; -// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) -//api_key_query.apiKeyPrefix = 'Token'; - -let apiInstance = new SwaggerPetstore.Fake_classname_tags123Api(); - -let body = new SwaggerPetstore.Client(); // Client | client model - - -apiInstance.testClassname(body, (error, data, response) => { - if (error) { - console.error(error); - } else { - console.log('API called successfully. Returned data: ' + data); - } -}); -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **body** | [**Client**](Client.md)| client model | - -### Return type - -[**Client**](Client.md) - -### Authorization - -[api_key_query](../README.md#api_key_query) - -### HTTP request headers - - - **Content-Type**: application/json - - **Accept**: application/json - diff --git a/samples/client/petstore/javascript-es6/docs/InlineObject.md b/samples/client/petstore/javascript-es6/docs/InlineObject.md deleted file mode 100644 index 529c032d7a99..000000000000 --- a/samples/client/petstore/javascript-es6/docs/InlineObject.md +++ /dev/null @@ -1,10 +0,0 @@ -# OpenApiPetstore.InlineObject - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**name** | **String** | Updated name of the pet | [optional] -**status** | **String** | Updated status of the pet | [optional] - - diff --git a/samples/client/petstore/javascript-es6/docs/InlineObject1.md b/samples/client/petstore/javascript-es6/docs/InlineObject1.md deleted file mode 100644 index bd2fcd57a209..000000000000 --- a/samples/client/petstore/javascript-es6/docs/InlineObject1.md +++ /dev/null @@ -1,10 +0,0 @@ -# OpenApiPetstore.InlineObject1 - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**additionalMetadata** | **String** | Additional data to pass to server | [optional] -**file** | **File** | file to upload | [optional] - - diff --git a/samples/client/petstore/javascript-es6/docs/InlineObject2.md b/samples/client/petstore/javascript-es6/docs/InlineObject2.md deleted file mode 100644 index 7d703a9086a3..000000000000 --- a/samples/client/petstore/javascript-es6/docs/InlineObject2.md +++ /dev/null @@ -1,34 +0,0 @@ -# OpenApiPetstore.InlineObject2 - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**enumFormStringArray** | **[String]** | Form parameter enum test (string array) | [optional] -**enumFormString** | **String** | Form parameter enum test (string) | [optional] [default to '-efg'] - - - -## Enum: [EnumFormStringArrayEnum] - - -* `GREATER_THAN` (value: `">"`) - -* `DOLLAR` (value: `"$"`) - - - - - -## Enum: EnumFormStringEnum - - -* `_abc` (value: `"_abc"`) - -* `-efg` (value: `"-efg"`) - -* `(xyz)` (value: `"(xyz)"`) - - - - diff --git a/samples/client/petstore/javascript-es6/docs/InlineObject3.md b/samples/client/petstore/javascript-es6/docs/InlineObject3.md deleted file mode 100644 index ec8980b728e7..000000000000 --- a/samples/client/petstore/javascript-es6/docs/InlineObject3.md +++ /dev/null @@ -1,22 +0,0 @@ -# OpenApiPetstore.InlineObject3 - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**integer** | **Number** | None | [optional] -**int32** | **Number** | None | [optional] -**int64** | **Number** | None | [optional] -**_number** | **Number** | None | -**_float** | **Number** | None | [optional] -**_double** | **Number** | None | -**_string** | **String** | None | [optional] -**patternWithoutDelimiter** | **String** | None | -**_byte** | **Blob** | None | -**binary** | **File** | None | [optional] -**_date** | **Date** | None | [optional] -**dateTime** | **Date** | None | [optional] -**password** | **String** | None | [optional] -**callback** | **String** | None | [optional] - - diff --git a/samples/client/petstore/javascript-es6/docs/InlineObject4.md b/samples/client/petstore/javascript-es6/docs/InlineObject4.md deleted file mode 100644 index 07ce4b0cac21..000000000000 --- a/samples/client/petstore/javascript-es6/docs/InlineObject4.md +++ /dev/null @@ -1,10 +0,0 @@ -# OpenApiPetstore.InlineObject4 - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**param** | **String** | field1 | -**param2** | **String** | field2 | - - diff --git a/samples/client/petstore/javascript-es6/docs/InlineObject5.md b/samples/client/petstore/javascript-es6/docs/InlineObject5.md deleted file mode 100644 index 16547e7f52bc..000000000000 --- a/samples/client/petstore/javascript-es6/docs/InlineObject5.md +++ /dev/null @@ -1,10 +0,0 @@ -# OpenApiPetstore.InlineObject5 - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**additionalMetadata** | **String** | Additional data to pass to server | [optional] -**requiredFile** | **File** | file to upload | - - diff --git a/samples/client/petstore/javascript-es6/docs/InlineResponseDefault.md b/samples/client/petstore/javascript-es6/docs/InlineResponseDefault.md deleted file mode 100644 index 3bd01f8f7d43..000000000000 --- a/samples/client/petstore/javascript-es6/docs/InlineResponseDefault.md +++ /dev/null @@ -1,9 +0,0 @@ -# OpenApiPetstore.InlineResponseDefault - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**string** | [**Foo**](Foo.md) | | [optional] - - diff --git a/samples/client/petstore/javascript-es6/docs/ModelReturn.md b/samples/client/petstore/javascript-es6/docs/ModelReturn.md deleted file mode 100644 index c93601692f60..000000000000 --- a/samples/client/petstore/javascript-es6/docs/ModelReturn.md +++ /dev/null @@ -1,9 +0,0 @@ -# OpenApiPetstore.ModelReturn - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**_return** | **Number** | | [optional] - - diff --git a/samples/client/petstore/javascript-es6/docs/OuterBoolean.md b/samples/client/petstore/javascript-es6/docs/OuterBoolean.md deleted file mode 100644 index 61ea0d566159..000000000000 --- a/samples/client/petstore/javascript-es6/docs/OuterBoolean.md +++ /dev/null @@ -1,7 +0,0 @@ -# SwaggerPetstore.OuterBoolean - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - - diff --git a/samples/client/petstore/javascript-es6/docs/OuterNumber.md b/samples/client/petstore/javascript-es6/docs/OuterNumber.md deleted file mode 100644 index efbbfa83535c..000000000000 --- a/samples/client/petstore/javascript-es6/docs/OuterNumber.md +++ /dev/null @@ -1,7 +0,0 @@ -# SwaggerPetstore.OuterNumber - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - - diff --git a/samples/client/petstore/javascript-es6/docs/OuterString.md b/samples/client/petstore/javascript-es6/docs/OuterString.md deleted file mode 100644 index 22eba5351a92..000000000000 --- a/samples/client/petstore/javascript-es6/docs/OuterString.md +++ /dev/null @@ -1,7 +0,0 @@ -# SwaggerPetstore.OuterString - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - - diff --git a/samples/client/petstore/javascript-es6/docs/SingleRefType.md b/samples/client/petstore/javascript-es6/docs/SingleRefType.md deleted file mode 100644 index 6a7ac770c274..000000000000 --- a/samples/client/petstore/javascript-es6/docs/SingleRefType.md +++ /dev/null @@ -1,10 +0,0 @@ -# OpenApiPetstore.SingleRefType - -## Enum - - -* `admin` (value: `"admin"`) - -* `user` (value: `"user"`) - - diff --git a/samples/client/petstore/javascript-es6/docs/StringBooleanMap.md b/samples/client/petstore/javascript-es6/docs/StringBooleanMap.md deleted file mode 100644 index 195a7d57677f..000000000000 --- a/samples/client/petstore/javascript-es6/docs/StringBooleanMap.md +++ /dev/null @@ -1,7 +0,0 @@ -# OpenApiPetstore.StringBooleanMap - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - - diff --git a/samples/client/petstore/javascript-es6/docs/TypeHolderDefault.md b/samples/client/petstore/javascript-es6/docs/TypeHolderDefault.md deleted file mode 100644 index e726bb053545..000000000000 --- a/samples/client/petstore/javascript-es6/docs/TypeHolderDefault.md +++ /dev/null @@ -1,12 +0,0 @@ -# OpenApiPetstore.TypeHolderDefault - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**stringItem** | **String** | | [default to 'what'] -**numberItem** | **Number** | | -**integerItem** | **Number** | | -**boolItem** | **Boolean** | | [default to true] -**arrayItem** | **[Number]** | | - - diff --git a/samples/client/petstore/javascript-es6/docs/TypeHolderExample.md b/samples/client/petstore/javascript-es6/docs/TypeHolderExample.md deleted file mode 100644 index 925271cb6cd1..000000000000 --- a/samples/client/petstore/javascript-es6/docs/TypeHolderExample.md +++ /dev/null @@ -1,12 +0,0 @@ -# OpenApiPetstore.TypeHolderExample - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**stringItem** | **String** | | -**numberItem** | **Number** | | -**integerItem** | **Number** | | -**boolItem** | **Boolean** | | -**arrayItem** | **[Number]** | | - - diff --git a/samples/client/petstore/javascript-es6/src/model/AnimalFarm.js b/samples/client/petstore/javascript-es6/src/model/AnimalFarm.js deleted file mode 100644 index 3b9cc01f03da..000000000000 --- a/samples/client/petstore/javascript-es6/src/model/AnimalFarm.js +++ /dev/null @@ -1,70 +0,0 @@ -/** - * OpenAPI Petstore - * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ - * - * OpenAPI spec version: 1.0.0 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - * - */ - -import ApiClient from '../ApiClient'; -import Animal from './Animal'; - -/** - * The AnimalFarm model module. - * @module model/AnimalFarm - * @version 1.0.0 - */ -class AnimalFarm extends Array { - /** - * Constructs a new AnimalFarm. - * @alias module:model/AnimalFarm - * @extends Array - */ - constructor() { - super(); - - - AnimalFarm.initialize(this); - } - - /** - * Initializes the fields of this object. - * This method is used by the constructors of any subclasses, in order to implement multiple inheritance (mix-ins). - * Only for internal use. - */ - static initialize(obj) { - } - - /** - * Constructs a AnimalFarm from a plain JavaScript object, optionally creating a new instance. - * Copies all relevant properties from data to obj if supplied or a new instance if not. - * @param {Object} data The plain JavaScript object bearing properties of interest. - * @param {module:model/AnimalFarm} obj Optional instance to populate. - * @return {module:model/AnimalFarm} The populated AnimalFarm instance. - */ - static constructFromObject(data, obj) { - if (data) { - obj = obj || new AnimalFarm(); - - ApiClient.constructFromObject(data, obj, 'Animal'); - - - } - return obj; - } - - -} - - - - - - -export default AnimalFarm; - diff --git a/samples/client/petstore/javascript-es6/src/model/InlineObject.js b/samples/client/petstore/javascript-es6/src/model/InlineObject.js deleted file mode 100644 index 6815bc809cf6..000000000000 --- a/samples/client/petstore/javascript-es6/src/model/InlineObject.js +++ /dev/null @@ -1,81 +0,0 @@ -/** - * OpenAPI Petstore - * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ - * - * The version of the OpenAPI document: 1.0.0 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - * - */ - -import ApiClient from '../ApiClient'; - -/** - * The InlineObject model module. - * @module model/InlineObject - * @version 1.0.0 - */ -class InlineObject { - /** - * Constructs a new InlineObject. - * @alias module:model/InlineObject - */ - constructor() { - - InlineObject.initialize(this); - } - - /** - * Initializes the fields of this object. - * This method is used by the constructors of any subclasses, in order to implement multiple inheritance (mix-ins). - * Only for internal use. - */ - static initialize(obj) { - } - - /** - * Constructs a InlineObject from a plain JavaScript object, optionally creating a new instance. - * Copies all relevant properties from data to obj if supplied or a new instance if not. - * @param {Object} data The plain JavaScript object bearing properties of interest. - * @param {module:model/InlineObject} obj Optional instance to populate. - * @return {module:model/InlineObject} The populated InlineObject instance. - */ - static constructFromObject(data, obj) { - if (data) { - obj = obj || new InlineObject(); - - if (data.hasOwnProperty('name')) { - obj['name'] = ApiClient.convertToType(data['name'], 'String'); - } - if (data.hasOwnProperty('status')) { - obj['status'] = ApiClient.convertToType(data['status'], 'String'); - } - } - return obj; - } - - -} - -/** - * Updated name of the pet - * @member {String} name - */ -InlineObject.prototype['name'] = undefined; - -/** - * Updated status of the pet - * @member {String} status - */ -InlineObject.prototype['status'] = undefined; - - - - - - -export default InlineObject; - diff --git a/samples/client/petstore/javascript-es6/src/model/InlineObject1.js b/samples/client/petstore/javascript-es6/src/model/InlineObject1.js deleted file mode 100644 index 947877256fb2..000000000000 --- a/samples/client/petstore/javascript-es6/src/model/InlineObject1.js +++ /dev/null @@ -1,81 +0,0 @@ -/** - * OpenAPI Petstore - * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ - * - * The version of the OpenAPI document: 1.0.0 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - * - */ - -import ApiClient from '../ApiClient'; - -/** - * The InlineObject1 model module. - * @module model/InlineObject1 - * @version 1.0.0 - */ -class InlineObject1 { - /** - * Constructs a new InlineObject1. - * @alias module:model/InlineObject1 - */ - constructor() { - - InlineObject1.initialize(this); - } - - /** - * Initializes the fields of this object. - * This method is used by the constructors of any subclasses, in order to implement multiple inheritance (mix-ins). - * Only for internal use. - */ - static initialize(obj) { - } - - /** - * Constructs a InlineObject1 from a plain JavaScript object, optionally creating a new instance. - * Copies all relevant properties from data to obj if supplied or a new instance if not. - * @param {Object} data The plain JavaScript object bearing properties of interest. - * @param {module:model/InlineObject1} obj Optional instance to populate. - * @return {module:model/InlineObject1} The populated InlineObject1 instance. - */ - static constructFromObject(data, obj) { - if (data) { - obj = obj || new InlineObject1(); - - if (data.hasOwnProperty('additionalMetadata')) { - obj['additionalMetadata'] = ApiClient.convertToType(data['additionalMetadata'], 'String'); - } - if (data.hasOwnProperty('file')) { - obj['file'] = ApiClient.convertToType(data['file'], File); - } - } - return obj; - } - - -} - -/** - * Additional data to pass to server - * @member {String} additionalMetadata - */ -InlineObject1.prototype['additionalMetadata'] = undefined; - -/** - * file to upload - * @member {File} file - */ -InlineObject1.prototype['file'] = undefined; - - - - - - -export default InlineObject1; - diff --git a/samples/client/petstore/javascript-es6/src/model/InlineObject2.js b/samples/client/petstore/javascript-es6/src/model/InlineObject2.js deleted file mode 100644 index e6ed9044568b..000000000000 --- a/samples/client/petstore/javascript-es6/src/model/InlineObject2.js +++ /dev/null @@ -1,130 +0,0 @@ -/** - * OpenAPI Petstore - * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ - * - * The version of the OpenAPI document: 1.0.0 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - * - */ - -import ApiClient from '../ApiClient'; - -/** - * The InlineObject2 model module. - * @module model/InlineObject2 - * @version 1.0.0 - */ -class InlineObject2 { - /** - * Constructs a new InlineObject2. - * @alias module:model/InlineObject2 - */ - constructor() { - - InlineObject2.initialize(this); - } - - /** - * Initializes the fields of this object. - * This method is used by the constructors of any subclasses, in order to implement multiple inheritance (mix-ins). - * Only for internal use. - */ - static initialize(obj) { - } - - /** - * Constructs a InlineObject2 from a plain JavaScript object, optionally creating a new instance. - * Copies all relevant properties from data to obj if supplied or a new instance if not. - * @param {Object} data The plain JavaScript object bearing properties of interest. - * @param {module:model/InlineObject2} obj Optional instance to populate. - * @return {module:model/InlineObject2} The populated InlineObject2 instance. - */ - static constructFromObject(data, obj) { - if (data) { - obj = obj || new InlineObject2(); - - if (data.hasOwnProperty('enum_form_string_array')) { - obj['enum_form_string_array'] = ApiClient.convertToType(data['enum_form_string_array'], ['String']); - } - if (data.hasOwnProperty('enum_form_string')) { - obj['enum_form_string'] = ApiClient.convertToType(data['enum_form_string'], 'String'); - } - } - return obj; - } - - -} - -/** - * Form parameter enum test (string array) - * @member {Array.} enum_form_string_array - */ -InlineObject2.prototype['enum_form_string_array'] = undefined; - -/** - * Form parameter enum test (string) - * @member {module:model/InlineObject2.EnumFormStringEnum} enum_form_string - * @default '-efg' - */ -InlineObject2.prototype['enum_form_string'] = '-efg'; - - - - - -/** - * Allowed values for the enumFormStringArray property. - * @enum {String} - * @readonly - */ -InlineObject2['EnumFormStringArrayEnum'] = { - - /** - * value: ">" - * @const - */ - "GREATER_THAN": ">", - - /** - * value: "$" - * @const - */ - "DOLLAR": "$" -}; - - -/** - * Allowed values for the enum_form_string property. - * @enum {String} - * @readonly - */ -InlineObject2['EnumFormStringEnum'] = { - - /** - * value: "_abc" - * @const - */ - "_abc": "_abc", - - /** - * value: "-efg" - * @const - */ - "-efg": "-efg", - - /** - * value: "(xyz)" - * @const - */ - "(xyz)": "(xyz)" -}; - - - -export default InlineObject2; - diff --git a/samples/client/petstore/javascript-es6/src/model/InlineObject3.js b/samples/client/petstore/javascript-es6/src/model/InlineObject3.js deleted file mode 100644 index 6a14f67109c8..000000000000 --- a/samples/client/petstore/javascript-es6/src/model/InlineObject3.js +++ /dev/null @@ -1,197 +0,0 @@ -/** - * OpenAPI Petstore - * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ - * - * The version of the OpenAPI document: 1.0.0 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - * - */ - -import ApiClient from '../ApiClient'; - -/** - * The InlineObject3 model module. - * @module model/InlineObject3 - * @version 1.0.0 - */ -class InlineObject3 { - /** - * Constructs a new InlineObject3. - * @alias module:model/InlineObject3 - * @param _number {Number} None - * @param _double {Number} None - * @param patternWithoutDelimiter {String} None - * @param _byte {Blob} None - */ - constructor(_number, _double, patternWithoutDelimiter, _byte) { - - InlineObject3.initialize(this, _number, _double, patternWithoutDelimiter, _byte); - } - - /** - * Initializes the fields of this object. - * This method is used by the constructors of any subclasses, in order to implement multiple inheritance (mix-ins). - * Only for internal use. - */ - static initialize(obj, _number, _double, patternWithoutDelimiter, _byte) { - obj['number'] = _number; - obj['double'] = _double; - obj['pattern_without_delimiter'] = patternWithoutDelimiter; - obj['byte'] = _byte; - } - - /** - * Constructs a InlineObject3 from a plain JavaScript object, optionally creating a new instance. - * Copies all relevant properties from data to obj if supplied or a new instance if not. - * @param {Object} data The plain JavaScript object bearing properties of interest. - * @param {module:model/InlineObject3} obj Optional instance to populate. - * @return {module:model/InlineObject3} The populated InlineObject3 instance. - */ - static constructFromObject(data, obj) { - if (data) { - obj = obj || new InlineObject3(); - - if (data.hasOwnProperty('integer')) { - obj['integer'] = ApiClient.convertToType(data['integer'], 'Number'); - } - if (data.hasOwnProperty('int32')) { - obj['int32'] = ApiClient.convertToType(data['int32'], 'Number'); - } - if (data.hasOwnProperty('int64')) { - obj['int64'] = ApiClient.convertToType(data['int64'], 'Number'); - } - if (data.hasOwnProperty('number')) { - obj['number'] = ApiClient.convertToType(data['number'], 'Number'); - } - if (data.hasOwnProperty('float')) { - obj['float'] = ApiClient.convertToType(data['float'], 'Number'); - } - if (data.hasOwnProperty('double')) { - obj['double'] = ApiClient.convertToType(data['double'], 'Number'); - } - if (data.hasOwnProperty('string')) { - obj['string'] = ApiClient.convertToType(data['string'], 'String'); - } - if (data.hasOwnProperty('pattern_without_delimiter')) { - obj['pattern_without_delimiter'] = ApiClient.convertToType(data['pattern_without_delimiter'], 'String'); - } - if (data.hasOwnProperty('byte')) { - obj['byte'] = ApiClient.convertToType(data['byte'], 'Blob'); - } - if (data.hasOwnProperty('binary')) { - obj['binary'] = ApiClient.convertToType(data['binary'], File); - } - if (data.hasOwnProperty('date')) { - obj['date'] = ApiClient.convertToType(data['date'], 'Date'); - } - if (data.hasOwnProperty('dateTime')) { - obj['dateTime'] = ApiClient.convertToType(data['dateTime'], 'Date'); - } - if (data.hasOwnProperty('password')) { - obj['password'] = ApiClient.convertToType(data['password'], 'String'); - } - if (data.hasOwnProperty('callback')) { - obj['callback'] = ApiClient.convertToType(data['callback'], 'String'); - } - } - return obj; - } - - -} - -/** - * None - * @member {Number} integer - */ -InlineObject3.prototype['integer'] = undefined; - -/** - * None - * @member {Number} int32 - */ -InlineObject3.prototype['int32'] = undefined; - -/** - * None - * @member {Number} int64 - */ -InlineObject3.prototype['int64'] = undefined; - -/** - * None - * @member {Number} number - */ -InlineObject3.prototype['number'] = undefined; - -/** - * None - * @member {Number} float - */ -InlineObject3.prototype['float'] = undefined; - -/** - * None - * @member {Number} double - */ -InlineObject3.prototype['double'] = undefined; - -/** - * None - * @member {String} string - */ -InlineObject3.prototype['string'] = undefined; - -/** - * None - * @member {String} pattern_without_delimiter - */ -InlineObject3.prototype['pattern_without_delimiter'] = undefined; - -/** - * None - * @member {Blob} byte - */ -InlineObject3.prototype['byte'] = undefined; - -/** - * None - * @member {File} binary - */ -InlineObject3.prototype['binary'] = undefined; - -/** - * None - * @member {Date} date - */ -InlineObject3.prototype['date'] = undefined; - -/** - * None - * @member {Date} dateTime - */ -InlineObject3.prototype['dateTime'] = undefined; - -/** - * None - * @member {String} password - */ -InlineObject3.prototype['password'] = undefined; - -/** - * None - * @member {String} callback - */ -InlineObject3.prototype['callback'] = undefined; - - - - - - -export default InlineObject3; - diff --git a/samples/client/petstore/javascript-es6/src/model/InlineObject4.js b/samples/client/petstore/javascript-es6/src/model/InlineObject4.js deleted file mode 100644 index 9d5d5715c66f..000000000000 --- a/samples/client/petstore/javascript-es6/src/model/InlineObject4.js +++ /dev/null @@ -1,85 +0,0 @@ -/** - * OpenAPI Petstore - * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ - * - * The version of the OpenAPI document: 1.0.0 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - * - */ - -import ApiClient from '../ApiClient'; - -/** - * The InlineObject4 model module. - * @module model/InlineObject4 - * @version 1.0.0 - */ -class InlineObject4 { - /** - * Constructs a new InlineObject4. - * @alias module:model/InlineObject4 - * @param param {String} field1 - * @param param2 {String} field2 - */ - constructor(param, param2) { - - InlineObject4.initialize(this, param, param2); - } - - /** - * Initializes the fields of this object. - * This method is used by the constructors of any subclasses, in order to implement multiple inheritance (mix-ins). - * Only for internal use. - */ - static initialize(obj, param, param2) { - obj['param'] = param; - obj['param2'] = param2; - } - - /** - * Constructs a InlineObject4 from a plain JavaScript object, optionally creating a new instance. - * Copies all relevant properties from data to obj if supplied or a new instance if not. - * @param {Object} data The plain JavaScript object bearing properties of interest. - * @param {module:model/InlineObject4} obj Optional instance to populate. - * @return {module:model/InlineObject4} The populated InlineObject4 instance. - */ - static constructFromObject(data, obj) { - if (data) { - obj = obj || new InlineObject4(); - - if (data.hasOwnProperty('param')) { - obj['param'] = ApiClient.convertToType(data['param'], 'String'); - } - if (data.hasOwnProperty('param2')) { - obj['param2'] = ApiClient.convertToType(data['param2'], 'String'); - } - } - return obj; - } - - -} - -/** - * field1 - * @member {String} param - */ -InlineObject4.prototype['param'] = undefined; - -/** - * field2 - * @member {String} param2 - */ -InlineObject4.prototype['param2'] = undefined; - - - - - - -export default InlineObject4; - diff --git a/samples/client/petstore/javascript-es6/src/model/InlineObject5.js b/samples/client/petstore/javascript-es6/src/model/InlineObject5.js deleted file mode 100644 index 1969e9b2ef3a..000000000000 --- a/samples/client/petstore/javascript-es6/src/model/InlineObject5.js +++ /dev/null @@ -1,83 +0,0 @@ -/** - * OpenAPI Petstore - * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ - * - * The version of the OpenAPI document: 1.0.0 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - * - */ - -import ApiClient from '../ApiClient'; - -/** - * The InlineObject5 model module. - * @module model/InlineObject5 - * @version 1.0.0 - */ -class InlineObject5 { - /** - * Constructs a new InlineObject5. - * @alias module:model/InlineObject5 - * @param requiredFile {File} file to upload - */ - constructor(requiredFile) { - - InlineObject5.initialize(this, requiredFile); - } - - /** - * Initializes the fields of this object. - * This method is used by the constructors of any subclasses, in order to implement multiple inheritance (mix-ins). - * Only for internal use. - */ - static initialize(obj, requiredFile) { - obj['requiredFile'] = requiredFile; - } - - /** - * Constructs a InlineObject5 from a plain JavaScript object, optionally creating a new instance. - * Copies all relevant properties from data to obj if supplied or a new instance if not. - * @param {Object} data The plain JavaScript object bearing properties of interest. - * @param {module:model/InlineObject5} obj Optional instance to populate. - * @return {module:model/InlineObject5} The populated InlineObject5 instance. - */ - static constructFromObject(data, obj) { - if (data) { - obj = obj || new InlineObject5(); - - if (data.hasOwnProperty('additionalMetadata')) { - obj['additionalMetadata'] = ApiClient.convertToType(data['additionalMetadata'], 'String'); - } - if (data.hasOwnProperty('requiredFile')) { - obj['requiredFile'] = ApiClient.convertToType(data['requiredFile'], File); - } - } - return obj; - } - - -} - -/** - * Additional data to pass to server - * @member {String} additionalMetadata - */ -InlineObject5.prototype['additionalMetadata'] = undefined; - -/** - * file to upload - * @member {File} requiredFile - */ -InlineObject5.prototype['requiredFile'] = undefined; - - - - - - -export default InlineObject5; - diff --git a/samples/client/petstore/javascript-es6/src/model/InlineResponseDefault.js b/samples/client/petstore/javascript-es6/src/model/InlineResponseDefault.js deleted file mode 100644 index 2f66d888ec94..000000000000 --- a/samples/client/petstore/javascript-es6/src/model/InlineResponseDefault.js +++ /dev/null @@ -1,72 +0,0 @@ -/** - * OpenAPI Petstore - * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ - * - * The version of the OpenAPI document: 1.0.0 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - * - */ - -import ApiClient from '../ApiClient'; -import Foo from './Foo'; - -/** - * The InlineResponseDefault model module. - * @module model/InlineResponseDefault - * @version 1.0.0 - */ -class InlineResponseDefault { - /** - * Constructs a new InlineResponseDefault. - * @alias module:model/InlineResponseDefault - */ - constructor() { - - InlineResponseDefault.initialize(this); - } - - /** - * Initializes the fields of this object. - * This method is used by the constructors of any subclasses, in order to implement multiple inheritance (mix-ins). - * Only for internal use. - */ - static initialize(obj) { - } - - /** - * Constructs a InlineResponseDefault from a plain JavaScript object, optionally creating a new instance. - * Copies all relevant properties from data to obj if supplied or a new instance if not. - * @param {Object} data The plain JavaScript object bearing properties of interest. - * @param {module:model/InlineResponseDefault} obj Optional instance to populate. - * @return {module:model/InlineResponseDefault} The populated InlineResponseDefault instance. - */ - static constructFromObject(data, obj) { - if (data) { - obj = obj || new InlineResponseDefault(); - - if (data.hasOwnProperty('string')) { - obj['string'] = Foo.constructFromObject(data['string']); - } - } - return obj; - } - - -} - -/** - * @member {module:model/Foo} string - */ -InlineResponseDefault.prototype['string'] = undefined; - - - - - - -export default InlineResponseDefault; - diff --git a/samples/client/petstore/javascript-es6/src/model/ModelReturn.js b/samples/client/petstore/javascript-es6/src/model/ModelReturn.js deleted file mode 100644 index bdfe578288a2..000000000000 --- a/samples/client/petstore/javascript-es6/src/model/ModelReturn.js +++ /dev/null @@ -1,72 +0,0 @@ -/** - * OpenAPI Petstore - * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ - * - * The version of the OpenAPI document: 1.0.0 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - * - */ - -import ApiClient from '../ApiClient'; - -/** - * The ModelReturn model module. - * @module model/ModelReturn - * @version 1.0.0 - */ -class ModelReturn { - /** - * Constructs a new ModelReturn. - * Model for testing reserved words - * @alias module:model/ModelReturn - */ - constructor() { - - ModelReturn.initialize(this); - } - - /** - * Initializes the fields of this object. - * This method is used by the constructors of any subclasses, in order to implement multiple inheritance (mix-ins). - * Only for internal use. - */ - static initialize(obj) { - } - - /** - * Constructs a ModelReturn from a plain JavaScript object, optionally creating a new instance. - * Copies all relevant properties from data to obj if supplied or a new instance if not. - * @param {Object} data The plain JavaScript object bearing properties of interest. - * @param {module:model/ModelReturn} obj Optional instance to populate. - * @return {module:model/ModelReturn} The populated ModelReturn instance. - */ - static constructFromObject(data, obj) { - if (data) { - obj = obj || new ModelReturn(); - - if (data.hasOwnProperty('return')) { - obj['return'] = ApiClient.convertToType(data['return'], 'Number'); - } - } - return obj; - } - - -} - -/** - * @member {Number} return - */ -ModelReturn.prototype['return'] = undefined; - - - - - - -export default ModelReturn; - diff --git a/samples/client/petstore/javascript-es6/src/model/SingleRefType.js b/samples/client/petstore/javascript-es6/src/model/SingleRefType.js deleted file mode 100644 index 999a69e288b7..000000000000 --- a/samples/client/petstore/javascript-es6/src/model/SingleRefType.js +++ /dev/null @@ -1,46 +0,0 @@ -/** - * OpenAPI Petstore - * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ - * - * The version of the OpenAPI document: 1.0.0 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - * - */ - -import ApiClient from '../ApiClient'; -/** -* Enum class SingleRefType. -* @enum {} -* @readonly -*/ -export default class SingleRefType { - - /** - * value: "admin" - * @const - */ - "admin" = "admin"; - - - /** - * value: "user" - * @const - */ - "user" = "user"; - - - - /** - * Returns a SingleRefType enum value from a Javascript object name. - * @param {Object} data The plain JavaScript object containing the name of the enum value. - * @return {module:model/SingleRefType} The enum SingleRefType value. - */ - static constructFromObject(object) { - return object; - } -} - diff --git a/samples/client/petstore/javascript-es6/src/model/StringBooleanMap.js b/samples/client/petstore/javascript-es6/src/model/StringBooleanMap.js deleted file mode 100644 index 30172b33f7b9..000000000000 --- a/samples/client/petstore/javascript-es6/src/model/StringBooleanMap.js +++ /dev/null @@ -1,67 +0,0 @@ -/** - * OpenAPI Petstore - * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ - * - * OpenAPI spec version: 1.0.0 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - * - */ - -import ApiClient from '../ApiClient'; - -/** - * The StringBooleanMap model module. - * @module model/StringBooleanMap - * @version 1.0.0 - */ -class StringBooleanMap { - /** - * Constructs a new StringBooleanMap. - * @alias module:model/StringBooleanMap - * @extends Object - */ - constructor() { - - StringBooleanMap.initialize(this); - } - - /** - * Initializes the fields of this object. - * This method is used by the constructors of any subclasses, in order to implement multiple inheritance (mix-ins). - * Only for internal use. - */ - static initialize(obj) { - } - - /** - * Constructs a StringBooleanMap from a plain JavaScript object, optionally creating a new instance. - * Copies all relevant properties from data to obj if supplied or a new instance if not. - * @param {Object} data The plain JavaScript object bearing properties of interest. - * @param {module:model/StringBooleanMap} obj Optional instance to populate. - * @return {module:model/StringBooleanMap} The populated StringBooleanMap instance. - */ - static constructFromObject(data, obj) { - if (data) { - obj = obj || new StringBooleanMap(); - - ApiClient.constructFromObject(data, obj, 'Boolean'); - - - } - return obj; - } - - -} - - - - - - -export default StringBooleanMap; - diff --git a/samples/client/petstore/javascript-es6/src/model/TypeHolderDefault.js b/samples/client/petstore/javascript-es6/src/model/TypeHolderDefault.js deleted file mode 100644 index 819ef864a5c6..000000000000 --- a/samples/client/petstore/javascript-es6/src/model/TypeHolderDefault.js +++ /dev/null @@ -1,115 +0,0 @@ -/** - * OpenAPI Petstore - * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ - * - * OpenAPI spec version: 1.0.0 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - * - */ - -import ApiClient from '../ApiClient'; - -/** - * The TypeHolderDefault model module. - * @module model/TypeHolderDefault - * @version 1.0.0 - */ -class TypeHolderDefault { - /** - * Constructs a new TypeHolderDefault. - * @alias module:model/TypeHolderDefault - * @param stringItem {String} - * @param numberItem {Number} - * @param integerItem {Number} - * @param boolItem {Boolean} - * @param arrayItem {Array.} - */ - constructor(stringItem, numberItem, integerItem, boolItem, arrayItem) { - - TypeHolderDefault.initialize(this, stringItem, numberItem, integerItem, boolItem, arrayItem); - } - - /** - * Initializes the fields of this object. - * This method is used by the constructors of any subclasses, in order to implement multiple inheritance (mix-ins). - * Only for internal use. - */ - static initialize(obj, stringItem, numberItem, integerItem, boolItem, arrayItem) { - obj['string_item'] = stringItem; - obj['number_item'] = numberItem; - obj['integer_item'] = integerItem; - obj['bool_item'] = boolItem; - obj['array_item'] = arrayItem; - } - - /** - * Constructs a TypeHolderDefault from a plain JavaScript object, optionally creating a new instance. - * Copies all relevant properties from data to obj if supplied or a new instance if not. - * @param {Object} data The plain JavaScript object bearing properties of interest. - * @param {module:model/TypeHolderDefault} obj Optional instance to populate. - * @return {module:model/TypeHolderDefault} The populated TypeHolderDefault instance. - */ - static constructFromObject(data, obj) { - if (data) { - obj = obj || new TypeHolderDefault(); - - if (data.hasOwnProperty('string_item')) { - obj['string_item'] = ApiClient.convertToType(data['string_item'], 'String'); - } - if (data.hasOwnProperty('number_item')) { - obj['number_item'] = ApiClient.convertToType(data['number_item'], 'Number'); - } - if (data.hasOwnProperty('integer_item')) { - obj['integer_item'] = ApiClient.convertToType(data['integer_item'], 'Number'); - } - if (data.hasOwnProperty('bool_item')) { - obj['bool_item'] = ApiClient.convertToType(data['bool_item'], 'Boolean'); - } - if (data.hasOwnProperty('array_item')) { - obj['array_item'] = ApiClient.convertToType(data['array_item'], ['Number']); - } - } - return obj; - } - - -} - -/** - * @member {String} string_item - * @default 'what' - */ -TypeHolderDefault.prototype['string_item'] = 'what'; - -/** - * @member {Number} number_item - */ -TypeHolderDefault.prototype['number_item'] = undefined; - -/** - * @member {Number} integer_item - */ -TypeHolderDefault.prototype['integer_item'] = undefined; - -/** - * @member {Boolean} bool_item - * @default true - */ -TypeHolderDefault.prototype['bool_item'] = true; - -/** - * @member {Array.} array_item - */ -TypeHolderDefault.prototype['array_item'] = undefined; - - - - - - -export default TypeHolderDefault; - diff --git a/samples/client/petstore/javascript-es6/src/model/TypeHolderExample.js b/samples/client/petstore/javascript-es6/src/model/TypeHolderExample.js deleted file mode 100644 index 3eeced56961a..000000000000 --- a/samples/client/petstore/javascript-es6/src/model/TypeHolderExample.js +++ /dev/null @@ -1,113 +0,0 @@ -/** - * OpenAPI Petstore - * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ - * - * OpenAPI spec version: 1.0.0 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - * - */ - -import ApiClient from '../ApiClient'; - -/** - * The TypeHolderExample model module. - * @module model/TypeHolderExample - * @version 1.0.0 - */ -class TypeHolderExample { - /** - * Constructs a new TypeHolderExample. - * @alias module:model/TypeHolderExample - * @param stringItem {String} - * @param numberItem {Number} - * @param integerItem {Number} - * @param boolItem {Boolean} - * @param arrayItem {Array.} - */ - constructor(stringItem, numberItem, integerItem, boolItem, arrayItem) { - - TypeHolderExample.initialize(this, stringItem, numberItem, integerItem, boolItem, arrayItem); - } - - /** - * Initializes the fields of this object. - * This method is used by the constructors of any subclasses, in order to implement multiple inheritance (mix-ins). - * Only for internal use. - */ - static initialize(obj, stringItem, numberItem, integerItem, boolItem, arrayItem) { - obj['string_item'] = stringItem; - obj['number_item'] = numberItem; - obj['integer_item'] = integerItem; - obj['bool_item'] = boolItem; - obj['array_item'] = arrayItem; - } - - /** - * Constructs a TypeHolderExample from a plain JavaScript object, optionally creating a new instance. - * Copies all relevant properties from data to obj if supplied or a new instance if not. - * @param {Object} data The plain JavaScript object bearing properties of interest. - * @param {module:model/TypeHolderExample} obj Optional instance to populate. - * @return {module:model/TypeHolderExample} The populated TypeHolderExample instance. - */ - static constructFromObject(data, obj) { - if (data) { - obj = obj || new TypeHolderExample(); - - if (data.hasOwnProperty('string_item')) { - obj['string_item'] = ApiClient.convertToType(data['string_item'], 'String'); - } - if (data.hasOwnProperty('number_item')) { - obj['number_item'] = ApiClient.convertToType(data['number_item'], 'Number'); - } - if (data.hasOwnProperty('integer_item')) { - obj['integer_item'] = ApiClient.convertToType(data['integer_item'], 'Number'); - } - if (data.hasOwnProperty('bool_item')) { - obj['bool_item'] = ApiClient.convertToType(data['bool_item'], 'Boolean'); - } - if (data.hasOwnProperty('array_item')) { - obj['array_item'] = ApiClient.convertToType(data['array_item'], ['Number']); - } - } - return obj; - } - - -} - -/** - * @member {String} string_item - */ -TypeHolderExample.prototype['string_item'] = undefined; - -/** - * @member {Number} number_item - */ -TypeHolderExample.prototype['number_item'] = undefined; - -/** - * @member {Number} integer_item - */ -TypeHolderExample.prototype['integer_item'] = undefined; - -/** - * @member {Boolean} bool_item - */ -TypeHolderExample.prototype['bool_item'] = undefined; - -/** - * @member {Array.} array_item - */ -TypeHolderExample.prototype['array_item'] = undefined; - - - - - - -export default TypeHolderExample; - diff --git a/samples/client/petstore/javascript-es6/test/ApiClientTest.js b/samples/client/petstore/javascript-es6/test/ApiClientTest.js deleted file mode 100644 index 00629d52d2b5..000000000000 --- a/samples/client/petstore/javascript-es6/test/ApiClientTest.js +++ /dev/null @@ -1,423 +0,0 @@ -if (typeof module === 'object' && module.exports) { - var expect = require('expect.js'); - var OpenAPIPetstore = require('../src/index'); - var sinon = require('sinon'); -} - -var apiClient = OpenAPIPetstore.ApiClient.instance; - -describe('ApiClient', function() { - describe('defaults', function() { - it('should have correct default values with the default API client', function() { - expect(apiClient).to.be.ok(); - expect(apiClient.basePath).to.be('http://petstore.swagger.io:80/v2'); - expect(apiClient.authentications).to.eql({ - petstore_auth: {type: 'oauth2'}, - bearer_test: {type: 'bearer'}, - http_basic_test: {type: 'basic'}, - api_key: {type: 'apiKey', 'in': 'header', name: 'api_key'}, - api_key_query: {type: 'apiKey', 'in': 'query', name: 'api_key_query'}, - /* comment out the following as these fake security def (testing purpose) - * are removed from the spec, we'll add these back after updating the - * petstore server - * - test_http_basic: {type: 'basic'}, - test_api_client_id: { - type: 'apiKey', - 'in': 'header', - name: 'x-test_api_client_id' - }, - test_api_client_secret: { - type: 'apiKey', - 'in': 'header', - name: 'x-test_api_client_secret' - }, - test_api_key_query: { - type: 'apiKey', - 'in': 'query', - name: 'test_api_key_query' - }, - test_api_key_header: { - type: 'apiKey', - 'in': 'header', - name: 'test_api_key_header' - }*/ - }); - }); - - it('should have correct default values with new API client and can customize it', function() { - var newClient = new OpenAPIPetstore.ApiClient; - expect(newClient.basePath).to.be('http://petstore.swagger.io:80/v2'); - expect(newClient.buildUrl('/abc', {})).to.be('http://petstore.swagger.io:80/v2/abc'); - - newClient.basePath = 'http://example.com'; - expect(newClient.basePath).to.be('http://example.com'); - expect(newClient.buildUrl('/abc', {})).to.be('http://example.com/abc'); - }); - }); - - describe('#paramToString', function() { - it('should return empty string for null and undefined', function() { - expect(apiClient.paramToString(null)).to.be(''); - expect(apiClient.paramToString(undefined)).to.be(''); - }); - - it('should return string', function() { - expect(apiClient.paramToString('')).to.be(''); - expect(apiClient.paramToString('abc')).to.be('abc'); - expect(apiClient.paramToString(123)).to.be('123'); - }); - }); - - describe('#buildCollectionParam', function() { - var param; - - beforeEach(function() { - param = ['aa', 'bb', 123]; - }); - - it('works for csv', function() { - expect(apiClient.buildCollectionParam(param, 'csv')).to.be('aa,bb,123'); - }); - - it('works for ssv', function() { - expect(apiClient.buildCollectionParam(param, 'ssv')).to.be('aa bb 123'); - }); - - it('works for tsv', function() { - expect(apiClient.buildCollectionParam(param, 'tsv')).to.be('aa\tbb\t123'); - }); - - it('works for pipes', function() { - expect(apiClient.buildCollectionParam(param, 'pipes')).to.be('aa|bb|123'); - }); - - it('works for multi', function() { - expect(apiClient.buildCollectionParam(param, 'multi')).to.eql(['aa', 'bb', '123']); - }); - - it('fails for invalid collection format', function() { - expect(function() { apiClient.buildCollectionParam(param, 'INVALID'); }).to.throwError(); - }); - }); - - describe('#buildUrl', function() { - it('should work without path parameters in the path', function() { - expect(apiClient.buildUrl('/abc', {})).to - .be('http://petstore.swagger.io:80/v2/abc'); - expect(apiClient.buildUrl('/abc/def?ok', {id: 123})).to - .be('http://petstore.swagger.io:80/v2/abc/def?ok'); - }); - - it('should work with path parameters in the path', function() { - expect(apiClient.buildUrl('/{id}', {id: 123})).to - .be('http://petstore.swagger.io:80/v2/123'); - expect(apiClient.buildUrl('/abc/{id}/{name}?ok', {id: 456, name: 'a b'})).to. - be('http://petstore.swagger.io:80/v2/abc/456/a%20b?ok'); - }); - }); - - describe('#isJsonMime', function() { - it('should return true for JSON MIME', function() { - expect(apiClient.isJsonMime('application/json')).to.be(true); - expect(apiClient.isJsonMime('application/json; charset=UTF8')).to.be(true); - expect(apiClient.isJsonMime('APPLICATION/JSON')).to.be(true); - }); - - it('should return false for non-JSON MIME', function() { - expect(apiClient.isJsonMime('')).to.be(false); - expect(apiClient.isJsonMime('text/plain')).to.be(false); - expect(apiClient.isJsonMime('application/xml')).to.be(false); - expect(apiClient.isJsonMime('application/jsonp')).to.be(false); - }); - }); - - describe('multipleServers', function() { - describe('host settings', function() { - var hosts = apiClient.hostSettings(); - it('should have proper 1st URL', function() { - expect(hosts[0]['url']).to.be('http://{server}.swagger.io:{port}/v2'); - expect(hosts[0]['variables']['server']['default_value']).to.be('petstore'); - }); - - it('should have proper 2nd URL', function() { - expect(hosts[1]['url']).to.be('https://localhost:8080/{version}'); - expect(hosts[1]['variables']['version']['default_value']).to.be('v2'); - }); - }); - - describe('get host from settings', function() { - it('should have correct default URL', function() { - expect(apiClient.getBasePathFromSettings(0)).to.be('http://petstore.swagger.io:80/v2'); - }); - - it('should have correct URL with port 8080', function() { - expect(apiClient.getBasePathFromSettings(0, {'port': '8080'})).to.be('http://petstore.swagger.io:8080/v2'); - }); - - it('should have correct URL with port 8080 and dev-petstore', function() { - expect(apiClient.getBasePathFromSettings(0, {'server': 'dev-petstore', 'port': '8080'})).to.be('http://dev-petstore.swagger.io:8080/v2'); - }); - }); - }); - - describe('#applyAuthToRequest', function() { - var req, newClient; - - beforeEach(function() { - req = { - auth: function() {}, - set: function() {}, - query: function() {} - }; - sinon.stub(req, 'auth'); - sinon.stub(req, 'set'); - sinon.stub(req, 'query'); - newClient = new OpenAPIPetstore.ApiClient(); - }); - - describe('basic', function() { - var authName = 'testBasicAuth'; - var authNames = [authName]; - var auth; - - beforeEach(function() { - newClient.authentications[authName] = {type: 'basic'}; - auth = newClient.authentications[authName]; - }); - - it('sets auth header with username and password set', function() { - auth.username = 'user'; - auth.password = 'pass'; - newClient.applyAuthToRequest(req, authNames); - sinon.assert.calledOnce(req.auth); - // 'dXNlcjpwYXNz' is base64-encoded string of 'user:pass' - sinon.assert.calledWithMatch(req.auth, 'user', 'pass'); - sinon.assert.notCalled(req.set); - sinon.assert.notCalled(req.query); - }); - - it('sets header with only username set', function() { - auth.username = 'user'; - newClient.applyAuthToRequest(req, authNames); - sinon.assert.calledOnce(req.auth); - // 'dXNlcjo=' is base64-encoded string of 'user:' - sinon.assert.calledWithMatch(req.auth, 'user', ''); - sinon.assert.notCalled(req.set); - sinon.assert.notCalled(req.query); - }); - - it('sets header with only password set', function() { - auth.password = 'pass'; - newClient.applyAuthToRequest(req, authNames); - sinon.assert.calledOnce(req.auth); - // 'OnBhc3M=' is base64-encoded string of ':pass' - sinon.assert.calledWithMatch(req.auth, '', 'pass'); - sinon.assert.notCalled(req.set); - sinon.assert.notCalled(req.query); - }); - - it('does not set header when username and password are not set', function() { - newClient.applyAuthToRequest(req, authNames); - sinon.assert.notCalled(req.auth); - sinon.assert.notCalled(req.set); - sinon.assert.notCalled(req.query); - }); - }); - - describe('apiKey', function() { - var authName = 'testApiKey'; - var authNames = [authName]; - var auth; - - beforeEach(function() { - newClient.authentications[authName] = {type: 'apiKey', name: 'api_key'}; - auth = newClient.authentications[authName]; - }); - - it('sets api key in header', function() { - auth.in = 'header'; - auth.apiKey = 'my-api-key'; - newClient.applyAuthToRequest(req, authNames); - sinon.assert.calledOnce(req.set); - sinon.assert.calledWithMatch(req.set, {'api_key': 'my-api-key'}); - sinon.assert.notCalled(req.auth); - sinon.assert.notCalled(req.query); - }); - - it('sets api key in query', function() { - auth.in = 'query'; - auth.apiKey = 'my-api-key'; - newClient.applyAuthToRequest(req, authNames); - sinon.assert.calledOnce(req.query); - sinon.assert.calledWithMatch(req.query, {'api_key': 'my-api-key'}); - sinon.assert.notCalled(req.auth); - sinon.assert.notCalled(req.set); - }); - - it('sets api key in header with prefix', function() { - auth.in = 'header'; - auth.apiKey = 'my-api-key'; - auth.apiKeyPrefix = 'Key'; - newClient.applyAuthToRequest(req, authNames); - sinon.assert.calledOnce(req.set); - sinon.assert.calledWithMatch(req.set, {'api_key': 'Key my-api-key'}); - sinon.assert.notCalled(req.auth); - sinon.assert.notCalled(req.query); - }); - - it('works when api key is not set', function() { - auth.in = 'query'; - auth.apiKey = null; - newClient.applyAuthToRequest(req, authNames); - sinon.assert.notCalled(req.query); - sinon.assert.notCalled(req.auth); - sinon.assert.notCalled(req.set); - }); - }); - - describe('oauth2', function() { - var authName = 'testOAuth2'; - var authNames = [authName]; - var auth; - - beforeEach(function() { - newClient.authentications[authName] = {type: 'oauth2'}; - auth = newClient.authentications[authName]; - }); - - it('sets access token in header', function() { - auth.accessToken = 'my-access-token'; - newClient.applyAuthToRequest(req, authNames); - sinon.assert.calledOnce(req.set); - sinon.assert.calledWithMatch(req.set, {'Authorization': 'Bearer my-access-token'}); - sinon.assert.notCalled(req.auth); - sinon.assert.notCalled(req.query); - }); - - it('works when access token is not set', function() { - auth.accessToken = null; - newClient.applyAuthToRequest(req, authNames); - sinon.assert.notCalled(req.query); - sinon.assert.notCalled(req.auth); - sinon.assert.notCalled(req.set); - }); - }); - - describe('apiKey and oauth2', function() { - var apiKeyAuthName = 'testApiKey'; - var oauth2Name = 'testOAuth2'; - var authNames = [apiKeyAuthName, oauth2Name]; - var apiKeyAuth, oauth2; - - beforeEach(function() { - newClient.authentications[apiKeyAuthName] = {type: 'apiKey', name: 'api_key', 'in': 'query'}; - newClient.authentications[oauth2Name] = {type: 'oauth2'}; - apiKeyAuth = newClient.authentications[apiKeyAuthName]; - oauth2 = newClient.authentications[oauth2Name]; - }); - - it('works when setting both api key and access token', function() { - apiKeyAuth.apiKey = 'my-api-key'; - oauth2.accessToken = 'my-access-token'; - newClient.applyAuthToRequest(req, authNames); - sinon.assert.calledOnce(req.query); - sinon.assert.calledWithMatch(req.query, {'api_key': 'my-api-key'}); - sinon.assert.calledOnce(req.set); - sinon.assert.calledWithMatch(req.set, {'Authorization': 'Bearer my-access-token'}); - sinon.assert.notCalled(req.auth); - }); - - it('works when setting only api key', function() { - apiKeyAuth.apiKey = 'my-api-key'; - oauth2.accessToken = null; - newClient.applyAuthToRequest(req, authNames); - sinon.assert.calledOnce(req.query); - sinon.assert.calledWithMatch(req.query, {'api_key': 'my-api-key'}); - sinon.assert.notCalled(req.set); - sinon.assert.notCalled(req.auth); - }); - - it('works when neither api key nor access token is set', function() { - apiKeyAuth.apiKey = null; - oauth2.accessToken = null; - newClient.applyAuthToRequest(req, authNames); - sinon.assert.notCalled(req.query); - sinon.assert.notCalled(req.auth); - sinon.assert.notCalled(req.set); - }); - }); - - describe('unknown type', function() { - var authName = 'unknown'; - var authNames = [authName]; - - beforeEach(function() { - newClient.authentications[authName] = {type: 'UNKNOWN'}; - }); - - it('throws error for unknown auth type', function() { - expect(function() { - newClient.applyAuthToRequest(req, authNames); - }).to.throwError(); - sinon.assert.notCalled(req.set); - sinon.assert.notCalled(req.auth); - sinon.assert.notCalled(req.query); - }); - }); - }); - - /* - describe('#defaultHeaders', function() { - it('should initialize default headers to be an empty object', function() { - expect(apiClient.defaultHeaders).to.eql({}); - }); - - it('should put default headers in request', function() { - var newClient = new OpenAPIPetstore.ApiClient; - newClient.defaultHeaders['Content-Type'] = 'text/plain' - newClient.defaultHeaders['api_key'] = 'special-key' - - var expected = {'Content-Type': 'text/plain', 'api_key': 'special-key'}; - expect(newClient.defaultHeaders).to.eql(expected); - var req = makeDumbRequest(newClient); - req.unset('User-Agent'); - expect(req.header).to.eql(expected); - }); - - it('should override default headers with provided header params', function() { - var newClient = new OpenAPIPetstore.ApiClient; - newClient.defaultHeaders['Content-Type'] = 'text/plain' - newClient.defaultHeaders['api_key'] = 'special-key' - - var headerParams = {'Content-Type': 'application/json', 'Authorization': 'Bearer test-token'} - var expected = { - 'Content-Type': 'application/json', - 'api_key': 'special-key', - 'Authorization': 'Bearer test-token' - }; - var req = makeDumbRequest(newClient, {headerParams: headerParams}); - req.unset('User-Agent'); - expect(req.header).to.eql(expected); - }); - }); -*/ - -}); - -function makeDumbRequest(apiClient, opts) { - opts = opts || {}; - var path = opts.path || '/store/inventory'; - var httpMethod = opts.httpMethod || 'GET'; - var pathParams = opts.pathParams || {}; - var queryParams = opts.queryParams || {}; - var headerParams = opts.headerParams || {}; - var formParams = opts.formParams || {}; - var bodyParam = opts.bodyParam; - var authNames = []; - var contentTypes = opts.contentTypes || []; - var accepts = opts.accepts || []; - var callback = opts.callback; - return apiClient.callApi(path, httpMethod, pathParams, queryParams, - headerParams, formParams, bodyParam, authNames, contentTypes, accepts); -} diff --git a/samples/client/petstore/javascript-es6/test/api/AnotherFakeApi.spec.js b/samples/client/petstore/javascript-es6/test/api/AnotherFakeApi.spec.js index 750840784236..3212de66056c 100644 --- a/samples/client/petstore/javascript-es6/test/api/AnotherFakeApi.spec.js +++ b/samples/client/petstore/javascript-es6/test/api/AnotherFakeApi.spec.js @@ -2,7 +2,7 @@ * OpenAPI Petstore * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ * - * OpenAPI spec version: 1.0.0 + * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -14,10 +14,10 @@ (function(root, factory) { if (typeof define === 'function' && define.amd) { // AMD. - define(['expect.js', '../../src/index'], factory); + define(['expect.js', process.cwd()+'/src/index'], factory); } else if (typeof module === 'object' && module.exports) { // CommonJS-like environments that support module.exports, like Node. - factory(require('expect.js'), require('../../src/index')); + factory(require('expect.js'), require(process.cwd()+'/src/index')); } else { // Browser globals (root is window) factory(root.expect, root.OpenApiPetstore); @@ -48,10 +48,10 @@ } describe('AnotherFakeApi', function() { - describe('testSpecialTags', function() { - it('should call testSpecialTags successfully', function(done) { - //uncomment below and update the code to test testSpecialTags - //instance.testSpecialTags(function(error) { + describe('call123testSpecialTags', function() { + it('should call call123testSpecialTags successfully', function(done) { + //uncomment below and update the code to test call123testSpecialTags + //instance.call123testSpecialTags(function(error) { // if (error) throw error; //expect().to.be(); //}); diff --git a/samples/client/petstore/javascript-es6/test/api/DefaultApi.spec.js b/samples/client/petstore/javascript-es6/test/api/DefaultApi.spec.js index 5d37f0a2e1f8..34ef8d5c2e0c 100644 --- a/samples/client/petstore/javascript-es6/test/api/DefaultApi.spec.js +++ b/samples/client/petstore/javascript-es6/test/api/DefaultApi.spec.js @@ -2,7 +2,7 @@ * OpenAPI Petstore * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ * - * OpenAPI spec version: 1.0.0 + * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -14,10 +14,10 @@ (function(root, factory) { if (typeof define === 'function' && define.amd) { // AMD. - define(['expect.js', '../../src/index'], factory); + define(['expect.js', process.cwd()+'/src/index'], factory); } else if (typeof module === 'object' && module.exports) { // CommonJS-like environments that support module.exports, like Node. - factory(require('expect.js'), require('../../src/index')); + factory(require('expect.js'), require(process.cwd()+'/src/index')); } else { // Browser globals (root is window) factory(root.expect, root.OpenApiPetstore); diff --git a/samples/client/petstore/javascript-es6/test/api/FakeApi.spec.js b/samples/client/petstore/javascript-es6/test/api/FakeApi.spec.js index 7931dbdd6c8d..9ecfa421cb6b 100644 --- a/samples/client/petstore/javascript-es6/test/api/FakeApi.spec.js +++ b/samples/client/petstore/javascript-es6/test/api/FakeApi.spec.js @@ -2,7 +2,7 @@ * OpenAPI Petstore * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ * - * OpenAPI spec version: 1.0.0 + * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -14,10 +14,10 @@ (function(root, factory) { if (typeof define === 'function' && define.amd) { // AMD. - define(['expect.js', '../../src/index'], factory); + define(['expect.js', process.cwd()+'/src/index'], factory); } else if (typeof module === 'object' && module.exports) { // CommonJS-like environments that support module.exports, like Node. - factory(require('expect.js'), require('../../src/index')); + factory(require('expect.js'), require(process.cwd()+'/src/index')); } else { // Browser globals (root is window) factory(root.expect, root.OpenApiPetstore); @@ -48,6 +48,26 @@ } describe('FakeApi', function() { + describe('fakeHealthGet', function() { + it('should call fakeHealthGet successfully', function(done) { + //uncomment below and update the code to test fakeHealthGet + //instance.fakeHealthGet(function(error) { + // if (error) throw error; + //expect().to.be(); + //}); + done(); + }); + }); + describe('fakeHttpSignatureTest', function() { + it('should call fakeHttpSignatureTest successfully', function(done) { + //uncomment below and update the code to test fakeHttpSignatureTest + //instance.fakeHttpSignatureTest(function(error) { + // if (error) throw error; + //expect().to.be(); + //}); + done(); + }); + }); describe('fakeOuterBooleanSerialize', function() { it('should call fakeOuterBooleanSerialize successfully', function(done) { //uncomment below and update the code to test fakeOuterBooleanSerialize @@ -88,6 +108,36 @@ done(); }); }); + describe('fakePropertyEnumIntegerSerialize', function() { + it('should call fakePropertyEnumIntegerSerialize successfully', function(done) { + //uncomment below and update the code to test fakePropertyEnumIntegerSerialize + //instance.fakePropertyEnumIntegerSerialize(function(error) { + // if (error) throw error; + //expect().to.be(); + //}); + done(); + }); + }); + describe('testBodyWithBinary', function() { + it('should call testBodyWithBinary successfully', function(done) { + //uncomment below and update the code to test testBodyWithBinary + //instance.testBodyWithBinary(function(error) { + // if (error) throw error; + //expect().to.be(); + //}); + done(); + }); + }); + describe('testBodyWithFileSchema', function() { + it('should call testBodyWithFileSchema successfully', function(done) { + //uncomment below and update the code to test testBodyWithFileSchema + //instance.testBodyWithFileSchema(function(error) { + // if (error) throw error; + //expect().to.be(); + //}); + done(); + }); + }); describe('testBodyWithQueryParams', function() { it('should call testBodyWithQueryParams successfully', function(done) { //uncomment below and update the code to test testBodyWithQueryParams @@ -128,6 +178,16 @@ done(); }); }); + describe('testGroupParameters', function() { + it('should call testGroupParameters successfully', function(done) { + //uncomment below and update the code to test testGroupParameters + //instance.testGroupParameters(function(error) { + // if (error) throw error; + //expect().to.be(); + //}); + done(); + }); + }); describe('testInlineAdditionalProperties', function() { it('should call testInlineAdditionalProperties successfully', function(done) { //uncomment below and update the code to test testInlineAdditionalProperties @@ -148,6 +208,16 @@ done(); }); }); + describe('testQueryParameterCollectionFormat', function() { + it('should call testQueryParameterCollectionFormat successfully', function(done) { + //uncomment below and update the code to test testQueryParameterCollectionFormat + //instance.testQueryParameterCollectionFormat(function(error) { + // if (error) throw error; + //expect().to.be(); + //}); + done(); + }); + }); }); })); diff --git a/samples/client/petstore/javascript-es6/test/api/FakeClassnameTags123Api.spec.js b/samples/client/petstore/javascript-es6/test/api/FakeClassnameTags123Api.spec.js index a9f0780a18fd..ebe401b08d9a 100644 --- a/samples/client/petstore/javascript-es6/test/api/FakeClassnameTags123Api.spec.js +++ b/samples/client/petstore/javascript-es6/test/api/FakeClassnameTags123Api.spec.js @@ -2,7 +2,7 @@ * OpenAPI Petstore * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ * - * OpenAPI spec version: 1.0.0 + * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -14,10 +14,10 @@ (function(root, factory) { if (typeof define === 'function' && define.amd) { // AMD. - define(['expect.js', '../../src/index'], factory); + define(['expect.js', process.cwd()+'/src/index'], factory); } else if (typeof module === 'object' && module.exports) { // CommonJS-like environments that support module.exports, like Node. - factory(require('expect.js'), require('../../src/index')); + factory(require('expect.js'), require(process.cwd()+'/src/index')); } else { // Browser globals (root is window) factory(root.expect, root.OpenApiPetstore); diff --git a/samples/client/petstore/javascript-es6/test/api/PetApi.spec.js b/samples/client/petstore/javascript-es6/test/api/PetApi.spec.js index 49dcc0605816..16591a407d97 100644 --- a/samples/client/petstore/javascript-es6/test/api/PetApi.spec.js +++ b/samples/client/petstore/javascript-es6/test/api/PetApi.spec.js @@ -2,7 +2,7 @@ * OpenAPI Petstore * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ * - * OpenAPI spec version: 1.0.0 + * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -14,10 +14,10 @@ (function(root, factory) { if (typeof define === 'function' && define.amd) { // AMD. - define(['expect.js', '../../src/index'], factory); + define(['expect.js', process.cwd()+'/src/index'], factory); } else if (typeof module === 'object' && module.exports) { // CommonJS-like environments that support module.exports, like Node. - factory(require('expect.js'), require('../../src/index')); + factory(require('expect.js'), require(process.cwd()+'/src/index')); } else { // Browser globals (root is window) factory(root.expect, root.OpenApiPetstore); @@ -25,10 +25,10 @@ }(this, function(expect, OpenApiPetstore) { 'use strict'; - var api_instance; + var instance; beforeEach(function() { - api_instance = new OpenApiPetstore.PetApi(); + instance = new OpenApiPetstore.PetApi(); }); var getProperty = function(object, getter, property) { @@ -47,56 +47,7 @@ object[property] = value; } - var createRandomPet = function() { - var id = new Date().getTime(); - var pet = new OpenApiPetstore.Pet(); - setProperty(pet, "setId", "id", id); - setProperty(pet, "setName", "name", "pet" + id); - - var category = new OpenApiPetstore.Category(); - setProperty(category, "setId", "id", id); - setProperty(category, "setName", "name", "category" + id); - setProperty(pet, "setCategory", "category", category); - - setProperty(pet, "setStatus", "status", "available"); - var photos = ["http://foo.bar.com/1", "http://foo.bar.com/2"]; - setProperty(pet, "setPhotoUrls", "photoUrls", photos); - - return pet; - } - describe('PetApi', function() { - it('should create and get pet', function(done) { - this.timeout(15000); - var pet = createRandomPet(); - try { - //api_instance.addPet(pet, {_base_path_index: 1}, function(error) { - api_instance.addPet(pet, null, function(error) { - if (error) throw error; - - api_instance.getPetById(pet.id, function(error, fetched, response) { - if (error) throw error; - expect(response.status).to.be(200); - expect(response.ok).to.be(true); - expect(response.get('Content-Type')).to.be('application/json'); - - expect(fetched).to.be.a(OpenApiPetstore.Pet); - expect(fetched.id).to.be(pet.id); - expect(getProperty(fetched, "getPhotoUrls", "photoUrls")) - .to.eql(getProperty(pet, "getPhotoUrls", "photoUrls")); - expect(getProperty(fetched, "getCategory", "category")) - .to.be.a(OpenApiPetstore.Category); - expect(getProperty(getProperty(fetched, "getCategory", "category"), "getName", "name")) - .to.be(getProperty(getProperty(pet, "getCategory", "category"), "getName", "name")); - - api_instance.deletePet(pet.id); - done(); - }); - }); - } catch (error) { - done(error); - } - }); describe('addPet', function() { it('should call addPet successfully', function(done) { //uncomment below and update the code to test addPet @@ -177,6 +128,16 @@ done(); }); }); + describe('uploadFileWithRequiredFile', function() { + it('should call uploadFileWithRequiredFile successfully', function(done) { + //uncomment below and update the code to test uploadFileWithRequiredFile + //instance.uploadFileWithRequiredFile(function(error) { + // if (error) throw error; + //expect().to.be(); + //}); + done(); + }); + }); }); })); diff --git a/samples/client/petstore/javascript-es6/test/api/StoreApi.spec.js b/samples/client/petstore/javascript-es6/test/api/StoreApi.spec.js index cd542e15f5d1..2ad9823032b7 100644 --- a/samples/client/petstore/javascript-es6/test/api/StoreApi.spec.js +++ b/samples/client/petstore/javascript-es6/test/api/StoreApi.spec.js @@ -2,7 +2,7 @@ * OpenAPI Petstore * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ * - * OpenAPI spec version: 1.0.0 + * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -14,10 +14,10 @@ (function(root, factory) { if (typeof define === 'function' && define.amd) { // AMD. - define(['expect.js', '../../src/index'], factory); + define(['expect.js', process.cwd()+'/src/index'], factory); } else if (typeof module === 'object' && module.exports) { // CommonJS-like environments that support module.exports, like Node. - factory(require('expect.js'), require('../../src/index')); + factory(require('expect.js'), require(process.cwd()+'/src/index')); } else { // Browser globals (root is window) factory(root.expect, root.OpenApiPetstore); diff --git a/samples/client/petstore/javascript-es6/test/api/UserApi.spec.js b/samples/client/petstore/javascript-es6/test/api/UserApi.spec.js index c5ba7e4e4bc0..feab9370b16f 100644 --- a/samples/client/petstore/javascript-es6/test/api/UserApi.spec.js +++ b/samples/client/petstore/javascript-es6/test/api/UserApi.spec.js @@ -2,7 +2,7 @@ * OpenAPI Petstore * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ * - * OpenAPI spec version: 1.0.0 + * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -14,10 +14,10 @@ (function(root, factory) { if (typeof define === 'function' && define.amd) { // AMD. - define(['expect.js', '../../src/index'], factory); + define(['expect.js', process.cwd()+'/src/index'], factory); } else if (typeof module === 'object' && module.exports) { // CommonJS-like environments that support module.exports, like Node. - factory(require('expect.js'), require('../../src/index')); + factory(require('expect.js'), require(process.cwd()+'/src/index')); } else { // Browser globals (root is window) factory(root.expect, root.OpenApiPetstore); diff --git a/samples/client/petstore/javascript-es6/test/model/AdditionalPropertiesClass.spec.js b/samples/client/petstore/javascript-es6/test/model/AdditionalPropertiesClass.spec.js index 4c472d5ac5f3..4086c3a614b2 100644 --- a/samples/client/petstore/javascript-es6/test/model/AdditionalPropertiesClass.spec.js +++ b/samples/client/petstore/javascript-es6/test/model/AdditionalPropertiesClass.spec.js @@ -2,7 +2,7 @@ * OpenAPI Petstore * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ * - * OpenAPI spec version: 1.0.0 + * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -14,10 +14,10 @@ (function(root, factory) { if (typeof define === 'function' && define.amd) { // AMD. - define(['expect.js', '../../src/index'], factory); + define(['expect.js', process.cwd()+'/src/index'], factory); } else if (typeof module === 'object' && module.exports) { // CommonJS-like environments that support module.exports, like Node. - factory(require('expect.js'), require('../../src/index')); + factory(require('expect.js'), require(process.cwd()+'/src/index')); } else { // Browser globals (root is window) factory(root.expect, root.OpenApiPetstore); @@ -50,19 +50,19 @@ describe('AdditionalPropertiesClass', function() { it('should create an instance of AdditionalPropertiesClass', function() { // uncomment below and update the code to test AdditionalPropertiesClass - //var instane = new OpenApiPetstore.AdditionalPropertiesClass(); + //var instance = new OpenApiPetstore.AdditionalPropertiesClass(); //expect(instance).to.be.a(OpenApiPetstore.AdditionalPropertiesClass); }); it('should have the property mapProperty (base name: "map_property")', function() { // uncomment below and update the code to test the property mapProperty - //var instane = new OpenApiPetstore.AdditionalPropertiesClass(); + //var instance = new OpenApiPetstore.AdditionalPropertiesClass(); //expect(instance).to.be(); }); it('should have the property mapOfMapProperty (base name: "map_of_map_property")', function() { // uncomment below and update the code to test the property mapOfMapProperty - //var instane = new OpenApiPetstore.AdditionalPropertiesClass(); + //var instance = new OpenApiPetstore.AdditionalPropertiesClass(); //expect(instance).to.be(); }); diff --git a/samples/client/petstore/javascript-es6/test/model/Animal.spec.js b/samples/client/petstore/javascript-es6/test/model/Animal.spec.js index dbe9ef41d144..1fedba274c74 100644 --- a/samples/client/petstore/javascript-es6/test/model/Animal.spec.js +++ b/samples/client/petstore/javascript-es6/test/model/Animal.spec.js @@ -2,7 +2,7 @@ * OpenAPI Petstore * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ * - * OpenAPI spec version: 1.0.0 + * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -14,10 +14,10 @@ (function(root, factory) { if (typeof define === 'function' && define.amd) { // AMD. - define(['expect.js', '../../src/index'], factory); + define(['expect.js', process.cwd()+'/src/index'], factory); } else if (typeof module === 'object' && module.exports) { // CommonJS-like environments that support module.exports, like Node. - factory(require('expect.js'), require('../../src/index')); + factory(require('expect.js'), require(process.cwd()+'/src/index')); } else { // Browser globals (root is window) factory(root.expect, root.OpenApiPetstore); @@ -50,19 +50,19 @@ describe('Animal', function() { it('should create an instance of Animal', function() { // uncomment below and update the code to test Animal - //var instane = new OpenApiPetstore.Animal(); + //var instance = new OpenApiPetstore.Animal(); //expect(instance).to.be.a(OpenApiPetstore.Animal); }); it('should have the property className (base name: "className")', function() { // uncomment below and update the code to test the property className - //var instane = new OpenApiPetstore.Animal(); + //var instance = new OpenApiPetstore.Animal(); //expect(instance).to.be(); }); it('should have the property color (base name: "color")', function() { // uncomment below and update the code to test the property color - //var instane = new OpenApiPetstore.Animal(); + //var instance = new OpenApiPetstore.Animal(); //expect(instance).to.be(); }); diff --git a/samples/client/petstore/javascript-es6/test/model/ApiResponse.spec.js b/samples/client/petstore/javascript-es6/test/model/ApiResponse.spec.js index 1165094a73c0..47716b7a5228 100644 --- a/samples/client/petstore/javascript-es6/test/model/ApiResponse.spec.js +++ b/samples/client/petstore/javascript-es6/test/model/ApiResponse.spec.js @@ -2,7 +2,7 @@ * OpenAPI Petstore * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ * - * OpenAPI spec version: 1.0.0 + * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -14,10 +14,10 @@ (function(root, factory) { if (typeof define === 'function' && define.amd) { // AMD. - define(['expect.js', '../../src/index'], factory); + define(['expect.js', process.cwd()+'/src/index'], factory); } else if (typeof module === 'object' && module.exports) { // CommonJS-like environments that support module.exports, like Node. - factory(require('expect.js'), require('../../src/index')); + factory(require('expect.js'), require(process.cwd()+'/src/index')); } else { // Browser globals (root is window) factory(root.expect, root.OpenApiPetstore); @@ -50,25 +50,25 @@ describe('ApiResponse', function() { it('should create an instance of ApiResponse', function() { // uncomment below and update the code to test ApiResponse - //var instane = new OpenApiPetstore.ApiResponse(); + //var instance = new OpenApiPetstore.ApiResponse(); //expect(instance).to.be.a(OpenApiPetstore.ApiResponse); }); it('should have the property code (base name: "code")', function() { // uncomment below and update the code to test the property code - //var instane = new OpenApiPetstore.ApiResponse(); + //var instance = new OpenApiPetstore.ApiResponse(); //expect(instance).to.be(); }); it('should have the property type (base name: "type")', function() { // uncomment below and update the code to test the property type - //var instane = new OpenApiPetstore.ApiResponse(); + //var instance = new OpenApiPetstore.ApiResponse(); //expect(instance).to.be(); }); it('should have the property message (base name: "message")', function() { // uncomment below and update the code to test the property message - //var instane = new OpenApiPetstore.ApiResponse(); + //var instance = new OpenApiPetstore.ApiResponse(); //expect(instance).to.be(); }); diff --git a/samples/client/petstore/javascript-es6/test/model/ArrayOfArrayOfNumberOnly.spec.js b/samples/client/petstore/javascript-es6/test/model/ArrayOfArrayOfNumberOnly.spec.js index f30c53f5ed65..4bdd2cd2cbcc 100644 --- a/samples/client/petstore/javascript-es6/test/model/ArrayOfArrayOfNumberOnly.spec.js +++ b/samples/client/petstore/javascript-es6/test/model/ArrayOfArrayOfNumberOnly.spec.js @@ -2,7 +2,7 @@ * OpenAPI Petstore * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ * - * OpenAPI spec version: 1.0.0 + * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -14,10 +14,10 @@ (function(root, factory) { if (typeof define === 'function' && define.amd) { // AMD. - define(['expect.js', '../../src/index'], factory); + define(['expect.js', process.cwd()+'/src/index'], factory); } else if (typeof module === 'object' && module.exports) { // CommonJS-like environments that support module.exports, like Node. - factory(require('expect.js'), require('../../src/index')); + factory(require('expect.js'), require(process.cwd()+'/src/index')); } else { // Browser globals (root is window) factory(root.expect, root.OpenApiPetstore); @@ -50,13 +50,13 @@ describe('ArrayOfArrayOfNumberOnly', function() { it('should create an instance of ArrayOfArrayOfNumberOnly', function() { // uncomment below and update the code to test ArrayOfArrayOfNumberOnly - //var instane = new OpenApiPetstore.ArrayOfArrayOfNumberOnly(); + //var instance = new OpenApiPetstore.ArrayOfArrayOfNumberOnly(); //expect(instance).to.be.a(OpenApiPetstore.ArrayOfArrayOfNumberOnly); }); it('should have the property arrayArrayNumber (base name: "ArrayArrayNumber")', function() { // uncomment below and update the code to test the property arrayArrayNumber - //var instane = new OpenApiPetstore.ArrayOfArrayOfNumberOnly(); + //var instance = new OpenApiPetstore.ArrayOfArrayOfNumberOnly(); //expect(instance).to.be(); }); diff --git a/samples/client/petstore/javascript-es6/test/model/ArrayOfNumberOnly.spec.js b/samples/client/petstore/javascript-es6/test/model/ArrayOfNumberOnly.spec.js index 6c2bc8807d93..a44c1a7ea17e 100644 --- a/samples/client/petstore/javascript-es6/test/model/ArrayOfNumberOnly.spec.js +++ b/samples/client/petstore/javascript-es6/test/model/ArrayOfNumberOnly.spec.js @@ -2,7 +2,7 @@ * OpenAPI Petstore * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ * - * OpenAPI spec version: 1.0.0 + * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -14,10 +14,10 @@ (function(root, factory) { if (typeof define === 'function' && define.amd) { // AMD. - define(['expect.js', '../../src/index'], factory); + define(['expect.js', process.cwd()+'/src/index'], factory); } else if (typeof module === 'object' && module.exports) { // CommonJS-like environments that support module.exports, like Node. - factory(require('expect.js'), require('../../src/index')); + factory(require('expect.js'), require(process.cwd()+'/src/index')); } else { // Browser globals (root is window) factory(root.expect, root.OpenApiPetstore); @@ -50,13 +50,13 @@ describe('ArrayOfNumberOnly', function() { it('should create an instance of ArrayOfNumberOnly', function() { // uncomment below and update the code to test ArrayOfNumberOnly - //var instane = new OpenApiPetstore.ArrayOfNumberOnly(); + //var instance = new OpenApiPetstore.ArrayOfNumberOnly(); //expect(instance).to.be.a(OpenApiPetstore.ArrayOfNumberOnly); }); it('should have the property arrayNumber (base name: "ArrayNumber")', function() { // uncomment below and update the code to test the property arrayNumber - //var instane = new OpenApiPetstore.ArrayOfNumberOnly(); + //var instance = new OpenApiPetstore.ArrayOfNumberOnly(); //expect(instance).to.be(); }); diff --git a/samples/client/petstore/javascript-es6/test/model/ArrayTest.spec.js b/samples/client/petstore/javascript-es6/test/model/ArrayTest.spec.js index ab9294b159cd..a6bbf95e2109 100644 --- a/samples/client/petstore/javascript-es6/test/model/ArrayTest.spec.js +++ b/samples/client/petstore/javascript-es6/test/model/ArrayTest.spec.js @@ -2,7 +2,7 @@ * OpenAPI Petstore * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ * - * OpenAPI spec version: 1.0.0 + * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -14,10 +14,10 @@ (function(root, factory) { if (typeof define === 'function' && define.amd) { // AMD. - define(['expect.js', '../../src/index'], factory); + define(['expect.js', process.cwd()+'/src/index'], factory); } else if (typeof module === 'object' && module.exports) { // CommonJS-like environments that support module.exports, like Node. - factory(require('expect.js'), require('../../src/index')); + factory(require('expect.js'), require(process.cwd()+'/src/index')); } else { // Browser globals (root is window) factory(root.expect, root.OpenApiPetstore); @@ -50,25 +50,25 @@ describe('ArrayTest', function() { it('should create an instance of ArrayTest', function() { // uncomment below and update the code to test ArrayTest - //var instane = new OpenApiPetstore.ArrayTest(); + //var instance = new OpenApiPetstore.ArrayTest(); //expect(instance).to.be.a(OpenApiPetstore.ArrayTest); }); it('should have the property arrayOfString (base name: "array_of_string")', function() { // uncomment below and update the code to test the property arrayOfString - //var instane = new OpenApiPetstore.ArrayTest(); + //var instance = new OpenApiPetstore.ArrayTest(); //expect(instance).to.be(); }); it('should have the property arrayArrayOfInteger (base name: "array_array_of_integer")', function() { // uncomment below and update the code to test the property arrayArrayOfInteger - //var instane = new OpenApiPetstore.ArrayTest(); + //var instance = new OpenApiPetstore.ArrayTest(); //expect(instance).to.be(); }); it('should have the property arrayArrayOfModel (base name: "array_array_of_model")', function() { // uncomment below and update the code to test the property arrayArrayOfModel - //var instane = new OpenApiPetstore.ArrayTest(); + //var instance = new OpenApiPetstore.ArrayTest(); //expect(instance).to.be(); }); diff --git a/samples/client/petstore/javascript-es6/test/model/Capitalization.spec.js b/samples/client/petstore/javascript-es6/test/model/Capitalization.spec.js index 8be47e3e132d..8f14fd583d51 100644 --- a/samples/client/petstore/javascript-es6/test/model/Capitalization.spec.js +++ b/samples/client/petstore/javascript-es6/test/model/Capitalization.spec.js @@ -2,7 +2,7 @@ * OpenAPI Petstore * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ * - * OpenAPI spec version: 1.0.0 + * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -14,10 +14,10 @@ (function(root, factory) { if (typeof define === 'function' && define.amd) { // AMD. - define(['expect.js', '../../src/index'], factory); + define(['expect.js', process.cwd()+'/src/index'], factory); } else if (typeof module === 'object' && module.exports) { // CommonJS-like environments that support module.exports, like Node. - factory(require('expect.js'), require('../../src/index')); + factory(require('expect.js'), require(process.cwd()+'/src/index')); } else { // Browser globals (root is window) factory(root.expect, root.OpenApiPetstore); @@ -50,43 +50,43 @@ describe('Capitalization', function() { it('should create an instance of Capitalization', function() { // uncomment below and update the code to test Capitalization - //var instane = new OpenApiPetstore.Capitalization(); + //var instance = new OpenApiPetstore.Capitalization(); //expect(instance).to.be.a(OpenApiPetstore.Capitalization); }); it('should have the property smallCamel (base name: "smallCamel")', function() { // uncomment below and update the code to test the property smallCamel - //var instane = new OpenApiPetstore.Capitalization(); + //var instance = new OpenApiPetstore.Capitalization(); //expect(instance).to.be(); }); it('should have the property capitalCamel (base name: "CapitalCamel")', function() { // uncomment below and update the code to test the property capitalCamel - //var instane = new OpenApiPetstore.Capitalization(); + //var instance = new OpenApiPetstore.Capitalization(); //expect(instance).to.be(); }); it('should have the property smallSnake (base name: "small_Snake")', function() { // uncomment below and update the code to test the property smallSnake - //var instane = new OpenApiPetstore.Capitalization(); + //var instance = new OpenApiPetstore.Capitalization(); //expect(instance).to.be(); }); it('should have the property capitalSnake (base name: "Capital_Snake")', function() { // uncomment below and update the code to test the property capitalSnake - //var instane = new OpenApiPetstore.Capitalization(); + //var instance = new OpenApiPetstore.Capitalization(); //expect(instance).to.be(); }); it('should have the property sCAETHFlowPoints (base name: "SCA_ETH_Flow_Points")', function() { // uncomment below and update the code to test the property sCAETHFlowPoints - //var instane = new OpenApiPetstore.Capitalization(); + //var instance = new OpenApiPetstore.Capitalization(); //expect(instance).to.be(); }); it('should have the property ATT_NAME (base name: "ATT_NAME")', function() { // uncomment below and update the code to test the property ATT_NAME - //var instane = new OpenApiPetstore.Capitalization(); + //var instance = new OpenApiPetstore.Capitalization(); //expect(instance).to.be(); }); diff --git a/samples/client/petstore/javascript-es6/test/model/Cat.spec.js b/samples/client/petstore/javascript-es6/test/model/Cat.spec.js index 99b7496450db..a0c3551cbc60 100644 --- a/samples/client/petstore/javascript-es6/test/model/Cat.spec.js +++ b/samples/client/petstore/javascript-es6/test/model/Cat.spec.js @@ -2,7 +2,7 @@ * OpenAPI Petstore * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ * - * OpenAPI spec version: 1.0.0 + * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -14,10 +14,10 @@ (function(root, factory) { if (typeof define === 'function' && define.amd) { // AMD. - define(['expect.js', '../../src/index'], factory); + define(['expect.js', process.cwd()+'/src/index'], factory); } else if (typeof module === 'object' && module.exports) { // CommonJS-like environments that support module.exports, like Node. - factory(require('expect.js'), require('../../src/index')); + factory(require('expect.js'), require(process.cwd()+'/src/index')); } else { // Browser globals (root is window) factory(root.expect, root.OpenApiPetstore); @@ -50,13 +50,13 @@ describe('Cat', function() { it('should create an instance of Cat', function() { // uncomment below and update the code to test Cat - //var instane = new OpenApiPetstore.Cat(); + //var instance = new OpenApiPetstore.Cat(); //expect(instance).to.be.a(OpenApiPetstore.Cat); }); it('should have the property declawed (base name: "declawed")', function() { // uncomment below and update the code to test the property declawed - //var instane = new OpenApiPetstore.Cat(); + //var instance = new OpenApiPetstore.Cat(); //expect(instance).to.be(); }); diff --git a/samples/client/petstore/javascript-es6/test/model/CatAllOf.spec.js b/samples/client/petstore/javascript-es6/test/model/CatAllOf.spec.js index be4cf8b972ae..7e9f50eaddde 100644 --- a/samples/client/petstore/javascript-es6/test/model/CatAllOf.spec.js +++ b/samples/client/petstore/javascript-es6/test/model/CatAllOf.spec.js @@ -50,13 +50,13 @@ describe('CatAllOf', function() { it('should create an instance of CatAllOf', function() { // uncomment below and update the code to test CatAllOf - //var instane = new OpenApiPetstore.CatAllOf(); + //var instance = new OpenApiPetstore.CatAllOf(); //expect(instance).to.be.a(OpenApiPetstore.CatAllOf); }); it('should have the property declawed (base name: "declawed")', function() { // uncomment below and update the code to test the property declawed - //var instane = new OpenApiPetstore.CatAllOf(); + //var instance = new OpenApiPetstore.CatAllOf(); //expect(instance).to.be(); }); diff --git a/samples/client/petstore/javascript-es6/test/model/Category.spec.js b/samples/client/petstore/javascript-es6/test/model/Category.spec.js index 2a02a9e4708b..c0e132b02604 100644 --- a/samples/client/petstore/javascript-es6/test/model/Category.spec.js +++ b/samples/client/petstore/javascript-es6/test/model/Category.spec.js @@ -2,7 +2,7 @@ * OpenAPI Petstore * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ * - * OpenAPI spec version: 1.0.0 + * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -14,10 +14,10 @@ (function(root, factory) { if (typeof define === 'function' && define.amd) { // AMD. - define(['expect.js', '../../src/index'], factory); + define(['expect.js', process.cwd()+'/src/index'], factory); } else if (typeof module === 'object' && module.exports) { // CommonJS-like environments that support module.exports, like Node. - factory(require('expect.js'), require('../../src/index')); + factory(require('expect.js'), require(process.cwd()+'/src/index')); } else { // Browser globals (root is window) factory(root.expect, root.OpenApiPetstore); @@ -50,19 +50,19 @@ describe('Category', function() { it('should create an instance of Category', function() { // uncomment below and update the code to test Category - //var instane = new OpenApiPetstore.Category(); + //var instance = new OpenApiPetstore.Category(); //expect(instance).to.be.a(OpenApiPetstore.Category); }); it('should have the property id (base name: "id")', function() { // uncomment below and update the code to test the property id - //var instane = new OpenApiPetstore.Category(); + //var instance = new OpenApiPetstore.Category(); //expect(instance).to.be(); }); it('should have the property name (base name: "name")', function() { // uncomment below and update the code to test the property name - //var instane = new OpenApiPetstore.Category(); + //var instance = new OpenApiPetstore.Category(); //expect(instance).to.be(); }); diff --git a/samples/client/petstore/javascript-es6/test/model/ClassModel.spec.js b/samples/client/petstore/javascript-es6/test/model/ClassModel.spec.js index d87a995d19b6..975308a1ceb5 100644 --- a/samples/client/petstore/javascript-es6/test/model/ClassModel.spec.js +++ b/samples/client/petstore/javascript-es6/test/model/ClassModel.spec.js @@ -2,7 +2,7 @@ * OpenAPI Petstore * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ * - * OpenAPI spec version: 1.0.0 + * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -14,10 +14,10 @@ (function(root, factory) { if (typeof define === 'function' && define.amd) { // AMD. - define(['expect.js', '../../src/index'], factory); + define(['expect.js', process.cwd()+'/src/index'], factory); } else if (typeof module === 'object' && module.exports) { // CommonJS-like environments that support module.exports, like Node. - factory(require('expect.js'), require('../../src/index')); + factory(require('expect.js'), require(process.cwd()+'/src/index')); } else { // Browser globals (root is window) factory(root.expect, root.OpenApiPetstore); @@ -50,13 +50,13 @@ describe('ClassModel', function() { it('should create an instance of ClassModel', function() { // uncomment below and update the code to test ClassModel - //var instane = new OpenApiPetstore.ClassModel(); + //var instance = new OpenApiPetstore.ClassModel(); //expect(instance).to.be.a(OpenApiPetstore.ClassModel); }); it('should have the property _class (base name: "_class")', function() { // uncomment below and update the code to test the property _class - //var instane = new OpenApiPetstore.ClassModel(); + //var instance = new OpenApiPetstore.ClassModel(); //expect(instance).to.be(); }); diff --git a/samples/client/petstore/javascript-es6/test/model/Client.spec.js b/samples/client/petstore/javascript-es6/test/model/Client.spec.js index 182ad6244341..c96ccac7e3a6 100644 --- a/samples/client/petstore/javascript-es6/test/model/Client.spec.js +++ b/samples/client/petstore/javascript-es6/test/model/Client.spec.js @@ -2,7 +2,7 @@ * OpenAPI Petstore * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ * - * OpenAPI spec version: 1.0.0 + * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -14,10 +14,10 @@ (function(root, factory) { if (typeof define === 'function' && define.amd) { // AMD. - define(['expect.js', '../../src/index'], factory); + define(['expect.js', process.cwd()+'/src/index'], factory); } else if (typeof module === 'object' && module.exports) { // CommonJS-like environments that support module.exports, like Node. - factory(require('expect.js'), require('../../src/index')); + factory(require('expect.js'), require(process.cwd()+'/src/index')); } else { // Browser globals (root is window) factory(root.expect, root.OpenApiPetstore); @@ -50,13 +50,13 @@ describe('Client', function() { it('should create an instance of Client', function() { // uncomment below and update the code to test Client - //var instane = new OpenApiPetstore.Client(); + //var instance = new OpenApiPetstore.Client(); //expect(instance).to.be.a(OpenApiPetstore.Client); }); it('should have the property client (base name: "client")', function() { // uncomment below and update the code to test the property client - //var instane = new OpenApiPetstore.Client(); + //var instance = new OpenApiPetstore.Client(); //expect(instance).to.be(); }); diff --git a/samples/client/petstore/javascript-es6/test/model/DeprecatedObject.spec.js b/samples/client/petstore/javascript-es6/test/model/DeprecatedObject.spec.js index 2273f70a0f9d..072245e26f51 100644 --- a/samples/client/petstore/javascript-es6/test/model/DeprecatedObject.spec.js +++ b/samples/client/petstore/javascript-es6/test/model/DeprecatedObject.spec.js @@ -50,7 +50,7 @@ describe('DeprecatedObject', function() { it('should create an instance of DeprecatedObject', function() { // uncomment below and update the code to test DeprecatedObject - //var instane = new OpenApiPetstore.DeprecatedObject(); + //var instance = new OpenApiPetstore.DeprecatedObject(); //expect(instance).to.be.a(OpenApiPetstore.DeprecatedObject); }); diff --git a/samples/client/petstore/javascript-es6/test/model/Dog.spec.js b/samples/client/petstore/javascript-es6/test/model/Dog.spec.js index 13d1584d01a0..709cbfa9fd3e 100644 --- a/samples/client/petstore/javascript-es6/test/model/Dog.spec.js +++ b/samples/client/petstore/javascript-es6/test/model/Dog.spec.js @@ -2,7 +2,7 @@ * OpenAPI Petstore * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ * - * OpenAPI spec version: 1.0.0 + * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -14,10 +14,10 @@ (function(root, factory) { if (typeof define === 'function' && define.amd) { // AMD. - define(['expect.js', '../../src/index'], factory); + define(['expect.js', process.cwd()+'/src/index'], factory); } else if (typeof module === 'object' && module.exports) { // CommonJS-like environments that support module.exports, like Node. - factory(require('expect.js'), require('../../src/index')); + factory(require('expect.js'), require(process.cwd()+'/src/index')); } else { // Browser globals (root is window) factory(root.expect, root.OpenApiPetstore); @@ -50,13 +50,13 @@ describe('Dog', function() { it('should create an instance of Dog', function() { // uncomment below and update the code to test Dog - //var instane = new OpenApiPetstore.Dog(); + //var instance = new OpenApiPetstore.Dog(); //expect(instance).to.be.a(OpenApiPetstore.Dog); }); it('should have the property breed (base name: "breed")', function() { // uncomment below and update the code to test the property breed - //var instane = new OpenApiPetstore.Dog(); + //var instance = new OpenApiPetstore.Dog(); //expect(instance).to.be(); }); diff --git a/samples/client/petstore/javascript-es6/test/model/DogAllOf.spec.js b/samples/client/petstore/javascript-es6/test/model/DogAllOf.spec.js index 767e3b0071b9..0bb726203a5f 100644 --- a/samples/client/petstore/javascript-es6/test/model/DogAllOf.spec.js +++ b/samples/client/petstore/javascript-es6/test/model/DogAllOf.spec.js @@ -50,13 +50,13 @@ describe('DogAllOf', function() { it('should create an instance of DogAllOf', function() { // uncomment below and update the code to test DogAllOf - //var instane = new OpenApiPetstore.DogAllOf(); + //var instance = new OpenApiPetstore.DogAllOf(); //expect(instance).to.be.a(OpenApiPetstore.DogAllOf); }); it('should have the property breed (base name: "breed")', function() { // uncomment below and update the code to test the property breed - //var instane = new OpenApiPetstore.DogAllOf(); + //var instance = new OpenApiPetstore.DogAllOf(); //expect(instance).to.be(); }); diff --git a/samples/client/petstore/javascript-es6/test/model/EnumArrays.spec.js b/samples/client/petstore/javascript-es6/test/model/EnumArrays.spec.js index dae8d83d7f2a..bda0e3bcf483 100644 --- a/samples/client/petstore/javascript-es6/test/model/EnumArrays.spec.js +++ b/samples/client/petstore/javascript-es6/test/model/EnumArrays.spec.js @@ -2,7 +2,7 @@ * OpenAPI Petstore * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ * - * OpenAPI spec version: 1.0.0 + * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -14,10 +14,10 @@ (function(root, factory) { if (typeof define === 'function' && define.amd) { // AMD. - define(['expect.js', '../../src/index'], factory); + define(['expect.js', process.cwd()+'/src/index'], factory); } else if (typeof module === 'object' && module.exports) { // CommonJS-like environments that support module.exports, like Node. - factory(require('expect.js'), require('../../src/index')); + factory(require('expect.js'), require(process.cwd()+'/src/index')); } else { // Browser globals (root is window) factory(root.expect, root.OpenApiPetstore); @@ -50,19 +50,19 @@ describe('EnumArrays', function() { it('should create an instance of EnumArrays', function() { // uncomment below and update the code to test EnumArrays - //var instane = new OpenApiPetstore.EnumArrays(); + //var instance = new OpenApiPetstore.EnumArrays(); //expect(instance).to.be.a(OpenApiPetstore.EnumArrays); }); it('should have the property justSymbol (base name: "just_symbol")', function() { // uncomment below and update the code to test the property justSymbol - //var instane = new OpenApiPetstore.EnumArrays(); + //var instance = new OpenApiPetstore.EnumArrays(); //expect(instance).to.be(); }); it('should have the property arrayEnum (base name: "array_enum")', function() { // uncomment below and update the code to test the property arrayEnum - //var instane = new OpenApiPetstore.EnumArrays(); + //var instance = new OpenApiPetstore.EnumArrays(); //expect(instance).to.be(); }); diff --git a/samples/client/petstore/javascript-es6/test/model/EnumClass.spec.js b/samples/client/petstore/javascript-es6/test/model/EnumClass.spec.js index eb5a1117918f..31924e83d573 100644 --- a/samples/client/petstore/javascript-es6/test/model/EnumClass.spec.js +++ b/samples/client/petstore/javascript-es6/test/model/EnumClass.spec.js @@ -2,7 +2,7 @@ * OpenAPI Petstore * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ * - * OpenAPI spec version: 1.0.0 + * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -14,10 +14,10 @@ (function(root, factory) { if (typeof define === 'function' && define.amd) { // AMD. - define(['expect.js', '../../src/index'], factory); + define(['expect.js', process.cwd()+'/src/index'], factory); } else if (typeof module === 'object' && module.exports) { // CommonJS-like environments that support module.exports, like Node. - factory(require('expect.js'), require('../../src/index')); + factory(require('expect.js'), require(process.cwd()+'/src/index')); } else { // Browser globals (root is window) factory(root.expect, root.OpenApiPetstore); @@ -49,7 +49,7 @@ describe('EnumClass', function() { it('should create an instance of EnumClass', function() { // uncomment below and update the code to test EnumClass - //var instane = new OpenApiPetstore.EnumClass(); + //var instance = new OpenApiPetstore.EnumClass(); //expect(instance).to.be.a(OpenApiPetstore.EnumClass); }); diff --git a/samples/client/petstore/javascript-es6/test/model/EnumTest.spec.js b/samples/client/petstore/javascript-es6/test/model/EnumTest.spec.js index 6d7c2519e684..ee14bc9b9d5b 100644 --- a/samples/client/petstore/javascript-es6/test/model/EnumTest.spec.js +++ b/samples/client/petstore/javascript-es6/test/model/EnumTest.spec.js @@ -2,7 +2,7 @@ * OpenAPI Petstore * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ * - * OpenAPI spec version: 1.0.0 + * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -14,10 +14,10 @@ (function(root, factory) { if (typeof define === 'function' && define.amd) { // AMD. - define(['expect.js', '../../src/index'], factory); + define(['expect.js', process.cwd()+'/src/index'], factory); } else if (typeof module === 'object' && module.exports) { // CommonJS-like environments that support module.exports, like Node. - factory(require('expect.js'), require('../../src/index')); + factory(require('expect.js'), require(process.cwd()+'/src/index')); } else { // Browser globals (root is window) factory(root.expect, root.OpenApiPetstore); @@ -50,37 +50,55 @@ describe('EnumTest', function() { it('should create an instance of EnumTest', function() { // uncomment below and update the code to test EnumTest - //var instane = new OpenApiPetstore.EnumTest(); + //var instance = new OpenApiPetstore.EnumTest(); //expect(instance).to.be.a(OpenApiPetstore.EnumTest); }); it('should have the property enumString (base name: "enum_string")', function() { // uncomment below and update the code to test the property enumString - //var instane = new OpenApiPetstore.EnumTest(); + //var instance = new OpenApiPetstore.EnumTest(); //expect(instance).to.be(); }); it('should have the property enumStringRequired (base name: "enum_string_required")', function() { // uncomment below and update the code to test the property enumStringRequired - //var instane = new OpenApiPetstore.EnumTest(); + //var instance = new OpenApiPetstore.EnumTest(); //expect(instance).to.be(); }); it('should have the property enumInteger (base name: "enum_integer")', function() { // uncomment below and update the code to test the property enumInteger - //var instane = new OpenApiPetstore.EnumTest(); + //var instance = new OpenApiPetstore.EnumTest(); //expect(instance).to.be(); }); it('should have the property enumNumber (base name: "enum_number")', function() { // uncomment below and update the code to test the property enumNumber - //var instane = new OpenApiPetstore.EnumTest(); + //var instance = new OpenApiPetstore.EnumTest(); //expect(instance).to.be(); }); it('should have the property outerEnum (base name: "outerEnum")', function() { // uncomment below and update the code to test the property outerEnum - //var instane = new OpenApiPetstore.EnumTest(); + //var instance = new OpenApiPetstore.EnumTest(); + //expect(instance).to.be(); + }); + + it('should have the property outerEnumInteger (base name: "outerEnumInteger")', function() { + // uncomment below and update the code to test the property outerEnumInteger + //var instance = new OpenApiPetstore.EnumTest(); + //expect(instance).to.be(); + }); + + it('should have the property outerEnumDefaultValue (base name: "outerEnumDefaultValue")', function() { + // uncomment below and update the code to test the property outerEnumDefaultValue + //var instance = new OpenApiPetstore.EnumTest(); + //expect(instance).to.be(); + }); + + it('should have the property outerEnumIntegerDefaultValue (base name: "outerEnumIntegerDefaultValue")', function() { + // uncomment below and update the code to test the property outerEnumIntegerDefaultValue + //var instance = new OpenApiPetstore.EnumTest(); //expect(instance).to.be(); }); diff --git a/samples/client/petstore/javascript-es6/test/model/File.spec.js b/samples/client/petstore/javascript-es6/test/model/File.spec.js index 10666dc53c7c..ac6fbb3de7a2 100644 --- a/samples/client/petstore/javascript-es6/test/model/File.spec.js +++ b/samples/client/petstore/javascript-es6/test/model/File.spec.js @@ -2,7 +2,7 @@ * OpenAPI Petstore * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ * - * OpenAPI spec version: 1.0.0 + * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -14,10 +14,10 @@ (function(root, factory) { if (typeof define === 'function' && define.amd) { // AMD. - define(['expect.js', '../../src/index'], factory); + define(['expect.js', process.cwd()+'/src/index'], factory); } else if (typeof module === 'object' && module.exports) { // CommonJS-like environments that support module.exports, like Node. - factory(require('expect.js'), require('../../src/index')); + factory(require('expect.js'), require(process.cwd()+'/src/index')); } else { // Browser globals (root is window) factory(root.expect, root.OpenApiPetstore); @@ -50,13 +50,13 @@ describe('File', function() { it('should create an instance of File', function() { // uncomment below and update the code to test File - //var instane = new OpenApiPetstore.File(); + //var instance = new OpenApiPetstore.File(); //expect(instance).to.be.a(OpenApiPetstore.File); }); it('should have the property sourceURI (base name: "sourceURI")', function() { // uncomment below and update the code to test the property sourceURI - //var instane = new OpenApiPetstore.File(); + //var instance = new OpenApiPetstore.File(); //expect(instance).to.be(); }); diff --git a/samples/client/petstore/javascript-es6/test/model/FileSchemaTestClass.spec.js b/samples/client/petstore/javascript-es6/test/model/FileSchemaTestClass.spec.js index d6e49689d232..2f0090897223 100644 --- a/samples/client/petstore/javascript-es6/test/model/FileSchemaTestClass.spec.js +++ b/samples/client/petstore/javascript-es6/test/model/FileSchemaTestClass.spec.js @@ -2,7 +2,7 @@ * OpenAPI Petstore * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ * - * OpenAPI spec version: 1.0.0 + * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -14,10 +14,10 @@ (function(root, factory) { if (typeof define === 'function' && define.amd) { // AMD. - define(['expect.js', '../../src/index'], factory); + define(['expect.js', process.cwd()+'/src/index'], factory); } else if (typeof module === 'object' && module.exports) { // CommonJS-like environments that support module.exports, like Node. - factory(require('expect.js'), require('../../src/index')); + factory(require('expect.js'), require(process.cwd()+'/src/index')); } else { // Browser globals (root is window) factory(root.expect, root.OpenApiPetstore); @@ -50,19 +50,19 @@ describe('FileSchemaTestClass', function() { it('should create an instance of FileSchemaTestClass', function() { // uncomment below and update the code to test FileSchemaTestClass - //var instane = new OpenApiPetstore.FileSchemaTestClass(); + //var instance = new OpenApiPetstore.FileSchemaTestClass(); //expect(instance).to.be.a(OpenApiPetstore.FileSchemaTestClass); }); it('should have the property file (base name: "file")', function() { // uncomment below and update the code to test the property file - //var instane = new OpenApiPetstore.FileSchemaTestClass(); + //var instance = new OpenApiPetstore.FileSchemaTestClass(); //expect(instance).to.be(); }); it('should have the property files (base name: "files")', function() { // uncomment below and update the code to test the property files - //var instane = new OpenApiPetstore.FileSchemaTestClass(); + //var instance = new OpenApiPetstore.FileSchemaTestClass(); //expect(instance).to.be(); }); diff --git a/samples/client/petstore/javascript-es6/test/model/Foo.spec.js b/samples/client/petstore/javascript-es6/test/model/Foo.spec.js index 19023af6f106..81491fc42c9d 100644 --- a/samples/client/petstore/javascript-es6/test/model/Foo.spec.js +++ b/samples/client/petstore/javascript-es6/test/model/Foo.spec.js @@ -2,7 +2,7 @@ * OpenAPI Petstore * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ * - * OpenAPI spec version: 1.0.0 + * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -14,10 +14,10 @@ (function(root, factory) { if (typeof define === 'function' && define.amd) { // AMD. - define(['expect.js', '../../src/index'], factory); + define(['expect.js', process.cwd()+'/src/index'], factory); } else if (typeof module === 'object' && module.exports) { // CommonJS-like environments that support module.exports, like Node. - factory(require('expect.js'), require('../../src/index')); + factory(require('expect.js'), require(process.cwd()+'/src/index')); } else { // Browser globals (root is window) factory(root.expect, root.OpenApiPetstore); @@ -50,13 +50,13 @@ describe('Foo', function() { it('should create an instance of Foo', function() { // uncomment below and update the code to test Foo - //var instane = new OpenApiPetstore.Foo(); + //var instance = new OpenApiPetstore.Foo(); //expect(instance).to.be.a(OpenApiPetstore.Foo); }); it('should have the property bar (base name: "bar")', function() { // uncomment below and update the code to test the property bar - //var instane = new OpenApiPetstore.Foo(); + //var instance = new OpenApiPetstore.Foo(); //expect(instance).to.be(); }); diff --git a/samples/client/petstore/javascript-es6/test/model/FormatTest.spec.js b/samples/client/petstore/javascript-es6/test/model/FormatTest.spec.js index 2e61e4f8ed94..6506a39d85fd 100644 --- a/samples/client/petstore/javascript-es6/test/model/FormatTest.spec.js +++ b/samples/client/petstore/javascript-es6/test/model/FormatTest.spec.js @@ -2,7 +2,7 @@ * OpenAPI Petstore * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ * - * OpenAPI spec version: 1.0.0 + * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -14,10 +14,10 @@ (function(root, factory) { if (typeof define === 'function' && define.amd) { // AMD. - define(['expect.js', '../../src/index'], factory); + define(['expect.js', process.cwd()+'/src/index'], factory); } else if (typeof module === 'object' && module.exports) { // CommonJS-like environments that support module.exports, like Node. - factory(require('expect.js'), require('../../src/index')); + factory(require('expect.js'), require(process.cwd()+'/src/index')); } else { // Browser globals (root is window) factory(root.expect, root.OpenApiPetstore); @@ -50,85 +50,103 @@ describe('FormatTest', function() { it('should create an instance of FormatTest', function() { // uncomment below and update the code to test FormatTest - //var instane = new OpenApiPetstore.FormatTest(); + //var instance = new OpenApiPetstore.FormatTest(); //expect(instance).to.be.a(OpenApiPetstore.FormatTest); }); it('should have the property integer (base name: "integer")', function() { // uncomment below and update the code to test the property integer - //var instane = new OpenApiPetstore.FormatTest(); + //var instance = new OpenApiPetstore.FormatTest(); //expect(instance).to.be(); }); it('should have the property int32 (base name: "int32")', function() { // uncomment below and update the code to test the property int32 - //var instane = new OpenApiPetstore.FormatTest(); + //var instance = new OpenApiPetstore.FormatTest(); //expect(instance).to.be(); }); it('should have the property int64 (base name: "int64")', function() { // uncomment below and update the code to test the property int64 - //var instane = new OpenApiPetstore.FormatTest(); + //var instance = new OpenApiPetstore.FormatTest(); //expect(instance).to.be(); }); - it('should have the property _number (base name: "number")', function() { - // uncomment below and update the code to test the property _number - //var instane = new OpenApiPetstore.FormatTest(); + it('should have the property number (base name: "number")', function() { + // uncomment below and update the code to test the property number + //var instance = new OpenApiPetstore.FormatTest(); //expect(instance).to.be(); }); it('should have the property _float (base name: "float")', function() { // uncomment below and update the code to test the property _float - //var instane = new OpenApiPetstore.FormatTest(); + //var instance = new OpenApiPetstore.FormatTest(); //expect(instance).to.be(); }); it('should have the property _double (base name: "double")', function() { // uncomment below and update the code to test the property _double - //var instane = new OpenApiPetstore.FormatTest(); + //var instance = new OpenApiPetstore.FormatTest(); //expect(instance).to.be(); }); - it('should have the property _string (base name: "string")', function() { - // uncomment below and update the code to test the property _string - //var instane = new OpenApiPetstore.FormatTest(); + it('should have the property decimal (base name: "decimal")', function() { + // uncomment below and update the code to test the property decimal + //var instance = new OpenApiPetstore.FormatTest(); + //expect(instance).to.be(); + }); + + it('should have the property string (base name: "string")', function() { + // uncomment below and update the code to test the property string + //var instance = new OpenApiPetstore.FormatTest(); //expect(instance).to.be(); }); it('should have the property _byte (base name: "byte")', function() { // uncomment below and update the code to test the property _byte - //var instane = new OpenApiPetstore.FormatTest(); + //var instance = new OpenApiPetstore.FormatTest(); //expect(instance).to.be(); }); it('should have the property binary (base name: "binary")', function() { // uncomment below and update the code to test the property binary - //var instane = new OpenApiPetstore.FormatTest(); + //var instance = new OpenApiPetstore.FormatTest(); //expect(instance).to.be(); }); - it('should have the property _date (base name: "date")', function() { - // uncomment below and update the code to test the property _date - //var instane = new OpenApiPetstore.FormatTest(); + it('should have the property date (base name: "date")', function() { + // uncomment below and update the code to test the property date + //var instance = new OpenApiPetstore.FormatTest(); //expect(instance).to.be(); }); it('should have the property dateTime (base name: "dateTime")', function() { // uncomment below and update the code to test the property dateTime - //var instane = new OpenApiPetstore.FormatTest(); + //var instance = new OpenApiPetstore.FormatTest(); //expect(instance).to.be(); }); it('should have the property uuid (base name: "uuid")', function() { // uncomment below and update the code to test the property uuid - //var instane = new OpenApiPetstore.FormatTest(); + //var instance = new OpenApiPetstore.FormatTest(); //expect(instance).to.be(); }); it('should have the property password (base name: "password")', function() { // uncomment below and update the code to test the property password - //var instane = new OpenApiPetstore.FormatTest(); + //var instance = new OpenApiPetstore.FormatTest(); + //expect(instance).to.be(); + }); + + it('should have the property patternWithDigits (base name: "pattern_with_digits")', function() { + // uncomment below and update the code to test the property patternWithDigits + //var instance = new OpenApiPetstore.FormatTest(); + //expect(instance).to.be(); + }); + + it('should have the property patternWithDigitsAndDelimiter (base name: "pattern_with_digits_and_delimiter")', function() { + // uncomment below and update the code to test the property patternWithDigitsAndDelimiter + //var instance = new OpenApiPetstore.FormatTest(); //expect(instance).to.be(); }); diff --git a/samples/client/petstore/javascript-es6/test/model/HasOnlyReadOnly.spec.js b/samples/client/petstore/javascript-es6/test/model/HasOnlyReadOnly.spec.js index 409e06ad823c..e9ba0be44fee 100644 --- a/samples/client/petstore/javascript-es6/test/model/HasOnlyReadOnly.spec.js +++ b/samples/client/petstore/javascript-es6/test/model/HasOnlyReadOnly.spec.js @@ -2,7 +2,7 @@ * OpenAPI Petstore * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ * - * OpenAPI spec version: 1.0.0 + * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -14,10 +14,10 @@ (function(root, factory) { if (typeof define === 'function' && define.amd) { // AMD. - define(['expect.js', '../../src/index'], factory); + define(['expect.js', process.cwd()+'/src/index'], factory); } else if (typeof module === 'object' && module.exports) { // CommonJS-like environments that support module.exports, like Node. - factory(require('expect.js'), require('../../src/index')); + factory(require('expect.js'), require(process.cwd()+'/src/index')); } else { // Browser globals (root is window) factory(root.expect, root.OpenApiPetstore); @@ -50,19 +50,19 @@ describe('HasOnlyReadOnly', function() { it('should create an instance of HasOnlyReadOnly', function() { // uncomment below and update the code to test HasOnlyReadOnly - //var instane = new OpenApiPetstore.HasOnlyReadOnly(); + //var instance = new OpenApiPetstore.HasOnlyReadOnly(); //expect(instance).to.be.a(OpenApiPetstore.HasOnlyReadOnly); }); it('should have the property bar (base name: "bar")', function() { // uncomment below and update the code to test the property bar - //var instane = new OpenApiPetstore.HasOnlyReadOnly(); + //var instance = new OpenApiPetstore.HasOnlyReadOnly(); //expect(instance).to.be(); }); it('should have the property foo (base name: "foo")', function() { // uncomment below and update the code to test the property foo - //var instane = new OpenApiPetstore.HasOnlyReadOnly(); + //var instance = new OpenApiPetstore.HasOnlyReadOnly(); //expect(instance).to.be(); }); diff --git a/samples/client/petstore/javascript-es6/test/model/HealthCheckResult.spec.js b/samples/client/petstore/javascript-es6/test/model/HealthCheckResult.spec.js index fec4b172d816..25d9ecd929f0 100644 --- a/samples/client/petstore/javascript-es6/test/model/HealthCheckResult.spec.js +++ b/samples/client/petstore/javascript-es6/test/model/HealthCheckResult.spec.js @@ -2,7 +2,7 @@ * OpenAPI Petstore * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ * - * OpenAPI spec version: 1.0.0 + * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -14,10 +14,10 @@ (function(root, factory) { if (typeof define === 'function' && define.amd) { // AMD. - define(['expect.js', '../../src/index'], factory); + define(['expect.js', process.cwd()+'/src/index'], factory); } else if (typeof module === 'object' && module.exports) { // CommonJS-like environments that support module.exports, like Node. - factory(require('expect.js'), require('../../src/index')); + factory(require('expect.js'), require(process.cwd()+'/src/index')); } else { // Browser globals (root is window) factory(root.expect, root.OpenApiPetstore); @@ -50,13 +50,13 @@ describe('HealthCheckResult', function() { it('should create an instance of HealthCheckResult', function() { // uncomment below and update the code to test HealthCheckResult - //var instane = new OpenApiPetstore.HealthCheckResult(); + //var instance = new OpenApiPetstore.HealthCheckResult(); //expect(instance).to.be.a(OpenApiPetstore.HealthCheckResult); }); it('should have the property nullableMessage (base name: "NullableMessage")', function() { // uncomment below and update the code to test the property nullableMessage - //var instane = new OpenApiPetstore.HealthCheckResult(); + //var instance = new OpenApiPetstore.HealthCheckResult(); //expect(instance).to.be(); }); diff --git a/samples/client/petstore/javascript-es6/test/model/List.spec.js b/samples/client/petstore/javascript-es6/test/model/List.spec.js index e3a8574d9aef..675aa82c185c 100644 --- a/samples/client/petstore/javascript-es6/test/model/List.spec.js +++ b/samples/client/petstore/javascript-es6/test/model/List.spec.js @@ -2,7 +2,7 @@ * OpenAPI Petstore * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ * - * OpenAPI spec version: 1.0.0 + * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -14,10 +14,10 @@ (function(root, factory) { if (typeof define === 'function' && define.amd) { // AMD. - define(['expect.js', '../../src/index'], factory); + define(['expect.js', process.cwd()+'/src/index'], factory); } else if (typeof module === 'object' && module.exports) { // CommonJS-like environments that support module.exports, like Node. - factory(require('expect.js'), require('../../src/index')); + factory(require('expect.js'), require(process.cwd()+'/src/index')); } else { // Browser globals (root is window) factory(root.expect, root.OpenApiPetstore); @@ -50,13 +50,13 @@ describe('List', function() { it('should create an instance of List', function() { // uncomment below and update the code to test List - //var instane = new OpenApiPetstore.List(); + //var instance = new OpenApiPetstore.List(); //expect(instance).to.be.a(OpenApiPetstore.List); }); it('should have the property _123list (base name: "123-list")', function() { // uncomment below and update the code to test the property _123list - //var instane = new OpenApiPetstore.List(); + //var instance = new OpenApiPetstore.List(); //expect(instance).to.be(); }); diff --git a/samples/client/petstore/javascript-es6/test/model/MapTest.spec.js b/samples/client/petstore/javascript-es6/test/model/MapTest.spec.js index da009beec4eb..4e7dabcc2137 100644 --- a/samples/client/petstore/javascript-es6/test/model/MapTest.spec.js +++ b/samples/client/petstore/javascript-es6/test/model/MapTest.spec.js @@ -2,7 +2,7 @@ * OpenAPI Petstore * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ * - * OpenAPI spec version: 1.0.0 + * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -14,10 +14,10 @@ (function(root, factory) { if (typeof define === 'function' && define.amd) { // AMD. - define(['expect.js', '../../src/index'], factory); + define(['expect.js', process.cwd()+'/src/index'], factory); } else if (typeof module === 'object' && module.exports) { // CommonJS-like environments that support module.exports, like Node. - factory(require('expect.js'), require('../../src/index')); + factory(require('expect.js'), require(process.cwd()+'/src/index')); } else { // Browser globals (root is window) factory(root.expect, root.OpenApiPetstore); @@ -50,19 +50,31 @@ describe('MapTest', function() { it('should create an instance of MapTest', function() { // uncomment below and update the code to test MapTest - //var instane = new OpenApiPetstore.MapTest(); + //var instance = new OpenApiPetstore.MapTest(); //expect(instance).to.be.a(OpenApiPetstore.MapTest); }); it('should have the property mapMapOfString (base name: "map_map_of_string")', function() { // uncomment below and update the code to test the property mapMapOfString - //var instane = new OpenApiPetstore.MapTest(); + //var instance = new OpenApiPetstore.MapTest(); //expect(instance).to.be(); }); it('should have the property mapOfEnumString (base name: "map_of_enum_string")', function() { // uncomment below and update the code to test the property mapOfEnumString - //var instane = new OpenApiPetstore.MapTest(); + //var instance = new OpenApiPetstore.MapTest(); + //expect(instance).to.be(); + }); + + it('should have the property directMap (base name: "direct_map")', function() { + // uncomment below and update the code to test the property directMap + //var instance = new OpenApiPetstore.MapTest(); + //expect(instance).to.be(); + }); + + it('should have the property indirectMap (base name: "indirect_map")', function() { + // uncomment below and update the code to test the property indirectMap + //var instance = new OpenApiPetstore.MapTest(); //expect(instance).to.be(); }); diff --git a/samples/client/petstore/javascript-es6/test/model/MixedPropertiesAndAdditionalPropertiesClass.spec.js b/samples/client/petstore/javascript-es6/test/model/MixedPropertiesAndAdditionalPropertiesClass.spec.js index c9174f561547..2e72316a90a2 100644 --- a/samples/client/petstore/javascript-es6/test/model/MixedPropertiesAndAdditionalPropertiesClass.spec.js +++ b/samples/client/petstore/javascript-es6/test/model/MixedPropertiesAndAdditionalPropertiesClass.spec.js @@ -2,7 +2,7 @@ * OpenAPI Petstore * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ * - * OpenAPI spec version: 1.0.0 + * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -14,10 +14,10 @@ (function(root, factory) { if (typeof define === 'function' && define.amd) { // AMD. - define(['expect.js', '../../src/index'], factory); + define(['expect.js', process.cwd()+'/src/index'], factory); } else if (typeof module === 'object' && module.exports) { // CommonJS-like environments that support module.exports, like Node. - factory(require('expect.js'), require('../../src/index')); + factory(require('expect.js'), require(process.cwd()+'/src/index')); } else { // Browser globals (root is window) factory(root.expect, root.OpenApiPetstore); @@ -50,25 +50,25 @@ describe('MixedPropertiesAndAdditionalPropertiesClass', function() { it('should create an instance of MixedPropertiesAndAdditionalPropertiesClass', function() { // uncomment below and update the code to test MixedPropertiesAndAdditionalPropertiesClass - //var instane = new OpenApiPetstore.MixedPropertiesAndAdditionalPropertiesClass(); + //var instance = new OpenApiPetstore.MixedPropertiesAndAdditionalPropertiesClass(); //expect(instance).to.be.a(OpenApiPetstore.MixedPropertiesAndAdditionalPropertiesClass); }); it('should have the property uuid (base name: "uuid")', function() { // uncomment below and update the code to test the property uuid - //var instane = new OpenApiPetstore.MixedPropertiesAndAdditionalPropertiesClass(); + //var instance = new OpenApiPetstore.MixedPropertiesAndAdditionalPropertiesClass(); //expect(instance).to.be(); }); it('should have the property dateTime (base name: "dateTime")', function() { // uncomment below and update the code to test the property dateTime - //var instane = new OpenApiPetstore.MixedPropertiesAndAdditionalPropertiesClass(); + //var instance = new OpenApiPetstore.MixedPropertiesAndAdditionalPropertiesClass(); //expect(instance).to.be(); }); it('should have the property map (base name: "map")', function() { // uncomment below and update the code to test the property map - //var instane = new OpenApiPetstore.MixedPropertiesAndAdditionalPropertiesClass(); + //var instance = new OpenApiPetstore.MixedPropertiesAndAdditionalPropertiesClass(); //expect(instance).to.be(); }); diff --git a/samples/client/petstore/javascript-es6/test/model/Model200Response.spec.js b/samples/client/petstore/javascript-es6/test/model/Model200Response.spec.js index 13f768e97307..7cd4da5e51e2 100644 --- a/samples/client/petstore/javascript-es6/test/model/Model200Response.spec.js +++ b/samples/client/petstore/javascript-es6/test/model/Model200Response.spec.js @@ -2,7 +2,7 @@ * OpenAPI Petstore * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ * - * OpenAPI spec version: 1.0.0 + * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -14,10 +14,10 @@ (function(root, factory) { if (typeof define === 'function' && define.amd) { // AMD. - define(['expect.js', '../../src/index'], factory); + define(['expect.js', process.cwd()+'/src/index'], factory); } else if (typeof module === 'object' && module.exports) { // CommonJS-like environments that support module.exports, like Node. - factory(require('expect.js'), require('../../src/index')); + factory(require('expect.js'), require(process.cwd()+'/src/index')); } else { // Browser globals (root is window) factory(root.expect, root.OpenApiPetstore); @@ -50,19 +50,19 @@ describe('Model200Response', function() { it('should create an instance of Model200Response', function() { // uncomment below and update the code to test Model200Response - //var instane = new OpenApiPetstore.Model200Response(); + //var instance = new OpenApiPetstore.Model200Response(); //expect(instance).to.be.a(OpenApiPetstore.Model200Response); }); it('should have the property name (base name: "name")', function() { // uncomment below and update the code to test the property name - //var instane = new OpenApiPetstore.Model200Response(); + //var instance = new OpenApiPetstore.Model200Response(); //expect(instance).to.be(); }); it('should have the property _class (base name: "class")', function() { // uncomment below and update the code to test the property _class - //var instane = new OpenApiPetstore.Model200Response(); + //var instance = new OpenApiPetstore.Model200Response(); //expect(instance).to.be(); }); diff --git a/samples/client/petstore/javascript-es6/test/model/Name.spec.js b/samples/client/petstore/javascript-es6/test/model/Name.spec.js index 3726b8867b4c..a88057711f2b 100644 --- a/samples/client/petstore/javascript-es6/test/model/Name.spec.js +++ b/samples/client/petstore/javascript-es6/test/model/Name.spec.js @@ -2,7 +2,7 @@ * OpenAPI Petstore * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ * - * OpenAPI spec version: 1.0.0 + * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -14,10 +14,10 @@ (function(root, factory) { if (typeof define === 'function' && define.amd) { // AMD. - define(['expect.js', '../../src/index'], factory); + define(['expect.js', process.cwd()+'/src/index'], factory); } else if (typeof module === 'object' && module.exports) { // CommonJS-like environments that support module.exports, like Node. - factory(require('expect.js'), require('../../src/index')); + factory(require('expect.js'), require(process.cwd()+'/src/index')); } else { // Browser globals (root is window) factory(root.expect, root.OpenApiPetstore); @@ -50,31 +50,31 @@ describe('Name', function() { it('should create an instance of Name', function() { // uncomment below and update the code to test Name - //var instane = new OpenApiPetstore.Name(); + //var instance = new OpenApiPetstore.Name(); //expect(instance).to.be.a(OpenApiPetstore.Name); }); it('should have the property name (base name: "name")', function() { // uncomment below and update the code to test the property name - //var instane = new OpenApiPetstore.Name(); + //var instance = new OpenApiPetstore.Name(); //expect(instance).to.be(); }); it('should have the property snakeCase (base name: "snake_case")', function() { // uncomment below and update the code to test the property snakeCase - //var instane = new OpenApiPetstore.Name(); + //var instance = new OpenApiPetstore.Name(); //expect(instance).to.be(); }); it('should have the property property (base name: "property")', function() { // uncomment below and update the code to test the property property - //var instane = new OpenApiPetstore.Name(); + //var instance = new OpenApiPetstore.Name(); //expect(instance).to.be(); }); it('should have the property _123number (base name: "123Number")', function() { // uncomment below and update the code to test the property _123number - //var instane = new OpenApiPetstore.Name(); + //var instance = new OpenApiPetstore.Name(); //expect(instance).to.be(); }); diff --git a/samples/client/petstore/javascript-es6/test/model/NullableClass.spec.js b/samples/client/petstore/javascript-es6/test/model/NullableClass.spec.js index 89cd2821d42b..602a172777f0 100644 --- a/samples/client/petstore/javascript-es6/test/model/NullableClass.spec.js +++ b/samples/client/petstore/javascript-es6/test/model/NullableClass.spec.js @@ -50,79 +50,79 @@ describe('NullableClass', function() { it('should create an instance of NullableClass', function() { // uncomment below and update the code to test NullableClass - //var instane = new OpenApiPetstore.NullableClass(); + //var instance = new OpenApiPetstore.NullableClass(); //expect(instance).to.be.a(OpenApiPetstore.NullableClass); }); it('should have the property integerProp (base name: "integer_prop")', function() { // uncomment below and update the code to test the property integerProp - //var instane = new OpenApiPetstore.NullableClass(); + //var instance = new OpenApiPetstore.NullableClass(); //expect(instance).to.be(); }); it('should have the property numberProp (base name: "number_prop")', function() { // uncomment below and update the code to test the property numberProp - //var instane = new OpenApiPetstore.NullableClass(); + //var instance = new OpenApiPetstore.NullableClass(); //expect(instance).to.be(); }); it('should have the property booleanProp (base name: "boolean_prop")', function() { // uncomment below and update the code to test the property booleanProp - //var instane = new OpenApiPetstore.NullableClass(); + //var instance = new OpenApiPetstore.NullableClass(); //expect(instance).to.be(); }); it('should have the property stringProp (base name: "string_prop")', function() { // uncomment below and update the code to test the property stringProp - //var instane = new OpenApiPetstore.NullableClass(); + //var instance = new OpenApiPetstore.NullableClass(); //expect(instance).to.be(); }); it('should have the property dateProp (base name: "date_prop")', function() { // uncomment below and update the code to test the property dateProp - //var instane = new OpenApiPetstore.NullableClass(); + //var instance = new OpenApiPetstore.NullableClass(); //expect(instance).to.be(); }); it('should have the property datetimeProp (base name: "datetime_prop")', function() { // uncomment below and update the code to test the property datetimeProp - //var instane = new OpenApiPetstore.NullableClass(); + //var instance = new OpenApiPetstore.NullableClass(); //expect(instance).to.be(); }); it('should have the property arrayNullableProp (base name: "array_nullable_prop")', function() { // uncomment below and update the code to test the property arrayNullableProp - //var instane = new OpenApiPetstore.NullableClass(); + //var instance = new OpenApiPetstore.NullableClass(); //expect(instance).to.be(); }); it('should have the property arrayAndItemsNullableProp (base name: "array_and_items_nullable_prop")', function() { // uncomment below and update the code to test the property arrayAndItemsNullableProp - //var instane = new OpenApiPetstore.NullableClass(); + //var instance = new OpenApiPetstore.NullableClass(); //expect(instance).to.be(); }); it('should have the property arrayItemsNullable (base name: "array_items_nullable")', function() { // uncomment below and update the code to test the property arrayItemsNullable - //var instane = new OpenApiPetstore.NullableClass(); + //var instance = new OpenApiPetstore.NullableClass(); //expect(instance).to.be(); }); it('should have the property objectNullableProp (base name: "object_nullable_prop")', function() { // uncomment below and update the code to test the property objectNullableProp - //var instane = new OpenApiPetstore.NullableClass(); + //var instance = new OpenApiPetstore.NullableClass(); //expect(instance).to.be(); }); it('should have the property objectAndItemsNullableProp (base name: "object_and_items_nullable_prop")', function() { // uncomment below and update the code to test the property objectAndItemsNullableProp - //var instane = new OpenApiPetstore.NullableClass(); + //var instance = new OpenApiPetstore.NullableClass(); //expect(instance).to.be(); }); it('should have the property objectItemsNullable (base name: "object_items_nullable")', function() { // uncomment below and update the code to test the property objectItemsNullable - //var instane = new OpenApiPetstore.NullableClass(); + //var instance = new OpenApiPetstore.NullableClass(); //expect(instance).to.be(); }); diff --git a/samples/client/petstore/javascript-es6/test/model/NumberOnly.spec.js b/samples/client/petstore/javascript-es6/test/model/NumberOnly.spec.js index 2261973c9af1..a39e26134eda 100644 --- a/samples/client/petstore/javascript-es6/test/model/NumberOnly.spec.js +++ b/samples/client/petstore/javascript-es6/test/model/NumberOnly.spec.js @@ -2,7 +2,7 @@ * OpenAPI Petstore * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ * - * OpenAPI spec version: 1.0.0 + * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -14,10 +14,10 @@ (function(root, factory) { if (typeof define === 'function' && define.amd) { // AMD. - define(['expect.js', '../../src/index'], factory); + define(['expect.js', process.cwd()+'/src/index'], factory); } else if (typeof module === 'object' && module.exports) { // CommonJS-like environments that support module.exports, like Node. - factory(require('expect.js'), require('../../src/index')); + factory(require('expect.js'), require(process.cwd()+'/src/index')); } else { // Browser globals (root is window) factory(root.expect, root.OpenApiPetstore); @@ -50,13 +50,13 @@ describe('NumberOnly', function() { it('should create an instance of NumberOnly', function() { // uncomment below and update the code to test NumberOnly - //var instane = new OpenApiPetstore.NumberOnly(); + //var instance = new OpenApiPetstore.NumberOnly(); //expect(instance).to.be.a(OpenApiPetstore.NumberOnly); }); it('should have the property justNumber (base name: "JustNumber")', function() { // uncomment below and update the code to test the property justNumber - //var instane = new OpenApiPetstore.NumberOnly(); + //var instance = new OpenApiPetstore.NumberOnly(); //expect(instance).to.be(); }); diff --git a/samples/client/petstore/javascript-es6/test/model/ObjectWithDeprecatedFields.spec.js b/samples/client/petstore/javascript-es6/test/model/ObjectWithDeprecatedFields.spec.js index 11a78dce681f..b190adcca3fd 100644 --- a/samples/client/petstore/javascript-es6/test/model/ObjectWithDeprecatedFields.spec.js +++ b/samples/client/petstore/javascript-es6/test/model/ObjectWithDeprecatedFields.spec.js @@ -50,7 +50,7 @@ describe('ObjectWithDeprecatedFields', function() { it('should create an instance of ObjectWithDeprecatedFields', function() { // uncomment below and update the code to test ObjectWithDeprecatedFields - //var instane = new OpenApiPetstore.ObjectWithDeprecatedFields(); + //var instance = new OpenApiPetstore.ObjectWithDeprecatedFields(); //expect(instance).to.be.a(OpenApiPetstore.ObjectWithDeprecatedFields); }); diff --git a/samples/client/petstore/javascript-es6/test/model/Order.spec.js b/samples/client/petstore/javascript-es6/test/model/Order.spec.js index 536d217cc5be..88564e2bc626 100644 --- a/samples/client/petstore/javascript-es6/test/model/Order.spec.js +++ b/samples/client/petstore/javascript-es6/test/model/Order.spec.js @@ -2,7 +2,7 @@ * OpenAPI Petstore * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ * - * OpenAPI spec version: 1.0.0 + * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -14,10 +14,10 @@ (function(root, factory) { if (typeof define === 'function' && define.amd) { // AMD. - define(['expect.js', '../../src/index'], factory); + define(['expect.js', process.cwd()+'/src/index'], factory); } else if (typeof module === 'object' && module.exports) { // CommonJS-like environments that support module.exports, like Node. - factory(require('expect.js'), require('../../src/index')); + factory(require('expect.js'), require(process.cwd()+'/src/index')); } else { // Browser globals (root is window) factory(root.expect, root.OpenApiPetstore); @@ -50,43 +50,43 @@ describe('Order', function() { it('should create an instance of Order', function() { // uncomment below and update the code to test Order - //var instane = new OpenApiPetstore.Order(); + //var instance = new OpenApiPetstore.Order(); //expect(instance).to.be.a(OpenApiPetstore.Order); }); it('should have the property id (base name: "id")', function() { // uncomment below and update the code to test the property id - //var instane = new OpenApiPetstore.Order(); + //var instance = new OpenApiPetstore.Order(); //expect(instance).to.be(); }); it('should have the property petId (base name: "petId")', function() { // uncomment below and update the code to test the property petId - //var instane = new OpenApiPetstore.Order(); + //var instance = new OpenApiPetstore.Order(); //expect(instance).to.be(); }); it('should have the property quantity (base name: "quantity")', function() { // uncomment below and update the code to test the property quantity - //var instane = new OpenApiPetstore.Order(); + //var instance = new OpenApiPetstore.Order(); //expect(instance).to.be(); }); it('should have the property shipDate (base name: "shipDate")', function() { // uncomment below and update the code to test the property shipDate - //var instane = new OpenApiPetstore.Order(); + //var instance = new OpenApiPetstore.Order(); //expect(instance).to.be(); }); it('should have the property status (base name: "status")', function() { // uncomment below and update the code to test the property status - //var instane = new OpenApiPetstore.Order(); + //var instance = new OpenApiPetstore.Order(); //expect(instance).to.be(); }); it('should have the property complete (base name: "complete")', function() { // uncomment below and update the code to test the property complete - //var instane = new OpenApiPetstore.Order(); + //var instance = new OpenApiPetstore.Order(); //expect(instance).to.be(); }); diff --git a/samples/client/petstore/javascript-es6/test/model/OuterComposite.spec.js b/samples/client/petstore/javascript-es6/test/model/OuterComposite.spec.js index 3309d6194223..1ef9599b2dc6 100644 --- a/samples/client/petstore/javascript-es6/test/model/OuterComposite.spec.js +++ b/samples/client/petstore/javascript-es6/test/model/OuterComposite.spec.js @@ -2,7 +2,7 @@ * OpenAPI Petstore * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ * - * OpenAPI spec version: 1.0.0 + * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -14,10 +14,10 @@ (function(root, factory) { if (typeof define === 'function' && define.amd) { // AMD. - define(['expect.js', '../../src/index'], factory); + define(['expect.js', process.cwd()+'/src/index'], factory); } else if (typeof module === 'object' && module.exports) { // CommonJS-like environments that support module.exports, like Node. - factory(require('expect.js'), require('../../src/index')); + factory(require('expect.js'), require(process.cwd()+'/src/index')); } else { // Browser globals (root is window) factory(root.expect, root.OpenApiPetstore); @@ -50,25 +50,25 @@ describe('OuterComposite', function() { it('should create an instance of OuterComposite', function() { // uncomment below and update the code to test OuterComposite - //var instane = new OpenApiPetstore.OuterComposite(); + //var instance = new OpenApiPetstore.OuterComposite(); //expect(instance).to.be.a(OpenApiPetstore.OuterComposite); }); it('should have the property myNumber (base name: "my_number")', function() { // uncomment below and update the code to test the property myNumber - //var instane = new OpenApiPetstore.OuterComposite(); + //var instance = new OpenApiPetstore.OuterComposite(); //expect(instance).to.be(); }); it('should have the property myString (base name: "my_string")', function() { // uncomment below and update the code to test the property myString - //var instane = new OpenApiPetstore.OuterComposite(); + //var instance = new OpenApiPetstore.OuterComposite(); //expect(instance).to.be(); }); it('should have the property myBoolean (base name: "my_boolean")', function() { // uncomment below and update the code to test the property myBoolean - //var instane = new OpenApiPetstore.OuterComposite(); + //var instance = new OpenApiPetstore.OuterComposite(); //expect(instance).to.be(); }); diff --git a/samples/client/petstore/javascript-es6/test/model/OuterEnum.spec.js b/samples/client/petstore/javascript-es6/test/model/OuterEnum.spec.js index fa51fa90cb45..16e8d6147932 100644 --- a/samples/client/petstore/javascript-es6/test/model/OuterEnum.spec.js +++ b/samples/client/petstore/javascript-es6/test/model/OuterEnum.spec.js @@ -2,7 +2,7 @@ * OpenAPI Petstore * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ * - * OpenAPI spec version: 1.0.0 + * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -14,10 +14,10 @@ (function(root, factory) { if (typeof define === 'function' && define.amd) { // AMD. - define(['expect.js', '../../src/index'], factory); + define(['expect.js', process.cwd()+'/src/index'], factory); } else if (typeof module === 'object' && module.exports) { // CommonJS-like environments that support module.exports, like Node. - factory(require('expect.js'), require('../../src/index')); + factory(require('expect.js'), require(process.cwd()+'/src/index')); } else { // Browser globals (root is window) factory(root.expect, root.OpenApiPetstore); @@ -49,7 +49,7 @@ describe('OuterEnum', function() { it('should create an instance of OuterEnum', function() { // uncomment below and update the code to test OuterEnum - //var instane = new OpenApiPetstore.OuterEnum(); + //var instance = new OpenApiPetstore.OuterEnum(); //expect(instance).to.be.a(OpenApiPetstore.OuterEnum); }); diff --git a/samples/client/petstore/javascript-es6/test/model/OuterEnumDefaultValue.spec.js b/samples/client/petstore/javascript-es6/test/model/OuterEnumDefaultValue.spec.js index 7358f731e757..213f8de637ff 100644 --- a/samples/client/petstore/javascript-es6/test/model/OuterEnumDefaultValue.spec.js +++ b/samples/client/petstore/javascript-es6/test/model/OuterEnumDefaultValue.spec.js @@ -2,7 +2,7 @@ * OpenAPI Petstore * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ * - * OpenAPI spec version: 1.0.0 + * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -14,10 +14,10 @@ (function(root, factory) { if (typeof define === 'function' && define.amd) { // AMD. - define(['expect.js', '../../src/index'], factory); + define(['expect.js', process.cwd()+'/src/index'], factory); } else if (typeof module === 'object' && module.exports) { // CommonJS-like environments that support module.exports, like Node. - factory(require('expect.js'), require('../../src/index')); + factory(require('expect.js'), require(process.cwd()+'/src/index')); } else { // Browser globals (root is window) factory(root.expect, root.OpenApiPetstore); @@ -49,7 +49,7 @@ describe('OuterEnumDefaultValue', function() { it('should create an instance of OuterEnumDefaultValue', function() { // uncomment below and update the code to test OuterEnumDefaultValue - //var instane = new OpenApiPetstore.OuterEnumDefaultValue(); + //var instance = new OpenApiPetstore.OuterEnumDefaultValue(); //expect(instance).to.be.a(OpenApiPetstore.OuterEnumDefaultValue); }); diff --git a/samples/client/petstore/javascript-es6/test/model/OuterEnumInteger.spec.js b/samples/client/petstore/javascript-es6/test/model/OuterEnumInteger.spec.js index d7d09b16ea76..50c8b78c5f73 100644 --- a/samples/client/petstore/javascript-es6/test/model/OuterEnumInteger.spec.js +++ b/samples/client/petstore/javascript-es6/test/model/OuterEnumInteger.spec.js @@ -2,7 +2,7 @@ * OpenAPI Petstore * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ * - * OpenAPI spec version: 1.0.0 + * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -14,10 +14,10 @@ (function(root, factory) { if (typeof define === 'function' && define.amd) { // AMD. - define(['expect.js', '../../src/index'], factory); + define(['expect.js', process.cwd()+'/src/index'], factory); } else if (typeof module === 'object' && module.exports) { // CommonJS-like environments that support module.exports, like Node. - factory(require('expect.js'), require('../../src/index')); + factory(require('expect.js'), require(process.cwd()+'/src/index')); } else { // Browser globals (root is window) factory(root.expect, root.OpenApiPetstore); @@ -49,7 +49,7 @@ describe('OuterEnumInteger', function() { it('should create an instance of OuterEnumInteger', function() { // uncomment below and update the code to test OuterEnumInteger - //var instane = new OpenApiPetstore.OuterEnumInteger(); + //var instance = new OpenApiPetstore.OuterEnumInteger(); //expect(instance).to.be.a(OpenApiPetstore.OuterEnumInteger); }); diff --git a/samples/client/petstore/javascript-es6/test/model/OuterEnumIntegerDefaultValue.spec.js b/samples/client/petstore/javascript-es6/test/model/OuterEnumIntegerDefaultValue.spec.js index 0b9e2f7933d3..af3dab311961 100644 --- a/samples/client/petstore/javascript-es6/test/model/OuterEnumIntegerDefaultValue.spec.js +++ b/samples/client/petstore/javascript-es6/test/model/OuterEnumIntegerDefaultValue.spec.js @@ -2,7 +2,7 @@ * OpenAPI Petstore * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ * - * OpenAPI spec version: 1.0.0 + * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -14,10 +14,10 @@ (function(root, factory) { if (typeof define === 'function' && define.amd) { // AMD. - define(['expect.js', '../../src/index'], factory); + define(['expect.js', process.cwd()+'/src/index'], factory); } else if (typeof module === 'object' && module.exports) { // CommonJS-like environments that support module.exports, like Node. - factory(require('expect.js'), require('../../src/index')); + factory(require('expect.js'), require(process.cwd()+'/src/index')); } else { // Browser globals (root is window) factory(root.expect, root.OpenApiPetstore); @@ -49,7 +49,7 @@ describe('OuterEnumIntegerDefaultValue', function() { it('should create an instance of OuterEnumIntegerDefaultValue', function() { // uncomment below and update the code to test OuterEnumIntegerDefaultValue - //var instane = new OpenApiPetstore.OuterEnumIntegerDefaultValue(); + //var instance = new OpenApiPetstore.OuterEnumIntegerDefaultValue(); //expect(instance).to.be.a(OpenApiPetstore.OuterEnumIntegerDefaultValue); }); diff --git a/samples/client/petstore/javascript-es6/test/model/OuterObjectWithEnumProperty.spec.js b/samples/client/petstore/javascript-es6/test/model/OuterObjectWithEnumProperty.spec.js index ea94c61358eb..9f7afbfd3977 100644 --- a/samples/client/petstore/javascript-es6/test/model/OuterObjectWithEnumProperty.spec.js +++ b/samples/client/petstore/javascript-es6/test/model/OuterObjectWithEnumProperty.spec.js @@ -50,7 +50,7 @@ describe('OuterObjectWithEnumProperty', function() { it('should create an instance of OuterObjectWithEnumProperty', function() { // uncomment below and update the code to test OuterObjectWithEnumProperty - //var instane = new OpenApiPetstore.OuterObjectWithEnumProperty(); + //var instance = new OpenApiPetstore.OuterObjectWithEnumProperty(); //expect(instance).to.be.a(OpenApiPetstore.OuterObjectWithEnumProperty); }); diff --git a/samples/client/petstore/javascript-es6/test/model/Pet.spec.js b/samples/client/petstore/javascript-es6/test/model/Pet.spec.js index f8ce9b93a3cd..7b2f4cf121a0 100644 --- a/samples/client/petstore/javascript-es6/test/model/Pet.spec.js +++ b/samples/client/petstore/javascript-es6/test/model/Pet.spec.js @@ -2,7 +2,7 @@ * OpenAPI Petstore * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ * - * OpenAPI spec version: 1.0.0 + * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -14,10 +14,10 @@ (function(root, factory) { if (typeof define === 'function' && define.amd) { // AMD. - define(['expect.js', '../../src/index'], factory); + define(['expect.js', process.cwd()+'/src/index'], factory); } else if (typeof module === 'object' && module.exports) { // CommonJS-like environments that support module.exports, like Node. - factory(require('expect.js'), require('../../src/index')); + factory(require('expect.js'), require(process.cwd()+'/src/index')); } else { // Browser globals (root is window) factory(root.expect, root.OpenApiPetstore); @@ -50,43 +50,43 @@ describe('Pet', function() { it('should create an instance of Pet', function() { // uncomment below and update the code to test Pet - //var instane = new OpenApiPetstore.Pet(); + //var instance = new OpenApiPetstore.Pet(); //expect(instance).to.be.a(OpenApiPetstore.Pet); }); it('should have the property id (base name: "id")', function() { // uncomment below and update the code to test the property id - //var instane = new OpenApiPetstore.Pet(); + //var instance = new OpenApiPetstore.Pet(); //expect(instance).to.be(); }); it('should have the property category (base name: "category")', function() { // uncomment below and update the code to test the property category - //var instane = new OpenApiPetstore.Pet(); + //var instance = new OpenApiPetstore.Pet(); //expect(instance).to.be(); }); it('should have the property name (base name: "name")', function() { // uncomment below and update the code to test the property name - //var instane = new OpenApiPetstore.Pet(); + //var instance = new OpenApiPetstore.Pet(); //expect(instance).to.be(); }); it('should have the property photoUrls (base name: "photoUrls")', function() { // uncomment below and update the code to test the property photoUrls - //var instane = new OpenApiPetstore.Pet(); + //var instance = new OpenApiPetstore.Pet(); //expect(instance).to.be(); }); it('should have the property tags (base name: "tags")', function() { // uncomment below and update the code to test the property tags - //var instane = new OpenApiPetstore.Pet(); + //var instance = new OpenApiPetstore.Pet(); //expect(instance).to.be(); }); it('should have the property status (base name: "status")', function() { // uncomment below and update the code to test the property status - //var instane = new OpenApiPetstore.Pet(); + //var instance = new OpenApiPetstore.Pet(); //expect(instance).to.be(); }); diff --git a/samples/client/petstore/javascript-es6/test/model/ReadOnlyFirst.spec.js b/samples/client/petstore/javascript-es6/test/model/ReadOnlyFirst.spec.js index 5bc5cb3a7005..a9be118d2f2d 100644 --- a/samples/client/petstore/javascript-es6/test/model/ReadOnlyFirst.spec.js +++ b/samples/client/petstore/javascript-es6/test/model/ReadOnlyFirst.spec.js @@ -2,7 +2,7 @@ * OpenAPI Petstore * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ * - * OpenAPI spec version: 1.0.0 + * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -14,10 +14,10 @@ (function(root, factory) { if (typeof define === 'function' && define.amd) { // AMD. - define(['expect.js', '../../src/index'], factory); + define(['expect.js', process.cwd()+'/src/index'], factory); } else if (typeof module === 'object' && module.exports) { // CommonJS-like environments that support module.exports, like Node. - factory(require('expect.js'), require('../../src/index')); + factory(require('expect.js'), require(process.cwd()+'/src/index')); } else { // Browser globals (root is window) factory(root.expect, root.OpenApiPetstore); @@ -50,19 +50,19 @@ describe('ReadOnlyFirst', function() { it('should create an instance of ReadOnlyFirst', function() { // uncomment below and update the code to test ReadOnlyFirst - //var instane = new OpenApiPetstore.ReadOnlyFirst(); + //var instance = new OpenApiPetstore.ReadOnlyFirst(); //expect(instance).to.be.a(OpenApiPetstore.ReadOnlyFirst); }); it('should have the property bar (base name: "bar")', function() { // uncomment below and update the code to test the property bar - //var instane = new OpenApiPetstore.ReadOnlyFirst(); + //var instance = new OpenApiPetstore.ReadOnlyFirst(); //expect(instance).to.be(); }); it('should have the property baz (base name: "baz")', function() { // uncomment below and update the code to test the property baz - //var instane = new OpenApiPetstore.ReadOnlyFirst(); + //var instance = new OpenApiPetstore.ReadOnlyFirst(); //expect(instance).to.be(); }); diff --git a/samples/client/petstore/javascript-es6/test/model/Return.spec.js b/samples/client/petstore/javascript-es6/test/model/Return.spec.js index 94aa449c2788..75aae37c745d 100644 --- a/samples/client/petstore/javascript-es6/test/model/Return.spec.js +++ b/samples/client/petstore/javascript-es6/test/model/Return.spec.js @@ -50,7 +50,7 @@ describe('Return', function() { it('should create an instance of Return', function() { // uncomment below and update the code to test Return - //var instane = new OpenApiPetstore.Return(); + //var instance = new OpenApiPetstore.Return(); //expect(instance).to.be.a(OpenApiPetstore.Return); }); diff --git a/samples/client/petstore/javascript-es6/test/model/SingleRefType.spec.js b/samples/client/petstore/javascript-es6/test/model/SingleRefType.spec.js deleted file mode 100644 index c0bbb3c018a1..000000000000 --- a/samples/client/petstore/javascript-es6/test/model/SingleRefType.spec.js +++ /dev/null @@ -1,58 +0,0 @@ -/** - * OpenAPI Petstore - * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ - * - * The version of the OpenAPI document: 1.0.0 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - * - */ - -(function(root, factory) { - if (typeof define === 'function' && define.amd) { - // AMD. - define(['expect.js', process.cwd()+'/src/index'], factory); - } else if (typeof module === 'object' && module.exports) { - // CommonJS-like environments that support module.exports, like Node. - factory(require('expect.js'), require(process.cwd()+'/src/index')); - } else { - // Browser globals (root is window) - factory(root.expect, root.OpenApiPetstore); - } -}(this, function(expect, OpenApiPetstore) { - 'use strict'; - - var instance; - - beforeEach(function() { - }); - - var getProperty = function(object, getter, property) { - // Use getter method if present; otherwise, get the property directly. - if (typeof object[getter] === 'function') - return object[getter](); - else - return object[property]; - } - - var setProperty = function(object, setter, property, value) { - // Use setter method if present; otherwise, set the property directly. - if (typeof object[setter] === 'function') - object[setter](value); - else - object[property] = value; - } - - describe('SingleRefType', function() { - it('should create an instance of SingleRefType', function() { - // uncomment below and update the code to test SingleRefType - //var instance = new OpenApiPetstore.SingleRefType(); - //expect(instance).to.be.a(OpenApiPetstore.SingleRefType); - }); - - }); - -})); diff --git a/samples/client/petstore/javascript-es6/test/model/SpecialModelName.spec.js b/samples/client/petstore/javascript-es6/test/model/SpecialModelName.spec.js index f459d2e0cd6f..8b6e95c76f5d 100644 --- a/samples/client/petstore/javascript-es6/test/model/SpecialModelName.spec.js +++ b/samples/client/petstore/javascript-es6/test/model/SpecialModelName.spec.js @@ -2,7 +2,7 @@ * OpenAPI Petstore * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ * - * OpenAPI spec version: 1.0.0 + * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -14,10 +14,10 @@ (function(root, factory) { if (typeof define === 'function' && define.amd) { // AMD. - define(['expect.js', '../../src/index'], factory); + define(['expect.js', process.cwd()+'/src/index'], factory); } else if (typeof module === 'object' && module.exports) { // CommonJS-like environments that support module.exports, like Node. - factory(require('expect.js'), require('../../src/index')); + factory(require('expect.js'), require(process.cwd()+'/src/index')); } else { // Browser globals (root is window) factory(root.expect, root.OpenApiPetstore); @@ -50,13 +50,13 @@ describe('SpecialModelName', function() { it('should create an instance of SpecialModelName', function() { // uncomment below and update the code to test SpecialModelName - //var instane = new OpenApiPetstore.SpecialModelName(); + //var instance = new OpenApiPetstore.SpecialModelName(); //expect(instance).to.be.a(OpenApiPetstore.SpecialModelName); }); it('should have the property specialPropertyName (base name: "$special[property.name]")', function() { // uncomment below and update the code to test the property specialPropertyName - //var instane = new OpenApiPetstore.SpecialModelName(); + //var instance = new OpenApiPetstore.SpecialModelName(); //expect(instance).to.be(); }); diff --git a/samples/client/petstore/javascript-es6/test/model/Tag.spec.js b/samples/client/petstore/javascript-es6/test/model/Tag.spec.js index 2213b06d5090..7832664c4f02 100644 --- a/samples/client/petstore/javascript-es6/test/model/Tag.spec.js +++ b/samples/client/petstore/javascript-es6/test/model/Tag.spec.js @@ -2,7 +2,7 @@ * OpenAPI Petstore * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ * - * OpenAPI spec version: 1.0.0 + * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -14,10 +14,10 @@ (function(root, factory) { if (typeof define === 'function' && define.amd) { // AMD. - define(['expect.js', '../../src/index'], factory); + define(['expect.js', process.cwd()+'/src/index'], factory); } else if (typeof module === 'object' && module.exports) { // CommonJS-like environments that support module.exports, like Node. - factory(require('expect.js'), require('../../src/index')); + factory(require('expect.js'), require(process.cwd()+'/src/index')); } else { // Browser globals (root is window) factory(root.expect, root.OpenApiPetstore); @@ -50,19 +50,19 @@ describe('Tag', function() { it('should create an instance of Tag', function() { // uncomment below and update the code to test Tag - //var instane = new OpenApiPetstore.Tag(); + //var instance = new OpenApiPetstore.Tag(); //expect(instance).to.be.a(OpenApiPetstore.Tag); }); it('should have the property id (base name: "id")', function() { // uncomment below and update the code to test the property id - //var instane = new OpenApiPetstore.Tag(); + //var instance = new OpenApiPetstore.Tag(); //expect(instance).to.be(); }); it('should have the property name (base name: "name")', function() { // uncomment below and update the code to test the property name - //var instane = new OpenApiPetstore.Tag(); + //var instance = new OpenApiPetstore.Tag(); //expect(instance).to.be(); }); diff --git a/samples/client/petstore/javascript-es6/test/model/User.spec.js b/samples/client/petstore/javascript-es6/test/model/User.spec.js index f0cd8819ec88..44d541dc64d3 100644 --- a/samples/client/petstore/javascript-es6/test/model/User.spec.js +++ b/samples/client/petstore/javascript-es6/test/model/User.spec.js @@ -2,7 +2,7 @@ * OpenAPI Petstore * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ * - * OpenAPI spec version: 1.0.0 + * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -14,10 +14,10 @@ (function(root, factory) { if (typeof define === 'function' && define.amd) { // AMD. - define(['expect.js', '../../src/index'], factory); + define(['expect.js', process.cwd()+'/src/index'], factory); } else if (typeof module === 'object' && module.exports) { // CommonJS-like environments that support module.exports, like Node. - factory(require('expect.js'), require('../../src/index')); + factory(require('expect.js'), require(process.cwd()+'/src/index')); } else { // Browser globals (root is window) factory(root.expect, root.OpenApiPetstore); @@ -50,55 +50,55 @@ describe('User', function() { it('should create an instance of User', function() { // uncomment below and update the code to test User - //var instane = new OpenApiPetstore.User(); + //var instance = new OpenApiPetstore.User(); //expect(instance).to.be.a(OpenApiPetstore.User); }); it('should have the property id (base name: "id")', function() { // uncomment below and update the code to test the property id - //var instane = new OpenApiPetstore.User(); + //var instance = new OpenApiPetstore.User(); //expect(instance).to.be(); }); it('should have the property username (base name: "username")', function() { // uncomment below and update the code to test the property username - //var instane = new OpenApiPetstore.User(); + //var instance = new OpenApiPetstore.User(); //expect(instance).to.be(); }); it('should have the property firstName (base name: "firstName")', function() { // uncomment below and update the code to test the property firstName - //var instane = new OpenApiPetstore.User(); + //var instance = new OpenApiPetstore.User(); //expect(instance).to.be(); }); it('should have the property lastName (base name: "lastName")', function() { // uncomment below and update the code to test the property lastName - //var instane = new OpenApiPetstore.User(); + //var instance = new OpenApiPetstore.User(); //expect(instance).to.be(); }); it('should have the property email (base name: "email")', function() { // uncomment below and update the code to test the property email - //var instane = new OpenApiPetstore.User(); + //var instance = new OpenApiPetstore.User(); //expect(instance).to.be(); }); it('should have the property password (base name: "password")', function() { // uncomment below and update the code to test the property password - //var instane = new OpenApiPetstore.User(); + //var instance = new OpenApiPetstore.User(); //expect(instance).to.be(); }); it('should have the property phone (base name: "phone")', function() { // uncomment below and update the code to test the property phone - //var instane = new OpenApiPetstore.User(); + //var instance = new OpenApiPetstore.User(); //expect(instance).to.be(); }); it('should have the property userStatus (base name: "userStatus")', function() { // uncomment below and update the code to test the property userStatus - //var instane = new OpenApiPetstore.User(); + //var instance = new OpenApiPetstore.User(); //expect(instance).to.be(); }); diff --git a/samples/client/petstore/javascript-es6/test/run_tests.html b/samples/client/petstore/javascript-es6/test/run_tests.html deleted file mode 100644 index 059f3a112ada..000000000000 --- a/samples/client/petstore/javascript-es6/test/run_tests.html +++ /dev/null @@ -1,45 +0,0 @@ - - - - Mocha Tests - - - -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - From 8070b4057f3bd43df3e40117906f09d65d36c015 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jo=C3=A3o=20Neto?= Date: Fri, 26 Aug 2022 21:45:48 +0200 Subject: [PATCH 22/23] update javascript-promise-es6 sample kept pom.xml --- .../.openapi-generator-ignore | 7 +- .../.openapi-generator/FILES | 54 +++ .../docs/AdditionalPropertiesAnyType.md | 9 - .../docs/AdditionalPropertiesArray.md | 9 - .../docs/AdditionalPropertiesBoolean.md | 9 - .../docs/AdditionalPropertiesInteger.md | 9 - .../docs/AdditionalPropertiesNumber.md | 9 - .../docs/AdditionalPropertiesObject.md | 9 - .../docs/AdditionalPropertiesString.md | 9 - .../javascript-promise-es6/docs/BigCat.md | 24 -- .../docs/BigCatAllOf.md | 24 -- .../docs/InlineObject.md | 10 - .../docs/InlineObject1.md | 10 - .../docs/InlineObject2.md | 34 -- .../docs/InlineObject3.md | 22 - .../docs/InlineObject4.md | 10 - .../docs/InlineObject5.md | 10 - .../docs/InlineResponseDefault.md | 9 - .../docs/ModelReturn.md | 9 - .../docs/SingleRefType.md | 10 - .../docs/TypeHolderDefault.md | 13 - .../docs/TypeHolderExample.md | 14 - .../javascript-promise-es6/docs/XmlItem.md | 37 -- .../src/model/AdditionalPropertiesAnyType.js | 75 ---- .../src/model/AdditionalPropertiesArray.js | 75 ---- .../src/model/AdditionalPropertiesBoolean.js | 75 ---- .../src/model/AdditionalPropertiesInteger.js | 75 ---- .../src/model/AdditionalPropertiesNumber.js | 75 ---- .../src/model/AdditionalPropertiesObject.js | 75 ---- .../src/model/AdditionalPropertiesString.js | 75 ---- .../src/model/BigCat.js | 132 ------ .../src/model/BigCatAllOf.js | 104 ----- .../src/model/InlineObject.js | 81 ---- .../src/model/InlineObject1.js | 81 ---- .../src/model/InlineObject2.js | 130 ------ .../src/model/InlineObject3.js | 197 --------- .../src/model/InlineObject4.js | 85 ---- .../src/model/InlineObject5.js | 83 ---- .../src/model/InlineResponseDefault.js | 72 ---- .../src/model/SingleRefType.js | 46 -- .../src/model/TypeHolderDefault.js | 115 ----- .../src/model/TypeHolderExample.js | 123 ------ .../src/model/XmlItem.js | 295 ------------- .../test/ApiClientTest.js | 394 ------------------ .../test/api/AnotherFakeApi.spec.js | 2 +- .../test/api/FakeApi.spec.js | 50 ++- .../test/api/FakeClassnameTags123Api.spec.js | 2 +- .../test/api/PetApi.spec.js | 2 +- .../test/api/StoreApi.spec.js | 2 +- .../test/api/UserApi.spec.js | 2 +- .../model/AdditionalPropertiesClass.spec.js | 6 +- .../test/model/Animal.spec.js | 6 +- .../test/model/ApiResponse.spec.js | 8 +- .../model/ArrayOfArrayOfNumberOnly.spec.js | 4 +- .../test/model/ArrayOfNumberOnly.spec.js | 4 +- .../test/model/ArrayTest.spec.js | 8 +- .../test/model/Capitalization.spec.js | 14 +- .../test/model/Cat.spec.js | 4 +- .../test/model/CatAllOf.spec.js | 4 +- .../test/model/Category.spec.js | 6 +- .../test/model/ClassModel.spec.js | 4 +- .../test/model/Client.spec.js | 4 +- .../test/model/DeprecatedObject.spec.js | 2 +- .../test/model/Dog.spec.js | 4 +- .../test/model/DogAllOf.spec.js | 4 +- .../test/model/EnumArrays.spec.js | 6 +- .../test/model/EnumClass.spec.js | 2 +- .../test/model/EnumTest.spec.js | 18 +- .../test/model/File.spec.js | 4 +- .../test/model/FileSchemaTestClass.spec.js | 6 +- .../test/model/Foo.spec.js | 4 +- .../test/model/FormatTest.spec.js | 50 ++- .../test/model/HasOnlyReadOnly.spec.js | 6 +- .../test/model/HealthCheckResult.spec.js | 4 +- .../test/model/List.spec.js | 4 +- .../test/model/MapTest.spec.js | 10 +- ...ertiesAndAdditionalPropertiesClass.spec.js | 8 +- .../test/model/Model200Response.spec.js | 6 +- .../test/model/Name.spec.js | 10 +- .../test/model/NullableClass.spec.js | 26 +- .../test/model/NumberOnly.spec.js | 4 +- .../model/ObjectWithDeprecatedFields.spec.js | 2 +- .../test/model/Order.spec.js | 14 +- .../test/model/OuterComposite.spec.js | 8 +- .../test/model/OuterEnum.spec.js | 2 +- .../test/model/OuterEnumDefaultValue.spec.js | 2 +- .../test/model/OuterEnumInteger.spec.js | 2 +- .../OuterEnumIntegerDefaultValue.spec.js | 2 +- .../model/OuterObjectWithEnumProperty.spec.js | 2 +- .../test/model/Pet.spec.js | 14 +- .../test/model/ReadOnlyFirst.spec.js | 6 +- .../test/model/Return.spec.js | 2 +- .../test/model/SingleRefType.spec.js | 58 --- .../test/model/SpecialModelName.spec.js | 4 +- .../test/model/Tag.spec.js | 6 +- .../test/model/User.spec.js | 18 +- 96 files changed, 277 insertions(+), 2998 deletions(-) delete mode 100644 samples/client/petstore/javascript-promise-es6/docs/AdditionalPropertiesAnyType.md delete mode 100644 samples/client/petstore/javascript-promise-es6/docs/AdditionalPropertiesArray.md delete mode 100644 samples/client/petstore/javascript-promise-es6/docs/AdditionalPropertiesBoolean.md delete mode 100644 samples/client/petstore/javascript-promise-es6/docs/AdditionalPropertiesInteger.md delete mode 100644 samples/client/petstore/javascript-promise-es6/docs/AdditionalPropertiesNumber.md delete mode 100644 samples/client/petstore/javascript-promise-es6/docs/AdditionalPropertiesObject.md delete mode 100644 samples/client/petstore/javascript-promise-es6/docs/AdditionalPropertiesString.md delete mode 100644 samples/client/petstore/javascript-promise-es6/docs/BigCat.md delete mode 100644 samples/client/petstore/javascript-promise-es6/docs/BigCatAllOf.md delete mode 100644 samples/client/petstore/javascript-promise-es6/docs/InlineObject.md delete mode 100644 samples/client/petstore/javascript-promise-es6/docs/InlineObject1.md delete mode 100644 samples/client/petstore/javascript-promise-es6/docs/InlineObject2.md delete mode 100644 samples/client/petstore/javascript-promise-es6/docs/InlineObject3.md delete mode 100644 samples/client/petstore/javascript-promise-es6/docs/InlineObject4.md delete mode 100644 samples/client/petstore/javascript-promise-es6/docs/InlineObject5.md delete mode 100644 samples/client/petstore/javascript-promise-es6/docs/InlineResponseDefault.md delete mode 100644 samples/client/petstore/javascript-promise-es6/docs/ModelReturn.md delete mode 100644 samples/client/petstore/javascript-promise-es6/docs/SingleRefType.md delete mode 100644 samples/client/petstore/javascript-promise-es6/docs/TypeHolderDefault.md delete mode 100644 samples/client/petstore/javascript-promise-es6/docs/TypeHolderExample.md delete mode 100644 samples/client/petstore/javascript-promise-es6/docs/XmlItem.md delete mode 100644 samples/client/petstore/javascript-promise-es6/src/model/AdditionalPropertiesAnyType.js delete mode 100644 samples/client/petstore/javascript-promise-es6/src/model/AdditionalPropertiesArray.js delete mode 100644 samples/client/petstore/javascript-promise-es6/src/model/AdditionalPropertiesBoolean.js delete mode 100644 samples/client/petstore/javascript-promise-es6/src/model/AdditionalPropertiesInteger.js delete mode 100644 samples/client/petstore/javascript-promise-es6/src/model/AdditionalPropertiesNumber.js delete mode 100644 samples/client/petstore/javascript-promise-es6/src/model/AdditionalPropertiesObject.js delete mode 100644 samples/client/petstore/javascript-promise-es6/src/model/AdditionalPropertiesString.js delete mode 100644 samples/client/petstore/javascript-promise-es6/src/model/BigCat.js delete mode 100644 samples/client/petstore/javascript-promise-es6/src/model/BigCatAllOf.js delete mode 100644 samples/client/petstore/javascript-promise-es6/src/model/InlineObject.js delete mode 100644 samples/client/petstore/javascript-promise-es6/src/model/InlineObject1.js delete mode 100644 samples/client/petstore/javascript-promise-es6/src/model/InlineObject2.js delete mode 100644 samples/client/petstore/javascript-promise-es6/src/model/InlineObject3.js delete mode 100644 samples/client/petstore/javascript-promise-es6/src/model/InlineObject4.js delete mode 100644 samples/client/petstore/javascript-promise-es6/src/model/InlineObject5.js delete mode 100644 samples/client/petstore/javascript-promise-es6/src/model/InlineResponseDefault.js delete mode 100644 samples/client/petstore/javascript-promise-es6/src/model/SingleRefType.js delete mode 100644 samples/client/petstore/javascript-promise-es6/src/model/TypeHolderDefault.js delete mode 100644 samples/client/petstore/javascript-promise-es6/src/model/TypeHolderExample.js delete mode 100644 samples/client/petstore/javascript-promise-es6/src/model/XmlItem.js delete mode 100644 samples/client/petstore/javascript-promise-es6/test/ApiClientTest.js delete mode 100644 samples/client/petstore/javascript-promise-es6/test/model/SingleRefType.spec.js diff --git a/samples/client/petstore/javascript-promise-es6/.openapi-generator-ignore b/samples/client/petstore/javascript-promise-es6/.openapi-generator-ignore index e9f5c30fedaa..7484ee590a38 100644 --- a/samples/client/petstore/javascript-promise-es6/.openapi-generator-ignore +++ b/samples/client/petstore/javascript-promise-es6/.openapi-generator-ignore @@ -1,11 +1,11 @@ -# Swagger Codegen Ignore -# Generated by swagger-codegen https://github.com/swagger-api/swagger-codegen +# OpenAPI Generator Ignore +# Generated by openapi-generator https://github.com/openapitools/openapi-generator # Use this file to prevent files from being overwritten by the generator. # The patterns follow closely to .gitignore or .dockerignore. # As an example, the C# client generator defines ApiClient.cs. -# You can make changes and tell Swagger Codgen to ignore just this file by uncommenting the following line: +# You can make changes and tell OpenAPI Generator to ignore just this file by uncommenting the following line: #ApiClient.cs # You can match any string of characters against a directory, file or extension with a single asterisk (*): @@ -21,4 +21,3 @@ #docs/*.md # Then explicitly reverse the ignore rule for a single file: #!docs/README.md -# diff --git a/samples/client/petstore/javascript-promise-es6/.openapi-generator/FILES b/samples/client/petstore/javascript-promise-es6/.openapi-generator/FILES index 0440bb2716cb..b05863cb83d6 100644 --- a/samples/client/petstore/javascript-promise-es6/.openapi-generator/FILES +++ b/samples/client/petstore/javascript-promise-es6/.openapi-generator/FILES @@ -1,5 +1,6 @@ .babelrc .gitignore +.openapi-generator-ignore .travis.yml README.md docs/AdditionalPropertiesClass.md @@ -113,3 +114,56 @@ src/model/Return.js src/model/SpecialModelName.js src/model/Tag.js src/model/User.js +test/api/AnotherFakeApi.spec.js +test/api/DefaultApi.spec.js +test/api/FakeApi.spec.js +test/api/FakeClassnameTags123Api.spec.js +test/api/PetApi.spec.js +test/api/StoreApi.spec.js +test/api/UserApi.spec.js +test/model/AdditionalPropertiesClass.spec.js +test/model/Animal.spec.js +test/model/ApiResponse.spec.js +test/model/ArrayOfArrayOfNumberOnly.spec.js +test/model/ArrayOfNumberOnly.spec.js +test/model/ArrayTest.spec.js +test/model/Capitalization.spec.js +test/model/Cat.spec.js +test/model/CatAllOf.spec.js +test/model/Category.spec.js +test/model/ClassModel.spec.js +test/model/Client.spec.js +test/model/DeprecatedObject.spec.js +test/model/Dog.spec.js +test/model/DogAllOf.spec.js +test/model/EnumArrays.spec.js +test/model/EnumClass.spec.js +test/model/EnumTest.spec.js +test/model/File.spec.js +test/model/FileSchemaTestClass.spec.js +test/model/Foo.spec.js +test/model/FooGetDefaultResponse.spec.js +test/model/FormatTest.spec.js +test/model/HasOnlyReadOnly.spec.js +test/model/HealthCheckResult.spec.js +test/model/List.spec.js +test/model/MapTest.spec.js +test/model/MixedPropertiesAndAdditionalPropertiesClass.spec.js +test/model/Model200Response.spec.js +test/model/Name.spec.js +test/model/NullableClass.spec.js +test/model/NumberOnly.spec.js +test/model/ObjectWithDeprecatedFields.spec.js +test/model/Order.spec.js +test/model/OuterComposite.spec.js +test/model/OuterEnum.spec.js +test/model/OuterEnumDefaultValue.spec.js +test/model/OuterEnumInteger.spec.js +test/model/OuterEnumIntegerDefaultValue.spec.js +test/model/OuterObjectWithEnumProperty.spec.js +test/model/Pet.spec.js +test/model/ReadOnlyFirst.spec.js +test/model/Return.spec.js +test/model/SpecialModelName.spec.js +test/model/Tag.spec.js +test/model/User.spec.js diff --git a/samples/client/petstore/javascript-promise-es6/docs/AdditionalPropertiesAnyType.md b/samples/client/petstore/javascript-promise-es6/docs/AdditionalPropertiesAnyType.md deleted file mode 100644 index 4b14f26ad125..000000000000 --- a/samples/client/petstore/javascript-promise-es6/docs/AdditionalPropertiesAnyType.md +++ /dev/null @@ -1,9 +0,0 @@ -# OpenApiPetstore.AdditionalPropertiesAnyType - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**name** | **String** | | [optional] - - diff --git a/samples/client/petstore/javascript-promise-es6/docs/AdditionalPropertiesArray.md b/samples/client/petstore/javascript-promise-es6/docs/AdditionalPropertiesArray.md deleted file mode 100644 index b99e8820d27a..000000000000 --- a/samples/client/petstore/javascript-promise-es6/docs/AdditionalPropertiesArray.md +++ /dev/null @@ -1,9 +0,0 @@ -# OpenApiPetstore.AdditionalPropertiesArray - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**name** | **String** | | [optional] - - diff --git a/samples/client/petstore/javascript-promise-es6/docs/AdditionalPropertiesBoolean.md b/samples/client/petstore/javascript-promise-es6/docs/AdditionalPropertiesBoolean.md deleted file mode 100644 index db3f089ce98e..000000000000 --- a/samples/client/petstore/javascript-promise-es6/docs/AdditionalPropertiesBoolean.md +++ /dev/null @@ -1,9 +0,0 @@ -# OpenApiPetstore.AdditionalPropertiesBoolean - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**name** | **String** | | [optional] - - diff --git a/samples/client/petstore/javascript-promise-es6/docs/AdditionalPropertiesInteger.md b/samples/client/petstore/javascript-promise-es6/docs/AdditionalPropertiesInteger.md deleted file mode 100644 index be98887371ae..000000000000 --- a/samples/client/petstore/javascript-promise-es6/docs/AdditionalPropertiesInteger.md +++ /dev/null @@ -1,9 +0,0 @@ -# OpenApiPetstore.AdditionalPropertiesInteger - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**name** | **String** | | [optional] - - diff --git a/samples/client/petstore/javascript-promise-es6/docs/AdditionalPropertiesNumber.md b/samples/client/petstore/javascript-promise-es6/docs/AdditionalPropertiesNumber.md deleted file mode 100644 index 6f4273d6eb36..000000000000 --- a/samples/client/petstore/javascript-promise-es6/docs/AdditionalPropertiesNumber.md +++ /dev/null @@ -1,9 +0,0 @@ -# OpenApiPetstore.AdditionalPropertiesNumber - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**name** | **String** | | [optional] - - diff --git a/samples/client/petstore/javascript-promise-es6/docs/AdditionalPropertiesObject.md b/samples/client/petstore/javascript-promise-es6/docs/AdditionalPropertiesObject.md deleted file mode 100644 index 58a92784180d..000000000000 --- a/samples/client/petstore/javascript-promise-es6/docs/AdditionalPropertiesObject.md +++ /dev/null @@ -1,9 +0,0 @@ -# OpenApiPetstore.AdditionalPropertiesObject - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**name** | **String** | | [optional] - - diff --git a/samples/client/petstore/javascript-promise-es6/docs/AdditionalPropertiesString.md b/samples/client/petstore/javascript-promise-es6/docs/AdditionalPropertiesString.md deleted file mode 100644 index ee6ad171eef5..000000000000 --- a/samples/client/petstore/javascript-promise-es6/docs/AdditionalPropertiesString.md +++ /dev/null @@ -1,9 +0,0 @@ -# OpenApiPetstore.AdditionalPropertiesString - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**name** | **String** | | [optional] - - diff --git a/samples/client/petstore/javascript-promise-es6/docs/BigCat.md b/samples/client/petstore/javascript-promise-es6/docs/BigCat.md deleted file mode 100644 index bbd79b2ba1bb..000000000000 --- a/samples/client/petstore/javascript-promise-es6/docs/BigCat.md +++ /dev/null @@ -1,24 +0,0 @@ -# OpenApiPetstore.BigCat - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**kind** | **String** | | [optional] - - - -## Enum: KindEnum - - -* `lions` (value: `"lions"`) - -* `tigers` (value: `"tigers"`) - -* `leopards` (value: `"leopards"`) - -* `jaguars` (value: `"jaguars"`) - - - - diff --git a/samples/client/petstore/javascript-promise-es6/docs/BigCatAllOf.md b/samples/client/petstore/javascript-promise-es6/docs/BigCatAllOf.md deleted file mode 100644 index c5e83bfdaebb..000000000000 --- a/samples/client/petstore/javascript-promise-es6/docs/BigCatAllOf.md +++ /dev/null @@ -1,24 +0,0 @@ -# OpenApiPetstore.BigCatAllOf - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**kind** | **String** | | [optional] - - - -## Enum: KindEnum - - -* `lions` (value: `"lions"`) - -* `tigers` (value: `"tigers"`) - -* `leopards` (value: `"leopards"`) - -* `jaguars` (value: `"jaguars"`) - - - - diff --git a/samples/client/petstore/javascript-promise-es6/docs/InlineObject.md b/samples/client/petstore/javascript-promise-es6/docs/InlineObject.md deleted file mode 100644 index 529c032d7a99..000000000000 --- a/samples/client/petstore/javascript-promise-es6/docs/InlineObject.md +++ /dev/null @@ -1,10 +0,0 @@ -# OpenApiPetstore.InlineObject - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**name** | **String** | Updated name of the pet | [optional] -**status** | **String** | Updated status of the pet | [optional] - - diff --git a/samples/client/petstore/javascript-promise-es6/docs/InlineObject1.md b/samples/client/petstore/javascript-promise-es6/docs/InlineObject1.md deleted file mode 100644 index bd2fcd57a209..000000000000 --- a/samples/client/petstore/javascript-promise-es6/docs/InlineObject1.md +++ /dev/null @@ -1,10 +0,0 @@ -# OpenApiPetstore.InlineObject1 - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**additionalMetadata** | **String** | Additional data to pass to server | [optional] -**file** | **File** | file to upload | [optional] - - diff --git a/samples/client/petstore/javascript-promise-es6/docs/InlineObject2.md b/samples/client/petstore/javascript-promise-es6/docs/InlineObject2.md deleted file mode 100644 index 7d703a9086a3..000000000000 --- a/samples/client/petstore/javascript-promise-es6/docs/InlineObject2.md +++ /dev/null @@ -1,34 +0,0 @@ -# OpenApiPetstore.InlineObject2 - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**enumFormStringArray** | **[String]** | Form parameter enum test (string array) | [optional] -**enumFormString** | **String** | Form parameter enum test (string) | [optional] [default to '-efg'] - - - -## Enum: [EnumFormStringArrayEnum] - - -* `GREATER_THAN` (value: `">"`) - -* `DOLLAR` (value: `"$"`) - - - - - -## Enum: EnumFormStringEnum - - -* `_abc` (value: `"_abc"`) - -* `-efg` (value: `"-efg"`) - -* `(xyz)` (value: `"(xyz)"`) - - - - diff --git a/samples/client/petstore/javascript-promise-es6/docs/InlineObject3.md b/samples/client/petstore/javascript-promise-es6/docs/InlineObject3.md deleted file mode 100644 index ec8980b728e7..000000000000 --- a/samples/client/petstore/javascript-promise-es6/docs/InlineObject3.md +++ /dev/null @@ -1,22 +0,0 @@ -# OpenApiPetstore.InlineObject3 - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**integer** | **Number** | None | [optional] -**int32** | **Number** | None | [optional] -**int64** | **Number** | None | [optional] -**_number** | **Number** | None | -**_float** | **Number** | None | [optional] -**_double** | **Number** | None | -**_string** | **String** | None | [optional] -**patternWithoutDelimiter** | **String** | None | -**_byte** | **Blob** | None | -**binary** | **File** | None | [optional] -**_date** | **Date** | None | [optional] -**dateTime** | **Date** | None | [optional] -**password** | **String** | None | [optional] -**callback** | **String** | None | [optional] - - diff --git a/samples/client/petstore/javascript-promise-es6/docs/InlineObject4.md b/samples/client/petstore/javascript-promise-es6/docs/InlineObject4.md deleted file mode 100644 index 07ce4b0cac21..000000000000 --- a/samples/client/petstore/javascript-promise-es6/docs/InlineObject4.md +++ /dev/null @@ -1,10 +0,0 @@ -# OpenApiPetstore.InlineObject4 - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**param** | **String** | field1 | -**param2** | **String** | field2 | - - diff --git a/samples/client/petstore/javascript-promise-es6/docs/InlineObject5.md b/samples/client/petstore/javascript-promise-es6/docs/InlineObject5.md deleted file mode 100644 index 16547e7f52bc..000000000000 --- a/samples/client/petstore/javascript-promise-es6/docs/InlineObject5.md +++ /dev/null @@ -1,10 +0,0 @@ -# OpenApiPetstore.InlineObject5 - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**additionalMetadata** | **String** | Additional data to pass to server | [optional] -**requiredFile** | **File** | file to upload | - - diff --git a/samples/client/petstore/javascript-promise-es6/docs/InlineResponseDefault.md b/samples/client/petstore/javascript-promise-es6/docs/InlineResponseDefault.md deleted file mode 100644 index 3bd01f8f7d43..000000000000 --- a/samples/client/petstore/javascript-promise-es6/docs/InlineResponseDefault.md +++ /dev/null @@ -1,9 +0,0 @@ -# OpenApiPetstore.InlineResponseDefault - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**string** | [**Foo**](Foo.md) | | [optional] - - diff --git a/samples/client/petstore/javascript-promise-es6/docs/ModelReturn.md b/samples/client/petstore/javascript-promise-es6/docs/ModelReturn.md deleted file mode 100644 index c93601692f60..000000000000 --- a/samples/client/petstore/javascript-promise-es6/docs/ModelReturn.md +++ /dev/null @@ -1,9 +0,0 @@ -# OpenApiPetstore.ModelReturn - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**_return** | **Number** | | [optional] - - diff --git a/samples/client/petstore/javascript-promise-es6/docs/SingleRefType.md b/samples/client/petstore/javascript-promise-es6/docs/SingleRefType.md deleted file mode 100644 index 6a7ac770c274..000000000000 --- a/samples/client/petstore/javascript-promise-es6/docs/SingleRefType.md +++ /dev/null @@ -1,10 +0,0 @@ -# OpenApiPetstore.SingleRefType - -## Enum - - -* `admin` (value: `"admin"`) - -* `user` (value: `"user"`) - - diff --git a/samples/client/petstore/javascript-promise-es6/docs/TypeHolderDefault.md b/samples/client/petstore/javascript-promise-es6/docs/TypeHolderDefault.md deleted file mode 100644 index 3342b500760c..000000000000 --- a/samples/client/petstore/javascript-promise-es6/docs/TypeHolderDefault.md +++ /dev/null @@ -1,13 +0,0 @@ -# OpenApiPetstore.TypeHolderDefault - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**stringItem** | **String** | | [default to 'what'] -**numberItem** | **Number** | | -**integerItem** | **Number** | | -**boolItem** | **Boolean** | | [default to true] -**arrayItem** | **[Number]** | | - - diff --git a/samples/client/petstore/javascript-promise-es6/docs/TypeHolderExample.md b/samples/client/petstore/javascript-promise-es6/docs/TypeHolderExample.md deleted file mode 100644 index 44ba1e3aef7f..000000000000 --- a/samples/client/petstore/javascript-promise-es6/docs/TypeHolderExample.md +++ /dev/null @@ -1,14 +0,0 @@ -# OpenApiPetstore.TypeHolderExample - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**stringItem** | **String** | | -**numberItem** | **Number** | | -**floatItem** | **Number** | | -**integerItem** | **Number** | | -**boolItem** | **Boolean** | | -**arrayItem** | **[Number]** | | - - diff --git a/samples/client/petstore/javascript-promise-es6/docs/XmlItem.md b/samples/client/petstore/javascript-promise-es6/docs/XmlItem.md deleted file mode 100644 index 8711fac40809..000000000000 --- a/samples/client/petstore/javascript-promise-es6/docs/XmlItem.md +++ /dev/null @@ -1,37 +0,0 @@ -# OpenApiPetstore.XmlItem - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**attributeString** | **String** | | [optional] -**attributeNumber** | **Number** | | [optional] -**attributeInteger** | **Number** | | [optional] -**attributeBoolean** | **Boolean** | | [optional] -**wrappedArray** | **[Number]** | | [optional] -**nameString** | **String** | | [optional] -**nameNumber** | **Number** | | [optional] -**nameInteger** | **Number** | | [optional] -**nameBoolean** | **Boolean** | | [optional] -**nameArray** | **[Number]** | | [optional] -**nameWrappedArray** | **[Number]** | | [optional] -**prefixString** | **String** | | [optional] -**prefixNumber** | **Number** | | [optional] -**prefixInteger** | **Number** | | [optional] -**prefixBoolean** | **Boolean** | | [optional] -**prefixArray** | **[Number]** | | [optional] -**prefixWrappedArray** | **[Number]** | | [optional] -**namespaceString** | **String** | | [optional] -**namespaceNumber** | **Number** | | [optional] -**namespaceInteger** | **Number** | | [optional] -**namespaceBoolean** | **Boolean** | | [optional] -**namespaceArray** | **[Number]** | | [optional] -**namespaceWrappedArray** | **[Number]** | | [optional] -**prefixNsString** | **String** | | [optional] -**prefixNsNumber** | **Number** | | [optional] -**prefixNsInteger** | **Number** | | [optional] -**prefixNsBoolean** | **Boolean** | | [optional] -**prefixNsArray** | **[Number]** | | [optional] -**prefixNsWrappedArray** | **[Number]** | | [optional] - - diff --git a/samples/client/petstore/javascript-promise-es6/src/model/AdditionalPropertiesAnyType.js b/samples/client/petstore/javascript-promise-es6/src/model/AdditionalPropertiesAnyType.js deleted file mode 100644 index b836b0e93c75..000000000000 --- a/samples/client/petstore/javascript-promise-es6/src/model/AdditionalPropertiesAnyType.js +++ /dev/null @@ -1,75 +0,0 @@ -/** - * OpenAPI Petstore - * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ - * - * The version of the OpenAPI document: 1.0.0 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - * - */ - -import ApiClient from '../ApiClient'; - -/** - * The AdditionalPropertiesAnyType model module. - * @module model/AdditionalPropertiesAnyType - * @version 1.0.0 - */ -class AdditionalPropertiesAnyType { - /** - * Constructs a new AdditionalPropertiesAnyType. - * @alias module:model/AdditionalPropertiesAnyType - * @extends Object - */ - constructor() { - - AdditionalPropertiesAnyType.initialize(this); - } - - /** - * Initializes the fields of this object. - * This method is used by the constructors of any subclasses, in order to implement multiple inheritance (mix-ins). - * Only for internal use. - */ - static initialize(obj) { - } - - /** - * Constructs a AdditionalPropertiesAnyType from a plain JavaScript object, optionally creating a new instance. - * Copies all relevant properties from data to obj if supplied or a new instance if not. - * @param {Object} data The plain JavaScript object bearing properties of interest. - * @param {module:model/AdditionalPropertiesAnyType} obj Optional instance to populate. - * @return {module:model/AdditionalPropertiesAnyType} The populated AdditionalPropertiesAnyType instance. - */ - static constructFromObject(data, obj) { - if (data) { - obj = obj || new AdditionalPropertiesAnyType(); - - ApiClient.constructFromObject(data, obj, 'Object'); - - - if (data.hasOwnProperty('name')) { - obj['name'] = ApiClient.convertToType(data['name'], 'String'); - } - } - return obj; - } - - -} - -/** - * @member {String} name - */ -AdditionalPropertiesAnyType.prototype['name'] = undefined; - - - - - - -export default AdditionalPropertiesAnyType; - diff --git a/samples/client/petstore/javascript-promise-es6/src/model/AdditionalPropertiesArray.js b/samples/client/petstore/javascript-promise-es6/src/model/AdditionalPropertiesArray.js deleted file mode 100644 index d630c2f5b75c..000000000000 --- a/samples/client/petstore/javascript-promise-es6/src/model/AdditionalPropertiesArray.js +++ /dev/null @@ -1,75 +0,0 @@ -/** - * OpenAPI Petstore - * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ - * - * The version of the OpenAPI document: 1.0.0 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - * - */ - -import ApiClient from '../ApiClient'; - -/** - * The AdditionalPropertiesArray model module. - * @module model/AdditionalPropertiesArray - * @version 1.0.0 - */ -class AdditionalPropertiesArray { - /** - * Constructs a new AdditionalPropertiesArray. - * @alias module:model/AdditionalPropertiesArray - * @extends Object - */ - constructor() { - - AdditionalPropertiesArray.initialize(this); - } - - /** - * Initializes the fields of this object. - * This method is used by the constructors of any subclasses, in order to implement multiple inheritance (mix-ins). - * Only for internal use. - */ - static initialize(obj) { - } - - /** - * Constructs a AdditionalPropertiesArray from a plain JavaScript object, optionally creating a new instance. - * Copies all relevant properties from data to obj if supplied or a new instance if not. - * @param {Object} data The plain JavaScript object bearing properties of interest. - * @param {module:model/AdditionalPropertiesArray} obj Optional instance to populate. - * @return {module:model/AdditionalPropertiesArray} The populated AdditionalPropertiesArray instance. - */ - static constructFromObject(data, obj) { - if (data) { - obj = obj || new AdditionalPropertiesArray(); - - ApiClient.constructFromObject(data, obj, 'Array'); - - - if (data.hasOwnProperty('name')) { - obj['name'] = ApiClient.convertToType(data['name'], 'String'); - } - } - return obj; - } - - -} - -/** - * @member {String} name - */ -AdditionalPropertiesArray.prototype['name'] = undefined; - - - - - - -export default AdditionalPropertiesArray; - diff --git a/samples/client/petstore/javascript-promise-es6/src/model/AdditionalPropertiesBoolean.js b/samples/client/petstore/javascript-promise-es6/src/model/AdditionalPropertiesBoolean.js deleted file mode 100644 index 57001bb1ffc5..000000000000 --- a/samples/client/petstore/javascript-promise-es6/src/model/AdditionalPropertiesBoolean.js +++ /dev/null @@ -1,75 +0,0 @@ -/** - * OpenAPI Petstore - * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ - * - * The version of the OpenAPI document: 1.0.0 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - * - */ - -import ApiClient from '../ApiClient'; - -/** - * The AdditionalPropertiesBoolean model module. - * @module model/AdditionalPropertiesBoolean - * @version 1.0.0 - */ -class AdditionalPropertiesBoolean { - /** - * Constructs a new AdditionalPropertiesBoolean. - * @alias module:model/AdditionalPropertiesBoolean - * @extends Object - */ - constructor() { - - AdditionalPropertiesBoolean.initialize(this); - } - - /** - * Initializes the fields of this object. - * This method is used by the constructors of any subclasses, in order to implement multiple inheritance (mix-ins). - * Only for internal use. - */ - static initialize(obj) { - } - - /** - * Constructs a AdditionalPropertiesBoolean from a plain JavaScript object, optionally creating a new instance. - * Copies all relevant properties from data to obj if supplied or a new instance if not. - * @param {Object} data The plain JavaScript object bearing properties of interest. - * @param {module:model/AdditionalPropertiesBoolean} obj Optional instance to populate. - * @return {module:model/AdditionalPropertiesBoolean} The populated AdditionalPropertiesBoolean instance. - */ - static constructFromObject(data, obj) { - if (data) { - obj = obj || new AdditionalPropertiesBoolean(); - - ApiClient.constructFromObject(data, obj, 'Boolean'); - - - if (data.hasOwnProperty('name')) { - obj['name'] = ApiClient.convertToType(data['name'], 'String'); - } - } - return obj; - } - - -} - -/** - * @member {String} name - */ -AdditionalPropertiesBoolean.prototype['name'] = undefined; - - - - - - -export default AdditionalPropertiesBoolean; - diff --git a/samples/client/petstore/javascript-promise-es6/src/model/AdditionalPropertiesInteger.js b/samples/client/petstore/javascript-promise-es6/src/model/AdditionalPropertiesInteger.js deleted file mode 100644 index 6e68ed7ac815..000000000000 --- a/samples/client/petstore/javascript-promise-es6/src/model/AdditionalPropertiesInteger.js +++ /dev/null @@ -1,75 +0,0 @@ -/** - * OpenAPI Petstore - * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ - * - * The version of the OpenAPI document: 1.0.0 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - * - */ - -import ApiClient from '../ApiClient'; - -/** - * The AdditionalPropertiesInteger model module. - * @module model/AdditionalPropertiesInteger - * @version 1.0.0 - */ -class AdditionalPropertiesInteger { - /** - * Constructs a new AdditionalPropertiesInteger. - * @alias module:model/AdditionalPropertiesInteger - * @extends Object - */ - constructor() { - - AdditionalPropertiesInteger.initialize(this); - } - - /** - * Initializes the fields of this object. - * This method is used by the constructors of any subclasses, in order to implement multiple inheritance (mix-ins). - * Only for internal use. - */ - static initialize(obj) { - } - - /** - * Constructs a AdditionalPropertiesInteger from a plain JavaScript object, optionally creating a new instance. - * Copies all relevant properties from data to obj if supplied or a new instance if not. - * @param {Object} data The plain JavaScript object bearing properties of interest. - * @param {module:model/AdditionalPropertiesInteger} obj Optional instance to populate. - * @return {module:model/AdditionalPropertiesInteger} The populated AdditionalPropertiesInteger instance. - */ - static constructFromObject(data, obj) { - if (data) { - obj = obj || new AdditionalPropertiesInteger(); - - ApiClient.constructFromObject(data, obj, 'Number'); - - - if (data.hasOwnProperty('name')) { - obj['name'] = ApiClient.convertToType(data['name'], 'String'); - } - } - return obj; - } - - -} - -/** - * @member {String} name - */ -AdditionalPropertiesInteger.prototype['name'] = undefined; - - - - - - -export default AdditionalPropertiesInteger; - diff --git a/samples/client/petstore/javascript-promise-es6/src/model/AdditionalPropertiesNumber.js b/samples/client/petstore/javascript-promise-es6/src/model/AdditionalPropertiesNumber.js deleted file mode 100644 index 4acb6986f2d9..000000000000 --- a/samples/client/petstore/javascript-promise-es6/src/model/AdditionalPropertiesNumber.js +++ /dev/null @@ -1,75 +0,0 @@ -/** - * OpenAPI Petstore - * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ - * - * The version of the OpenAPI document: 1.0.0 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - * - */ - -import ApiClient from '../ApiClient'; - -/** - * The AdditionalPropertiesNumber model module. - * @module model/AdditionalPropertiesNumber - * @version 1.0.0 - */ -class AdditionalPropertiesNumber { - /** - * Constructs a new AdditionalPropertiesNumber. - * @alias module:model/AdditionalPropertiesNumber - * @extends Object - */ - constructor() { - - AdditionalPropertiesNumber.initialize(this); - } - - /** - * Initializes the fields of this object. - * This method is used by the constructors of any subclasses, in order to implement multiple inheritance (mix-ins). - * Only for internal use. - */ - static initialize(obj) { - } - - /** - * Constructs a AdditionalPropertiesNumber from a plain JavaScript object, optionally creating a new instance. - * Copies all relevant properties from data to obj if supplied or a new instance if not. - * @param {Object} data The plain JavaScript object bearing properties of interest. - * @param {module:model/AdditionalPropertiesNumber} obj Optional instance to populate. - * @return {module:model/AdditionalPropertiesNumber} The populated AdditionalPropertiesNumber instance. - */ - static constructFromObject(data, obj) { - if (data) { - obj = obj || new AdditionalPropertiesNumber(); - - ApiClient.constructFromObject(data, obj, 'Number'); - - - if (data.hasOwnProperty('name')) { - obj['name'] = ApiClient.convertToType(data['name'], 'String'); - } - } - return obj; - } - - -} - -/** - * @member {String} name - */ -AdditionalPropertiesNumber.prototype['name'] = undefined; - - - - - - -export default AdditionalPropertiesNumber; - diff --git a/samples/client/petstore/javascript-promise-es6/src/model/AdditionalPropertiesObject.js b/samples/client/petstore/javascript-promise-es6/src/model/AdditionalPropertiesObject.js deleted file mode 100644 index 14796a296af7..000000000000 --- a/samples/client/petstore/javascript-promise-es6/src/model/AdditionalPropertiesObject.js +++ /dev/null @@ -1,75 +0,0 @@ -/** - * OpenAPI Petstore - * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ - * - * The version of the OpenAPI document: 1.0.0 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - * - */ - -import ApiClient from '../ApiClient'; - -/** - * The AdditionalPropertiesObject model module. - * @module model/AdditionalPropertiesObject - * @version 1.0.0 - */ -class AdditionalPropertiesObject { - /** - * Constructs a new AdditionalPropertiesObject. - * @alias module:model/AdditionalPropertiesObject - * @extends Object - */ - constructor() { - - AdditionalPropertiesObject.initialize(this); - } - - /** - * Initializes the fields of this object. - * This method is used by the constructors of any subclasses, in order to implement multiple inheritance (mix-ins). - * Only for internal use. - */ - static initialize(obj) { - } - - /** - * Constructs a AdditionalPropertiesObject from a plain JavaScript object, optionally creating a new instance. - * Copies all relevant properties from data to obj if supplied or a new instance if not. - * @param {Object} data The plain JavaScript object bearing properties of interest. - * @param {module:model/AdditionalPropertiesObject} obj Optional instance to populate. - * @return {module:model/AdditionalPropertiesObject} The populated AdditionalPropertiesObject instance. - */ - static constructFromObject(data, obj) { - if (data) { - obj = obj || new AdditionalPropertiesObject(); - - ApiClient.constructFromObject(data, obj, 'Object'); - - - if (data.hasOwnProperty('name')) { - obj['name'] = ApiClient.convertToType(data['name'], 'String'); - } - } - return obj; - } - - -} - -/** - * @member {String} name - */ -AdditionalPropertiesObject.prototype['name'] = undefined; - - - - - - -export default AdditionalPropertiesObject; - diff --git a/samples/client/petstore/javascript-promise-es6/src/model/AdditionalPropertiesString.js b/samples/client/petstore/javascript-promise-es6/src/model/AdditionalPropertiesString.js deleted file mode 100644 index f5792a66c534..000000000000 --- a/samples/client/petstore/javascript-promise-es6/src/model/AdditionalPropertiesString.js +++ /dev/null @@ -1,75 +0,0 @@ -/** - * OpenAPI Petstore - * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ - * - * The version of the OpenAPI document: 1.0.0 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - * - */ - -import ApiClient from '../ApiClient'; - -/** - * The AdditionalPropertiesString model module. - * @module model/AdditionalPropertiesString - * @version 1.0.0 - */ -class AdditionalPropertiesString { - /** - * Constructs a new AdditionalPropertiesString. - * @alias module:model/AdditionalPropertiesString - * @extends Object - */ - constructor() { - - AdditionalPropertiesString.initialize(this); - } - - /** - * Initializes the fields of this object. - * This method is used by the constructors of any subclasses, in order to implement multiple inheritance (mix-ins). - * Only for internal use. - */ - static initialize(obj) { - } - - /** - * Constructs a AdditionalPropertiesString from a plain JavaScript object, optionally creating a new instance. - * Copies all relevant properties from data to obj if supplied or a new instance if not. - * @param {Object} data The plain JavaScript object bearing properties of interest. - * @param {module:model/AdditionalPropertiesString} obj Optional instance to populate. - * @return {module:model/AdditionalPropertiesString} The populated AdditionalPropertiesString instance. - */ - static constructFromObject(data, obj) { - if (data) { - obj = obj || new AdditionalPropertiesString(); - - ApiClient.constructFromObject(data, obj, 'String'); - - - if (data.hasOwnProperty('name')) { - obj['name'] = ApiClient.convertToType(data['name'], 'String'); - } - } - return obj; - } - - -} - -/** - * @member {String} name - */ -AdditionalPropertiesString.prototype['name'] = undefined; - - - - - - -export default AdditionalPropertiesString; - diff --git a/samples/client/petstore/javascript-promise-es6/src/model/BigCat.js b/samples/client/petstore/javascript-promise-es6/src/model/BigCat.js deleted file mode 100644 index 764e45d31dc9..000000000000 --- a/samples/client/petstore/javascript-promise-es6/src/model/BigCat.js +++ /dev/null @@ -1,132 +0,0 @@ -/** - * OpenAPI Petstore - * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ - * - * The version of the OpenAPI document: 1.0.0 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - * - */ - -import ApiClient from '../ApiClient'; -import BigCatAllOf from './BigCatAllOf'; -import Cat from './Cat'; - -/** - * The BigCat model module. - * @module model/BigCat - * @version 1.0.0 - */ -class BigCat { - /** - * Constructs a new BigCat. - * @alias module:model/BigCat - * @extends module:model/Cat - * @implements module:model/Cat - * @implements module:model/BigCatAllOf - * @param className {String} - */ - constructor(className) { - Cat.initialize(this, className);BigCatAllOf.initialize(this); - BigCat.initialize(this, className); - } - - /** - * Initializes the fields of this object. - * This method is used by the constructors of any subclasses, in order to implement multiple inheritance (mix-ins). - * Only for internal use. - */ - static initialize(obj, className) { - } - - /** - * Constructs a BigCat from a plain JavaScript object, optionally creating a new instance. - * Copies all relevant properties from data to obj if supplied or a new instance if not. - * @param {Object} data The plain JavaScript object bearing properties of interest. - * @param {module:model/BigCat} obj Optional instance to populate. - * @return {module:model/BigCat} The populated BigCat instance. - */ - static constructFromObject(data, obj) { - if (data) { - obj = obj || new BigCat(); - Cat.constructFromObject(data, obj); - Cat.constructFromObject(data, obj); - BigCatAllOf.constructFromObject(data, obj); - - if (data.hasOwnProperty('kind')) { - obj['kind'] = ApiClient.convertToType(data['kind'], 'String'); - } - } - return obj; - } - - -} - -/** - * @member {module:model/BigCat.KindEnum} kind - */ -BigCat.prototype['kind'] = undefined; - - -// Implement Cat interface: -/** - * @member {String} className - */ -Cat.prototype['className'] = undefined; -/** - * @member {String} color - * @default 'red' - */ -Cat.prototype['color'] = 'red'; -/** - * @member {Boolean} declawed - */ -Cat.prototype['declawed'] = undefined; -// Implement BigCatAllOf interface: -/** - * @member {module:model/BigCatAllOf.KindEnum} kind - */ -BigCatAllOf.prototype['kind'] = undefined; - - - -/** - * Allowed values for the kind property. - * @enum {String} - * @readonly - */ -BigCat['KindEnum'] = { - - /** - * value: "lions" - * @const - */ - "lions": "lions", - - /** - * value: "tigers" - * @const - */ - "tigers": "tigers", - - /** - * value: "leopards" - * @const - */ - "leopards": "leopards", - - /** - * value: "jaguars" - * @const - */ - "jaguars": "jaguars" -}; - - - -export default BigCat; - diff --git a/samples/client/petstore/javascript-promise-es6/src/model/BigCatAllOf.js b/samples/client/petstore/javascript-promise-es6/src/model/BigCatAllOf.js deleted file mode 100644 index 1b79f1a2849f..000000000000 --- a/samples/client/petstore/javascript-promise-es6/src/model/BigCatAllOf.js +++ /dev/null @@ -1,104 +0,0 @@ -/** - * OpenAPI Petstore - * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ - * - * The version of the OpenAPI document: 1.0.0 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - * - */ - -import ApiClient from '../ApiClient'; - -/** - * The BigCatAllOf model module. - * @module model/BigCatAllOf - * @version 1.0.0 - */ -class BigCatAllOf { - /** - * Constructs a new BigCatAllOf. - * @alias module:model/BigCatAllOf - */ - constructor() { - - BigCatAllOf.initialize(this); - } - - /** - * Initializes the fields of this object. - * This method is used by the constructors of any subclasses, in order to implement multiple inheritance (mix-ins). - * Only for internal use. - */ - static initialize(obj) { - } - - /** - * Constructs a BigCatAllOf from a plain JavaScript object, optionally creating a new instance. - * Copies all relevant properties from data to obj if supplied or a new instance if not. - * @param {Object} data The plain JavaScript object bearing properties of interest. - * @param {module:model/BigCatAllOf} obj Optional instance to populate. - * @return {module:model/BigCatAllOf} The populated BigCatAllOf instance. - */ - static constructFromObject(data, obj) { - if (data) { - obj = obj || new BigCatAllOf(); - - if (data.hasOwnProperty('kind')) { - obj['kind'] = ApiClient.convertToType(data['kind'], 'String'); - } - } - return obj; - } - - -} - -/** - * @member {module:model/BigCatAllOf.KindEnum} kind - */ -BigCatAllOf.prototype['kind'] = undefined; - - - - - -/** - * Allowed values for the kind property. - * @enum {String} - * @readonly - */ -BigCatAllOf['KindEnum'] = { - - /** - * value: "lions" - * @const - */ - "lions": "lions", - - /** - * value: "tigers" - * @const - */ - "tigers": "tigers", - - /** - * value: "leopards" - * @const - */ - "leopards": "leopards", - - /** - * value: "jaguars" - * @const - */ - "jaguars": "jaguars" -}; - - - -export default BigCatAllOf; - diff --git a/samples/client/petstore/javascript-promise-es6/src/model/InlineObject.js b/samples/client/petstore/javascript-promise-es6/src/model/InlineObject.js deleted file mode 100644 index 6815bc809cf6..000000000000 --- a/samples/client/petstore/javascript-promise-es6/src/model/InlineObject.js +++ /dev/null @@ -1,81 +0,0 @@ -/** - * OpenAPI Petstore - * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ - * - * The version of the OpenAPI document: 1.0.0 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - * - */ - -import ApiClient from '../ApiClient'; - -/** - * The InlineObject model module. - * @module model/InlineObject - * @version 1.0.0 - */ -class InlineObject { - /** - * Constructs a new InlineObject. - * @alias module:model/InlineObject - */ - constructor() { - - InlineObject.initialize(this); - } - - /** - * Initializes the fields of this object. - * This method is used by the constructors of any subclasses, in order to implement multiple inheritance (mix-ins). - * Only for internal use. - */ - static initialize(obj) { - } - - /** - * Constructs a InlineObject from a plain JavaScript object, optionally creating a new instance. - * Copies all relevant properties from data to obj if supplied or a new instance if not. - * @param {Object} data The plain JavaScript object bearing properties of interest. - * @param {module:model/InlineObject} obj Optional instance to populate. - * @return {module:model/InlineObject} The populated InlineObject instance. - */ - static constructFromObject(data, obj) { - if (data) { - obj = obj || new InlineObject(); - - if (data.hasOwnProperty('name')) { - obj['name'] = ApiClient.convertToType(data['name'], 'String'); - } - if (data.hasOwnProperty('status')) { - obj['status'] = ApiClient.convertToType(data['status'], 'String'); - } - } - return obj; - } - - -} - -/** - * Updated name of the pet - * @member {String} name - */ -InlineObject.prototype['name'] = undefined; - -/** - * Updated status of the pet - * @member {String} status - */ -InlineObject.prototype['status'] = undefined; - - - - - - -export default InlineObject; - diff --git a/samples/client/petstore/javascript-promise-es6/src/model/InlineObject1.js b/samples/client/petstore/javascript-promise-es6/src/model/InlineObject1.js deleted file mode 100644 index 947877256fb2..000000000000 --- a/samples/client/petstore/javascript-promise-es6/src/model/InlineObject1.js +++ /dev/null @@ -1,81 +0,0 @@ -/** - * OpenAPI Petstore - * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ - * - * The version of the OpenAPI document: 1.0.0 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - * - */ - -import ApiClient from '../ApiClient'; - -/** - * The InlineObject1 model module. - * @module model/InlineObject1 - * @version 1.0.0 - */ -class InlineObject1 { - /** - * Constructs a new InlineObject1. - * @alias module:model/InlineObject1 - */ - constructor() { - - InlineObject1.initialize(this); - } - - /** - * Initializes the fields of this object. - * This method is used by the constructors of any subclasses, in order to implement multiple inheritance (mix-ins). - * Only for internal use. - */ - static initialize(obj) { - } - - /** - * Constructs a InlineObject1 from a plain JavaScript object, optionally creating a new instance. - * Copies all relevant properties from data to obj if supplied or a new instance if not. - * @param {Object} data The plain JavaScript object bearing properties of interest. - * @param {module:model/InlineObject1} obj Optional instance to populate. - * @return {module:model/InlineObject1} The populated InlineObject1 instance. - */ - static constructFromObject(data, obj) { - if (data) { - obj = obj || new InlineObject1(); - - if (data.hasOwnProperty('additionalMetadata')) { - obj['additionalMetadata'] = ApiClient.convertToType(data['additionalMetadata'], 'String'); - } - if (data.hasOwnProperty('file')) { - obj['file'] = ApiClient.convertToType(data['file'], File); - } - } - return obj; - } - - -} - -/** - * Additional data to pass to server - * @member {String} additionalMetadata - */ -InlineObject1.prototype['additionalMetadata'] = undefined; - -/** - * file to upload - * @member {File} file - */ -InlineObject1.prototype['file'] = undefined; - - - - - - -export default InlineObject1; - diff --git a/samples/client/petstore/javascript-promise-es6/src/model/InlineObject2.js b/samples/client/petstore/javascript-promise-es6/src/model/InlineObject2.js deleted file mode 100644 index e6ed9044568b..000000000000 --- a/samples/client/petstore/javascript-promise-es6/src/model/InlineObject2.js +++ /dev/null @@ -1,130 +0,0 @@ -/** - * OpenAPI Petstore - * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ - * - * The version of the OpenAPI document: 1.0.0 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - * - */ - -import ApiClient from '../ApiClient'; - -/** - * The InlineObject2 model module. - * @module model/InlineObject2 - * @version 1.0.0 - */ -class InlineObject2 { - /** - * Constructs a new InlineObject2. - * @alias module:model/InlineObject2 - */ - constructor() { - - InlineObject2.initialize(this); - } - - /** - * Initializes the fields of this object. - * This method is used by the constructors of any subclasses, in order to implement multiple inheritance (mix-ins). - * Only for internal use. - */ - static initialize(obj) { - } - - /** - * Constructs a InlineObject2 from a plain JavaScript object, optionally creating a new instance. - * Copies all relevant properties from data to obj if supplied or a new instance if not. - * @param {Object} data The plain JavaScript object bearing properties of interest. - * @param {module:model/InlineObject2} obj Optional instance to populate. - * @return {module:model/InlineObject2} The populated InlineObject2 instance. - */ - static constructFromObject(data, obj) { - if (data) { - obj = obj || new InlineObject2(); - - if (data.hasOwnProperty('enum_form_string_array')) { - obj['enum_form_string_array'] = ApiClient.convertToType(data['enum_form_string_array'], ['String']); - } - if (data.hasOwnProperty('enum_form_string')) { - obj['enum_form_string'] = ApiClient.convertToType(data['enum_form_string'], 'String'); - } - } - return obj; - } - - -} - -/** - * Form parameter enum test (string array) - * @member {Array.} enum_form_string_array - */ -InlineObject2.prototype['enum_form_string_array'] = undefined; - -/** - * Form parameter enum test (string) - * @member {module:model/InlineObject2.EnumFormStringEnum} enum_form_string - * @default '-efg' - */ -InlineObject2.prototype['enum_form_string'] = '-efg'; - - - - - -/** - * Allowed values for the enumFormStringArray property. - * @enum {String} - * @readonly - */ -InlineObject2['EnumFormStringArrayEnum'] = { - - /** - * value: ">" - * @const - */ - "GREATER_THAN": ">", - - /** - * value: "$" - * @const - */ - "DOLLAR": "$" -}; - - -/** - * Allowed values for the enum_form_string property. - * @enum {String} - * @readonly - */ -InlineObject2['EnumFormStringEnum'] = { - - /** - * value: "_abc" - * @const - */ - "_abc": "_abc", - - /** - * value: "-efg" - * @const - */ - "-efg": "-efg", - - /** - * value: "(xyz)" - * @const - */ - "(xyz)": "(xyz)" -}; - - - -export default InlineObject2; - diff --git a/samples/client/petstore/javascript-promise-es6/src/model/InlineObject3.js b/samples/client/petstore/javascript-promise-es6/src/model/InlineObject3.js deleted file mode 100644 index 6a14f67109c8..000000000000 --- a/samples/client/petstore/javascript-promise-es6/src/model/InlineObject3.js +++ /dev/null @@ -1,197 +0,0 @@ -/** - * OpenAPI Petstore - * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ - * - * The version of the OpenAPI document: 1.0.0 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - * - */ - -import ApiClient from '../ApiClient'; - -/** - * The InlineObject3 model module. - * @module model/InlineObject3 - * @version 1.0.0 - */ -class InlineObject3 { - /** - * Constructs a new InlineObject3. - * @alias module:model/InlineObject3 - * @param _number {Number} None - * @param _double {Number} None - * @param patternWithoutDelimiter {String} None - * @param _byte {Blob} None - */ - constructor(_number, _double, patternWithoutDelimiter, _byte) { - - InlineObject3.initialize(this, _number, _double, patternWithoutDelimiter, _byte); - } - - /** - * Initializes the fields of this object. - * This method is used by the constructors of any subclasses, in order to implement multiple inheritance (mix-ins). - * Only for internal use. - */ - static initialize(obj, _number, _double, patternWithoutDelimiter, _byte) { - obj['number'] = _number; - obj['double'] = _double; - obj['pattern_without_delimiter'] = patternWithoutDelimiter; - obj['byte'] = _byte; - } - - /** - * Constructs a InlineObject3 from a plain JavaScript object, optionally creating a new instance. - * Copies all relevant properties from data to obj if supplied or a new instance if not. - * @param {Object} data The plain JavaScript object bearing properties of interest. - * @param {module:model/InlineObject3} obj Optional instance to populate. - * @return {module:model/InlineObject3} The populated InlineObject3 instance. - */ - static constructFromObject(data, obj) { - if (data) { - obj = obj || new InlineObject3(); - - if (data.hasOwnProperty('integer')) { - obj['integer'] = ApiClient.convertToType(data['integer'], 'Number'); - } - if (data.hasOwnProperty('int32')) { - obj['int32'] = ApiClient.convertToType(data['int32'], 'Number'); - } - if (data.hasOwnProperty('int64')) { - obj['int64'] = ApiClient.convertToType(data['int64'], 'Number'); - } - if (data.hasOwnProperty('number')) { - obj['number'] = ApiClient.convertToType(data['number'], 'Number'); - } - if (data.hasOwnProperty('float')) { - obj['float'] = ApiClient.convertToType(data['float'], 'Number'); - } - if (data.hasOwnProperty('double')) { - obj['double'] = ApiClient.convertToType(data['double'], 'Number'); - } - if (data.hasOwnProperty('string')) { - obj['string'] = ApiClient.convertToType(data['string'], 'String'); - } - if (data.hasOwnProperty('pattern_without_delimiter')) { - obj['pattern_without_delimiter'] = ApiClient.convertToType(data['pattern_without_delimiter'], 'String'); - } - if (data.hasOwnProperty('byte')) { - obj['byte'] = ApiClient.convertToType(data['byte'], 'Blob'); - } - if (data.hasOwnProperty('binary')) { - obj['binary'] = ApiClient.convertToType(data['binary'], File); - } - if (data.hasOwnProperty('date')) { - obj['date'] = ApiClient.convertToType(data['date'], 'Date'); - } - if (data.hasOwnProperty('dateTime')) { - obj['dateTime'] = ApiClient.convertToType(data['dateTime'], 'Date'); - } - if (data.hasOwnProperty('password')) { - obj['password'] = ApiClient.convertToType(data['password'], 'String'); - } - if (data.hasOwnProperty('callback')) { - obj['callback'] = ApiClient.convertToType(data['callback'], 'String'); - } - } - return obj; - } - - -} - -/** - * None - * @member {Number} integer - */ -InlineObject3.prototype['integer'] = undefined; - -/** - * None - * @member {Number} int32 - */ -InlineObject3.prototype['int32'] = undefined; - -/** - * None - * @member {Number} int64 - */ -InlineObject3.prototype['int64'] = undefined; - -/** - * None - * @member {Number} number - */ -InlineObject3.prototype['number'] = undefined; - -/** - * None - * @member {Number} float - */ -InlineObject3.prototype['float'] = undefined; - -/** - * None - * @member {Number} double - */ -InlineObject3.prototype['double'] = undefined; - -/** - * None - * @member {String} string - */ -InlineObject3.prototype['string'] = undefined; - -/** - * None - * @member {String} pattern_without_delimiter - */ -InlineObject3.prototype['pattern_without_delimiter'] = undefined; - -/** - * None - * @member {Blob} byte - */ -InlineObject3.prototype['byte'] = undefined; - -/** - * None - * @member {File} binary - */ -InlineObject3.prototype['binary'] = undefined; - -/** - * None - * @member {Date} date - */ -InlineObject3.prototype['date'] = undefined; - -/** - * None - * @member {Date} dateTime - */ -InlineObject3.prototype['dateTime'] = undefined; - -/** - * None - * @member {String} password - */ -InlineObject3.prototype['password'] = undefined; - -/** - * None - * @member {String} callback - */ -InlineObject3.prototype['callback'] = undefined; - - - - - - -export default InlineObject3; - diff --git a/samples/client/petstore/javascript-promise-es6/src/model/InlineObject4.js b/samples/client/petstore/javascript-promise-es6/src/model/InlineObject4.js deleted file mode 100644 index 9d5d5715c66f..000000000000 --- a/samples/client/petstore/javascript-promise-es6/src/model/InlineObject4.js +++ /dev/null @@ -1,85 +0,0 @@ -/** - * OpenAPI Petstore - * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ - * - * The version of the OpenAPI document: 1.0.0 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - * - */ - -import ApiClient from '../ApiClient'; - -/** - * The InlineObject4 model module. - * @module model/InlineObject4 - * @version 1.0.0 - */ -class InlineObject4 { - /** - * Constructs a new InlineObject4. - * @alias module:model/InlineObject4 - * @param param {String} field1 - * @param param2 {String} field2 - */ - constructor(param, param2) { - - InlineObject4.initialize(this, param, param2); - } - - /** - * Initializes the fields of this object. - * This method is used by the constructors of any subclasses, in order to implement multiple inheritance (mix-ins). - * Only for internal use. - */ - static initialize(obj, param, param2) { - obj['param'] = param; - obj['param2'] = param2; - } - - /** - * Constructs a InlineObject4 from a plain JavaScript object, optionally creating a new instance. - * Copies all relevant properties from data to obj if supplied or a new instance if not. - * @param {Object} data The plain JavaScript object bearing properties of interest. - * @param {module:model/InlineObject4} obj Optional instance to populate. - * @return {module:model/InlineObject4} The populated InlineObject4 instance. - */ - static constructFromObject(data, obj) { - if (data) { - obj = obj || new InlineObject4(); - - if (data.hasOwnProperty('param')) { - obj['param'] = ApiClient.convertToType(data['param'], 'String'); - } - if (data.hasOwnProperty('param2')) { - obj['param2'] = ApiClient.convertToType(data['param2'], 'String'); - } - } - return obj; - } - - -} - -/** - * field1 - * @member {String} param - */ -InlineObject4.prototype['param'] = undefined; - -/** - * field2 - * @member {String} param2 - */ -InlineObject4.prototype['param2'] = undefined; - - - - - - -export default InlineObject4; - diff --git a/samples/client/petstore/javascript-promise-es6/src/model/InlineObject5.js b/samples/client/petstore/javascript-promise-es6/src/model/InlineObject5.js deleted file mode 100644 index 1969e9b2ef3a..000000000000 --- a/samples/client/petstore/javascript-promise-es6/src/model/InlineObject5.js +++ /dev/null @@ -1,83 +0,0 @@ -/** - * OpenAPI Petstore - * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ - * - * The version of the OpenAPI document: 1.0.0 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - * - */ - -import ApiClient from '../ApiClient'; - -/** - * The InlineObject5 model module. - * @module model/InlineObject5 - * @version 1.0.0 - */ -class InlineObject5 { - /** - * Constructs a new InlineObject5. - * @alias module:model/InlineObject5 - * @param requiredFile {File} file to upload - */ - constructor(requiredFile) { - - InlineObject5.initialize(this, requiredFile); - } - - /** - * Initializes the fields of this object. - * This method is used by the constructors of any subclasses, in order to implement multiple inheritance (mix-ins). - * Only for internal use. - */ - static initialize(obj, requiredFile) { - obj['requiredFile'] = requiredFile; - } - - /** - * Constructs a InlineObject5 from a plain JavaScript object, optionally creating a new instance. - * Copies all relevant properties from data to obj if supplied or a new instance if not. - * @param {Object} data The plain JavaScript object bearing properties of interest. - * @param {module:model/InlineObject5} obj Optional instance to populate. - * @return {module:model/InlineObject5} The populated InlineObject5 instance. - */ - static constructFromObject(data, obj) { - if (data) { - obj = obj || new InlineObject5(); - - if (data.hasOwnProperty('additionalMetadata')) { - obj['additionalMetadata'] = ApiClient.convertToType(data['additionalMetadata'], 'String'); - } - if (data.hasOwnProperty('requiredFile')) { - obj['requiredFile'] = ApiClient.convertToType(data['requiredFile'], File); - } - } - return obj; - } - - -} - -/** - * Additional data to pass to server - * @member {String} additionalMetadata - */ -InlineObject5.prototype['additionalMetadata'] = undefined; - -/** - * file to upload - * @member {File} requiredFile - */ -InlineObject5.prototype['requiredFile'] = undefined; - - - - - - -export default InlineObject5; - diff --git a/samples/client/petstore/javascript-promise-es6/src/model/InlineResponseDefault.js b/samples/client/petstore/javascript-promise-es6/src/model/InlineResponseDefault.js deleted file mode 100644 index 2f66d888ec94..000000000000 --- a/samples/client/petstore/javascript-promise-es6/src/model/InlineResponseDefault.js +++ /dev/null @@ -1,72 +0,0 @@ -/** - * OpenAPI Petstore - * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ - * - * The version of the OpenAPI document: 1.0.0 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - * - */ - -import ApiClient from '../ApiClient'; -import Foo from './Foo'; - -/** - * The InlineResponseDefault model module. - * @module model/InlineResponseDefault - * @version 1.0.0 - */ -class InlineResponseDefault { - /** - * Constructs a new InlineResponseDefault. - * @alias module:model/InlineResponseDefault - */ - constructor() { - - InlineResponseDefault.initialize(this); - } - - /** - * Initializes the fields of this object. - * This method is used by the constructors of any subclasses, in order to implement multiple inheritance (mix-ins). - * Only for internal use. - */ - static initialize(obj) { - } - - /** - * Constructs a InlineResponseDefault from a plain JavaScript object, optionally creating a new instance. - * Copies all relevant properties from data to obj if supplied or a new instance if not. - * @param {Object} data The plain JavaScript object bearing properties of interest. - * @param {module:model/InlineResponseDefault} obj Optional instance to populate. - * @return {module:model/InlineResponseDefault} The populated InlineResponseDefault instance. - */ - static constructFromObject(data, obj) { - if (data) { - obj = obj || new InlineResponseDefault(); - - if (data.hasOwnProperty('string')) { - obj['string'] = Foo.constructFromObject(data['string']); - } - } - return obj; - } - - -} - -/** - * @member {module:model/Foo} string - */ -InlineResponseDefault.prototype['string'] = undefined; - - - - - - -export default InlineResponseDefault; - diff --git a/samples/client/petstore/javascript-promise-es6/src/model/SingleRefType.js b/samples/client/petstore/javascript-promise-es6/src/model/SingleRefType.js deleted file mode 100644 index 999a69e288b7..000000000000 --- a/samples/client/petstore/javascript-promise-es6/src/model/SingleRefType.js +++ /dev/null @@ -1,46 +0,0 @@ -/** - * OpenAPI Petstore - * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ - * - * The version of the OpenAPI document: 1.0.0 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - * - */ - -import ApiClient from '../ApiClient'; -/** -* Enum class SingleRefType. -* @enum {} -* @readonly -*/ -export default class SingleRefType { - - /** - * value: "admin" - * @const - */ - "admin" = "admin"; - - - /** - * value: "user" - * @const - */ - "user" = "user"; - - - - /** - * Returns a SingleRefType enum value from a Javascript object name. - * @param {Object} data The plain JavaScript object containing the name of the enum value. - * @return {module:model/SingleRefType} The enum SingleRefType value. - */ - static constructFromObject(object) { - return object; - } -} - diff --git a/samples/client/petstore/javascript-promise-es6/src/model/TypeHolderDefault.js b/samples/client/petstore/javascript-promise-es6/src/model/TypeHolderDefault.js deleted file mode 100644 index 4ca66c6407ca..000000000000 --- a/samples/client/petstore/javascript-promise-es6/src/model/TypeHolderDefault.js +++ /dev/null @@ -1,115 +0,0 @@ -/** - * OpenAPI Petstore - * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ - * - * The version of the OpenAPI document: 1.0.0 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - * - */ - -import ApiClient from '../ApiClient'; - -/** - * The TypeHolderDefault model module. - * @module model/TypeHolderDefault - * @version 1.0.0 - */ -class TypeHolderDefault { - /** - * Constructs a new TypeHolderDefault. - * @alias module:model/TypeHolderDefault - * @param stringItem {String} - * @param numberItem {Number} - * @param integerItem {Number} - * @param boolItem {Boolean} - * @param arrayItem {Array.} - */ - constructor(stringItem, numberItem, integerItem, boolItem, arrayItem) { - - TypeHolderDefault.initialize(this, stringItem, numberItem, integerItem, boolItem, arrayItem); - } - - /** - * Initializes the fields of this object. - * This method is used by the constructors of any subclasses, in order to implement multiple inheritance (mix-ins). - * Only for internal use. - */ - static initialize(obj, stringItem, numberItem, integerItem, boolItem, arrayItem) { - obj['string_item'] = stringItem; - obj['number_item'] = numberItem; - obj['integer_item'] = integerItem; - obj['bool_item'] = boolItem; - obj['array_item'] = arrayItem; - } - - /** - * Constructs a TypeHolderDefault from a plain JavaScript object, optionally creating a new instance. - * Copies all relevant properties from data to obj if supplied or a new instance if not. - * @param {Object} data The plain JavaScript object bearing properties of interest. - * @param {module:model/TypeHolderDefault} obj Optional instance to populate. - * @return {module:model/TypeHolderDefault} The populated TypeHolderDefault instance. - */ - static constructFromObject(data, obj) { - if (data) { - obj = obj || new TypeHolderDefault(); - - if (data.hasOwnProperty('string_item')) { - obj['string_item'] = ApiClient.convertToType(data['string_item'], 'String'); - } - if (data.hasOwnProperty('number_item')) { - obj['number_item'] = ApiClient.convertToType(data['number_item'], 'Number'); - } - if (data.hasOwnProperty('integer_item')) { - obj['integer_item'] = ApiClient.convertToType(data['integer_item'], 'Number'); - } - if (data.hasOwnProperty('bool_item')) { - obj['bool_item'] = ApiClient.convertToType(data['bool_item'], 'Boolean'); - } - if (data.hasOwnProperty('array_item')) { - obj['array_item'] = ApiClient.convertToType(data['array_item'], ['Number']); - } - } - return obj; - } - - -} - -/** - * @member {String} string_item - * @default 'what' - */ -TypeHolderDefault.prototype['string_item'] = 'what'; - -/** - * @member {Number} number_item - */ -TypeHolderDefault.prototype['number_item'] = undefined; - -/** - * @member {Number} integer_item - */ -TypeHolderDefault.prototype['integer_item'] = undefined; - -/** - * @member {Boolean} bool_item - * @default true - */ -TypeHolderDefault.prototype['bool_item'] = true; - -/** - * @member {Array.} array_item - */ -TypeHolderDefault.prototype['array_item'] = undefined; - - - - - - -export default TypeHolderDefault; - diff --git a/samples/client/petstore/javascript-promise-es6/src/model/TypeHolderExample.js b/samples/client/petstore/javascript-promise-es6/src/model/TypeHolderExample.js deleted file mode 100644 index fa969870f8fa..000000000000 --- a/samples/client/petstore/javascript-promise-es6/src/model/TypeHolderExample.js +++ /dev/null @@ -1,123 +0,0 @@ -/** - * OpenAPI Petstore - * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ - * - * The version of the OpenAPI document: 1.0.0 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - * - */ - -import ApiClient from '../ApiClient'; - -/** - * The TypeHolderExample model module. - * @module model/TypeHolderExample - * @version 1.0.0 - */ -class TypeHolderExample { - /** - * Constructs a new TypeHolderExample. - * @alias module:model/TypeHolderExample - * @param stringItem {String} - * @param numberItem {Number} - * @param floatItem {Number} - * @param integerItem {Number} - * @param boolItem {Boolean} - * @param arrayItem {Array.} - */ - constructor(stringItem, numberItem, floatItem, integerItem, boolItem, arrayItem) { - - TypeHolderExample.initialize(this, stringItem, numberItem, floatItem, integerItem, boolItem, arrayItem); - } - - /** - * Initializes the fields of this object. - * This method is used by the constructors of any subclasses, in order to implement multiple inheritance (mix-ins). - * Only for internal use. - */ - static initialize(obj, stringItem, numberItem, floatItem, integerItem, boolItem, arrayItem) { - obj['string_item'] = stringItem; - obj['number_item'] = numberItem; - obj['float_item'] = floatItem; - obj['integer_item'] = integerItem; - obj['bool_item'] = boolItem; - obj['array_item'] = arrayItem; - } - - /** - * Constructs a TypeHolderExample from a plain JavaScript object, optionally creating a new instance. - * Copies all relevant properties from data to obj if supplied or a new instance if not. - * @param {Object} data The plain JavaScript object bearing properties of interest. - * @param {module:model/TypeHolderExample} obj Optional instance to populate. - * @return {module:model/TypeHolderExample} The populated TypeHolderExample instance. - */ - static constructFromObject(data, obj) { - if (data) { - obj = obj || new TypeHolderExample(); - - if (data.hasOwnProperty('string_item')) { - obj['string_item'] = ApiClient.convertToType(data['string_item'], 'String'); - } - if (data.hasOwnProperty('number_item')) { - obj['number_item'] = ApiClient.convertToType(data['number_item'], 'Number'); - } - if (data.hasOwnProperty('float_item')) { - obj['float_item'] = ApiClient.convertToType(data['float_item'], 'Number'); - } - if (data.hasOwnProperty('integer_item')) { - obj['integer_item'] = ApiClient.convertToType(data['integer_item'], 'Number'); - } - if (data.hasOwnProperty('bool_item')) { - obj['bool_item'] = ApiClient.convertToType(data['bool_item'], 'Boolean'); - } - if (data.hasOwnProperty('array_item')) { - obj['array_item'] = ApiClient.convertToType(data['array_item'], ['Number']); - } - } - return obj; - } - - -} - -/** - * @member {String} string_item - */ -TypeHolderExample.prototype['string_item'] = undefined; - -/** - * @member {Number} number_item - */ -TypeHolderExample.prototype['number_item'] = undefined; - -/** - * @member {Number} float_item - */ -TypeHolderExample.prototype['float_item'] = undefined; - -/** - * @member {Number} integer_item - */ -TypeHolderExample.prototype['integer_item'] = undefined; - -/** - * @member {Boolean} bool_item - */ -TypeHolderExample.prototype['bool_item'] = undefined; - -/** - * @member {Array.} array_item - */ -TypeHolderExample.prototype['array_item'] = undefined; - - - - - - -export default TypeHolderExample; - diff --git a/samples/client/petstore/javascript-promise-es6/src/model/XmlItem.js b/samples/client/petstore/javascript-promise-es6/src/model/XmlItem.js deleted file mode 100644 index 7510c480b288..000000000000 --- a/samples/client/petstore/javascript-promise-es6/src/model/XmlItem.js +++ /dev/null @@ -1,295 +0,0 @@ -/** - * OpenAPI Petstore - * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ - * - * The version of the OpenAPI document: 1.0.0 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - * - */ - -import ApiClient from '../ApiClient'; - -/** - * The XmlItem model module. - * @module model/XmlItem - * @version 1.0.0 - */ -class XmlItem { - /** - * Constructs a new XmlItem. - * @alias module:model/XmlItem - */ - constructor() { - - XmlItem.initialize(this); - } - - /** - * Initializes the fields of this object. - * This method is used by the constructors of any subclasses, in order to implement multiple inheritance (mix-ins). - * Only for internal use. - */ - static initialize(obj) { - } - - /** - * Constructs a XmlItem from a plain JavaScript object, optionally creating a new instance. - * Copies all relevant properties from data to obj if supplied or a new instance if not. - * @param {Object} data The plain JavaScript object bearing properties of interest. - * @param {module:model/XmlItem} obj Optional instance to populate. - * @return {module:model/XmlItem} The populated XmlItem instance. - */ - static constructFromObject(data, obj) { - if (data) { - obj = obj || new XmlItem(); - - if (data.hasOwnProperty('attribute_string')) { - obj['attribute_string'] = ApiClient.convertToType(data['attribute_string'], 'String'); - } - if (data.hasOwnProperty('attribute_number')) { - obj['attribute_number'] = ApiClient.convertToType(data['attribute_number'], 'Number'); - } - if (data.hasOwnProperty('attribute_integer')) { - obj['attribute_integer'] = ApiClient.convertToType(data['attribute_integer'], 'Number'); - } - if (data.hasOwnProperty('attribute_boolean')) { - obj['attribute_boolean'] = ApiClient.convertToType(data['attribute_boolean'], 'Boolean'); - } - if (data.hasOwnProperty('wrapped_array')) { - obj['wrapped_array'] = ApiClient.convertToType(data['wrapped_array'], ['Number']); - } - if (data.hasOwnProperty('name_string')) { - obj['name_string'] = ApiClient.convertToType(data['name_string'], 'String'); - } - if (data.hasOwnProperty('name_number')) { - obj['name_number'] = ApiClient.convertToType(data['name_number'], 'Number'); - } - if (data.hasOwnProperty('name_integer')) { - obj['name_integer'] = ApiClient.convertToType(data['name_integer'], 'Number'); - } - if (data.hasOwnProperty('name_boolean')) { - obj['name_boolean'] = ApiClient.convertToType(data['name_boolean'], 'Boolean'); - } - if (data.hasOwnProperty('name_array')) { - obj['name_array'] = ApiClient.convertToType(data['name_array'], ['Number']); - } - if (data.hasOwnProperty('name_wrapped_array')) { - obj['name_wrapped_array'] = ApiClient.convertToType(data['name_wrapped_array'], ['Number']); - } - if (data.hasOwnProperty('prefix_string')) { - obj['prefix_string'] = ApiClient.convertToType(data['prefix_string'], 'String'); - } - if (data.hasOwnProperty('prefix_number')) { - obj['prefix_number'] = ApiClient.convertToType(data['prefix_number'], 'Number'); - } - if (data.hasOwnProperty('prefix_integer')) { - obj['prefix_integer'] = ApiClient.convertToType(data['prefix_integer'], 'Number'); - } - if (data.hasOwnProperty('prefix_boolean')) { - obj['prefix_boolean'] = ApiClient.convertToType(data['prefix_boolean'], 'Boolean'); - } - if (data.hasOwnProperty('prefix_array')) { - obj['prefix_array'] = ApiClient.convertToType(data['prefix_array'], ['Number']); - } - if (data.hasOwnProperty('prefix_wrapped_array')) { - obj['prefix_wrapped_array'] = ApiClient.convertToType(data['prefix_wrapped_array'], ['Number']); - } - if (data.hasOwnProperty('namespace_string')) { - obj['namespace_string'] = ApiClient.convertToType(data['namespace_string'], 'String'); - } - if (data.hasOwnProperty('namespace_number')) { - obj['namespace_number'] = ApiClient.convertToType(data['namespace_number'], 'Number'); - } - if (data.hasOwnProperty('namespace_integer')) { - obj['namespace_integer'] = ApiClient.convertToType(data['namespace_integer'], 'Number'); - } - if (data.hasOwnProperty('namespace_boolean')) { - obj['namespace_boolean'] = ApiClient.convertToType(data['namespace_boolean'], 'Boolean'); - } - if (data.hasOwnProperty('namespace_array')) { - obj['namespace_array'] = ApiClient.convertToType(data['namespace_array'], ['Number']); - } - if (data.hasOwnProperty('namespace_wrapped_array')) { - obj['namespace_wrapped_array'] = ApiClient.convertToType(data['namespace_wrapped_array'], ['Number']); - } - if (data.hasOwnProperty('prefix_ns_string')) { - obj['prefix_ns_string'] = ApiClient.convertToType(data['prefix_ns_string'], 'String'); - } - if (data.hasOwnProperty('prefix_ns_number')) { - obj['prefix_ns_number'] = ApiClient.convertToType(data['prefix_ns_number'], 'Number'); - } - if (data.hasOwnProperty('prefix_ns_integer')) { - obj['prefix_ns_integer'] = ApiClient.convertToType(data['prefix_ns_integer'], 'Number'); - } - if (data.hasOwnProperty('prefix_ns_boolean')) { - obj['prefix_ns_boolean'] = ApiClient.convertToType(data['prefix_ns_boolean'], 'Boolean'); - } - if (data.hasOwnProperty('prefix_ns_array')) { - obj['prefix_ns_array'] = ApiClient.convertToType(data['prefix_ns_array'], ['Number']); - } - if (data.hasOwnProperty('prefix_ns_wrapped_array')) { - obj['prefix_ns_wrapped_array'] = ApiClient.convertToType(data['prefix_ns_wrapped_array'], ['Number']); - } - } - return obj; - } - - -} - -/** - * @member {String} attribute_string - */ -XmlItem.prototype['attribute_string'] = undefined; - -/** - * @member {Number} attribute_number - */ -XmlItem.prototype['attribute_number'] = undefined; - -/** - * @member {Number} attribute_integer - */ -XmlItem.prototype['attribute_integer'] = undefined; - -/** - * @member {Boolean} attribute_boolean - */ -XmlItem.prototype['attribute_boolean'] = undefined; - -/** - * @member {Array.} wrapped_array - */ -XmlItem.prototype['wrapped_array'] = undefined; - -/** - * @member {String} name_string - */ -XmlItem.prototype['name_string'] = undefined; - -/** - * @member {Number} name_number - */ -XmlItem.prototype['name_number'] = undefined; - -/** - * @member {Number} name_integer - */ -XmlItem.prototype['name_integer'] = undefined; - -/** - * @member {Boolean} name_boolean - */ -XmlItem.prototype['name_boolean'] = undefined; - -/** - * @member {Array.} name_array - */ -XmlItem.prototype['name_array'] = undefined; - -/** - * @member {Array.} name_wrapped_array - */ -XmlItem.prototype['name_wrapped_array'] = undefined; - -/** - * @member {String} prefix_string - */ -XmlItem.prototype['prefix_string'] = undefined; - -/** - * @member {Number} prefix_number - */ -XmlItem.prototype['prefix_number'] = undefined; - -/** - * @member {Number} prefix_integer - */ -XmlItem.prototype['prefix_integer'] = undefined; - -/** - * @member {Boolean} prefix_boolean - */ -XmlItem.prototype['prefix_boolean'] = undefined; - -/** - * @member {Array.} prefix_array - */ -XmlItem.prototype['prefix_array'] = undefined; - -/** - * @member {Array.} prefix_wrapped_array - */ -XmlItem.prototype['prefix_wrapped_array'] = undefined; - -/** - * @member {String} namespace_string - */ -XmlItem.prototype['namespace_string'] = undefined; - -/** - * @member {Number} namespace_number - */ -XmlItem.prototype['namespace_number'] = undefined; - -/** - * @member {Number} namespace_integer - */ -XmlItem.prototype['namespace_integer'] = undefined; - -/** - * @member {Boolean} namespace_boolean - */ -XmlItem.prototype['namespace_boolean'] = undefined; - -/** - * @member {Array.} namespace_array - */ -XmlItem.prototype['namespace_array'] = undefined; - -/** - * @member {Array.} namespace_wrapped_array - */ -XmlItem.prototype['namespace_wrapped_array'] = undefined; - -/** - * @member {String} prefix_ns_string - */ -XmlItem.prototype['prefix_ns_string'] = undefined; - -/** - * @member {Number} prefix_ns_number - */ -XmlItem.prototype['prefix_ns_number'] = undefined; - -/** - * @member {Number} prefix_ns_integer - */ -XmlItem.prototype['prefix_ns_integer'] = undefined; - -/** - * @member {Boolean} prefix_ns_boolean - */ -XmlItem.prototype['prefix_ns_boolean'] = undefined; - -/** - * @member {Array.} prefix_ns_array - */ -XmlItem.prototype['prefix_ns_array'] = undefined; - -/** - * @member {Array.} prefix_ns_wrapped_array - */ -XmlItem.prototype['prefix_ns_wrapped_array'] = undefined; - - - - - - -export default XmlItem; - diff --git a/samples/client/petstore/javascript-promise-es6/test/ApiClientTest.js b/samples/client/petstore/javascript-promise-es6/test/ApiClientTest.js deleted file mode 100644 index e544d52998eb..000000000000 --- a/samples/client/petstore/javascript-promise-es6/test/ApiClientTest.js +++ /dev/null @@ -1,394 +0,0 @@ -if (typeof module === 'object' && module.exports) { - var expect = require('expect.js'); - var SwaggerPetstore = require('../src/index'); - var sinon = require('sinon'); -} - -var apiClient = SwaggerPetstore.ApiClient.instance; - -describe('ApiClient', function() { - describe('defaults', function() { - it('should have correct default values with the default API client', function() { - expect(apiClient).to.be.ok(); - expect(apiClient.basePath).to.be('http://petstore.swagger.io:80/v2'); - expect(apiClient.authentications).to.eql({ - petstore_auth: {type: 'oauth2'}, - bearer_test: {type: 'bearer'}, - http_basic_test: {type: 'basic'}, - api_key: {type: 'apiKey', 'in': 'header', name: 'api_key'}, - api_key_query: {type: 'apiKey', 'in': 'query', name: 'api_key_query'}, - /* comment out the following as these fake security def (testing purpose) - * are removed from the spec, we'll add these back after updating the - * petstore server - * - test_http_basic: {type: 'basic'}, - test_api_client_id: { - type: 'apiKey', - 'in': 'header', - name: 'x-test_api_client_id' - }, - test_api_client_secret: { - type: 'apiKey', - 'in': 'header', - name: 'x-test_api_client_secret' - }, - test_api_key_query: { - type: 'apiKey', - 'in': 'query', - name: 'test_api_key_query' - }, - test_api_key_header: { - type: 'apiKey', - 'in': 'header', - name: 'test_api_key_header' - }*/ - }); - }); - - it('should have correct default values with new API client and can customize it', function() { - var newClient = new SwaggerPetstore.ApiClient; - expect(newClient.basePath).to.be('http://petstore.swagger.io:80/v2'); - expect(newClient.buildUrl('/abc', {})).to.be('http://petstore.swagger.io:80/v2/abc'); - - newClient.basePath = 'http://example.com'; - expect(newClient.basePath).to.be('http://example.com'); - expect(newClient.buildUrl('/abc', {})).to.be('http://example.com/abc'); - }); - }); - - describe('#paramToString', function() { - it('should return empty string for null and undefined', function() { - expect(apiClient.paramToString(null)).to.be(''); - expect(apiClient.paramToString(undefined)).to.be(''); - }); - - it('should return string', function() { - expect(apiClient.paramToString('')).to.be(''); - expect(apiClient.paramToString('abc')).to.be('abc'); - expect(apiClient.paramToString(123)).to.be('123'); - }); - }); - - describe('#buildCollectionParam', function() { - var param; - - beforeEach(function() { - param = ['aa', 'bb', 123]; - }); - - it('works for csv', function() { - expect(apiClient.buildCollectionParam(param, 'csv')).to.be('aa,bb,123'); - }); - - it('works for ssv', function() { - expect(apiClient.buildCollectionParam(param, 'ssv')).to.be('aa bb 123'); - }); - - it('works for tsv', function() { - expect(apiClient.buildCollectionParam(param, 'tsv')).to.be('aa\tbb\t123'); - }); - - it('works for pipes', function() { - expect(apiClient.buildCollectionParam(param, 'pipes')).to.be('aa|bb|123'); - }); - - it('works for multi', function() { - expect(apiClient.buildCollectionParam(param, 'multi')).to.eql(['aa', 'bb', '123']); - }); - - it('fails for invalid collection format', function() { - expect(function() { apiClient.buildCollectionParam(param, 'INVALID'); }).to.throwError(); - }); - }); - - describe('#buildUrl', function() { - it('should work without path parameters in the path', function() { - expect(apiClient.buildUrl('/abc', {})).to - .be('http://petstore.swagger.io:80/v2/abc'); - expect(apiClient.buildUrl('/abc/def?ok', {id: 123})).to - .be('http://petstore.swagger.io:80/v2/abc/def?ok'); - }); - - it('should work with path parameters in the path', function() { - expect(apiClient.buildUrl('/{id}', {id: 123})).to - .be('http://petstore.swagger.io:80/v2/123'); - expect(apiClient.buildUrl('/abc/{id}/{name}?ok', {id: 456, name: 'a b'})).to. - be('http://petstore.swagger.io:80/v2/abc/456/a%20b?ok'); - }); - }); - - describe('#isJsonMime', function() { - it('should return true for JSON MIME', function() { - expect(apiClient.isJsonMime('application/json')).to.be(true); - expect(apiClient.isJsonMime('application/json; charset=UTF8')).to.be(true); - expect(apiClient.isJsonMime('APPLICATION/JSON')).to.be(true); - }); - - it('should return false for non-JSON MIME', function() { - expect(apiClient.isJsonMime('')).to.be(false); - expect(apiClient.isJsonMime('text/plain')).to.be(false); - expect(apiClient.isJsonMime('application/xml')).to.be(false); - expect(apiClient.isJsonMime('application/jsonp')).to.be(false); - }); - }); - - describe('#applyAuthToRequest', function() { - var req, newClient; - - beforeEach(function() { - req = { - auth: function() {}, - set: function() {}, - query: function() {} - }; - sinon.stub(req, 'auth'); - sinon.stub(req, 'set'); - sinon.stub(req, 'query'); - newClient = new SwaggerPetstore.ApiClient(); - }); - - describe('basic', function() { - var authName = 'testBasicAuth'; - var authNames = [authName]; - var auth; - - beforeEach(function() { - newClient.authentications[authName] = {type: 'basic'}; - auth = newClient.authentications[authName]; - }); - - it('sets auth header with username and password set', function() { - auth.username = 'user'; - auth.password = 'pass'; - newClient.applyAuthToRequest(req, authNames); - sinon.assert.calledOnce(req.auth); - // 'dXNlcjpwYXNz' is base64-encoded string of 'user:pass' - sinon.assert.calledWithMatch(req.auth, 'user', 'pass'); - sinon.assert.notCalled(req.set); - sinon.assert.notCalled(req.query); - }); - - it('sets header with only username set', function() { - auth.username = 'user'; - newClient.applyAuthToRequest(req, authNames); - sinon.assert.calledOnce(req.auth); - // 'dXNlcjo=' is base64-encoded string of 'user:' - sinon.assert.calledWithMatch(req.auth, 'user', ''); - sinon.assert.notCalled(req.set); - sinon.assert.notCalled(req.query); - }); - - it('sets header with only password set', function() { - auth.password = 'pass'; - newClient.applyAuthToRequest(req, authNames); - sinon.assert.calledOnce(req.auth); - // 'OnBhc3M=' is base64-encoded string of ':pass' - sinon.assert.calledWithMatch(req.auth, '', 'pass'); - sinon.assert.notCalled(req.set); - sinon.assert.notCalled(req.query); - }); - - it('does not set header when username and password are not set', function() { - newClient.applyAuthToRequest(req, authNames); - sinon.assert.notCalled(req.auth); - sinon.assert.notCalled(req.set); - sinon.assert.notCalled(req.query); - }); - }); - - describe('apiKey', function() { - var authName = 'testApiKey'; - var authNames = [authName]; - var auth; - - beforeEach(function() { - newClient.authentications[authName] = {type: 'apiKey', name: 'api_key'}; - auth = newClient.authentications[authName]; - }); - - it('sets api key in header', function() { - auth.in = 'header'; - auth.apiKey = 'my-api-key'; - newClient.applyAuthToRequest(req, authNames); - sinon.assert.calledOnce(req.set); - sinon.assert.calledWithMatch(req.set, {'api_key': 'my-api-key'}); - sinon.assert.notCalled(req.auth); - sinon.assert.notCalled(req.query); - }); - - it('sets api key in query', function() { - auth.in = 'query'; - auth.apiKey = 'my-api-key'; - newClient.applyAuthToRequest(req, authNames); - sinon.assert.calledOnce(req.query); - sinon.assert.calledWithMatch(req.query, {'api_key': 'my-api-key'}); - sinon.assert.notCalled(req.auth); - sinon.assert.notCalled(req.set); - }); - - it('sets api key in header with prefix', function() { - auth.in = 'header'; - auth.apiKey = 'my-api-key'; - auth.apiKeyPrefix = 'Key'; - newClient.applyAuthToRequest(req, authNames); - sinon.assert.calledOnce(req.set); - sinon.assert.calledWithMatch(req.set, {'api_key': 'Key my-api-key'}); - sinon.assert.notCalled(req.auth); - sinon.assert.notCalled(req.query); - }); - - it('works when api key is not set', function() { - auth.in = 'query'; - auth.apiKey = null; - newClient.applyAuthToRequest(req, authNames); - sinon.assert.notCalled(req.query); - sinon.assert.notCalled(req.auth); - sinon.assert.notCalled(req.set); - }); - }); - - describe('oauth2', function() { - var authName = 'testOAuth2'; - var authNames = [authName]; - var auth; - - beforeEach(function() { - newClient.authentications[authName] = {type: 'oauth2'}; - auth = newClient.authentications[authName]; - }); - - it('sets access token in header', function() { - auth.accessToken = 'my-access-token'; - newClient.applyAuthToRequest(req, authNames); - sinon.assert.calledOnce(req.set); - sinon.assert.calledWithMatch(req.set, {'Authorization': 'Bearer my-access-token'}); - sinon.assert.notCalled(req.auth); - sinon.assert.notCalled(req.query); - }); - - it('works when access token is not set', function() { - auth.accessToken = null; - newClient.applyAuthToRequest(req, authNames); - sinon.assert.notCalled(req.query); - sinon.assert.notCalled(req.auth); - sinon.assert.notCalled(req.set); - }); - }); - - describe('apiKey and oauth2', function() { - var apiKeyAuthName = 'testApiKey'; - var oauth2Name = 'testOAuth2'; - var authNames = [apiKeyAuthName, oauth2Name]; - var apiKeyAuth, oauth2; - - beforeEach(function() { - newClient.authentications[apiKeyAuthName] = {type: 'apiKey', name: 'api_key', 'in': 'query'}; - newClient.authentications[oauth2Name] = {type: 'oauth2'}; - apiKeyAuth = newClient.authentications[apiKeyAuthName]; - oauth2 = newClient.authentications[oauth2Name]; - }); - - it('works when setting both api key and access token', function() { - apiKeyAuth.apiKey = 'my-api-key'; - oauth2.accessToken = 'my-access-token'; - newClient.applyAuthToRequest(req, authNames); - sinon.assert.calledOnce(req.query); - sinon.assert.calledWithMatch(req.query, {'api_key': 'my-api-key'}); - sinon.assert.calledOnce(req.set); - sinon.assert.calledWithMatch(req.set, {'Authorization': 'Bearer my-access-token'}); - sinon.assert.notCalled(req.auth); - }); - - it('works when setting only api key', function() { - apiKeyAuth.apiKey = 'my-api-key'; - oauth2.accessToken = null; - newClient.applyAuthToRequest(req, authNames); - sinon.assert.calledOnce(req.query); - sinon.assert.calledWithMatch(req.query, {'api_key': 'my-api-key'}); - sinon.assert.notCalled(req.set); - sinon.assert.notCalled(req.auth); - }); - - it('works when neither api key nor access token is set', function() { - apiKeyAuth.apiKey = null; - oauth2.accessToken = null; - newClient.applyAuthToRequest(req, authNames); - sinon.assert.notCalled(req.query); - sinon.assert.notCalled(req.auth); - sinon.assert.notCalled(req.set); - }); - }); - - describe('unknown type', function() { - var authName = 'unknown'; - var authNames = [authName]; - - beforeEach(function() { - newClient.authentications[authName] = {type: 'UNKNOWN'}; - }); - - it('throws error for unknown auth type', function() { - expect(function() { - newClient.applyAuthToRequest(req, authNames); - }).to.throwError(); - sinon.assert.notCalled(req.set); - sinon.assert.notCalled(req.auth); - sinon.assert.notCalled(req.query); - }); - }); - }); - - /* - describe('#defaultHeaders', function() { - it('should initialize default headers to be an empty object', function() { - expect(apiClient.defaultHeaders).to.eql({}); - }); - - it('should put default headers in request', function() { - var newClient = new SwaggerPetstore.ApiClient; - newClient.defaultHeaders['Content-Type'] = 'text/plain' - newClient.defaultHeaders['api_key'] = 'special-key' - - var expected = {'Content-Type': 'text/plain', 'api_key': 'special-key'}; - expect(newClient.defaultHeaders).to.eql(expected); - var req = makeDumbRequest(newClient); - req.unset('User-Agent'); - expect(req.header).to.eql(expected); - }); - - it('should override default headers with provided header params', function() { - var newClient = new SwaggerPetstore.ApiClient; - newClient.defaultHeaders['Content-Type'] = 'text/plain' - newClient.defaultHeaders['api_key'] = 'special-key' - - var headerParams = {'Content-Type': 'application/json', 'Authorization': 'Bearer test-token'} - var expected = { - 'Content-Type': 'application/json', - 'api_key': 'special-key', - 'Authorization': 'Bearer test-token' - }; - var req = makeDumbRequest(newClient, {headerParams: headerParams}); - req.unset('User-Agent'); - expect(req.header).to.eql(expected); - }); - }); -*/ - -}); - -function makeDumbRequest(apiClient, opts) { - opts = opts || {}; - var path = opts.path || '/store/inventory'; - var httpMethod = opts.httpMethod || 'GET'; - var pathParams = opts.pathParams || {}; - var queryParams = opts.queryParams || {}; - var headerParams = opts.headerParams || {}; - var formParams = opts.formParams || {}; - var bodyParam = opts.bodyParam; - var authNames = []; - var contentTypes = opts.contentTypes || []; - var accepts = opts.accepts || []; - var callback = opts.callback; - return apiClient.callApi(path, httpMethod, pathParams, queryParams, - headerParams, formParams, bodyParam, authNames, contentTypes, accepts); -} diff --git a/samples/client/petstore/javascript-promise-es6/test/api/AnotherFakeApi.spec.js b/samples/client/petstore/javascript-promise-es6/test/api/AnotherFakeApi.spec.js index cc0edc79ac01..3212de66056c 100644 --- a/samples/client/petstore/javascript-promise-es6/test/api/AnotherFakeApi.spec.js +++ b/samples/client/petstore/javascript-promise-es6/test/api/AnotherFakeApi.spec.js @@ -2,7 +2,7 @@ * OpenAPI Petstore * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ * - * OpenAPI spec version: 1.0.0 + * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/samples/client/petstore/javascript-promise-es6/test/api/FakeApi.spec.js b/samples/client/petstore/javascript-promise-es6/test/api/FakeApi.spec.js index 1f0d2e140f11..9ecfa421cb6b 100644 --- a/samples/client/petstore/javascript-promise-es6/test/api/FakeApi.spec.js +++ b/samples/client/petstore/javascript-promise-es6/test/api/FakeApi.spec.js @@ -2,7 +2,7 @@ * OpenAPI Petstore * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ * - * OpenAPI spec version: 1.0.0 + * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -48,10 +48,20 @@ } describe('FakeApi', function() { - describe('createXmlItem', function() { - it('should call createXmlItem successfully', function(done) { - //uncomment below and update the code to test createXmlItem - //instance.createXmlItem(function(error) { + describe('fakeHealthGet', function() { + it('should call fakeHealthGet successfully', function(done) { + //uncomment below and update the code to test fakeHealthGet + //instance.fakeHealthGet(function(error) { + // if (error) throw error; + //expect().to.be(); + //}); + done(); + }); + }); + describe('fakeHttpSignatureTest', function() { + it('should call fakeHttpSignatureTest successfully', function(done) { + //uncomment below and update the code to test fakeHttpSignatureTest + //instance.fakeHttpSignatureTest(function(error) { // if (error) throw error; //expect().to.be(); //}); @@ -98,6 +108,26 @@ done(); }); }); + describe('fakePropertyEnumIntegerSerialize', function() { + it('should call fakePropertyEnumIntegerSerialize successfully', function(done) { + //uncomment below and update the code to test fakePropertyEnumIntegerSerialize + //instance.fakePropertyEnumIntegerSerialize(function(error) { + // if (error) throw error; + //expect().to.be(); + //}); + done(); + }); + }); + describe('testBodyWithBinary', function() { + it('should call testBodyWithBinary successfully', function(done) { + //uncomment below and update the code to test testBodyWithBinary + //instance.testBodyWithBinary(function(error) { + // if (error) throw error; + //expect().to.be(); + //}); + done(); + }); + }); describe('testBodyWithFileSchema', function() { it('should call testBodyWithFileSchema successfully', function(done) { //uncomment below and update the code to test testBodyWithFileSchema @@ -178,6 +208,16 @@ done(); }); }); + describe('testQueryParameterCollectionFormat', function() { + it('should call testQueryParameterCollectionFormat successfully', function(done) { + //uncomment below and update the code to test testQueryParameterCollectionFormat + //instance.testQueryParameterCollectionFormat(function(error) { + // if (error) throw error; + //expect().to.be(); + //}); + done(); + }); + }); }); })); diff --git a/samples/client/petstore/javascript-promise-es6/test/api/FakeClassnameTags123Api.spec.js b/samples/client/petstore/javascript-promise-es6/test/api/FakeClassnameTags123Api.spec.js index c9b8c836f87b..ebe401b08d9a 100644 --- a/samples/client/petstore/javascript-promise-es6/test/api/FakeClassnameTags123Api.spec.js +++ b/samples/client/petstore/javascript-promise-es6/test/api/FakeClassnameTags123Api.spec.js @@ -2,7 +2,7 @@ * OpenAPI Petstore * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ * - * OpenAPI spec version: 1.0.0 + * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/samples/client/petstore/javascript-promise-es6/test/api/PetApi.spec.js b/samples/client/petstore/javascript-promise-es6/test/api/PetApi.spec.js index 1818900165cf..16591a407d97 100644 --- a/samples/client/petstore/javascript-promise-es6/test/api/PetApi.spec.js +++ b/samples/client/petstore/javascript-promise-es6/test/api/PetApi.spec.js @@ -2,7 +2,7 @@ * OpenAPI Petstore * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ * - * OpenAPI spec version: 1.0.0 + * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/samples/client/petstore/javascript-promise-es6/test/api/StoreApi.spec.js b/samples/client/petstore/javascript-promise-es6/test/api/StoreApi.spec.js index 86b775815772..2ad9823032b7 100644 --- a/samples/client/petstore/javascript-promise-es6/test/api/StoreApi.spec.js +++ b/samples/client/petstore/javascript-promise-es6/test/api/StoreApi.spec.js @@ -2,7 +2,7 @@ * OpenAPI Petstore * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ * - * OpenAPI spec version: 1.0.0 + * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/samples/client/petstore/javascript-promise-es6/test/api/UserApi.spec.js b/samples/client/petstore/javascript-promise-es6/test/api/UserApi.spec.js index 891f2dc47587..feab9370b16f 100644 --- a/samples/client/petstore/javascript-promise-es6/test/api/UserApi.spec.js +++ b/samples/client/petstore/javascript-promise-es6/test/api/UserApi.spec.js @@ -2,7 +2,7 @@ * OpenAPI Petstore * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ * - * OpenAPI spec version: 1.0.0 + * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/samples/client/petstore/javascript-promise-es6/test/model/AdditionalPropertiesClass.spec.js b/samples/client/petstore/javascript-promise-es6/test/model/AdditionalPropertiesClass.spec.js index d316c448dd51..4086c3a614b2 100644 --- a/samples/client/petstore/javascript-promise-es6/test/model/AdditionalPropertiesClass.spec.js +++ b/samples/client/petstore/javascript-promise-es6/test/model/AdditionalPropertiesClass.spec.js @@ -50,19 +50,19 @@ describe('AdditionalPropertiesClass', function() { it('should create an instance of AdditionalPropertiesClass', function() { // uncomment below and update the code to test AdditionalPropertiesClass - //var instane = new OpenApiPetstore.AdditionalPropertiesClass(); + //var instance = new OpenApiPetstore.AdditionalPropertiesClass(); //expect(instance).to.be.a(OpenApiPetstore.AdditionalPropertiesClass); }); it('should have the property mapProperty (base name: "map_property")', function() { // uncomment below and update the code to test the property mapProperty - //var instane = new OpenApiPetstore.AdditionalPropertiesClass(); + //var instance = new OpenApiPetstore.AdditionalPropertiesClass(); //expect(instance).to.be(); }); it('should have the property mapOfMapProperty (base name: "map_of_map_property")', function() { // uncomment below and update the code to test the property mapOfMapProperty - //var instane = new OpenApiPetstore.AdditionalPropertiesClass(); + //var instance = new OpenApiPetstore.AdditionalPropertiesClass(); //expect(instance).to.be(); }); diff --git a/samples/client/petstore/javascript-promise-es6/test/model/Animal.spec.js b/samples/client/petstore/javascript-promise-es6/test/model/Animal.spec.js index cc729e13ba08..1fedba274c74 100644 --- a/samples/client/petstore/javascript-promise-es6/test/model/Animal.spec.js +++ b/samples/client/petstore/javascript-promise-es6/test/model/Animal.spec.js @@ -50,19 +50,19 @@ describe('Animal', function() { it('should create an instance of Animal', function() { // uncomment below and update the code to test Animal - //var instane = new OpenApiPetstore.Animal(); + //var instance = new OpenApiPetstore.Animal(); //expect(instance).to.be.a(OpenApiPetstore.Animal); }); it('should have the property className (base name: "className")', function() { // uncomment below and update the code to test the property className - //var instane = new OpenApiPetstore.Animal(); + //var instance = new OpenApiPetstore.Animal(); //expect(instance).to.be(); }); it('should have the property color (base name: "color")', function() { // uncomment below and update the code to test the property color - //var instane = new OpenApiPetstore.Animal(); + //var instance = new OpenApiPetstore.Animal(); //expect(instance).to.be(); }); diff --git a/samples/client/petstore/javascript-promise-es6/test/model/ApiResponse.spec.js b/samples/client/petstore/javascript-promise-es6/test/model/ApiResponse.spec.js index e9da1c397490..47716b7a5228 100644 --- a/samples/client/petstore/javascript-promise-es6/test/model/ApiResponse.spec.js +++ b/samples/client/petstore/javascript-promise-es6/test/model/ApiResponse.spec.js @@ -50,25 +50,25 @@ describe('ApiResponse', function() { it('should create an instance of ApiResponse', function() { // uncomment below and update the code to test ApiResponse - //var instane = new OpenApiPetstore.ApiResponse(); + //var instance = new OpenApiPetstore.ApiResponse(); //expect(instance).to.be.a(OpenApiPetstore.ApiResponse); }); it('should have the property code (base name: "code")', function() { // uncomment below and update the code to test the property code - //var instane = new OpenApiPetstore.ApiResponse(); + //var instance = new OpenApiPetstore.ApiResponse(); //expect(instance).to.be(); }); it('should have the property type (base name: "type")', function() { // uncomment below and update the code to test the property type - //var instane = new OpenApiPetstore.ApiResponse(); + //var instance = new OpenApiPetstore.ApiResponse(); //expect(instance).to.be(); }); it('should have the property message (base name: "message")', function() { // uncomment below and update the code to test the property message - //var instane = new OpenApiPetstore.ApiResponse(); + //var instance = new OpenApiPetstore.ApiResponse(); //expect(instance).to.be(); }); diff --git a/samples/client/petstore/javascript-promise-es6/test/model/ArrayOfArrayOfNumberOnly.spec.js b/samples/client/petstore/javascript-promise-es6/test/model/ArrayOfArrayOfNumberOnly.spec.js index 8c1cdf356fc6..4bdd2cd2cbcc 100644 --- a/samples/client/petstore/javascript-promise-es6/test/model/ArrayOfArrayOfNumberOnly.spec.js +++ b/samples/client/petstore/javascript-promise-es6/test/model/ArrayOfArrayOfNumberOnly.spec.js @@ -50,13 +50,13 @@ describe('ArrayOfArrayOfNumberOnly', function() { it('should create an instance of ArrayOfArrayOfNumberOnly', function() { // uncomment below and update the code to test ArrayOfArrayOfNumberOnly - //var instane = new OpenApiPetstore.ArrayOfArrayOfNumberOnly(); + //var instance = new OpenApiPetstore.ArrayOfArrayOfNumberOnly(); //expect(instance).to.be.a(OpenApiPetstore.ArrayOfArrayOfNumberOnly); }); it('should have the property arrayArrayNumber (base name: "ArrayArrayNumber")', function() { // uncomment below and update the code to test the property arrayArrayNumber - //var instane = new OpenApiPetstore.ArrayOfArrayOfNumberOnly(); + //var instance = new OpenApiPetstore.ArrayOfArrayOfNumberOnly(); //expect(instance).to.be(); }); diff --git a/samples/client/petstore/javascript-promise-es6/test/model/ArrayOfNumberOnly.spec.js b/samples/client/petstore/javascript-promise-es6/test/model/ArrayOfNumberOnly.spec.js index 70dc490e4584..a44c1a7ea17e 100644 --- a/samples/client/petstore/javascript-promise-es6/test/model/ArrayOfNumberOnly.spec.js +++ b/samples/client/petstore/javascript-promise-es6/test/model/ArrayOfNumberOnly.spec.js @@ -50,13 +50,13 @@ describe('ArrayOfNumberOnly', function() { it('should create an instance of ArrayOfNumberOnly', function() { // uncomment below and update the code to test ArrayOfNumberOnly - //var instane = new OpenApiPetstore.ArrayOfNumberOnly(); + //var instance = new OpenApiPetstore.ArrayOfNumberOnly(); //expect(instance).to.be.a(OpenApiPetstore.ArrayOfNumberOnly); }); it('should have the property arrayNumber (base name: "ArrayNumber")', function() { // uncomment below and update the code to test the property arrayNumber - //var instane = new OpenApiPetstore.ArrayOfNumberOnly(); + //var instance = new OpenApiPetstore.ArrayOfNumberOnly(); //expect(instance).to.be(); }); diff --git a/samples/client/petstore/javascript-promise-es6/test/model/ArrayTest.spec.js b/samples/client/petstore/javascript-promise-es6/test/model/ArrayTest.spec.js index 3df2ea0d575a..a6bbf95e2109 100644 --- a/samples/client/petstore/javascript-promise-es6/test/model/ArrayTest.spec.js +++ b/samples/client/petstore/javascript-promise-es6/test/model/ArrayTest.spec.js @@ -50,25 +50,25 @@ describe('ArrayTest', function() { it('should create an instance of ArrayTest', function() { // uncomment below and update the code to test ArrayTest - //var instane = new OpenApiPetstore.ArrayTest(); + //var instance = new OpenApiPetstore.ArrayTest(); //expect(instance).to.be.a(OpenApiPetstore.ArrayTest); }); it('should have the property arrayOfString (base name: "array_of_string")', function() { // uncomment below and update the code to test the property arrayOfString - //var instane = new OpenApiPetstore.ArrayTest(); + //var instance = new OpenApiPetstore.ArrayTest(); //expect(instance).to.be(); }); it('should have the property arrayArrayOfInteger (base name: "array_array_of_integer")', function() { // uncomment below and update the code to test the property arrayArrayOfInteger - //var instane = new OpenApiPetstore.ArrayTest(); + //var instance = new OpenApiPetstore.ArrayTest(); //expect(instance).to.be(); }); it('should have the property arrayArrayOfModel (base name: "array_array_of_model")', function() { // uncomment below and update the code to test the property arrayArrayOfModel - //var instane = new OpenApiPetstore.ArrayTest(); + //var instance = new OpenApiPetstore.ArrayTest(); //expect(instance).to.be(); }); diff --git a/samples/client/petstore/javascript-promise-es6/test/model/Capitalization.spec.js b/samples/client/petstore/javascript-promise-es6/test/model/Capitalization.spec.js index dcb9d6d182e0..8f14fd583d51 100644 --- a/samples/client/petstore/javascript-promise-es6/test/model/Capitalization.spec.js +++ b/samples/client/petstore/javascript-promise-es6/test/model/Capitalization.spec.js @@ -50,43 +50,43 @@ describe('Capitalization', function() { it('should create an instance of Capitalization', function() { // uncomment below and update the code to test Capitalization - //var instane = new OpenApiPetstore.Capitalization(); + //var instance = new OpenApiPetstore.Capitalization(); //expect(instance).to.be.a(OpenApiPetstore.Capitalization); }); it('should have the property smallCamel (base name: "smallCamel")', function() { // uncomment below and update the code to test the property smallCamel - //var instane = new OpenApiPetstore.Capitalization(); + //var instance = new OpenApiPetstore.Capitalization(); //expect(instance).to.be(); }); it('should have the property capitalCamel (base name: "CapitalCamel")', function() { // uncomment below and update the code to test the property capitalCamel - //var instane = new OpenApiPetstore.Capitalization(); + //var instance = new OpenApiPetstore.Capitalization(); //expect(instance).to.be(); }); it('should have the property smallSnake (base name: "small_Snake")', function() { // uncomment below and update the code to test the property smallSnake - //var instane = new OpenApiPetstore.Capitalization(); + //var instance = new OpenApiPetstore.Capitalization(); //expect(instance).to.be(); }); it('should have the property capitalSnake (base name: "Capital_Snake")', function() { // uncomment below and update the code to test the property capitalSnake - //var instane = new OpenApiPetstore.Capitalization(); + //var instance = new OpenApiPetstore.Capitalization(); //expect(instance).to.be(); }); it('should have the property sCAETHFlowPoints (base name: "SCA_ETH_Flow_Points")', function() { // uncomment below and update the code to test the property sCAETHFlowPoints - //var instane = new OpenApiPetstore.Capitalization(); + //var instance = new OpenApiPetstore.Capitalization(); //expect(instance).to.be(); }); it('should have the property ATT_NAME (base name: "ATT_NAME")', function() { // uncomment below and update the code to test the property ATT_NAME - //var instane = new OpenApiPetstore.Capitalization(); + //var instance = new OpenApiPetstore.Capitalization(); //expect(instance).to.be(); }); diff --git a/samples/client/petstore/javascript-promise-es6/test/model/Cat.spec.js b/samples/client/petstore/javascript-promise-es6/test/model/Cat.spec.js index 1b7182a13022..a0c3551cbc60 100644 --- a/samples/client/petstore/javascript-promise-es6/test/model/Cat.spec.js +++ b/samples/client/petstore/javascript-promise-es6/test/model/Cat.spec.js @@ -50,13 +50,13 @@ describe('Cat', function() { it('should create an instance of Cat', function() { // uncomment below and update the code to test Cat - //var instane = new OpenApiPetstore.Cat(); + //var instance = new OpenApiPetstore.Cat(); //expect(instance).to.be.a(OpenApiPetstore.Cat); }); it('should have the property declawed (base name: "declawed")', function() { // uncomment below and update the code to test the property declawed - //var instane = new OpenApiPetstore.Cat(); + //var instance = new OpenApiPetstore.Cat(); //expect(instance).to.be(); }); diff --git a/samples/client/petstore/javascript-promise-es6/test/model/CatAllOf.spec.js b/samples/client/petstore/javascript-promise-es6/test/model/CatAllOf.spec.js index be4cf8b972ae..7e9f50eaddde 100644 --- a/samples/client/petstore/javascript-promise-es6/test/model/CatAllOf.spec.js +++ b/samples/client/petstore/javascript-promise-es6/test/model/CatAllOf.spec.js @@ -50,13 +50,13 @@ describe('CatAllOf', function() { it('should create an instance of CatAllOf', function() { // uncomment below and update the code to test CatAllOf - //var instane = new OpenApiPetstore.CatAllOf(); + //var instance = new OpenApiPetstore.CatAllOf(); //expect(instance).to.be.a(OpenApiPetstore.CatAllOf); }); it('should have the property declawed (base name: "declawed")', function() { // uncomment below and update the code to test the property declawed - //var instane = new OpenApiPetstore.CatAllOf(); + //var instance = new OpenApiPetstore.CatAllOf(); //expect(instance).to.be(); }); diff --git a/samples/client/petstore/javascript-promise-es6/test/model/Category.spec.js b/samples/client/petstore/javascript-promise-es6/test/model/Category.spec.js index e0a992aa512a..c0e132b02604 100644 --- a/samples/client/petstore/javascript-promise-es6/test/model/Category.spec.js +++ b/samples/client/petstore/javascript-promise-es6/test/model/Category.spec.js @@ -50,19 +50,19 @@ describe('Category', function() { it('should create an instance of Category', function() { // uncomment below and update the code to test Category - //var instane = new OpenApiPetstore.Category(); + //var instance = new OpenApiPetstore.Category(); //expect(instance).to.be.a(OpenApiPetstore.Category); }); it('should have the property id (base name: "id")', function() { // uncomment below and update the code to test the property id - //var instane = new OpenApiPetstore.Category(); + //var instance = new OpenApiPetstore.Category(); //expect(instance).to.be(); }); it('should have the property name (base name: "name")', function() { // uncomment below and update the code to test the property name - //var instane = new OpenApiPetstore.Category(); + //var instance = new OpenApiPetstore.Category(); //expect(instance).to.be(); }); diff --git a/samples/client/petstore/javascript-promise-es6/test/model/ClassModel.spec.js b/samples/client/petstore/javascript-promise-es6/test/model/ClassModel.spec.js index 0f2d200d0ba2..975308a1ceb5 100644 --- a/samples/client/petstore/javascript-promise-es6/test/model/ClassModel.spec.js +++ b/samples/client/petstore/javascript-promise-es6/test/model/ClassModel.spec.js @@ -50,13 +50,13 @@ describe('ClassModel', function() { it('should create an instance of ClassModel', function() { // uncomment below and update the code to test ClassModel - //var instane = new OpenApiPetstore.ClassModel(); + //var instance = new OpenApiPetstore.ClassModel(); //expect(instance).to.be.a(OpenApiPetstore.ClassModel); }); it('should have the property _class (base name: "_class")', function() { // uncomment below and update the code to test the property _class - //var instane = new OpenApiPetstore.ClassModel(); + //var instance = new OpenApiPetstore.ClassModel(); //expect(instance).to.be(); }); diff --git a/samples/client/petstore/javascript-promise-es6/test/model/Client.spec.js b/samples/client/petstore/javascript-promise-es6/test/model/Client.spec.js index 49a4400987bc..c96ccac7e3a6 100644 --- a/samples/client/petstore/javascript-promise-es6/test/model/Client.spec.js +++ b/samples/client/petstore/javascript-promise-es6/test/model/Client.spec.js @@ -50,13 +50,13 @@ describe('Client', function() { it('should create an instance of Client', function() { // uncomment below and update the code to test Client - //var instane = new OpenApiPetstore.Client(); + //var instance = new OpenApiPetstore.Client(); //expect(instance).to.be.a(OpenApiPetstore.Client); }); it('should have the property client (base name: "client")', function() { // uncomment below and update the code to test the property client - //var instane = new OpenApiPetstore.Client(); + //var instance = new OpenApiPetstore.Client(); //expect(instance).to.be(); }); diff --git a/samples/client/petstore/javascript-promise-es6/test/model/DeprecatedObject.spec.js b/samples/client/petstore/javascript-promise-es6/test/model/DeprecatedObject.spec.js index 2273f70a0f9d..072245e26f51 100644 --- a/samples/client/petstore/javascript-promise-es6/test/model/DeprecatedObject.spec.js +++ b/samples/client/petstore/javascript-promise-es6/test/model/DeprecatedObject.spec.js @@ -50,7 +50,7 @@ describe('DeprecatedObject', function() { it('should create an instance of DeprecatedObject', function() { // uncomment below and update the code to test DeprecatedObject - //var instane = new OpenApiPetstore.DeprecatedObject(); + //var instance = new OpenApiPetstore.DeprecatedObject(); //expect(instance).to.be.a(OpenApiPetstore.DeprecatedObject); }); diff --git a/samples/client/petstore/javascript-promise-es6/test/model/Dog.spec.js b/samples/client/petstore/javascript-promise-es6/test/model/Dog.spec.js index eb919428d2fa..709cbfa9fd3e 100644 --- a/samples/client/petstore/javascript-promise-es6/test/model/Dog.spec.js +++ b/samples/client/petstore/javascript-promise-es6/test/model/Dog.spec.js @@ -50,13 +50,13 @@ describe('Dog', function() { it('should create an instance of Dog', function() { // uncomment below and update the code to test Dog - //var instane = new OpenApiPetstore.Dog(); + //var instance = new OpenApiPetstore.Dog(); //expect(instance).to.be.a(OpenApiPetstore.Dog); }); it('should have the property breed (base name: "breed")', function() { // uncomment below and update the code to test the property breed - //var instane = new OpenApiPetstore.Dog(); + //var instance = new OpenApiPetstore.Dog(); //expect(instance).to.be(); }); diff --git a/samples/client/petstore/javascript-promise-es6/test/model/DogAllOf.spec.js b/samples/client/petstore/javascript-promise-es6/test/model/DogAllOf.spec.js index 767e3b0071b9..0bb726203a5f 100644 --- a/samples/client/petstore/javascript-promise-es6/test/model/DogAllOf.spec.js +++ b/samples/client/petstore/javascript-promise-es6/test/model/DogAllOf.spec.js @@ -50,13 +50,13 @@ describe('DogAllOf', function() { it('should create an instance of DogAllOf', function() { // uncomment below and update the code to test DogAllOf - //var instane = new OpenApiPetstore.DogAllOf(); + //var instance = new OpenApiPetstore.DogAllOf(); //expect(instance).to.be.a(OpenApiPetstore.DogAllOf); }); it('should have the property breed (base name: "breed")', function() { // uncomment below and update the code to test the property breed - //var instane = new OpenApiPetstore.DogAllOf(); + //var instance = new OpenApiPetstore.DogAllOf(); //expect(instance).to.be(); }); diff --git a/samples/client/petstore/javascript-promise-es6/test/model/EnumArrays.spec.js b/samples/client/petstore/javascript-promise-es6/test/model/EnumArrays.spec.js index d176bddbafd1..bda0e3bcf483 100644 --- a/samples/client/petstore/javascript-promise-es6/test/model/EnumArrays.spec.js +++ b/samples/client/petstore/javascript-promise-es6/test/model/EnumArrays.spec.js @@ -50,19 +50,19 @@ describe('EnumArrays', function() { it('should create an instance of EnumArrays', function() { // uncomment below and update the code to test EnumArrays - //var instane = new OpenApiPetstore.EnumArrays(); + //var instance = new OpenApiPetstore.EnumArrays(); //expect(instance).to.be.a(OpenApiPetstore.EnumArrays); }); it('should have the property justSymbol (base name: "just_symbol")', function() { // uncomment below and update the code to test the property justSymbol - //var instane = new OpenApiPetstore.EnumArrays(); + //var instance = new OpenApiPetstore.EnumArrays(); //expect(instance).to.be(); }); it('should have the property arrayEnum (base name: "array_enum")', function() { // uncomment below and update the code to test the property arrayEnum - //var instane = new OpenApiPetstore.EnumArrays(); + //var instance = new OpenApiPetstore.EnumArrays(); //expect(instance).to.be(); }); diff --git a/samples/client/petstore/javascript-promise-es6/test/model/EnumClass.spec.js b/samples/client/petstore/javascript-promise-es6/test/model/EnumClass.spec.js index 92ceee37ad30..31924e83d573 100644 --- a/samples/client/petstore/javascript-promise-es6/test/model/EnumClass.spec.js +++ b/samples/client/petstore/javascript-promise-es6/test/model/EnumClass.spec.js @@ -49,7 +49,7 @@ describe('EnumClass', function() { it('should create an instance of EnumClass', function() { // uncomment below and update the code to test EnumClass - //var instane = new OpenApiPetstore.EnumClass(); + //var instance = new OpenApiPetstore.EnumClass(); //expect(instance).to.be.a(OpenApiPetstore.EnumClass); }); diff --git a/samples/client/petstore/javascript-promise-es6/test/model/EnumTest.spec.js b/samples/client/petstore/javascript-promise-es6/test/model/EnumTest.spec.js index fdfd70a772ee..ee14bc9b9d5b 100644 --- a/samples/client/petstore/javascript-promise-es6/test/model/EnumTest.spec.js +++ b/samples/client/petstore/javascript-promise-es6/test/model/EnumTest.spec.js @@ -50,55 +50,55 @@ describe('EnumTest', function() { it('should create an instance of EnumTest', function() { // uncomment below and update the code to test EnumTest - //var instane = new OpenApiPetstore.EnumTest(); + //var instance = new OpenApiPetstore.EnumTest(); //expect(instance).to.be.a(OpenApiPetstore.EnumTest); }); it('should have the property enumString (base name: "enum_string")', function() { // uncomment below and update the code to test the property enumString - //var instane = new OpenApiPetstore.EnumTest(); + //var instance = new OpenApiPetstore.EnumTest(); //expect(instance).to.be(); }); it('should have the property enumStringRequired (base name: "enum_string_required")', function() { // uncomment below and update the code to test the property enumStringRequired - //var instane = new OpenApiPetstore.EnumTest(); + //var instance = new OpenApiPetstore.EnumTest(); //expect(instance).to.be(); }); it('should have the property enumInteger (base name: "enum_integer")', function() { // uncomment below and update the code to test the property enumInteger - //var instane = new OpenApiPetstore.EnumTest(); + //var instance = new OpenApiPetstore.EnumTest(); //expect(instance).to.be(); }); it('should have the property enumNumber (base name: "enum_number")', function() { // uncomment below and update the code to test the property enumNumber - //var instane = new OpenApiPetstore.EnumTest(); + //var instance = new OpenApiPetstore.EnumTest(); //expect(instance).to.be(); }); it('should have the property outerEnum (base name: "outerEnum")', function() { // uncomment below and update the code to test the property outerEnum - //var instane = new OpenApiPetstore.EnumTest(); + //var instance = new OpenApiPetstore.EnumTest(); //expect(instance).to.be(); }); it('should have the property outerEnumInteger (base name: "outerEnumInteger")', function() { // uncomment below and update the code to test the property outerEnumInteger - //var instane = new OpenApiPetstore.EnumTest(); + //var instance = new OpenApiPetstore.EnumTest(); //expect(instance).to.be(); }); it('should have the property outerEnumDefaultValue (base name: "outerEnumDefaultValue")', function() { // uncomment below and update the code to test the property outerEnumDefaultValue - //var instane = new OpenApiPetstore.EnumTest(); + //var instance = new OpenApiPetstore.EnumTest(); //expect(instance).to.be(); }); it('should have the property outerEnumIntegerDefaultValue (base name: "outerEnumIntegerDefaultValue")', function() { // uncomment below and update the code to test the property outerEnumIntegerDefaultValue - //var instane = new OpenApiPetstore.EnumTest(); + //var instance = new OpenApiPetstore.EnumTest(); //expect(instance).to.be(); }); diff --git a/samples/client/petstore/javascript-promise-es6/test/model/File.spec.js b/samples/client/petstore/javascript-promise-es6/test/model/File.spec.js index 4be82b5b488d..ac6fbb3de7a2 100644 --- a/samples/client/petstore/javascript-promise-es6/test/model/File.spec.js +++ b/samples/client/petstore/javascript-promise-es6/test/model/File.spec.js @@ -50,13 +50,13 @@ describe('File', function() { it('should create an instance of File', function() { // uncomment below and update the code to test File - //var instane = new OpenApiPetstore.File(); + //var instance = new OpenApiPetstore.File(); //expect(instance).to.be.a(OpenApiPetstore.File); }); it('should have the property sourceURI (base name: "sourceURI")', function() { // uncomment below and update the code to test the property sourceURI - //var instane = new OpenApiPetstore.File(); + //var instance = new OpenApiPetstore.File(); //expect(instance).to.be(); }); diff --git a/samples/client/petstore/javascript-promise-es6/test/model/FileSchemaTestClass.spec.js b/samples/client/petstore/javascript-promise-es6/test/model/FileSchemaTestClass.spec.js index 31c80909bff9..2f0090897223 100644 --- a/samples/client/petstore/javascript-promise-es6/test/model/FileSchemaTestClass.spec.js +++ b/samples/client/petstore/javascript-promise-es6/test/model/FileSchemaTestClass.spec.js @@ -50,19 +50,19 @@ describe('FileSchemaTestClass', function() { it('should create an instance of FileSchemaTestClass', function() { // uncomment below and update the code to test FileSchemaTestClass - //var instane = new OpenApiPetstore.FileSchemaTestClass(); + //var instance = new OpenApiPetstore.FileSchemaTestClass(); //expect(instance).to.be.a(OpenApiPetstore.FileSchemaTestClass); }); it('should have the property file (base name: "file")', function() { // uncomment below and update the code to test the property file - //var instane = new OpenApiPetstore.FileSchemaTestClass(); + //var instance = new OpenApiPetstore.FileSchemaTestClass(); //expect(instance).to.be(); }); it('should have the property files (base name: "files")', function() { // uncomment below and update the code to test the property files - //var instane = new OpenApiPetstore.FileSchemaTestClass(); + //var instance = new OpenApiPetstore.FileSchemaTestClass(); //expect(instance).to.be(); }); diff --git a/samples/client/petstore/javascript-promise-es6/test/model/Foo.spec.js b/samples/client/petstore/javascript-promise-es6/test/model/Foo.spec.js index 7460803792c8..81491fc42c9d 100644 --- a/samples/client/petstore/javascript-promise-es6/test/model/Foo.spec.js +++ b/samples/client/petstore/javascript-promise-es6/test/model/Foo.spec.js @@ -50,13 +50,13 @@ describe('Foo', function() { it('should create an instance of Foo', function() { // uncomment below and update the code to test Foo - //var instane = new OpenApiPetstore.Foo(); + //var instance = new OpenApiPetstore.Foo(); //expect(instance).to.be.a(OpenApiPetstore.Foo); }); it('should have the property bar (base name: "bar")', function() { // uncomment below and update the code to test the property bar - //var instane = new OpenApiPetstore.Foo(); + //var instance = new OpenApiPetstore.Foo(); //expect(instance).to.be(); }); diff --git a/samples/client/petstore/javascript-promise-es6/test/model/FormatTest.spec.js b/samples/client/petstore/javascript-promise-es6/test/model/FormatTest.spec.js index cdff66632dc7..6506a39d85fd 100644 --- a/samples/client/petstore/javascript-promise-es6/test/model/FormatTest.spec.js +++ b/samples/client/petstore/javascript-promise-es6/test/model/FormatTest.spec.js @@ -50,97 +50,103 @@ describe('FormatTest', function() { it('should create an instance of FormatTest', function() { // uncomment below and update the code to test FormatTest - //var instane = new OpenApiPetstore.FormatTest(); + //var instance = new OpenApiPetstore.FormatTest(); //expect(instance).to.be.a(OpenApiPetstore.FormatTest); }); it('should have the property integer (base name: "integer")', function() { // uncomment below and update the code to test the property integer - //var instane = new OpenApiPetstore.FormatTest(); + //var instance = new OpenApiPetstore.FormatTest(); //expect(instance).to.be(); }); it('should have the property int32 (base name: "int32")', function() { // uncomment below and update the code to test the property int32 - //var instane = new OpenApiPetstore.FormatTest(); + //var instance = new OpenApiPetstore.FormatTest(); //expect(instance).to.be(); }); it('should have the property int64 (base name: "int64")', function() { // uncomment below and update the code to test the property int64 - //var instane = new OpenApiPetstore.FormatTest(); + //var instance = new OpenApiPetstore.FormatTest(); //expect(instance).to.be(); }); - it('should have the property _number (base name: "number")', function() { - // uncomment below and update the code to test the property _number - //var instane = new OpenApiPetstore.FormatTest(); + it('should have the property number (base name: "number")', function() { + // uncomment below and update the code to test the property number + //var instance = new OpenApiPetstore.FormatTest(); //expect(instance).to.be(); }); it('should have the property _float (base name: "float")', function() { // uncomment below and update the code to test the property _float - //var instane = new OpenApiPetstore.FormatTest(); + //var instance = new OpenApiPetstore.FormatTest(); //expect(instance).to.be(); }); it('should have the property _double (base name: "double")', function() { // uncomment below and update the code to test the property _double - //var instane = new OpenApiPetstore.FormatTest(); + //var instance = new OpenApiPetstore.FormatTest(); //expect(instance).to.be(); }); - it('should have the property _string (base name: "string")', function() { - // uncomment below and update the code to test the property _string - //var instane = new OpenApiPetstore.FormatTest(); + it('should have the property decimal (base name: "decimal")', function() { + // uncomment below and update the code to test the property decimal + //var instance = new OpenApiPetstore.FormatTest(); + //expect(instance).to.be(); + }); + + it('should have the property string (base name: "string")', function() { + // uncomment below and update the code to test the property string + //var instance = new OpenApiPetstore.FormatTest(); //expect(instance).to.be(); }); it('should have the property _byte (base name: "byte")', function() { // uncomment below and update the code to test the property _byte - //var instane = new OpenApiPetstore.FormatTest(); + //var instance = new OpenApiPetstore.FormatTest(); //expect(instance).to.be(); }); it('should have the property binary (base name: "binary")', function() { // uncomment below and update the code to test the property binary - //var instane = new OpenApiPetstore.FormatTest(); + //var instance = new OpenApiPetstore.FormatTest(); //expect(instance).to.be(); }); - it('should have the property _date (base name: "date")', function() { - // uncomment below and update the code to test the property _date - //var instane = new OpenApiPetstore.FormatTest(); + it('should have the property date (base name: "date")', function() { + // uncomment below and update the code to test the property date + //var instance = new OpenApiPetstore.FormatTest(); //expect(instance).to.be(); }); it('should have the property dateTime (base name: "dateTime")', function() { // uncomment below and update the code to test the property dateTime - //var instane = new OpenApiPetstore.FormatTest(); + //var instance = new OpenApiPetstore.FormatTest(); //expect(instance).to.be(); }); it('should have the property uuid (base name: "uuid")', function() { // uncomment below and update the code to test the property uuid - //var instane = new OpenApiPetstore.FormatTest(); + //var instance = new OpenApiPetstore.FormatTest(); //expect(instance).to.be(); }); it('should have the property password (base name: "password")', function() { // uncomment below and update the code to test the property password - //var instane = new OpenApiPetstore.FormatTest(); + //var instance = new OpenApiPetstore.FormatTest(); //expect(instance).to.be(); }); it('should have the property patternWithDigits (base name: "pattern_with_digits")', function() { // uncomment below and update the code to test the property patternWithDigits - //var instane = new OpenApiPetstore.FormatTest(); + //var instance = new OpenApiPetstore.FormatTest(); //expect(instance).to.be(); }); it('should have the property patternWithDigitsAndDelimiter (base name: "pattern_with_digits_and_delimiter")', function() { // uncomment below and update the code to test the property patternWithDigitsAndDelimiter - //var instane = new OpenApiPetstore.FormatTest(); + //var instance = new OpenApiPetstore.FormatTest(); //expect(instance).to.be(); }); diff --git a/samples/client/petstore/javascript-promise-es6/test/model/HasOnlyReadOnly.spec.js b/samples/client/petstore/javascript-promise-es6/test/model/HasOnlyReadOnly.spec.js index 05235ef7b594..e9ba0be44fee 100644 --- a/samples/client/petstore/javascript-promise-es6/test/model/HasOnlyReadOnly.spec.js +++ b/samples/client/petstore/javascript-promise-es6/test/model/HasOnlyReadOnly.spec.js @@ -50,19 +50,19 @@ describe('HasOnlyReadOnly', function() { it('should create an instance of HasOnlyReadOnly', function() { // uncomment below and update the code to test HasOnlyReadOnly - //var instane = new OpenApiPetstore.HasOnlyReadOnly(); + //var instance = new OpenApiPetstore.HasOnlyReadOnly(); //expect(instance).to.be.a(OpenApiPetstore.HasOnlyReadOnly); }); it('should have the property bar (base name: "bar")', function() { // uncomment below and update the code to test the property bar - //var instane = new OpenApiPetstore.HasOnlyReadOnly(); + //var instance = new OpenApiPetstore.HasOnlyReadOnly(); //expect(instance).to.be(); }); it('should have the property foo (base name: "foo")', function() { // uncomment below and update the code to test the property foo - //var instane = new OpenApiPetstore.HasOnlyReadOnly(); + //var instance = new OpenApiPetstore.HasOnlyReadOnly(); //expect(instance).to.be(); }); diff --git a/samples/client/petstore/javascript-promise-es6/test/model/HealthCheckResult.spec.js b/samples/client/petstore/javascript-promise-es6/test/model/HealthCheckResult.spec.js index 7399370b1461..25d9ecd929f0 100644 --- a/samples/client/petstore/javascript-promise-es6/test/model/HealthCheckResult.spec.js +++ b/samples/client/petstore/javascript-promise-es6/test/model/HealthCheckResult.spec.js @@ -50,13 +50,13 @@ describe('HealthCheckResult', function() { it('should create an instance of HealthCheckResult', function() { // uncomment below and update the code to test HealthCheckResult - //var instane = new OpenApiPetstore.HealthCheckResult(); + //var instance = new OpenApiPetstore.HealthCheckResult(); //expect(instance).to.be.a(OpenApiPetstore.HealthCheckResult); }); it('should have the property nullableMessage (base name: "NullableMessage")', function() { // uncomment below and update the code to test the property nullableMessage - //var instane = new OpenApiPetstore.HealthCheckResult(); + //var instance = new OpenApiPetstore.HealthCheckResult(); //expect(instance).to.be(); }); diff --git a/samples/client/petstore/javascript-promise-es6/test/model/List.spec.js b/samples/client/petstore/javascript-promise-es6/test/model/List.spec.js index 7609a9420d1a..675aa82c185c 100644 --- a/samples/client/petstore/javascript-promise-es6/test/model/List.spec.js +++ b/samples/client/petstore/javascript-promise-es6/test/model/List.spec.js @@ -50,13 +50,13 @@ describe('List', function() { it('should create an instance of List', function() { // uncomment below and update the code to test List - //var instane = new OpenApiPetstore.List(); + //var instance = new OpenApiPetstore.List(); //expect(instance).to.be.a(OpenApiPetstore.List); }); it('should have the property _123list (base name: "123-list")', function() { // uncomment below and update the code to test the property _123list - //var instane = new OpenApiPetstore.List(); + //var instance = new OpenApiPetstore.List(); //expect(instance).to.be(); }); diff --git a/samples/client/petstore/javascript-promise-es6/test/model/MapTest.spec.js b/samples/client/petstore/javascript-promise-es6/test/model/MapTest.spec.js index 9b1016b7cc69..4e7dabcc2137 100644 --- a/samples/client/petstore/javascript-promise-es6/test/model/MapTest.spec.js +++ b/samples/client/petstore/javascript-promise-es6/test/model/MapTest.spec.js @@ -50,31 +50,31 @@ describe('MapTest', function() { it('should create an instance of MapTest', function() { // uncomment below and update the code to test MapTest - //var instane = new OpenApiPetstore.MapTest(); + //var instance = new OpenApiPetstore.MapTest(); //expect(instance).to.be.a(OpenApiPetstore.MapTest); }); it('should have the property mapMapOfString (base name: "map_map_of_string")', function() { // uncomment below and update the code to test the property mapMapOfString - //var instane = new OpenApiPetstore.MapTest(); + //var instance = new OpenApiPetstore.MapTest(); //expect(instance).to.be(); }); it('should have the property mapOfEnumString (base name: "map_of_enum_string")', function() { // uncomment below and update the code to test the property mapOfEnumString - //var instane = new OpenApiPetstore.MapTest(); + //var instance = new OpenApiPetstore.MapTest(); //expect(instance).to.be(); }); it('should have the property directMap (base name: "direct_map")', function() { // uncomment below and update the code to test the property directMap - //var instane = new OpenApiPetstore.MapTest(); + //var instance = new OpenApiPetstore.MapTest(); //expect(instance).to.be(); }); it('should have the property indirectMap (base name: "indirect_map")', function() { // uncomment below and update the code to test the property indirectMap - //var instane = new OpenApiPetstore.MapTest(); + //var instance = new OpenApiPetstore.MapTest(); //expect(instance).to.be(); }); diff --git a/samples/client/petstore/javascript-promise-es6/test/model/MixedPropertiesAndAdditionalPropertiesClass.spec.js b/samples/client/petstore/javascript-promise-es6/test/model/MixedPropertiesAndAdditionalPropertiesClass.spec.js index 60243bf3892a..2e72316a90a2 100644 --- a/samples/client/petstore/javascript-promise-es6/test/model/MixedPropertiesAndAdditionalPropertiesClass.spec.js +++ b/samples/client/petstore/javascript-promise-es6/test/model/MixedPropertiesAndAdditionalPropertiesClass.spec.js @@ -50,25 +50,25 @@ describe('MixedPropertiesAndAdditionalPropertiesClass', function() { it('should create an instance of MixedPropertiesAndAdditionalPropertiesClass', function() { // uncomment below and update the code to test MixedPropertiesAndAdditionalPropertiesClass - //var instane = new OpenApiPetstore.MixedPropertiesAndAdditionalPropertiesClass(); + //var instance = new OpenApiPetstore.MixedPropertiesAndAdditionalPropertiesClass(); //expect(instance).to.be.a(OpenApiPetstore.MixedPropertiesAndAdditionalPropertiesClass); }); it('should have the property uuid (base name: "uuid")', function() { // uncomment below and update the code to test the property uuid - //var instane = new OpenApiPetstore.MixedPropertiesAndAdditionalPropertiesClass(); + //var instance = new OpenApiPetstore.MixedPropertiesAndAdditionalPropertiesClass(); //expect(instance).to.be(); }); it('should have the property dateTime (base name: "dateTime")', function() { // uncomment below and update the code to test the property dateTime - //var instane = new OpenApiPetstore.MixedPropertiesAndAdditionalPropertiesClass(); + //var instance = new OpenApiPetstore.MixedPropertiesAndAdditionalPropertiesClass(); //expect(instance).to.be(); }); it('should have the property map (base name: "map")', function() { // uncomment below and update the code to test the property map - //var instane = new OpenApiPetstore.MixedPropertiesAndAdditionalPropertiesClass(); + //var instance = new OpenApiPetstore.MixedPropertiesAndAdditionalPropertiesClass(); //expect(instance).to.be(); }); diff --git a/samples/client/petstore/javascript-promise-es6/test/model/Model200Response.spec.js b/samples/client/petstore/javascript-promise-es6/test/model/Model200Response.spec.js index f966a55a5b26..7cd4da5e51e2 100644 --- a/samples/client/petstore/javascript-promise-es6/test/model/Model200Response.spec.js +++ b/samples/client/petstore/javascript-promise-es6/test/model/Model200Response.spec.js @@ -50,19 +50,19 @@ describe('Model200Response', function() { it('should create an instance of Model200Response', function() { // uncomment below and update the code to test Model200Response - //var instane = new OpenApiPetstore.Model200Response(); + //var instance = new OpenApiPetstore.Model200Response(); //expect(instance).to.be.a(OpenApiPetstore.Model200Response); }); it('should have the property name (base name: "name")', function() { // uncomment below and update the code to test the property name - //var instane = new OpenApiPetstore.Model200Response(); + //var instance = new OpenApiPetstore.Model200Response(); //expect(instance).to.be(); }); it('should have the property _class (base name: "class")', function() { // uncomment below and update the code to test the property _class - //var instane = new OpenApiPetstore.Model200Response(); + //var instance = new OpenApiPetstore.Model200Response(); //expect(instance).to.be(); }); diff --git a/samples/client/petstore/javascript-promise-es6/test/model/Name.spec.js b/samples/client/petstore/javascript-promise-es6/test/model/Name.spec.js index feed4e8f2906..a88057711f2b 100644 --- a/samples/client/petstore/javascript-promise-es6/test/model/Name.spec.js +++ b/samples/client/petstore/javascript-promise-es6/test/model/Name.spec.js @@ -50,31 +50,31 @@ describe('Name', function() { it('should create an instance of Name', function() { // uncomment below and update the code to test Name - //var instane = new OpenApiPetstore.Name(); + //var instance = new OpenApiPetstore.Name(); //expect(instance).to.be.a(OpenApiPetstore.Name); }); it('should have the property name (base name: "name")', function() { // uncomment below and update the code to test the property name - //var instane = new OpenApiPetstore.Name(); + //var instance = new OpenApiPetstore.Name(); //expect(instance).to.be(); }); it('should have the property snakeCase (base name: "snake_case")', function() { // uncomment below and update the code to test the property snakeCase - //var instane = new OpenApiPetstore.Name(); + //var instance = new OpenApiPetstore.Name(); //expect(instance).to.be(); }); it('should have the property property (base name: "property")', function() { // uncomment below and update the code to test the property property - //var instane = new OpenApiPetstore.Name(); + //var instance = new OpenApiPetstore.Name(); //expect(instance).to.be(); }); it('should have the property _123number (base name: "123Number")', function() { // uncomment below and update the code to test the property _123number - //var instane = new OpenApiPetstore.Name(); + //var instance = new OpenApiPetstore.Name(); //expect(instance).to.be(); }); diff --git a/samples/client/petstore/javascript-promise-es6/test/model/NullableClass.spec.js b/samples/client/petstore/javascript-promise-es6/test/model/NullableClass.spec.js index 89cd2821d42b..602a172777f0 100644 --- a/samples/client/petstore/javascript-promise-es6/test/model/NullableClass.spec.js +++ b/samples/client/petstore/javascript-promise-es6/test/model/NullableClass.spec.js @@ -50,79 +50,79 @@ describe('NullableClass', function() { it('should create an instance of NullableClass', function() { // uncomment below and update the code to test NullableClass - //var instane = new OpenApiPetstore.NullableClass(); + //var instance = new OpenApiPetstore.NullableClass(); //expect(instance).to.be.a(OpenApiPetstore.NullableClass); }); it('should have the property integerProp (base name: "integer_prop")', function() { // uncomment below and update the code to test the property integerProp - //var instane = new OpenApiPetstore.NullableClass(); + //var instance = new OpenApiPetstore.NullableClass(); //expect(instance).to.be(); }); it('should have the property numberProp (base name: "number_prop")', function() { // uncomment below and update the code to test the property numberProp - //var instane = new OpenApiPetstore.NullableClass(); + //var instance = new OpenApiPetstore.NullableClass(); //expect(instance).to.be(); }); it('should have the property booleanProp (base name: "boolean_prop")', function() { // uncomment below and update the code to test the property booleanProp - //var instane = new OpenApiPetstore.NullableClass(); + //var instance = new OpenApiPetstore.NullableClass(); //expect(instance).to.be(); }); it('should have the property stringProp (base name: "string_prop")', function() { // uncomment below and update the code to test the property stringProp - //var instane = new OpenApiPetstore.NullableClass(); + //var instance = new OpenApiPetstore.NullableClass(); //expect(instance).to.be(); }); it('should have the property dateProp (base name: "date_prop")', function() { // uncomment below and update the code to test the property dateProp - //var instane = new OpenApiPetstore.NullableClass(); + //var instance = new OpenApiPetstore.NullableClass(); //expect(instance).to.be(); }); it('should have the property datetimeProp (base name: "datetime_prop")', function() { // uncomment below and update the code to test the property datetimeProp - //var instane = new OpenApiPetstore.NullableClass(); + //var instance = new OpenApiPetstore.NullableClass(); //expect(instance).to.be(); }); it('should have the property arrayNullableProp (base name: "array_nullable_prop")', function() { // uncomment below and update the code to test the property arrayNullableProp - //var instane = new OpenApiPetstore.NullableClass(); + //var instance = new OpenApiPetstore.NullableClass(); //expect(instance).to.be(); }); it('should have the property arrayAndItemsNullableProp (base name: "array_and_items_nullable_prop")', function() { // uncomment below and update the code to test the property arrayAndItemsNullableProp - //var instane = new OpenApiPetstore.NullableClass(); + //var instance = new OpenApiPetstore.NullableClass(); //expect(instance).to.be(); }); it('should have the property arrayItemsNullable (base name: "array_items_nullable")', function() { // uncomment below and update the code to test the property arrayItemsNullable - //var instane = new OpenApiPetstore.NullableClass(); + //var instance = new OpenApiPetstore.NullableClass(); //expect(instance).to.be(); }); it('should have the property objectNullableProp (base name: "object_nullable_prop")', function() { // uncomment below and update the code to test the property objectNullableProp - //var instane = new OpenApiPetstore.NullableClass(); + //var instance = new OpenApiPetstore.NullableClass(); //expect(instance).to.be(); }); it('should have the property objectAndItemsNullableProp (base name: "object_and_items_nullable_prop")', function() { // uncomment below and update the code to test the property objectAndItemsNullableProp - //var instane = new OpenApiPetstore.NullableClass(); + //var instance = new OpenApiPetstore.NullableClass(); //expect(instance).to.be(); }); it('should have the property objectItemsNullable (base name: "object_items_nullable")', function() { // uncomment below and update the code to test the property objectItemsNullable - //var instane = new OpenApiPetstore.NullableClass(); + //var instance = new OpenApiPetstore.NullableClass(); //expect(instance).to.be(); }); diff --git a/samples/client/petstore/javascript-promise-es6/test/model/NumberOnly.spec.js b/samples/client/petstore/javascript-promise-es6/test/model/NumberOnly.spec.js index cbbd3d6124c5..a39e26134eda 100644 --- a/samples/client/petstore/javascript-promise-es6/test/model/NumberOnly.spec.js +++ b/samples/client/petstore/javascript-promise-es6/test/model/NumberOnly.spec.js @@ -50,13 +50,13 @@ describe('NumberOnly', function() { it('should create an instance of NumberOnly', function() { // uncomment below and update the code to test NumberOnly - //var instane = new OpenApiPetstore.NumberOnly(); + //var instance = new OpenApiPetstore.NumberOnly(); //expect(instance).to.be.a(OpenApiPetstore.NumberOnly); }); it('should have the property justNumber (base name: "JustNumber")', function() { // uncomment below and update the code to test the property justNumber - //var instane = new OpenApiPetstore.NumberOnly(); + //var instance = new OpenApiPetstore.NumberOnly(); //expect(instance).to.be(); }); diff --git a/samples/client/petstore/javascript-promise-es6/test/model/ObjectWithDeprecatedFields.spec.js b/samples/client/petstore/javascript-promise-es6/test/model/ObjectWithDeprecatedFields.spec.js index 11a78dce681f..b190adcca3fd 100644 --- a/samples/client/petstore/javascript-promise-es6/test/model/ObjectWithDeprecatedFields.spec.js +++ b/samples/client/petstore/javascript-promise-es6/test/model/ObjectWithDeprecatedFields.spec.js @@ -50,7 +50,7 @@ describe('ObjectWithDeprecatedFields', function() { it('should create an instance of ObjectWithDeprecatedFields', function() { // uncomment below and update the code to test ObjectWithDeprecatedFields - //var instane = new OpenApiPetstore.ObjectWithDeprecatedFields(); + //var instance = new OpenApiPetstore.ObjectWithDeprecatedFields(); //expect(instance).to.be.a(OpenApiPetstore.ObjectWithDeprecatedFields); }); diff --git a/samples/client/petstore/javascript-promise-es6/test/model/Order.spec.js b/samples/client/petstore/javascript-promise-es6/test/model/Order.spec.js index b3e2b5a47167..88564e2bc626 100644 --- a/samples/client/petstore/javascript-promise-es6/test/model/Order.spec.js +++ b/samples/client/petstore/javascript-promise-es6/test/model/Order.spec.js @@ -50,43 +50,43 @@ describe('Order', function() { it('should create an instance of Order', function() { // uncomment below and update the code to test Order - //var instane = new OpenApiPetstore.Order(); + //var instance = new OpenApiPetstore.Order(); //expect(instance).to.be.a(OpenApiPetstore.Order); }); it('should have the property id (base name: "id")', function() { // uncomment below and update the code to test the property id - //var instane = new OpenApiPetstore.Order(); + //var instance = new OpenApiPetstore.Order(); //expect(instance).to.be(); }); it('should have the property petId (base name: "petId")', function() { // uncomment below and update the code to test the property petId - //var instane = new OpenApiPetstore.Order(); + //var instance = new OpenApiPetstore.Order(); //expect(instance).to.be(); }); it('should have the property quantity (base name: "quantity")', function() { // uncomment below and update the code to test the property quantity - //var instane = new OpenApiPetstore.Order(); + //var instance = new OpenApiPetstore.Order(); //expect(instance).to.be(); }); it('should have the property shipDate (base name: "shipDate")', function() { // uncomment below and update the code to test the property shipDate - //var instane = new OpenApiPetstore.Order(); + //var instance = new OpenApiPetstore.Order(); //expect(instance).to.be(); }); it('should have the property status (base name: "status")', function() { // uncomment below and update the code to test the property status - //var instane = new OpenApiPetstore.Order(); + //var instance = new OpenApiPetstore.Order(); //expect(instance).to.be(); }); it('should have the property complete (base name: "complete")', function() { // uncomment below and update the code to test the property complete - //var instane = new OpenApiPetstore.Order(); + //var instance = new OpenApiPetstore.Order(); //expect(instance).to.be(); }); diff --git a/samples/client/petstore/javascript-promise-es6/test/model/OuterComposite.spec.js b/samples/client/petstore/javascript-promise-es6/test/model/OuterComposite.spec.js index 7f772d8c3745..1ef9599b2dc6 100644 --- a/samples/client/petstore/javascript-promise-es6/test/model/OuterComposite.spec.js +++ b/samples/client/petstore/javascript-promise-es6/test/model/OuterComposite.spec.js @@ -50,25 +50,25 @@ describe('OuterComposite', function() { it('should create an instance of OuterComposite', function() { // uncomment below and update the code to test OuterComposite - //var instane = new OpenApiPetstore.OuterComposite(); + //var instance = new OpenApiPetstore.OuterComposite(); //expect(instance).to.be.a(OpenApiPetstore.OuterComposite); }); it('should have the property myNumber (base name: "my_number")', function() { // uncomment below and update the code to test the property myNumber - //var instane = new OpenApiPetstore.OuterComposite(); + //var instance = new OpenApiPetstore.OuterComposite(); //expect(instance).to.be(); }); it('should have the property myString (base name: "my_string")', function() { // uncomment below and update the code to test the property myString - //var instane = new OpenApiPetstore.OuterComposite(); + //var instance = new OpenApiPetstore.OuterComposite(); //expect(instance).to.be(); }); it('should have the property myBoolean (base name: "my_boolean")', function() { // uncomment below and update the code to test the property myBoolean - //var instane = new OpenApiPetstore.OuterComposite(); + //var instance = new OpenApiPetstore.OuterComposite(); //expect(instance).to.be(); }); diff --git a/samples/client/petstore/javascript-promise-es6/test/model/OuterEnum.spec.js b/samples/client/petstore/javascript-promise-es6/test/model/OuterEnum.spec.js index f5ec4089cc1f..16e8d6147932 100644 --- a/samples/client/petstore/javascript-promise-es6/test/model/OuterEnum.spec.js +++ b/samples/client/petstore/javascript-promise-es6/test/model/OuterEnum.spec.js @@ -49,7 +49,7 @@ describe('OuterEnum', function() { it('should create an instance of OuterEnum', function() { // uncomment below and update the code to test OuterEnum - //var instane = new OpenApiPetstore.OuterEnum(); + //var instance = new OpenApiPetstore.OuterEnum(); //expect(instance).to.be.a(OpenApiPetstore.OuterEnum); }); diff --git a/samples/client/petstore/javascript-promise-es6/test/model/OuterEnumDefaultValue.spec.js b/samples/client/petstore/javascript-promise-es6/test/model/OuterEnumDefaultValue.spec.js index 9da972203e12..213f8de637ff 100644 --- a/samples/client/petstore/javascript-promise-es6/test/model/OuterEnumDefaultValue.spec.js +++ b/samples/client/petstore/javascript-promise-es6/test/model/OuterEnumDefaultValue.spec.js @@ -49,7 +49,7 @@ describe('OuterEnumDefaultValue', function() { it('should create an instance of OuterEnumDefaultValue', function() { // uncomment below and update the code to test OuterEnumDefaultValue - //var instane = new OpenApiPetstore.OuterEnumDefaultValue(); + //var instance = new OpenApiPetstore.OuterEnumDefaultValue(); //expect(instance).to.be.a(OpenApiPetstore.OuterEnumDefaultValue); }); diff --git a/samples/client/petstore/javascript-promise-es6/test/model/OuterEnumInteger.spec.js b/samples/client/petstore/javascript-promise-es6/test/model/OuterEnumInteger.spec.js index 196da96a8da8..50c8b78c5f73 100644 --- a/samples/client/petstore/javascript-promise-es6/test/model/OuterEnumInteger.spec.js +++ b/samples/client/petstore/javascript-promise-es6/test/model/OuterEnumInteger.spec.js @@ -49,7 +49,7 @@ describe('OuterEnumInteger', function() { it('should create an instance of OuterEnumInteger', function() { // uncomment below and update the code to test OuterEnumInteger - //var instane = new OpenApiPetstore.OuterEnumInteger(); + //var instance = new OpenApiPetstore.OuterEnumInteger(); //expect(instance).to.be.a(OpenApiPetstore.OuterEnumInteger); }); diff --git a/samples/client/petstore/javascript-promise-es6/test/model/OuterEnumIntegerDefaultValue.spec.js b/samples/client/petstore/javascript-promise-es6/test/model/OuterEnumIntegerDefaultValue.spec.js index 24829ac61213..af3dab311961 100644 --- a/samples/client/petstore/javascript-promise-es6/test/model/OuterEnumIntegerDefaultValue.spec.js +++ b/samples/client/petstore/javascript-promise-es6/test/model/OuterEnumIntegerDefaultValue.spec.js @@ -49,7 +49,7 @@ describe('OuterEnumIntegerDefaultValue', function() { it('should create an instance of OuterEnumIntegerDefaultValue', function() { // uncomment below and update the code to test OuterEnumIntegerDefaultValue - //var instane = new OpenApiPetstore.OuterEnumIntegerDefaultValue(); + //var instance = new OpenApiPetstore.OuterEnumIntegerDefaultValue(); //expect(instance).to.be.a(OpenApiPetstore.OuterEnumIntegerDefaultValue); }); diff --git a/samples/client/petstore/javascript-promise-es6/test/model/OuterObjectWithEnumProperty.spec.js b/samples/client/petstore/javascript-promise-es6/test/model/OuterObjectWithEnumProperty.spec.js index ea94c61358eb..9f7afbfd3977 100644 --- a/samples/client/petstore/javascript-promise-es6/test/model/OuterObjectWithEnumProperty.spec.js +++ b/samples/client/petstore/javascript-promise-es6/test/model/OuterObjectWithEnumProperty.spec.js @@ -50,7 +50,7 @@ describe('OuterObjectWithEnumProperty', function() { it('should create an instance of OuterObjectWithEnumProperty', function() { // uncomment below and update the code to test OuterObjectWithEnumProperty - //var instane = new OpenApiPetstore.OuterObjectWithEnumProperty(); + //var instance = new OpenApiPetstore.OuterObjectWithEnumProperty(); //expect(instance).to.be.a(OpenApiPetstore.OuterObjectWithEnumProperty); }); diff --git a/samples/client/petstore/javascript-promise-es6/test/model/Pet.spec.js b/samples/client/petstore/javascript-promise-es6/test/model/Pet.spec.js index f33470481f10..7b2f4cf121a0 100644 --- a/samples/client/petstore/javascript-promise-es6/test/model/Pet.spec.js +++ b/samples/client/petstore/javascript-promise-es6/test/model/Pet.spec.js @@ -50,43 +50,43 @@ describe('Pet', function() { it('should create an instance of Pet', function() { // uncomment below and update the code to test Pet - //var instane = new OpenApiPetstore.Pet(); + //var instance = new OpenApiPetstore.Pet(); //expect(instance).to.be.a(OpenApiPetstore.Pet); }); it('should have the property id (base name: "id")', function() { // uncomment below and update the code to test the property id - //var instane = new OpenApiPetstore.Pet(); + //var instance = new OpenApiPetstore.Pet(); //expect(instance).to.be(); }); it('should have the property category (base name: "category")', function() { // uncomment below and update the code to test the property category - //var instane = new OpenApiPetstore.Pet(); + //var instance = new OpenApiPetstore.Pet(); //expect(instance).to.be(); }); it('should have the property name (base name: "name")', function() { // uncomment below and update the code to test the property name - //var instane = new OpenApiPetstore.Pet(); + //var instance = new OpenApiPetstore.Pet(); //expect(instance).to.be(); }); it('should have the property photoUrls (base name: "photoUrls")', function() { // uncomment below and update the code to test the property photoUrls - //var instane = new OpenApiPetstore.Pet(); + //var instance = new OpenApiPetstore.Pet(); //expect(instance).to.be(); }); it('should have the property tags (base name: "tags")', function() { // uncomment below and update the code to test the property tags - //var instane = new OpenApiPetstore.Pet(); + //var instance = new OpenApiPetstore.Pet(); //expect(instance).to.be(); }); it('should have the property status (base name: "status")', function() { // uncomment below and update the code to test the property status - //var instane = new OpenApiPetstore.Pet(); + //var instance = new OpenApiPetstore.Pet(); //expect(instance).to.be(); }); diff --git a/samples/client/petstore/javascript-promise-es6/test/model/ReadOnlyFirst.spec.js b/samples/client/petstore/javascript-promise-es6/test/model/ReadOnlyFirst.spec.js index 7584840104a6..a9be118d2f2d 100644 --- a/samples/client/petstore/javascript-promise-es6/test/model/ReadOnlyFirst.spec.js +++ b/samples/client/petstore/javascript-promise-es6/test/model/ReadOnlyFirst.spec.js @@ -50,19 +50,19 @@ describe('ReadOnlyFirst', function() { it('should create an instance of ReadOnlyFirst', function() { // uncomment below and update the code to test ReadOnlyFirst - //var instane = new OpenApiPetstore.ReadOnlyFirst(); + //var instance = new OpenApiPetstore.ReadOnlyFirst(); //expect(instance).to.be.a(OpenApiPetstore.ReadOnlyFirst); }); it('should have the property bar (base name: "bar")', function() { // uncomment below and update the code to test the property bar - //var instane = new OpenApiPetstore.ReadOnlyFirst(); + //var instance = new OpenApiPetstore.ReadOnlyFirst(); //expect(instance).to.be(); }); it('should have the property baz (base name: "baz")', function() { // uncomment below and update the code to test the property baz - //var instane = new OpenApiPetstore.ReadOnlyFirst(); + //var instance = new OpenApiPetstore.ReadOnlyFirst(); //expect(instance).to.be(); }); diff --git a/samples/client/petstore/javascript-promise-es6/test/model/Return.spec.js b/samples/client/petstore/javascript-promise-es6/test/model/Return.spec.js index 94aa449c2788..75aae37c745d 100644 --- a/samples/client/petstore/javascript-promise-es6/test/model/Return.spec.js +++ b/samples/client/petstore/javascript-promise-es6/test/model/Return.spec.js @@ -50,7 +50,7 @@ describe('Return', function() { it('should create an instance of Return', function() { // uncomment below and update the code to test Return - //var instane = new OpenApiPetstore.Return(); + //var instance = new OpenApiPetstore.Return(); //expect(instance).to.be.a(OpenApiPetstore.Return); }); diff --git a/samples/client/petstore/javascript-promise-es6/test/model/SingleRefType.spec.js b/samples/client/petstore/javascript-promise-es6/test/model/SingleRefType.spec.js deleted file mode 100644 index c0bbb3c018a1..000000000000 --- a/samples/client/petstore/javascript-promise-es6/test/model/SingleRefType.spec.js +++ /dev/null @@ -1,58 +0,0 @@ -/** - * OpenAPI Petstore - * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ - * - * The version of the OpenAPI document: 1.0.0 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - * - */ - -(function(root, factory) { - if (typeof define === 'function' && define.amd) { - // AMD. - define(['expect.js', process.cwd()+'/src/index'], factory); - } else if (typeof module === 'object' && module.exports) { - // CommonJS-like environments that support module.exports, like Node. - factory(require('expect.js'), require(process.cwd()+'/src/index')); - } else { - // Browser globals (root is window) - factory(root.expect, root.OpenApiPetstore); - } -}(this, function(expect, OpenApiPetstore) { - 'use strict'; - - var instance; - - beforeEach(function() { - }); - - var getProperty = function(object, getter, property) { - // Use getter method if present; otherwise, get the property directly. - if (typeof object[getter] === 'function') - return object[getter](); - else - return object[property]; - } - - var setProperty = function(object, setter, property, value) { - // Use setter method if present; otherwise, set the property directly. - if (typeof object[setter] === 'function') - object[setter](value); - else - object[property] = value; - } - - describe('SingleRefType', function() { - it('should create an instance of SingleRefType', function() { - // uncomment below and update the code to test SingleRefType - //var instance = new OpenApiPetstore.SingleRefType(); - //expect(instance).to.be.a(OpenApiPetstore.SingleRefType); - }); - - }); - -})); diff --git a/samples/client/petstore/javascript-promise-es6/test/model/SpecialModelName.spec.js b/samples/client/petstore/javascript-promise-es6/test/model/SpecialModelName.spec.js index 7cd283fa5423..8b6e95c76f5d 100644 --- a/samples/client/petstore/javascript-promise-es6/test/model/SpecialModelName.spec.js +++ b/samples/client/petstore/javascript-promise-es6/test/model/SpecialModelName.spec.js @@ -50,13 +50,13 @@ describe('SpecialModelName', function() { it('should create an instance of SpecialModelName', function() { // uncomment below and update the code to test SpecialModelName - //var instane = new OpenApiPetstore.SpecialModelName(); + //var instance = new OpenApiPetstore.SpecialModelName(); //expect(instance).to.be.a(OpenApiPetstore.SpecialModelName); }); it('should have the property specialPropertyName (base name: "$special[property.name]")', function() { // uncomment below and update the code to test the property specialPropertyName - //var instane = new OpenApiPetstore.SpecialModelName(); + //var instance = new OpenApiPetstore.SpecialModelName(); //expect(instance).to.be(); }); diff --git a/samples/client/petstore/javascript-promise-es6/test/model/Tag.spec.js b/samples/client/petstore/javascript-promise-es6/test/model/Tag.spec.js index 749022dc3854..7832664c4f02 100644 --- a/samples/client/petstore/javascript-promise-es6/test/model/Tag.spec.js +++ b/samples/client/petstore/javascript-promise-es6/test/model/Tag.spec.js @@ -50,19 +50,19 @@ describe('Tag', function() { it('should create an instance of Tag', function() { // uncomment below and update the code to test Tag - //var instane = new OpenApiPetstore.Tag(); + //var instance = new OpenApiPetstore.Tag(); //expect(instance).to.be.a(OpenApiPetstore.Tag); }); it('should have the property id (base name: "id")', function() { // uncomment below and update the code to test the property id - //var instane = new OpenApiPetstore.Tag(); + //var instance = new OpenApiPetstore.Tag(); //expect(instance).to.be(); }); it('should have the property name (base name: "name")', function() { // uncomment below and update the code to test the property name - //var instane = new OpenApiPetstore.Tag(); + //var instance = new OpenApiPetstore.Tag(); //expect(instance).to.be(); }); diff --git a/samples/client/petstore/javascript-promise-es6/test/model/User.spec.js b/samples/client/petstore/javascript-promise-es6/test/model/User.spec.js index fb24f42d1a2a..44d541dc64d3 100644 --- a/samples/client/petstore/javascript-promise-es6/test/model/User.spec.js +++ b/samples/client/petstore/javascript-promise-es6/test/model/User.spec.js @@ -50,55 +50,55 @@ describe('User', function() { it('should create an instance of User', function() { // uncomment below and update the code to test User - //var instane = new OpenApiPetstore.User(); + //var instance = new OpenApiPetstore.User(); //expect(instance).to.be.a(OpenApiPetstore.User); }); it('should have the property id (base name: "id")', function() { // uncomment below and update the code to test the property id - //var instane = new OpenApiPetstore.User(); + //var instance = new OpenApiPetstore.User(); //expect(instance).to.be(); }); it('should have the property username (base name: "username")', function() { // uncomment below and update the code to test the property username - //var instane = new OpenApiPetstore.User(); + //var instance = new OpenApiPetstore.User(); //expect(instance).to.be(); }); it('should have the property firstName (base name: "firstName")', function() { // uncomment below and update the code to test the property firstName - //var instane = new OpenApiPetstore.User(); + //var instance = new OpenApiPetstore.User(); //expect(instance).to.be(); }); it('should have the property lastName (base name: "lastName")', function() { // uncomment below and update the code to test the property lastName - //var instane = new OpenApiPetstore.User(); + //var instance = new OpenApiPetstore.User(); //expect(instance).to.be(); }); it('should have the property email (base name: "email")', function() { // uncomment below and update the code to test the property email - //var instane = new OpenApiPetstore.User(); + //var instance = new OpenApiPetstore.User(); //expect(instance).to.be(); }); it('should have the property password (base name: "password")', function() { // uncomment below and update the code to test the property password - //var instane = new OpenApiPetstore.User(); + //var instance = new OpenApiPetstore.User(); //expect(instance).to.be(); }); it('should have the property phone (base name: "phone")', function() { // uncomment below and update the code to test the property phone - //var instane = new OpenApiPetstore.User(); + //var instance = new OpenApiPetstore.User(); //expect(instance).to.be(); }); it('should have the property userStatus (base name: "userStatus")', function() { // uncomment below and update the code to test the property userStatus - //var instane = new OpenApiPetstore.User(); + //var instance = new OpenApiPetstore.User(); //expect(instance).to.be(); }); From 193aa32bd95943ecb498e4983b448dadbb6f80f0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jo=C3=A3o=20Neto?= Date: Fri, 26 Aug 2022 23:23:41 +0200 Subject: [PATCH 23/23] update samples --- .../.openapi-generator/FILES | 54 ------------------- .../javascript-es6/.openapi-generator/FILES | 54 ------------------- .../.openapi-generator/FILES | 54 ------------------- 3 files changed, 162 deletions(-) diff --git a/samples/client/petstore/javascript-apollo/.openapi-generator/FILES b/samples/client/petstore/javascript-apollo/.openapi-generator/FILES index b05863cb83d6..0440bb2716cb 100644 --- a/samples/client/petstore/javascript-apollo/.openapi-generator/FILES +++ b/samples/client/petstore/javascript-apollo/.openapi-generator/FILES @@ -1,6 +1,5 @@ .babelrc .gitignore -.openapi-generator-ignore .travis.yml README.md docs/AdditionalPropertiesClass.md @@ -114,56 +113,3 @@ src/model/Return.js src/model/SpecialModelName.js src/model/Tag.js src/model/User.js -test/api/AnotherFakeApi.spec.js -test/api/DefaultApi.spec.js -test/api/FakeApi.spec.js -test/api/FakeClassnameTags123Api.spec.js -test/api/PetApi.spec.js -test/api/StoreApi.spec.js -test/api/UserApi.spec.js -test/model/AdditionalPropertiesClass.spec.js -test/model/Animal.spec.js -test/model/ApiResponse.spec.js -test/model/ArrayOfArrayOfNumberOnly.spec.js -test/model/ArrayOfNumberOnly.spec.js -test/model/ArrayTest.spec.js -test/model/Capitalization.spec.js -test/model/Cat.spec.js -test/model/CatAllOf.spec.js -test/model/Category.spec.js -test/model/ClassModel.spec.js -test/model/Client.spec.js -test/model/DeprecatedObject.spec.js -test/model/Dog.spec.js -test/model/DogAllOf.spec.js -test/model/EnumArrays.spec.js -test/model/EnumClass.spec.js -test/model/EnumTest.spec.js -test/model/File.spec.js -test/model/FileSchemaTestClass.spec.js -test/model/Foo.spec.js -test/model/FooGetDefaultResponse.spec.js -test/model/FormatTest.spec.js -test/model/HasOnlyReadOnly.spec.js -test/model/HealthCheckResult.spec.js -test/model/List.spec.js -test/model/MapTest.spec.js -test/model/MixedPropertiesAndAdditionalPropertiesClass.spec.js -test/model/Model200Response.spec.js -test/model/Name.spec.js -test/model/NullableClass.spec.js -test/model/NumberOnly.spec.js -test/model/ObjectWithDeprecatedFields.spec.js -test/model/Order.spec.js -test/model/OuterComposite.spec.js -test/model/OuterEnum.spec.js -test/model/OuterEnumDefaultValue.spec.js -test/model/OuterEnumInteger.spec.js -test/model/OuterEnumIntegerDefaultValue.spec.js -test/model/OuterObjectWithEnumProperty.spec.js -test/model/Pet.spec.js -test/model/ReadOnlyFirst.spec.js -test/model/Return.spec.js -test/model/SpecialModelName.spec.js -test/model/Tag.spec.js -test/model/User.spec.js diff --git a/samples/client/petstore/javascript-es6/.openapi-generator/FILES b/samples/client/petstore/javascript-es6/.openapi-generator/FILES index b05863cb83d6..0440bb2716cb 100644 --- a/samples/client/petstore/javascript-es6/.openapi-generator/FILES +++ b/samples/client/petstore/javascript-es6/.openapi-generator/FILES @@ -1,6 +1,5 @@ .babelrc .gitignore -.openapi-generator-ignore .travis.yml README.md docs/AdditionalPropertiesClass.md @@ -114,56 +113,3 @@ src/model/Return.js src/model/SpecialModelName.js src/model/Tag.js src/model/User.js -test/api/AnotherFakeApi.spec.js -test/api/DefaultApi.spec.js -test/api/FakeApi.spec.js -test/api/FakeClassnameTags123Api.spec.js -test/api/PetApi.spec.js -test/api/StoreApi.spec.js -test/api/UserApi.spec.js -test/model/AdditionalPropertiesClass.spec.js -test/model/Animal.spec.js -test/model/ApiResponse.spec.js -test/model/ArrayOfArrayOfNumberOnly.spec.js -test/model/ArrayOfNumberOnly.spec.js -test/model/ArrayTest.spec.js -test/model/Capitalization.spec.js -test/model/Cat.spec.js -test/model/CatAllOf.spec.js -test/model/Category.spec.js -test/model/ClassModel.spec.js -test/model/Client.spec.js -test/model/DeprecatedObject.spec.js -test/model/Dog.spec.js -test/model/DogAllOf.spec.js -test/model/EnumArrays.spec.js -test/model/EnumClass.spec.js -test/model/EnumTest.spec.js -test/model/File.spec.js -test/model/FileSchemaTestClass.spec.js -test/model/Foo.spec.js -test/model/FooGetDefaultResponse.spec.js -test/model/FormatTest.spec.js -test/model/HasOnlyReadOnly.spec.js -test/model/HealthCheckResult.spec.js -test/model/List.spec.js -test/model/MapTest.spec.js -test/model/MixedPropertiesAndAdditionalPropertiesClass.spec.js -test/model/Model200Response.spec.js -test/model/Name.spec.js -test/model/NullableClass.spec.js -test/model/NumberOnly.spec.js -test/model/ObjectWithDeprecatedFields.spec.js -test/model/Order.spec.js -test/model/OuterComposite.spec.js -test/model/OuterEnum.spec.js -test/model/OuterEnumDefaultValue.spec.js -test/model/OuterEnumInteger.spec.js -test/model/OuterEnumIntegerDefaultValue.spec.js -test/model/OuterObjectWithEnumProperty.spec.js -test/model/Pet.spec.js -test/model/ReadOnlyFirst.spec.js -test/model/Return.spec.js -test/model/SpecialModelName.spec.js -test/model/Tag.spec.js -test/model/User.spec.js diff --git a/samples/client/petstore/javascript-promise-es6/.openapi-generator/FILES b/samples/client/petstore/javascript-promise-es6/.openapi-generator/FILES index b05863cb83d6..0440bb2716cb 100644 --- a/samples/client/petstore/javascript-promise-es6/.openapi-generator/FILES +++ b/samples/client/petstore/javascript-promise-es6/.openapi-generator/FILES @@ -1,6 +1,5 @@ .babelrc .gitignore -.openapi-generator-ignore .travis.yml README.md docs/AdditionalPropertiesClass.md @@ -114,56 +113,3 @@ src/model/Return.js src/model/SpecialModelName.js src/model/Tag.js src/model/User.js -test/api/AnotherFakeApi.spec.js -test/api/DefaultApi.spec.js -test/api/FakeApi.spec.js -test/api/FakeClassnameTags123Api.spec.js -test/api/PetApi.spec.js -test/api/StoreApi.spec.js -test/api/UserApi.spec.js -test/model/AdditionalPropertiesClass.spec.js -test/model/Animal.spec.js -test/model/ApiResponse.spec.js -test/model/ArrayOfArrayOfNumberOnly.spec.js -test/model/ArrayOfNumberOnly.spec.js -test/model/ArrayTest.spec.js -test/model/Capitalization.spec.js -test/model/Cat.spec.js -test/model/CatAllOf.spec.js -test/model/Category.spec.js -test/model/ClassModel.spec.js -test/model/Client.spec.js -test/model/DeprecatedObject.spec.js -test/model/Dog.spec.js -test/model/DogAllOf.spec.js -test/model/EnumArrays.spec.js -test/model/EnumClass.spec.js -test/model/EnumTest.spec.js -test/model/File.spec.js -test/model/FileSchemaTestClass.spec.js -test/model/Foo.spec.js -test/model/FooGetDefaultResponse.spec.js -test/model/FormatTest.spec.js -test/model/HasOnlyReadOnly.spec.js -test/model/HealthCheckResult.spec.js -test/model/List.spec.js -test/model/MapTest.spec.js -test/model/MixedPropertiesAndAdditionalPropertiesClass.spec.js -test/model/Model200Response.spec.js -test/model/Name.spec.js -test/model/NullableClass.spec.js -test/model/NumberOnly.spec.js -test/model/ObjectWithDeprecatedFields.spec.js -test/model/Order.spec.js -test/model/OuterComposite.spec.js -test/model/OuterEnum.spec.js -test/model/OuterEnumDefaultValue.spec.js -test/model/OuterEnumInteger.spec.js -test/model/OuterEnumIntegerDefaultValue.spec.js -test/model/OuterObjectWithEnumProperty.spec.js -test/model/Pet.spec.js -test/model/ReadOnlyFirst.spec.js -test/model/Return.spec.js -test/model/SpecialModelName.spec.js -test/model/Tag.spec.js -test/model/User.spec.js