Skip to content

Commit

Permalink
docs: updating the readme because it's out of date
Browse files Browse the repository at this point in the history
  • Loading branch information
erunion committed Jun 7, 2021
1 parent d32508f commit 48514f7
Showing 1 changed file with 4 additions and 22 deletions.
26 changes: 4 additions & 22 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ npm install oas
```

## CLI
The CLI tool makes creating API definition files easier. It currently supports [Swagger 2](https://swagger.io/specification/v2/) and [OpenAPI 3.x](https://swagger.io/specification/) documents.
The CLI tool makes creating API definition files easier. It currently supports [Swagger 2.0](https://swagger.io/specification/v2/) and [OpenAPI 3.x](https://swagger.io/specification/) documents.

### Usage

Expand Down Expand Up @@ -48,31 +48,13 @@ You can also do **inline parameters**, which are shorthand for parameters. They
- (in) name=default* {type:format} Description
```

### Host your API definition

Hosting API documentation is hard so, we have an online component that hosts your OpenAPI/Swagger file for you. Just type the following to get a URL:

```
oas host
```

This will upload your API definition and give you a public URL you can use.

## Tooling
This library also exposes a set of tooling to help you manage OpenAPI definitions. You can access it by loading:

```js
require('oas/tooling')
require('oas')
```

> To use a compiled version of this offering within a browser, you can load `oas/.tooling`
Components available are the following:
Also exposed within the main `oas` export is an `Operation` class that can help you manage and retrieve specific data from an API operation.

* `oas/tooling`: An OAS class can help you discover operations within a large OpenAPI file.
* `oas/tooling/operation`: An Operation class that can help you manage and retrieve specific data from an API operation.
* `oas/tooling/utils`
* `findSchemaDefinition`: Function to assist with `$ref` lookups.
* `flattenSchema`: Function to reduce a schema definition into a singular list.
* `getSchema`: Retrieve the first `requestBody` schema on an operation.
* `parametersToJsonSchema`: Warehouse method to reduce an operation down into a JSON Schema-compatible representation.
> To use a compiled version of this offering within a browser, you can load `oas/dist`

0 comments on commit 48514f7

Please sign in to comment.