forked from loafle/openapi-generator-original
update samples
This commit is contained in:
parent
a6ba8d58d4
commit
deed7c603b
@ -1,7 +1,5 @@
|
|||||||
"use strict";
|
"use strict";
|
||||||
|
|
||||||
var _interopRequireWildcard = require("@babel/runtime/helpers/interopRequireWildcard");
|
|
||||||
|
|
||||||
Object.defineProperty(exports, "__esModule", {
|
Object.defineProperty(exports, "__esModule", {
|
||||||
value: true
|
value: true
|
||||||
});
|
});
|
||||||
@ -13,6 +11,10 @@ var portableFetch = _interopRequireWildcard(require("portable-fetch"));
|
|||||||
|
|
||||||
var _configuration = require("./configuration");
|
var _configuration = require("./configuration");
|
||||||
|
|
||||||
|
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function (nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
|
||||||
|
|
||||||
|
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
||||||
|
|
||||||
/* eslint-disable no-use-before-define */
|
/* eslint-disable no-use-before-define */
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -46,7 +46,6 @@ export type FetchArgs = {
|
|||||||
options: {};
|
options: {};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
* @export
|
* @export
|
||||||
@ -94,7 +93,6 @@ export type ApiResponse = {
|
|||||||
message?: string;
|
message?: string;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* A category for a pet
|
* A category for a pet
|
||||||
* @export
|
* @export
|
||||||
@ -115,7 +113,6 @@ export type Category = {
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
export type OrderStatusEnum = 'placed' | 'approved' | 'delivered';
|
export type OrderStatusEnum = 'placed' | 'approved' | 'delivered';
|
||||||
/**
|
/**
|
||||||
* An order for a pets from the pet store
|
* An order for a pets from the pet store
|
||||||
@ -161,7 +158,6 @@ export type Order = {
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
export type PetStatusEnum = 'available' | 'pending' | 'sold';
|
export type PetStatusEnum = 'available' | 'pending' | 'sold';
|
||||||
/**
|
/**
|
||||||
* A pet for sale in the pet store
|
* A pet for sale in the pet store
|
||||||
@ -206,7 +202,6 @@ export type Pet = {
|
|||||||
status?: PetStatusEnum;
|
status?: PetStatusEnum;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* A tag for a pet
|
* A tag for a pet
|
||||||
* @export
|
* @export
|
||||||
@ -226,7 +221,6 @@ export type Tag = {
|
|||||||
name?: string;
|
name?: string;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* A User who is purchasing from the pet store
|
* A User who is purchasing from the pet store
|
||||||
* @export
|
* @export
|
||||||
@ -284,7 +278,6 @@ export type User = {
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* PetApi - fetch parameter creator
|
* PetApi - fetch parameter creator
|
||||||
* @export
|
* @export
|
||||||
@ -310,9 +303,9 @@ export const PetApiFetchParamCreator = function (configuration?: Configuration)
|
|||||||
// authentication petstore_auth required
|
// authentication petstore_auth required
|
||||||
// oauth required
|
// oauth required
|
||||||
if (configuration && configuration.accessToken) {
|
if (configuration && configuration.accessToken) {
|
||||||
const localVarAccessTokenValue = typeof configuration.accessToken === 'function'
|
const localVarAccessTokenValue = typeof configuration.accessToken === 'function'
|
||||||
? configuration.accessToken("petstore_auth", ["write:pets", "read:pets"])
|
? configuration.accessToken("petstore_auth", ["write:pets", "read:pets"])
|
||||||
: configuration.accessToken;
|
: configuration.accessToken;
|
||||||
localVarHeaderParameter["Authorization"] = "Bearer " + localVarAccessTokenValue;
|
localVarHeaderParameter["Authorization"] = "Bearer " + localVarAccessTokenValue;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -350,9 +343,9 @@ export const PetApiFetchParamCreator = function (configuration?: Configuration)
|
|||||||
// authentication petstore_auth required
|
// authentication petstore_auth required
|
||||||
// oauth required
|
// oauth required
|
||||||
if (configuration && configuration.accessToken) {
|
if (configuration && configuration.accessToken) {
|
||||||
const localVarAccessTokenValue = typeof configuration.accessToken === 'function'
|
const localVarAccessTokenValue = typeof configuration.accessToken === 'function'
|
||||||
? configuration.accessToken("petstore_auth", ["write:pets", "read:pets"])
|
? configuration.accessToken("petstore_auth", ["write:pets", "read:pets"])
|
||||||
: configuration.accessToken;
|
: configuration.accessToken;
|
||||||
localVarHeaderParameter["Authorization"] = "Bearer " + localVarAccessTokenValue;
|
localVarHeaderParameter["Authorization"] = "Bearer " + localVarAccessTokenValue;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -389,9 +382,9 @@ export const PetApiFetchParamCreator = function (configuration?: Configuration)
|
|||||||
// authentication petstore_auth required
|
// authentication petstore_auth required
|
||||||
// oauth required
|
// oauth required
|
||||||
if (configuration && configuration.accessToken) {
|
if (configuration && configuration.accessToken) {
|
||||||
const localVarAccessTokenValue = typeof configuration.accessToken === 'function'
|
const localVarAccessTokenValue = typeof configuration.accessToken === 'function'
|
||||||
? configuration.accessToken("petstore_auth", ["write:pets", "read:pets"])
|
? configuration.accessToken("petstore_auth", ["write:pets", "read:pets"])
|
||||||
: configuration.accessToken;
|
: configuration.accessToken;
|
||||||
localVarHeaderParameter["Authorization"] = "Bearer " + localVarAccessTokenValue;
|
localVarHeaderParameter["Authorization"] = "Bearer " + localVarAccessTokenValue;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -428,9 +421,9 @@ export const PetApiFetchParamCreator = function (configuration?: Configuration)
|
|||||||
// authentication petstore_auth required
|
// authentication petstore_auth required
|
||||||
// oauth required
|
// oauth required
|
||||||
if (configuration && configuration.accessToken) {
|
if (configuration && configuration.accessToken) {
|
||||||
const localVarAccessTokenValue = typeof configuration.accessToken === 'function'
|
const localVarAccessTokenValue = typeof configuration.accessToken === 'function'
|
||||||
? configuration.accessToken("petstore_auth", ["write:pets", "read:pets"])
|
? configuration.accessToken("petstore_auth", ["write:pets", "read:pets"])
|
||||||
: configuration.accessToken;
|
: configuration.accessToken;
|
||||||
localVarHeaderParameter["Authorization"] = "Bearer " + localVarAccessTokenValue;
|
localVarHeaderParameter["Authorization"] = "Bearer " + localVarAccessTokenValue;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -468,8 +461,8 @@ export const PetApiFetchParamCreator = function (configuration?: Configuration)
|
|||||||
// authentication api_key required
|
// authentication api_key required
|
||||||
if (configuration && configuration.apiKey) {
|
if (configuration && configuration.apiKey) {
|
||||||
const localVarApiKeyValue = typeof configuration.apiKey === 'function'
|
const localVarApiKeyValue = typeof configuration.apiKey === 'function'
|
||||||
? configuration.apiKey("api_key")
|
? configuration.apiKey("api_key")
|
||||||
: configuration.apiKey;
|
: configuration.apiKey;
|
||||||
localVarHeaderParameter["api_key"] = localVarApiKeyValue;
|
localVarHeaderParameter["api_key"] = localVarApiKeyValue;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -502,9 +495,9 @@ export const PetApiFetchParamCreator = function (configuration?: Configuration)
|
|||||||
// authentication petstore_auth required
|
// authentication petstore_auth required
|
||||||
// oauth required
|
// oauth required
|
||||||
if (configuration && configuration.accessToken) {
|
if (configuration && configuration.accessToken) {
|
||||||
const localVarAccessTokenValue = typeof configuration.accessToken === 'function'
|
const localVarAccessTokenValue = typeof configuration.accessToken === 'function'
|
||||||
? configuration.accessToken("petstore_auth", ["write:pets", "read:pets"])
|
? configuration.accessToken("petstore_auth", ["write:pets", "read:pets"])
|
||||||
: configuration.accessToken;
|
: configuration.accessToken;
|
||||||
localVarHeaderParameter["Authorization"] = "Bearer " + localVarAccessTokenValue;
|
localVarHeaderParameter["Authorization"] = "Bearer " + localVarAccessTokenValue;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -543,9 +536,9 @@ export const PetApiFetchParamCreator = function (configuration?: Configuration)
|
|||||||
// authentication petstore_auth required
|
// authentication petstore_auth required
|
||||||
// oauth required
|
// oauth required
|
||||||
if (configuration && configuration.accessToken) {
|
if (configuration && configuration.accessToken) {
|
||||||
const localVarAccessTokenValue = typeof configuration.accessToken === 'function'
|
const localVarAccessTokenValue = typeof configuration.accessToken === 'function'
|
||||||
? configuration.accessToken("petstore_auth", ["write:pets", "read:pets"])
|
? configuration.accessToken("petstore_auth", ["write:pets", "read:pets"])
|
||||||
: configuration.accessToken;
|
: configuration.accessToken;
|
||||||
localVarHeaderParameter["Authorization"] = "Bearer " + localVarAccessTokenValue;
|
localVarHeaderParameter["Authorization"] = "Bearer " + localVarAccessTokenValue;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -589,9 +582,9 @@ export const PetApiFetchParamCreator = function (configuration?: Configuration)
|
|||||||
// authentication petstore_auth required
|
// authentication petstore_auth required
|
||||||
// oauth required
|
// oauth required
|
||||||
if (configuration && configuration.accessToken) {
|
if (configuration && configuration.accessToken) {
|
||||||
const localVarAccessTokenValue = typeof configuration.accessToken === 'function'
|
const localVarAccessTokenValue = typeof configuration.accessToken === 'function'
|
||||||
? configuration.accessToken("petstore_auth", ["write:pets", "read:pets"])
|
? configuration.accessToken("petstore_auth", ["write:pets", "read:pets"])
|
||||||
: configuration.accessToken;
|
: configuration.accessToken;
|
||||||
localVarHeaderParameter["Authorization"] = "Bearer " + localVarAccessTokenValue;
|
localVarHeaderParameter["Authorization"] = "Bearer " + localVarAccessTokenValue;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -765,6 +758,7 @@ export const PetApi = function(configuration?: Configuration, fetch: FetchAPI =
|
|||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* StoreApi - fetch parameter creator
|
* StoreApi - fetch parameter creator
|
||||||
* @export
|
* @export
|
||||||
@ -813,8 +807,8 @@ export const StoreApiFetchParamCreator = function (configuration?: Configuration
|
|||||||
// authentication api_key required
|
// authentication api_key required
|
||||||
if (configuration && configuration.apiKey) {
|
if (configuration && configuration.apiKey) {
|
||||||
const localVarApiKeyValue = typeof configuration.apiKey === 'function'
|
const localVarApiKeyValue = typeof configuration.apiKey === 'function'
|
||||||
? configuration.apiKey("api_key")
|
? configuration.apiKey("api_key")
|
||||||
: configuration.apiKey;
|
: configuration.apiKey;
|
||||||
localVarHeaderParameter["api_key"] = localVarApiKeyValue;
|
localVarHeaderParameter["api_key"] = localVarApiKeyValue;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -968,6 +962,7 @@ export const StoreApi = function(configuration?: Configuration, fetch: FetchAPI
|
|||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* UserApi - fetch parameter creator
|
* UserApi - fetch parameter creator
|
||||||
* @export
|
* @export
|
||||||
@ -1364,6 +1359,7 @@ export const UserApi = function(configuration?: Configuration, fetch: FetchAPI =
|
|||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
export type ApiTypes = {
|
export type ApiTypes = {
|
||||||
PetApi: PetApiType,
|
PetApi: PetApiType,
|
||||||
|
|
||||||
|
@ -8,6 +8,7 @@ var _api = require("./api");
|
|||||||
|
|
||||||
Object.keys(_api).forEach(function (key) {
|
Object.keys(_api).forEach(function (key) {
|
||||||
if (key === "default" || key === "__esModule") return;
|
if (key === "default" || key === "__esModule") return;
|
||||||
|
if (key in exports && exports[key] === _api[key]) return;
|
||||||
Object.defineProperty(exports, key, {
|
Object.defineProperty(exports, key, {
|
||||||
enumerable: true,
|
enumerable: true,
|
||||||
get: function () {
|
get: function () {
|
||||||
@ -20,6 +21,7 @@ var _configuration = require("./configuration");
|
|||||||
|
|
||||||
Object.keys(_configuration).forEach(function (key) {
|
Object.keys(_configuration).forEach(function (key) {
|
||||||
if (key === "default" || key === "__esModule") return;
|
if (key === "default" || key === "__esModule") return;
|
||||||
|
if (key in exports && exports[key] === _configuration[key]) return;
|
||||||
Object.defineProperty(exports, key, {
|
Object.defineProperty(exports, key, {
|
||||||
enumerable: true,
|
enumerable: true,
|
||||||
get: function () {
|
get: function () {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user