Orchid Swagger

components official

About

The OrchidSwagger makes it convenient to embed the Swagger UI in your documentation site.

Demo

Usage

The OrchidSwagger plugin allows you to add the swagger component to any page. This will include the Swagger UI Javascript and CSS necessary to use the Swagger UI, you just need to supply the component with the URL of your OpenAPI JSON definition. Note that, since the Swagger UI fetches the openApiSource in the browser, the URL given must not be blocked by CORS.

// pages/api.md
---
components:
  - type: 'swaggerUi'
    openApiSource: 'https://petstore.swagger.io/v2/swagger.json'
---
Include with:
dependencies {
    orchidRuntime 'io.github.javaeden.orchid:OrchidSwagger:0.17.1'
}
<dependency>
    <groupId>io.github.javaeden.orchid</groupId>
    <artifactId>OrchidSwagger</artifactId>
    <version>0.17.1</version>
    <type>pom</type>
</dependency>
@file:DependsOn("io.github.javaeden.orchid:OrchidSwagger:0.17.1")