diff --git a/openapi/failure.schema.json b/openapi/failure.schema.json index e0226145c..1bbd2b424 100644 --- a/openapi/failure.schema.json +++ b/openapi/failure.schema.json @@ -99,25 +99,6 @@ "maxLength": 128, "minLength": 1 }, - "Diagnostic": { - "type": "object", - "properties": { - "code": { - "type": "string", - "maxLength": 128, - "minLength": 1 - }, - "explanation": { - "type": "string", - "maxLength": 2048, - "minLength": 1 - } - }, - "required": [ - "code", - "explanation" - ] - }, "FailureContext": { "description": "Common metadata is untrusted after deserialization. No audience label confers trust.", "type": "object", @@ -143,7 +124,7 @@ "diagnostics": { "type": "array", "items": { - "$ref": "#/$defs/Diagnostic" + "$ref": "#/$defs/FailureDiagnostic" }, "maxItems": 8 }, @@ -165,6 +146,25 @@ "supplementary_omitted" ] }, + "FailureDiagnostic": { + "type": "object", + "properties": { + "code": { + "type": "string", + "maxLength": 128, + "minLength": 1 + }, + "explanation": { + "type": "string", + "maxLength": 2048, + "minLength": 1 + } + }, + "required": [ + "code", + "explanation" + ] + }, "OperationContext": { "type": "object", "properties": { diff --git a/openapi/problem-details.schema.json b/openapi/problem-details.schema.json index 91788cbfb..768cc1330 100644 --- a/openapi/problem-details.schema.json +++ b/openapi/problem-details.schema.json @@ -82,25 +82,6 @@ "maxLength": 128, "minLength": 1 }, - "Diagnostic": { - "type": "object", - "properties": { - "code": { - "type": "string", - "maxLength": 128, - "minLength": 1 - }, - "explanation": { - "type": "string", - "maxLength": 2048, - "minLength": 1 - } - }, - "required": [ - "code", - "explanation" - ] - }, "FailureContext": { "description": "Common metadata is untrusted after deserialization. No audience label confers trust.", "type": "object", @@ -126,7 +107,7 @@ "diagnostics": { "type": "array", "items": { - "$ref": "#/$defs/Diagnostic" + "$ref": "#/$defs/FailureDiagnostic" }, "maxItems": 8 }, @@ -148,6 +129,25 @@ "supplementary_omitted" ] }, + "FailureDiagnostic": { + "type": "object", + "properties": { + "code": { + "type": "string", + "maxLength": 128, + "minLength": 1 + }, + "explanation": { + "type": "string", + "maxLength": 2048, + "minLength": 1 + } + }, + "required": [ + "code", + "explanation" + ] + }, "FailureEnvelope": { "description": "DTO/schema source only. Deserialization does not produce a ProjectedFailure.", "type": "object",