Build and deploy beautiful, organic, modular documentation sites

Build and deploy beautiful, organic, modular documentation sites

OrchidSwagger

OrchidSwagger



from: docs.plugin_index description: Embed the Swagger UI within any Orchid page. images:

  • src: https://res.cloudinary.com/orchid/image/upload/c_scale,w_300,e_blur:150/v1524973700/plugins/swagger.jpg alt: Swagger caption: Screenshot of Swagger UI tags:
    • components

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'
---
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")