openapi-typescript-codegen/docs/openapi-object.md
2022-01-28 16:11:52 +01:00

721 B

OpenAPI object

The library exposes a global OpenAPI object that can be used to configure the requests, below you can find the properties and their usage.

Example:

export const OpenAPI: OpenAPIConfig = {
    BASE: 'http://localhost:3000/my-api',
    VERSION: '1.0',
    WITH_CREDENTIALS: false,
    CREDENTIALS: 'include',
    TOKEN: undefined,
    USERNAME: undefined,
    PASSWORD: undefined,
    HEADERS: undefined,
    ENCODE_PATH: undefined,
};

Properties

OpenAPI.BASE Test

OpenAPI.VERSION Test

OpenAPI.WITH_CREDENTIALS Test

OpenAPI.CREDENTIALS Test

OpenAPI.TOKEN Test

OpenAPI.USERNAME Test

OpenAPI.PASSWORD Test

OpenAPI.HEADERS Test

OpenAPI.ENCODE_PATH Test