Skip to content

Commit

Permalink
Merge pull request #89 from TimCsaky/api-gateway
Browse files Browse the repository at this point in the history
Api gateway
  • Loading branch information
kamorel authored Oct 26, 2022
2 parents b0995ba + 2e3477d commit 26d3052
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 8 deletions.
2 changes: 1 addition & 1 deletion app/src/components/keycloak.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,6 @@ module.exports = new Keycloak({}, {
secret: config.has('keycloak.clientSecret') ? config.get('keycloak.clientSecret') : undefined,
serverUrl: config.get('keycloak.serverUrl'),
'ssl-required': 'external',
'use-resource-role-mappings': true,
'use-resource-role-mappings': false,
'verify-token-audience': true
});
3 changes: 0 additions & 3 deletions app/src/docs/v1.api-spec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -87,9 +87,6 @@ paths:
operationId: postDocGen
tags:
- DocGen
security:
- OpenID:
- GENERATOR
requestBody:
description: Fields required to generate a document
required: true
Expand Down
3 changes: 2 additions & 1 deletion app/src/docs/v2.api-spec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,8 @@ paths:
type: object
properties:
template:
type: binary
type: string
format: binary
responses:
"200":
description: Returns the supplied document with variables merged in
Expand Down
4 changes: 1 addition & 3 deletions app/src/routes/v1/index.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
const config = require('config');
const router = require('express').Router();

const docGenRouter = require('./docGen');
Expand All @@ -8,7 +7,6 @@ const healthRouter = require('./health');
const { protect } = require('../../middleware/authorization');
const { getDocs, getJsonSpec, getYamlSpec } = require('../../middleware/openapi');

const clientId = config.has('keycloak.enabled') ? config.get('keycloak.clientId') : '';
const version = 'v1';

/** Base Responder */
Expand All @@ -35,7 +33,7 @@ router.get('/api-spec.yaml', getYamlSpec(version));
router.get('/docs', getDocs(version));

/** Doc Gen Router */
router.use('/docGen', protect(`${clientId}:GENERATOR`), docGenRouter);
router.use('/docGen', protect(), docGenRouter);

/** File Types Router */
router.use('/fileTypes', protect(), fileTypesRouter);
Expand Down

0 comments on commit 26d3052

Please sign in to comment.