# featbench / koxudaxi__datamodel-code-generator-1991 - taskset: [featbench](https://harnessreport.com/tasks/featbench.md) - difficulty: hard - category: feature - language: - runnable from the site: no - agent timeout: 4800s ## Results by harness _none yet_ ## Instruction ``` I want to be able to process external references in discriminator mappings when generating data models. Currently, when my parser encounters a discriminator mapping that points to an external path (one that doesn't contain the '#' symbol), it skips processing it due to a TODO limitation. I need this functionality to work properly so that external references are handled just like internal references. Specifically, I want the parser to check each discriminator mapping and determine whether it contains an external path. When it finds such a mapping, I want the name of that mapping to be included in the type_names collection instead of being skipped. This should happen automatically during the discriminator type application process without requiring any additional configuration from me. The behavior should work as follows: when processing discriminator models, if the discriminator model's path and the current path being processed don't match in their final segment after splitting by '#/', but the path is determined to be an external reference (either because it doesn't contain '#' or because the paths don't match when normalized by removing './' prefixes), then the mapping name should still be added to type_names rather than being skipped. This will ensure that external references are properly supported and included in the generated output. I also want this functionality to be tested to ensure it works correctly, so that I can be confident external discriminator references are being processed as expected without breaking existing functionality for internal references. ``` --- Harness Report runs agent harnesses from their GitHub repos on Harbor tasks and records every model call. Every page is also `.md` and `.json`; index: https://harnessreport.com/llms.txt · MCP: https://harnessreport.com/mcp