DataSpace-Mobility / data-standard-registry-doc

https://standards.dataspace.mobi
1 stars 2 forks source link

create API endpoint for searching the standards #19

Open upperwal opened 3 years ago

upperwal commented 3 years ago

API Endpoint name: /searchStandards

groverHarshit commented 3 years ago

Working on it

upperwal commented 3 years ago

See if you can create an aggregated query to search in the following fields:

{
  "tags": ["atcs", "public-transit"],
  "info": {
    "name": "Adaptive Traffic Control Specifications - Static",
    "shortName": "atcs_static",
    "description": "Some long description",
    "category": {
      "name": "Transit",
      "subcategory": "Traffic Signal"
    }
  }
}
groverHarshit commented 3 years ago

Can you explain this? I'm not getting this point.

upperwal commented 3 years ago

Check out the home page: standards.dataspace.mobi

It has a search bar on the left. The value in that input will be sent to an API endpoint which will then match it with tags, info.name, info.shortName, info.description, info.category.name and info.category.subcategory. There might be more than one match. The response would look like:

[
  {
    "uuid": "",
    "tags": [],
    "info": {
      "name": "Adaptive Traffic Control Specifications - Static",
      "shortName": "atcs_static",
      "description": "Some long description",
      "category": {
        "name": "Transit",
        "subcategory": "Traffic Signal"
      }
    }
  }
]

This response will be used to create a page with all the search results.