Add an option to skip "form" model generation (#700)

* add option to generate all models

* update doc

* rename option to skipFormModel

* update petstore samples

* Update doc

* Update samples
This commit is contained in:
William Cheng 2018-08-17 17:22:30 +08:00 committed by GitHub
parent 1c6ab3f831
commit 0f30a052b2
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
27 changed files with 3702 additions and 12 deletions

View File

@ -106,6 +106,14 @@ java -Dapis -DmodelTests=false {opts}
When using selective generation, _only_ the templates needed for the specific generation will be used.
To skip models defined as the form parameters in "requestBody", please use `skipFormModel` (default to false) (this option is introduced at v3.2.2)
```sh
java -DskipFormModel=true
```
This option will be helpful to skip model generation due to the form parameter, which is defined differently in OAS3 as there's no form parameter in OAS3
### Ignore file format
OpenAPI Generator supports a `.openapi-generator-ignore` file, similar to `.gitignore` or `.dockerignore` you're probably already familiar with.

View File

@ -31,6 +31,7 @@ public class CodegenConstants {
public static final String API_TESTS = "apiTests";
public static final String API_DOCS = "apiDocs";
public static final String WITH_XML = "withXml";
public static final String SKIP_FORM_MODEL = "skipFormModel";
/* /end System Properties */
public static final String API_PACKAGE = "apiPackage";

View File

@ -286,7 +286,7 @@ public class DefaultGenerator extends AbstractGenerator implements Generator {
private void generateModelDocumentation(List<File> files, Map<String, Object> models, String modelName) throws IOException {
for (String templateName : config.modelDocTemplateFiles().keySet()) {
String docExtension = config.getDocExtension();
String suffix = docExtension!=null ? docExtension : config.modelDocTemplateFiles().get(templateName);
String suffix = docExtension != null ? docExtension : config.modelDocTemplateFiles().get(templateName);
String filename = config.modelDocFileFolder() + File.separator + config.toModelDocFilename(modelName) + suffix;
if (!config.shouldOverwrite(filename)) {
LOGGER.info("Skipped overwriting " + filename);
@ -382,6 +382,10 @@ public class DefaultGenerator extends AbstractGenerator implements Generator {
} */
});
Boolean skipFormModel = System.getProperty(CodegenConstants.SKIP_FORM_MODEL) != null ?
Boolean.valueOf(System.getProperty(CodegenConstants.SKIP_FORM_MODEL)) :
getGeneratorPropertyDefaultSwitch(CodegenConstants.SKIP_FORM_MODEL, false);
// process models only
for (String name : modelKeys) {
try {
@ -393,8 +397,13 @@ public class DefaultGenerator extends AbstractGenerator implements Generator {
// don't generate models that are not used as object (e.g. form parameters)
if (unusedModels.contains(name)) {
LOGGER.debug("Model " + name + " not generated since it's marked as unused (due to form parameters)");
continue;
if (Boolean.FALSE.equals(skipFormModel)) {
// if skipFormModel sets to true, still generate the model and log the result
LOGGER.info("Model " + name + " (marked as unused due to form parameters) is generated due to skipFormModel=false (default)");
} else {
LOGGER.info("Model " + name + " not generated since it's marked as unused (due to form parameters) and skipFormModel set to true");
continue;
}
}
Schema schema = schemas.get(name);

View File

@ -73,7 +73,7 @@ fakeOuterBooleanSerialize _ =
data FakeOuterBooleanSerialize
-- | /Body Param/ "body" - Input boolean as post body
instance HasBodyParam FakeOuterBooleanSerialize BodyBool
instance HasBodyParam FakeOuterBooleanSerialize Body8
-- | @application/json@
instance Consumes FakeOuterBooleanSerialize MimeJSON
@ -123,7 +123,7 @@ fakeOuterNumberSerialize _ =
data FakeOuterNumberSerialize
-- | /Body Param/ "body" - Input number as post body
instance HasBodyParam FakeOuterNumberSerialize Body
instance HasBodyParam FakeOuterNumberSerialize Body6
-- | @application/json@
instance Consumes FakeOuterNumberSerialize MimeJSON
@ -148,7 +148,7 @@ fakeOuterStringSerialize _ =
data FakeOuterStringSerialize
-- | /Body Param/ "body" - Input string as post body
instance HasBodyParam FakeOuterStringSerialize BodyText
instance HasBodyParam FakeOuterStringSerialize Body7
-- | @application/json@
instance Consumes FakeOuterStringSerialize MimeJSON

View File

@ -72,14 +72,14 @@ newtype AdditionalMetadata = AdditionalMetadata { unAdditionalMetadata :: Text }
-- ** ApiKey
newtype ApiKey = ApiKey { unApiKey :: Text } deriving (P.Eq, P.Show)
-- ** Body
newtype Body = Body { unBody :: Double } deriving (P.Eq, P.Show, A.ToJSON)
-- ** Body6
newtype Body6 = Body6 { unBody6 :: Double } deriving (P.Eq, P.Show, A.ToJSON)
-- ** BodyBool
newtype BodyBool = BodyBool { unBodyBool :: Bool } deriving (P.Eq, P.Show, A.ToJSON)
-- ** Body7
newtype Body7 = Body7 { unBody7 :: Text } deriving (P.Eq, P.Show, A.ToJSON)
-- ** BodyText
newtype BodyText = BodyText { unBodyText :: Text } deriving (P.Eq, P.Show, A.ToJSON)
-- ** Body8
newtype Body8 = Body8 { unBody8 :: Bool } deriving (P.Eq, P.Show, A.ToJSON)
-- ** Byte
newtype Byte = Byte { unByte :: ByteArray } deriving (P.Eq, P.Show)
@ -416,6 +416,253 @@ mkArrayTest =
, arrayTestArrayArrayOfModel = Nothing
}
-- ** Body
-- | Body
data Body = Body
{ bodyName :: !(Maybe Text) -- ^ "name" - Updated name of the pet
, bodyStatus :: !(Maybe Text) -- ^ "status" - Updated status of the pet
} deriving (P.Show, P.Eq, P.Typeable)
-- | FromJSON Body
instance A.FromJSON Body where
parseJSON = A.withObject "Body" $ \o ->
Body
<$> (o .:? "name")
<*> (o .:? "status")
-- | ToJSON Body
instance A.ToJSON Body where
toJSON Body {..} =
_omitNulls
[ "name" .= bodyName
, "status" .= bodyStatus
]
-- | Construct a value of type 'Body' (by applying it's required fields, if any)
mkBody
:: Body
mkBody =
Body
{ bodyName = Nothing
, bodyStatus = Nothing
}
-- ** Body1
-- | Body1
data Body1 = Body1
{ body1AdditionalMetadata :: !(Maybe Text) -- ^ "additionalMetadata" - Additional data to pass to server
, body1File :: !(Maybe FilePath) -- ^ "file" - file to upload
} deriving (P.Show, P.Eq, P.Typeable)
-- | FromJSON Body1
instance A.FromJSON Body1 where
parseJSON = A.withObject "Body1" $ \o ->
Body1
<$> (o .:? "additionalMetadata")
<*> (o .:? "file")
-- | ToJSON Body1
instance A.ToJSON Body1 where
toJSON Body1 {..} =
_omitNulls
[ "additionalMetadata" .= body1AdditionalMetadata
, "file" .= body1File
]
-- | Construct a value of type 'Body1' (by applying it's required fields, if any)
mkBody1
:: Body1
mkBody1 =
Body1
{ body1AdditionalMetadata = Nothing
, body1File = Nothing
}
-- ** Body2
-- | Body2
data Body2 = Body2
{ body2EnumFormStringArray :: !(Maybe [E'EnumFormStringArray]) -- ^ "enum_form_string_array" - Form parameter enum test (string array)
, body2EnumFormString :: !(Maybe E'EnumFormString) -- ^ "enum_form_string" - Form parameter enum test (string)
} deriving (P.Show, P.Eq, P.Typeable)
-- | FromJSON Body2
instance A.FromJSON Body2 where
parseJSON = A.withObject "Body2" $ \o ->
Body2
<$> (o .:? "enum_form_string_array")
<*> (o .:? "enum_form_string")
-- | ToJSON Body2
instance A.ToJSON Body2 where
toJSON Body2 {..} =
_omitNulls
[ "enum_form_string_array" .= body2EnumFormStringArray
, "enum_form_string" .= body2EnumFormString
]
-- | Construct a value of type 'Body2' (by applying it's required fields, if any)
mkBody2
:: Body2
mkBody2 =
Body2
{ body2EnumFormStringArray = Nothing
, body2EnumFormString = Nothing
}
-- ** Body3
-- | Body3
data Body3 = Body3
{ body3Integer :: !(Maybe Int) -- ^ "integer" - None
, body3Int32 :: !(Maybe Int) -- ^ "int32" - None
, body3Int64 :: !(Maybe Integer) -- ^ "int64" - None
, body3Number :: !(Double) -- ^ /Required/ "number" - None
, body3Float :: !(Maybe Float) -- ^ "float" - None
, body3Double :: !(Double) -- ^ /Required/ "double" - None
, body3String :: !(Maybe Text) -- ^ "string" - None
, body3PatternWithoutDelimiter :: !(Text) -- ^ /Required/ "pattern_without_delimiter" - None
, body3Byte :: !(ByteArray) -- ^ /Required/ "byte" - None
, body3Binary :: !(Maybe FilePath) -- ^ "binary" - None
, body3Date :: !(Maybe Date) -- ^ "date" - None
, body3DateTime :: !(Maybe DateTime) -- ^ "dateTime" - None
, body3Password :: !(Maybe Text) -- ^ "password" - None
, body3Callback :: !(Maybe Text) -- ^ "callback" - None
} deriving (P.Show, P.Eq, P.Typeable)
-- | FromJSON Body3
instance A.FromJSON Body3 where
parseJSON = A.withObject "Body3" $ \o ->
Body3
<$> (o .:? "integer")
<*> (o .:? "int32")
<*> (o .:? "int64")
<*> (o .: "number")
<*> (o .:? "float")
<*> (o .: "double")
<*> (o .:? "string")
<*> (o .: "pattern_without_delimiter")
<*> (o .: "byte")
<*> (o .:? "binary")
<*> (o .:? "date")
<*> (o .:? "dateTime")
<*> (o .:? "password")
<*> (o .:? "callback")
-- | ToJSON Body3
instance A.ToJSON Body3 where
toJSON Body3 {..} =
_omitNulls
[ "integer" .= body3Integer
, "int32" .= body3Int32
, "int64" .= body3Int64
, "number" .= body3Number
, "float" .= body3Float
, "double" .= body3Double
, "string" .= body3String
, "pattern_without_delimiter" .= body3PatternWithoutDelimiter
, "byte" .= body3Byte
, "binary" .= body3Binary
, "date" .= body3Date
, "dateTime" .= body3DateTime
, "password" .= body3Password
, "callback" .= body3Callback
]
-- | Construct a value of type 'Body3' (by applying it's required fields, if any)
mkBody3
:: Double -- ^ 'body3Number': None
-> Double -- ^ 'body3Double': None
-> Text -- ^ 'body3PatternWithoutDelimiter': None
-> ByteArray -- ^ 'body3Byte': None
-> Body3
mkBody3 body3Number body3Double body3PatternWithoutDelimiter body3Byte =
Body3
{ body3Integer = Nothing
, body3Int32 = Nothing
, body3Int64 = Nothing
, body3Number
, body3Float = Nothing
, body3Double
, body3String = Nothing
, body3PatternWithoutDelimiter
, body3Byte
, body3Binary = Nothing
, body3Date = Nothing
, body3DateTime = Nothing
, body3Password = Nothing
, body3Callback = Nothing
}
-- ** Body4
-- | Body4
data Body4 = Body4
{ body4Param :: !(Text) -- ^ /Required/ "param" - field1
, body4Param2 :: !(Text) -- ^ /Required/ "param2" - field2
} deriving (P.Show, P.Eq, P.Typeable)
-- | FromJSON Body4
instance A.FromJSON Body4 where
parseJSON = A.withObject "Body4" $ \o ->
Body4
<$> (o .: "param")
<*> (o .: "param2")
-- | ToJSON Body4
instance A.ToJSON Body4 where
toJSON Body4 {..} =
_omitNulls
[ "param" .= body4Param
, "param2" .= body4Param2
]
-- | Construct a value of type 'Body4' (by applying it's required fields, if any)
mkBody4
:: Text -- ^ 'body4Param': field1
-> Text -- ^ 'body4Param2': field2
-> Body4
mkBody4 body4Param body4Param2 =
Body4
{ body4Param
, body4Param2
}
-- ** Body5
-- | Body5
data Body5 = Body5
{ body5AdditionalMetadata :: !(Maybe Text) -- ^ "additionalMetadata" - Additional data to pass to server
, body5RequiredFile :: !(FilePath) -- ^ /Required/ "requiredFile" - file to upload
} deriving (P.Show, P.Eq, P.Typeable)
-- | FromJSON Body5
instance A.FromJSON Body5 where
parseJSON = A.withObject "Body5" $ \o ->
Body5
<$> (o .:? "additionalMetadata")
<*> (o .: "requiredFile")
-- | ToJSON Body5
instance A.ToJSON Body5 where
toJSON Body5 {..} =
_omitNulls
[ "additionalMetadata" .= body5AdditionalMetadata
, "requiredFile" .= body5RequiredFile
]
-- | Construct a value of type 'Body5' (by applying it's required fields, if any)
mkBody5
:: FilePath -- ^ 'body5RequiredFile': file to upload
-> Body5
mkBody5 body5RequiredFile =
Body5
{ body5AdditionalMetadata = Nothing
, body5RequiredFile
}
-- ** Capitalization
-- | Capitalization
data Capitalization = Capitalization

View File

@ -124,6 +124,150 @@ arrayTestArrayArrayOfModelL f ArrayTest{..} = (\arrayTestArrayArrayOfModel -> Ar
-- * Body
-- | 'bodyName' Lens
bodyNameL :: Lens_' Body (Maybe Text)
bodyNameL f Body{..} = (\bodyName -> Body { bodyName, ..} ) <$> f bodyName
{-# INLINE bodyNameL #-}
-- | 'bodyStatus' Lens
bodyStatusL :: Lens_' Body (Maybe Text)
bodyStatusL f Body{..} = (\bodyStatus -> Body { bodyStatus, ..} ) <$> f bodyStatus
{-# INLINE bodyStatusL #-}
-- * Body1
-- | 'body1AdditionalMetadata' Lens
body1AdditionalMetadataL :: Lens_' Body1 (Maybe Text)
body1AdditionalMetadataL f Body1{..} = (\body1AdditionalMetadata -> Body1 { body1AdditionalMetadata, ..} ) <$> f body1AdditionalMetadata
{-# INLINE body1AdditionalMetadataL #-}
-- | 'body1File' Lens
body1FileL :: Lens_' Body1 (Maybe FilePath)
body1FileL f Body1{..} = (\body1File -> Body1 { body1File, ..} ) <$> f body1File
{-# INLINE body1FileL #-}
-- * Body2
-- | 'body2EnumFormStringArray' Lens
body2EnumFormStringArrayL :: Lens_' Body2 (Maybe [E'EnumFormStringArray])
body2EnumFormStringArrayL f Body2{..} = (\body2EnumFormStringArray -> Body2 { body2EnumFormStringArray, ..} ) <$> f body2EnumFormStringArray
{-# INLINE body2EnumFormStringArrayL #-}
-- | 'body2EnumFormString' Lens
body2EnumFormStringL :: Lens_' Body2 (Maybe E'EnumFormString)
body2EnumFormStringL f Body2{..} = (\body2EnumFormString -> Body2 { body2EnumFormString, ..} ) <$> f body2EnumFormString
{-# INLINE body2EnumFormStringL #-}
-- * Body3
-- | 'body3Integer' Lens
body3IntegerL :: Lens_' Body3 (Maybe Int)
body3IntegerL f Body3{..} = (\body3Integer -> Body3 { body3Integer, ..} ) <$> f body3Integer
{-# INLINE body3IntegerL #-}
-- | 'body3Int32' Lens
body3Int32L :: Lens_' Body3 (Maybe Int)
body3Int32L f Body3{..} = (\body3Int32 -> Body3 { body3Int32, ..} ) <$> f body3Int32
{-# INLINE body3Int32L #-}
-- | 'body3Int64' Lens
body3Int64L :: Lens_' Body3 (Maybe Integer)
body3Int64L f Body3{..} = (\body3Int64 -> Body3 { body3Int64, ..} ) <$> f body3Int64
{-# INLINE body3Int64L #-}
-- | 'body3Number' Lens
body3NumberL :: Lens_' Body3 (Double)
body3NumberL f Body3{..} = (\body3Number -> Body3 { body3Number, ..} ) <$> f body3Number
{-# INLINE body3NumberL #-}
-- | 'body3Float' Lens
body3FloatL :: Lens_' Body3 (Maybe Float)
body3FloatL f Body3{..} = (\body3Float -> Body3 { body3Float, ..} ) <$> f body3Float
{-# INLINE body3FloatL #-}
-- | 'body3Double' Lens
body3DoubleL :: Lens_' Body3 (Double)
body3DoubleL f Body3{..} = (\body3Double -> Body3 { body3Double, ..} ) <$> f body3Double
{-# INLINE body3DoubleL #-}
-- | 'body3String' Lens
body3StringL :: Lens_' Body3 (Maybe Text)
body3StringL f Body3{..} = (\body3String -> Body3 { body3String, ..} ) <$> f body3String
{-# INLINE body3StringL #-}
-- | 'body3PatternWithoutDelimiter' Lens
body3PatternWithoutDelimiterL :: Lens_' Body3 (Text)
body3PatternWithoutDelimiterL f Body3{..} = (\body3PatternWithoutDelimiter -> Body3 { body3PatternWithoutDelimiter, ..} ) <$> f body3PatternWithoutDelimiter
{-# INLINE body3PatternWithoutDelimiterL #-}
-- | 'body3Byte' Lens
body3ByteL :: Lens_' Body3 (ByteArray)
body3ByteL f Body3{..} = (\body3Byte -> Body3 { body3Byte, ..} ) <$> f body3Byte
{-# INLINE body3ByteL #-}
-- | 'body3Binary' Lens
body3BinaryL :: Lens_' Body3 (Maybe FilePath)
body3BinaryL f Body3{..} = (\body3Binary -> Body3 { body3Binary, ..} ) <$> f body3Binary
{-# INLINE body3BinaryL #-}
-- | 'body3Date' Lens
body3DateL :: Lens_' Body3 (Maybe Date)
body3DateL f Body3{..} = (\body3Date -> Body3 { body3Date, ..} ) <$> f body3Date
{-# INLINE body3DateL #-}
-- | 'body3DateTime' Lens
body3DateTimeL :: Lens_' Body3 (Maybe DateTime)
body3DateTimeL f Body3{..} = (\body3DateTime -> Body3 { body3DateTime, ..} ) <$> f body3DateTime
{-# INLINE body3DateTimeL #-}
-- | 'body3Password' Lens
body3PasswordL :: Lens_' Body3 (Maybe Text)
body3PasswordL f Body3{..} = (\body3Password -> Body3 { body3Password, ..} ) <$> f body3Password
{-# INLINE body3PasswordL #-}
-- | 'body3Callback' Lens
body3CallbackL :: Lens_' Body3 (Maybe Text)
body3CallbackL f Body3{..} = (\body3Callback -> Body3 { body3Callback, ..} ) <$> f body3Callback
{-# INLINE body3CallbackL #-}
-- * Body4
-- | 'body4Param' Lens
body4ParamL :: Lens_' Body4 (Text)
body4ParamL f Body4{..} = (\body4Param -> Body4 { body4Param, ..} ) <$> f body4Param
{-# INLINE body4ParamL #-}
-- | 'body4Param2' Lens
body4Param2L :: Lens_' Body4 (Text)
body4Param2L f Body4{..} = (\body4Param2 -> Body4 { body4Param2, ..} ) <$> f body4Param2
{-# INLINE body4Param2L #-}
-- * Body5
-- | 'body5AdditionalMetadata' Lens
body5AdditionalMetadataL :: Lens_' Body5 (Maybe Text)
body5AdditionalMetadataL f Body5{..} = (\body5AdditionalMetadata -> Body5 { body5AdditionalMetadata, ..} ) <$> f body5AdditionalMetadata
{-# INLINE body5AdditionalMetadataL #-}
-- | 'body5RequiredFile' Lens
body5RequiredFileL :: Lens_' Body5 (FilePath)
body5RequiredFileL f Body5{..} = (\body5RequiredFile -> Body5 { body5RequiredFile, ..} ) <$> f body5RequiredFile
{-# INLINE body5RequiredFileL #-}
-- * Capitalization
-- | 'capitalizationSmallCamel' Lens

View File

@ -130,6 +130,54 @@ instance Arbitrary ArrayTest where
<*> arbitrary -- arrayTestArrayArrayOfInteger :: Maybe [[Integer]]
<*> arbitrary -- arrayTestArrayArrayOfModel :: Maybe [[ReadOnlyFirst]]
instance Arbitrary Body where
arbitrary =
Body
<$> arbitrary -- bodyName :: Maybe Text
<*> arbitrary -- bodyStatus :: Maybe Text
instance Arbitrary Body1 where
arbitrary =
Body1
<$> arbitrary -- body1AdditionalMetadata :: Maybe Text
<*> arbitrary -- body1File :: Maybe FilePath
instance Arbitrary Body2 where
arbitrary =
Body2
<$> arbitrary -- body2EnumFormStringArray :: Maybe [Text]
<*> arbitrary -- body2EnumFormString :: Maybe Text
instance Arbitrary Body3 where
arbitrary =
Body3
<$> arbitrary -- body3Integer :: Maybe Int
<*> arbitrary -- body3Int32 :: Maybe Int
<*> arbitrary -- body3Int64 :: Maybe Integer
<*> arbitrary -- body3Number :: Double
<*> arbitrary -- body3Float :: Maybe Float
<*> arbitrary -- body3Double :: Double
<*> arbitrary -- body3String :: Maybe Text
<*> arbitrary -- body3PatternWithoutDelimiter :: Text
<*> arbitrary -- body3Byte :: ByteArray
<*> arbitrary -- body3Binary :: Maybe FilePath
<*> arbitrary -- body3Date :: Maybe Date
<*> arbitrary -- body3DateTime :: Maybe DateTime
<*> arbitrary -- body3Password :: Maybe Text
<*> arbitrary -- body3Callback :: Maybe Text
instance Arbitrary Body4 where
arbitrary =
Body4
<$> arbitrary -- body4Param :: Text
<*> arbitrary -- body4Param2 :: Text
instance Arbitrary Body5 where
arbitrary =
Body5
<$> arbitrary -- body5AdditionalMetadata :: Maybe Text
<*> arbitrary -- body5RequiredFile :: FilePath
instance Arbitrary Capitalization where
arbitrary =
Capitalization

View File

@ -27,6 +27,12 @@ main =
propMimeEq MimeJSON (Proxy :: Proxy ArrayOfArrayOfNumberOnly)
propMimeEq MimeJSON (Proxy :: Proxy ArrayOfNumberOnly)
propMimeEq MimeJSON (Proxy :: Proxy ArrayTest)
propMimeEq MimeJSON (Proxy :: Proxy Body)
propMimeEq MimeJSON (Proxy :: Proxy Body1)
propMimeEq MimeJSON (Proxy :: Proxy Body2)
propMimeEq MimeJSON (Proxy :: Proxy Body3)
propMimeEq MimeJSON (Proxy :: Proxy Body4)
propMimeEq MimeJSON (Proxy :: Proxy Body5)
propMimeEq MimeJSON (Proxy :: Proxy Capitalization)
propMimeEq MimeJSON (Proxy :: Proxy Cat)
propMimeEq MimeJSON (Proxy :: Proxy Category)

View File

@ -124,6 +124,12 @@ Class | Method | HTTP request | Description
- [ArrayOfArrayOfNumberOnly](docs/Model/ArrayOfArrayOfNumberOnly.md)
- [ArrayOfNumberOnly](docs/Model/ArrayOfNumberOnly.md)
- [ArrayTest](docs/Model/ArrayTest.md)
- [Body](docs/Model/Body.md)
- [Body1](docs/Model/Body1.md)
- [Body2](docs/Model/Body2.md)
- [Body3](docs/Model/Body3.md)
- [Body4](docs/Model/Body4.md)
- [Body5](docs/Model/Body5.md)
- [Capitalization](docs/Model/Capitalization.md)
- [Cat](docs/Model/Cat.md)
- [Category](docs/Model/Category.md)

View File

@ -0,0 +1,11 @@
# Body
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**name** | **string** | Updated name of the pet | [optional]
**status** | **string** | Updated status of the pet | [optional]
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)

View File

@ -0,0 +1,11 @@
# Body1
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**additional_metadata** | **string** | Additional data to pass to server | [optional]
**file** | [**\SplFileObject**](\SplFileObject.md) | file to upload | [optional]
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)

View File

@ -0,0 +1,11 @@
# Body2
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**enum_form_string_array** | **string[]** | Form parameter enum test (string array) | [optional]
**enum_form_string** | **string** | Form parameter enum test (string) | [optional] [default to '-efg']
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)

View File

@ -0,0 +1,23 @@
# Body3
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**integer** | **int** | None | [optional]
**int32** | **int** | None | [optional]
**int64** | **int** | None | [optional]
**number** | **float** | None |
**float** | **float** | None | [optional]
**double** | **double** | None |
**string** | **string** | None | [optional]
**pattern_without_delimiter** | **string** | None |
**byte** | **string** | None |
**binary** | [**\SplFileObject**](\SplFileObject.md) | None | [optional]
**date** | [**\DateTime**](\DateTime.md) | None | [optional]
**date_time** | [**\DateTime**](\DateTime.md) | None | [optional]
**password** | **string** | None | [optional]
**callback** | **string** | None | [optional]
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)

View File

@ -0,0 +1,11 @@
# Body4
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**param** | **string** | field1 |
**param2** | **string** | field2 |
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)

View File

@ -0,0 +1,11 @@
# Body5
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**additional_metadata** | **string** | Additional data to pass to server | [optional]
**required_file** | [**\SplFileObject**](\SplFileObject.md) | file to upload |
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)

View File

@ -0,0 +1,327 @@
<?php
/**
* Body
*
* PHP version 5
*
* @category Class
* @package OpenAPI\Client
* @author OpenAPI Generator team
* @link https://openapi-generator.tech
*/
/**
* OpenAPI Petstore
*
* This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
*
* OpenAPI spec version: 1.0.0
*
* Generated by: https://openapi-generator.tech
* OpenAPI Generator version: 3.2.2-SNAPSHOT
*/
/**
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
namespace OpenAPI\Client\Model;
use \ArrayAccess;
use \OpenAPI\Client\ObjectSerializer;
/**
* Body Class Doc Comment
*
* @category Class
* @package OpenAPI\Client
* @author OpenAPI Generator team
* @link https://openapi-generator.tech
*/
class Body implements ModelInterface, ArrayAccess
{
const DISCRIMINATOR = null;
/**
* The original name of the model.
*
* @var string
*/
protected static $openAPIModelName = 'body';
/**
* Array of property to type mappings. Used for (de)serialization
*
* @var string[]
*/
protected static $openAPITypes = [
'name' => 'string',
'status' => 'string'
];
/**
* Array of property to format mappings. Used for (de)serialization
*
* @var string[]
*/
protected static $openAPIFormats = [
'name' => null,
'status' => null
];
/**
* Array of property to type mappings. Used for (de)serialization
*
* @return array
*/
public static function openAPITypes()
{
return self::$openAPITypes;
}
/**
* Array of property to format mappings. Used for (de)serialization
*
* @return array
*/
public static function openAPIFormats()
{
return self::$openAPIFormats;
}
/**
* Array of attributes where the key is the local name,
* and the value is the original name
*
* @var string[]
*/
protected static $attributeMap = [
'name' => 'name',
'status' => 'status'
];
/**
* Array of attributes to setter functions (for deserialization of responses)
*
* @var string[]
*/
protected static $setters = [
'name' => 'setName',
'status' => 'setStatus'
];
/**
* Array of attributes to getter functions (for serialization of requests)
*
* @var string[]
*/
protected static $getters = [
'name' => 'getName',
'status' => 'getStatus'
];
/**
* Array of attributes where the key is the local name,
* and the value is the original name
*
* @return array
*/
public static function attributeMap()
{
return self::$attributeMap;
}
/**
* Array of attributes to setter functions (for deserialization of responses)
*
* @return array
*/
public static function setters()
{
return self::$setters;
}
/**
* Array of attributes to getter functions (for serialization of requests)
*
* @return array
*/
public static function getters()
{
return self::$getters;
}
/**
* The original name of the model.
*
* @return string
*/
public function getModelName()
{
return self::$openAPIModelName;
}
/**
* Associative array for storing property values
*
* @var mixed[]
*/
protected $container = [];
/**
* Constructor
*
* @param mixed[] $data Associated array of property values
* initializing the model
*/
public function __construct(array $data = null)
{
$this->container['name'] = isset($data['name']) ? $data['name'] : null;
$this->container['status'] = isset($data['status']) ? $data['status'] : null;
}
/**
* Show all the invalid properties with reasons.
*
* @return array invalid properties with reasons
*/
public function listInvalidProperties()
{
$invalidProperties = [];
return $invalidProperties;
}
/**
* Validate all the properties in the model
* return true if all passed
*
* @return bool True if all properties are valid
*/
public function valid()
{
return count($this->listInvalidProperties()) === 0;
}
/**
* Gets name
*
* @return string|null
*/
public function getName()
{
return $this->container['name'];
}
/**
* Sets name
*
* @param string|null $name Updated name of the pet
*
* @return $this
*/
public function setName($name)
{
$this->container['name'] = $name;
return $this;
}
/**
* Gets status
*
* @return string|null
*/
public function getStatus()
{
return $this->container['status'];
}
/**
* Sets status
*
* @param string|null $status Updated status of the pet
*
* @return $this
*/
public function setStatus($status)
{
$this->container['status'] = $status;
return $this;
}
/**
* Returns true if offset exists. False otherwise.
*
* @param integer $offset Offset
*
* @return boolean
*/
public function offsetExists($offset)
{
return isset($this->container[$offset]);
}
/**
* Gets offset.
*
* @param integer $offset Offset
*
* @return mixed
*/
public function offsetGet($offset)
{
return isset($this->container[$offset]) ? $this->container[$offset] : null;
}
/**
* Sets value based on offset.
*
* @param integer $offset Offset
* @param mixed $value Value to be set
*
* @return void
*/
public function offsetSet($offset, $value)
{
if (is_null($offset)) {
$this->container[] = $value;
} else {
$this->container[$offset] = $value;
}
}
/**
* Unsets offset.
*
* @param integer $offset Offset
*
* @return void
*/
public function offsetUnset($offset)
{
unset($this->container[$offset]);
}
/**
* Gets the string presentation of the object
*
* @return string
*/
public function __toString()
{
return json_encode(
ObjectSerializer::sanitizeForSerialization($this),
JSON_PRETTY_PRINT
);
}
}

View File

@ -0,0 +1,327 @@
<?php
/**
* Body1
*
* PHP version 5
*
* @category Class
* @package OpenAPI\Client
* @author OpenAPI Generator team
* @link https://openapi-generator.tech
*/
/**
* OpenAPI Petstore
*
* This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
*
* OpenAPI spec version: 1.0.0
*
* Generated by: https://openapi-generator.tech
* OpenAPI Generator version: 3.2.2-SNAPSHOT
*/
/**
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
namespace OpenAPI\Client\Model;
use \ArrayAccess;
use \OpenAPI\Client\ObjectSerializer;
/**
* Body1 Class Doc Comment
*
* @category Class
* @package OpenAPI\Client
* @author OpenAPI Generator team
* @link https://openapi-generator.tech
*/
class Body1 implements ModelInterface, ArrayAccess
{
const DISCRIMINATOR = null;
/**
* The original name of the model.
*
* @var string
*/
protected static $openAPIModelName = 'body_1';
/**
* Array of property to type mappings. Used for (de)serialization
*
* @var string[]
*/
protected static $openAPITypes = [
'additional_metadata' => 'string',
'file' => '\SplFileObject'
];
/**
* Array of property to format mappings. Used for (de)serialization
*
* @var string[]
*/
protected static $openAPIFormats = [
'additional_metadata' => null,
'file' => 'binary'
];
/**
* Array of property to type mappings. Used for (de)serialization
*
* @return array
*/
public static function openAPITypes()
{
return self::$openAPITypes;
}
/**
* Array of property to format mappings. Used for (de)serialization
*
* @return array
*/
public static function openAPIFormats()
{
return self::$openAPIFormats;
}
/**
* Array of attributes where the key is the local name,
* and the value is the original name
*
* @var string[]
*/
protected static $attributeMap = [
'additional_metadata' => 'additionalMetadata',
'file' => 'file'
];
/**
* Array of attributes to setter functions (for deserialization of responses)
*
* @var string[]
*/
protected static $setters = [
'additional_metadata' => 'setAdditionalMetadata',
'file' => 'setFile'
];
/**
* Array of attributes to getter functions (for serialization of requests)
*
* @var string[]
*/
protected static $getters = [
'additional_metadata' => 'getAdditionalMetadata',
'file' => 'getFile'
];
/**
* Array of attributes where the key is the local name,
* and the value is the original name
*
* @return array
*/
public static function attributeMap()
{
return self::$attributeMap;
}
/**
* Array of attributes to setter functions (for deserialization of responses)
*
* @return array
*/
public static function setters()
{
return self::$setters;
}
/**
* Array of attributes to getter functions (for serialization of requests)
*
* @return array
*/
public static function getters()
{
return self::$getters;
}
/**
* The original name of the model.
*
* @return string
*/
public function getModelName()
{
return self::$openAPIModelName;
}
/**
* Associative array for storing property values
*
* @var mixed[]
*/
protected $container = [];
/**
* Constructor
*
* @param mixed[] $data Associated array of property values
* initializing the model
*/
public function __construct(array $data = null)
{
$this->container['additional_metadata'] = isset($data['additional_metadata']) ? $data['additional_metadata'] : null;
$this->container['file'] = isset($data['file']) ? $data['file'] : null;
}
/**
* Show all the invalid properties with reasons.
*
* @return array invalid properties with reasons
*/
public function listInvalidProperties()
{
$invalidProperties = [];
return $invalidProperties;
}
/**
* Validate all the properties in the model
* return true if all passed
*
* @return bool True if all properties are valid
*/
public function valid()
{
return count($this->listInvalidProperties()) === 0;
}
/**
* Gets additional_metadata
*
* @return string|null
*/
public function getAdditionalMetadata()
{
return $this->container['additional_metadata'];
}
/**
* Sets additional_metadata
*
* @param string|null $additional_metadata Additional data to pass to server
*
* @return $this
*/
public function setAdditionalMetadata($additional_metadata)
{
$this->container['additional_metadata'] = $additional_metadata;
return $this;
}
/**
* Gets file
*
* @return \SplFileObject|null
*/
public function getFile()
{
return $this->container['file'];
}
/**
* Sets file
*
* @param \SplFileObject|null $file file to upload
*
* @return $this
*/
public function setFile($file)
{
$this->container['file'] = $file;
return $this;
}
/**
* Returns true if offset exists. False otherwise.
*
* @param integer $offset Offset
*
* @return boolean
*/
public function offsetExists($offset)
{
return isset($this->container[$offset]);
}
/**
* Gets offset.
*
* @param integer $offset Offset
*
* @return mixed
*/
public function offsetGet($offset)
{
return isset($this->container[$offset]) ? $this->container[$offset] : null;
}
/**
* Sets value based on offset.
*
* @param integer $offset Offset
* @param mixed $value Value to be set
*
* @return void
*/
public function offsetSet($offset, $value)
{
if (is_null($offset)) {
$this->container[] = $value;
} else {
$this->container[$offset] = $value;
}
}
/**
* Unsets offset.
*
* @param integer $offset Offset
*
* @return void
*/
public function offsetUnset($offset)
{
unset($this->container[$offset]);
}
/**
* Gets the string presentation of the object
*
* @return string
*/
public function __toString()
{
return json_encode(
ObjectSerializer::sanitizeForSerialization($this),
JSON_PRETTY_PRINT
);
}
}

View File

@ -0,0 +1,385 @@
<?php
/**
* Body2
*
* PHP version 5
*
* @category Class
* @package OpenAPI\Client
* @author OpenAPI Generator team
* @link https://openapi-generator.tech
*/
/**
* OpenAPI Petstore
*
* This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
*
* OpenAPI spec version: 1.0.0
*
* Generated by: https://openapi-generator.tech
* OpenAPI Generator version: 3.2.2-SNAPSHOT
*/
/**
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
namespace OpenAPI\Client\Model;
use \ArrayAccess;
use \OpenAPI\Client\ObjectSerializer;
/**
* Body2 Class Doc Comment
*
* @category Class
* @package OpenAPI\Client
* @author OpenAPI Generator team
* @link https://openapi-generator.tech
*/
class Body2 implements ModelInterface, ArrayAccess
{
const DISCRIMINATOR = null;
/**
* The original name of the model.
*
* @var string
*/
protected static $openAPIModelName = 'body_2';
/**
* Array of property to type mappings. Used for (de)serialization
*
* @var string[]
*/
protected static $openAPITypes = [
'enum_form_string_array' => 'string[]',
'enum_form_string' => 'string'
];
/**
* Array of property to format mappings. Used for (de)serialization
*
* @var string[]
*/
protected static $openAPIFormats = [
'enum_form_string_array' => null,
'enum_form_string' => null
];
/**
* Array of property to type mappings. Used for (de)serialization
*
* @return array
*/
public static function openAPITypes()
{
return self::$openAPITypes;
}
/**
* Array of property to format mappings. Used for (de)serialization
*
* @return array
*/
public static function openAPIFormats()
{
return self::$openAPIFormats;
}
/**
* Array of attributes where the key is the local name,
* and the value is the original name
*
* @var string[]
*/
protected static $attributeMap = [
'enum_form_string_array' => 'enum_form_string_array',
'enum_form_string' => 'enum_form_string'
];
/**
* Array of attributes to setter functions (for deserialization of responses)
*
* @var string[]
*/
protected static $setters = [
'enum_form_string_array' => 'setEnumFormStringArray',
'enum_form_string' => 'setEnumFormString'
];
/**
* Array of attributes to getter functions (for serialization of requests)
*
* @var string[]
*/
protected static $getters = [
'enum_form_string_array' => 'getEnumFormStringArray',
'enum_form_string' => 'getEnumFormString'
];
/**
* Array of attributes where the key is the local name,
* and the value is the original name
*
* @return array
*/
public static function attributeMap()
{
return self::$attributeMap;
}
/**
* Array of attributes to setter functions (for deserialization of responses)
*
* @return array
*/
public static function setters()
{
return self::$setters;
}
/**
* Array of attributes to getter functions (for serialization of requests)
*
* @return array
*/
public static function getters()
{
return self::$getters;
}
/**
* The original name of the model.
*
* @return string
*/
public function getModelName()
{
return self::$openAPIModelName;
}
const ENUM_FORM_STRING_ARRAY_GREATER_THAN = '>';
const ENUM_FORM_STRING_ARRAY_DOLLAR = '$';
const ENUM_FORM_STRING_ABC = '_abc';
const ENUM_FORM_STRING_EFG = '-efg';
const ENUM_FORM_STRING_XYZ = '(xyz)';
/**
* Gets allowable values of the enum
*
* @return string[]
*/
public function getEnumFormStringArrayAllowableValues()
{
return [
self::ENUM_FORM_STRING_ARRAY_GREATER_THAN,
self::ENUM_FORM_STRING_ARRAY_DOLLAR,
];
}
/**
* Gets allowable values of the enum
*
* @return string[]
*/
public function getEnumFormStringAllowableValues()
{
return [
self::ENUM_FORM_STRING_ABC,
self::ENUM_FORM_STRING_EFG,
self::ENUM_FORM_STRING_XYZ,
];
}
/**
* Associative array for storing property values
*
* @var mixed[]
*/
protected $container = [];
/**
* Constructor
*
* @param mixed[] $data Associated array of property values
* initializing the model
*/
public function __construct(array $data = null)
{
$this->container['enum_form_string_array'] = isset($data['enum_form_string_array']) ? $data['enum_form_string_array'] : null;
$this->container['enum_form_string'] = isset($data['enum_form_string']) ? $data['enum_form_string'] : '-efg';
}
/**
* Show all the invalid properties with reasons.
*
* @return array invalid properties with reasons
*/
public function listInvalidProperties()
{
$invalidProperties = [];
$allowedValues = $this->getEnumFormStringAllowableValues();
if (!is_null($this->container['enum_form_string']) && !in_array($this->container['enum_form_string'], $allowedValues, true)) {
$invalidProperties[] = sprintf(
"invalid value for 'enum_form_string', must be one of '%s'",
implode("', '", $allowedValues)
);
}
return $invalidProperties;
}
/**
* Validate all the properties in the model
* return true if all passed
*
* @return bool True if all properties are valid
*/
public function valid()
{
return count($this->listInvalidProperties()) === 0;
}
/**
* Gets enum_form_string_array
*
* @return string[]|null
*/
public function getEnumFormStringArray()
{
return $this->container['enum_form_string_array'];
}
/**
* Sets enum_form_string_array
*
* @param string[]|null $enum_form_string_array Form parameter enum test (string array)
*
* @return $this
*/
public function setEnumFormStringArray($enum_form_string_array)
{
$allowedValues = $this->getEnumFormStringArrayAllowableValues();
if (!is_null($enum_form_string_array) && array_diff($enum_form_string_array, $allowedValues)) {
throw new \InvalidArgumentException(
sprintf(
"Invalid value for 'enum_form_string_array', must be one of '%s'",
implode("', '", $allowedValues)
)
);
}
$this->container['enum_form_string_array'] = $enum_form_string_array;
return $this;
}
/**
* Gets enum_form_string
*
* @return string|null
*/
public function getEnumFormString()
{
return $this->container['enum_form_string'];
}
/**
* Sets enum_form_string
*
* @param string|null $enum_form_string Form parameter enum test (string)
*
* @return $this
*/
public function setEnumFormString($enum_form_string)
{
$allowedValues = $this->getEnumFormStringAllowableValues();
if (!is_null($enum_form_string) && !in_array($enum_form_string, $allowedValues, true)) {
throw new \InvalidArgumentException(
sprintf(
"Invalid value for 'enum_form_string', must be one of '%s'",
implode("', '", $allowedValues)
)
);
}
$this->container['enum_form_string'] = $enum_form_string;
return $this;
}
/**
* Returns true if offset exists. False otherwise.
*
* @param integer $offset Offset
*
* @return boolean
*/
public function offsetExists($offset)
{
return isset($this->container[$offset]);
}
/**
* Gets offset.
*
* @param integer $offset Offset
*
* @return mixed
*/
public function offsetGet($offset)
{
return isset($this->container[$offset]) ? $this->container[$offset] : null;
}
/**
* Sets value based on offset.
*
* @param integer $offset Offset
* @param mixed $value Value to be set
*
* @return void
*/
public function offsetSet($offset, $value)
{
if (is_null($offset)) {
$this->container[] = $value;
} else {
$this->container[$offset] = $value;
}
}
/**
* Unsets offset.
*
* @param integer $offset Offset
*
* @return void
*/
public function offsetUnset($offset)
{
unset($this->container[$offset]);
}
/**
* Gets the string presentation of the object
*
* @return string
*/
public function __toString()
{
return json_encode(
ObjectSerializer::sanitizeForSerialization($this),
JSON_PRETTY_PRINT
);
}
}

View File

@ -0,0 +1,805 @@
<?php
/**
* Body3
*
* PHP version 5
*
* @category Class
* @package OpenAPI\Client
* @author OpenAPI Generator team
* @link https://openapi-generator.tech
*/
/**
* OpenAPI Petstore
*
* This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
*
* OpenAPI spec version: 1.0.0
*
* Generated by: https://openapi-generator.tech
* OpenAPI Generator version: 3.2.2-SNAPSHOT
*/
/**
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
namespace OpenAPI\Client\Model;
use \ArrayAccess;
use \OpenAPI\Client\ObjectSerializer;
/**
* Body3 Class Doc Comment
*
* @category Class
* @package OpenAPI\Client
* @author OpenAPI Generator team
* @link https://openapi-generator.tech
*/
class Body3 implements ModelInterface, ArrayAccess
{
const DISCRIMINATOR = null;
/**
* The original name of the model.
*
* @var string
*/
protected static $openAPIModelName = 'body_3';
/**
* Array of property to type mappings. Used for (de)serialization
*
* @var string[]
*/
protected static $openAPITypes = [
'integer' => 'int',
'int32' => 'int',
'int64' => 'int',
'number' => 'float',
'float' => 'float',
'double' => 'double',
'string' => 'string',
'pattern_without_delimiter' => 'string',
'byte' => 'string',
'binary' => '\SplFileObject',
'date' => '\DateTime',
'date_time' => '\DateTime',
'password' => 'string',
'callback' => 'string'
];
/**
* Array of property to format mappings. Used for (de)serialization
*
* @var string[]
*/
protected static $openAPIFormats = [
'integer' => 'int32',
'int32' => 'int32',
'int64' => 'int64',
'number' => null,
'float' => 'float',
'double' => 'double',
'string' => null,
'pattern_without_delimiter' => null,
'byte' => 'byte',
'binary' => 'binary',
'date' => 'date',
'date_time' => 'date-time',
'password' => 'password',
'callback' => null
];
/**
* Array of property to type mappings. Used for (de)serialization
*
* @return array
*/
public static function openAPITypes()
{
return self::$openAPITypes;
}
/**
* Array of property to format mappings. Used for (de)serialization
*
* @return array
*/
public static function openAPIFormats()
{
return self::$openAPIFormats;
}
/**
* Array of attributes where the key is the local name,
* and the value is the original name
*
* @var string[]
*/
protected static $attributeMap = [
'integer' => 'integer',
'int32' => 'int32',
'int64' => 'int64',
'number' => 'number',
'float' => 'float',
'double' => 'double',
'string' => 'string',
'pattern_without_delimiter' => 'pattern_without_delimiter',
'byte' => 'byte',
'binary' => 'binary',
'date' => 'date',
'date_time' => 'dateTime',
'password' => 'password',
'callback' => 'callback'
];
/**
* Array of attributes to setter functions (for deserialization of responses)
*
* @var string[]
*/
protected static $setters = [
'integer' => 'setInteger',
'int32' => 'setInt32',
'int64' => 'setInt64',
'number' => 'setNumber',
'float' => 'setFloat',
'double' => 'setDouble',
'string' => 'setString',
'pattern_without_delimiter' => 'setPatternWithoutDelimiter',
'byte' => 'setByte',
'binary' => 'setBinary',
'date' => 'setDate',
'date_time' => 'setDateTime',
'password' => 'setPassword',
'callback' => 'setCallback'
];
/**
* Array of attributes to getter functions (for serialization of requests)
*
* @var string[]
*/
protected static $getters = [
'integer' => 'getInteger',
'int32' => 'getInt32',
'int64' => 'getInt64',
'number' => 'getNumber',
'float' => 'getFloat',
'double' => 'getDouble',
'string' => 'getString',
'pattern_without_delimiter' => 'getPatternWithoutDelimiter',
'byte' => 'getByte',
'binary' => 'getBinary',
'date' => 'getDate',
'date_time' => 'getDateTime',
'password' => 'getPassword',
'callback' => 'getCallback'
];
/**
* Array of attributes where the key is the local name,
* and the value is the original name
*
* @return array
*/
public static function attributeMap()
{
return self::$attributeMap;
}
/**
* Array of attributes to setter functions (for deserialization of responses)
*
* @return array
*/
public static function setters()
{
return self::$setters;
}
/**
* Array of attributes to getter functions (for serialization of requests)
*
* @return array
*/
public static function getters()
{
return self::$getters;
}
/**
* The original name of the model.
*
* @return string
*/
public function getModelName()
{
return self::$openAPIModelName;
}
/**
* Associative array for storing property values
*
* @var mixed[]
*/
protected $container = [];
/**
* Constructor
*
* @param mixed[] $data Associated array of property values
* initializing the model
*/
public function __construct(array $data = null)
{
$this->container['integer'] = isset($data['integer']) ? $data['integer'] : null;
$this->container['int32'] = isset($data['int32']) ? $data['int32'] : null;
$this->container['int64'] = isset($data['int64']) ? $data['int64'] : null;
$this->container['number'] = isset($data['number']) ? $data['number'] : null;
$this->container['float'] = isset($data['float']) ? $data['float'] : null;
$this->container['double'] = isset($data['double']) ? $data['double'] : null;
$this->container['string'] = isset($data['string']) ? $data['string'] : null;
$this->container['pattern_without_delimiter'] = isset($data['pattern_without_delimiter']) ? $data['pattern_without_delimiter'] : null;
$this->container['byte'] = isset($data['byte']) ? $data['byte'] : null;
$this->container['binary'] = isset($data['binary']) ? $data['binary'] : null;
$this->container['date'] = isset($data['date']) ? $data['date'] : null;
$this->container['date_time'] = isset($data['date_time']) ? $data['date_time'] : null;
$this->container['password'] = isset($data['password']) ? $data['password'] : null;
$this->container['callback'] = isset($data['callback']) ? $data['callback'] : null;
}
/**
* Show all the invalid properties with reasons.
*
* @return array invalid properties with reasons
*/
public function listInvalidProperties()
{
$invalidProperties = [];
if (!is_null($this->container['integer']) && ($this->container['integer'] > 100)) {
$invalidProperties[] = "invalid value for 'integer', must be smaller than or equal to 100.";
}
if (!is_null($this->container['integer']) && ($this->container['integer'] < 10)) {
$invalidProperties[] = "invalid value for 'integer', must be bigger than or equal to 10.";
}
if (!is_null($this->container['int32']) && ($this->container['int32'] > 200)) {
$invalidProperties[] = "invalid value for 'int32', must be smaller than or equal to 200.";
}
if (!is_null($this->container['int32']) && ($this->container['int32'] < 20)) {
$invalidProperties[] = "invalid value for 'int32', must be bigger than or equal to 20.";
}
if ($this->container['number'] === null) {
$invalidProperties[] = "'number' can't be null";
}
if (($this->container['number'] > 543.2)) {
$invalidProperties[] = "invalid value for 'number', must be smaller than or equal to 543.2.";
}
if (($this->container['number'] < 32.1)) {
$invalidProperties[] = "invalid value for 'number', must be bigger than or equal to 32.1.";
}
if (!is_null($this->container['float']) && ($this->container['float'] > 987.6)) {
$invalidProperties[] = "invalid value for 'float', must be smaller than or equal to 987.6.";
}
if ($this->container['double'] === null) {
$invalidProperties[] = "'double' can't be null";
}
if (($this->container['double'] > 123.4)) {
$invalidProperties[] = "invalid value for 'double', must be smaller than or equal to 123.4.";
}
if (($this->container['double'] < 67.8)) {
$invalidProperties[] = "invalid value for 'double', must be bigger than or equal to 67.8.";
}
if (!is_null($this->container['string']) && !preg_match("/[a-z]/i", $this->container['string'])) {
$invalidProperties[] = "invalid value for 'string', must be conform to the pattern /[a-z]/i.";
}
if ($this->container['pattern_without_delimiter'] === null) {
$invalidProperties[] = "'pattern_without_delimiter' can't be null";
}
if (!preg_match("/^[A-Z].*/", $this->container['pattern_without_delimiter'])) {
$invalidProperties[] = "invalid value for 'pattern_without_delimiter', must be conform to the pattern /^[A-Z].*/.";
}
if ($this->container['byte'] === null) {
$invalidProperties[] = "'byte' can't be null";
}
if (!is_null($this->container['password']) && (mb_strlen($this->container['password']) > 64)) {
$invalidProperties[] = "invalid value for 'password', the character length must be smaller than or equal to 64.";
}
if (!is_null($this->container['password']) && (mb_strlen($this->container['password']) < 10)) {
$invalidProperties[] = "invalid value for 'password', the character length must be bigger than or equal to 10.";
}
return $invalidProperties;
}
/**
* Validate all the properties in the model
* return true if all passed
*
* @return bool True if all properties are valid
*/
public function valid()
{
return count($this->listInvalidProperties()) === 0;
}
/**
* Gets integer
*
* @return int|null
*/
public function getInteger()
{
return $this->container['integer'];
}
/**
* Sets integer
*
* @param int|null $integer None
*
* @return $this
*/
public function setInteger($integer)
{
if (!is_null($integer) && ($integer > 100)) {
throw new \InvalidArgumentException('invalid value for $integer when calling Body3., must be smaller than or equal to 100.');
}
if (!is_null($integer) && ($integer < 10)) {
throw new \InvalidArgumentException('invalid value for $integer when calling Body3., must be bigger than or equal to 10.');
}
$this->container['integer'] = $integer;
return $this;
}
/**
* Gets int32
*
* @return int|null
*/
public function getInt32()
{
return $this->container['int32'];
}
/**
* Sets int32
*
* @param int|null $int32 None
*
* @return $this
*/
public function setInt32($int32)
{
if (!is_null($int32) && ($int32 > 200)) {
throw new \InvalidArgumentException('invalid value for $int32 when calling Body3., must be smaller than or equal to 200.');
}
if (!is_null($int32) && ($int32 < 20)) {
throw new \InvalidArgumentException('invalid value for $int32 when calling Body3., must be bigger than or equal to 20.');
}
$this->container['int32'] = $int32;
return $this;
}
/**
* Gets int64
*
* @return int|null
*/
public function getInt64()
{
return $this->container['int64'];
}
/**
* Sets int64
*
* @param int|null $int64 None
*
* @return $this
*/
public function setInt64($int64)
{
$this->container['int64'] = $int64;
return $this;
}
/**
* Gets number
*
* @return float
*/
public function getNumber()
{
return $this->container['number'];
}
/**
* Sets number
*
* @param float $number None
*
* @return $this
*/
public function setNumber($number)
{
if (($number > 543.2)) {
throw new \InvalidArgumentException('invalid value for $number when calling Body3., must be smaller than or equal to 543.2.');
}
if (($number < 32.1)) {
throw new \InvalidArgumentException('invalid value for $number when calling Body3., must be bigger than or equal to 32.1.');
}
$this->container['number'] = $number;
return $this;
}
/**
* Gets float
*
* @return float|null
*/
public function getFloat()
{
return $this->container['float'];
}
/**
* Sets float
*
* @param float|null $float None
*
* @return $this
*/
public function setFloat($float)
{
if (!is_null($float) && ($float > 987.6)) {
throw new \InvalidArgumentException('invalid value for $float when calling Body3., must be smaller than or equal to 987.6.');
}
$this->container['float'] = $float;
return $this;
}
/**
* Gets double
*
* @return double
*/
public function getDouble()
{
return $this->container['double'];
}
/**
* Sets double
*
* @param double $double None
*
* @return $this
*/
public function setDouble($double)
{
if (($double > 123.4)) {
throw new \InvalidArgumentException('invalid value for $double when calling Body3., must be smaller than or equal to 123.4.');
}
if (($double < 67.8)) {
throw new \InvalidArgumentException('invalid value for $double when calling Body3., must be bigger than or equal to 67.8.');
}
$this->container['double'] = $double;
return $this;
}
/**
* Gets string
*
* @return string|null
*/
public function getString()
{
return $this->container['string'];
}
/**
* Sets string
*
* @param string|null $string None
*
* @return $this
*/
public function setString($string)
{
if (!is_null($string) && (!preg_match("/[a-z]/i", $string))) {
throw new \InvalidArgumentException("invalid value for $string when calling Body3., must conform to the pattern /[a-z]/i.");
}
$this->container['string'] = $string;
return $this;
}
/**
* Gets pattern_without_delimiter
*
* @return string
*/
public function getPatternWithoutDelimiter()
{
return $this->container['pattern_without_delimiter'];
}
/**
* Sets pattern_without_delimiter
*
* @param string $pattern_without_delimiter None
*
* @return $this
*/
public function setPatternWithoutDelimiter($pattern_without_delimiter)
{
if ((!preg_match("/^[A-Z].*/", $pattern_without_delimiter))) {
throw new \InvalidArgumentException("invalid value for $pattern_without_delimiter when calling Body3., must conform to the pattern /^[A-Z].*/.");
}
$this->container['pattern_without_delimiter'] = $pattern_without_delimiter;
return $this;
}
/**
* Gets byte
*
* @return string
*/
public function getByte()
{
return $this->container['byte'];
}
/**
* Sets byte
*
* @param string $byte None
*
* @return $this
*/
public function setByte($byte)
{
$this->container['byte'] = $byte;
return $this;
}
/**
* Gets binary
*
* @return \SplFileObject|null
*/
public function getBinary()
{
return $this->container['binary'];
}
/**
* Sets binary
*
* @param \SplFileObject|null $binary None
*
* @return $this
*/
public function setBinary($binary)
{
$this->container['binary'] = $binary;
return $this;
}
/**
* Gets date
*
* @return \DateTime|null
*/
public function getDate()
{
return $this->container['date'];
}
/**
* Sets date
*
* @param \DateTime|null $date None
*
* @return $this
*/
public function setDate($date)
{
$this->container['date'] = $date;
return $this;
}
/**
* Gets date_time
*
* @return \DateTime|null
*/
public function getDateTime()
{
return $this->container['date_time'];
}
/**
* Sets date_time
*
* @param \DateTime|null $date_time None
*
* @return $this
*/
public function setDateTime($date_time)
{
$this->container['date_time'] = $date_time;
return $this;
}
/**
* Gets password
*
* @return string|null
*/
public function getPassword()
{
return $this->container['password'];
}
/**
* Sets password
*
* @param string|null $password None
*
* @return $this
*/
public function setPassword($password)
{
if (!is_null($password) && (mb_strlen($password) > 64)) {
throw new \InvalidArgumentException('invalid length for $password when calling Body3., must be smaller than or equal to 64.');
}
if (!is_null($password) && (mb_strlen($password) < 10)) {
throw new \InvalidArgumentException('invalid length for $password when calling Body3., must be bigger than or equal to 10.');
}
$this->container['password'] = $password;
return $this;
}
/**
* Gets callback
*
* @return string|null
*/
public function getCallback()
{
return $this->container['callback'];
}
/**
* Sets callback
*
* @param string|null $callback None
*
* @return $this
*/
public function setCallback($callback)
{
$this->container['callback'] = $callback;
return $this;
}
/**
* Returns true if offset exists. False otherwise.
*
* @param integer $offset Offset
*
* @return boolean
*/
public function offsetExists($offset)
{
return isset($this->container[$offset]);
}
/**
* Gets offset.
*
* @param integer $offset Offset
*
* @return mixed
*/
public function offsetGet($offset)
{
return isset($this->container[$offset]) ? $this->container[$offset] : null;
}
/**
* Sets value based on offset.
*
* @param integer $offset Offset
* @param mixed $value Value to be set
*
* @return void
*/
public function offsetSet($offset, $value)
{
if (is_null($offset)) {
$this->container[] = $value;
} else {
$this->container[$offset] = $value;
}
}
/**
* Unsets offset.
*
* @param integer $offset Offset
*
* @return void
*/
public function offsetUnset($offset)
{
unset($this->container[$offset]);
}
/**
* Gets the string presentation of the object
*
* @return string
*/
public function __toString()
{
return json_encode(
ObjectSerializer::sanitizeForSerialization($this),
JSON_PRETTY_PRINT
);
}
}

View File

@ -0,0 +1,333 @@
<?php
/**
* Body4
*
* PHP version 5
*
* @category Class
* @package OpenAPI\Client
* @author OpenAPI Generator team
* @link https://openapi-generator.tech
*/
/**
* OpenAPI Petstore
*
* This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
*
* OpenAPI spec version: 1.0.0
*
* Generated by: https://openapi-generator.tech
* OpenAPI Generator version: 3.2.2-SNAPSHOT
*/
/**
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
namespace OpenAPI\Client\Model;
use \ArrayAccess;
use \OpenAPI\Client\ObjectSerializer;
/**
* Body4 Class Doc Comment
*
* @category Class
* @package OpenAPI\Client
* @author OpenAPI Generator team
* @link https://openapi-generator.tech
*/
class Body4 implements ModelInterface, ArrayAccess
{
const DISCRIMINATOR = null;
/**
* The original name of the model.
*
* @var string
*/
protected static $openAPIModelName = 'body_4';
/**
* Array of property to type mappings. Used for (de)serialization
*
* @var string[]
*/
protected static $openAPITypes = [
'param' => 'string',
'param2' => 'string'
];
/**
* Array of property to format mappings. Used for (de)serialization
*
* @var string[]
*/
protected static $openAPIFormats = [
'param' => null,
'param2' => null
];
/**
* Array of property to type mappings. Used for (de)serialization
*
* @return array
*/
public static function openAPITypes()
{
return self::$openAPITypes;
}
/**
* Array of property to format mappings. Used for (de)serialization
*
* @return array
*/
public static function openAPIFormats()
{
return self::$openAPIFormats;
}
/**
* Array of attributes where the key is the local name,
* and the value is the original name
*
* @var string[]
*/
protected static $attributeMap = [
'param' => 'param',
'param2' => 'param2'
];
/**
* Array of attributes to setter functions (for deserialization of responses)
*
* @var string[]
*/
protected static $setters = [
'param' => 'setParam',
'param2' => 'setParam2'
];
/**
* Array of attributes to getter functions (for serialization of requests)
*
* @var string[]
*/
protected static $getters = [
'param' => 'getParam',
'param2' => 'getParam2'
];
/**
* Array of attributes where the key is the local name,
* and the value is the original name
*
* @return array
*/
public static function attributeMap()
{
return self::$attributeMap;
}
/**
* Array of attributes to setter functions (for deserialization of responses)
*
* @return array
*/
public static function setters()
{
return self::$setters;
}
/**
* Array of attributes to getter functions (for serialization of requests)
*
* @return array
*/
public static function getters()
{
return self::$getters;
}
/**
* The original name of the model.
*
* @return string
*/
public function getModelName()
{
return self::$openAPIModelName;
}
/**
* Associative array for storing property values
*
* @var mixed[]
*/
protected $container = [];
/**
* Constructor
*
* @param mixed[] $data Associated array of property values
* initializing the model
*/
public function __construct(array $data = null)
{
$this->container['param'] = isset($data['param']) ? $data['param'] : null;
$this->container['param2'] = isset($data['param2']) ? $data['param2'] : null;
}
/**
* Show all the invalid properties with reasons.
*
* @return array invalid properties with reasons
*/
public function listInvalidProperties()
{
$invalidProperties = [];
if ($this->container['param'] === null) {
$invalidProperties[] = "'param' can't be null";
}
if ($this->container['param2'] === null) {
$invalidProperties[] = "'param2' can't be null";
}
return $invalidProperties;
}
/**
* Validate all the properties in the model
* return true if all passed
*
* @return bool True if all properties are valid
*/
public function valid()
{
return count($this->listInvalidProperties()) === 0;
}
/**
* Gets param
*
* @return string
*/
public function getParam()
{
return $this->container['param'];
}
/**
* Sets param
*
* @param string $param field1
*
* @return $this
*/
public function setParam($param)
{
$this->container['param'] = $param;
return $this;
}
/**
* Gets param2
*
* @return string
*/
public function getParam2()
{
return $this->container['param2'];
}
/**
* Sets param2
*
* @param string $param2 field2
*
* @return $this
*/
public function setParam2($param2)
{
$this->container['param2'] = $param2;
return $this;
}
/**
* Returns true if offset exists. False otherwise.
*
* @param integer $offset Offset
*
* @return boolean
*/
public function offsetExists($offset)
{
return isset($this->container[$offset]);
}
/**
* Gets offset.
*
* @param integer $offset Offset
*
* @return mixed
*/
public function offsetGet($offset)
{
return isset($this->container[$offset]) ? $this->container[$offset] : null;
}
/**
* Sets value based on offset.
*
* @param integer $offset Offset
* @param mixed $value Value to be set
*
* @return void
*/
public function offsetSet($offset, $value)
{
if (is_null($offset)) {
$this->container[] = $value;
} else {
$this->container[$offset] = $value;
}
}
/**
* Unsets offset.
*
* @param integer $offset Offset
*
* @return void
*/
public function offsetUnset($offset)
{
unset($this->container[$offset]);
}
/**
* Gets the string presentation of the object
*
* @return string
*/
public function __toString()
{
return json_encode(
ObjectSerializer::sanitizeForSerialization($this),
JSON_PRETTY_PRINT
);
}
}

View File

@ -0,0 +1,330 @@
<?php
/**
* Body5
*
* PHP version 5
*
* @category Class
* @package OpenAPI\Client
* @author OpenAPI Generator team
* @link https://openapi-generator.tech
*/
/**
* OpenAPI Petstore
*
* This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
*
* OpenAPI spec version: 1.0.0
*
* Generated by: https://openapi-generator.tech
* OpenAPI Generator version: 3.2.2-SNAPSHOT
*/
/**
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
namespace OpenAPI\Client\Model;
use \ArrayAccess;
use \OpenAPI\Client\ObjectSerializer;
/**
* Body5 Class Doc Comment
*
* @category Class
* @package OpenAPI\Client
* @author OpenAPI Generator team
* @link https://openapi-generator.tech
*/
class Body5 implements ModelInterface, ArrayAccess
{
const DISCRIMINATOR = null;
/**
* The original name of the model.
*
* @var string
*/
protected static $openAPIModelName = 'body_5';
/**
* Array of property to type mappings. Used for (de)serialization
*
* @var string[]
*/
protected static $openAPITypes = [
'additional_metadata' => 'string',
'required_file' => '\SplFileObject'
];
/**
* Array of property to format mappings. Used for (de)serialization
*
* @var string[]
*/
protected static $openAPIFormats = [
'additional_metadata' => null,
'required_file' => 'binary'
];
/**
* Array of property to type mappings. Used for (de)serialization
*
* @return array
*/
public static function openAPITypes()
{
return self::$openAPITypes;
}
/**
* Array of property to format mappings. Used for (de)serialization
*
* @return array
*/
public static function openAPIFormats()
{
return self::$openAPIFormats;
}
/**
* Array of attributes where the key is the local name,
* and the value is the original name
*
* @var string[]
*/
protected static $attributeMap = [
'additional_metadata' => 'additionalMetadata',
'required_file' => 'requiredFile'
];
/**
* Array of attributes to setter functions (for deserialization of responses)
*
* @var string[]
*/
protected static $setters = [
'additional_metadata' => 'setAdditionalMetadata',
'required_file' => 'setRequiredFile'
];
/**
* Array of attributes to getter functions (for serialization of requests)
*
* @var string[]
*/
protected static $getters = [
'additional_metadata' => 'getAdditionalMetadata',
'required_file' => 'getRequiredFile'
];
/**
* Array of attributes where the key is the local name,
* and the value is the original name
*
* @return array
*/
public static function attributeMap()
{
return self::$attributeMap;
}
/**
* Array of attributes to setter functions (for deserialization of responses)
*
* @return array
*/
public static function setters()
{
return self::$setters;
}
/**
* Array of attributes to getter functions (for serialization of requests)
*
* @return array
*/
public static function getters()
{
return self::$getters;
}
/**
* The original name of the model.
*
* @return string
*/
public function getModelName()
{
return self::$openAPIModelName;
}
/**
* Associative array for storing property values
*
* @var mixed[]
*/
protected $container = [];
/**
* Constructor
*
* @param mixed[] $data Associated array of property values
* initializing the model
*/
public function __construct(array $data = null)
{
$this->container['additional_metadata'] = isset($data['additional_metadata']) ? $data['additional_metadata'] : null;
$this->container['required_file'] = isset($data['required_file']) ? $data['required_file'] : null;
}
/**
* Show all the invalid properties with reasons.
*
* @return array invalid properties with reasons
*/
public function listInvalidProperties()
{
$invalidProperties = [];
if ($this->container['required_file'] === null) {
$invalidProperties[] = "'required_file' can't be null";
}
return $invalidProperties;
}
/**
* Validate all the properties in the model
* return true if all passed
*
* @return bool True if all properties are valid
*/
public function valid()
{
return count($this->listInvalidProperties()) === 0;
}
/**
* Gets additional_metadata
*
* @return string|null
*/
public function getAdditionalMetadata()
{
return $this->container['additional_metadata'];
}
/**
* Sets additional_metadata
*
* @param string|null $additional_metadata Additional data to pass to server
*
* @return $this
*/
public function setAdditionalMetadata($additional_metadata)
{
$this->container['additional_metadata'] = $additional_metadata;
return $this;
}
/**
* Gets required_file
*
* @return \SplFileObject
*/
public function getRequiredFile()
{
return $this->container['required_file'];
}
/**
* Sets required_file
*
* @param \SplFileObject $required_file file to upload
*
* @return $this
*/
public function setRequiredFile($required_file)
{
$this->container['required_file'] = $required_file;
return $this;
}
/**
* Returns true if offset exists. False otherwise.
*
* @param integer $offset Offset
*
* @return boolean
*/
public function offsetExists($offset)
{
return isset($this->container[$offset]);
}
/**
* Gets offset.
*
* @param integer $offset Offset
*
* @return mixed
*/
public function offsetGet($offset)
{
return isset($this->container[$offset]) ? $this->container[$offset] : null;
}
/**
* Sets value based on offset.
*
* @param integer $offset Offset
* @param mixed $value Value to be set
*
* @return void
*/
public function offsetSet($offset, $value)
{
if (is_null($offset)) {
$this->container[] = $value;
} else {
$this->container[$offset] = $value;
}
}
/**
* Unsets offset.
*
* @param integer $offset Offset
*
* @return void
*/
public function offsetUnset($offset)
{
unset($this->container[$offset]);
}
/**
* Gets the string presentation of the object
*
* @return string
*/
public function __toString()
{
return json_encode(
ObjectSerializer::sanitizeForSerialization($this),
JSON_PRETTY_PRINT
);
}
}

View File

@ -0,0 +1,92 @@
<?php
/**
* Body1Test
*
* PHP version 5
*
* @category Class
* @package OpenAPI\Client
* @author OpenAPI Generator team
* @link https://openapi-generator.tech
*/
/**
* OpenAPI Petstore
*
* This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
*
* OpenAPI spec version: 1.0.0
*
* Generated by: https://openapi-generator.tech
* OpenAPI Generator version: 3.2.2-SNAPSHOT
*/
/**
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Please update the test case below to test the model.
*/
namespace OpenAPI\Client;
/**
* Body1Test Class Doc Comment
*
* @category Class
* @description Body1
* @package OpenAPI\Client
* @author OpenAPI Generator team
* @link https://openapi-generator.tech
*/
class Body1Test extends \PHPUnit_Framework_TestCase
{
/**
* Setup before running any test case
*/
public static function setUpBeforeClass()
{
}
/**
* Setup before running each test case
*/
public function setUp()
{
}
/**
* Clean up after running each test case
*/
public function tearDown()
{
}
/**
* Clean up after running all test cases
*/
public static function tearDownAfterClass()
{
}
/**
* Test "Body1"
*/
public function testBody1()
{
}
/**
* Test attribute "additional_metadata"
*/
public function testPropertyAdditionalMetadata()
{
}
/**
* Test attribute "file"
*/
public function testPropertyFile()
{
}
}

View File

@ -0,0 +1,92 @@
<?php
/**
* Body2Test
*
* PHP version 5
*
* @category Class
* @package OpenAPI\Client
* @author OpenAPI Generator team
* @link https://openapi-generator.tech
*/
/**
* OpenAPI Petstore
*
* This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
*
* OpenAPI spec version: 1.0.0
*
* Generated by: https://openapi-generator.tech
* OpenAPI Generator version: 3.2.2-SNAPSHOT
*/
/**
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Please update the test case below to test the model.
*/
namespace OpenAPI\Client;
/**
* Body2Test Class Doc Comment
*
* @category Class
* @description Body2
* @package OpenAPI\Client
* @author OpenAPI Generator team
* @link https://openapi-generator.tech
*/
class Body2Test extends \PHPUnit_Framework_TestCase
{
/**
* Setup before running any test case
*/
public static function setUpBeforeClass()
{
}
/**
* Setup before running each test case
*/
public function setUp()
{
}
/**
* Clean up after running each test case
*/
public function tearDown()
{
}
/**
* Clean up after running all test cases
*/
public static function tearDownAfterClass()
{
}
/**
* Test "Body2"
*/
public function testBody2()
{
}
/**
* Test attribute "enum_form_string_array"
*/
public function testPropertyEnumFormStringArray()
{
}
/**
* Test attribute "enum_form_string"
*/
public function testPropertyEnumFormString()
{
}
}

View File

@ -0,0 +1,176 @@
<?php
/**
* Body3Test
*
* PHP version 5
*
* @category Class
* @package OpenAPI\Client
* @author OpenAPI Generator team
* @link https://openapi-generator.tech
*/
/**
* OpenAPI Petstore
*
* This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
*
* OpenAPI spec version: 1.0.0
*
* Generated by: https://openapi-generator.tech
* OpenAPI Generator version: 3.2.2-SNAPSHOT
*/
/**
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Please update the test case below to test the model.
*/
namespace OpenAPI\Client;
/**
* Body3Test Class Doc Comment
*
* @category Class
* @description Body3
* @package OpenAPI\Client
* @author OpenAPI Generator team
* @link https://openapi-generator.tech
*/
class Body3Test extends \PHPUnit_Framework_TestCase
{
/**
* Setup before running any test case
*/
public static function setUpBeforeClass()
{
}
/**
* Setup before running each test case
*/
public function setUp()
{
}
/**
* Clean up after running each test case
*/
public function tearDown()
{
}
/**
* Clean up after running all test cases
*/
public static function tearDownAfterClass()
{
}
/**
* Test "Body3"
*/
public function testBody3()
{
}
/**
* Test attribute "integer"
*/
public function testPropertyInteger()
{
}
/**
* Test attribute "int32"
*/
public function testPropertyInt32()
{
}
/**
* Test attribute "int64"
*/
public function testPropertyInt64()
{
}
/**
* Test attribute "number"
*/
public function testPropertyNumber()
{
}
/**
* Test attribute "float"
*/
public function testPropertyFloat()
{
}
/**
* Test attribute "double"
*/
public function testPropertyDouble()
{
}
/**
* Test attribute "string"
*/
public function testPropertyString()
{
}
/**
* Test attribute "pattern_without_delimiter"
*/
public function testPropertyPatternWithoutDelimiter()
{
}
/**
* Test attribute "byte"
*/
public function testPropertyByte()
{
}
/**
* Test attribute "binary"
*/
public function testPropertyBinary()
{
}
/**
* Test attribute "date"
*/
public function testPropertyDate()
{
}
/**
* Test attribute "date_time"
*/
public function testPropertyDateTime()
{
}
/**
* Test attribute "password"
*/
public function testPropertyPassword()
{
}
/**
* Test attribute "callback"
*/
public function testPropertyCallback()
{
}
}

View File

@ -0,0 +1,92 @@
<?php
/**
* Body4Test
*
* PHP version 5
*
* @category Class
* @package OpenAPI\Client
* @author OpenAPI Generator team
* @link https://openapi-generator.tech
*/
/**
* OpenAPI Petstore
*
* This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
*
* OpenAPI spec version: 1.0.0
*
* Generated by: https://openapi-generator.tech
* OpenAPI Generator version: 3.2.2-SNAPSHOT
*/
/**
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Please update the test case below to test the model.
*/
namespace OpenAPI\Client;
/**
* Body4Test Class Doc Comment
*
* @category Class
* @description Body4
* @package OpenAPI\Client
* @author OpenAPI Generator team
* @link https://openapi-generator.tech
*/
class Body4Test extends \PHPUnit_Framework_TestCase
{
/**
* Setup before running any test case
*/
public static function setUpBeforeClass()
{
}
/**
* Setup before running each test case
*/
public function setUp()
{
}
/**
* Clean up after running each test case
*/
public function tearDown()
{
}
/**
* Clean up after running all test cases
*/
public static function tearDownAfterClass()
{
}
/**
* Test "Body4"
*/
public function testBody4()
{
}
/**
* Test attribute "param"
*/
public function testPropertyParam()
{
}
/**
* Test attribute "param2"
*/
public function testPropertyParam2()
{
}
}

View File

@ -0,0 +1,92 @@
<?php
/**
* Body5Test
*
* PHP version 5
*
* @category Class
* @package OpenAPI\Client
* @author OpenAPI Generator team
* @link https://openapi-generator.tech
*/
/**
* OpenAPI Petstore
*
* This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
*
* OpenAPI spec version: 1.0.0
*
* Generated by: https://openapi-generator.tech
* OpenAPI Generator version: 3.2.2-SNAPSHOT
*/
/**
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Please update the test case below to test the model.
*/
namespace OpenAPI\Client;
/**
* Body5Test Class Doc Comment
*
* @category Class
* @description Body5
* @package OpenAPI\Client
* @author OpenAPI Generator team
* @link https://openapi-generator.tech
*/
class Body5Test extends \PHPUnit_Framework_TestCase
{
/**
* Setup before running any test case
*/
public static function setUpBeforeClass()
{
}
/**
* Setup before running each test case
*/
public function setUp()
{
}
/**
* Clean up after running each test case
*/
public function tearDown()
{
}
/**
* Clean up after running all test cases
*/
public static function tearDownAfterClass()
{
}
/**
* Test "Body5"
*/
public function testBody5()
{
}
/**
* Test attribute "additional_metadata"
*/
public function testPropertyAdditionalMetadata()
{
}
/**
* Test attribute "required_file"
*/
public function testPropertyRequiredFile()
{
}
}

View File

@ -0,0 +1,92 @@
<?php
/**
* BodyTest
*
* PHP version 5
*
* @category Class
* @package OpenAPI\Client
* @author OpenAPI Generator team
* @link https://openapi-generator.tech
*/
/**
* OpenAPI Petstore
*
* This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
*
* OpenAPI spec version: 1.0.0
*
* Generated by: https://openapi-generator.tech
* OpenAPI Generator version: 3.2.2-SNAPSHOT
*/
/**
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Please update the test case below to test the model.
*/
namespace OpenAPI\Client;
/**
* BodyTest Class Doc Comment
*
* @category Class
* @description Body
* @package OpenAPI\Client
* @author OpenAPI Generator team
* @link https://openapi-generator.tech
*/
class BodyTest extends \PHPUnit_Framework_TestCase
{
/**
* Setup before running any test case
*/
public static function setUpBeforeClass()
{
}
/**
* Setup before running each test case
*/
public function setUp()
{
}
/**
* Clean up after running each test case
*/
public function tearDown()
{
}
/**
* Clean up after running all test cases
*/
public static function tearDownAfterClass()
{
}
/**
* Test "Body"
*/
public function testBody()
{
}
/**
* Test attribute "name"
*/
public function testPropertyName()
{
}
/**
* Test attribute "status"
*/
public function testPropertyStatus()
{
}
}