0.2.67 • Published 6 years ago

oai-ts-commands v0.2.67

Weekly downloads
88
License
Apache-2.0
Repository
github
Last release
6 years ago

A typescript library for mutating data models created using the oai-ts-core library.

Install with npm install oai-ts-commands.

Overview

You can use this library to mutate an OpenAPI document.

Quickstart

The easiest way to get started is to create an instance of a command and execute it:

Typescript:

// Get the OpenAPI document from somewhere (can be a string or js object).
let openApiData: any = ...;
// Create an instance of the library utils class and use it to parse the OpenAPI document.
let library: OasLibraryUtils = new OasLibraryUtils();
let document: Oas30Document = <Oas30Document> library.createDocument(openApiData);

// Mutate the document using one or more Command
let command: ICommand = new ChangePropertyCommand<string>("description", "New description goes here!", document.info);
command.execute(document);

Browser (UMD):

// Get the OpenAPI document from somewhere (can be a string or js object).
var openApiData = ...; // Get your OpenAPI data somehow (can be string or JS object)
// Create an instance of the library utils class and use it to parse the OpenAPI document.
var library = new OAI.OasLibraryUtils();
var document = library.createDocument(openApiData);

// Mutate the document using one or more Command
var command = new ChangePropertyCommand("description", "New description goes here!", document.info);
command.execute(document);
0.2.67

6 years ago

0.2.66

6 years ago

0.2.65

6 years ago

0.2.64

6 years ago

0.2.63

6 years ago

0.2.62

6 years ago

0.2.61

6 years ago

0.2.60

6 years ago

0.2.59

7 years ago

0.2.58

7 years ago

0.2.57

7 years ago

0.2.56

7 years ago

0.2.55

7 years ago

0.2.54

7 years ago

0.2.53

7 years ago

0.2.52

7 years ago

0.2.51

7 years ago

0.2.50

7 years ago

0.2.49

7 years ago

0.2.48

7 years ago

0.2.47

7 years ago

0.2.45

7 years ago

0.2.44

7 years ago

0.2.43

7 years ago

0.2.42

7 years ago

0.2.41

7 years ago

0.2.40

7 years ago

0.2.39

7 years ago

0.2.38

7 years ago

0.2.37

7 years ago

0.2.36

7 years ago

0.2.35

7 years ago

0.2.34

7 years ago

0.2.33

7 years ago

0.3.33

7 years ago

0.2.32

7 years ago

0.2.31

7 years ago

0.2.30

7 years ago

0.2.29

7 years ago

0.2.28

7 years ago

0.2.27

7 years ago

0.2.26

7 years ago

0.2.25

7 years ago

0.2.24

7 years ago

0.2.23

7 years ago

0.2.22

7 years ago

0.2.21

7 years ago

0.2.20

7 years ago

0.2.19

7 years ago

0.2.18

8 years ago

0.2.17

8 years ago

0.2.16

8 years ago

0.2.15

8 years ago

0.2.14

8 years ago

0.2.13

8 years ago

0.2.12

8 years ago

0.2.11

8 years ago

0.2.10

8 years ago

0.2.9

8 years ago

0.2.8

8 years ago

0.2.7

8 years ago

0.2.6

8 years ago

0.2.5

8 years ago

0.2.4

8 years ago

0.2.3

8 years ago

0.2.2

8 years ago