We’re pleased to announce that the newly released Oracle Cloud Infrastructure (OCI) Code Editor enables API developers to create, edit, and get instant live previews (powered by Redocly) of API descriptions written in OpenAPI 2.x or 3.x. With Cloud Editor, developers can share and collaborate on API specifications seamlessly alongside the rest of their code projects.
OCI Code Editor provides a rich, in-console editing environment that enables you to edit code and update service workflows and scripts without switching between the Oracle Cloud Console and your local development environment. Code Editor provides a convenient way to perform common code updates for various services, such as creating and deploying Functions, editing Terraform configurations used with Resource Manager stacks, or creating and editing an API.
Code Editor includes the following features:
Create and edit code files in 15 languages, including Java, Python, Docker, JSON, YAML, and Terraform.
Out-of-the-box managed plugins for OCI services enable a seamless code editing experience
Persists state across user sessions
Direct access to Cloud Shell and its 30+ cloud-based tools
Workspace and user management
Personalized user experience through multiple color themes, language localization, customizable keyboard shortcuts, customizable screen layouts, and more
Use the following steps to get started with using Code Editor to define APIs:
From the Oracle Cloud Console, launch the Code Editor.
For API definition, you have the following options:
Create a new file from scratch by navigating to the File menu.
Write the API specification, and save it back to the home directory. Alternatively, you can close the Code Editor and reopen it to confirm file changes.
Clone a remote Git repository. Open the command palette with F1, ⇧⌘P, or CTRL⇧P, type and select Git Clone, and paste the Git repository’s URL.
You can make edits to the code. Observe auto-completion and syntax highlighting. Log out and log back in to pick up where you left off. The Code Editor preserves file states across sessions.
To preview your API specification, use the command palette and type OpenAPI: View.
A new tab opens, showing a preview of your API reference docs generated from your API’s definition.
If you want to deploy your API, use the command line interface (CLI) to create a new API resource and then use the console to create an API Deployment from an API Resource.
For details on Cloud Shell for API specifications, refer to Using the CLI section in Creating an API Resource with an API Description and Using the Console to Create an API Deployment from an API Resource section in Deploying an API on an API Gateway User Guide.
OCI API Gateway service allows API developers to deploy and manage their own APIs. As part of the service, you can also store and view API definition files. With OCI Code Editor, API developers can now connect their code repository and generate a preview of an API documentation using Redoc by Redocly without having to switch between the Console and their local development environment.
We look forward to hearing your feedback.
Learn more about building APIs and generating software developer kits through the following resources: