JSPM

@redocly/openapi-core

1.0.0-beta.64
  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 3098942
  • Score
    100M100P100Q212637F
  • License MIT

Package Exports

  • @redocly/openapi-core
  • @redocly/openapi-core/lib/bundle
  • @redocly/openapi-core/lib/config/builtIn
  • @redocly/openapi-core/lib/config/config

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (@redocly/openapi-core) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

openapi-core

See https://github.com/Redocly/openapi-cli

Basic usage

Lint

import { formatProblems, lint, loadConfig } from '@redocly/openapi-core';

const pathToEntryPoint = 'openapi.yaml';
const config = loadConfig('optional/path/to/.redocly.yaml');
const lintResults = await lint({ ref: pathToEntryPoint, config });

Bundle

import { formatProblems, bundle, loadConfig } from '@redocly/openapi-core';

const pathToEntryPoint = 'openapi.yaml';
const config = loadConfig('optional/path/to/.redocly.yaml');
const { bundle, problems } = await bundle({ ref: pathToEntryPoint, config });