Git Product home page Git Product logo

Comments (5)

alinex avatar alinex commented on May 26, 2024 4

Icould solve it. I forgot to define the data structure which is stored in the service:

  app.use('/users', createService(options));

Has to be changed in:

  // Initialize our service with any options it requires
  const users = createService(options);
  // Describe API for swagger
  users.docs = {
    description: 'Basic service to get the users to be used for accessing this application',
    definitions: {
      'users list': {
        $ref: '#/definitions/users'
      },
      users: {
        "type": "object",
        "required": [ "email", "password" ],
        "properties": {
          "email": {
            "type": "string",
            "description": "Email address as unique identifier"
          },
          "password": {
            "type": "string",
            "description": "Secret password (make it unguessable)"
          },
          "_id": {
            "type": "string",
            "description": "The id of the user"
          }
        }
      }
    }
  };
  // add service
  app.use('/users', users);

Also in all other reported services this has to be done.

from feathers-swagger.

sherrif10 avatar sherrif10 commented on May 26, 2024 3
  • // Initialize our service with any options it requires
    const users = createService(options);
    // Describe API for swagger
    users.docs = {
    description: 'Basic service to get the users to be used for accessing this application',
    definitions: {
    'users list': {
    $ref: '#/definitions/users'
    },
    users: {
    "type": "object",
    "required": [ "email", "password" ],
    "properties": {
    "email": {
    "type": "string",
    "description": "Email address as unique identifier"
    },
    "password": {
    "type": "string",
    "description": "Secret password (make it unguessable)"
    },
    "_id": {
    "type": "string",
    "description": "The id of the user"
    }
    }
    }
    }
    };
    // add service
    app.use('/users', users);
    What do you mean adding such code,, do you added them manually, Also can you indicate for me which class object

from feathers-swagger.

alinex avatar alinex commented on May 26, 2024 2

It's the same. Hope somebody can help to fix or prevent this error.

from feathers-swagger.

ricardovf avatar ricardovf commented on May 26, 2024 1

@alinex this data structure can be parsed from a mongoose schema?

EDIT: i used https://github.com/giddyinc/mongoose-to-swagger to facilitate that.

from feathers-swagger.

ricardovf avatar ricardovf commented on May 26, 2024

Also have this problem. Just installed feathers-swagger over the feathers-chat demo app...

Resolver error at paths./authentication.post.parameters.0.schema.$ref
Could not resolve reference because of: Could not resolve pointer: /definitions/authentication does not exist in document
Resolver error at paths./authentication/{id}.delete.responses.200.schema.$ref
Could not resolve reference because of: Could not resolve pointer: /definitions/authentication does not exist in document
Resolver error at paths./messages.get.responses.200.schema.$ref
Could not resolve reference because of: Could not resolve pointer: /definitions/messages list does not exist in document
Resolver error at paths./messages.post.parameters.0.schema.$ref
Could not resolve reference because of: Could not resolve pointer: /definitions/messages does not exist in document
Resolver error at paths./messages/{_id}.get.responses.200.schema.$ref
Could not resolve reference because of: Could not resolve pointer: /definitions/messages does not exist in document
Resolver error at paths./messages/{_id}.put.parameters.1.schema.$ref
Could not resolve reference because of: Could not resolve pointer: /definitions/messages does not exist in document
Resolver error at paths./messages/{_id}.put.responses.200.schema.$ref
Could not resolve reference because of: Could not resolve pointer: /definitions/messages does not exist in document
Resolver error at paths./messages/{_id}.patch.parameters.1.schema.$ref
Could not resolve reference because of: Could not resolve pointer: /definitions/messages does not exist in document
Resolver error at paths./messages/{_id}.patch.responses.200.schema.$ref
Could not resolve reference because of: Could not resolve pointer: /definitions/messages does not exist in document
Resolver error at paths./messages/{_id}.delete.responses.200.schema.$ref
Could not resolve reference because of: Could not resolve pointer: /definitions/messages does not exist in document
Resolver error at paths./users.get.responses.200.schema.$ref
Could not resolve reference because of: Could not resolve pointer: /definitions/users list does not exist in document
Resolver error at paths./users.post.parameters.0.schema.$ref
Could not resolve reference because of: Could not resolve pointer: /definitions/users does not exist in document
Resolver error at paths./users/{_id}.get.responses.200.schema.$ref
Could not resolve reference because of: Could not resolve pointer: /definitions/users does not exist in document
Resolver error at paths./users/{_id}.put.parameters.1.schema.$ref
Could not resolve reference because of: Could not resolve pointer: /definitions/users does not exist in document
Resolver error at paths./users/{_id}.put.responses.200.schema.$ref
Could not resolve reference because of: Could not resolve pointer: /definitions/users does not exist in document
Resolver error at paths./users/{_id}.patch.parameters.1.schema.$ref
Could not resolve reference because of: Could not resolve pointer: /definitions/users does not exist in document
Resolver error at paths./users/{_id}.patch.responses.200.schema.$ref
Could not resolve reference because of: Could not resolve pointer: /definitions/users does not exist in document
Resolver error at paths./users/{_id}.delete.responses.200.schema.$ref
Could not resolve reference because of: Could not resolve pointer: /definitions/users does not exist in document
Resolver error at paths./organization.get.responses.200.schema.$ref
Could not resolve reference because of: Could not resolve pointer: /definitions/organization list does not exist in document
Resolver error at paths./organization.post.parameters.0.schema.$ref
Could not resolve reference because of: Could not resolve pointer: /definitions/organization does not exist in document
Resolver error at paths./organization/{_id}.get.responses.200.schema.$ref
Could not resolve reference because of: Could not resolve pointer: /definitions/organization does not exist in document
Resolver error at paths./organization/{_id}.put.parameters.1.schema.$ref
Could not resolve reference because of: Could not resolve pointer: /definitions/organization does not exist in document
Resolver error at paths./organization/{_id}.put.responses.200.schema.$ref
Could not resolve reference because of: Could not resolve pointer: /definitions/organization does not exist in document
Resolver error at paths./organization/{_id}.patch.parameters.1.schema.$ref
Could not resolve reference because of: Could not resolve pointer: /definitions/organization does not exist in document
Resolver error at paths./organization/{_id}.patch.responses.200.schema.$ref
Could not resolve reference because of: Could not resolve pointer: /definitions/organization does not exist in document
Resolver error at paths./organization/{_id}.delete.responses.200.schema.$ref
Could not resolve reference because of: Could not resolve pointer: /definitions/organization does not exist in document

from feathers-swagger.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.