diff --git a/api/client-server/application_service.yaml b/api/application-service/application_service.yaml similarity index 99% rename from api/client-server/application_service.yaml rename to api/application-service/application_service.yaml index 1a5ec838..3fd864d2 100644 --- a/api/client-server/application_service.yaml +++ b/api/application-service/application_service.yaml @@ -198,4 +198,3 @@ paths: } schema: type: object - diff --git a/templating/matrix_templates/units.py b/templating/matrix_templates/units.py index feae0aae..e4caa54c 100644 --- a/templating/matrix_templates/units.py +++ b/templating/matrix_templates/units.py @@ -17,7 +17,7 @@ import subprocess import urllib import yaml -HTTP_APIS = "../api/client-server" +HTTP_APIS = ("../api/application-service", "../api/client-server",) EVENT_EXAMPLES = "../event-schemas/examples" EVENT_SCHEMA = "../event-schemas/schema" CORE_EVENT_SCHEMA = "../event-schemas/schema/core-event-schema" @@ -549,20 +549,20 @@ class MatrixUnits(Units): def load_swagger_apis(self): apis = {} - path = HTTP_APIS - for filename in os.listdir(path): - if not filename.endswith(".yaml"): - continue - self.log("Reading swagger API: %s" % filename) - filepath = os.path.join(path, filename) - with open(filepath, "r") as f: - # strip .yaml - group_name = filename[:-5].replace("-", "_") - api = yaml.load(f.read()) - api["__meta"] = self._load_swagger_meta( - filepath, api, group_name - ) - apis[group_name] = api + for path in HTTP_APIS: + for filename in os.listdir(path): + if not filename.endswith(".yaml"): + continue + self.log("Reading swagger API: %s" % filename) + filepath = os.path.join(path, filename) + with open(filepath, "r") as f: + # strip .yaml + group_name = filename[:-5].replace("-", "_") + api = yaml.load(f.read()) + api["__meta"] = self._load_swagger_meta( + filepath, api, group_name + ) + apis[group_name] = api return apis def load_common_event_fields(self):