This is a sample Pet Store Server based on the OpenAPI 3.0 specification. You can find out more about Swagger at https://swagger.io.
Bring your own key. This API needs your own Swagger Petstore - OpenAPI 3.0 key - get one from the provider, add it once below, and the proxy injects it on every call. Your OmniStream plan covers the unified SDK, key storage, and proxy - the provider's own rate limits still apply to your key.
This is a community listing. If you own this API, you can request ownership.
npm install omnistream-sdkimport { OmniClient } from "omnistream-sdk";
const omni = new OmniClient({ token: process.env.OMNI_KEY! });
// One key reaches every API on the marketplace.
const data = await omni.call("swagger-petstore-openapi-3-0/addPet");One install, one key - the same client calls every API on the marketplace.
Add a new pet to the store.
Update an existing pet.
Finds Pets by status.
Finds Pets by tags.
Find pet by ID.
Updates a pet in the store with form data.
Deletes a pet.
/**
* SwaggerPetstoreOpenAPI30 - generated by OmniStream from Swagger Petstore - OpenAPI 3.0's OpenAPI spec.
* One typed method per endpoint. A single Omni key reaches the API.
*/
const DEFAULT_BASE = "https://grid.skinvaults.online/v1/proxy/swagger-petstore-openapi-3-0";
export class SwaggerPetstoreOpenAPI30Error extends Error {
status: number;
code?: string;
constructor(status: number, code: string | undefined, message?: string) {
super(message || `SwaggerPetstoreOpenAPI30 error ${status}`);
this.name = "SwaggerPetstoreOpenAPI30Error";
this.status = status;
this.code = code;
}
}
export interface SwaggerPetstoreOpenAPI30Options {
baseUrl?: string;
fetch?: typeof fetch;
timeoutMs?: number;
}
export class SwaggerPetstoreOpenAPI30 {
/** @param token Your OmniStream key (one key for every API). */
constructor(private token: string, private opts: SwaggerPetstoreOpenAPI30Options = {}) {
if (!token) throw new Error("SwaggerPetstoreOpenAPI30: token is required");
}
rateLimit: { remainingMinute?: number; remainingDay?: number } | null = null;
private async _request(method: string, path: string, { params, body }: { params?: Record<string, unknown>; body?: unknown } = {}): Promise<any> {
const f = this.opts.fetch ?? globalThis.fetch;
const url = new URL((this.opts.baseUrl ?? DEFAULT_BASE).replace(/\/+$/, "") + path);
if (params) for (const [k, v] of Object.entries(params)) if (v != null) url.searchParams.set(k, String(v));
const headers: Record<string, string> = { "x-omni-key": this.token };
if (body !== undefined) headers["content-type"] = "application/json";
const res = await f(url, { method, headers, body: body !== undefined ? JSON.stringify(body) : undefined });
this.rateLimit = {
remainingMinute: Number(res.headers.get("x-ratelimit-remaining-minute")) || undefined,
remainingDay: Number(res.headers.get("x-ratelimit-remaining-day")) || undefined,
};
const data = await res.json().catch(() => ({}));
if (!res.ok) throw new SwaggerPetstoreOpenAPI30Error(res.status, data?.error?.code, data?.error?.message);
return data.data ?? data;
}
/** Add a new pet to the store. */
addPet(body: unknown): Promise<any> {
return this._request("POST", "/pet", { body });
}
/** Update an existing pet. */
updatePet(body: unknown): Promise<any> {
return this._request("PUT", "/pet", { body });
}
/** Finds Pets by status. */
findPetsByStatus(params: { "status": string }): Promise<any> {
return this._request("GET", "/pet/findByStatus", { params });
}
/** Finds Pets by tags. */
findPetsByTags(params: { "tags": unknown[] }): Promise<any> {
return this._request("GET", "/pet/findByTags", { params });
}
/** Find pet by ID. */
getPetById(params: { "petId": number }): Promise<any> {
return this._request("GET", "/pet/{petId}", { params });
}
/** Updates a pet in the store with form data. */
updatePetWithForm(params: { "petId": number; "name"?: string; "status"?: string }): Promise<any> {
return this._request("POST", "/pet/{petId}", { params });
}
/** Deletes a pet. */
deletePet(params: { "petId": number; "api_key"?: string }): Promise<any> {
return this._request("DELETE", "/pet/{petId}", { params });
}
/** Uploads an image. */
uploadFile(params: { "petId": number; "additionalMetadata"?: string }): Promise<any> {
return this._request("POST", "/pet/{petId}/uploadImage", { params });
}
/** Returns pet inventories by status. */
getInventory(): Promise<any> {
return this._request("GET", "/store/inventory", {});
}
/** Place an order for a pet. */
placeOrder(body: unknown): Promise<any> {
return this._request("POST", "/store/order", { body });
}
/** Find purchase order by ID. */
getOrderById(params: { "orderId": number }): Promise<any> {
return this._request("GET", "/store/order/{orderId}", { params });
}
/** Delete purchase order by identifier. */
deleteOrder(params: { "orderId": number }): Promise<any> {
return this._request("DELETE", "/store/order/{orderId}", { params });
}
/** Create user. */
createUser(body: unknown): Promise<any> {
return this._request("POST", "/user", { body });
}
/** Creates list of users with given input array. */
createUsersWithListInput(body: unknown): Promise<any> {
return this._request("POST", "/user/createWithList", { body });
}
/** Logs user into the system. */
loginUser(params: { "username"?: string; "password"?: string }): Promise<any> {
return this._request("GET", "/user/login", { params });
}
/** Logs out current logged in user session. */
logoutUser(): Promise<any> {
return this._request("GET", "/user/logout", {});
}
/** Get user by user name. */
getUserByName(params: { "username": string }): Promise<any> {
return this._request("GET", "/user/{username}", { params });
}
/** Update user resource. */
updateUser(body: unknown, params: { "username": string }): Promise<any> {
return this._request("PUT", "/user/{username}", { body, params });
}
/** Delete user resource. */
deleteUser(params: { "username": string }): Promise<any> {
return this._request("DELETE", "/user/{username}", { params });
}
}
export default SwaggerPetstoreOpenAPI30;
No reviews yet. Be the first to rate this API.
Yes. Swagger Petstore - OpenAPI 3.0 uses apiKey authentication, so you bring your own key from the provider. You store it once on OmniStream and the proxy injects it into every call, so your code only ever sends your Omni key.
This is a sample Pet Store Server based on the OpenAPI 3.0 specification. You can find out more about Swagger at https://swagger.io. It exposes 19 endpoints over POST, PUT, GET, DELETE, including POST /pet, PUT /pet, GET /pet/findByStatus.
Install the OmniStream SDK for your language and call Swagger Petstore - OpenAPI 3.0 through it. The client is generated from this API's OpenAPI spec, so parameters and responses are fully typed, and the same client also calls every other API in the marketplace.
You can start on the free plan. OmniStream charges for the unified SDK, key storage and proxy rather than for Swagger Petstore - OpenAPI 3.0 itself, and Swagger Petstore - OpenAPI 3.0's own rate limits still apply to your provider key.
QuickChart: An API to generate charts and QR codes using QuickChart services.
Uploads an image.
Returns pet inventories by status.
Place an order for a pet.
Find purchase order by ID.
Delete purchase order by identifier.
Create user.
Creates list of users with given input array.
Logs user into the system.
Logs out current logged in user session.
Get user by user name.
Update user resource.
Delete user resource.