# Class OpenApiConfigService

- Defined in packages/angular/open-api/src/lib/open-api-config.service.ts:18

#####
Index

### Constructors

constructor

### Properties

defaultServerIndex
Config
DefaultServerIndex

### Accessors

config
serverIds

### Methods

getBaseUrl
getOperation
insertServer
GetOperation
InsertServer
Load

##
Constructors

### constructor

- new OpenApiConfigService(config?: null | Document<{}>): OpenApiConfigService

  #### Parameters

  - config: null | Document<{}> = null

  #### Returns OpenApiConfigService

  - Defined in packages/angular/open-api/src/lib/open-api-config.service.ts:36

##
Properties

### defaultServerIndex

defaultServerIndex: number = OpenApiConfigService.DefaultServerIndex

- Defined in packages/angular/open-api/src/lib/open-api-config.service.ts:24

### `Static` Config

Config: null | Document<{}> = null

- Defined in packages/angular/open-api/src/lib/open-api-config.service.ts:19

### `Static` DefaultServerIndex

DefaultServerIndex: number = 0

- Defined in packages/angular/open-api/src/lib/open-api-config.service.ts:21

##
Accessors

### config

- get config(): Document

  #### Returns Document

  - Defined in packages/angular/open-api/src/lib/open-api-config.service.ts:51

### serverIds

- get serverIds(): string[]

  #### Returns string[]

  - Defined in packages/angular/open-api/src/lib/open-api-config.service.ts:32

##
Methods

### getBaseUrl

- getBaseUrl(serverIndex?: number, serverId?: string): string

  #### Parameters

  - serverIndex: number = ...
  - `Optional` serverId: string

  #### Returns string

  - Defined in packages/angular/open-api/src/lib/open-api-config.service.ts:208

### getOperation

- getOperation(operationId: string): OperationObjectWithMetadata

  #### Parameters

  - operationId: string

  #### Returns OperationObjectWithMetadata

  - Defined in packages/angular/open-api/src/lib/open-api-config.service.ts:189

### insertServer

- insertServer(
  serverConfig: ServerObject,
  index?: number,
  serverId?: string,
  ): void

  #### Parameters

  - serverConfig: ServerObject
  - index: number = ...
  - `Optional` serverId: string

  #### Returns void

  - Defined in packages/angular/open-api/src/lib/open-api-config.service.ts:247

### `Static` GetOperation

- GetOperation(operationId: string): OperationObjectWithMetadata

  #### Parameters

  - operationId: string

  #### Returns OperationObjectWithMetadata

  - Defined in packages/angular/open-api/src/lib/open-api-config.service.ts:97

### `Static` InsertServer

- InsertServer(
  serverConfig: ServerObject,
  index: number,
  serverId?: string,
  config?: Document,
  ): void

  #### Parameters

  - serverConfig: ServerObject
  - index: number
  - `Optional` serverId: string
  - config: Document = ...

  #### Returns void

  - Defined in packages/angular/open-api/src/lib/open-api-config.service.ts:227

### `Static` Load

- Load(openApiUrl?: string): Promise<void>

  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>

  - Defined in packages/angular/open-api/src/lib/open-api-config.service.ts:66