The current system only allows users to upload OpenAPI spec files in YAML format. However, users may have OpenAPI specs in JSON format and currently have to manually convert them to YAML before uploading. This process is inconvenient and time-consuming. To enhance user experience and efficiency, the system needs to be updated to support both JSON and YAML file uploads and also enable users to specify a URL to download the OpenAPI spec directly.
Expected Behavior:
The feature should add a new tab on the platform's interface, specifically for OpenAPI spec uploads. Users should be able to choose between uploading JSON or YAML files. If a JSON file is uploaded, the system should automatically convert it to YAML format before processing. Additionally, users should have the option to provide a URL that the system can use to directly fetch the OpenAPI spec and convert it to YAML.
Tasks:
To implement the feature, the following tasks need to be completed:
[x] Create a new tab on the platform's interface for OpenAPI spec uploads.
[x] Implement functionality to accept JSON files and convert them to YAML format.
[x] Integrate a URL input field, allowing users to provide a link to the OpenAPI spec.
[x] Implement a mechanism to download the spec from the provided URL and convert it to YAML.
[x] Handle errors, such as incorrect file formats, invalid URLs, or conversion failures, providing appropriate user feedback.
[ ] Test the entire feature thoroughly to ensure its functionality and usability.
Problem Statement:
The current system only allows users to upload OpenAPI spec files in YAML format. However, users may have OpenAPI specs in JSON format and currently have to manually convert them to YAML before uploading. This process is inconvenient and time-consuming. To enhance user experience and efficiency, the system needs to be updated to support both JSON and YAML file uploads and also enable users to specify a URL to download the OpenAPI spec directly.
Expected Behavior:
The feature should add a new tab on the platform's interface, specifically for OpenAPI spec uploads. Users should be able to choose between uploading JSON or YAML files. If a JSON file is uploaded, the system should automatically convert it to YAML format before processing. Additionally, users should have the option to provide a URL that the system can use to directly fetch the OpenAPI spec and convert it to YAML.
Tasks:
To implement the feature, the following tasks need to be completed: