Resolver error at paths./users.get.responses.200.schema.$ref
See original GitHub issueI keep getting this error:
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
Here is the code.
module.exports = function (app) {
const paginate = app.get('paginate');
let swaggerDocs = {
description: 'Service for managing users',
definitions: {
users: {
"type": "object",
"required": [
"username",
"password"
],
"properties": {
"username": {
"type": "string",
"description": "The email of the user"
},
"password": {
"type": "string",
"description": "The password of the user for figo."
}
}
}
}
}
const options = {
name: 'users',
paginate,
app: app
};
// Initialize our service with any options it requires
app.use('/users', Object.assign(createService(options), { docs: swaggerDocs }));
// Get our initialized service so that we can register hooks and filters
const service = app.service('users');
service.hooks(hooks);
};
What am I missing?
Issue Analytics
- State:
- Created 6 years ago
- Comments:5
Top Results From Across the Web
Swagger Resolver error, Could not resolve reference
Could not resolve reference:... in my case. The error was: Errors Hide Resolver error at paths./api/v1/Account/IsTenantAvailable.post.responses.
Read more >Swagger $ref gives "Could not resolve reference: u...
Errors Resolver error at paths./api/thing.get.responses.200.content.application/json.schema.$ref Could not resolve reference: undefined ...
Read more >Paths and Operations - Swagger
A single path can support multiple operations, for example, GET /users to get a list ... responses: 200: description: OK; schema: $ref: '#/definitions/User' ......
Read more >Swagger UI fails to find a section in $ref if it contains escaped ...
ref Could not resolve reference: #/components/schemas/~1persons ... version: 1.0.0 paths: '/persons': get: responses: 200: description: test ...
Read more >"Swagger Resolver" Errors in later versions of Reff app
Resolver error <small> at paths./attachment.post.parameters.0.schema.$ref</small> Could not resolve reference because of: Could not resolve ...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
When adding definitions with the service.docs.definitions option instead of service.docs.definition you have to define the list definition yourself with correct schema as ref or object. See examples how to do it.
i think the only missing is ‘users list’, part. I hope im right.