question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Error in the construction of routes

See original GitHub issue

Hello, when using the library I found that adding the library in a project a little more advanced than the basic example for all the requests showed me an error not found, the .yaml file that I use will generate it with editor.swagger.io, the routes when I define them I place / at the beginning as in the examples that I found since I am testing openapi and I have no experience with it, and I am testing what is the difference with respect to documentation with apidoc and I found it interesting about the validation from the own documentation. Anyway, I drifted away from the topic, try moving : new OpenApiValidator ({ apiSpecPath: spec, }). install (app)

since I assumed that it is a middleware and in effect with that I got to show the path that serves static files that I use to serve the documentation generated with apidoc, inspecting the variables I realized that the library start of each route places // instead of / and that makes the routes are not achieved, the solution I got was to replace the line 43 const openApiRoute = `$ {bp} $ {path}`; of the file dis / openapi.spec.loader.js as it is a temporary solution I write to you to verify, I get lost in the logic of typescript. In my project I use a dynamic load of urls, I do not know if that is the cause of the error. Thank you and apologize if you do not understand well I do not speak English and use the translator

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:7 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
cdimasciocommented, Apr 22, 2019

Thanks @Mague

1reaction
Maguecommented, Apr 21, 2019

` openapi: 3.0.1 info: title: Lol description: >- Welcome Enmanuel Molina contact: email: lol@gmail.com license: name: Apache 2.0 url: ‘http://www.apache.org/licenses/LICENSE-2.0.html’ version: 1.0.0 servers:

  • url: ‘http://localhost:3000’ tags:

  • name: auth description: Autentifica los datos de un usuario y genera token de acceso paths: /auth/signin: post: summary: ‘’ description: Autentifica los datos de un usuario y genera token de acceso operationId: logIn requestBody: description: Objeto de usuario necesario para logear content: application/json: schema: $ref: ‘#/components/schemas/Auth’ required: true responses: “200”: description: Default error sample response content: application/json: schema: $ref: ‘#/components/schemas/User’ “401”: description: Usuario o contraseña incorrectos content: {} default: description: unexpected error content: application/json: schema: $ref: “#/components/schemas/Error” tags: - auth components: schemas: Auth: required: - userName - pwd type: object properties: userName: type: string example: “admin” pwd: type: string example: “superman” xml: name: Auth User: type: object properties: status: type: boolean example: true id: type: integer example: 1 name: type: string example: “Enmanuel Molina” email: type: string example: “enmanueldavidmolina@gmail.com” phone: type: string example: ‘+584267257288’ xml: name: User NewAttribute: required: - name properties: name: type: string

    Attribute: allOf: - $ref: “#/components/schemas/NewAttribute” - required: - id properties: id: type: integer format: int64 Error: required: - code - message properties: code: type: integer format: int32 message: type: string

`

Read more comments on GitHub >

github_iconTop Results From Across the Web

Routes file parameter - "Cannot resolve ... under construction" error ...
When I add a parameter to the the route, it is marked "Cannot resolve ... under construction ". For example, the q is...
Read more >
URL routing: consolidating similiar routes into one? - MSDN - Microsoft
i have a question regarding URL routing: Currently we have only this construction: >>. routes.MapPageRoute("error page NO param", "error", "~/error.aspx");
Read more >
Why does rails give me an error when I try to use match in ...
So I have this line in my routes.rb match 'calculate' => 'index#calculate' And it gives me an error when trying to load the...
Read more >
How to Report Excessive Truck Traffic Due to Improper Route ...
Follow these instructions if you suspect GPS devices/apps are improperly routing commercial truck traffic through your residential community ...
Read more >
CHAPTER 2 ROAD PLANNING AND RECONNAISSANCE
2.1 Route Planning. Planning with respect to road construction takes into account present and future uses of the transportation system to assure maximum ......
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Hashnode Post

No results found