Skip to content

Commit

Permalink
add state attribute to the process_schema_type and make_type_from_sch…
Browse files Browse the repository at this point in the history
…ema_or_ref
  • Loading branch information
ixzzd committed Feb 17, 2025
1 parent 7b20975 commit f62cd25
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/generator.ml
Original file line number Diff line number Diff line change
Expand Up @@ -278,7 +278,7 @@ and process_one_of state ~ancestors (schemas_or_refs : schema or_ref list) =
match (merge_all_of schema).typ with
| Some Array -> concat_camelCase (process_array_type state ~ancestors schema)
| Some Object -> "Json"
| _ -> variant_name (process_schema_type ~ancestors schema)
| _ -> variant_name (process_schema_type state ~ancestors schema)
in
let make_one_of_variant schema_or_ref =
let variant_name = determine_variant_name schema_or_ref in
Expand Down Expand Up @@ -314,7 +314,7 @@ let process_schemas state (schemas : (string * schema or_ref) list) =
| Ref _ -> None
| Obj schema -> schema.description
in
define_type state ~doc ~name ~type_:(make_type_from_schema_or_ref ~ancestors:[ name ] schema_or_ref) :: acc
define_type state ~doc ~name ~type_:(make_type_from_schema_or_ref state ~ancestors:[ name ] schema_or_ref) :: acc
)
[] schemas

Expand Down

0 comments on commit f62cd25

Please sign in to comment.