diff --git a/bin/html2-petstore.sh b/bin/html2-petstore.sh
index aa1ebab58aa..3cafc168907 100755
--- a/bin/html2-petstore.sh
+++ b/bin/html2-petstore.sh
@@ -28,4 +28,4 @@ fi
export JAVA_OPTS="${JAVA_OPTS} -XX:MaxPermSize=256M -Xmx1024M -DloggerPath=conf/log4j.properties"
ags="$@ generate -i modules/swagger-codegen/src/test/resources/2_0/petstore.yaml -l html2 -o samples/html2 --additional-properties hideGenerationTimestamp=true"
-# java $JAVA_OPTS -jar $executable $ags
+java $JAVA_OPTS -jar $executable $ags
diff --git a/bin/windows/html2-petstore.bat b/bin/windows/html2-petstore.bat
index d5a48711248..42dca617c8a 100644
--- a/bin/windows/html2-petstore.bat
+++ b/bin/windows/html2-petstore.bat
@@ -7,4 +7,4 @@ If Not Exist %executable% (
REM set JAVA_OPTS=%JAVA_OPTS% -Xmx1024M -DloggerPath=conf/log4j.properties
set ags=generate -i modules\swagger-codegen\src\test\resources\2_0\petstore.yaml -l html2 -o samples\html2
-REM java %JAVA_OPTS% -jar %executable% %ags%
+java %JAVA_OPTS% -jar %executable% %ags%
diff --git a/samples/html2/.swagger-codegen/VERSION b/samples/html2/.swagger-codegen/VERSION
index f9f7450d135..096bf47efe3 100644
--- a/samples/html2/.swagger-codegen/VERSION
+++ b/samples/html2/.swagger-codegen/VERSION
@@ -1 +1 @@
-2.3.0-SNAPSHOT
\ No newline at end of file
+3.0.0-SNAPSHOT
\ No newline at end of file
diff --git a/samples/html2/index.html b/samples/html2/index.html
index 1cfa1180b4a..f7433821404 100644
--- a/samples/html2/index.html
+++ b/samples/html2/index.html
@@ -63,6 +63,7 @@
*/
(function(){var block={newline:/^\n+/,code:/^( {4}[^\n]+\n*)+/,fences:noop,hr:/^( *[-*_]){3,} *(?:\n+|$)/,heading:/^ *(#{1,6}) *([^\n]+?) *#* *(?:\n+|$)/,nptable:noop,lheading:/^([^\n]+)\n *(=|-){2,} *(?:\n+|$)/,blockquote:/^( *>[^\n]+(\n(?!def)[^\n]+)*\n*)+/,list:/^( *)(bull) [\s\S]+?(?:hr|def|\n{2,}(?! )(?!\1bull )\n*|\s*$)/,html:/^ *(?:comment *(?:\n|\s*$)|closed *(?:\n{2,}|\s*$)|closing *(?:\n{2,}|\s*$))/,def:/^ *\[([^\]]+)\]: *([^\s>]+)>?(?: +["(]([^\n]+)[")])? *(?:\n+|$)/,table:noop,paragraph:/^((?:[^\n]+\n?(?!hr|heading|lheading|blockquote|tag|def))+)\n*/,text:/^[^\n]+/};block.bullet=/(?:[*+-]|\d+\.)/;block.item=/^( *)(bull) [^\n]*(?:\n(?!\1bull )[^\n]*)*/;block.item=replace(block.item,"gm")(/bull/g,block.bullet)();block.list=replace(block.list)(/bull/g,block.bullet)("hr","\\n+(?=\\1?(?:[-*_] *){3,}(?:\\n+|$))")("def","\\n+(?="+block.def.source+")")();block.blockquote=replace(block.blockquote)("def",block.def)();block._tag="(?!(?:"+"a|em|strong|small|s|cite|q|dfn|abbr|data|time|code"+"|var|samp|kbd|sub|sup|i|b|u|mark|ruby|rt|rp|bdi|bdo"+"|span|br|wbr|ins|del|img)\\b)\\w+(?!:/|[^\\w\\s@]*@)\\b";block.html=replace(block.html)("comment",//)("closed",/<(tag)[\s\S]+?<\/\1>/)("closing",/])*?>/)(/tag/g,block._tag)();block.paragraph=replace(block.paragraph)("hr",block.hr)("heading",block.heading)("lheading",block.lheading)("blockquote",block.blockquote)("tag","<"+block._tag)("def",block.def)();block.normal=merge({},block);block.gfm=merge({},block.normal,{fences:/^ *(`{3,}|~{3,})[ \.]*(\S+)? *\n([\s\S]*?)\s*\1 *(?:\n+|$)/,paragraph:/^/,heading:/^ *(#{1,6}) +([^\n]+?) *#* *(?:\n+|$)/});block.gfm.paragraph=replace(block.paragraph)("(?!","(?!"+block.gfm.fences.source.replace("\\1","\\2")+"|"+block.list.source.replace("\\1","\\3")+"|")();block.tables=merge({},block.gfm,{nptable:/^ *(\S.*\|.*)\n *([-:]+ *\|[-| :]*)\n((?:.*\|.*(?:\n|$))*)\n*/,table:/^ *\|(.+)\n *\|( *[-:]+[-| :]*)\n((?: *\|.*(?:\n|$))*)\n*/});function Lexer(options){this.tokens=[];this.tokens.links={};this.options=options||marked.defaults;this.rules=block.normal;if(this.options.gfm){if(this.options.tables){this.rules=block.tables}else{this.rules=block.gfm}}}Lexer.rules=block;Lexer.lex=function(src,options){var lexer=new Lexer(options);return lexer.lex(src)};Lexer.prototype.lex=function(src){src=src.replace(/\r\n|\r/g,"\n").replace(/\t/g," ").replace(/\u00a0/g," ").replace(/\u2424/g,"\n");return this.token(src,true)};Lexer.prototype.token=function(src,top,bq){var src=src.replace(/^ +$/gm,""),next,loose,cap,bull,b,item,space,i,l;while(src){if(cap=this.rules.newline.exec(src)){src=src.substring(cap[0].length);if(cap[0].length>1){this.tokens.push({type:"space"})}}if(cap=this.rules.code.exec(src)){src=src.substring(cap[0].length);cap=cap[0].replace(/^ {4}/gm,"");this.tokens.push({type:"code",text:!this.options.pedantic?cap.replace(/\n+$/,""):cap});continue}if(cap=this.rules.fences.exec(src)){src=src.substring(cap[0].length);this.tokens.push({type:"code",lang:cap[2],text:cap[3]||""});continue}if(cap=this.rules.heading.exec(src)){src=src.substring(cap[0].length);this.tokens.push({type:"heading",depth:cap[1].length,text:cap[2]});continue}if(top&&(cap=this.rules.nptable.exec(src))){src=src.substring(cap[0].length);item={type:"table",header:cap[1].replace(/^ *| *\| *$/g,"").split(/ *\| */),align:cap[2].replace(/^ *|\| *$/g,"").split(/ *\| */),cells:cap[3].replace(/\n$/,"").split("\n")};for(i=0;i ?/gm,"");this.token(cap,top,true);this.tokens.push({type:"blockquote_end"});continue}if(cap=this.rules.list.exec(src)){src=src.substring(cap[0].length);bull=cap[2];this.tokens.push({type:"list_start",ordered:bull.length>1});cap=cap[0].match(this.rules.item);next=false;l=cap.length;i=0;for(;i1&&b.length>1)){src=cap.slice(i+1).join("\n")+src;i=l-1}}loose=next||/\n\n(?!\s*$)/.test(item);if(i!==l-1){next=item.charAt(item.length-1)==="\n";if(!loose)loose=next}this.tokens.push({type:loose?"loose_item_start":"list_item_start"});this.token(item,false,bq);this.tokens.push({type:"list_item_end"})}this.tokens.push({type:"list_end"});continue}if(cap=this.rules.html.exec(src)){src=src.substring(cap[0].length);this.tokens.push({type:this.options.sanitize?"paragraph":"html",pre:!this.options.sanitizer&&(cap[1]==="pre"||cap[1]==="script"||cap[1]==="style"),text:cap[0]});continue}if(!bq&&top&&(cap=this.rules.def.exec(src))){src=src.substring(cap[0].length);this.tokens.links[cap[1].toLowerCase()]={href:cap[2],title:cap[3]};continue}if(top&&(cap=this.rules.table.exec(src))){src=src.substring(cap[0].length);item={type:"table",header:cap[1].replace(/^ *| *\| *$/g,"").split(/ *\| */),align:cap[2].replace(/^ *|\| *$/g,"").split(/ *\| */),cells:cap[3].replace(/(?: *\| *)?\n$/,"").split("\n")};for(i=0;i])/,autolink:/^<([^ >]+(@|:\/)[^ >]+)>/,url:noop,tag:/^|^<\/?\w+(?:"[^"]*"|'[^']*'|[^'">])*?>/,link:/^!?\[(inside)\]\(href\)/,reflink:/^!?\[(inside)\]\s*\[([^\]]*)\]/,nolink:/^!?\[((?:\[[^\]]*\]|[^\[\]])*)\]/,strong:/^__([\s\S]+?)__(?!_)|^\*\*([\s\S]+?)\*\*(?!\*)/,em:/^\b_((?:[^_]|__)+?)_\b|^\*((?:\*\*|[\s\S])+?)\*(?!\*)/,code:/^(`+)\s*([\s\S]*?[^`])\s*\1(?!`)/,br:/^ {2,}\n(?!\s*$)/,del:noop,text:/^[\s\S]+?(?=[\\?(?:\s+['"]([\s\S]*?)['"])?\s*/;inline.link=replace(inline.link)("inside",inline._inside)("href",inline._href)();inline.reflink=replace(inline.reflink)("inside",inline._inside)();inline.normal=merge({},inline);inline.pedantic=merge({},inline.normal,{strong:/^__(?=\S)([\s\S]*?\S)__(?!_)|^\*\*(?=\S)([\s\S]*?\S)\*\*(?!\*)/,em:/^_(?=\S)([\s\S]*?\S)_(?!_)|^\*(?=\S)([\s\S]*?\S)\*(?!\*)/});inline.gfm=merge({},inline.normal,{escape:replace(inline.escape)("])","~|])")(),url:/^(https?:\/\/[^\s<]+[^<.,:;"')\]\s])/,del:/^~~(?=\S)([\s\S]*?\S)~~/,text:replace(inline.text)("]|","~]|")("|","|https?://|")()});inline.breaks=merge({},inline.gfm,{br:replace(inline.br)("{2,}","*")(),text:replace(inline.gfm.text)("{2,}","*")()});function InlineLexer(links,options){this.options=options||marked.defaults;this.links=links;this.rules=inline.normal;this.renderer=this.options.renderer||new Renderer;this.renderer.options=this.options;if(!this.links){throw new Error("Tokens array requires a `links` property.")}if(this.options.gfm){if(this.options.breaks){this.rules=inline.breaks}else{this.rules=inline.gfm}}else if(this.options.pedantic){this.rules=inline.pedantic}}InlineLexer.rules=inline;InlineLexer.output=function(src,links,options){var inline=new InlineLexer(links,options);return inline.output(src)};InlineLexer.prototype.output=function(src){var out="",link,text,href,cap;while(src){if(cap=this.rules.escape.exec(src)){src=src.substring(cap[0].length);out+=cap[1];continue}if(cap=this.rules.autolink.exec(src)){src=src.substring(cap[0].length);if(cap[2]==="@"){text=cap[1].charAt(6)===":"?this.mangle(cap[1].substring(7)):this.mangle(cap[1]);href=this.mangle("mailto:")+text}else{text=escape(cap[1]);href=text}out+=this.renderer.link(href,null,text);continue}if(!this.inLink&&(cap=this.rules.url.exec(src))){src=src.substring(cap[0].length);text=escape(cap[1]);href=text;out+=this.renderer.link(href,null,text);continue}if(cap=this.rules.tag.exec(src)){if(!this.inLink&&/^/i.test(cap[0])){this.inLink=false}src=src.substring(cap[0].length);out+=this.options.sanitize?this.options.sanitizer?this.options.sanitizer(cap[0]):escape(cap[0]):cap[0];continue}if(cap=this.rules.link.exec(src)){src=src.substring(cap[0].length);this.inLink=true;out+=this.outputLink(cap,{href:cap[2],title:cap[3]});this.inLink=false;continue}if((cap=this.rules.reflink.exec(src))||(cap=this.rules.nolink.exec(src))){src=src.substring(cap[0].length);link=(cap[2]||cap[1]).replace(/\s+/g," ");link=this.links[link.toLowerCase()];if(!link||!link.href){out+=cap[0].charAt(0);src=cap[0].substring(1)+src;continue}this.inLink=true;out+=this.outputLink(cap,link);this.inLink=false;continue}if(cap=this.rules.strong.exec(src)){src=src.substring(cap[0].length);out+=this.renderer.strong(this.output(cap[2]||cap[1]));continue}if(cap=this.rules.em.exec(src)){src=src.substring(cap[0].length);out+=this.renderer.em(this.output(cap[2]||cap[1]));continue}if(cap=this.rules.code.exec(src)){src=src.substring(cap[0].length);out+=this.renderer.codespan(escape(cap[2],true));continue}if(cap=this.rules.br.exec(src)){src=src.substring(cap[0].length);out+=this.renderer.br();continue}if(cap=this.rules.del.exec(src)){src=src.substring(cap[0].length);out+=this.renderer.del(this.output(cap[1]));continue}if(cap=this.rules.text.exec(src)){src=src.substring(cap[0].length);out+=this.renderer.text(escape(this.smartypants(cap[0])));continue}if(src){throw new Error("Infinite loop on byte: "+src.charCodeAt(0))}}return out};InlineLexer.prototype.outputLink=function(cap,link){var href=escape(link.href),title=link.title?escape(link.title):null;return cap[0].charAt(0)!=="!"?this.renderer.link(href,title,this.output(cap[1])):this.renderer.image(href,title,escape(cap[1]))};InlineLexer.prototype.smartypants=function(text){if(!this.options.smartypants)return text;return text.replace(/---/g,"—").replace(/--/g,"–").replace(/(^|[-\u2014/(\[{"\s])'/g,"$1‘").replace(/'/g,"’").replace(/(^|[-\u2014/(\[{\u2018\s])"/g,"$1“").replace(/"/g,"”").replace(/\.{3}/g,"…")};InlineLexer.prototype.mangle=function(text){if(!this.options.mangle)return text;var out="",l=text.length,i=0,ch;for(;i.5){ch="x"+ch.toString(16)}out+=""+ch+";"}return out};function Renderer(options){this.options=options||{}}Renderer.prototype.code=function(code,lang,escaped){if(this.options.highlight){var out=this.options.highlight(code,lang);if(out!=null&&out!==code){escaped=true;code=out}}if(!lang){return""+(escaped?code:escape(code,true))+"\n
"}return''+(escaped?code:escape(code,true))+"\n
\n"};Renderer.prototype.blockquote=function(quote){return"\n"+quote+"
\n"};Renderer.prototype.html=function(html){return html};Renderer.prototype.heading=function(text,level,raw){return"\n"};Renderer.prototype.hr=function(){return this.options.xhtml?"
\n":"
\n"};Renderer.prototype.list=function(body,ordered){var type=ordered?"ol":"ul";return"<"+type+">\n"+body+""+type+">\n"};Renderer.prototype.listitem=function(text){return""+text+"\n"};Renderer.prototype.paragraph=function(text){return""+text+"
\n"};Renderer.prototype.table=function(header,body){return"\n"+"\n"+header+"\n"+"\n"+body+"\n"+"
\n"};Renderer.prototype.tablerow=function(content){return"\n"+content+"
\n"};Renderer.prototype.tablecell=function(content,flags){var type=flags.header?"th":"td";var tag=flags.align?"<"+type+' style="text-align:'+flags.align+'">':"<"+type+">";return tag+content+""+type+">\n"};Renderer.prototype.strong=function(text){return""+text+""};Renderer.prototype.em=function(text){return""+text+""};Renderer.prototype.codespan=function(text){return""+text+"
"};Renderer.prototype.br=function(){return this.options.xhtml?"
":"
"};Renderer.prototype.del=function(text){return""+text+""};Renderer.prototype.link=function(href,title,text){if(this.options.sanitize){try{var prot=decodeURIComponent(unescape(href)).replace(/[^\w:]/g,"").toLowerCase()}catch(e){return""}if(prot.indexOf("javascript:")===0||prot.indexOf("vbscript:")===0){return""}}var out='"+text+"";return out};Renderer.prototype.image=function(href,title,text){var out='
":">";return out};Renderer.prototype.text=function(text){return text};function Parser(options){this.tokens=[];this.token=null;this.options=options||marked.defaults;this.options.renderer=this.options.renderer||new Renderer;this.renderer=this.options.renderer;this.renderer.options=this.options}Parser.parse=function(src,options,renderer){var parser=new Parser(options,renderer);return parser.parse(src)};Parser.prototype.parse=function(src){this.inline=new InlineLexer(src.links,this.options,this.renderer);this.tokens=src.reverse();var out="";while(this.next()){out+=this.tok()}return out};Parser.prototype.next=function(){return this.token=this.tokens.pop()};Parser.prototype.peek=function(){return this.tokens[this.tokens.length-1]||0};Parser.prototype.parseText=function(){var body=this.token.text;while(this.peek().type==="text"){body+="\n"+this.next().text}return this.inline.output(body)};Parser.prototype.tok=function(){switch(this.token.type){case"space":{return""}case"hr":{return this.renderer.hr()}case"heading":{return this.renderer.heading(this.inline.output(this.token.text),this.token.depth,this.token.text)}case"code":{return this.renderer.code(this.token.text,this.token.lang,this.token.escaped)}case"table":{var header="",body="",i,row,cell,flags,j;cell="";for(i=0;i/g,">").replace(/"/g,""").replace(/'/g,"'")}function unescape(html){return html.replace(/&([#\w]+);/g,function(_,n){n=n.toLowerCase();if(n==="colon")return":";if(n.charAt(0)==="#"){return n.charAt(1)==="x"?String.fromCharCode(parseInt(n.substring(2),16)):String.fromCharCode(+n.substring(1))}return""})}function replace(regex,opt){regex=regex.source;opt=opt||"";return function self(name,val){if(!name)return new RegExp(regex,opt);val=val.source||val;val=val.replace(/(^|[^\[])\^/g,"$1");regex=regex.replace(name,val);return self}}function noop(){}noop.exec=noop;function merge(obj){var i=1,target,key;for(;iAn error occurred:
"+escape(e.message+"",true)+"
"}throw e}}marked.options=marked.setOptions=function(opt){merge(marked.defaults,opt);return marked};marked.defaults={gfm:true,tables:true,breaks:false,pedantic:false,sanitize:false,sanitizer:null,mangle:true,smartLists:false,silent:false,highlight:null,langPrefix:"lang-",smartypants:false,headerPrefix:"",renderer:new Renderer,xhtml:false};marked.Parser=Parser;marked.parser=Parser.parse;marked.Renderer=Renderer;marked.Lexer=Lexer;marked.lexer=Lexer.lex;marked.InlineLexer=InlineLexer;marked.inlineLexer=InlineLexer.output;marked.parse=marked;if(typeof module!=="undefined"&&typeof exports==="object"){module.exports=marked}else if(typeof define==="function"&&define.amd){define(function(){return marked})}else{this.marked=marked}}).call(function(){return this||(typeof window!=="undefined"?window:global)}());
+
@@ -957,14 +1012,20 @@ Swagger Petstore
+
+
+
Pet
+
@@ -1016,11 +1077,15 @@
Usage and SDK Samples
// Configure OAuth2 access token for authorization: petstore_auth
OAuth petstore_auth = (OAuth) defaultClient.getAuthentication("petstore_auth");
petstore_auth.setAccessToken("YOUR ACCESS TOKEN");
+
+
PetApi apiInstance = new PetApi();
- Pet body = ; // Pet | Pet object that needs to be added to the store
+
+ Pet pet = ; // Pet |
+
try {
- apiInstance.addPet(body);
+ apiInstance.addPet(pet);
} catch (ApiException e) {
System.err.println("Exception when calling PetApi#addPet");
e.printStackTrace();
@@ -1036,9 +1101,11 @@
Usage and SDK Samples
public static void main(String[] args) {
PetApi apiInstance = new PetApi();
- Pet body = ; // Pet | Pet object that needs to be added to the store
+
+ Pet pet = ; // Pet |
+
try {
- apiInstance.addPet(body);
+ apiInstance.addPet(pet);
} catch (ApiException e) {
System.err.println("Exception when calling PetApi#addPet");
e.printStackTrace();
@@ -1051,18 +1118,22 @@
Usage and SDK Samples
Coming Soon!
-->
-
Configuration *apiConfig = [Configuration sharedConfig];
+
+Configuration *apiConfig = [Configuration sharedConfig];
// Configure OAuth2 access token for authorization: (authentication scheme: petstore_auth)
[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];
-Pet *body = ; // Pet object that needs to be added to the store
+
+Pet *pet = ; //
+
PetApi *apiInstance = [[PetApi alloc] init];
// Add a new pet to the store
-[apiInstance addPetWith:body
- completionHandler: ^(NSError* error) {
+[apiInstance addPetWithCompletionHandler: :pet
+ ^(NSError* error) {
+
if (error) {
NSLog(@"Error: %@", error);
}
@@ -1072,16 +1143,16 @@ Usage and SDK Samples
var SwaggerPetstore = require('swagger_petstore');
+
var defaultClient = SwaggerPetstore.ApiClient.instance;
// Configure OAuth2 access token for authorization: petstore_auth
var petstore_auth = defaultClient.authentications['petstore_auth'];
petstore_auth.accessToken = "YOUR ACCESS TOKEN"
-var api = new SwaggerPetstore.PetApi()
-var body = ; // {Pet} Pet object that needs to be added to the store
+var api = new SwaggerPetstore.PetApi()
var callback = function(error, data, response) {
if (error) {
@@ -1090,7 +1161,8 @@ Usage and SDK Samples
console.log('API called successfully.');
}
};
-api.addPet(body, callback);
+api.addPet(petcallback);
+
@@ -1113,14 +1185,22 @@ Usage and SDK Samples
// Configure OAuth2 access token for authorization: petstore_auth
Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN";
+
var apiInstance = new PetApi();
- var body = new Pet(); // Pet | Pet object that needs to be added to the store
+
+
+
+ var pet = new Pet(); // Pet |
+
+
try
{
+
// Add a new pet to the store
- apiInstance.addPet(body);
+
+ apiInstance.addPet(pet);
}
catch (Exception e)
{
@@ -1139,11 +1219,13 @@ Usage and SDK Samples
// Configure OAuth2 access token for authorization: petstore_auth
Swagger\Client\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');
-$api_instance = new Swagger\Client\Api\PetApi();
-$body = ; // Pet | Pet object that needs to be added to the store
+
+$api_instance = new Swagger\Client\Api{{classname}}();
+$pet = ; // Pet |
+
try {
- $api_instance->addPet($body);
+ $api_instance->addPet($pet);
} catch (Exception $e) {
echo 'Exception when calling PetApi->addPet: ', $e->getMessage(), PHP_EOL;
}
@@ -1158,11 +1240,13 @@ Usage and SDK Samples
# Configure OAuth2 access token for authorization: petstore_auth
$WWW::SwaggerClient::Configuration::access_token = 'YOUR_ACCESS_TOKEN';
+
my $api_instance = WWW::SwaggerClient::PetApi->new();
-my $body = WWW::SwaggerClient::Object::Pet->new(); # Pet | Pet object that needs to be added to the store
+my $pet = WWW::SwaggerClient::Object::Pet->new(); # Pet |
+
eval {
- $api_instance->addPet(body => $body);
+ $api_instance->addPet(pet => $pet);
};
if ($@) {
warn "Exception when calling PetApi->addPet: $@\n";
@@ -1179,13 +1263,15 @@ Usage and SDK Samples
# Configure OAuth2 access token for authorization: petstore_auth
swagger_client.configuration.access_token = 'YOUR_ACCESS_TOKEN'
+
# create an instance of the API class
api_instance = swagger_client.PetApi()
-body = # Pet | Pet object that needs to be added to the store
+pet = # Pet |
+
try:
# Add a new pet to the store
- api_instance.add_pet(body)
+ api_instance.add_pet(pet)
except ApiException as e:
print("Exception when calling PetApi->addPet: %s\n" % e)
@@ -1193,29 +1279,25 @@ Usage and SDK Samples
Parameters
+
+
+
Body parameters
Name |
Description |
- body * |
+
+
pet * |
-
+
|
+
+
+
+
Responses
+
Status: 405 - Invalid input
+
+
+
+
@@ -1303,10 +1396,15 @@
Usage and SDK Samples
// Configure OAuth2 access token for authorization: petstore_auth
OAuth petstore_auth = (OAuth) defaultClient.getAuthentication("petstore_auth");
petstore_auth.setAccessToken("YOUR ACCESS TOKEN");
+
+
PetApi apiInstance = new PetApi();
- Long petId = 789; // Long | Pet id to delete
- String apiKey = apiKey_example; // String |
+
+ Integer petId = ; // Integer | Pet id to delete
+
+ String apiKey = ; // String |
+
try {
apiInstance.deletePet(petId, apiKey);
} catch (ApiException e) {
@@ -1324,8 +1422,11 @@
Usage and SDK Samples
public static void main(String[] args) {
PetApi apiInstance = new PetApi();
- Long petId = 789; // Long | Pet id to delete
- String apiKey = apiKey_example; // String |
+
+ Integer petId = ; // Integer | Pet id to delete
+
+ String apiKey = ; // String |
+
try {
apiInstance.deletePet(petId, apiKey);
} catch (ApiException e) {
@@ -1340,20 +1441,24 @@
Usage and SDK Samples
Coming Soon!
-->
-
Configuration *apiConfig = [Configuration sharedConfig];
+
+Configuration *apiConfig = [Configuration sharedConfig];
// Configure OAuth2 access token for authorization: (authentication scheme: petstore_auth)
[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];
-Long *petId = 789; // Pet id to delete
-String *apiKey = apiKey_example; // (optional)
+
+Integer *petId = ; // Pet id to delete
+String *apiKey = ; // (optional)
+
PetApi *apiInstance = [[PetApi alloc] init];
// Deletes a pet
-[apiInstance deletePetWith:petId
+[apiInstance deletePetWithCompletionHandler: :petId
apiKey:apiKey
- completionHandler: ^(NSError* error) {
+ ^(NSError* error) {
+
if (error) {
NSLog(@"Error: %@", error);
}
@@ -1363,19 +1468,16 @@ Usage and SDK Samples
var SwaggerPetstore = require('swagger_petstore');
+
var defaultClient = SwaggerPetstore.ApiClient.instance;
// Configure OAuth2 access token for authorization: petstore_auth
var petstore_auth = defaultClient.authentications['petstore_auth'];
petstore_auth.accessToken = "YOUR ACCESS TOKEN"
-var api = new SwaggerPetstore.PetApi()
-var petId = 789; // {Long} Pet id to delete
-var opts = {
- 'apiKey': apiKey_example // {String}
-};
+var api = new SwaggerPetstore.PetApi()
var callback = function(error, data, response) {
if (error) {
@@ -1384,7 +1486,8 @@ Usage and SDK Samples
console.log('API called successfully.');
}
};
-api.deletePet(petId, opts, callback);
+api.deletePet(petIdcallback);
+
@@ -1407,14 +1510,26 @@ Usage and SDK Samples
// Configure OAuth2 access token for authorization: petstore_auth
Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN";
+
var apiInstance = new PetApi();
- var petId = 789; // Long | Pet id to delete
- var apiKey = apiKey_example; // String | (optional)
+
+
+
+ var petId = new Integer(); // Integer | Pet id to delete
+
+
+
+
+ var apiKey = new String(); // String | (optional)
+
+
try
{
+
// Deletes a pet
+
apiInstance.deletePet(petId, apiKey);
}
catch (Exception e)
@@ -1434,9 +1549,11 @@ Usage and SDK Samples
// Configure OAuth2 access token for authorization: petstore_auth
Swagger\Client\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');
-$api_instance = new Swagger\Client\Api\PetApi();
-$petId = 789; // Long | Pet id to delete
-$apiKey = apiKey_example; // String |
+
+$api_instance = new Swagger\Client\Api{{classname}}();
+$petId = ; // Integer | Pet id to delete
+$apiKey = ; // String |
+
try {
$api_instance->deletePet($petId, $apiKey);
@@ -1454,9 +1571,11 @@ Usage and SDK Samples
# Configure OAuth2 access token for authorization: petstore_auth
$WWW::SwaggerClient::Configuration::access_token = 'YOUR_ACCESS_TOKEN';
+
my $api_instance = WWW::SwaggerClient::PetApi->new();
-my $petId = 789; # Long | Pet id to delete
-my $apiKey = apiKey_example; # String |
+my $petId = []; # Integer | Pet id to delete
+my $apiKey = []; # String |
+
eval {
$api_instance->deletePet(petId => $petId, apiKey => $apiKey);
@@ -1476,10 +1595,12 @@ Usage and SDK Samples
# Configure OAuth2 access token for authorization: petstore_auth
swagger_client.configuration.access_token = 'YOUR_ACCESS_TOKEN'
+
# create an instance of the API class
api_instance = swagger_client.PetApi()
-petId = 789 # Long | Pet id to delete
-apiKey = apiKey_example # String | (optional)
+petId = # Integer | Pet id to delete
+apiKey = # String | (optional)
+
try:
# Deletes a pet
@@ -1491,12 +1612,14 @@ Usage and SDK Samples
Parameters
+
Path parameters
Name |
Description |
+
petId* |
@@ -1505,32 +1628,45 @@ Parameters
- Long
+ Integer
+
(int64)
+
+
Pet id to delete
+
+
+
+
+
Required
+
|
+
+
+
Header parameters
Name |
Description |
+
api_key |
@@ -1541,30 +1677,48 @@ Parameters
String
+
+
+
+
+
+
|
+
+
+
+
+
Responses
+
Status: 400 - Invalid pet value
+
+
+
+
@@ -1616,9 +1770,13 @@
Usage and SDK Samples
// Configure OAuth2 access token for authorization: petstore_auth
OAuth petstore_auth = (OAuth) defaultClient.getAuthentication("petstore_auth");
petstore_auth.setAccessToken("YOUR ACCESS TOKEN");
+
+
PetApi apiInstance = new PetApi();
+
array[String] status = ; // array[String] | Status values that need to be considered for filter
+
try {
array[Pet] result = apiInstance.findPetsByStatus(status);
System.out.println(result);
@@ -1637,7 +1795,9 @@
Usage and SDK Samples
public static void main(String[] args) {
PetApi apiInstance = new PetApi();
+
array[String] status = ; // array[String] | Status values that need to be considered for filter
+
try {
array[Pet] result = apiInstance.findPetsByStatus(status);
System.out.println(result);
@@ -1653,21 +1813,26 @@
Usage and SDK Samples
Coming Soon!
-->
-
Configuration *apiConfig = [Configuration sharedConfig];
+
+Configuration *apiConfig = [Configuration sharedConfig];
// Configure OAuth2 access token for authorization: (authentication scheme: petstore_auth)
[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];
+
array[String] *status = ; // Status values that need to be considered for filter
+
PetApi *apiInstance = [[PetApi alloc] init];
// Finds Pets by status
-[apiInstance findPetsByStatusWith:status
- completionHandler: ^(array[Pet] output, NSError* error) {
+[apiInstance findPetsByStatusWithCompletionHandler: :status
+ ^(array[Pet] output, NSError* error) {
+
if (output) {
NSLog(@"%@", output);
}
+
if (error) {
NSLog(@"Error: %@", error);
}
@@ -1677,16 +1842,16 @@ Usage and SDK Samples
var SwaggerPetstore = require('swagger_petstore');
+
var defaultClient = SwaggerPetstore.ApiClient.instance;
// Configure OAuth2 access token for authorization: petstore_auth
var petstore_auth = defaultClient.authentications['petstore_auth'];
petstore_auth.accessToken = "YOUR ACCESS TOKEN"
-var api = new SwaggerPetstore.PetApi()
-var status = ; // {array[String]} Status values that need to be considered for filter
+var api = new SwaggerPetstore.PetApi()
var callback = function(error, data, response) {
if (error) {
@@ -1695,7 +1860,8 @@ Usage and SDK Samples
console.log('API called successfully. Returned data: ' + data);
}
};
-api.findPetsByStatus(status, callback);
+api.findPetsByStatus(statuscallback);
+
@@ -1718,13 +1884,21 @@ Usage and SDK Samples
// Configure OAuth2 access token for authorization: petstore_auth
Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN";
+
var apiInstance = new PetApi();
+
+
+
var status = new array[String](); // array[String] | Status values that need to be considered for filter
+
+
try
{
+
// Finds Pets by status
+
array[Pet] result = apiInstance.findPetsByStatus(status);
Debug.WriteLine(result);
}
@@ -1745,9 +1919,11 @@ Usage and SDK Samples
// Configure OAuth2 access token for authorization: petstore_auth
Swagger\Client\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');
-$api_instance = new Swagger\Client\Api\PetApi();
+
+$api_instance = new Swagger\Client\Api{{classname}}();
$status = ; // array[String] | Status values that need to be considered for filter
+
try {
$result = $api_instance->findPetsByStatus($status);
print_r($result);
@@ -1765,9 +1941,11 @@ Usage and SDK Samples
# Configure OAuth2 access token for authorization: petstore_auth
$WWW::SwaggerClient::Configuration::access_token = 'YOUR_ACCESS_TOKEN';
+
my $api_instance = WWW::SwaggerClient::PetApi->new();
my $status = []; # array[String] | Status values that need to be considered for filter
+
eval {
my $result = $api_instance->findPetsByStatus(status => $status);
print Dumper($result);
@@ -1787,10 +1965,12 @@ Usage and SDK Samples
# Configure OAuth2 access token for authorization: petstore_auth
swagger_client.configuration.access_token = 'YOUR_ACCESS_TOKEN'
+
# create an instance of the API class
api_instance = swagger_client.PetApi()
status = # array[String] | Status values that need to be considered for filter
+
try:
# Finds Pets by status
api_response = api_instance.find_pets_by_status(status)
@@ -1802,16 +1982,22 @@ Usage and SDK Samples
Parameters
+
+
+
+
+
Query parameters
Name |
Description |
+
status* |
@@ -1822,42 +2008,70 @@ Parameters
array[String]
+
+
Status values that need to be considered for filter
+
+
+
+
+
Required
+
|
+
+
Responses
+
Status: 200 - successful operation
+
-
+
+
+
+
+
Responses
+
Status: 400 - Invalid ID supplied
+
+
+
Status: 404 - Pet not found
+
+
+
Status: 405 - Validation exception
+
+
+
+
+
@@ -3276,13 +3718,17 @@
Usage and SDK Samples
// Configure OAuth2 access token for authorization: petstore_auth
OAuth petstore_auth = (OAuth) defaultClient.getAuthentication("petstore_auth");
petstore_auth.setAccessToken("YOUR ACCESS TOKEN");
+
+
PetApi apiInstance = new PetApi();
- Long petId = 789; // Long | ID of pet to update
- String additionalMetadata = additionalMetadata_example; // String | Additional data to pass to server
- File file = /path/to/file.txt; // File | file to upload
+
+ Integer petId = ; // Integer | ID of pet to update
+
+ body = ; // |
+
try {
- ApiResponse result = apiInstance.uploadFile(petId, additionalMetadata, file);
+ ApiResponse result = apiInstance.uploadFile(petId, body);
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling PetApi#uploadFile");
@@ -3299,11 +3745,13 @@
Usage and SDK Samples
public static void main(String[] args) {
PetApi apiInstance = new PetApi();
- Long petId = 789; // Long | ID of pet to update
- String additionalMetadata = additionalMetadata_example; // String | Additional data to pass to server
- File file = /path/to/file.txt; // File | file to upload
+
+ Integer petId = ; // Integer | ID of pet to update
+
+ body = ; // |
+
try {
- ApiResponse result = apiInstance.uploadFile(petId, additionalMetadata, file);
+ ApiResponse result = apiInstance.uploadFile(petId, body);
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling PetApi#uploadFile");
@@ -3317,25 +3765,28 @@
Usage and SDK Samples
Coming Soon!
-->
-
Configuration *apiConfig = [Configuration sharedConfig];
+
+Configuration *apiConfig = [Configuration sharedConfig];
// Configure OAuth2 access token for authorization: (authentication scheme: petstore_auth)
[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];
-Long *petId = 789; // ID of pet to update
-String *additionalMetadata = additionalMetadata_example; // Additional data to pass to server (optional)
-File *file = /path/to/file.txt; // file to upload (optional)
+
+Integer *petId = ; // ID of pet to update
+ *body = ; // (optional)
+
PetApi *apiInstance = [[PetApi alloc] init];
// uploads an image
-[apiInstance uploadFileWith:petId
- additionalMetadata:additionalMetadata
- file:file
- completionHandler: ^(ApiResponse output, NSError* error) {
+[apiInstance uploadFileWithCompletionHandler: :petId
+ body:body
+ ^(ApiResponse output, NSError* error) {
+
if (output) {
NSLog(@"%@", output);
}
+
if (error) {
NSLog(@"Error: %@", error);
}
@@ -3345,20 +3796,16 @@ Usage and SDK Samples
var SwaggerPetstore = require('swagger_petstore');
+
var defaultClient = SwaggerPetstore.ApiClient.instance;
// Configure OAuth2 access token for authorization: petstore_auth
var petstore_auth = defaultClient.authentications['petstore_auth'];
petstore_auth.accessToken = "YOUR ACCESS TOKEN"
-var api = new SwaggerPetstore.PetApi()
-var petId = 789; // {Long} ID of pet to update
-var opts = {
- 'additionalMetadata': additionalMetadata_example, // {String} Additional data to pass to server
- 'file': /path/to/file.txt // {File} file to upload
-};
+var api = new SwaggerPetstore.PetApi()
var callback = function(error, data, response) {
if (error) {
@@ -3367,7 +3814,8 @@ Usage and SDK Samples
console.log('API called successfully. Returned data: ' + data);
}
};
-api.uploadFile(petId, opts, callback);
+api.uploadFile(petIdcallback);
+
@@ -3390,16 +3838,27 @@ Usage and SDK Samples
// Configure OAuth2 access token for authorization: petstore_auth
Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN";
+
var apiInstance = new PetApi();
- var petId = 789; // Long | ID of pet to update
- var additionalMetadata = additionalMetadata_example; // String | Additional data to pass to server (optional)
- var file = new File(); // File | file to upload (optional)
+
+
+
+ var petId = new Integer(); // Integer | ID of pet to update
+
+
+
+
+ var body = new (); // | (optional)
+
+
try
{
+
// uploads an image
- ApiResponse result = apiInstance.uploadFile(petId, additionalMetadata, file);
+
+ ApiResponse result = apiInstance.uploadFile(petId, body);
Debug.WriteLine(result);
}
catch (Exception e)
@@ -3419,13 +3878,14 @@ Usage and SDK Samples
// Configure OAuth2 access token for authorization: petstore_auth
Swagger\Client\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');
-$api_instance = new Swagger\Client\Api\PetApi();
-$petId = 789; // Long | ID of pet to update
-$additionalMetadata = additionalMetadata_example; // String | Additional data to pass to server
-$file = /path/to/file.txt; // File | file to upload
+
+$api_instance = new Swagger\Client\Api{{classname}}();
+$petId = ; // Integer | ID of pet to update
+$body = ; // |
+
try {
- $result = $api_instance->uploadFile($petId, $additionalMetadata, $file);
+ $result = $api_instance->uploadFile($petId, $body);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling PetApi->uploadFile: ', $e->getMessage(), PHP_EOL;
@@ -3441,13 +3901,14 @@ Usage and SDK Samples
# Configure OAuth2 access token for authorization: petstore_auth
$WWW::SwaggerClient::Configuration::access_token = 'YOUR_ACCESS_TOKEN';
+
my $api_instance = WWW::SwaggerClient::PetApi->new();
-my $petId = 789; # Long | ID of pet to update
-my $additionalMetadata = additionalMetadata_example; # String | Additional data to pass to server
-my $file = /path/to/file.txt; # File | file to upload
+my $petId = []; # Integer | ID of pet to update
+my $body = WWW::SwaggerClient::Object::->new(); # |
+
eval {
- my $result = $api_instance->uploadFile(petId => $petId, additionalMetadata => $additionalMetadata, file => $file);
+ my $result = $api_instance->uploadFile(petId => $petId, body => $body);
print Dumper($result);
};
if ($@) {
@@ -3465,15 +3926,16 @@ Usage and SDK Samples
# Configure OAuth2 access token for authorization: petstore_auth
swagger_client.configuration.access_token = 'YOUR_ACCESS_TOKEN'
+
# create an instance of the API class
api_instance = swagger_client.PetApi()
-petId = 789 # Long | ID of pet to update
-additionalMetadata = additionalMetadata_example # String | Additional data to pass to server (optional)
-file = /path/to/file.txt # File | file to upload (optional)
+petId = # Integer | ID of pet to update
+body = # | (optional)
+
try:
# uploads an image
- api_response = api_instance.upload_file(petId, additionalMetadata=additionalMetadata, file=file)
+ api_response = api_instance.upload_file(petId, body=body)
pprint(api_response)
except ApiException as e:
print("Exception when calling PetApi->uploadFile: %s\n" % e)
@@ -3482,12 +3944,14 @@ Usage and SDK Samples
Parameters
+
Path parameters
Name |
Description |
+
petId* |
@@ -3496,96 +3960,111 @@ Parameters
- Long
+ Integer
+
(int64)
+
+
ID of pet to update
+
+
+
+
+
Required
+
|
+
+
+
-
- Form parameters
+
+ Body parameters
Name |
Description |
- additionalMetadata |
+
+
body |
-
- |
-
-
- file |
-
-
-
- |
+
+
+
+
+
Responses
+
Status: 200 - successful operation
+
-
+
+
+
+
+
Responses
+
Status: 200 - successful operation
+
-
+
+
+
+
+
Responses
+
Status: default - successful operation
+
+
+
+