@typespec/openapi3
Advanced tools
Comparing version 0.45.0-dev.7 to 0.45.0-dev.8
@@ -1,6 +0,6 @@ | ||
import { DecoratorContext, Program, Type } from "@typespec/compiler"; | ||
export declare function $useRef(context: DecoratorContext, entity: Type, refUrl: string): void; | ||
import { DecoratorContext, Model, ModelProperty, Program, Type, Union } from "@typespec/compiler"; | ||
export declare function $useRef(context: DecoratorContext, entity: Model | ModelProperty, refUrl: string): void; | ||
export declare function getRef(program: Program, entity: Type): string | undefined; | ||
export declare function $oneOf(context: DecoratorContext, entity: Type): void; | ||
export declare function $oneOf(context: DecoratorContext, entity: Union): void; | ||
export declare function getOneOf(program: Program, entity: Type): boolean; | ||
//# sourceMappingURL=decorators.d.ts.map |
@@ -1,8 +0,4 @@ | ||
import { validateDecoratorTarget } from "@typespec/compiler"; | ||
import { createStateSymbol } from "./lib.js"; | ||
const refTargetsKey = createStateSymbol("refs"); | ||
export function $useRef(context, entity, refUrl) { | ||
if (!validateDecoratorTarget(context, entity, "@useRef", ["Model", "ModelProperty"])) { | ||
return; | ||
} | ||
context.program.stateMap(refTargetsKey).set(entity, refUrl); | ||
@@ -15,5 +11,2 @@ } | ||
export function $oneOf(context, entity) { | ||
if (!validateDecoratorTarget(context, entity, "@oneOf", "Union")) { | ||
return; | ||
} | ||
context.program.stateMap(oneOfKey).set(entity, true); | ||
@@ -20,0 +13,0 @@ } |
{ | ||
"name": "@typespec/openapi3", | ||
"version": "0.45.0-dev.7", | ||
"version": "0.45.0-dev.8", | ||
"author": "Microsoft Corporation", | ||
@@ -21,2 +21,3 @@ "description": "TypeSpec library for emitting OpenAPI 3.0 from the TypeSpec REST protocol binding", | ||
"main": "dist/src/index.js", | ||
"tspMain": "lib/main.tsp", | ||
"exports": { | ||
@@ -36,3 +37,2 @@ ".": "./dist/src/index.js", | ||
}, | ||
"tspMain": "dist/src/index.js", | ||
"engines": { | ||
@@ -39,0 +39,0 @@ "node": ">=16.0.0" |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
185792
29
2568