Skip to content

Commit

Permalink
Align documentation with new API
Browse files Browse the repository at this point in the history
  • Loading branch information
jjrom committed Jun 12, 2024
1 parent 4586728 commit 0fdab1d
Show file tree
Hide file tree
Showing 5 changed files with 4,482 additions and 4,711 deletions.
75 changes: 1 addition & 74 deletions app/resto/core/RestoCollection.php
Original file line number Diff line number Diff line change
Expand Up @@ -692,80 +692,7 @@ class RestoCollection
public $osDescription = null;

/**
* Statistics
*
* @OA\Schema(
* schema="Statistics",
* description="Collection statistics",
* required={"count", "facets"},
* @OA\Property(
* property="count",
* type="integer",
* description="Total number of features in the collection"
* ),
* @OA\Property(
* property="facets",
* description="Statistics per facets",
* @OA\JsonContent(
* @OA\Property(
* property="continent",
* type="array",
* description="Number of features in the collection per continent"
* ),
* @OA\Property(
* property="instrument",
* type="array",
* description="Number of features in the collection per instrument"
* ),
* @OA\Property(
* property="platform",
* type="array",
* description="Number of features in the collection per platform"
* ),
* @OA\Property(
* property="processingLevel",
* type="array",
* description="Number of features in the collection per processing level"
* ),
* @OA\Property(
* property="productType",
* type="array",
* description="Number of features in the collection per product Type"
* )
* )
* ),
* example={
* "count": 5322724,
* "facets": {
* "continent": {
* "Africa": 671538,
* "Antarctica": 106337,
* "Asia": 747847,
* "Europe": 1992756,
* "North America": 1012027,
* "Oceania": 218789,
* "Seven seas (open ocean)": 9481,
* "South America": 313983
* },
* "instrument": {
* "HRS": 2,
* "MSI": 5322722
* },
* "platform": {
* "S2A": 3346319,
* "S2B": 1976403,
* "SPOT6": 1
* },
* "processingLevel": {
* "LEVEL1C": 5322722
* },
* "productType": {
* "PX": 2,
* "REFLECTANCE": 5322722
* }
* }
* }
* )
* Summaries
*/
private $summaries = null;

Expand Down
6 changes: 3 additions & 3 deletions app/resto/core/addons/Cataloger.php
Original file line number Diff line number Diff line change
Expand Up @@ -420,7 +420,7 @@ private function catalogsFromProperties($properties, $collection)
*/
$model = isset($collection) ? $collection->model : new DefaultModel();
foreach (array_values($model->facetCategories) as $facetCategory) {
$catalogs = array_merge($catalogs, $this->catalogsFromFacets($properties, $facetCategory, $model));
$catalogs = array_merge($catalogs, $this->catalogsFromFacetCategory($properties, $facetCategory, $model));
}

/*
Expand All @@ -438,14 +438,14 @@ private function catalogsFromProperties($properties, $collection)
}

/**
* Process catalogs for facets
* Process catalogs from facet category
*
* @param array $properties
* @param array $facetCategory
* @param RestoModel $model
* @return array
*/
private function catalogsFromFacets($properties, $facetCategory, $model)
private function catalogsFromFacetCategory($properties, $facetCategory, $model)
{
$parentId = null;
$catalogs = array();
Expand Down
21 changes: 0 additions & 21 deletions app/resto/core/api/CollectionsAPI.php
Original file line number Diff line number Diff line change
Expand Up @@ -72,17 +72,6 @@ public function __construct($context, $user)
* )
* ),
* @OA\Property(
* property="summaries",
* type="object",
* @OA\JsonContent(
* @OA\Property(
* property="resto:stats",
* type="object",
* ref="#/components/schemas/Statistics"
* )
* )
* ),
* @OA\Property(
* property="collections",
* description="List of available collections",
* type="array",
Expand Down Expand Up @@ -113,16 +102,6 @@ public function __construct($context, $user)
* "trs": "http://www.opengis.net/def/uom/ISO-8601/0/Gregorian"
* }
* },
* "summaries": {
* "resto:stats": {
* "count": 11310,
* "facets": {
* "collection": {
* "L8": 11307
* }
* }
* }
* },
* "resto:info": {
* "osDescription": {
* "ShortName": "resto",
Expand Down
Loading

0 comments on commit 0fdab1d

Please sign in to comment.