Swagger SDK

Val Huber

Swagger empowers a community of SDK kits for code generation, like this Java SDK for Swagger, which looks like this:

CustomerBusinessObjectApi();

ApiClient client = cboApi.getApiClient();

client.setBasePath("http://localhost:8080/APIServer/rest/default/demo/v1");

client.addDefaultHeader("Authorization", "CALiveAPICreator demo_full:1");

client.setDateFormat(new SimpleDateFormat("yyyy-MM-dd'T'HH:mm:ss.SSS"));


List<CustomerBusinessObject> cbos = cboApi.customerBusinessObjectGet(null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null);

for (CustomerBusinessObject cbo : cbos) {

System.out.println("Customer: " + cbo.getName() + " has balance " + cbo.getBalance());

List<CustomerBusinessObjectOrders> orders = cbo.getOrders();

for (CustomerBusinessObjectOrders order : orders) {

System.out.println(" Order: " + order.getOrderNumber() + " has total " + order.getAmountTotal());

List<CustomerBusinessObjectOrdersLineItems> items = order.getLineItems();

for (CustomerBusinessObjectOrdersLineItems item: items) {

System.out.println(" Item " + item.getLineitemId() + " has amount " + item.getAmount());

}

}

}

Chat
What would you like to chat about?
Contact
Call us at +1-800-225-5224
Call us at +1-800-225-5224
Contact Us