Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions docs/openapi-backend/api.md
Original file line number Diff line number Diff line change
Expand Up @@ -168,11 +168,11 @@ Initializes the OpenAPIBackend instance for use.
1. Loads and parses the OpenAPI document passed in constructor options
1. Validates the OpenAPI document
1. Builds validation schemas for all API operations
1. Marks member property `initalized` to true
1. Marks member property `initialized` to true
1. Registers all [Operation Handlers](#operation-handlers) passed in constructor options

The `init()` method should be called right after creating a new instance of OpenAPIBackend. Although for ease of use,
some methods like `handleRequest()` will call the method if the initalized member property is set to false.
some methods like `handleRequest()` will call the method if the initialized member property is set to false.

Returns the initialized OpenAPI backend instance.

Expand Down
14 changes: 7 additions & 7 deletions docs/openapi-client-axios/api.md
Original file line number Diff line number Diff line change
Expand Up @@ -84,14 +84,14 @@ const api = new OpenAPIClientAxios({

### .init()

Initalizes OpenAPIClientAxios
Initializes OpenAPIClientAxios

Returns a promise of the created member axios instance.

1. Parses the input definition into a JS object. If the input definition is a URL, it will be resolved
2. Dereferences the definition for use.
3. Creates the member axios instance
4. Sets `api.initialised = true` and returns the created axios instance
4. Sets `api.initialized = true` and returns the created axios instance

Example:
```javascript
Expand All @@ -102,7 +102,7 @@ await api.init();

Synchronous version of [`.init()`](#init)

Initalizes OpenAPIClientAxios and creates the axios client instance.
Initializes OpenAPIClientAxios and creates the axios client instance.

Note: Only works when the input definition is a valid OpenAPI v3 object.

Expand All @@ -113,7 +113,7 @@ api.initSync();

### .getClient()

Returns a promise of the member axios instance. Will run .init() if API is not initalised yet.
Returns a promise of the member axios instance. Will run .init() if API is not initialised yet.

Example:
```javascript
Expand Down Expand Up @@ -185,9 +185,9 @@ Type: `OperationMethodArguments`

Creates a new axios instance, extends it and returns it.

While initalising with [`.init()`](#init) or [.initSync()](#initsync) OpenAPIClientAxios calls this function to create the member client.
While initialising with [`.init()`](#init) or [.initSync()](#initsync) OpenAPIClientAxios calls this function to create the member client.

Note: Requires the API to be initalised first if run outside of .init() methods.
Note: Requires the API to be initialised first if run outside of .init() methods.

### .getAxiosConfigForOperation(operation, args)

Expand Down Expand Up @@ -216,7 +216,7 @@ Type: `OperationMethodArguments`

## Axios Client Instance

When OpenAPIClientAxios is initalised, a member
When OpenAPIClientAxios is initialised, a member
[axios client instance](https://github.com/axios/axios#creating-an-instance) is created.

The client instance can be accessed either directly via `api.client` getter, or `api.getClient()`.
Expand Down