Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Authentication route is not displaying in feathers swagger #71

Open
justraman opened this issue Jun 3, 2020 · 0 comments
Open

Authentication route is not displaying in feathers swagger #71

justraman opened this issue Jun 3, 2020 · 0 comments

Comments

@justraman
Copy link

After using this library, the docs have only model routes, authentication route is completely invisible.

app.configure(sequelize);



// Configure other middleware (see `middleware/index.js`)
app.configure(middleware);
app.configure(authentication);



app.configure(sequelizeToJsonSchemas as any);

app.configure(
    swagger({
      openApiVersion: 3,
      uiIndex: true,
      docsPath: '/docs',
      docsJsonPath: '/docs/schema',
      specs: {
        info: {
          title: 'XYZ',
          description: 'Documentaition by [@justraman](https://github.com/justraman)',
          version: '0.0.1',
        },
      },
      defaults: {
        schemasGenerator(service, model, modelName) {
          const modelSchema = app
            .get('jsonSchemaManager')
            .generate(
              service.options.Model,
              app.get('openApi3Strategy'),
              service.options.Model.options.jsonSchema,
            );
  
          return {
            [model]: modelSchema,
            [`${model}_list`]: {
              title: `${modelName} list`,
              type: 'array',
              items: { $ref: `#/components/schemas/${model}` },
            },
          };
        },
      },
    }),
  )
// Set up our services (see `services/index.js`)
app.configure(services);



// Set up event channels (see channels.js)
app.configure(channels);

// Configure a middleware for 404s and the error handler
app.use(express.notFound());
app.use(express.errorHandler({ logger } as any));

app.hooks(appHooks);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant