Skip to content

Commit

Permalink
Generated code by SwaggerHub
Browse files Browse the repository at this point in the history
  • Loading branch information
pmerrill authored and root committed Jan 30, 2020
1 parent 5e34a45 commit 795f2fd
Show file tree
Hide file tree
Showing 28 changed files with 31 additions and 31 deletions.
2 changes: 1 addition & 1 deletion src/main/java/io/swagger/api/ApiException.java
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package io.swagger.api;

@javax.annotation.Generated(value = "io.swagger.codegen.v3.generators.java.SpringCodegen", date = "2020-01-28T14:08:55.924Z[GMT]")
@javax.annotation.Generated(value = "io.swagger.codegen.v3.generators.java.SpringCodegen", date = "2020-01-30T02:08:15.864Z[GMT]")
public class ApiException extends Exception{
private int code;
public ApiException (int code, String msg) {
Expand Down
2 changes: 1 addition & 1 deletion src/main/java/io/swagger/api/ApiOriginFilter.java
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
import javax.servlet.*;
import javax.servlet.http.HttpServletResponse;

@javax.annotation.Generated(value = "io.swagger.codegen.v3.generators.java.SpringCodegen", date = "2020-01-28T14:08:55.924Z[GMT]")
@javax.annotation.Generated(value = "io.swagger.codegen.v3.generators.java.SpringCodegen", date = "2020-01-30T02:08:15.864Z[GMT]")
public class ApiOriginFilter implements javax.servlet.Filter {
@Override
public void doFilter(ServletRequest request, ServletResponse response,
Expand Down
2 changes: 1 addition & 1 deletion src/main/java/io/swagger/api/ApiResponseMessage.java
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

import javax.xml.bind.annotation.XmlTransient;

@javax.annotation.Generated(value = "io.swagger.codegen.v3.generators.java.SpringCodegen", date = "2020-01-28T14:08:55.924Z[GMT]")
@javax.annotation.Generated(value = "io.swagger.codegen.v3.generators.java.SpringCodegen", date = "2020-01-30T02:08:15.864Z[GMT]")
@javax.xml.bind.annotation.XmlRootElement
public class ApiResponseMessage {
public static final int ERROR = 1;
Expand Down
6 changes: 3 additions & 3 deletions src/main/java/io/swagger/api/FoodApi.java
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
import javax.validation.constraints.*;
import java.util.List;
import java.util.Map;
@javax.annotation.Generated(value = "io.swagger.codegen.v3.generators.java.SpringCodegen", date = "2020-01-28T14:08:55.924Z[GMT]")
@javax.annotation.Generated(value = "io.swagger.codegen.v3.generators.java.SpringCodegen", date = "2020-01-30T02:08:15.864Z[GMT]")
@Api(value = "food", description = "the food API")
public interface FoodApi {

Expand Down Expand Up @@ -70,7 +70,7 @@ public interface FoodApi {
ResponseEntity<BrandedFoodObject> foodBrandedSearchPhpGet(@ApiParam(value = "#### Filter the search to only include branded foods that contain a specific allergen. **Example** > ```&allergen=Peanuts``` **Important Note**: This parameter cannot be used alone. It must be paired with at least 1 additional parameter. ") @Valid @RequestParam(value = "allergen", required = false) String allergen,@ApiParam(value = "#### Filter the search to only include branded foods that are owned by a specific brand. **Example** > ```&brand=Starbucks``` ") @Valid @RequestParam(value = "brand", required = false) String brand,@ApiParam(value = "#### Filter the search to only include branded foods from a specific category. **Example** > ```&category=Plant Based Foods``` ") @Valid @RequestParam(value = "category", required = false) String category,@ApiParam(value = "#### Filter the search to only include branded foods that are sold in a specific country. **Example** > ```&country=United States``` **Important Note**: This parameter cannot be used alone. It must be paired with at least 1 additional parameter. ") @Valid @RequestParam(value = "country", required = false) String country,@ApiParam(value = "#### Filter the search to only include branded foods that are considered compatible with a specific diet. **Important Note**: This parameter cannot be used alone. It must be paired with at least 1 additional parameter. ", allowableValues = "Vegan, Vegetarian, Gluten Free") @Valid @RequestParam(value = "diet", required = false) String diet,@ApiParam(value = "#### Filter the search to only include branded foods that contain a specific ingredient. **Example** > ```&ingredient=Salt``` ") @Valid @RequestParam(value = "ingredient", required = false) String ingredient,@ApiParam(value = "#### Filter the search to only include branded foods that are associated with a specific keyword. **Example** > ```&keyword=Organic``` **Important Note**: This parameter cannot be used alone. It must be paired with at least 1 additional parameter. ") @Valid @RequestParam(value = "keyword", required = false) String keyword,@ApiParam(value = "#### Filter the search to only include branded foods that contain a specific mineral. **Example** > ```&mineral=Potassium``` ") @Valid @RequestParam(value = "mineral", required = false) String mineral,@ApiParam(value = "#### Filter the search to only include branded foods that contain a specific nutrient. **Example** > ```&nutrient=Caffeine``` **Important Note**: This parameter cannot be used alone. It must be paired with at least 1 additional parameter. ") @Valid @RequestParam(value = "nutrient", required = false) String nutrient,@ApiParam(value = "#### Filter the search to only include branded foods that contain a specific ingredient made using palm oil. **Example** > ```&palm_oil=E160a Beta Carotene``` ") @Valid @RequestParam(value = "palm_oil", required = false) String palmOil,@ApiParam(value = "### Filter the search to only include branded foods that contain a specific trace ingredient. **Example** > ```&trace=Tree Nuts``` **Important Note**: This parameter cannot be used alone. It must be paired with at least 1 additional parameter. ") @Valid @RequestParam(value = "trace", required = false) String trace,@ApiParam(value = "#### Filter the search to only include branded foods that contain a specific vitamin. **Example** > ```&vitamin=Biotin``` ") @Valid @RequestParam(value = "vitamin", required = false) String vitamin,@ApiParam(value = "#### Set maximum number of records you want the API to return. The default value is \"**10**.\" **Example** > ```&limit=10``` ", allowableValues = "1, 2, 3, 4, 5, 6, 7, 8, 9, 10") @Valid @RequestParam(value = "limit", required = false) Integer limit,@ApiParam(value = "#### This is how you paginate the search result. By default, you will see the first 10 records. You must increment the page number to access the next 10 records, and so on. The default value is \"**1**.\" **Example** > ```&page=1``` ") @Valid @RequestParam(value = "page", required = false) Integer page);


@ApiOperation(value = "Get raw/generic food ingredient item(s)", nickname = "foodIngredientSearchPhpGet", notes = "## Get data for a specific ingredient or a specific set of ingredients. **Example #1: Single Ingredient** > ```https://chompthis.com/api/v2/ingredient/search.php?api_key=API_KEY&find=raw broccoli``` **Example #2: Set of Ingredients** > ```https://chompthis.com/api/v2/ingredient/search.php?api_key=API_KEY&find=raw broccoli,mashed potatoes,raw spinach``` **Tips** * Expose ingredient endpoints by using our **[food lookup tool](https://chompthis.com/api/lookup.php)**. > This API endpoint is only available to Standard and Premium API subscribers. Please consider upgrading your subscription if you are subscribed to the Limited plan. **[Read this](https://desk.zoho.com/portal/chompthis/kb/articles/can-i-upgrade-downgrade-my-subscription)** if you aren't sure how to upgrade your subscription. ", response = IngredientObject.class, authorizations = {
@ApiOperation(value = "Get raw/generic food ingredient item(s)", nickname = "foodIngredientSearchPhpGet", notes = "## Get data for a specific ingredient or a specific set of ingredients. **Example #1: Single Ingredient** > ```https://chompthis.com/api/v2/ingredient/search.php?api_key=API_KEY&find=raw broccoli``` **Example #2: Set of Ingredients** > ```https://chompthis.com/api/v2/ingredient/search.php?api_key=API_KEY&find=raw broccoli,mashed potatoes,chicken drumstick``` **Tips** * Expose ingredient endpoints by using our **[food lookup tool](https://chompthis.com/api/lookup.php)**. > This API endpoint is only available to Standard and Premium API subscribers. Please consider upgrading your subscription if you are subscribed to the Limited plan. **[Read this](https://desk.zoho.com/portal/chompthis/kb/articles/can-i-upgrade-downgrade-my-subscription)** if you aren't sure how to upgrade your subscription. ", response = IngredientObject.class, authorizations = {
@Authorization(value = "ApiKeyAuth") }, tags={ })
@ApiResponses(value = {
@ApiResponse(code = 200, message = "**Valid** - Will return an object containing any matching ingredient foods. ", response = IngredientObject.class),
Expand All @@ -81,6 +81,6 @@ public interface FoodApi {
@RequestMapping(value = "/food/ingredient/search.php",
produces = { "application/json" },
method = RequestMethod.GET)
ResponseEntity<IngredientObject> foodIngredientSearchPhpGet(@NotNull @ApiParam(value = "Search our database for a single ingredient or a specific set of ingredients. **Example #1: Single Ingredient** > ```&find=raw broccoli``` **Example #2: Set of Ingredients** > ```&find=raw broccoli,raw cauliflower,mashed potatoes``` **Important Notes** * Comma-separated lists cannot contain more than **10 ingredients**. You must perform additional API calls if you are looking up more than 10 ingredients. ", required = true) @Valid @RequestParam(value = "find", required = true) String find,@ApiParam(value = "#### Set maximum number of records you want the API to return, per search term. The default value is \"**1**.\" **Example** > ```&limit=3``` ", allowableValues = "1, 2, 3") @Valid @RequestParam(value = "limit", required = false) Integer limit);
ResponseEntity<IngredientObject> foodIngredientSearchPhpGet(@NotNull @ApiParam(value = "Search our database for a single ingredient or a specific set of ingredients. **Example #1: Single Ingredient** > ```&find=raw broccoli``` **Example #2: Set of Ingredients** > ```&find=raw broccoli,buttermilk waffle,mashed potatoes``` **Important Notes** * Comma-separated lists cannot contain more than **10 ingredients**. You must perform additional API calls if you are looking up more than 10 ingredients. ", required = true) @Valid @RequestParam(value = "find", required = true) String find,@ApiParam(value = "#### Set maximum number of records you want the API to return, per search term. The default value is \"**1**.\" **Example** > ```&limit=3``` ", allowableValues = "1, 2, 3") @Valid @RequestParam(value = "limit", required = false) Integer limit);

}
4 changes: 2 additions & 2 deletions src/main/java/io/swagger/api/FoodApiController.java
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
import java.io.IOException;
import java.util.List;
import java.util.Map;
@javax.annotation.Generated(value = "io.swagger.codegen.v3.generators.java.SpringCodegen", date = "2020-01-28T14:08:55.924Z[GMT]")
@javax.annotation.Generated(value = "io.swagger.codegen.v3.generators.java.SpringCodegen", date = "2020-01-30T02:08:15.864Z[GMT]")
@Controller
public class FoodApiController implements FoodApi {

Expand Down Expand Up @@ -80,7 +80,7 @@ public ResponseEntity<BrandedFoodObject> foodBrandedSearchPhpGet(@ApiParam(value
return new ResponseEntity<BrandedFoodObject>(HttpStatus.NOT_IMPLEMENTED);
}

public ResponseEntity<IngredientObject> foodIngredientSearchPhpGet(@NotNull @ApiParam(value = "Search our database for a single ingredient or a specific set of ingredients. **Example #1: Single Ingredient** > ```&find=raw broccoli``` **Example #2: Set of Ingredients** > ```&find=raw broccoli,raw cauliflower,mashed potatoes``` **Important Notes** * Comma-separated lists cannot contain more than **10 ingredients**. You must perform additional API calls if you are looking up more than 10 ingredients. ", required = true) @Valid @RequestParam(value = "find", required = true) String find,@ApiParam(value = "#### Set maximum number of records you want the API to return, per search term. The default value is \"**1**.\" **Example** > ```&limit=3``` ", allowableValues = "1, 2, 3") @Valid @RequestParam(value = "limit", required = false) Integer limit) {
public ResponseEntity<IngredientObject> foodIngredientSearchPhpGet(@NotNull @ApiParam(value = "Search our database for a single ingredient or a specific set of ingredients. **Example #1: Single Ingredient** > ```&find=raw broccoli``` **Example #2: Set of Ingredients** > ```&find=raw broccoli,buttermilk waffle,mashed potatoes``` **Important Notes** * Comma-separated lists cannot contain more than **10 ingredients**. You must perform additional API calls if you are looking up more than 10 ingredients. ", required = true) @Valid @RequestParam(value = "find", required = true) String find,@ApiParam(value = "#### Set maximum number of records you want the API to return, per search term. The default value is \"**1**.\" **Example** > ```&limit=3``` ", allowableValues = "1, 2, 3") @Valid @RequestParam(value = "limit", required = false) Integer limit) {
String accept = request.getHeader("Accept");
if (accept != null && accept.contains("application/json")) {
try {
Expand Down
2 changes: 1 addition & 1 deletion src/main/java/io/swagger/api/NotFoundException.java
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package io.swagger.api;

@javax.annotation.Generated(value = "io.swagger.codegen.v3.generators.java.SpringCodegen", date = "2020-01-28T14:08:55.924Z[GMT]")
@javax.annotation.Generated(value = "io.swagger.codegen.v3.generators.java.SpringCodegen", date = "2020-01-30T02:08:15.864Z[GMT]")
public class NotFoundException extends ApiException {
private int code;
public NotFoundException (int code, String msg) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
import springfox.documentation.spi.DocumentationType;
import springfox.documentation.spring.web.plugins.Docket;

@javax.annotation.Generated(value = "io.swagger.codegen.v3.generators.java.SpringCodegen", date = "2020-01-28T14:08:55.924Z[GMT]")
@javax.annotation.Generated(value = "io.swagger.codegen.v3.generators.java.SpringCodegen", date = "2020-01-30T02:08:15.864Z[GMT]")
@Configuration
public class SwaggerDocumentationConfig {

Expand Down
2 changes: 1 addition & 1 deletion src/main/java/io/swagger/model/BrandedFoodObject.java
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
*/
@ApiModel(description = "Please read the description of each field in this API response object example. By default, the value of each field is **null**. This indicates an unknown state or that no data exists.")
@Validated
@javax.annotation.Generated(value = "io.swagger.codegen.v3.generators.java.SpringCodegen", date = "2020-01-28T14:08:55.924Z[GMT]")
@javax.annotation.Generated(value = "io.swagger.codegen.v3.generators.java.SpringCodegen", date = "2020-01-30T02:08:15.864Z[GMT]")
public class BrandedFoodObject {
@JsonProperty("items")
@Valid
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
*/
@ApiModel(description = "An object containing additional information on the countries where this item is found")
@Validated
@javax.annotation.Generated(value = "io.swagger.codegen.v3.generators.java.SpringCodegen", date = "2020-01-28T14:08:55.924Z[GMT]")
@javax.annotation.Generated(value = "io.swagger.codegen.v3.generators.java.SpringCodegen", date = "2020-01-30T02:08:15.864Z[GMT]")
public class BrandedFoodObjectCountryDetails {
@JsonProperty("english_speaking")
private Integer englishSpeaking = null;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
*/
@ApiModel(description = "An object containing information on an individual ingredient that was flagged as potentially not being compatible with a certain diet")
@Validated
@javax.annotation.Generated(value = "io.swagger.codegen.v3.generators.java.SpringCodegen", date = "2020-01-28T14:08:55.924Z[GMT]")
@javax.annotation.Generated(value = "io.swagger.codegen.v3.generators.java.SpringCodegen", date = "2020-01-30T02:08:15.864Z[GMT]")
public class BrandedFoodObjectDietFlags {
@JsonProperty("ingredient")
private String ingredient = null;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
*/
@ApiModel(description = "An object containing this item's compatibility grades for each supported diet")
@Validated
@javax.annotation.Generated(value = "io.swagger.codegen.v3.generators.java.SpringCodegen", date = "2020-01-28T14:08:55.924Z[GMT]")
@javax.annotation.Generated(value = "io.swagger.codegen.v3.generators.java.SpringCodegen", date = "2020-01-30T02:08:15.864Z[GMT]")
public class BrandedFoodObjectDietLabels {
@JsonProperty("vegan")
private BrandedFoodObjectDietLabelsVegan vegan = null;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
*/
@ApiModel(description = "An object containing information on this item's compatibility with Gluten Free diets")
@Validated
@javax.annotation.Generated(value = "io.swagger.codegen.v3.generators.java.SpringCodegen", date = "2020-01-28T14:08:55.924Z[GMT]")
@javax.annotation.Generated(value = "io.swagger.codegen.v3.generators.java.SpringCodegen", date = "2020-01-30T02:08:15.864Z[GMT]")
public class BrandedFoodObjectDietLabelsGlutenFree {
@JsonProperty("name")
private String name = null;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
*/
@ApiModel(description = "An object containing information on this item's compatibility with the Vegan diets")
@Validated
@javax.annotation.Generated(value = "io.swagger.codegen.v3.generators.java.SpringCodegen", date = "2020-01-28T14:08:55.924Z[GMT]")
@javax.annotation.Generated(value = "io.swagger.codegen.v3.generators.java.SpringCodegen", date = "2020-01-30T02:08:15.864Z[GMT]")
public class BrandedFoodObjectDietLabelsVegan {
@JsonProperty("name")
private String name = null;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
*/
@ApiModel(description = "An object containing information on this item's compatibility with Vegetarian diets")
@Validated
@javax.annotation.Generated(value = "io.swagger.codegen.v3.generators.java.SpringCodegen", date = "2020-01-28T14:08:55.924Z[GMT]")
@javax.annotation.Generated(value = "io.swagger.codegen.v3.generators.java.SpringCodegen", date = "2020-01-30T02:08:15.864Z[GMT]")
public class BrandedFoodObjectDietLabelsVegetarian {
@JsonProperty("name")
private String name = null;
Expand Down
2 changes: 1 addition & 1 deletion src/main/java/io/swagger/model/BrandedFoodObjectItems.java
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
*/
@ApiModel(description = "An object containing information for this specific item.")
@Validated
@javax.annotation.Generated(value = "io.swagger.codegen.v3.generators.java.SpringCodegen", date = "2020-01-28T14:08:55.924Z[GMT]")
@javax.annotation.Generated(value = "io.swagger.codegen.v3.generators.java.SpringCodegen", date = "2020-01-30T02:08:15.864Z[GMT]")
public class BrandedFoodObjectItems {
@JsonProperty("barcode")
private String barcode = null;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
*/
@ApiModel(description = "An object containing information for a specific nutrient found in this food item")
@Validated
@javax.annotation.Generated(value = "io.swagger.codegen.v3.generators.java.SpringCodegen", date = "2020-01-28T14:08:55.924Z[GMT]")
@javax.annotation.Generated(value = "io.swagger.codegen.v3.generators.java.SpringCodegen", date = "2020-01-30T02:08:15.864Z[GMT]")
public class BrandedFoodObjectNutrients {
@JsonProperty("name")
private String name = null;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
*/
@ApiModel(description = "An object containing basic packaging information about this item")
@Validated
@javax.annotation.Generated(value = "io.swagger.codegen.v3.generators.java.SpringCodegen", date = "2020-01-28T14:08:55.924Z[GMT]")
@javax.annotation.Generated(value = "io.swagger.codegen.v3.generators.java.SpringCodegen", date = "2020-01-30T02:08:15.864Z[GMT]")
public class BrandedFoodObjectPackage {
@JsonProperty("quantity")
private Integer quantity = null;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
*/
@ApiModel(description = "A object containing a collection of photos of this item's packaging")
@Validated
@javax.annotation.Generated(value = "io.swagger.codegen.v3.generators.java.SpringCodegen", date = "2020-01-28T14:08:55.924Z[GMT]")
@javax.annotation.Generated(value = "io.swagger.codegen.v3.generators.java.SpringCodegen", date = "2020-01-30T02:08:15.864Z[GMT]")
public class BrandedFoodObjectPackagingPhotos {
@JsonProperty("front")
private BrandedFoodObjectPackagingPhotosFront front = null;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
*/
@ApiModel(description = "An object containing photos of the front of this item's packaging")
@Validated
@javax.annotation.Generated(value = "io.swagger.codegen.v3.generators.java.SpringCodegen", date = "2020-01-28T14:08:55.924Z[GMT]")
@javax.annotation.Generated(value = "io.swagger.codegen.v3.generators.java.SpringCodegen", date = "2020-01-30T02:08:15.864Z[GMT]")
public class BrandedFoodObjectPackagingPhotosFront {
@JsonProperty("small")
private String small = null;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
*/
@ApiModel(description = "An object containing photos of the ingredients on this item's packaging")
@Validated
@javax.annotation.Generated(value = "io.swagger.codegen.v3.generators.java.SpringCodegen", date = "2020-01-28T14:08:55.924Z[GMT]")
@javax.annotation.Generated(value = "io.swagger.codegen.v3.generators.java.SpringCodegen", date = "2020-01-30T02:08:15.864Z[GMT]")
public class BrandedFoodObjectPackagingPhotosIngredients {
@JsonProperty("small")
private String small = null;
Expand Down
Loading

0 comments on commit 795f2fd

Please sign in to comment.