@typespec/openapi3
Version:
TypeSpec library for emitting OpenAPI 3.0 and OpenAPI 3.1 from the TypeSpec REST protocol binding and converting OpenAPI3 to TypeSpec
11 lines • 386 B
JavaScript
import { getExtensions } from "@typespec/openapi";
export function attachExtensions(program, type, emitObject) {
// Attach any OpenAPI extensions
const extensions = getExtensions(program, type);
if (extensions) {
for (const key of extensions.keys()) {
emitObject[key] = extensions.get(key);
}
}
}
//# sourceMappingURL=attach-extensions.js.map