import type { ParseContext } from '../../context/ParseContext.js'; import type { OpenAPIV3 } from 'openapi-types'; import { OasExample } from './Example.js'; import type { OasRef } from '../ref/Ref.js'; type ToExampleSimpleV3Args = { example: unknown; }; /** * Creates a simple OAS example from a value. * * Converts a raw example value into an OasExample object with basic * fields. Used for simple example scenarios where only the value matters. * * @param args - Arguments containing the example value * @returns OasExample object with the provided value */ export declare const toExampleSimpleV3: ({ example }: ToExampleSimpleV3Args) => OasExample | OasRef<"example">; /** * Arguments for processing OpenAPI v3 examples into OAS example objects. * * Handles both single example and examples collection scenarios, * with context for tracing and error handling. */ export type ToExamplesV3Args = { /** Single example object (OpenAPI v3 format) */ example: OpenAPIV3.ExampleObject | undefined; /** Collection of named examples (OpenAPI v3 format) */ examples: Record | undefined; /** Key name for the example context */ exampleKey: string; /** Parse context for tracing and error handling */ context: ParseContext; }; /** * Processes OpenAPI v3 examples into OAS example objects. * * Handles both single example and examples collection scenarios, * converting them to the internal OAS representation. Provides * warnings when both formats are specified simultaneously. * * @param args - Arguments containing example data and context * @returns Record of processed examples, or undefined if no examples */ export declare const toExamplesV3: ({ example, examples, exampleKey, context }: ToExamplesV3Args) => Record> | undefined; type ToExampleV3Args = { example: OpenAPIV3.ExampleObject | OpenAPIV3.ReferenceObject; context: ParseContext; }; /** * Processes a single OpenAPI v3 example into an OAS example object. * * Converts OpenAPI v3 example objects or references into the internal * OAS representation, handling both direct examples and $ref references. * Processes specification extensions and maintains all example metadata. * * @param args - Arguments containing the example and parsing context * @returns OasExample object or reference to an example */ export declare const toExampleV3: ({ example, context }: ToExampleV3Args) => OasExample | OasRef<"example">; export {}; //# sourceMappingURL=toExamplesV3.d.ts.map