Commit d24d7dc4 authored by Alexander Lercher's avatar Alexander Lercher

Reverted small changes to make swagger work again

parent 567d499c
......@@ -9,7 +9,7 @@ consumes:
produces:
- "application/json"
# basePath: "/api"
basePath: "/api"
paths:
/debug:
......@@ -173,7 +173,7 @@ paths:
summary: "Insert locations from AGI, create clusters for starting time and location layers, create graphs for the location clusters"
parameters: []
responses:
200:
204:
description: "Successful operation"
#endregion
......@@ -412,8 +412,3 @@ definitions:
type: string
example: "2020-07-02 14:19:51.651764"
\ No newline at end of file
# Added by API Auto Mocking Plugin
host: virtserver.swaggerhub.com
basePath: /NumeDeOrganizatie/Smart/1.0.0
schemes:
- https
\ No newline at end of file
from db.entities.location import Location
from db.entities.popular_location import PopularLocation
from db.entities.cluster import Cluster
from db.entities.clusterset import ClusterSet
from db.entities.user_cluster_graph import UserClusterGraph
from db.entities.layer import Layer
from db.entities.timeslice import TimeSlice
\ No newline at end of file
......@@ -3,11 +3,8 @@ import network_constants as netconst
from database.MongoRepositoryBase import MongoRepositoryBase
import json
from db.entities.layer import *
from db.entities.cluster import *
from db.entities.timeslice import *
from db.entities import *
from processing.similarityFiles.miscFunctions import *
# from processing.similarityFiles.miscFunctions import *
from typing import List
......@@ -96,14 +93,15 @@ class Repository(MongoRepositoryBase):
def get_connected_clusters(self, run_id=None):#, layer_name: str):
''' Get Connected Clusters Data from DB '''
if (run_id == None):
entries = super().get_entries(self._connected_clusters_collection) #, projection={'Price_Layer': 1})
entries = super().get_entries(self._connected_clusters_collection, projection={'_id': 0})
else:
entries = super().get_entries(self._similarity_collection, selection={'cluster_runId' : run_id})
entries = super().get_entries(self._similarity_collection, selection={'cluster_runId' : run_id}, projection={'_id': 0})
output = []
for ent in entries:
output.append(ent)
return output
# print(ent)
#return [Cluster(cluster_dict=e, from_db=True) for e in entries]
#endregion
......@@ -123,7 +121,7 @@ class Repository(MongoRepositoryBase):
if (run_id == None):
entries = super().get_entries(self._similarity_collection, projection={'_id': 0})
else:
entries = super().get_entries(self._similarity_collection, selection={'runId' : run_id})
entries = super().get_entries(self._similarity_collection, selection={'runId' : run_id}, projection={'_id': 0})
output = []
for e in entries:
......
from db.entities.connected_node import NodeC
from db.entities.connected_cluster import ClusterC
from db.entities.connected_layer import LayerC
from typing import Dict
#from db.repository import Repository
import json
import requests
from routes.clustersets import get_by_nametest.py
from db import repository
from flask import request, Response
from db.repository import Repository
from db.entities import clusterset
from db.entities import ClusterSet
repo = Repository()
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment