Move C++ virtual destructor definition to .cpp files (#21529)#21530
Move C++ virtual destructor definition to .cpp files (#21529)#21530wing328 merged 2 commits intoOpenAPITools:masterfrom
Conversation
|
Also, we probably want to look at why the destructors were/are not noexcept. And there is an actual issue with the restbed cpp generator, it's creating classes inheriting from restbedcpp "Resource" which has a delete copy ctor, but these derived class define a default copy ctor, I'm not sure how that can work. The delete copy ctor in restbed cpp has been like this for 10 years. Are there enough tests for this? |
|
thanks for the pr please follow step 3 in the pr checklist to update the samples |
That's now done, in a 2nd commit in this PR. There is 1 file I didn't commit, however, because I don't think this is due to any code changes of mine, it's a java generated file: index 5062b4c48e..86be74c431 100644
--- a/samples/openapi3/server/petstore/spring-boot-oneof-sealed/src/main/java/org/openapitools/model/Fruit.java
+++ b/samples/openapi3/server/petstore/spring-boot-oneof-sealed/src/main/java/org/openapitools/model/Fruit.java
@@ -30,9 +30,7 @@ import javax.annotation.Generated;
@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "fruitType", visible = true)
@JsonSubTypes({
@JsonSubTypes.Type(value = Apple.class, name = "APPLE"),
- @JsonSubTypes.Type(value = Banana.class, name = "BANANA"),
- @JsonSubTypes.Type(value = Apple.class, name = "Apple"),
- @JsonSubTypes.Type(value = Banana.class, name = "Banana")
+ @JsonSubTypes.Type(value = Banana.class, name = "BANANA")
})
@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.15.0-SNAPSHOT")```
My JAVA_HOME is set to be /usr/ as this is where "java" is installed on my machine
java --version
openjdk 11.0.27 2025-04-15
OpenJDK Runtime Environment (build 11.0.27+6-post-Ubuntu-0ubuntu122.04)
OpenJDK 64-Bit Server VM (build 11.0.27+6-post-Ubuntu-0ubuntu122.04, mixed mode, sharing) |
that should be updated in the latest master |
|
thanks again for the pr is it correct to say that you've tested the change locally in your environment (e.g. production) and confirm it's working for your use cases? |
|
fyi @ravinikam (2017/07) @stkrwork (2017/07) @etherealjoy (2018/02) @MartinDelille (2018/03) @muttleyxd (2019/08) @aminya (2025/05) |
|
Approved |
) (OpenAPITools#21530) * Move C++ virtual destructor definition to .cpp files (OpenAPITools#21529) * Subsequent commit with codegened C++ - PR step 3 (OpenAPITools#21529)
#21529