OpenAPI Viewer
The KoalaOps OpenAPI Viewer facilitates interaction with services that adhere to the OpenAPI specification. It enables users to explore available APIs, execute API calls directly through a user-friendly interface, and interact with services across different environments seamlessly.
Introduction to OpenAPI
OpenAPI (formerly known as Swagger) is an industry-standard specification for defining HTTP APIs. It offers a comprehensive and standardized way to describe API structures, making it easier for developers to understand and integrate external services. The OpenAPI specification supports both JSON and YAML formats and can be used to generate client libraries, server stubs, and API documentation. Embracing OpenAPI can significantly streamline API development and integration processes, fostering a more interoperable web.
Features
- Environment Selection: Easily choose the appropriate environment to view and interact with.
- Authentication: Authenticate with the API when necessary to ensure secure access to endpoints.
- API Interaction: Engage with all exposed API endpoints, allowing for comprehensive testing and exploration.
Configuration
In order to use the OpenAPI Viewer in KoalaOps, you need to make sure your service’s OpenAPI spec is available in one of two ways:
-
In a file in your codebase.
-
Served live by your service. Many common server frameworks support this out of the box, typically at
/openapi.json
or a similar path.
KoalaOps Integration: If the OpenAPI endpoint or filepath were not automatically detected, you can specify the path manually in .koala.toml
file at the service’s root. Use either the SpecPath
or QueryPath
params, for example:
[OpenAPIConfig]
SpecPath = "api/openapi.yaml"
CodegenTool = "openapi-generator"
Clients = ["go", "javascript"]
QueryPath = "/openapi"