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

# Class: OpenApiConfigService

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

## Constructors

### new OpenApiConfigService()

> **new OpenApiConfigService**(`config`): [`OpenApiConfigService`](../wiki/Class.OpenApiConfigService)

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

#### Parameters

##### config

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

#### Returns

[`OpenApiConfigService`](../wiki/Class.OpenApiConfigService)

## 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/2042e24ce69e05f30c2866a6fa61d9fd6fd89a30/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/2042e24ce69e05f30c2866a6fa61d9fd6fd89a30/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/2042e24ce69e05f30c2866a6fa61d9fd6fd89a30/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/2042e24ce69e05f30c2866a6fa61d9fd6fd89a30/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/2042e24ce69e05f30c2866a6fa61d9fd6fd89a30/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/2042e24ce69e05f30c2866a6fa61d9fd6fd89a30/packages/angular/open-api/src/lib/open-api-config.service.ts#L208)

#### Parameters

##### serverIndex

`number` = `...`

##### serverId?

`string`

#### Returns

`string`

***

### getOperation()

> **getOperation**(`operationId`): [`OperationObjectWithMetadata`](../wiki/Interface.OperationObjectWithMetadata)

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

#### Parameters

##### operationId

`string`

#### Returns

[`OperationObjectWithMetadata`](../wiki/Interface.OperationObjectWithMetadata)

***

### 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/2042e24ce69e05f30c2866a6fa61d9fd6fd89a30/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`](../wiki/Interface.OperationObjectWithMetadata)

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

#### Parameters

##### operationId

`string`

#### Returns

[`OperationObjectWithMetadata`](../wiki/Interface.OperationObjectWithMetadata)

***

### 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/2042e24ce69e05f30c2866a6fa61d9fd6fd89a30/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/2042e24ce69e05f30c2866a6fa61d9fd6fd89a30/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`\>
