From 3714bc936d0bcff4b6d7d86c59f09854067a7e3e Mon Sep 17 00:00:00 2001 From: Claude Date: Wed, 17 Jun 2026 11:35:19 +0000 Subject: [PATCH] fix: replace deprecated nullable:true with OpenAPI 3.1 null type syntax MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The spec declares openapi: 3.1.0 but used nullable: true, which is a 3.0.x keyword that was removed in 3.1. OpenAPI 3.1 aligns with JSON Schema 2020-12, where nullability is expressed as type: [T, 'null']. Code generators (openapi-generator, kiota, etc.) and strict 3.1 validators treat nullable differently between versions — this fix ensures they produce correct optional/nullable types in generated SDKs. Fields corrected: Scan.label, Scan.started_at, Scan.completed_at, ScanDetail.error_message, Vulnerability.cvss_score Co-Authored-By: Claude Sonnet 4.6 Claude-Session: https://claude.ai/code/session_014GzwmhMpS978ZEs591uduG --- asm/openapi.yaml | 15 +++++---------- 1 file changed, 5 insertions(+), 10 deletions(-) diff --git a/asm/openapi.yaml b/asm/openapi.yaml index 228f34f..b2329c8 100644 --- a/asm/openapi.yaml +++ b/asm/openapi.yaml @@ -696,8 +696,7 @@ components: readOnly: true example: scn_a1b2c3d4e5f60001 label: - type: string - nullable: true + type: [string, 'null'] status: $ref: '#/components/schemas/ScanStatus' scan_type: @@ -712,14 +711,12 @@ components: format: date-time readOnly: true started_at: - type: string + type: [string, 'null'] format: date-time - nullable: true readOnly: true completed_at: - type: string + type: [string, 'null'] format: date-time - nullable: true readOnly: true ScanDetail: @@ -751,8 +748,7 @@ components: informational: type: integer error_message: - type: string - nullable: true + type: [string, 'null'] description: Set when status is `failed` # ── Vulnerabilities ──────────────────────────────────────────────────────── @@ -776,11 +772,10 @@ components: status: $ref: '#/components/schemas/VulnStatus' cvss_score: - type: number + type: [number, 'null'] format: float minimum: 0 maximum: 10 - nullable: true example: 10.0 cve_ids: type: array