fix(ci): restore protocol and schema checks (#37470)

This commit is contained in:
Altay
2026-03-06 11:46:17 +03:00
committed by GitHub
parent 5b03ce77f5
commit ee6f7b1bf0
3 changed files with 91 additions and 1 deletions

View File

@@ -1460,6 +1460,20 @@ public struct ConfigPatchParams: Codable, Sendable {
public struct ConfigSchemaParams: Codable, Sendable {}
public struct ConfigSchemaLookupParams: Codable, Sendable {
public let path: String
public init(
path: String)
{
self.path = path
}
private enum CodingKeys: String, CodingKey {
case path
}
}
public struct ConfigSchemaResponse: Codable, Sendable {
public let schema: AnyCodable
public let uihints: [String: AnyCodable]
@@ -1486,6 +1500,36 @@ public struct ConfigSchemaResponse: Codable, Sendable {
}
}
public struct ConfigSchemaLookupResult: Codable, Sendable {
public let path: String
public let schema: AnyCodable
public let hint: [String: AnyCodable]?
public let hintpath: String?
public let children: [[String: AnyCodable]]
public init(
path: String,
schema: AnyCodable,
hint: [String: AnyCodable]?,
hintpath: String?,
children: [[String: AnyCodable]])
{
self.path = path
self.schema = schema
self.hint = hint
self.hintpath = hintpath
self.children = children
}
private enum CodingKeys: String, CodingKey {
case path
case schema
case hint
case hintpath = "hintPath"
case children
}
}
public struct WizardStartParams: Codable, Sendable {
public let mode: AnyCodable?
public let workspace: String?

View File

@@ -1460,6 +1460,20 @@ public struct ConfigPatchParams: Codable, Sendable {
public struct ConfigSchemaParams: Codable, Sendable {}
public struct ConfigSchemaLookupParams: Codable, Sendable {
public let path: String
public init(
path: String)
{
self.path = path
}
private enum CodingKeys: String, CodingKey {
case path
}
}
public struct ConfigSchemaResponse: Codable, Sendable {
public let schema: AnyCodable
public let uihints: [String: AnyCodable]
@@ -1486,6 +1500,36 @@ public struct ConfigSchemaResponse: Codable, Sendable {
}
}
public struct ConfigSchemaLookupResult: Codable, Sendable {
public let path: String
public let schema: AnyCodable
public let hint: [String: AnyCodable]?
public let hintpath: String?
public let children: [[String: AnyCodable]]
public init(
path: String,
schema: AnyCodable,
hint: [String: AnyCodable]?,
hintpath: String?,
children: [[String: AnyCodable]])
{
self.path = path
self.schema = schema
self.hint = hint
self.hintpath = hintpath
self.children = children
}
private enum CodingKeys: String, CodingKey {
case path
case schema
case hint
case hintpath = "hintPath"
case children
}
}
public struct WizardStartParams: Codable, Sendable {
public let mode: AnyCodable?
public let workspace: String?

View File

@@ -272,7 +272,9 @@ describe("config schema", () => {
});
it("rejects overly deep lookup paths", () => {
const buildNestedObjectSchema = (segments: string[]) => {
const buildNestedObjectSchema = (
segments: string[],
): { type: string; properties?: Record<string, unknown> } => {
const [head, ...rest] = segments;
if (!head) {
return { type: "string" };