@scalar/openapi-types
Version:
Modern OpenAPI types
18 lines (17 loc) • 915 B
JavaScript
import { z } from "zod";
import { CallbackObjectSchema } from "./callback-object.js";
import { OperationObjectSchemaWithoutCallbacks } from "./operation-object-without-callbacks.js";
import { ReferenceObjectSchema } from "./reference-object.js";
const OperationObjectSchema = OperationObjectSchemaWithoutCallbacks.extend({
/**
* A map of possible out-of-band callbacks related to the parent operation. Each value in the map is a
* Path Item Object that describes a set of requests that may be initiated by the API provider and the
* expected responses. The key value used to identify the callback object is an expression, evaluated
* at runtime, that identifies a URL to be used for the callback operation.
*/
"callbacks": z.record(z.string(), z.union([ReferenceObjectSchema, CallbackObjectSchema])).optional()
});
export {
OperationObjectSchema
};
//# sourceMappingURL=operation-object.js.map