mirror of
https://github.com/jlengrand/openapi-generator.git
synced 2026-03-10 08:31:23 +00:00
update android petstore sample, add this to volley's model
This commit is contained in:
5
bin/android-petstore-all.sh
Executable file
5
bin/android-petstore-all.sh
Executable file
@@ -0,0 +1,5 @@
|
||||
#!/bin/sh
|
||||
|
||||
./bin/android-petstore-httpclient.sh
|
||||
./bin/android-petstore-volley.sh
|
||||
|
||||
@@ -48,7 +48,7 @@ public class {{classname}} {{#parent}}extends {{{parent}}}{{/parent}} {
|
||||
return false;
|
||||
}
|
||||
{{classname}} {{classVarName}} = ({{classname}}) o;{{#hasVars}}
|
||||
return {{#vars}}({{name}} == null ? {{classVarName}}.{{name}} == null : {{name}}.equals({{classVarName}}.{{name}})){{#hasMore}} &&
|
||||
return {{#vars}}(this.{{name}} == null ? {{classVarName}}.{{name}} == null : this.{{name}}.equals({{classVarName}}.{{name}})){{#hasMore}} &&
|
||||
{{/hasMore}}{{^hasMore}};{{/hasMore}}{{/vars}}{{/hasVars}}{{^hasVars}}
|
||||
return true;{{/hasVars}}
|
||||
}
|
||||
|
||||
@@ -128,7 +128,7 @@ try {
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------- | ------------- | ------------- | -------------
|
||||
**status** | [**List<String>**](String.md)| Status values that need to be considered for filter | [optional] [default to available]
|
||||
**status** | [**List<String>**](String.md)| Status values that need to be considered for filter | [optional] [default to available] [enum: available, pending, sold]
|
||||
|
||||
### Return type
|
||||
|
||||
|
||||
@@ -28,7 +28,7 @@ git init
|
||||
# Adds the files in the local repository and stages them for commit.
|
||||
git add .
|
||||
|
||||
# Commits the tracked changes and prepares them to be pushed to a remote repository.
|
||||
# Commits the tracked changes and prepares them to be pushed to a remote repository.
|
||||
git commit -m "$release_note"
|
||||
|
||||
# Sets the new remote
|
||||
|
||||
@@ -1 +1 @@
|
||||
rootProject.name = "swagger-android-client"
|
||||
rootProject.name = "swagger-android-client"
|
||||
|
||||
@@ -1,3 +1,27 @@
|
||||
/**
|
||||
* Swagger Petstore
|
||||
* This is a sample server Petstore server. You can find out more about Swagger at <a href=\"http://swagger.io\">http://swagger.io</a> or on irc.freenode.net, #swagger. For this sample, you can use the api key \"special-key\" to test the authorization filters
|
||||
*
|
||||
* OpenAPI spec version: 1.0.0
|
||||
* Contact: apiteam@wordnik.com
|
||||
*
|
||||
* 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.
|
||||
*/
|
||||
|
||||
package io.swagger.client;
|
||||
|
||||
public class ApiException extends Exception {
|
||||
@@ -14,16 +38,16 @@ public class ApiException extends Exception {
|
||||
public int getCode() {
|
||||
return code;
|
||||
}
|
||||
|
||||
|
||||
public void setCode(int code) {
|
||||
this.code = code;
|
||||
}
|
||||
|
||||
|
||||
public String getMessage() {
|
||||
return message;
|
||||
}
|
||||
|
||||
|
||||
public void setMessage(String message) {
|
||||
this.message = message;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,3 +1,27 @@
|
||||
/**
|
||||
* Swagger Petstore
|
||||
* This is a sample server Petstore server. You can find out more about Swagger at <a href=\"http://swagger.io\">http://swagger.io</a> or on irc.freenode.net, #swagger. For this sample, you can use the api key \"special-key\" to test the authorization filters
|
||||
*
|
||||
* OpenAPI spec version: 1.0.0
|
||||
* Contact: apiteam@wordnik.com
|
||||
*
|
||||
* 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.
|
||||
*/
|
||||
|
||||
package io.swagger.client;
|
||||
|
||||
import org.apache.http.*;
|
||||
|
||||
@@ -1,3 +1,27 @@
|
||||
/**
|
||||
* Swagger Petstore
|
||||
* This is a sample server Petstore server. You can find out more about Swagger at <a href=\"http://swagger.io\">http://swagger.io</a> or on irc.freenode.net, #swagger. For this sample, you can use the api key \"special-key\" to test the authorization filters
|
||||
*
|
||||
* OpenAPI spec version: 1.0.0
|
||||
* Contact: apiteam@wordnik.com
|
||||
*
|
||||
* 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.
|
||||
*/
|
||||
|
||||
package io.swagger.client;
|
||||
|
||||
import org.apache.http.client.methods.*;
|
||||
@@ -13,4 +37,4 @@ public class HttpPatch extends HttpPost {
|
||||
public String getMethod() {
|
||||
return METHOD_PATCH;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,3 +1,27 @@
|
||||
/**
|
||||
* Swagger Petstore
|
||||
* This is a sample server Petstore server. You can find out more about Swagger at <a href=\"http://swagger.io\">http://swagger.io</a> or on irc.freenode.net, #swagger. For this sample, you can use the api key \"special-key\" to test the authorization filters
|
||||
*
|
||||
* OpenAPI spec version: 1.0.0
|
||||
* Contact: apiteam@wordnik.com
|
||||
*
|
||||
* 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.
|
||||
*/
|
||||
|
||||
package io.swagger.client;
|
||||
|
||||
public class Pair {
|
||||
|
||||
@@ -1,3 +1,27 @@
|
||||
/**
|
||||
* Swagger Petstore
|
||||
* This is a sample server Petstore server. You can find out more about Swagger at <a href=\"http://swagger.io\">http://swagger.io</a> or on irc.freenode.net, #swagger. For this sample, you can use the api key \"special-key\" to test the authorization filters
|
||||
*
|
||||
* OpenAPI spec version: 1.0.0
|
||||
* Contact: apiteam@wordnik.com
|
||||
*
|
||||
* 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.
|
||||
*/
|
||||
|
||||
package io.swagger.client.api;
|
||||
|
||||
import io.swagger.client.ApiException;
|
||||
|
||||
@@ -1,3 +1,27 @@
|
||||
/**
|
||||
* Swagger Petstore
|
||||
* This is a sample server Petstore server. You can find out more about Swagger at <a href=\"http://swagger.io\">http://swagger.io</a> or on irc.freenode.net, #swagger. For this sample, you can use the api key \"special-key\" to test the authorization filters
|
||||
*
|
||||
* OpenAPI spec version: 1.0.0
|
||||
* Contact: apiteam@wordnik.com
|
||||
*
|
||||
* 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.
|
||||
*/
|
||||
|
||||
package io.swagger.client.api;
|
||||
|
||||
import io.swagger.client.ApiException;
|
||||
|
||||
@@ -1,3 +1,27 @@
|
||||
/**
|
||||
* Swagger Petstore
|
||||
* This is a sample server Petstore server. You can find out more about Swagger at <a href=\"http://swagger.io\">http://swagger.io</a> or on irc.freenode.net, #swagger. For this sample, you can use the api key \"special-key\" to test the authorization filters
|
||||
*
|
||||
* OpenAPI spec version: 1.0.0
|
||||
* Contact: apiteam@wordnik.com
|
||||
*
|
||||
* 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.
|
||||
*/
|
||||
|
||||
package io.swagger.client.api;
|
||||
|
||||
import io.swagger.client.ApiException;
|
||||
|
||||
@@ -43,11 +43,11 @@ public class Category {
|
||||
return false;
|
||||
}
|
||||
Category category = (Category) o;
|
||||
return (id == null ? category.id == null : id.equals(category.id)) &&
|
||||
(name == null ? category.name == null : name.equals(category.name));
|
||||
return (this.id == null ? category.id == null : this.id.equals(category.id)) &&
|
||||
(this.name == null ? category.name == null : this.name.equals(category.name));
|
||||
}
|
||||
|
||||
@Override
|
||||
@Override
|
||||
public int hashCode() {
|
||||
int result = 17;
|
||||
result = 31 * result + (id == null ? 0: id.hashCode());
|
||||
|
||||
@@ -96,15 +96,15 @@ public class Order {
|
||||
return false;
|
||||
}
|
||||
Order order = (Order) o;
|
||||
return (id == null ? order.id == null : id.equals(order.id)) &&
|
||||
(petId == null ? order.petId == null : petId.equals(order.petId)) &&
|
||||
(quantity == null ? order.quantity == null : quantity.equals(order.quantity)) &&
|
||||
(shipDate == null ? order.shipDate == null : shipDate.equals(order.shipDate)) &&
|
||||
(status == null ? order.status == null : status.equals(order.status)) &&
|
||||
(complete == null ? order.complete == null : complete.equals(order.complete));
|
||||
return (this.id == null ? order.id == null : this.id.equals(order.id)) &&
|
||||
(this.petId == null ? order.petId == null : this.petId.equals(order.petId)) &&
|
||||
(this.quantity == null ? order.quantity == null : this.quantity.equals(order.quantity)) &&
|
||||
(this.shipDate == null ? order.shipDate == null : this.shipDate.equals(order.shipDate)) &&
|
||||
(this.status == null ? order.status == null : this.status.equals(order.status)) &&
|
||||
(this.complete == null ? order.complete == null : this.complete.equals(order.complete));
|
||||
}
|
||||
|
||||
@Override
|
||||
@Override
|
||||
public int hashCode() {
|
||||
int result = 17;
|
||||
result = 31 * result + (id == null ? 0: id.hashCode());
|
||||
|
||||
@@ -98,15 +98,15 @@ public class Pet {
|
||||
return false;
|
||||
}
|
||||
Pet pet = (Pet) o;
|
||||
return (id == null ? pet.id == null : id.equals(pet.id)) &&
|
||||
(category == null ? pet.category == null : category.equals(pet.category)) &&
|
||||
(name == null ? pet.name == null : name.equals(pet.name)) &&
|
||||
(photoUrls == null ? pet.photoUrls == null : photoUrls.equals(pet.photoUrls)) &&
|
||||
(tags == null ? pet.tags == null : tags.equals(pet.tags)) &&
|
||||
(status == null ? pet.status == null : status.equals(pet.status));
|
||||
return (this.id == null ? pet.id == null : this.id.equals(pet.id)) &&
|
||||
(this.category == null ? pet.category == null : this.category.equals(pet.category)) &&
|
||||
(this.name == null ? pet.name == null : this.name.equals(pet.name)) &&
|
||||
(this.photoUrls == null ? pet.photoUrls == null : this.photoUrls.equals(pet.photoUrls)) &&
|
||||
(this.tags == null ? pet.tags == null : this.tags.equals(pet.tags)) &&
|
||||
(this.status == null ? pet.status == null : this.status.equals(pet.status));
|
||||
}
|
||||
|
||||
@Override
|
||||
@Override
|
||||
public int hashCode() {
|
||||
int result = 17;
|
||||
result = 31 * result + (id == null ? 0: id.hashCode());
|
||||
|
||||
@@ -43,11 +43,11 @@ public class Tag {
|
||||
return false;
|
||||
}
|
||||
Tag tag = (Tag) o;
|
||||
return (id == null ? tag.id == null : id.equals(tag.id)) &&
|
||||
(name == null ? tag.name == null : name.equals(tag.name));
|
||||
return (this.id == null ? tag.id == null : this.id.equals(tag.id)) &&
|
||||
(this.name == null ? tag.name == null : this.name.equals(tag.name));
|
||||
}
|
||||
|
||||
@Override
|
||||
@Override
|
||||
public int hashCode() {
|
||||
int result = 17;
|
||||
result = 31 * result + (id == null ? 0: id.hashCode());
|
||||
|
||||
@@ -116,17 +116,17 @@ public class User {
|
||||
return false;
|
||||
}
|
||||
User user = (User) o;
|
||||
return (id == null ? user.id == null : id.equals(user.id)) &&
|
||||
(username == null ? user.username == null : username.equals(user.username)) &&
|
||||
(firstName == null ? user.firstName == null : firstName.equals(user.firstName)) &&
|
||||
(lastName == null ? user.lastName == null : lastName.equals(user.lastName)) &&
|
||||
(email == null ? user.email == null : email.equals(user.email)) &&
|
||||
(password == null ? user.password == null : password.equals(user.password)) &&
|
||||
(phone == null ? user.phone == null : phone.equals(user.phone)) &&
|
||||
(userStatus == null ? user.userStatus == null : userStatus.equals(user.userStatus));
|
||||
return (this.id == null ? user.id == null : this.id.equals(user.id)) &&
|
||||
(this.username == null ? user.username == null : this.username.equals(user.username)) &&
|
||||
(this.firstName == null ? user.firstName == null : this.firstName.equals(user.firstName)) &&
|
||||
(this.lastName == null ? user.lastName == null : this.lastName.equals(user.lastName)) &&
|
||||
(this.email == null ? user.email == null : this.email.equals(user.email)) &&
|
||||
(this.password == null ? user.password == null : this.password.equals(user.password)) &&
|
||||
(this.phone == null ? user.phone == null : this.phone.equals(user.phone)) &&
|
||||
(this.userStatus == null ? user.userStatus == null : this.userStatus.equals(user.userStatus));
|
||||
}
|
||||
|
||||
@Override
|
||||
@Override
|
||||
public int hashCode() {
|
||||
int result = 17;
|
||||
result = 31 * result + (id == null ? 0: id.hashCode());
|
||||
|
||||
@@ -128,7 +128,7 @@ try {
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------- | ------------- | ------------- | -------------
|
||||
**status** | [**List<String>**](String.md)| Status values that need to be considered for filter | [optional] [default to available]
|
||||
**status** | [**List<String>**](String.md)| Status values that need to be considered for filter | [optional] [default to available] [enum: available, pending, sold]
|
||||
|
||||
### Return type
|
||||
|
||||
|
||||
@@ -67,8 +67,8 @@ public class Category {
|
||||
return false;
|
||||
}
|
||||
Category category = (Category) o;
|
||||
return (id == null ? category.id == null : id.equals(category.id)) &&
|
||||
(name == null ? category.name == null : name.equals(category.name));
|
||||
return (this.id == null ? category.id == null : this.id.equals(category.id)) &&
|
||||
(this.name == null ? category.name == null : this.name.equals(category.name));
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -120,12 +120,12 @@ public class Order {
|
||||
return false;
|
||||
}
|
||||
Order order = (Order) o;
|
||||
return (id == null ? order.id == null : id.equals(order.id)) &&
|
||||
(petId == null ? order.petId == null : petId.equals(order.petId)) &&
|
||||
(quantity == null ? order.quantity == null : quantity.equals(order.quantity)) &&
|
||||
(shipDate == null ? order.shipDate == null : shipDate.equals(order.shipDate)) &&
|
||||
(status == null ? order.status == null : status.equals(order.status)) &&
|
||||
(complete == null ? order.complete == null : complete.equals(order.complete));
|
||||
return (this.id == null ? order.id == null : this.id.equals(order.id)) &&
|
||||
(this.petId == null ? order.petId == null : this.petId.equals(order.petId)) &&
|
||||
(this.quantity == null ? order.quantity == null : this.quantity.equals(order.quantity)) &&
|
||||
(this.shipDate == null ? order.shipDate == null : this.shipDate.equals(order.shipDate)) &&
|
||||
(this.status == null ? order.status == null : this.status.equals(order.status)) &&
|
||||
(this.complete == null ? order.complete == null : this.complete.equals(order.complete));
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -122,12 +122,12 @@ public class Pet {
|
||||
return false;
|
||||
}
|
||||
Pet pet = (Pet) o;
|
||||
return (id == null ? pet.id == null : id.equals(pet.id)) &&
|
||||
(category == null ? pet.category == null : category.equals(pet.category)) &&
|
||||
(name == null ? pet.name == null : name.equals(pet.name)) &&
|
||||
(photoUrls == null ? pet.photoUrls == null : photoUrls.equals(pet.photoUrls)) &&
|
||||
(tags == null ? pet.tags == null : tags.equals(pet.tags)) &&
|
||||
(status == null ? pet.status == null : status.equals(pet.status));
|
||||
return (this.id == null ? pet.id == null : this.id.equals(pet.id)) &&
|
||||
(this.category == null ? pet.category == null : this.category.equals(pet.category)) &&
|
||||
(this.name == null ? pet.name == null : this.name.equals(pet.name)) &&
|
||||
(this.photoUrls == null ? pet.photoUrls == null : this.photoUrls.equals(pet.photoUrls)) &&
|
||||
(this.tags == null ? pet.tags == null : this.tags.equals(pet.tags)) &&
|
||||
(this.status == null ? pet.status == null : this.status.equals(pet.status));
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -67,8 +67,8 @@ public class Tag {
|
||||
return false;
|
||||
}
|
||||
Tag tag = (Tag) o;
|
||||
return (id == null ? tag.id == null : id.equals(tag.id)) &&
|
||||
(name == null ? tag.name == null : name.equals(tag.name));
|
||||
return (this.id == null ? tag.id == null : this.id.equals(tag.id)) &&
|
||||
(this.name == null ? tag.name == null : this.name.equals(tag.name));
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -140,14 +140,14 @@ public class User {
|
||||
return false;
|
||||
}
|
||||
User user = (User) o;
|
||||
return (id == null ? user.id == null : id.equals(user.id)) &&
|
||||
(username == null ? user.username == null : username.equals(user.username)) &&
|
||||
(firstName == null ? user.firstName == null : firstName.equals(user.firstName)) &&
|
||||
(lastName == null ? user.lastName == null : lastName.equals(user.lastName)) &&
|
||||
(email == null ? user.email == null : email.equals(user.email)) &&
|
||||
(password == null ? user.password == null : password.equals(user.password)) &&
|
||||
(phone == null ? user.phone == null : phone.equals(user.phone)) &&
|
||||
(userStatus == null ? user.userStatus == null : userStatus.equals(user.userStatus));
|
||||
return (this.id == null ? user.id == null : this.id.equals(user.id)) &&
|
||||
(this.username == null ? user.username == null : this.username.equals(user.username)) &&
|
||||
(this.firstName == null ? user.firstName == null : this.firstName.equals(user.firstName)) &&
|
||||
(this.lastName == null ? user.lastName == null : this.lastName.equals(user.lastName)) &&
|
||||
(this.email == null ? user.email == null : this.email.equals(user.email)) &&
|
||||
(this.password == null ? user.password == null : this.password.equals(user.password)) &&
|
||||
(this.phone == null ? user.phone == null : this.phone.equals(user.phone)) &&
|
||||
(this.userStatus == null ? user.userStatus == null : this.userStatus.equals(user.userStatus));
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
Reference in New Issue
Block a user