From 4603b7f004edc68e016ff5d05f5503562a7bf78e Mon Sep 17 00:00:00 2001 From: Caroline Russell Date: Sat, 13 Jan 2024 22:42:10 -0500 Subject: [PATCH] Sort paths in output. --- atom_tools/lib/converter.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/atom_tools/lib/converter.py b/atom_tools/lib/converter.py index 2c59361..7adc563 100644 --- a/atom_tools/lib/converter.py +++ b/atom_tools/lib/converter.py @@ -101,11 +101,12 @@ def convert_usages(self): """ Converts usages to OpenAPI. """ - endpoints = self.usages.generate_endpoints() + endpoints = sorted(set(self.usages.generate_endpoints())) + paths_obj = {endpoint: {} for endpoint in endpoints} return { 'openapi': self.openapi_version, 'info': {'title': 'Atom Usages', 'version': '1.0.0'}, - 'paths': {endpoint: {} for endpoint in endpoints} + 'paths': paths_obj } def convert_reachables(self):