BlueAnkara
2 years agoOccasional Visitor
How do I document authentication service?
Hi everyone. Hope you're all good. I have tried documenting my authentication service using feathers-swagger but I'm at a sort of wall. We had declared it before swagger but I've come to realise it's cause it simply wasn't being documented .
app.configure(authentication);
if (config.get('environment') === 'env') {
app.configure(
swagger({
ui: swagger.swaggerUI({ docsPath: '/docs' }),
prefix: /api\/v\d\//,
versionPrefix: /v\d/,
specs: {
info: {
title: ''
},
schemes: ['https'],
components: {
securitySchemes: {
BasicAuth: {
type: '',
},
BearerAuth: {
type: 'http',
scheme: 'bearer',
bearerFormat: 'JWT',
description:
},
},
},
security: {
BearerAuth: [],
},
},
defaults: {
multi: ['all'],
schemasGenerator(service, model, modelName) {
return {
},
};
},
operations: {
// All operations require these headers, we put them as paraeters at the top with unshift like this
// See https://github.com/feathersjs-ecosystem/feathers-swagger#path-support-to-update-nested-structures
all: {
'parameters[-]': {
name: 'Requester-Signature',
in: 'header',
required: true,
description: 'Signature of the signed payload.',
schema: {
type: 'string',
format: 'hex',
},
},
'parameters[-1]': {
name: '',
in: '',
required: ,
description:
"",
schema: {
type: 'string',
format: 'hex',
},
},
},
},
},
})
);
}
This is totally failing even after declaring it after Swagger. How can this be fixed inorder to document it?