Files: src/OpenApiSourceGenerator/OpenApiSourceGenerator.cs, src/OpenApiSourceGenerator/Processors/SchemaProcessor.cs
context.AddSource($"{codeGenerationResult.Name}.g.cs", codeGenerationResult.Code);
Nested-object classes are named after the property name. Two unrelated schemas with a same-named nested object (e.g. two different address properties in different schemas) will both attempt to emit Address.g.cs, causing AddSource to throw (hint names must be unique per generator run).
Suggested fix: Namespace/qualify hint names (e.g. by parent schema or document name) to guarantee uniqueness, or track already-used names and disambiguate.
Files:
src/OpenApiSourceGenerator/OpenApiSourceGenerator.cs,src/OpenApiSourceGenerator/Processors/SchemaProcessor.csNested-object classes are named after the property name. Two unrelated schemas with a same-named nested object (e.g. two different
addressproperties in different schemas) will both attempt to emitAddress.g.cs, causingAddSourceto throw (hint names must be unique per generator run).Suggested fix: Namespace/qualify hint names (e.g. by parent schema or document name) to guarantee uniqueness, or track already-used names and disambiguate.