generated from SAP/repository-template
-
Notifications
You must be signed in to change notification settings - Fork 14
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(openapi-generator): Allow for primitives in anyOf/oneOf componen…
…t schema definitions (#681) Co-authored-by: Alexander Dümont <alexander_duemont@web.de>
- Loading branch information
Showing
21 changed files
with
827 additions
and
18 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
85 changes: 85 additions & 0 deletions
85
...pi-sample/src/main/java/com/sap/cloud/sdk/datamodel/openapi/sample/model/FantaFlavor.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,85 @@ | ||
/* | ||
* Copyright (c) 2025 SAP SE or an SAP affiliate company. All rights reserved. | ||
*/ | ||
|
||
/* | ||
* SodaStore API | ||
* API for managing soda products and orders in SodaStore. | ||
* | ||
* | ||
* | ||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). | ||
* https://openapi-generator.tech | ||
* Do not edit the class manually. | ||
*/ | ||
|
||
package com.sap.cloud.sdk.datamodel.openapi.sample.model; | ||
|
||
import javax.annotation.Nonnull; | ||
|
||
import com.fasterxml.jackson.annotation.JsonCreator; | ||
import com.fasterxml.jackson.annotation.JsonValue; | ||
|
||
/** | ||
* FantaFlavor | ||
*/ | ||
public interface FantaFlavor | ||
{ | ||
/** | ||
* Helper class to create a Integer that implements {@link FantaFlavor}. | ||
*/ | ||
record InnerInteger(@com.fasterxml.jackson.annotation.JsonValue @Nonnull Integer value) implements FantaFlavor {} | ||
|
||
/** | ||
* Creator to enable deserialization of a Integer. | ||
* | ||
* @param val | ||
* the value to use | ||
* @return a new instance of {@link InnerInteger}. | ||
*/ | ||
@com.fasterxml.jackson.annotation.JsonCreator | ||
@Nonnull | ||
static InnerInteger create( @Nonnull final Integer val ) | ||
{ | ||
return new InnerInteger(val); | ||
} | ||
|
||
/** | ||
* Helper class to create a FantaFlavorOneOf that implements {@link FantaFlavor}. | ||
*/ | ||
record InnerFantaFlavorOneOf(@com.fasterxml.jackson.annotation.JsonValue @Nonnull FantaFlavorOneOf value) implements FantaFlavor {} | ||
|
||
/** | ||
* Creator to enable deserialization of a FantaFlavorOneOf. | ||
* | ||
* @param val | ||
* the value to use | ||
* @return a new instance of {@link InnerFantaFlavorOneOf}. | ||
*/ | ||
@com.fasterxml.jackson.annotation.JsonCreator | ||
@Nonnull | ||
static InnerFantaFlavorOneOf create( @Nonnull final FantaFlavorOneOf val ) | ||
{ | ||
return new InnerFantaFlavorOneOf(val); | ||
} | ||
|
||
/** | ||
* Helper class to create a String that implements {@link FantaFlavor}. | ||
*/ | ||
record InnerString(@com.fasterxml.jackson.annotation.JsonValue @Nonnull String value) implements FantaFlavor {} | ||
|
||
/** | ||
* Creator to enable deserialization of a String. | ||
* | ||
* @param val | ||
* the value to use | ||
* @return a new instance of {@link InnerString}. | ||
*/ | ||
@com.fasterxml.jackson.annotation.JsonCreator | ||
@Nonnull | ||
static InnerString create( @Nonnull final String val ) | ||
{ | ||
return new InnerString(val); | ||
} | ||
|
||
} |
Oops, something went wrong.