@redocly/openapi-core
Version:
See https://github.com/Redocly/redocly-cli
26 lines (17 loc) • 624 B
Markdown
See https://github.com/Redocly/redocly-cli
```js
import { formatProblems, lint, loadConfig } from '@redocly/openapi-core';
const pathToApi = 'openapi.yaml';
const config = loadConfig({ configPath: 'optional/path/to/.redocly.yaml' });
const lintResults = await lint({ ref: pathToApi, config });
```
```js
import { formatProblems, bundle, loadConfig } from '@redocly/openapi-core';
const pathToApi = 'openapi.yaml';
const config = loadConfig({ configPath: 'optional/path/to/.redocly.yaml' });
const { bundle, problems } = await bundle({ ref: pathToApi, config });
```