MCPcopy Create free account
hub / github.com/Effect-TS/effect / onEnter

Function onEnter

packages/tools/ai-codegen/src/Generator.ts:185–194  ·  view source on GitHub ↗
(js: JsonSchema.JsonSchema)

Source from the content-addressed store, hash-verified

183
184 const exclude = excludeAnnotations ? new Set(excludeAnnotations) : undefined
185 const onEnter = (js: JsonSchema.JsonSchema): JsonSchema.JsonSchema => {
186 const out = { ...normalizeOpenEnum(js) }
187 if (exclude) {
188 for (const key of exclude) delete out[key]
189 }
190 if (disableAdditionalProperties && out.type === "object") {
191 out.additionalProperties = false
192 }
193 return out
194 }
195
196 return yield* openApiGen
197 .generate(patchedSpec as unknown as Parameters<typeof openApiGen.generate>[0], {

Callers

nothing calls this directly

Calls 1

normalizeOpenEnumFunction · 0.85

Tested by

no test coverage detected