2.3.0-1725380172 • Published 10 months ago

@devfile/api v2.3.0-1725380172

Weekly downloads
-
License
Apache-2.0
Repository
github
Last release
10 months ago

kubernetes-client-typescript@false

This generator creates TypeScript/JavaScript client that utilizes fetch-api.

Building

To build and compile the typescript sources to javascript use:

npm install
npm run build

Publishing

First build the package then run npm publish

Consuming

Navigate to the folder of your consuming project and run one of the following commands.

published:

npm install kubernetes-client-typescript@false --save

unPublished (not recommended):

npm install PATH_TO_GENERATED_PACKAGE --save

### Usage

Below code snippet shows exemplary usage of the configuration and the API based 
on the typical `PetStore` example used for OpenAPI. 

import * as your_api from 'your_api_package'

// Covers all auth methods included in your OpenAPI yaml definition const authConfig: your_api.AuthMethodsConfiguration = { "api_key": "YOUR_API_KEY" }

// Implements a simple middleware to modify requests before (pre) they are sent // and after (post) they have been received class Test implements your_api.Middleware { pre(context: your_api.RequestContext): Promise<your_api.RequestContext> { // Modify context here and return return Promise.resolve(context); }

post(context: your_api.ResponseContext): Promise<your_api.ResponseContext> {
    return Promise.resolve(context);
}

}

// Create configuration parameter object const configurationParameters = { httpApi: new your_api.JQueryHttpLibrary(), // Can also be ignored - default is usually fine baseServer: your_api.servers0, // First server is default authMethods: authConfig, // No auth is default promiseMiddleware: new Test(), }

// Convert to actual configuration const config = your_api.createConfiguration(configurationParameters);

// Use configuration with your_api const api = new your_api.PetApi(config); your_api.Pet p = new your_api.Pet(); p.name = "My new pet"; p.photoUrls = []; p.tags = []; p.status = "available"; Promise<your_api.Pet> createdPet = api.addPet(p);

2.3.0-1725380172

10 months ago

2.3.0-1723034342

11 months ago

2.3.0-1721400636

11 months ago

2.3.0-1720455021

12 months ago

2.3.0-1724271135

10 months ago

2.2.2-1702489830

2 years ago

2.2.2-1700642284

2 years ago

2.2.2-1699873895

2 years ago

2.2.2-1700686170

2 years ago

0.0.1-1626875727

4 years ago

0.0.1-1626879276

4 years ago

0.0.1-1626190907

4 years ago

0.0.1-1626180841

4 years ago

0.0.1-1625753166

4 years ago

0.0.1-1625580509

4 years ago

0.0.1-1625511332

4 years ago

0.0.1-1625068876

4 years ago

0.0.1-1624647459

4 years ago

0.0.1-1624461958

4 years ago

0.0.1-1623966555

4 years ago

0.0.1-1623792866

4 years ago

0.0.1-1622142618

4 years ago

0.0.1-1622110074

4 years ago

0.0.1-1622573075

4 years ago

0.0.1-1620657861

4 years ago

0.0.1-1618951057

4 years ago

0.0.1-1621001813

4 years ago

0.0.1-1620871404

4 years ago

0.0.1-1620398714

4 years ago

0.0.1-1621024788

4 years ago

0.0.1-1619552958

4 years ago

0.0.1-1620152056

4 years ago

0.0.1-1617893577

4 years ago

0.0.1-1617375915

4 years ago

0.0.1-1617209203

4 years ago

0.0.1-1617029336

4 years ago

0.0.1-1616663604

4 years ago

0.0.1-a

4 years ago

0.0.1

4 years ago