[**@rxap/open-api v19.1.0-dev.1**](../README.md)

***

[@rxap/open-api](../globals.md) / OpenApiConfigService

# Class: OpenApiConfigService

Defined in: [packages/angular/open-api/src/lib/open-api-config.service.ts:18](https://gitlab.com/rxap/packages/-/blob/8b57a83e5e2b112c82a6d37b4e6b77fd365cbf05/packages/angular/open-api/src/lib/open-api-config.service.ts#L18)

## Constructors

### new OpenApiConfigService()

> **new OpenApiConfigService**(`config`): [`OpenApiConfigService`](OpenApiConfigService.md)

Defined in: [packages/angular/open-api/src/lib/open-api-config.service.ts:36](https://gitlab.com/rxap/packages/-/blob/8b57a83e5e2b112c82a6d37b4e6b77fd365cbf05/packages/angular/open-api/src/lib/open-api-config.service.ts#L36)

#### Parameters

##### config

`null` | `Document`\<\{\}\>

#### Returns

[`OpenApiConfigService`](OpenApiConfigService.md)

## Properties

### defaultServerIndex

> **defaultServerIndex**: `number` = `OpenApiConfigService.DefaultServerIndex`

Defined in: [packages/angular/open-api/src/lib/open-api-config.service.ts:24](https://gitlab.com/rxap/packages/-/blob/8b57a83e5e2b112c82a6d37b4e6b77fd365cbf05/packages/angular/open-api/src/lib/open-api-config.service.ts#L24)

***

### Config

> `static` **Config**: `null` \| `Document`\<\{\}\> = `null`

Defined in: [packages/angular/open-api/src/lib/open-api-config.service.ts:19](https://gitlab.com/rxap/packages/-/blob/8b57a83e5e2b112c82a6d37b4e6b77fd365cbf05/packages/angular/open-api/src/lib/open-api-config.service.ts#L19)

***

### DefaultServerIndex

> `static` **DefaultServerIndex**: `number` = `0`

Defined in: [packages/angular/open-api/src/lib/open-api-config.service.ts:21](https://gitlab.com/rxap/packages/-/blob/8b57a83e5e2b112c82a6d37b4e6b77fd365cbf05/packages/angular/open-api/src/lib/open-api-config.service.ts#L21)

## Accessors

### config

#### Get Signature

> **get** **config**(): `Document`

Defined in: [packages/angular/open-api/src/lib/open-api-config.service.ts:51](https://gitlab.com/rxap/packages/-/blob/8b57a83e5e2b112c82a6d37b4e6b77fd365cbf05/packages/angular/open-api/src/lib/open-api-config.service.ts#L51)

##### Returns

`Document`

***

### serverIds

#### Get Signature

> **get** **serverIds**(): `string`[]

Defined in: [packages/angular/open-api/src/lib/open-api-config.service.ts:32](https://gitlab.com/rxap/packages/-/blob/8b57a83e5e2b112c82a6d37b4e6b77fd365cbf05/packages/angular/open-api/src/lib/open-api-config.service.ts#L32)

##### Returns

`string`[]

## Methods

### getBaseUrl()

> **getBaseUrl**(`serverIndex`, `serverId`?): `string`

Defined in: [packages/angular/open-api/src/lib/open-api-config.service.ts:208](https://gitlab.com/rxap/packages/-/blob/8b57a83e5e2b112c82a6d37b4e6b77fd365cbf05/packages/angular/open-api/src/lib/open-api-config.service.ts#L208)

#### Parameters

##### serverIndex

`number` = `...`

##### serverId?

`string`

#### Returns

`string`

***

### getOperation()

> **getOperation**(`operationId`): [`OperationObjectWithMetadata`](../interfaces/OperationObjectWithMetadata.md)

Defined in: [packages/angular/open-api/src/lib/open-api-config.service.ts:189](https://gitlab.com/rxap/packages/-/blob/8b57a83e5e2b112c82a6d37b4e6b77fd365cbf05/packages/angular/open-api/src/lib/open-api-config.service.ts#L189)

#### Parameters

##### operationId

`string`

#### Returns

[`OperationObjectWithMetadata`](../interfaces/OperationObjectWithMetadata.md)

***

### insertServer()

> **insertServer**(`serverConfig`, `index`, `serverId`?): `void`

Defined in: [packages/angular/open-api/src/lib/open-api-config.service.ts:247](https://gitlab.com/rxap/packages/-/blob/8b57a83e5e2b112c82a6d37b4e6b77fd365cbf05/packages/angular/open-api/src/lib/open-api-config.service.ts#L247)

#### Parameters

##### serverConfig

`ServerObject`

##### index

`number` = `...`

##### serverId?

`string`

#### Returns

`void`

***

### GetOperation()

> `static` **GetOperation**(`operationId`): [`OperationObjectWithMetadata`](../interfaces/OperationObjectWithMetadata.md)

Defined in: [packages/angular/open-api/src/lib/open-api-config.service.ts:97](https://gitlab.com/rxap/packages/-/blob/8b57a83e5e2b112c82a6d37b4e6b77fd365cbf05/packages/angular/open-api/src/lib/open-api-config.service.ts#L97)

#### Parameters

##### operationId

`string`

#### Returns

[`OperationObjectWithMetadata`](../interfaces/OperationObjectWithMetadata.md)

***

### InsertServer()

> `static` **InsertServer**(`serverConfig`, `index`, `serverId`?, `config`?): `void`

Defined in: [packages/angular/open-api/src/lib/open-api-config.service.ts:227](https://gitlab.com/rxap/packages/-/blob/8b57a83e5e2b112c82a6d37b4e6b77fd365cbf05/packages/angular/open-api/src/lib/open-api-config.service.ts#L227)

#### Parameters

##### serverConfig

`ServerObject`

##### index

`number`

##### serverId?

`string`

##### config?

`Document` = `...`

#### Returns

`void`

***

### Load()

> `static` **Load**(`openApiUrl`): `Promise`\<`void`\>

Defined in: [packages/angular/open-api/src/lib/open-api-config.service.ts:66](https://gitlab.com/rxap/packages/-/blob/8b57a83e5e2b112c82a6d37b4e6b77fd365cbf05/packages/angular/open-api/src/lib/open-api-config.service.ts#L66)

Used to load the app open api config from a remote resource.

Promise.all([ OpenApiDataSourceLoader.Load() ])
.then(() => platformBrowserDynamic().bootstrapModule(AppModule))
.catch(err => console.error(err))

#### Parameters

##### openApiUrl

`string` = `'openapi.json'`

#### Returns

`Promise`\<`void`\>
