forked from loafle/openapi-generator-original
Merge remote-tracking branch 'origin/master' into 2.3.0
This commit is contained in:
commit
2dcddb79bc
@ -151,7 +151,7 @@ java -jar modules/swagger-codegen-cli/target/swagger-codegen-cli.jar generate \
|
|||||||
```
|
```
|
||||||
(if you're on Windows, replace the last command with `java -jar modules\swagger-codegen-cli\target\swagger-codegen-cli.jar generate -i http://petstore.swagger.io/v2/swagger.json -l php -o c:\temp\php_api_client`)
|
(if you're on Windows, replace the last command with `java -jar modules\swagger-codegen-cli\target\swagger-codegen-cli.jar generate -i http://petstore.swagger.io/v2/swagger.json -l php -o c:\temp\php_api_client`)
|
||||||
|
|
||||||
You can also download the JAR (latest relesae) directly from [maven.org](http://central.maven.org/maven2/io/swagger/swagger-codegen-cli/2.2.1/swagger-codegen-cli-2.2.1.jar )
|
You can also download the JAR (latest release) directly from [maven.org](http://central.maven.org/maven2/io/swagger/swagger-codegen-cli/2.2.1/swagger-codegen-cli-2.2.1.jar )
|
||||||
|
|
||||||
To get a list of **general** options available, please run `java -jar modules/swagger-codegen-cli/target/swagger-codegen-cli.jar help generate`
|
To get a list of **general** options available, please run `java -jar modules/swagger-codegen-cli/target/swagger-codegen-cli.jar help generate`
|
||||||
|
|
||||||
@ -783,6 +783,7 @@ Here are some companies/projects using Swagger Codegen in production. To add you
|
|||||||
- [nViso](http://www.nviso.ch/)
|
- [nViso](http://www.nviso.ch/)
|
||||||
- [Okiok](https://www.okiok.com)
|
- [Okiok](https://www.okiok.com)
|
||||||
- [Onedata](http://onedata.org)
|
- [Onedata](http://onedata.org)
|
||||||
|
- [OrderCloud.io](http://ordercloud.io)
|
||||||
- [OSDN](https://osdn.jp)
|
- [OSDN](https://osdn.jp)
|
||||||
- [PagerDuty](https://www.pagerduty.com)
|
- [PagerDuty](https://www.pagerduty.com)
|
||||||
- [Pepipost](https://www.pepipost.com)
|
- [Pepipost](https://www.pepipost.com)
|
||||||
|
@ -92,4 +92,16 @@ public class ConfluenceWikiGenerator extends DefaultCodegen implements CodegenCo
|
|||||||
}
|
}
|
||||||
return objs;
|
return objs;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String escapeQuotationMark(String input) {
|
||||||
|
// just return the original string
|
||||||
|
return input;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String escapeUnsafeCharacters(String input) {
|
||||||
|
// just return the original string
|
||||||
|
return input;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
@ -16,6 +16,8 @@ import org.apache.http.params.*;
|
|||||||
import org.apache.http.util.EntityUtils;
|
import org.apache.http.util.EntityUtils;
|
||||||
|
|
||||||
import java.io.File;
|
import java.io.File;
|
||||||
|
import java.io.IOException;
|
||||||
|
import java.io.UnsupportedEncodingException;
|
||||||
import java.net.Socket;
|
import java.net.Socket;
|
||||||
import java.net.UnknownHostException;
|
import java.net.UnknownHostException;
|
||||||
import java.net.URLEncoder;
|
import java.net.URLEncoder;
|
||||||
@ -25,8 +27,6 @@ import java.util.Map;
|
|||||||
import java.util.HashMap;
|
import java.util.HashMap;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.io.IOException;
|
|
||||||
import java.io.UnsupportedEncodingException;
|
|
||||||
|
|
||||||
import java.security.GeneralSecurityException;
|
import java.security.GeneralSecurityException;
|
||||||
import java.security.KeyManagementException;
|
import java.security.KeyManagementException;
|
||||||
@ -207,8 +207,12 @@ public class ApiInvoker {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public String escapeString(String str) {
|
public String escapeString(String str) {
|
||||||
|
try {
|
||||||
|
return URLEncoder.encode(str, "UTF-8");
|
||||||
|
} catch (UnsupportedEncodingException e) {
|
||||||
return str;
|
return str;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
public static Object deserialize(String json, String containerType, Class cls) throws ApiException {
|
public static Object deserialize(String json, String containerType, Class cls) throws ApiException {
|
||||||
try{
|
try{
|
||||||
|
@ -20,6 +20,7 @@ import org.apache.http.HttpEntity;
|
|||||||
import org.apache.http.entity.ContentType;
|
import org.apache.http.entity.ContentType;
|
||||||
import org.apache.http.entity.StringEntity;
|
import org.apache.http.entity.StringEntity;
|
||||||
|
|
||||||
|
import java.io.UnsupportedEncodingException;
|
||||||
import java.net.URLEncoder;
|
import java.net.URLEncoder;
|
||||||
import java.text.SimpleDateFormat;
|
import java.text.SimpleDateFormat;
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
@ -232,8 +233,12 @@ public class ApiInvoker {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public String escapeString(String str) {
|
public String escapeString(String str) {
|
||||||
|
try {
|
||||||
|
return URLEncoder.encode(str, "UTF-8");
|
||||||
|
} catch (UnsupportedEncodingException e) {
|
||||||
return str;
|
return str;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
public static Object deserialize(String json, String containerType, Class cls) throws ApiException {
|
public static Object deserialize(String json, String containerType, Class cls) throws ApiException {
|
||||||
try{
|
try{
|
||||||
|
@ -32,12 +32,12 @@ h2. Endpoints
|
|||||||
{{/bodyParams}}
|
{{/bodyParams}}
|
||||||
{{/hasBodyParam}}
|
{{/hasBodyParam}}
|
||||||
|
|
||||||
{{#hasHeaderParam}}
|
{{#hasHeaderParams}}
|
||||||
h5. Header Parameters
|
h5. Header Parameters
|
||||||
||Name||Description||Required||Default||Pattern||
|
||Name||Description||Required||Default||Pattern||
|
||||||
{{#headerParam}}{{>param}}
|
{{#headerParam}}{{>param}}
|
||||||
{{/headerParam}}
|
{{/headerParam}}
|
||||||
{{/hasHeaderParam}}
|
{{/hasHeaderParams}}
|
||||||
|
|
||||||
{{#hasQueryParams}}
|
{{#hasQueryParams}}
|
||||||
h5. Query Parameters
|
h5. Query Parameters
|
||||||
|
@ -80,12 +80,12 @@
|
|||||||
</div> <!-- field-items -->
|
</div> <!-- field-items -->
|
||||||
{{/hasBodyParam}}
|
{{/hasBodyParam}}
|
||||||
|
|
||||||
{{#hasHeaderParam}}
|
{{#hasHeaderParams}}
|
||||||
<h3 class="field-label">Request headers</h3>
|
<h3 class="field-label">Request headers</h3>
|
||||||
<div class="field-items">
|
<div class="field-items">
|
||||||
{{#headerParam}}{{>headerParam}}{{/headerParam}}
|
{{#headerParam}}{{>headerParam}}{{/headerParam}}
|
||||||
</div> <!-- field-items -->
|
</div> <!-- field-items -->
|
||||||
{{/hasHeaderParam}}
|
{{/hasHeaderParams}}
|
||||||
|
|
||||||
{{#hasQueryParams}}
|
{{#hasQueryParams}}
|
||||||
<h3 class="field-label">Query parameters</h3>
|
<h3 class="field-label">Query parameters</h3>
|
||||||
|
@ -266,7 +266,7 @@ function loadGoogleFontCss() {
|
|||||||
<div class="tab-content">
|
<div class="tab-content">
|
||||||
<div class="tab-pane active" id="examples-{{baseName}}-{{nickname}}-0-curl">
|
<div class="tab-pane active" id="examples-{{baseName}}-{{nickname}}-0-curl">
|
||||||
<pre class="prettyprint"><code class="language-bsh">
|
<pre class="prettyprint"><code class="language-bsh">
|
||||||
curl -X <span style="text-transform: uppercase;">{{httpMethod}}</span>{{#isApiKey}} -H "apiKey: [[apiKey]]" -H "apiSecret: [[apiSecret]]"{{/isApiKey}} "{{basePath}}{{path}}{{#hasQueryParams}}?{{#queryParams}}{{^-first}}&{{/-first}}{{paramName}}={{vendorExtensions.x-eg}}{{/queryParams}}{{/hasQueryParams}}"
|
curl -X <span style="text-transform: uppercase;">{{httpMethod}}</span>{{#authMethods}}{{#isApiKey}}{{#isKeyInHeader}} -H "{{keyParamName}}: [[apiKey]]" {{/isKeyInHeader}}{{/isApiKey}}{{#isBasic}} -H "Authorization: Basic [[basicHash]]" {{/isBasic}}{{/authMethods}} "{{basePath}}{{path}}{{#hasQueryParams}}?{{#queryParams}}{{^-first}}&{{/-first}}{{paramName}}={{vendorExtensions.x-eg}}{{/queryParams}}{{/hasQueryParams}}"
|
||||||
|
|
||||||
|
|
||||||
</code></pre>
|
</code></pre>
|
||||||
|
@ -70,7 +70,7 @@ from pprint import pprint
|
|||||||
{{{packageName}}}.configuration.access_token = 'YOUR_ACCESS_TOKEN'{{/isOAuth}}{{/authMethods}}
|
{{{packageName}}}.configuration.access_token = 'YOUR_ACCESS_TOKEN'{{/isOAuth}}{{/authMethods}}
|
||||||
{{/hasAuthMethods}}
|
{{/hasAuthMethods}}
|
||||||
# create an instance of the API class
|
# create an instance of the API class
|
||||||
api_instance = {{{packageName}}}.{{{classname}}}
|
api_instance = {{{packageName}}}.{{{classname}}}()
|
||||||
{{#allParams}}{{paramName}} = {{{example}}} # {{{dataType}}} | {{{description}}}{{^required}} (optional){{/required}}{{#defaultValue}} (default to {{{.}}}){{/defaultValue}}
|
{{#allParams}}{{paramName}} = {{{example}}} # {{{dataType}}} | {{{description}}}{{^required}} (optional){{/required}}{{#defaultValue}} (default to {{{.}}}){{/defaultValue}}
|
||||||
{{/allParams}}
|
{{/allParams}}
|
||||||
|
|
||||||
|
@ -176,7 +176,7 @@ class ApiClient(object):
|
|||||||
:param obj: The data to serialize.
|
:param obj: The data to serialize.
|
||||||
:return: The serialized form of data.
|
:return: The serialized form of data.
|
||||||
"""
|
"""
|
||||||
types = (str, float, bool, tuple) + tuple(integer_types) + (text_type,)
|
types = (str, float, bool, bytes) + tuple(integer_types) + (text_type,)
|
||||||
if isinstance(obj, type(None)):
|
if isinstance(obj, type(None)):
|
||||||
return None
|
return None
|
||||||
elif isinstance(obj, types):
|
elif isinstance(obj, types):
|
||||||
@ -184,6 +184,9 @@ class ApiClient(object):
|
|||||||
elif isinstance(obj, list):
|
elif isinstance(obj, list):
|
||||||
return [self.sanitize_for_serialization(sub_obj)
|
return [self.sanitize_for_serialization(sub_obj)
|
||||||
for sub_obj in obj]
|
for sub_obj in obj]
|
||||||
|
elif isinstance(obj, tuple):
|
||||||
|
return tuple(self.sanitize_for_serialization(sub_obj)
|
||||||
|
for sub_obj in obj)
|
||||||
elif isinstance(obj, (datetime, date)):
|
elif isinstance(obj, (datetime, date)):
|
||||||
return obj.isoformat()
|
return obj.isoformat()
|
||||||
else:
|
else:
|
||||||
|
@ -78,13 +78,13 @@
|
|||||||
def list_invalid_properties
|
def list_invalid_properties
|
||||||
invalid_properties = Array.new
|
invalid_properties = Array.new
|
||||||
{{#vars}}
|
{{#vars}}
|
||||||
{{#hasValidation}}
|
|
||||||
{{#required}}
|
{{#required}}
|
||||||
if @{{{name}}}.nil?
|
if @{{{name}}}.nil?
|
||||||
invalid_properties.push("invalid value for '{{{name}}}', {{{name}}} cannot be nil.")
|
invalid_properties.push("invalid value for '{{{name}}}', {{{name}}} cannot be nil.")
|
||||||
end
|
end
|
||||||
{{/required}}
|
|
||||||
|
|
||||||
|
{{/required}}
|
||||||
|
{{#hasValidation}}
|
||||||
{{#maxLength}}
|
{{#maxLength}}
|
||||||
if {{^required}}!@{{{name}}}.nil? && {{/required}}@{{{name}}}.to_s.length > {{{maxLength}}}
|
if {{^required}}!@{{{name}}}.nil? && {{/required}}@{{{name}}}.to_s.length > {{{maxLength}}}
|
||||||
invalid_properties.push("invalid value for '{{{name}}}', the character length must be smaller than or equal to {{{maxLength}}}.")
|
invalid_properties.push("invalid value for '{{{name}}}', the character length must be smaller than or equal to {{{maxLength}}}.")
|
||||||
|
@ -39,6 +39,8 @@ import org.apache.http.params.*;
|
|||||||
import org.apache.http.util.EntityUtils;
|
import org.apache.http.util.EntityUtils;
|
||||||
|
|
||||||
import java.io.File;
|
import java.io.File;
|
||||||
|
import java.io.IOException;
|
||||||
|
import java.io.UnsupportedEncodingException;
|
||||||
import java.net.Socket;
|
import java.net.Socket;
|
||||||
import java.net.UnknownHostException;
|
import java.net.UnknownHostException;
|
||||||
import java.net.URLEncoder;
|
import java.net.URLEncoder;
|
||||||
@ -48,8 +50,6 @@ import java.util.Map;
|
|||||||
import java.util.HashMap;
|
import java.util.HashMap;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.io.IOException;
|
|
||||||
import java.io.UnsupportedEncodingException;
|
|
||||||
|
|
||||||
import java.security.GeneralSecurityException;
|
import java.security.GeneralSecurityException;
|
||||||
import java.security.KeyManagementException;
|
import java.security.KeyManagementException;
|
||||||
@ -230,8 +230,12 @@ public class ApiInvoker {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public String escapeString(String str) {
|
public String escapeString(String str) {
|
||||||
|
try {
|
||||||
|
return URLEncoder.encode(str, "UTF-8");
|
||||||
|
} catch (UnsupportedEncodingException e) {
|
||||||
return str;
|
return str;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
public static Object deserialize(String json, String containerType, Class cls) throws ApiException {
|
public static Object deserialize(String json, String containerType, Class cls) throws ApiException {
|
||||||
try{
|
try{
|
||||||
|
@ -43,6 +43,7 @@ import org.apache.http.HttpEntity;
|
|||||||
import org.apache.http.entity.ContentType;
|
import org.apache.http.entity.ContentType;
|
||||||
import org.apache.http.entity.StringEntity;
|
import org.apache.http.entity.StringEntity;
|
||||||
|
|
||||||
|
import java.io.UnsupportedEncodingException;
|
||||||
import java.net.URLEncoder;
|
import java.net.URLEncoder;
|
||||||
import java.text.SimpleDateFormat;
|
import java.text.SimpleDateFormat;
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
@ -246,8 +247,12 @@ public class ApiInvoker {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public String escapeString(String str) {
|
public String escapeString(String str) {
|
||||||
|
try {
|
||||||
|
return URLEncoder.encode(str, "UTF-8");
|
||||||
|
} catch (UnsupportedEncodingException e) {
|
||||||
return str;
|
return str;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
public static Object deserialize(String json, String containerType, Class cls) throws ApiException {
|
public static Object deserialize(String json, String containerType, Class cls) throws ApiException {
|
||||||
try{
|
try{
|
||||||
|
@ -51,7 +51,7 @@ import petstore_api
|
|||||||
from petstore_api.rest import ApiException
|
from petstore_api.rest import ApiException
|
||||||
from pprint import pprint
|
from pprint import pprint
|
||||||
# create an instance of the API class
|
# create an instance of the API class
|
||||||
api_instance = petstore_api.FakeApi
|
api_instance = petstore_api.FakeApi()
|
||||||
body = petstore_api.Client() # Client | client model
|
body = petstore_api.Client() # Client | client model
|
||||||
|
|
||||||
try:
|
try:
|
||||||
|
@ -176,7 +176,7 @@ class ApiClient(object):
|
|||||||
:param obj: The data to serialize.
|
:param obj: The data to serialize.
|
||||||
:return: The serialized form of data.
|
:return: The serialized form of data.
|
||||||
"""
|
"""
|
||||||
types = (str, float, bool, tuple) + tuple(integer_types) + (text_type,)
|
types = (str, float, bool, bytes) + tuple(integer_types) + (text_type,)
|
||||||
if isinstance(obj, type(None)):
|
if isinstance(obj, type(None)):
|
||||||
return None
|
return None
|
||||||
elif isinstance(obj, types):
|
elif isinstance(obj, types):
|
||||||
@ -184,6 +184,9 @@ class ApiClient(object):
|
|||||||
elif isinstance(obj, list):
|
elif isinstance(obj, list):
|
||||||
return [self.sanitize_for_serialization(sub_obj)
|
return [self.sanitize_for_serialization(sub_obj)
|
||||||
for sub_obj in obj]
|
for sub_obj in obj]
|
||||||
|
elif isinstance(obj, tuple):
|
||||||
|
return tuple(self.sanitize_for_serialization(sub_obj)
|
||||||
|
for sub_obj in obj)
|
||||||
elif isinstance(obj, (datetime, date)):
|
elif isinstance(obj, (datetime, date)):
|
||||||
return obj.isoformat()
|
return obj.isoformat()
|
||||||
else:
|
else:
|
||||||
|
@ -71,6 +71,10 @@ module Petstore
|
|||||||
# @return Array for valid properies with the reasons
|
# @return Array for valid properies with the reasons
|
||||||
def list_invalid_properties
|
def list_invalid_properties
|
||||||
invalid_properties = Array.new
|
invalid_properties = Array.new
|
||||||
|
if @class_name.nil?
|
||||||
|
invalid_properties.push("invalid value for 'class_name', class_name cannot be nil.")
|
||||||
|
end
|
||||||
|
|
||||||
return invalid_properties
|
return invalid_properties
|
||||||
end
|
end
|
||||||
|
|
||||||
|
@ -79,6 +79,10 @@ module Petstore
|
|||||||
# @return Array for valid properies with the reasons
|
# @return Array for valid properies with the reasons
|
||||||
def list_invalid_properties
|
def list_invalid_properties
|
||||||
invalid_properties = Array.new
|
invalid_properties = Array.new
|
||||||
|
if @class_name.nil?
|
||||||
|
invalid_properties.push("invalid value for 'class_name', class_name cannot be nil.")
|
||||||
|
end
|
||||||
|
|
||||||
return invalid_properties
|
return invalid_properties
|
||||||
end
|
end
|
||||||
|
|
||||||
|
@ -79,6 +79,10 @@ module Petstore
|
|||||||
# @return Array for valid properies with the reasons
|
# @return Array for valid properies with the reasons
|
||||||
def list_invalid_properties
|
def list_invalid_properties
|
||||||
invalid_properties = Array.new
|
invalid_properties = Array.new
|
||||||
|
if @class_name.nil?
|
||||||
|
invalid_properties.push("invalid value for 'class_name', class_name cannot be nil.")
|
||||||
|
end
|
||||||
|
|
||||||
return invalid_properties
|
return invalid_properties
|
||||||
end
|
end
|
||||||
|
|
||||||
|
@ -157,7 +157,6 @@ module Petstore
|
|||||||
# @return Array for valid properies with the reasons
|
# @return Array for valid properies with the reasons
|
||||||
def list_invalid_properties
|
def list_invalid_properties
|
||||||
invalid_properties = Array.new
|
invalid_properties = Array.new
|
||||||
|
|
||||||
if !@integer.nil? && @integer > 100.0
|
if !@integer.nil? && @integer > 100.0
|
||||||
invalid_properties.push("invalid value for 'integer', must be smaller than or equal to 100.0.")
|
invalid_properties.push("invalid value for 'integer', must be smaller than or equal to 100.0.")
|
||||||
end
|
end
|
||||||
@ -166,7 +165,6 @@ module Petstore
|
|||||||
invalid_properties.push("invalid value for 'integer', must be greater than or equal to 10.0.")
|
invalid_properties.push("invalid value for 'integer', must be greater than or equal to 10.0.")
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
||||||
if !@int32.nil? && @int32 > 200.0
|
if !@int32.nil? && @int32 > 200.0
|
||||||
invalid_properties.push("invalid value for 'int32', must be smaller than or equal to 200.0.")
|
invalid_properties.push("invalid value for 'int32', must be smaller than or equal to 200.0.")
|
||||||
end
|
end
|
||||||
@ -187,7 +185,6 @@ module Petstore
|
|||||||
invalid_properties.push("invalid value for 'number', must be greater than or equal to 32.1.")
|
invalid_properties.push("invalid value for 'number', must be greater than or equal to 32.1.")
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
||||||
if !@float.nil? && @float > 987.6
|
if !@float.nil? && @float > 987.6
|
||||||
invalid_properties.push("invalid value for 'float', must be smaller than or equal to 987.6.")
|
invalid_properties.push("invalid value for 'float', must be smaller than or equal to 987.6.")
|
||||||
end
|
end
|
||||||
@ -196,7 +193,6 @@ module Petstore
|
|||||||
invalid_properties.push("invalid value for 'float', must be greater than or equal to 54.3.")
|
invalid_properties.push("invalid value for 'float', must be greater than or equal to 54.3.")
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
||||||
if !@double.nil? && @double > 123.4
|
if !@double.nil? && @double > 123.4
|
||||||
invalid_properties.push("invalid value for 'double', must be smaller than or equal to 123.4.")
|
invalid_properties.push("invalid value for 'double', must be smaller than or equal to 123.4.")
|
||||||
end
|
end
|
||||||
@ -205,11 +201,18 @@ module Petstore
|
|||||||
invalid_properties.push("invalid value for 'double', must be greater than or equal to 67.8.")
|
invalid_properties.push("invalid value for 'double', must be greater than or equal to 67.8.")
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
||||||
if !@string.nil? && @string !~ Regexp.new(/[a-z]/i)
|
if !@string.nil? && @string !~ Regexp.new(/[a-z]/i)
|
||||||
invalid_properties.push("invalid value for 'string', must conform to the pattern /[a-z]/i.")
|
invalid_properties.push("invalid value for 'string', must conform to the pattern /[a-z]/i.")
|
||||||
end
|
end
|
||||||
|
|
||||||
|
if @byte.nil?
|
||||||
|
invalid_properties.push("invalid value for 'byte', byte cannot be nil.")
|
||||||
|
end
|
||||||
|
|
||||||
|
if @date.nil?
|
||||||
|
invalid_properties.push("invalid value for 'date', date cannot be nil.")
|
||||||
|
end
|
||||||
|
|
||||||
if @password.nil?
|
if @password.nil?
|
||||||
invalid_properties.push("invalid value for 'password', password cannot be nil.")
|
invalid_properties.push("invalid value for 'password', password cannot be nil.")
|
||||||
end
|
end
|
||||||
|
@ -85,6 +85,10 @@ module Petstore
|
|||||||
# @return Array for valid properies with the reasons
|
# @return Array for valid properies with the reasons
|
||||||
def list_invalid_properties
|
def list_invalid_properties
|
||||||
invalid_properties = Array.new
|
invalid_properties = Array.new
|
||||||
|
if @name.nil?
|
||||||
|
invalid_properties.push("invalid value for 'name', name cannot be nil.")
|
||||||
|
end
|
||||||
|
|
||||||
return invalid_properties
|
return invalid_properties
|
||||||
end
|
end
|
||||||
|
|
||||||
|
@ -127,6 +127,14 @@ module Petstore
|
|||||||
# @return Array for valid properies with the reasons
|
# @return Array for valid properies with the reasons
|
||||||
def list_invalid_properties
|
def list_invalid_properties
|
||||||
invalid_properties = Array.new
|
invalid_properties = Array.new
|
||||||
|
if @name.nil?
|
||||||
|
invalid_properties.push("invalid value for 'name', name cannot be nil.")
|
||||||
|
end
|
||||||
|
|
||||||
|
if @photo_urls.nil?
|
||||||
|
invalid_properties.push("invalid value for 'photo_urls', photo_urls cannot be nil.")
|
||||||
|
end
|
||||||
|
|
||||||
return invalid_properties
|
return invalid_properties
|
||||||
end
|
end
|
||||||
|
|
||||||
|
@ -60,6 +60,8 @@ h2. Endpoints
|
|||||||
|petId |Pet id to delete |(/) | | |
|
|petId |Pet id to delete |(/) | | |
|
||||||
|
|
||||||
|
|
||||||
|
h5. Header Parameters
|
||||||
|
||Name||Description||Required||Default||Pattern||
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
@ -288,6 +288,10 @@ font-style: italic;
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<h3 class="field-label">Request headers</h3>
|
||||||
|
<div class="field-items">
|
||||||
|
|
||||||
|
</div> <!-- field-items -->
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
@ -2834,7 +2834,7 @@ try {
|
|||||||
<div class="tab-content">
|
<div class="tab-content">
|
||||||
<div class="tab-pane active" id="examples-Pet-getPetById-0-curl">
|
<div class="tab-pane active" id="examples-Pet-getPetById-0-curl">
|
||||||
<pre class="prettyprint"><code class="language-bsh">
|
<pre class="prettyprint"><code class="language-bsh">
|
||||||
curl -X <span style="text-transform: uppercase;">get</span> "http://petstore.swagger.io/v2/pet/{petId}"
|
curl -X <span style="text-transform: uppercase;">get</span> -H "api_key: [[apiKey]]" "http://petstore.swagger.io/v2/pet/{petId}"
|
||||||
|
|
||||||
|
|
||||||
</code></pre>
|
</code></pre>
|
||||||
@ -5195,7 +5195,7 @@ try {
|
|||||||
<div class="tab-content">
|
<div class="tab-content">
|
||||||
<div class="tab-pane active" id="examples-Store-getInventory-0-curl">
|
<div class="tab-pane active" id="examples-Store-getInventory-0-curl">
|
||||||
<pre class="prettyprint"><code class="language-bsh">
|
<pre class="prettyprint"><code class="language-bsh">
|
||||||
curl -X <span style="text-transform: uppercase;">get</span> "http://petstore.swagger.io/v2/store/inventory"
|
curl -X <span style="text-transform: uppercase;">get</span> -H "api_key: [[apiKey]]" "http://petstore.swagger.io/v2/store/inventory"
|
||||||
|
|
||||||
|
|
||||||
</code></pre>
|
</code></pre>
|
||||||
@ -9921,7 +9921,7 @@ try {
|
|||||||
</div>
|
</div>
|
||||||
<div id="generator">
|
<div id="generator">
|
||||||
<div class="content">
|
<div class="content">
|
||||||
Generated 2016-09-29T11:08:44.942+08:00
|
Generated 2016-10-13T09:03:51.792-07:00
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user