{
  "version": 1,
  "format": "json",
  "kind": "recommend-options",
  "mode": "quick",
  "rules_revision": "2026-10-19",
  "calibrated_presets": "20261017",
  "input": {
    "source": "file",
    "input_file_type": "openapi",
    "document": "OpenAPI 3.1.0",
    "analysed": true
  },
  "context": {
    "output_model_type": "pydantic_v2.BaseModel",
    "target_python_version": "3.10"
  },
  "signals": {
    "all_enums": 0,
    "boolean_exclusive_bounds": 0,
    "coercible_scalars": 0,
    "component_enums": 0,
    "component_title_duplicate_groups": 0,
    "component_titles_equal_other_key": 0,
    "component_titles_equal_own_key": 0,
    "component_titles_in_duplicate_groups": 0,
    "components": 2,
    "decimal_formats": 0,
    "discriminated_unions": 0,
    "dotted_key_namespaces": 0,
    "dotted_keys": 0,
    "dotted_namespace_reference_cycles": 0,
    "duplicate_inline_enum_shapes": 0,
    "duplicate_inline_enums": 0,
    "duplicate_inline_objects": 0,
    "duplicate_inline_shapes": 0,
    "enums_beside_const": 0,
    "estimated_models": 6,
    "formats": 0,
    "inline_enums": 0,
    "inline_names_equal_component": 0,
    "inline_object_bodies": 0,
    "inline_object_union_variants": 2,
    "inline_objects": 2,
    "inline_scalar_union_variants": 0,
    "inline_tagged_union_branches": 2,
    "inline_title_max_repeat": 1,
    "inline_titled_objects": 2,
    "inline_titled_union_variants": 2,
    "inline_union_variants": 2,
    "integer_range_formats": 0,
    "max_inline_depth": 1,
    "multiple_of": 0,
    "nullable_keywords": 0,
    "operations": 0,
    "parent_copy_union_branches": 0,
    "pattern_properties": 0,
    "redundant_constraints": 0,
    "root_is_object": 0,
    "root_title_words": 0,
    "shared_inline_enum_names": 0,
    "shared_inline_names": 0,
    "shared_inline_object_names": 0,
    "single_key_required_open": 0,
    "single_key_union_branches": 0,
    "single_value_enum_union_branches": 0,
    "single_value_enums": 0,
    "tagged_behind_ref": 0,
    "titled_components": 0,
    "unions": 1,
    "unique_items": 0,
    "unmodeled_pattern_properties": 0
  },
  "facts": {
    "schema": "OpenAPI 3.1.0",
    "scopes": "schemas",
    "shared_inline_name_examples": "",
    "inline_title_examples": "Card x1, Bank Account x1",
    "duplicate_title_examples": "",
    "key_style": "PascalCase (2 of 2)",
    "root_title": "",
    "format_examples": ""
  },
  "baseline": {
    "preset": "standard-py310-20261027",
    "family": "standard",
    "configured": false,
    "covers": []
  },
  "recommendations": [
    {
      "rule": "titles.names-from-unique-titles",
      "decision": "title-source",
      "set": {
        "use_title_as_name": true
      },
      "arguments": [
        "--use-title-as-name"
      ],
      "reason": "Inline union variants carry titles that no other schema uses (titled variants: 2, e.g. Card x1, Bank Account x1). Titles name them after what they are, instead of their parent property and a number.",
      "contested_reason": null,
      "caveats": [],
      "evidence": [
        "Train Travel API: BookingPayment.source variants became Card and BankAccount instead of Source and Source1"
      ],
      "trial": null
    },
    {
      "rule": "unions.name-variants-after-tags",
      "decision": "union-variant-names",
      "set": {
        "use_tag_as_union_variant_name": true
      },
      "arguments": [
        "--use-tag-as-union-variant-name"
      ],
      "reason": "Inline oneOf/anyOf branches can be named after a tag or key (branches with a tag value no sibling shares: 2; objects with one required key: 0); otherwise they are named after their parent and a number.",
      "contested_reason": null,
      "caveats": [],
      "evidence": [
        "OpenAI API description (59 tagged, 10 key branches): preset 797 -> 759 problem names (ThreadStreamEvent1 -> ThreadStreamEventThreadCreated)",
        "GitHub REST API description (1 tagged, 4 key branches): preset 1808 -> 1805 (Changes23 -> ChangesBody)",
        "SchemaStore workflow schema (5 tagged): 49 -> 44 (WorkflowDispatchInput1 to 5 -> WorkflowDispatchInputString, Boolean, ...)",
        "with full-path on the GitHub and OpenAI descriptions: no change in problem names; schemas without tagged or key branches: no change"
      ],
      "trial": null
    }
  ],
  "left_out": [],
  "consider": [],
  "validation": [],
  "policy": [],
  "not_recommended": [],
  "disagreements": [],
  "trial": null,
  "notes": [
    "Target Python is not set: the recommendation assumes 3.10, the default. Set --target-python-version to start from the preset of the Python version the project runs.",
    "The rules were calibrated on the 20261017 presets."
  ],
  "arguments": [
    "--input",
    "schema's.yaml",
    "--preset",
    "standard-py310-20261027",
    "--use-tag-as-union-variant-name",
    "--use-title-as-name"
  ],
  "config": {
    "tool": {
      "datamodel-codegen": {
        "input": "schema's.yaml",
        "preset": "standard-py310-20261027",
        "use-tag-as-union-variant-name": true,
        "use-title-as-name": true
      }
    }
  },
  "config_complete": true,
  "content": "Option recommendations (experimental; quick mode; rules 2026-10-19)\n\nSchema  OpenAPI 3.1.0 (OpenAPI scopes: schemas)\n  components                       2, 0 operations\n  inline objects / enums           2 / 0, nesting depth 1\n  shared property names            0 (none)\n  inline names = component names   0\n  repeated inline objects / enums  0 of 0 shapes / 0 of 0 value sets\n  titled components                0: 0 shared titles (none), 0 equal another key, 0 equal their own key\n  inline titles                    2 objects, most repeated 1 (Card x1, Bank Account x1)\n  unions                           1 oneOf/anyOf, 0 with a discriminator, 2 inline variants\n  union branch tags                2 tagged, 0 single required key, 0 tagged only through allOf $ref, 0 copy their parent\n  component keys                   PascalCase (2 of 2); 0 dotted in 0 namespaces\n  constraint keywords              uniqueItems 0, patternProperties 0 (0 beyond a typed map), multipleOf 0, OpenAPI 3.0 nullable 0, boolean exclusive bounds 0\n  formats                          0 (none), decimal 0; int32/int64 0, ranges not enforced\n  integer/number/boolean schemas   0\n\nStart from  --preset standard-py310-20261027\n\nAdd (2 options)\n  --use-title-as-name   [titles.names-from-unique-titles]\n      Inline union variants carry titles that no other schema uses (titled variants: 2, e.g. Card\n      x1, Bank Account x1). Titles name them after what they are, instead of their parent property\n      and a number.\n      measured: Train Travel API: BookingPayment.source variants became Card and BankAccount instead\n      of Source and Source1\n  --use-tag-as-union-variant-name   [unions.name-variants-after-tags]\n      Inline oneOf/anyOf branches can be named after a tag or key (branches with a tag value no\n      sibling shares: 2; objects with one required key: 0); otherwise they are named after their\n      parent and a number.\n      measured: OpenAI API description (59 tagged, 10 key branches): preset 797 -> 759 problem names\n      (ThreadStreamEvent1 -> ThreadStreamEventThreadCreated)\n      measured: GitHub REST API description (1 tagged, 4 key branches): preset 1808 -> 1805\n      (Changes23 -> ChangesBody)\n      measured: SchemaStore workflow schema (5 tagged): 49 -> 44 (WorkflowDispatchInput1 to 5 ->\n      WorkflowDispatchInputString, Boolean, ...)\n      measured: with full-path on the GitHub and OpenAI descriptions: no change in problem names;\n      schemas without tagged or key branches: no change\n\nNotes\n  - Target Python is not set: the recommendation assumes 3.10, the default. Set\n    --target-python-version to start from the preset of the Python version the project runs.\n  - The rules were calibrated on the 20261017 presets.\n\nCommand\n  datamodel-codegen --input 'schema'\"'\"'s.yaml' --preset standard-py310-20261027 --use-tag-as-union-variant-name --use-title-as-name\n\npyproject.toml\n  [tool.datamodel-codegen]\n  input = \"schema's.yaml\"\n  preset = \"standard-py310-20261027\"\n  use-tag-as-union-variant-name = true\n  use-title-as-name = true\n"
}
