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