Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[CIRC-1932] Implement search-slips endpoint skeleton #1358

Merged
merged 7 commits into from
Oct 31, 2023
Merged

Conversation

roman-barannyk
Copy link
Contributor

Purpose

Create a new (dummy) endpoint:

GET /circulation/search-slips/{servicePointId} that should return an empty result:

{
"searchSlips" : [ ],
"totalRecords" : 0
}

Resolves: CIRC-1932

Approach

  • implement endpoint;
  • cover it by API tests;

import io.vertx.ext.web.RoutingContext;

public class SearchSlipsResource extends SlipsResource {
private static final String SEARCH_SLIPS_KEY = "searchSlips";
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This collection name can be an instance variable injected via constructor

version: v0.3
protocols: [ HTTP, HTTPS ]
baseUri: http://localhost:9130

documentation:
- title: API for fetching current pick slips
content: <b>API for pick slips generation</b>
- title: API for fetching current pick and search slips
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Collectively they are called "staff slips"

import io.vertx.core.json.JsonObject;

class SearchSlipsTests extends APITests {
private static final String TOTAL_RECORDS = "totalRecords";
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
private static final String TOTAL_RECORDS = "totalRecords";
private static final String TOTAL_RECORDS_KEY = "totalRecords";

Copy link

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

96.6% 96.6% Coverage
0.0% 0.0% Duplication

@roman-barannyk roman-barannyk merged commit 74cbf0f into master Oct 31, 2023
@roman-barannyk roman-barannyk deleted the CIRC-1932 branch October 31, 2023 18:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants