diff --git a/dev-portal/src/pages/Admin/ApiManagement.jsx b/dev-portal/src/pages/Admin/ApiManagement.jsx index e65986ad9..b931b8036 100644 --- a/dev-portal/src/pages/Admin/ApiManagement.jsx +++ b/dev-portal/src/pages/Admin/ApiManagement.jsx @@ -97,7 +97,7 @@ export const ApiManagement = observer(class ApiManagement extends React.Componen const reader = new window.FileReader() reader.onload = (e) => { - if (file.name.includes('yaml')) { + if (file.name.endsWith('.yaml') || file.name.endsWith('.yml')) { swaggerObject = YAML.parse(e.target.result) swagger = JSON.stringify(swaggerObject) } else {