Skip to content

Commit 7bd61ed

Browse files
committed
Initial problem
1 parent cb7a250 commit 7bd61ed

File tree

2 files changed

+16
-3
lines changed
  • datamodel/openapi/openapi-api-sample/src/main

2 files changed

+16
-3
lines changed

datamodel/openapi/openapi-api-sample/src/main/java/com/sap/cloud/sdk/datamodel/openapi/sample/model/Order.java

Lines changed: 15 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@
1616

1717
package com.sap.cloud.sdk.datamodel.openapi.sample.model;
1818

19+
import java.util.HashMap;
1920
import java.util.LinkedHashMap;
2021
import java.util.Map;
2122
import java.util.NoSuchElementException;
@@ -34,7 +35,7 @@
3435
* Order
3536
*/
3637
// CHECKSTYLE:OFF
37-
public class Order
38+
public class Order extends HashMap<String, Object>
3839
// CHECKSTYLE:ON
3940
{
4041
@JsonProperty( "productId" )
@@ -61,6 +62,7 @@ public class Order
6162
*/
6263
protected Order()
6364
{
65+
super();
6466
}
6567

6668
/**
@@ -304,13 +306,22 @@ public boolean equals( @Nullable final java.lang.Object o )
304306
&& Objects.equals(this.quantity, order.quantity)
305307
&& Objects.equals(this.totalPrice, order.totalPrice)
306308
&& Objects.equals(this.typelessProperty, order.typelessProperty)
307-
&& Objects.equals(this.nullableProperty, order.nullableProperty);
309+
&& Objects.equals(this.nullableProperty, order.nullableProperty)
310+
&& super.equals(o);
308311
}
309312

310313
@Override
311314
public int hashCode()
312315
{
313-
return Objects.hash(productId, quantity, totalPrice, typelessProperty, nullableProperty, cloudSdkCustomFields);
316+
return Objects
317+
.hash(
318+
productId,
319+
quantity,
320+
totalPrice,
321+
typelessProperty,
322+
nullableProperty,
323+
cloudSdkCustomFields,
324+
super.hashCode());
314325
}
315326

316327
@Override
@@ -319,6 +330,7 @@ public String toString()
319330
{
320331
final StringBuilder sb = new StringBuilder();
321332
sb.append("class Order {\n");
333+
sb.append(" ").append(toIndentedString(super.toString())).append("\n");
322334
sb.append(" productId: ").append(toIndentedString(productId)).append("\n");
323335
sb.append(" quantity: ").append(toIndentedString(quantity)).append("\n");
324336
sb.append(" totalPrice: ").append(toIndentedString(totalPrice)).append("\n");

datamodel/openapi/openapi-api-sample/src/main/resources/sodastore.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,7 @@ components:
6060
example: 123
6161
Order:
6262
type: object
63+
additionalProperties: true
6364
required:
6465
- productId
6566
- quantity

0 commit comments

Comments
 (0)