The yaml file added to the App must have the required OpenAPI fields otherwise the adding OpenAPI spec will fail. Please refer to OpenAPI Spec Doc
Data types
🙌 OpenAPI
To add any OpenAPI spec yaml file (currently the json file will be detected as JSON data type), use the data_type as ‘openapi’. ‘openapi’ allows remote urls and conventional file paths.