Commit 3068f86d authored by Afonso Castanheta's avatar Afonso Castanheta
Browse files

fix: filter non- HTTP path-item keys in aefProfiles building

parent 1e514c22
Loading
Loading
Loading
Loading
Loading
+3 −0
Original line number Diff line number Diff line
@@ -164,10 +164,13 @@ class api_schema_translator:
    def __build_aef_profiles(self, ip, port, api_version, fqdn=None, ipv6Addr=None, ):
        """Builds the aefProfiles section based on the paths and components in the API info."""
        aef_profiles = []
        http_methods = {"get", "put", "post", "delete", "options", "head", "patch", "trace"}

        resources = []
        for path, methods in self.api_info.get("paths", {}).items():
            for method, details in methods.items():
                if method.lower() not in http_methods:
                    continue
                resource = {
                    "resourceName": details.get("summary", "Unnamed Resource"),
                    "commType": "REQUEST_RESPONSE",