mirror of
https://gitlab.com/CIEFWorldwideSdnBhd/unity.git
synced 2026-08-19 04:13:58 +00:00
swagger setup
This commit is contained in:
Vendored
+15
@@ -0,0 +1,15 @@
|
||||
// or use require if you prefer
|
||||
const SwaggerUI = require('swagger-ui');
|
||||
require('swagger-ui/dist/swagger-ui.css');
|
||||
|
||||
const spec = require('./swagger-config.yaml');
|
||||
const ui = SwaggerUI({
|
||||
spec,
|
||||
dom_id: '#app',
|
||||
});
|
||||
|
||||
ui.initOAuth({
|
||||
appName: "Swagger UI Webpack Demo",
|
||||
// See https://demo.identityserver.io/ for configuration details.
|
||||
clientId: 'implicit'
|
||||
});
|
||||
@@ -0,0 +1,30 @@
|
||||
openapi: "3.0.0"
|
||||
info:
|
||||
version: "0.0.1"
|
||||
title: "Swagger UI Webpack Setup"
|
||||
description: "Demonstrates Swagger UI with Webpack including CSS and OAuth"
|
||||
servers:
|
||||
- url: "https://demo.identityserver.io/api"
|
||||
description: "Identity Server test API"
|
||||
components:
|
||||
securitySchemes:
|
||||
# See https://demo.identityserver.io/ for configuration details.
|
||||
identity_server_auth:
|
||||
type: oauth2
|
||||
flows:
|
||||
implicit:
|
||||
authorizationUrl: "https://demo.identityserver.io/connect/authorize"
|
||||
scopes:
|
||||
api: "api"
|
||||
security:
|
||||
- identity_server_auth:
|
||||
- api
|
||||
paths:
|
||||
/test:
|
||||
get:
|
||||
summary: "Runs a test request against the Identity Server demo API"
|
||||
responses:
|
||||
401:
|
||||
description: "Unauthorized"
|
||||
200:
|
||||
description: "OK"
|
||||
Reference in New Issue
Block a user