@kubb/adapter-oas 5.0.0-beta.2 → 5.0.0-beta.21

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.d.ts CHANGED
@@ -1,6 +1,6 @@
1
1
  import { t as __name } from "./chunk--u3MIqq1.js";
2
2
  import * as _$_kubb_core0 from "@kubb/core";
3
- import { AdapterFactoryOptions, AdapterSource, ast } from "@kubb/core";
3
+ import { AdapterFactoryOptions, ast } from "@kubb/core";
4
4
  import { DiscriminatorObject as DiscriminatorObject$2, MediaTypeObject as MediaTypeObject$2, OASDocument, ResponseObject as ResponseObject$2, SchemaObject as SchemaObject$2 } from "oas/types";
5
5
  import { Operation as Operation$1 } from "oas/operation";
6
6
 
@@ -525,30 +525,9 @@ declare const adapterOasName = "oas";
525
525
  declare const adapterOas: (options?: AdapterOasOptions | undefined) => _$_kubb_core0.Adapter<AdapterOas>;
526
526
  //#endregion
527
527
  //#region src/factory.d.ts
528
- type ParseOptions = {
529
- canBundle?: boolean;
530
- enablePaths?: boolean;
531
- };
532
528
  type ValidateDocumentOptions = {
533
529
  throwOnError?: boolean;
534
530
  };
535
- /**
536
- * Loads and dereferences an OpenAPI document, returning the raw `Document`.
537
- *
538
- * Accepts a file path string or an already-parsed document object. File paths are bundled via
539
- * Redocly to resolve external `$ref`s. Swagger 2.0 documents are automatically up-converted
540
- * to OpenAPI 3.0 via `swagger2openapi`.
541
- *
542
- * @example
543
- * ```ts
544
- * const document = await parseDocument('./openapi.yaml')
545
- * const document = await parse(rawDocumentObject, { canBundle: false })
546
- * ```
547
- */
548
- declare function parseDocument(pathOrApi: string | Document, {
549
- canBundle,
550
- enablePaths
551
- }?: ParseOptions): Promise<Document>;
552
531
  /**
553
532
  * Deep-merges multiple OpenAPI documents into a single `Document`.
554
533
  *
@@ -561,32 +540,6 @@ declare function parseDocument(pathOrApi: string | Document, {
561
540
  * ```
562
541
  */
563
542
  declare function mergeDocuments(pathOrApi: Array<string | Document>): Promise<Document>;
564
- /**
565
- * Creates a `Document` from an `AdapterSource`.
566
- *
567
- * Handles all three source types:
568
- * - `{ type: 'path' }` — resolves and bundles a local file path or remote URL.
569
- * - `{ type: 'paths' }` — merges multiple file paths into a single document.
570
- * - `{ type: 'data' }` — parses an inline string (YAML/JSON) or raw object.
571
- *
572
- * @example
573
- * ```ts
574
- * const document = await parseFromConfig({ type: 'path', path: './openapi.yaml' })
575
- * const document = await parseFromConfig({ type: 'data', data: '{"openapi":"3.0.0",...}' })
576
- * ```
577
- */
578
- declare function parseFromConfig(source: AdapterSource): Promise<Document>;
579
- /**
580
- * Validates an OpenAPI document using `oas-normalize` with colorized error output.
581
- *
582
- * @example
583
- * ```ts
584
- * await validateDocument(document)
585
- * ```
586
- */
587
- declare function validateDocument(document: Document, {
588
- throwOnError
589
- }?: ValidateDocumentOptions): Promise<void>;
590
543
  //#endregion
591
- export { type AdapterOas, type AdapterOasOptions, type AdapterOasResolvedOptions, type ContentType, type DiscriminatorObject$1 as DiscriminatorObject, type Document, type HttpMethod, HttpMethods$1 as HttpMethods, type MediaTypeObject$1 as MediaTypeObject, type Operation, type ParseOptions, type ReferenceObject$1 as ReferenceObject, type ResponseObject$1 as ResponseObject, type SchemaObject$1 as SchemaObject, type ValidateDocumentOptions, adapterOas, adapterOasName, mergeDocuments, parseDocument, parseFromConfig, validateDocument };
544
+ export { type AdapterOas, type AdapterOasOptions, type AdapterOasResolvedOptions, type ContentType, type DiscriminatorObject$1 as DiscriminatorObject, type Document, type HttpMethod, HttpMethods$1 as HttpMethods, type MediaTypeObject$1 as MediaTypeObject, type Operation, type ReferenceObject$1 as ReferenceObject, type ResponseObject$1 as ResponseObject, type SchemaObject$1 as SchemaObject, type ValidateDocumentOptions, adapterOas, adapterOasName, mergeDocuments };
592
545
  //# sourceMappingURL=index.d.ts.map