@typespec/openapi3
Advanced tools
Comparing version 0.53.0-dev.0 to 0.53.0-dev.1
@@ -195,3 +195,3 @@ var __classPrivateFieldSet = (this && this.__classPrivateFieldSet) || function (receiver, state, value, kind, f) { | ||
__classPrivateFieldGet(this, _OpenAPI3SchemaEmitter_instances, "m", _OpenAPI3SchemaEmitter_attachExtensions).call(this, program, prop, additionalProps); | ||
if (schema && isRef) { | ||
if (schema && isRef && !(prop.type.kind === "Model" && isArrayModelType(program, prop.type))) { | ||
if (Object.keys(additionalProps).length === 0) { | ||
@@ -212,3 +212,3 @@ return schema; | ||
} | ||
const merged = new ObjectBuilder(schema); | ||
const merged = ensureObjectBuilder(schema); | ||
for (const [key, value] of Object.entries(additionalProps)) { | ||
@@ -709,2 +709,10 @@ merged.set(key, value); | ||
} | ||
function ensureObjectBuilder(type) { | ||
if (type instanceof ObjectBuilder) { | ||
return type; | ||
} | ||
else { | ||
return new ObjectBuilder(type); | ||
} | ||
} | ||
const B = { | ||
@@ -711,0 +719,0 @@ array: (items) => { |
{ | ||
"name": "@typespec/openapi3", | ||
"version": "0.53.0-dev.0", | ||
"version": "0.53.0-dev.1", | ||
"author": "Microsoft Corporation", | ||
"description": "TypeSpec library for emitting OpenAPI 3.0 from the TypeSpec REST protocol binding", | ||
"homepage": "https://microsoft.github.io/typespec", | ||
"homepage": "https://typespec.io", | ||
"readme": "https://github.com/microsoft/typespec/blob/main/README.md", | ||
@@ -59,3 +59,3 @@ "license": "MIT", | ||
"@typespec/eslint-plugin": "~0.52.0 || >=0.53.0-dev <0.53.0", | ||
"@typespec/tspd": "~0.46.0 || >=0.47.0-dev <0.47.0", | ||
"@typespec/tspd": "~0.46.0", | ||
"eslint": "^8.55.0", | ||
@@ -75,2 +75,3 @@ "vitest": "^1.2.0", | ||
"test": "vitest run", | ||
"test:watch": "vitest -w", | ||
"test:ui": "vitest --ui", | ||
@@ -77,0 +78,0 @@ "test-official": "vitest run --coverage --reporter=junit --reporter=default --no-file-parallelism", |
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
259457
3318