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: ...@@ -9,7 +9,7 @@ consumes:
produces: produces:
- "application/json" - "application/json"
# basePath: "/api" basePath: "/api"
paths: paths:
/debug: /debug:
...@@ -173,7 +173,7 @@ paths: ...@@ -173,7 +173,7 @@ paths:
summary: "Insert locations from AGI, create clusters for starting time and location layers, create graphs for the location clusters" summary: "Insert locations from AGI, create clusters for starting time and location layers, create graphs for the location clusters"
parameters: [] parameters: []
responses: responses:
200: 204:
description: "Successful operation" description: "Successful operation"
#endregion #endregion
...@@ -411,9 +411,4 @@ definitions: ...@@ -411,9 +411,4 @@ definitions:
Datetime: Datetime:
type: string type: string
example: "2020-07-02 14:19:51.651764" example: "2020-07-02 14:19:51.651764"
# Added by API Auto Mocking Plugin \ No newline at end of file
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 ...@@ -3,11 +3,8 @@ import network_constants as netconst
from database.MongoRepositoryBase import MongoRepositoryBase from database.MongoRepositoryBase import MongoRepositoryBase
import json import json
from db.entities.layer import *
from db.entities.cluster import *
from db.entities.timeslice import *
from db.entities import * from db.entities import *
from processing.similarityFiles.miscFunctions import * # from processing.similarityFiles.miscFunctions import *
from typing import List from typing import List
...@@ -96,14 +93,15 @@ class Repository(MongoRepositoryBase): ...@@ -96,14 +93,15 @@ class Repository(MongoRepositoryBase):
def get_connected_clusters(self, run_id=None):#, layer_name: str): def get_connected_clusters(self, run_id=None):#, layer_name: str):
''' Get Connected Clusters Data from DB ''' ''' Get Connected Clusters Data from DB '''
if (run_id == None): 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: 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 = [] output = []
for ent in entries: for ent in entries:
output.append(ent) output.append(ent)
return output return output
# print(ent)
#return [Cluster(cluster_dict=e, from_db=True) for e in entries] #return [Cluster(cluster_dict=e, from_db=True) for e in entries]
#endregion #endregion
...@@ -123,7 +121,7 @@ class Repository(MongoRepositoryBase): ...@@ -123,7 +121,7 @@ class Repository(MongoRepositoryBase):
if (run_id == None): if (run_id == None):
entries = super().get_entries(self._similarity_collection, projection={'_id': 0}) entries = super().get_entries(self._similarity_collection, projection={'_id': 0})
else: 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 = [] output = []
for e in entries: 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 flask import request, Response
from db.repository import Repository from db.repository import Repository
from db.entities import clusterset from db.entities import ClusterSet
repo = Repository() 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