Bug: Custom method definitions are effecting other methods · Issue #248 · feathersjs-ecosystem/feathers-swagger · GitHub
Skip to content

Bug: Custom method definitions are effecting other methods #248

Description

@AshotN

Describe the bug
I have a user service with a few custom methods. If I try to add docs for the custom methods it overwrites the user POST method and

To Reproduce

  docs: {
        operations: {
          verifySignupToken: {
            description: 'Verifies the users email address by form of long or short token',
            'parameters[0]': {
              description: 'Long version of token, would be embedded in a link',
              in: 'query',
              name: 'longToken',
              example: '75e69439-99e3-4179-abed-312914a15a1f',
              schema: {
                type: 'string'
              }
            },
            'parameters[1]': {
              description: 'Short version of token, would be included in email',
              in: 'query',
              name: 'shortToken',
              example: 'R5SIK0',
              schema: {
                type: 'string'
              }
            }
          },
          verifyResetToken: {
            description: 'Verifies the users request for a password reset by form of long or short token',
            'parameters[0]': {
              description: 'Long version of token, would be embedded in a link',
              in: 'query',
              name: 'longToken',
              example: '75e69439-99e3-4179-abed-312914a15a1f',
              schema: {
                type: 'string'
              }
            },
            'parameters[1]': {
              description: 'Short version of token, would be included in email',
              in: 'query',
              name: 'shortToken',
              example: 'R5SIK0',
              schema: {
                type: 'string'
              }
            },
            'parameters[2]': {
              in: 'query',
              name: 'newPassword',
              schema: {
                type: 'string'
              }
            }
          }
        },
        securities: enabledMethods
      }
    })

image

Here for example it get's the correct description but the incorrect params
image

System configuration
Tell us about the applicable parts of your setup.

  • "feathers-swagger": "^3.0.0-pre.0",
  • "@feathersjs/feathers": "^5.0.0-pre.33",,

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions