1.0.1 • Published 10 months ago

@josephinumresearch/swagger-ui-map-plugin v1.0.1

Weekly downloads
-
License
ISC
Repository
github
Last release
10 months ago

SwaggerUI Map Plugin

SwaggerUI plugin to show GeoJson responses on a map

Usage

  1. Add Openlayers and this plugin to your swaggerui index file
<script src="https://cdn.jsdelivr.net/npm/ol@v10.1.0/dist/ol.js" crossorigin></script>
<script src="https://cdn.jsdelivr.net/npm/swagger-ui-map-plugin/dist/swagger-ui-map-plugin.js" crossorigin></script>
  1. Register SwaggerUiMapPlugin()
SwaggerUIBundle({
    ...
    plugins: [
        SwaggerUiMapPlugin()
    ],
    ...
});
  1. Execute a request whose response is an application/geo+json

Dev

Run npm install and then npm run dev.

For deployment, build the dist/swagger-ui-map-plugin.js with npm run build

1.0.1

10 months ago