fix(core): use current workspace with /new; fix warping into local project (#25894)
This commit is contained in:
@@ -146,6 +146,16 @@ function matchLegacyOpenApi(input: Record<string, unknown>) {
|
||||
if (properties?.branch) properties.branch = { anyOf: [properties.branch, { type: "null" }] }
|
||||
if (properties?.extra) properties.extra = { anyOf: [properties.extra, { type: "null" }] }
|
||||
}
|
||||
if (path === "/experimental/workspace/warp" && method === "post") {
|
||||
const ref = operation.requestBody.content?.["application/json"]?.schema?.$ref?.replace(
|
||||
"#/components/schemas/",
|
||||
"",
|
||||
)
|
||||
const properties = ref
|
||||
? spec.components?.schemas?.[ref]?.properties
|
||||
: operation.requestBody.content?.["application/json"]?.schema?.properties
|
||||
if (properties?.id) properties.id = { anyOf: [properties.id, { type: "null" }] }
|
||||
}
|
||||
}
|
||||
for (const response of Object.values(operation.responses ?? {})) {
|
||||
for (const content of Object.values(response.content ?? {})) {
|
||||
|
||||
Reference in New Issue
Block a user