Skip to content

docs ignored when path already exists #23

@psi-4ward

Description

@psi-4ward

Version: 0.3.1

// Service definiton

module.exports = function(){
  const app = this;
  const db = new NeDB(...);
  // ...
  app.use('/projects/:projectId/sync', projectsSyncService);
  
  const docs = { description: 'My Project Service' }
  app.use('/projects', Object.assign(service(options), { docs }) );

The first app.use spawns the projects tag in the spec and the docs definition from app.use('/projects' gets ignored by
https://github.com/feathersjs/feathers-swagger/blob/master/src/index.js#L220

The workaround is add the docs to the very first use but it's way confusing and the sub-service should hold its own docs. Probably we should use the group-defs only for first-level paths or merge the defs?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions