Skip to content

GitLab

  • Projects
  • Groups
  • Snippets
  • Help
    • Loading...
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in
Genesys Backend
Genesys Backend
  • Project overview
    • Project overview
    • Details
    • Activity
    • Releases
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 19
    • Issues 19
    • List
    • Boards
    • Labels
    • Service Desk
    • Milestones
  • Operations
    • Operations
    • Incidents
  • Packages & Registries
    • Packages & Registries
    • Container Registry
  • Analytics
    • Analytics
    • Repository
    • Value Stream
  • Wiki
    • Wiki
  • Members
    • Members
  • Collapse sidebar
  • Activity
  • Graph
  • Create a new issue
  • Commits
  • Issue Boards
  • Genesys PGR
  • Genesys BackendGenesys Backend
  • Issues
  • #350

Closed
Open
Opened Sep 28, 2018 by Matija Obreza@mobrezaOwner

Crops API v1

https://genesys.demo.genesys-pgr.org/c and https://genesys.demo.genesys-pgr.org/c/barley now provide basic crop information.

The crop BrowsePage needs to be updated to display more information (see https://www.genesys-pgr.org/c/banana as example).

Create CropsController in org.genesys2.server.api.v1 based on existing v0 controller.

Crop details API response

Add a new endpoint to the crop API /{shortName}/details response to include:

  • the crop blurb (in language selected in React)
  • number of active accessions
  • crop image gallery information (see below)
  • overview data from ES

For each crop, the file repository will contain an image gallery in /crop/{shortName}/cover. In the API response, include a list of repository images that can be used as the picture in https://material-ui.com/demos/cards/#media.

Add a CropDetails class to CropsController:

public static class CropDetails {
 public Crop crop;
 public Article blurb;
 public long accessionCount;
 public List<RepositoryImage> covers;
 public Map<String, ElasticsearchService.TermResult> overview;
}

Note: Serialize only the minimum required information for covers (JsonViews.Minimal.class ?).

Edited Oct 01, 2018 by Matija Obreza
Assignee
Assign to
2.4
Milestone
2.4 (Past due)
Assign milestone
Time tracking
None
Due date
None
Reference: genesys-pgr/genesys-server#350