From 42755edb250640b6ad5247a062c0b70c038c6564 Mon Sep 17 00:00:00 2001 From: Sebastien Mondet Date: Wed, 27 Nov 2024 15:47:33 -0500 Subject: [PATCH] Add missing types (a.k.a. `json`) as comments --- lib/generator.ml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/generator.ml b/lib/generator.ml index 3efa414..b7d1be1 100644 --- a/lib/generator.ml +++ b/lib/generator.ml @@ -184,7 +184,7 @@ let rec process_schema_type state ~ancestors (schema : schema) = | Some Object -> process_object_type state ~ancestors schema | None -> (* fallback to untyped if schema type is not defined *) - maybe_nullable "json" + Printf.ksprintf maybe_nullable "json (* %s *)" (String.concat "/" (List.rev ancestors)) and process_array_type state ~ancestors schema = match schema.items with