All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.springdoc.sample2.InventoryApiController Maven / Gradle / Ivy

There is a newer version: 3.1.2
Show newest version
package org.springdoc.sample2;

import java.util.List;

import javax.servlet.http.HttpServletRequest;
import javax.validation.Valid;
import javax.validation.constraints.Max;
import javax.validation.constraints.Min;

import org.springframework.http.HttpStatus;
import org.springframework.http.ResponseEntity;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

import com.fasterxml.jackson.databind.ObjectMapper;

import io.swagger.v3.oas.annotations.Parameter;
@javax.annotation.Generated(value = "io.swagger.codegen.v3.generators.java.SpringCodegen", date = "2019-07-08T09:37:36.546Z[GMT]")
@RestController
public class InventoryApiController implements InventoryApi {


	@SuppressWarnings("unused")
	private final ObjectMapper objectMapper;

    private final HttpServletRequest request;

    @org.springframework.beans.factory.annotation.Autowired
    public InventoryApiController(ObjectMapper objectMapper, HttpServletRequest request) {
        this.objectMapper = objectMapper;
        this.request = request;
    }

	public ResponseEntity addInventory(
			@Parameter(name = "Inventory item to add") @Valid @RequestBody InventoryItem body) {
		@SuppressWarnings("unused")
		String accept = request.getHeader("Accept");
        return new ResponseEntity(HttpStatus.NOT_IMPLEMENTED);
    }

	public ResponseEntity> searchInventory(
			@Parameter(name = "pass an optional search string for looking up inventory") @Valid @RequestParam(value = "searchString", required = false) String searchString,
			@Min(0) @Parameter(name = "number of records to skip for pagination") @Valid @RequestParam(value = "skip", required = true) Integer skip,
			@Min(0) @Max(50) @Parameter(name = "maximum number of records to return") @Valid @RequestParam(value = "limit", required = true) Integer limit) {
		@SuppressWarnings("unused")
		String accept = request.getHeader("Accept");
        return new ResponseEntity>(HttpStatus.NOT_IMPLEMENTED);
    }

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy