mirror of
https://github.com/OpenAPITools/openapi-generator.git
synced 2025-12-04 12:46:11 +00:00
[JavaScript] Fix licenseNames (#6605)
* [JavaScript] Fix licenseName in package.mustache * Fix invalid SPDX license expression in resources/2_0 * Update JavaScript samples
This commit is contained in:
committed by
wing328
parent
8a7940f199
commit
1f9f8c5a3e
@@ -0,0 +1,83 @@
|
||||
/**
|
||||
* Swagger 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
|
||||
* Contact: apiteam@swagger.io
|
||||
*
|
||||
* NOTE: This class is auto generated by the swagger code generator program.
|
||||
* https://github.com/swagger-api/swagger-codegen.git
|
||||
* 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 {
|
||||
|
||||
/**
|
||||
* Constructs a new AnotherFakeApi.
|
||||
* @alias module:api/AnotherFakeApi
|
||||
* @class
|
||||
* @param {module:ApiClient} [apiClient] Optional API client implementation to use,
|
||||
* default to {@link module:ApiClient#instance} if unspecified.
|
||||
*/
|
||||
constructor(apiClient) {
|
||||
this.apiClient = apiClient || ApiClient.instance;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Callback function to receive the result of the testSpecialTags operation.
|
||||
* @callback module:api/AnotherFakeApi~testSpecialTagsCallback
|
||||
* @param {String} error Error message, if any.
|
||||
* @param {module:model/Client} data The data returned by the service call.
|
||||
* @param {String} response The complete HTTP response.
|
||||
*/
|
||||
|
||||
/**
|
||||
* To test special tags
|
||||
* To test special tags
|
||||
* @param {module:model/Client} body client model
|
||||
* @param {module:api/AnotherFakeApi~testSpecialTagsCallback} callback The callback function, accepting three arguments: error, data, response
|
||||
* data is of type: {@link module:model/Client}
|
||||
*/
|
||||
testSpecialTags(body, callback) {
|
||||
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 testSpecialTags");
|
||||
}
|
||||
|
||||
|
||||
let pathParams = {
|
||||
};
|
||||
let queryParams = {
|
||||
};
|
||||
let headerParams = {
|
||||
};
|
||||
let formParams = {
|
||||
};
|
||||
|
||||
let authNames = [];
|
||||
let contentTypes = ['application/json'];
|
||||
let accepts = ['application/json'];
|
||||
let returnType = Client;
|
||||
|
||||
return this.apiClient.callApi(
|
||||
'/another-fake/dummy', 'PATCH',
|
||||
pathParams, queryParams, headerParams, formParams, postBody,
|
||||
authNames, contentTypes, accepts, returnType, callback
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
@@ -0,0 +1,82 @@
|
||||
/**
|
||||
* Swagger 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
|
||||
* Contact: apiteam@swagger.io
|
||||
*
|
||||
* NOTE: This class is auto generated by the swagger code generator program.
|
||||
* https://github.com/swagger-api/swagger-codegen.git
|
||||
* 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 {
|
||||
|
||||
/**
|
||||
* Constructs a new FakeClassnameTags123Api.
|
||||
* @alias module:api/FakeClassnameTags123Api
|
||||
* @class
|
||||
* @param {module:ApiClient} [apiClient] Optional API client implementation to use,
|
||||
* default to {@link module:ApiClient#instance} if unspecified.
|
||||
*/
|
||||
constructor(apiClient) {
|
||||
this.apiClient = apiClient || ApiClient.instance;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Callback function to receive the result of the testClassname operation.
|
||||
* @callback module:api/FakeClassnameTags123Api~testClassnameCallback
|
||||
* @param {String} error Error message, if any.
|
||||
* @param {module:model/Client} data The data returned by the service call.
|
||||
* @param {String} response The complete HTTP response.
|
||||
*/
|
||||
|
||||
/**
|
||||
* To test class name in snake case
|
||||
* @param {module:model/Client} body client model
|
||||
* @param {module:api/FakeClassnameTags123Api~testClassnameCallback} callback The callback function, accepting three arguments: error, data, response
|
||||
* data is of type: {@link module:model/Client}
|
||||
*/
|
||||
testClassname(body, callback) {
|
||||
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 testClassname");
|
||||
}
|
||||
|
||||
|
||||
let pathParams = {
|
||||
};
|
||||
let queryParams = {
|
||||
};
|
||||
let headerParams = {
|
||||
};
|
||||
let formParams = {
|
||||
};
|
||||
|
||||
let authNames = ['api_key_query'];
|
||||
let contentTypes = ['application/json'];
|
||||
let accepts = ['application/json'];
|
||||
let returnType = Client;
|
||||
|
||||
return this.apiClient.callApi(
|
||||
'/fake_classname_test', 'PATCH',
|
||||
pathParams, queryParams, headerParams, formParams, postBody,
|
||||
authNames, contentTypes, accepts, returnType, callback
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
@@ -49,8 +49,9 @@ import Tag from './model/Tag';
|
||||
import User from './model/User';
|
||||
import Cat from './model/Cat';
|
||||
import Dog from './model/Dog';
|
||||
import AnotherFakeApi from './api/AnotherFakeApi';
|
||||
import FakeApi from './api/FakeApi';
|
||||
import Fake_classname_tags123Api from './api/Fake_classname_tags123Api';
|
||||
import FakeClassnameTags123Api from './api/FakeClassnameTags123Api';
|
||||
import PetApi from './api/PetApi';
|
||||
import StoreApi from './api/StoreApi';
|
||||
import UserApi from './api/UserApi';
|
||||
@@ -310,6 +311,12 @@ export {
|
||||
*/
|
||||
Dog,
|
||||
|
||||
/**
|
||||
* The AnotherFakeApi service constructor.
|
||||
* @property {module:api/AnotherFakeApi}
|
||||
*/
|
||||
AnotherFakeApi,
|
||||
|
||||
/**
|
||||
* The FakeApi service constructor.
|
||||
* @property {module:api/FakeApi}
|
||||
@@ -317,10 +324,10 @@ export {
|
||||
FakeApi,
|
||||
|
||||
/**
|
||||
* The Fake_classname_tags123Api service constructor.
|
||||
* @property {module:api/Fake_classname_tags123Api}
|
||||
* The FakeClassnameTags123Api service constructor.
|
||||
* @property {module:api/FakeClassnameTags123Api}
|
||||
*/
|
||||
Fake_classname_tags123Api,
|
||||
FakeClassnameTags123Api,
|
||||
|
||||
/**
|
||||
* The PetApi service constructor.
|
||||
|
||||
Reference in New Issue
Block a user