ETAPI WIP

This commit is contained in:
zadam 2022-01-08 19:30:46 +01:00
parent c33bc7e12c
commit c448d34a38
3 changed files with 2 additions and 6 deletions

View file

@ -333,8 +333,6 @@ components:
type: string
content:
type: string
Note:
type: object
properties:

View file

@ -18,8 +18,6 @@ function register(router) {
const foundNotes = searchService.searchNotes(search, searchParams);
console.log(foundNotes.map(note => mappers.mapNoteToPojo(note)));
res.json(foundNotes.map(note => mappers.mapNoteToPojo(note)));
});

View file

@ -1,11 +1,11 @@
const fs = require('fs');
const path = require('path');
const specPath = path.join(__dirname, 'spec.openapi.yaml');
const specPath = path.join(__dirname, 'etapi.openapi.yaml');
let spec = null;
function register(router) {
router.get('/etapi/spec.openapi.yaml', (req, res, next) => {
router.get('/etapi/etapi.openapi.yaml', (req, res, next) => {
if (!spec) {
spec = fs.readFileSync(specPath, 'utf8');
}