OpenAPI Generator allows generation of API client libraries (SDK generation), server stubs, documentation and configuration automatically given an OpenAPI Spec (v2, v3)
I had the same problem. I fixed it with adding the converter as global property --global-property models,modelTests=false,modelDocs=false,supportingFiles=OpenAPIDateConverter.cs
Bug Report Checklist
Description
openapi-generator version
7.0.1
OpenAPI declaration file content or url
Generation Details
openapi-generator-cli generate -g csharp --input-spec spec.yaml --output output --package-name "Spec.Client" --global-property models,modelTests=false,modelDocs=false -p targetFramework=net6.0
output of BearerToken.cs (and SubObject.cs, and every model for larger specs) contains:
That causes build errors: The type or namespace name 'Client' does not exist in the namespace 'Spec.Client' (are you missing an assembly reference?)
Steps to reproduce
Run the generator with
--global-property models