[cpp-restsdk] store Object as a shared pointer (#21349)

* [cpp-restsdk] store Object as a shared pointer

* [cpp-restsdk] add test for object property
This commit is contained in:
Amin Ya
2025-06-09 23:53:55 -07:00
committed by GitHub
parent fa64c8e012
commit 12fa2c0032
5 changed files with 62 additions and 0 deletions

View File

@@ -387,6 +387,8 @@ public class CppRestSdkClientCodegen extends AbstractCppCodegen {
|| ModelUtils.isFileSchema(p) || ModelUtils.isUUIDSchema(p)
|| languageSpecificPrimitives.contains(openAPIType)) {
return toModelName(openAPIType);
} else if (ModelUtils.isObjectSchema(p)) {
return "std::shared_ptr<Object>";
} else if(typeMapping.containsKey(super.getSchemaType(p))) {
return openAPIType;
}

View File

@@ -798,6 +798,8 @@ components:
- available
- pending
- sold
metadata:
type: object
xml:
name: Pet
Color: