Update samples after 2.2.2 (#4901)

* Update petstore samples for Groovy.

* Update samples for JaxRS.

* Update samples for cpprest.

* Update samples for dart.

* Update samples for flash.

* Update samples for go.

* Update samples for html2.

* Update samples for lumen.

* Update samples for nancxfx.

* Update samples for objc.

* Update samples for sinatra.

* Update samples for tizen.

* Update samples for java-inflector.
This commit is contained in:
Paŭlo Ebermann
2017-03-05 17:33:57 +01:00
committed by wing328
parent 66a510c9d3
commit a91cbbe387
50 changed files with 172 additions and 196 deletions

View File

@@ -438,7 +438,7 @@ pplx::task<std::vector<std::shared_ptr<Pet>>> PetApi::findPetsByTags(std::vector
{
queryParams[U("tags")] = ApiClient::parameterToArrayString<>(tags);
queryParams[U("tags")] = ApiClient::parameterToArrayString<utility::string_t>(tags);
}
std::shared_ptr<IHttpBody> httpBody;

View File

@@ -22,10 +22,10 @@
#include "ApiClient.h"
#include "Pet.h"
#include <cpprest/details/basic_types.h>
#include "ApiResponse.h"
#include "HttpContent.h"
#include "Pet.h"
#include <cpprest/details/basic_types.h>
namespace io {
namespace swagger {

View File

@@ -22,9 +22,9 @@
#include "ApiClient.h"
#include <cpprest/details/basic_types.h>
#include <map>
#include "Order.h"
#include <map>
#include <cpprest/details/basic_types.h>
namespace io {
namespace swagger {

View File

@@ -21,7 +21,7 @@ namespace model {
Category::Category()
{
m_Id = 0L;
m_Id = 0;
m_IdIsSet = false;
m_Name = U("");
m_NameIsSet = false;

View File

@@ -21,9 +21,9 @@ namespace model {
Order::Order()
{
m_Id = 0L;
m_Id = 0;
m_IdIsSet = false;
m_PetId = 0L;
m_PetId = 0;
m_PetIdIsSet = false;
m_Quantity = 0;
m_QuantityIsSet = false;

View File

@@ -21,7 +21,7 @@ namespace model {
Pet::Pet()
{
m_Id = 0L;
m_Id = 0;
m_IdIsSet = false;
m_CategoryIsSet = false;
m_Name = U("");

View File

@@ -21,7 +21,7 @@ namespace model {
Tag::Tag()
{
m_Id = 0L;
m_Id = 0;
m_IdIsSet = false;
m_Name = U("");
m_NameIsSet = false;

View File

@@ -21,7 +21,7 @@ namespace model {
User::User()
{
m_Id = 0L;
m_Id = 0;
m_IdIsSet = false;
m_Username = U("");
m_UsernameIsSet = false;

View File

@@ -4,8 +4,8 @@ This is a sample server Petstore server. You can find out more about Swagger at
This Dart package is automatically generated by the [Swagger Codegen](https://github.com/swagger-api/swagger-codegen) project:
- API version: 1.0.0
- Build date: 2016-11-30T18:12:21.701+08:00
- Build package: class io.swagger.codegen.languages.DartClientCodegen
- Build date: 2017-03-02T21:05:05.222+01:00
- Build package: io.swagger.codegen.languages.DartClientCodegen
## Requirements

View File

@@ -5,7 +5,7 @@
import 'package:swagger/api.dart';
```
All URIs are relative to **
All URIs are relative to *http://petstore.swagger.io/v2*
Method | HTTP request | Description
------------- | ------------- | -------------

View File

@@ -5,7 +5,7 @@
import 'package:swagger/api.dart';
```
All URIs are relative to **
All URIs are relative to *http://petstore.swagger.io/v2*
Method | HTTP request | Description
------------- | ------------- | -------------

View File

@@ -5,7 +5,7 @@
import 'package:swagger/api.dart';
```
All URIs are relative to **
All URIs are relative to *http://petstore.swagger.io/v2*
Method | HTTP request | Description
------------- | ------------- | -------------

View File

@@ -0,0 +1,23 @@
# Swagger Codegen Ignore
# Generated by swagger-codegen https://github.com/swagger-api/swagger-codegen
# Use this file to prevent files from being overwritten by the generator.
# The patterns follow closely to .gitignore or .dockerignore.
# As an example, the C# client generator defines ApiClient.cs.
# You can make changes and tell Swagger Codgen to ignore just this file by uncommenting the following line:
#ApiClient.cs
# You can match any string of characters against a directory, file or extension with a single asterisk (*):
#foo/*/qux
# The above matches foo/bar/qux and foo/baz/qux, but not foo/bar/baz/qux
# You can recursively match patterns against a directory, file or extension with a double asterisk (**):
#foo/**/qux
# This matches foo/bar/qux, foo/baz/qux, and foo/bar/baz/qux
# You can also negate patterns with an exclamation (!).
# For example, you can ignore all files in a docs folder with the file extension .md:
#docs/*.md
# Then explicitly reverse the ignore rule for a single file:
#!docs/README.md

View File

@@ -6,9 +6,9 @@ import io.swagger.exception.ApiError;
import io.swagger.common.ApiUserCredentials;
import io.swagger.event.Response;
import io.swagger.common.SwaggerApi;
import io.swagger.client.model.Pet;
import io.swagger.client.model.ApiResponse;
import flash.filesystem.File;
import io.swagger.client.model.Pet;
import mx.rpc.AsyncToken;
import mx.utils.UIDUtil;

View File

@@ -8,12 +8,12 @@ git_repo_id=$2
release_note=$3
if [ "$git_user_id" = "" ]; then
git_user_id="YOUR_GIT_USR_ID"
git_user_id="GIT_USER_ID"
echo "[INFO] No command line input provided. Set \$git_user_id to $git_user_id"
fi
if [ "$git_repo_id" = "" ]; then
git_repo_id="YOUR_GIT_REPO_ID"
git_repo_id="GIT_REPO_ID"
echo "[INFO] No command line input provided. Set \$git_repo_id to $git_repo_id"
fi

View File

@@ -5,9 +5,9 @@ import static groovyx.net.http.ContentType.*
import static groovyx.net.http.Method.*
import io.swagger.api.ApiUtils
import io.swagger.model.Pet
import io.swagger.model.File
import io.swagger.model.ModelApiResponse
import java.io.File
import io.swagger.model.Pet
import java.util.*;

View File

@@ -5,6 +5,7 @@ import static groovyx.net.http.ContentType.*
import static groovyx.net.http.Method.*
import io.swagger.api.ApiUtils
import io.swagger.model.Map
import io.swagger.model.Order
import java.util.*;

View File

@@ -3,7 +3,7 @@ package io.swagger.model;
import groovy.transform.Canonical
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import java.util.Date;
import io.swagger.model.Date;
@Canonical
class Order {

View File

@@ -3,9 +3,9 @@ package io.swagger.model;
import groovy.transform.Canonical
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import io.swagger.model.ArrayList;
import io.swagger.model.Category;
import io.swagger.model.Tag;
import java.util.ArrayList;
import java.util.List;
@Canonical
class Pet {

View File

@@ -6,8 +6,7 @@ This ObjC package is automatically generated by the [Swagger Codegen](https://gi
- API version: 1.0.0
- Package version:
- Build date: 2016-08-23T10:56:27.632+02:00
- Build package: class io.swagger.codegen.languages.ObjcClientCodegen
- Build package: io.swagger.codegen.languages.ObjcClientCodegen
## Requirements
@@ -56,7 +55,7 @@ Import the following:
## Recommendation
It's recommended to create an instance of ApiClient per thread in a multi-threaded environment to avoid any potential issue.
It's recommended to create an instance of ApiClient per thread in a multi-threaded environment to avoid any potential issues.
## Getting Started
@@ -124,6 +123,12 @@ Class | Method | HTTP request | Description
## Documentation For Authorization
## api_key
- **Type**: API key
- **API key parameter name**: api_key
- **Location**: HTTP header
## petstore_auth
- **Type**: OAuth
@@ -133,12 +138,6 @@ Class | Method | HTTP request | Description
- **write:pets**: modify pets in your account
- **read:pets**: read your pets
## api_key
- **Type**: API key
- **API key parameter name**: api_key
- **Location**: HTTP header
## Author

View File

@@ -22,7 +22,7 @@ Pod::Spec.new do |s|
s.frameworks = 'SystemConfiguration', 'CoreData'
s.homepage = "https://github.com/swagger-api/swagger-codegen"
s.license = "Apache License, Version 2.0"
s.license = "Proprietary"
s.source = { :git => "https://github.com/swagger-api/swagger-codegen.git", :tag => "#{s.version}" }
s.author = { "Swagger" => "apiteam@swagger.io" }

View File

@@ -12,21 +12,10 @@
* NOTE: This class is auto generated by the swagger code generator program.
* https://github.com/swagger-api/swagger-codegen.git
* Do not edit the class manually.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
@interface SWGPetApi: NSObject <SWGApi>
extern NSString* kSWGPetApiErrorDomain;
@@ -61,7 +50,7 @@ extern NSInteger kSWGPetApiMissingParamErrorCode;
/// Finds Pets by status
/// Multiple status values can be provided with comma seperated strings
/// Multiple status values can be provided with comma separated strings
///
/// @param status Status values that need to be considered for filter (optional) (default to available)
///
@@ -74,7 +63,7 @@ extern NSInteger kSWGPetApiMissingParamErrorCode;
/// Finds Pets by tags
/// Muliple tags can be provided with comma seperated strings. Use tag1, tag2, tag3 for testing.
/// Multiple tags can be provided with comma separated strings. Use tag1, tag2, tag3 for testing.
///
/// @param tags Tags to filter by (optional)
///

View File

@@ -186,7 +186,7 @@ NSInteger kSWGPetApiMissingParamErrorCode = 234513;
///
/// Finds Pets by status
/// Multiple status values can be provided with comma seperated strings
/// Multiple status values can be provided with comma separated strings
/// @param status Status values that need to be considered for filter (optional, default to available)
///
/// @returns NSArray<SWGPet>*
@@ -247,7 +247,7 @@ NSInteger kSWGPetApiMissingParamErrorCode = 234513;
///
/// Finds Pets by tags
/// Muliple tags can be provided with comma seperated strings. Use tag1, tag2, tag3 for testing.
/// Multiple tags can be provided with comma separated strings. Use tag1, tag2, tag3 for testing.
/// @param tags Tags to filter by (optional)
///
/// @returns NSArray<SWGPet>*

View File

@@ -12,21 +12,10 @@
* NOTE: This class is auto generated by the swagger code generator program.
* https://github.com/swagger-api/swagger-codegen.git
* Do not edit the class manually.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
@interface SWGStoreApi: NSObject <SWGApi>
extern NSString* kSWGStoreApiErrorDomain;

View File

@@ -12,21 +12,10 @@
* NOTE: This class is auto generated by the swagger code generator program.
* https://github.com/swagger-api/swagger-codegen.git
* Do not edit the class manually.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
@interface SWGUserApi: NSObject <SWGApi>
extern NSString* kSWGUserApiErrorDomain;

View File

@@ -13,20 +13,9 @@
* NOTE: This class is auto generated by the swagger code generator program.
* https://github.com/swagger-api/swagger-codegen.git
* Do not edit the class manually.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
/**
* A key for `NSError` user info dictionaries.
*

View File

@@ -12,20 +12,9 @@
* NOTE: This class is auto generated by the swagger code generator program.
* https://github.com/swagger-api/swagger-codegen.git
* Do not edit the class manually.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
static NSString * const kSWGAPIVersion = @"1.0.0";
@protocol SWGConfiguration <NSObject>

View File

@@ -11,20 +11,9 @@
* NOTE: This class is auto generated by the swagger code generator program.
* https://github.com/swagger-api/swagger-codegen.git
* Do not edit the class manually.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
@class SWGApiClient;
@interface SWGDefaultConfiguration : NSObject <SWGConfiguration>
@@ -117,7 +106,7 @@
/**
* Sets the prefix for API key
*
* @param apiKeyPrefix API key prefix.
* @param prefix API key prefix.
* @param identifier API key identifier.
*/
- (void) setApiKeyPrefix:(NSString *)prefix forApiKeyPrefixIdentifier:(NSString *)identifier;
@@ -157,7 +146,7 @@
/**
* Removes header from defaultHeaders
*
* @param Header name.
* @param key Header name.
*/
-(void) removeDefaultHeaderForKey:(NSString*)key;
@@ -170,7 +159,7 @@
-(void) setDefaultHeaderValue:(NSString*) value forKey:(NSString*)key;
/**
* @param Header key name.
* @param key Header key name.
*/
-(NSString*) defaultHeaderForKey:(NSString*)key;

View File

@@ -104,13 +104,6 @@
- (NSDictionary *) authSettings {
return @{
@"petstore_auth":
@{
@"type": @"oauth",
@"in": @"header",
@"key": @"Authorization",
@"value": [self getAccessToken]
},
@"api_key":
@{
@"type": @"api_key",
@@ -118,6 +111,13 @@
@"key": @"api_key",
@"value": [self getApiKeyWithPrefix:@"api_key"]
},
@"petstore_auth":
@{
@"type": @"oauth",
@"in": @"header",
@"key": @"Authorization",
@"value": [self getAccessToken]
},
};
}

View File

@@ -0,0 +1,23 @@
# Swagger Codegen Ignore
# Generated by swagger-codegen https://github.com/swagger-api/swagger-codegen
# Use this file to prevent files from being overwritten by the generator.
# The patterns follow closely to .gitignore or .dockerignore.
# As an example, the C# client generator defines ApiClient.cs.
# You can make changes and tell Swagger Codgen to ignore just this file by uncommenting the following line:
#ApiClient.cs
# You can match any string of characters against a directory, file or extension with a single asterisk (*):
#foo/*/qux
# The above matches foo/bar/qux and foo/baz/qux, but not foo/bar/baz/qux
# You can recursively match patterns against a directory, file or extension with a double asterisk (**):
#foo/**/qux
# This matches foo/bar/qux, foo/baz/qux, and foo/bar/baz/qux
# You can also negate patterns with an exclamation (!).
# For example, you can ignore all files in a docs folder with the file extension .md:
#docs/*.md
# Then explicitly reverse the ignore rule for a single file:
#!docs/README.md

View File

@@ -1,7 +1,7 @@
/*
* SamiApiResponse.h
*
*
* Describes the result of uploading an image resource
*/
#ifndef SamiApiResponse_H_

View File

@@ -1,7 +1,7 @@
/*
* SamiCategory.h
*
*
* A category for a pet
*/
#ifndef SamiCategory_H_

View File

@@ -1,7 +1,7 @@
/*
* SamiOrder.h
*
*
* An order for a pets from the pet store
*/
#ifndef SamiOrder_H_

View File

@@ -1,7 +1,7 @@
/*
* SamiPet.h
*
*
* A pet for sale in the pet store
*/
#ifndef SamiPet_H_

View File

@@ -5,11 +5,11 @@
#include "SamiApiClient.h"
#include "SamiError.h"
#include "SamiPet.h"
using Tizen::Base::Long;
using Tizen::Base::String;
#include "SamiFile.h"
#include "SamiApiResponse.h"
#include "SamiFile.h"
#include "SamiPet.h"
using Tizen::Base::String;
using namespace Tizen::Net::Http;

View File

@@ -5,10 +5,10 @@
#include "SamiApiClient.h"
#include "SamiError.h"
using Tizen::Base::String;
using Tizen::Base::Integer;
#include "SamiOrder.h"
using Tizen::Base::Long;
#include "SamiOrder.h"
using Tizen::Base::String;
using namespace Tizen::Net::Http;

View File

@@ -1,7 +1,7 @@
/*
* SamiTag.h
*
*
* A tag for a pet
*/
#ifndef SamiTag_H_

View File

@@ -1,7 +1,7 @@
/*
* SamiUser.h
*
*
* A User who is purchasing from the pet store
*/
#ifndef SamiUser_H_

View File

@@ -5,8 +5,8 @@
#include "SamiApiClient.h"
#include "SamiError.h"
#include "SamiUser.h"
using Tizen::Base::Collection::IList;
#include "SamiUser.h"
using Tizen::Base::String;
using namespace Tizen::Net::Http;

View File

@@ -1870,8 +1870,8 @@ except ApiException as e:
"type" : "array",
"items" : {
"type" : "string",
"default" : "available",
"enum" : [ "available", "pending", "sold" ]
"enum" : [ "available", "pending", "sold" ],
"default" : "available"
},
"collectionFormat" : "csv"
};
@@ -4554,8 +4554,8 @@ except ApiException as e:
"description" : "ID of pet that needs to be fetched",
"required" : true,
"type" : "integer",
"maximum" : 5.0,
"minimum" : 1.0,
"maximum" : 5,
"minimum" : 1,
"format" : "int64"
};
var schema = schemaWrapper;
@@ -7293,7 +7293,7 @@ except ApiException as e:
</div>
<div id="generator">
<div class="content">
Generated 2017-02-18T23:37:57.057+01:00
Generated 2017-03-02T21:09:32.930+01:00
</div>
</div>
</div>

View File

@@ -13,7 +13,7 @@ To see how to make this your own, look here:
[README](https://github.com/swagger-api/swagger-codegen/blob/master/README.md)
- API version: 1.0.0
- Build date: 2016-07-20T10:23:02.662-07:00
- Build date: 2017-03-02T21:08:51.368+01:00
### Running the server

View File

@@ -109,11 +109,11 @@ paths:
type: "array"
items:
type: "string"
default: "available"
enum:
- "available"
- "pending"
- "sold"
default: "available"
collectionFormat: "csv"
responses:
200:
@@ -623,10 +623,10 @@ paths:
type: "array"
items:
type: "string"
default: "$"
enum:
- ">"
- "$"
default: "$"
- name: "enum_form_string"
in: "formData"
description: "Form parameter enum test (string)"
@@ -644,10 +644,10 @@ paths:
type: "array"
items:
type: "string"
default: "$"
enum:
- ">"
- "$"
default: "$"
- name: "enum_header_string"
in: "header"
description: "Header parameter enum test (string)"
@@ -665,10 +665,10 @@ paths:
type: "array"
items:
type: "string"
default: "$"
enum:
- ">"
- "$"
default: "$"
- name: "enum_query_string"
in: "query"
description: "Query parameter enum test (string)"
@@ -839,10 +839,6 @@ paths:
x-contentType: "application/json"
x-accepts: "application/json"
securityDefinitions:
api_key:
type: "apiKey"
name: "api_key"
in: "header"
petstore_auth:
type: "oauth2"
authorizationUrl: "http://petstore.swagger.io/api/oauth/dialog"
@@ -852,6 +848,10 @@ securityDefinitions:
read:pets: "read your pets"
http_basic_test:
type: "basic"
api_key:
type: "apiKey"
name: "api_key"
in: "header"
definitions:
Order:
type: "object"

View File

@@ -108,8 +108,8 @@
"type" : "array",
"items" : {
"type" : "string",
"default" : "available",
"enum" : [ "available", "pending", "sold" ]
"enum" : [ "available", "pending", "sold" ],
"default" : "available"
},
"collectionFormat" : "csv"
} ],
@@ -636,11 +636,6 @@
}
},
"securityDefinitions" : {
"api_key" : {
"type" : "apiKey",
"name" : "api_key",
"in" : "header"
},
"petstore_auth" : {
"type" : "oauth2",
"authorizationUrl" : "http://petstore.swagger.io/api/oauth/dialog",
@@ -649,6 +644,11 @@
"write:pets" : "modify pets in your account",
"read:pets" : "read your pets"
}
},
"api_key" : {
"type" : "apiKey",
"name" : "api_key",
"in" : "header"
}
},
"definitions" : {

View File

@@ -108,8 +108,8 @@
"type" : "array",
"items" : {
"type" : "string",
"default" : "available",
"enum" : [ "available", "pending", "sold" ]
"enum" : [ "available", "pending", "sold" ],
"default" : "available"
},
"collectionFormat" : "csv"
} ],
@@ -650,8 +650,8 @@
"type" : "array",
"items" : {
"type" : "string",
"default" : "$",
"enum" : [ ">", "$" ]
"enum" : [ ">", "$" ],
"default" : "$"
}
}, {
"name" : "enum_form_string",
@@ -669,8 +669,8 @@
"type" : "array",
"items" : {
"type" : "string",
"default" : "$",
"enum" : [ ">", "$" ]
"enum" : [ ">", "$" ],
"default" : "$"
}
}, {
"name" : "enum_header_string",
@@ -688,8 +688,8 @@
"type" : "array",
"items" : {
"type" : "string",
"default" : "$",
"enum" : [ ">", "$" ]
"enum" : [ ">", "$" ],
"default" : "$"
}
}, {
"name" : "enum_query_string",
@@ -877,11 +877,6 @@
}
},
"securityDefinitions" : {
"api_key" : {
"type" : "apiKey",
"name" : "api_key",
"in" : "header"
},
"petstore_auth" : {
"type" : "oauth2",
"authorizationUrl" : "http://petstore.swagger.io/api/oauth/dialog",
@@ -893,6 +888,11 @@
},
"http_basic_test" : {
"type" : "basic"
},
"api_key" : {
"type" : "apiKey",
"name" : "api_key",
"in" : "header"
}
},
"definitions" : {

View File

@@ -101,19 +101,19 @@ class FakeApi extends Controller
}
$byte = $input['byte'];
if ($input['integer'] > 100.0) {
throw new \InvalidArgumentException('invalid value for $integer when calling FakeApi.testEndpointParameters, must be smaller than or equal to 100.0.');
if ($input['integer'] > 100) {
throw new \InvalidArgumentException('invalid value for $integer when calling FakeApi.testEndpointParameters, must be smaller than or equal to 100.');
}
if ($input['integer'] < 10.0) {
throw new \InvalidArgumentException('invalid value for $integer when calling FakeApi.testEndpointParameters, must be bigger than or equal to 10.0.');
if ($input['integer'] < 10) {
throw new \InvalidArgumentException('invalid value for $integer when calling FakeApi.testEndpointParameters, must be bigger than or equal to 10.');
}
$integer = $input['integer'];
if ($input['int32'] > 200.0) {
throw new \InvalidArgumentException('invalid value for $int32 when calling FakeApi.testEndpointParameters, must be smaller than or equal to 200.0.');
if ($input['int32'] > 200) {
throw new \InvalidArgumentException('invalid value for $int32 when calling FakeApi.testEndpointParameters, must be smaller than or equal to 200.');
}
if ($input['int32'] < 20.0) {
throw new \InvalidArgumentException('invalid value for $int32 when calling FakeApi.testEndpointParameters, must be bigger than or equal to 20.0.');
if ($input['int32'] < 20) {
throw new \InvalidArgumentException('invalid value for $int32 when calling FakeApi.testEndpointParameters, must be bigger than or equal to 20.');
}
$int32 = $input['int32'];

View File

@@ -83,9 +83,6 @@ class StoreApi extends Controller
$input = Request::all();
//path params validation
if ($order_id] < 1.0) {
throw new \InvalidArgumentException('invalid value for $order_id when calling StoreApi.deleteOrder, must be bigger than or equal to 1.0.');
}
//not path params validation
@@ -106,11 +103,11 @@ class StoreApi extends Controller
$input = Request::all();
//path params validation
if ($order_id] > 5.0) {
throw new \InvalidArgumentException('invalid value for $order_id when calling StoreApi.getOrderById, must be smaller than or equal to 5.0.');
if ($order_id] > 5) {
throw new \InvalidArgumentException('invalid value for $order_id when calling StoreApi.getOrderById, must be smaller than or equal to 5.');
}
if ($order_id] < 1.0) {
throw new \InvalidArgumentException('invalid value for $order_id when calling StoreApi.getOrderById, must be bigger than or equal to 1.0.');
if ($order_id] < 1) {
throw new \InvalidArgumentException('invalid value for $order_id when calling StoreApi.getOrderById, must be bigger than or equal to 1.');
}

View File

@@ -24,7 +24,7 @@ $app->get('/', function () use ($app) {
/**
* PATCH testClientModel
* Summary: To test \&quot;client\&quot; model
* Notes:
* Notes: To test \&quot;client\&quot; model
* Output-Formats: [application/json]
*/
$app->PATCH('/v2/fake', 'FakeApi@testClientModel');
@@ -38,7 +38,7 @@ $app->POST('/v2/fake', 'FakeApi@testEndpointParameters');
/**
* GET testEnumParameters
* Summary: To test enum parameters
* Notes:
* Notes: To test enum parameters
* Output-Formats: [*/*]
*/
$app->GET('/v2/fake', 'FakeApi@testEnumParameters');

View File

@@ -2,7 +2,7 @@ Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio 2012
VisualStudioVersion = 12.0.0.0
MinimumVisualStudioVersion = 10.0.0.1
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "IO.Swagger", "src\IO.Swagger\IO.Swagger.csproj", "{9A5C2190-C960-4808-93CB-8721C1022F9B}"
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "IO.Swagger", "src\IO.Swagger\IO.Swagger.csproj", "{768B8DC6-54EE-4D40-9B20-7857E1D742A4}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
@@ -10,10 +10,10 @@ Debug|Any CPU = Debug|Any CPU
Release|Any CPU = Release|Any CPU
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{9A5C2190-C960-4808-93CB-8721C1022F9B}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{9A5C2190-C960-4808-93CB-8721C1022F9B}.Debug|Any CPU.Build.0 = Debug|Any CPU
{9A5C2190-C960-4808-93CB-8721C1022F9B}.Release|Any CPU.ActiveCfg = Release|Any CPU
{9A5C2190-C960-4808-93CB-8721C1022F9B}.Release|Any CPU.Build.0 = Release|Any CPU
{768B8DC6-54EE-4D40-9B20-7857E1D742A4}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{768B8DC6-54EE-4D40-9B20-7857E1D742A4}.Debug|Any CPU.Build.0 = Debug|Any CPU
{768B8DC6-54EE-4D40-9B20-7857E1D742A4}.Release|Any CPU.ActiveCfg = Release|Any CPU
{768B8DC6-54EE-4D40-9B20-7857E1D742A4}.Release|Any CPU.Build.0 = Release|Any CPU
{19F1DEBC-DE5E-4517-8062-F000CD499087}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{19F1DEBC-DE5E-4517-8062-F000CD499087}.Debug|Any CPU.Build.0 = Debug|Any CPU
{19F1DEBC-DE5E-4517-8062-F000CD499087}.Release|Any CPU.ActiveCfg = Release|Any CPU

View File

@@ -3,7 +3,7 @@
<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
<ProjectGuid>{9A5C2190-C960-4808-93CB-8721C1022F9B}</ProjectGuid>
<ProjectGuid>{768B8DC6-54EE-4D40-9B20-7857E1D742A4}</ProjectGuid>
<OutputType>Library</OutputType>
<AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>IO.Swagger.v2</RootNamespace>

View File

@@ -106,11 +106,11 @@ paths:
type: "array"
items:
type: "string"
default: "available"
enum:
- "available"
- "pending"
- "sold"
default: "available"
collectionFormat: "csv"
responses:
200:
@@ -346,8 +346,8 @@ paths:
description: "ID of pet that needs to be fetched"
required: true
type: "integer"
maximum: 5.0
minimum: 1.0
maximum: 5
minimum: 1
format: "int64"
responses:
200:
@@ -374,7 +374,6 @@ paths:
description: "ID of the order that needs to be deleted"
required: true
type: "string"
minimum: 1.0
responses:
400:
description: "Invalid ID supplied"
@@ -567,10 +566,6 @@ paths:
404:
description: "User not found"
securityDefinitions:
api_key:
type: "apiKey"
name: "api_key"
in: "header"
petstore_auth:
type: "oauth2"
authorizationUrl: "http://petstore.swagger.io/api/oauth/dialog"
@@ -578,6 +573,10 @@ securityDefinitions:
scopes:
write:pets: "modify pets in your account"
read:pets: "read your pets"
api_key:
type: "apiKey"
name: "api_key"
in: "header"
definitions:
Order:
type: "object"