0.2.67 • Published 5 years ago

oai-ts-commands v0.2.67

Weekly downloads
88
License
Apache-2.0
Repository
github
Last release
5 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

5 years ago

0.2.66

5 years ago

0.2.65

5 years ago

0.2.64

5 years ago

0.2.63

5 years ago

0.2.62

5 years ago

0.2.61

5 years ago

0.2.60

5 years ago

0.2.59

5 years ago

0.2.58

5 years ago

0.2.57

5 years ago

0.2.56

5 years ago

0.2.55

6 years ago

0.2.54

6 years ago

0.2.53

6 years ago

0.2.52

6 years ago

0.2.51

6 years ago

0.2.50

6 years ago

0.2.49

6 years ago

0.2.48

6 years ago

0.2.47

6 years ago

0.2.45

6 years ago

0.2.44

6 years ago

0.2.43

6 years ago

0.2.42

6 years ago

0.2.41

6 years ago

0.2.40

6 years ago

0.2.39

6 years ago

0.2.38

6 years ago

0.2.37

6 years ago

0.2.36

6 years ago

0.2.35

6 years ago

0.2.34

6 years ago

0.2.33

6 years ago

0.3.33

6 years ago

0.2.32

6 years ago

0.2.31

6 years ago

0.2.30

6 years ago

0.2.29

6 years ago

0.2.28

6 years ago

0.2.27

6 years ago

0.2.26

6 years ago

0.2.25

6 years ago

0.2.24

6 years ago

0.2.23

6 years ago

0.2.22

6 years ago

0.2.21

6 years ago

0.2.20

6 years ago

0.2.19

6 years ago

0.2.18

6 years ago

0.2.17

6 years ago

0.2.16

6 years ago

0.2.15

6 years ago

0.2.14

6 years ago

0.2.13

6 years ago

0.2.12

6 years ago

0.2.11

6 years ago

0.2.10

7 years ago

0.2.9

7 years ago

0.2.8

7 years ago

0.2.7

7 years ago

0.2.6

7 years ago

0.2.5

7 years ago

0.2.4

7 years ago

0.2.3

7 years ago

0.2.2

7 years ago