OpenAPITools / openapi-generator

OpenAPI Generator allows generation of API client libraries (SDK generation), server stubs, documentation and configuration automatically given an OpenAPI Spec (v2, v3)
https://openapi-generator.tech
Apache License 2.0
21.46k stars 6.49k forks source link

clone Schema using AnnotationUtils.clone with WA #18867

Closed dreambrother closed 3 months ago

dreambrother commented 3 months ago

Fix for https://github.com/OpenAPITools/openapi-generator/pull/18052#issuecomment-2149371425 @wing328

Getter and setter of Schema's example field works with Object class, this breaks serializer added in https://github.com/OpenAPITools/openapi-generator/pull/18052. I've replaced it with AnnotationUtils.clone call with some workaround for custom types for schema ver < 3.1 (looks like this method works fine with 3.1 schemas https://github.com/OpenAPITools/openapi-generator/pull/18052#discussion_r1600905187)

PR checklist