diff --git a/src/main/java/org/openapitools/api/StoreApiDelegateImpl.java b/src/main/java/org/openapitools/api/StoreApiDelegateImpl.java index 029a16c..6117ca1 100644 --- a/src/main/java/org/openapitools/api/StoreApiDelegateImpl.java +++ b/src/main/java/org/openapitools/api/StoreApiDelegateImpl.java @@ -46,8 +46,8 @@ void initOrders() { @Override - public ResponseEntity deleteOrder(String orderId) { - Order order = orderRepository.findById(Long.valueOf(orderId)) + public ResponseEntity deleteOrder(Long orderId) { + Order order = orderRepository.findById(orderId) .orElseThrow(() -> new ResponseStatusException(HttpStatus.NOT_FOUND)); orderRepository.delete(order); return ResponseEntity.ok().build(); diff --git a/src/main/resources/openapi.yaml b/src/main/resources/openapi.yaml index f9d7b26..6ca5897 100644 --- a/src/main/resources/openapi.yaml +++ b/src/main/resources/openapi.yaml @@ -382,7 +382,8 @@ paths: style: simple explode: false schema: - type: string + type: integer + format: int64 responses: 400: description: Invalid ID supplied @@ -598,6 +599,8 @@ components: Order: title: Pet Order type: object + required: + - id properties: id: type: integer @@ -649,6 +652,9 @@ components: User: title: a User type: object + required: + - id + - username properties: id: type: integer