Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions samples/client/petstore/apex/docs/SwagPetApi.md
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ try {

Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**body** | [**SwagPet**](Pet.md)| Pet object that needs to be added to the store |
**body** | [**SwagPet**](SwagPet.md)| Pet object that needs to be added to the store |

### Return type

Expand Down Expand Up @@ -292,7 +292,7 @@ try {

Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**body** | [**SwagPet**](Pet.md)| Pet object that needs to be added to the store |
**body** | [**SwagPet**](SwagPet.md)| Pet object that needs to be added to the store |

### Return type

Expand Down
2 changes: 1 addition & 1 deletion samples/client/petstore/apex/docs/SwagStoreApi.md
Original file line number Diff line number Diff line change
Expand Up @@ -168,7 +168,7 @@ try {

Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**body** | [**SwagOrder**](Order.md)| order placed for purchasing the pet |
**body** | [**SwagOrder**](SwagOrder.md)| order placed for purchasing the pet |

### Return type

Expand Down
4 changes: 2 additions & 2 deletions samples/client/petstore/apex/docs/SwagUserApi.md
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ try {

Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**body** | [**SwagUser**](User.md)| Created user object |
**body** | [**SwagUser**](SwagUser.md)| Created user object |

### Return type

Expand Down Expand Up @@ -342,7 +342,7 @@ try {
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**username** | **String**| name that need to be deleted |
**body** | [**SwagUser**](User.md)| Updated user object |
**body** | [**SwagUser**](SwagUser.md)| Updated user object |

### Return type

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -344,7 +344,7 @@ namespace Example
var number = 3.4; // decimal? | None
var _double = 1.2; // double? | None
var patternWithoutDelimiter = patternWithoutDelimiter_example; // string | None
var _byte = B; // byte[] | None
var _byte = _byte_example; // byte[] | None
var integer = 56; // int? | None (optional)
var int32 = 56; // int? | None (optional)
var int64 = 789; // long? | None (optional)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -418,6 +418,13 @@ public override int GetHashCode()
yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for _String, must match a pattern of /[a-z]/i.", new [] { "_String" });
}

// _Byte (byte[]) pattern
Regex regex_Byte = new Regex(@"^(?:[A-Za-z0-9+\/]{4})*(?:[A-Za-z0-9+\/]{2}==|[A-Za-z0-9+\/]{3}=)?$", RegexOptions.CultureInvariant);
if (false == regex_Byte.Match(this._Byte).Success)
{
yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for _Byte, must match a pattern of /^(?:[A-Za-z0-9+\/]{4})*(?:[A-Za-z0-9+\/]{2}==|[A-Za-z0-9+\/]{3}=)?$/.", new [] { "_Byte" });
}

// Password (string) maxLength
if(this.Password != null && this.Password.Length > 64)
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -344,7 +344,7 @@ namespace Example
var number = 3.4; // decimal? | None
var _double = 1.2; // double? | None
var patternWithoutDelimiter = patternWithoutDelimiter_example; // string | None
var _byte = B; // byte[] | None
var _byte = _byte_example; // byte[] | None
var integer = 56; // int? | None (optional)
var int32 = 56; // int? | None (optional)
var int64 = 789; // long? | None (optional)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -344,7 +344,7 @@ namespace Example
var number = 3.4; // decimal? | None
var _double = 1.2; // double? | None
var patternWithoutDelimiter = patternWithoutDelimiter_example; // string | None
var _byte = B; // byte[] | None
var _byte = _byte_example; // byte[] | None
var integer = 56; // int? | None (optional)
var int32 = 56; // int? | None (optional)
var int64 = 789; // long? | None (optional)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -344,7 +344,7 @@ namespace Example
var number = 3.4; // decimal? | None
var _double = 1.2; // double? | None
var patternWithoutDelimiter = patternWithoutDelimiter_example; // string | None
var _byte = B; // byte[] | None
var _byte = _byte_example; // byte[] | None
var integer = 56; // int? | None (optional)
var int32 = 56; // int? | None (optional)
var int64 = 789; // long? | None (optional)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -441,6 +441,13 @@ public virtual void OnPropertyChanged(string propertyName)
yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for _String, must match a pattern of /[a-z]/i.", new [] { "_String" });
}

// _Byte (byte[]) pattern
Regex regex_Byte = new Regex(@"^(?:[A-Za-z0-9+\/]{4})*(?:[A-Za-z0-9+\/]{2}==|[A-Za-z0-9+\/]{3}=)?$", RegexOptions.CultureInvariant);
if (false == regex_Byte.Match(this._Byte).Success)
{
yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for _Byte, must match a pattern of /^(?:[A-Za-z0-9+\/]{4})*(?:[A-Za-z0-9+\/]{2}==|[A-Za-z0-9+\/]{3}=)?$/.", new [] { "_Byte" });
}

// Password (string) maxLength
if(this.Password != null && this.Password.Length > 64)
{
Expand Down
2 changes: 1 addition & 1 deletion samples/client/petstore/objc/core-data/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ SWGDefaultConfiguration *apiConfig = [SWGDefaultConfiguration sharedConfig];
[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];


SWGPet* *body = [[Pet alloc] init]; // Pet object that needs to be added to the store (optional)
SWGPet* *body = [[SWGPet alloc] init]; // Pet object that needs to be added to the store (optional)

SWGPetApi *apiInstance = [[SWGPetApi alloc] init];

Expand Down
2 changes: 1 addition & 1 deletion samples/client/petstore/objc/default/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ SWGDefaultConfiguration *apiConfig = [SWGDefaultConfiguration sharedConfig];
[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];


SWGPet* *body = [[Pet alloc] init]; // Pet object that needs to be added to the store (optional)
SWGPet* *body = [[SWGPet alloc] init]; // Pet object that needs to be added to the store (optional)

SWGPetApi *apiInstance = [[SWGPetApi alloc] init];

Expand Down
8 changes: 4 additions & 4 deletions samples/client/petstore/objc/default/docs/SWGPetApi.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ SWGDefaultConfiguration *apiConfig = [SWGDefaultConfiguration sharedConfig];
[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];


SWGPet* body = [[Pet alloc] init]; // Pet object that needs to be added to the store (optional)
SWGPet* body = [[SWGPet alloc] init]; // Pet object that needs to be added to the store (optional)

SWGPetApi*apiInstance = [[SWGPetApi alloc] init];

Expand All @@ -49,7 +49,7 @@ SWGPetApi*apiInstance = [[SWGPetApi alloc] init];

Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**body** | [**SWGPet***](Pet.md)| Pet object that needs to be added to the store | [optional]
**body** | [**SWGPet***](SWGPet.md)| Pet object that needs to be added to the store | [optional]

### Return type

Expand Down Expand Up @@ -310,7 +310,7 @@ SWGDefaultConfiguration *apiConfig = [SWGDefaultConfiguration sharedConfig];
[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];


SWGPet* body = [[Pet alloc] init]; // Pet object that needs to be added to the store (optional)
SWGPet* body = [[SWGPet alloc] init]; // Pet object that needs to be added to the store (optional)

SWGPetApi*apiInstance = [[SWGPetApi alloc] init];

Expand All @@ -327,7 +327,7 @@ SWGPetApi*apiInstance = [[SWGPetApi alloc] init];

Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**body** | [**SWGPet***](Pet.md)| Pet object that needs to be added to the store | [optional]
**body** | [**SWGPet***](SWGPet.md)| Pet object that needs to be added to the store | [optional]

### Return type

Expand Down
4 changes: 2 additions & 2 deletions samples/client/petstore/objc/default/docs/SWGStoreApi.md
Original file line number Diff line number Diff line change
Expand Up @@ -173,7 +173,7 @@ Place an order for a pet
### Example
```objc

SWGOrder* body = [[Order alloc] init]; // order placed for purchasing the pet (optional)
SWGOrder* body = [[SWGOrder alloc] init]; // order placed for purchasing the pet (optional)

SWGStoreApi*apiInstance = [[SWGStoreApi alloc] init];

Expand All @@ -193,7 +193,7 @@ SWGStoreApi*apiInstance = [[SWGStoreApi alloc] init];

Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**body** | [**SWGOrder***](Order.md)| order placed for purchasing the pet | [optional]
**body** | [**SWGOrder***](SWGOrder.md)| order placed for purchasing the pet | [optional]

### Return type

Expand Down
8 changes: 4 additions & 4 deletions samples/client/petstore/objc/default/docs/SWGUserApi.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ This can only be done by the logged in user.
### Example
```objc

SWGUser* body = [[User alloc] init]; // Created user object (optional)
SWGUser* body = [[SWGUser alloc] init]; // Created user object (optional)

SWGUserApi*apiInstance = [[SWGUserApi alloc] init];

Expand All @@ -44,7 +44,7 @@ SWGUserApi*apiInstance = [[SWGUserApi alloc] init];

Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**body** | [**SWGUser***](User.md)| Created user object | [optional]
**body** | [**SWGUser***](SWGUser.md)| Created user object | [optional]

### Return type

Expand Down Expand Up @@ -364,7 +364,7 @@ This can only be done by the logged in user.
```objc

NSString* username = @"username_example"; // name that need to be deleted
SWGUser* body = [[User alloc] init]; // Updated user object (optional)
SWGUser* body = [[SWGUser alloc] init]; // Updated user object (optional)

SWGUserApi*apiInstance = [[SWGUserApi alloc] init];

Expand All @@ -383,7 +383,7 @@ SWGUserApi*apiInstance = [[SWGUserApi alloc] init];
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**username** | **NSString***| name that need to be deleted |
**body** | [**SWGUser***](User.md)| Updated user object | [optional]
**body** | [**SWGUser***](SWGUser.md)| Updated user object | [optional]

### Return type

Expand Down
2 changes: 1 addition & 1 deletion samples/client/petstore/perl/docs/FakeApi.md
Original file line number Diff line number Diff line change
Expand Up @@ -269,7 +269,7 @@ my $api_instance = WWW::SwaggerClient::FakeApi->new();
my $number = 3.4; # Number | None
my $double = 1.2; # double | None
my $pattern_without_delimiter = 'pattern_without_delimiter_example'; # string | None
my $byte = 'B'; # string | None
my $byte = 'byte_example'; # string | None
my $integer = 56; # int | None
my $int32 = 56; # int | None
my $int64 = 789; # int | None
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -258,7 +258,7 @@ $api_instance = new Swagger\Client\Api\FakeApi();
$number = 3.4; // float | None
$double = 1.2; // double | None
$pattern_without_delimiter = "pattern_without_delimiter_example"; // string | None
$byte = "B"; // string | None
$byte = "byte_example"; // string | None
$integer = 56; // int | None
$int32 = 56; // int | None
$int64 = 789; // int | None
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -528,8 +528,8 @@ public function testEndpointParametersWithHttpInfo($number, $double, $pattern_wi
if ($pattern_without_delimiter === null) {
throw new \InvalidArgumentException('Missing the required parameter $pattern_without_delimiter when calling testEndpointParameters');
}
if (!preg_match("/^[A-Z].*_/", $pattern_without_delimiter)) {
throw new \InvalidArgumentException("invalid value for \"pattern_without_delimiter\" when calling FakeApi.testEndpointParameters, must conform to the pattern /^[A-Z].*_/.");
if (!preg_match("/^[A-Z].*/", $pattern_without_delimiter)) {
throw new \InvalidArgumentException("invalid value for \"pattern_without_delimiter\" when calling FakeApi.testEndpointParameters, must conform to the pattern /^[A-Z].*/.");
}

// verify the required parameter 'byte' is set
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -266,6 +266,10 @@ public function listInvalidProperties()
if ($this->container['byte'] === null) {
$invalid_properties[] = "'byte' can't be null";
}
if (!preg_match("/^(?:[A-Za-z0-9+\/]{4})*(?:[A-Za-z0-9+\/]{2}==|[A-Za-z0-9+\/]{3}=)?$/", $this->container['byte'])) {
$invalid_properties[] = "invalid value for 'byte', must be conform to the pattern /^(?:[A-Za-z0-9+\/]{4})*(?:[A-Za-z0-9+\/]{2}==|[A-Za-z0-9+\/]{3}=)?$/.";
}

if ($this->container['date'] === null) {
$invalid_properties[] = "'date' can't be null";
}
Expand Down Expand Up @@ -331,6 +335,9 @@ public function valid()
if ($this->container['byte'] === null) {
return false;
}
if (!preg_match("/^(?:[A-Za-z0-9+\/]{4})*(?:[A-Za-z0-9+\/]{2}==|[A-Za-z0-9+\/]{3}=)?$/", $this->container['byte'])) {
return false;
}
if ($this->container['date'] === null) {
return false;
}
Expand Down Expand Up @@ -555,6 +562,11 @@ public function getByte()
*/
public function setByte($byte)
{

if ((!preg_match("/^(?:[A-Za-z0-9+\/]{4})*(?:[A-Za-z0-9+\/]{2}==|[A-Za-z0-9+\/]{3}=)?$/", $byte))) {
throw new \InvalidArgumentException("invalid value for $byte when calling FormatTest., must conform to the pattern /^(?:[A-Za-z0-9+\/]{4})*(?:[A-Za-z0-9+\/]{2}==|[A-Za-z0-9+\/]{3}=)?$/.");
}

$this->container['byte'] = $byte;

return $this;
Expand Down
2 changes: 1 addition & 1 deletion samples/client/petstore/powershell_test/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ This PowerShell module is automatically generated by the [Swagger Codegen](https

- API version: 1.0.0
- SDK version:
- Build date: 2017-06-20T22:49:00.415+08:00
- Build date: 2017-07-06T21:28:56.389+02:00
- Build package: io.swagger.codegen.languages.PowerShellClientCodegen

<a name="frameworks-supported"></a>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ LONG DESCRIPTION

- API version: 1.0.0
- SDK version:
- Build date: 2017-06-20T22:49:00.415+08:00
- Build date: 2017-07-06T21:28:56.389+02:00
- Build package: io.swagger.codegen.languages.PowerShellClientCodegen

Frameworks supported:
Expand Down
2 changes: 1 addition & 1 deletion samples/client/petstore/python/docs/FakeApi.md
Original file line number Diff line number Diff line change
Expand Up @@ -273,7 +273,7 @@ api_instance = petstore_api.FakeApi()
number = 3.4 # float | None
double = 1.2 # float | None
pattern_without_delimiter = 'pattern_without_delimiter_example' # str | None
byte = 'B' # str | None
byte = 'byte_example' # str | None
integer = 56 # int | None (optional)
int32 = 56 # int | None (optional)
int64 = 789 # int | None (optional)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -295,6 +295,8 @@ def byte(self, byte):
"""
if byte is None:
raise ValueError("Invalid value for `byte`, must not be `None`")
if byte is not None and not re.search('^(?:[A-Za-z0-9+\/]{4})*(?:[A-Za-z0-9+\/]{2}==|[A-Za-z0-9+\/]{3}=)?$', byte):
raise ValueError("Invalid value for `byte`, must be a follow pattern or equal to `/^(?:[A-Za-z0-9+\/]{4})*(?:[A-Za-z0-9+\/]{2}==|[A-Za-z0-9+\/]{3}=)?$/`")

self._byte = byte

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -168,9 +168,9 @@ open class FakeAPI: APIBase {
To test \"client\" model
- PATCH /fake
- To test \"client\" model
- examples: [{example={
- examples: [{contentType=application/json, example={
"client" : "aeiou"
}, contentType=application/json}]
}}]

- parameter body: (body) client model

Expand Down
Loading