-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
MODTLR-17 Create service points client
- Loading branch information
1 parent
65893ef
commit 47b9621
Showing
4 changed files
with
133 additions
and
0 deletions.
There are no files selected for viewing
19 changes: 19 additions & 0 deletions
19
src/main/java/org/folio/client/feign/ServicePointsClient.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
package org.folio.client.feign; | ||
|
||
import org.folio.domain.dto.ServicePoint; | ||
import org.folio.spring.config.FeignClientConfiguration; | ||
import org.springframework.cloud.openfeign.FeignClient; | ||
import org.springframework.web.bind.annotation.GetMapping; | ||
import org.springframework.web.bind.annotation.PathVariable; | ||
import org.springframework.web.bind.annotation.PostMapping; | ||
import org.springframework.web.bind.annotation.RequestBody; | ||
|
||
@FeignClient(name = "service-points", url = "service-points", configuration = FeignClientConfiguration.class) | ||
public interface ServicePointsClient { | ||
|
||
@PostMapping | ||
ServicePoint postServicePoint(@RequestBody ServicePoint servicePoint); | ||
|
||
@GetMapping("/{id}") | ||
ServicePoint getServicePoint(@PathVariable String id); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,85 @@ | ||
{ | ||
"$schema": "http://json-schema.org/draft-04/schema#", | ||
"description": "A service point", | ||
"type": "object", | ||
"properties": { | ||
"id": { | ||
"type": "string", | ||
"description": "Id of service-point object" | ||
}, | ||
"name": { | ||
"type": "string", | ||
"description" : "service-point name, a required field" | ||
}, | ||
"code": { | ||
"type": "string", | ||
"description" : "service-point code, a required field" | ||
}, | ||
"discoveryDisplayName": { | ||
"type": "string", | ||
"description": "display name, a required field" | ||
}, | ||
"description": { | ||
"type": "string", | ||
"description" : "description of the service-point" | ||
}, | ||
"shelvingLagTime": { | ||
"type": "integer", | ||
"description": "shelving lag time" | ||
}, | ||
"pickupLocation": { | ||
"type": "boolean", | ||
"description": "indicates whether or not the service point is a pickup location" | ||
}, | ||
"holdShelfExpiryPeriod" :{ | ||
"type": "object", | ||
"$ref": "time-period.json", | ||
"description": "expiration period for items on the hold shelf at the service point" | ||
}, | ||
"holdShelfClosedLibraryDateManagement": { | ||
"type": "string", | ||
"description": "enum for closedLibraryDateManagement associated with hold shelf", | ||
"enum":[ | ||
"Keep_the_current_due_date", | ||
"Move_to_the_end_of_the_previous_open_day", | ||
"Move_to_the_end_of_the_next_open_day", | ||
"Keep_the_current_due_date_time", | ||
"Move_to_end_of_current_service_point_hours", | ||
"Move_to_beginning_of_next_open_service_point_hours" | ||
], | ||
"default" : "Keep_the_current_due_date" | ||
}, | ||
"staffSlips": { | ||
"type": "array", | ||
"description": "List of staff slips for this service point", | ||
"items": { | ||
"type": "object", | ||
"properties": { | ||
"id": { | ||
"type": "string", | ||
"pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-5][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$", | ||
"description": "The ID of the staff slip" | ||
}, | ||
"printByDefault": { | ||
"type": "boolean", | ||
"description": "Whether or not to print the staff slip by default" | ||
} | ||
}, | ||
"required": [ | ||
"id", | ||
"printByDefault" | ||
] | ||
} | ||
}, | ||
"metadata": { | ||
"type": "object", | ||
"$ref": "metadata.json", | ||
"readonly": true | ||
} | ||
}, | ||
"required": [ | ||
"name", | ||
"code", | ||
"discoveryDisplayName" | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
{ | ||
"$schema": "http://json-schema.org/draft-04/schema#", | ||
"type": "object", | ||
"description" : "schema for time-period, which contains time interval 'duration' and the time unit", | ||
"properties": { | ||
"duration": { | ||
"type": "integer", | ||
"description": "Duration interval" | ||
}, | ||
"intervalId": { | ||
"type": "string", | ||
"description": "Unit of time for the duration", | ||
"enum":[ | ||
"Minutes", | ||
"Hours", | ||
"Days", | ||
"Weeks", | ||
"Months" | ||
], | ||
"default" : "Days" | ||
} | ||
}, | ||
"required": [ | ||
"duration", | ||
"intervalId" | ||
] | ||
} |