File tree Expand file tree Collapse file tree 1 file changed +19
-6
lines changed
Expand file tree Collapse file tree 1 file changed +19
-6
lines changed Original file line number Diff line number Diff line change @@ -16,7 +16,7 @@ namespace Microsoft\Graph\Model;
1616<#
1717if (entity.Name.ToCheckedCase() == "Entity") {
1818#>
19- class <#=entity.Name.ToCheckedCase()#>
19+ class <#=entity.Name.ToCheckedCase()#> implements \JsonSerializable
2020<#
2121} else {
2222#>
@@ -65,11 +65,11 @@ foreach(var property in entity.Properties.Where(prop => prop.Type.GetTypeString(
6565 if (property.IsCollection()) {
6666#>
6767
68- /**
69- * Gets the <#=property.Name#>
70- *
71- * @return array The <#=property.Name#>
72- */
68+ /**
69+ * Gets the <#=property.Name#>
70+ *
71+ * @return array The <#=property.Name#>
72+ */
7373 public function get<#=property.Name.ToCheckedCase()#>()
7474 {
7575 if (array_key_exists("<#=property.Name.ToCamelize()#>", $this->_propDict)) {
@@ -193,5 +193,18 @@ foreach(var property in entity.Properties.Where(prop => prop.Type.GetTypeString(
193193<#
194194 }
195195 }
196+ if (entity.Name.ToCheckedCase() == "Entity") {
197+ #>
198+ /**
199+ * Serializes the object by property array
200+ *
201+ * @return array The list of properties
202+ */
203+ public function jsonSerialize()
204+ {
205+ return $this->getProperties();
206+ }
207+ <#
208+ }
196209#>
197210}
You can’t perform that action at this time.
0 commit comments