Showing results for 
Search instead for 
Did you mean: 

request operation openapi3

New Member

request operation openapi3

Does anyone know how to do req.swagger.operation in openapi 3?
i generated the server in nodejs with

Re: request operation openapi3

Hi @MenschenToaster 


The openapi3 code generated for nodejs is not longer using swagger-tool lib (the one that set swagger object into a req object), because the project does not support OAS3. So, the nodejs code is actually working with


and you can retrieve info from request object calling an openapi object, something like: req.openapi

Here is an example of the openapi object inside a request object:



openapi: {
    expressRoute: '/pet/findByStatus',
    openApiRoute: '/pet/findByStatus',
    pathParams: {},
    schema: {
        tags: [Array],
        summary: 'Finds Pets by status',
        description: 'Multiple status values can be provided with comma separated strings',
        operationId: 'findPetsByStatus',
        parameters: [Array],
        responses: [Object],
        security: [Array],
        'x-swagger-router-controller': 'Pet'




Community Manager

Re: request operation openapi3

Hi @MenschenToaster! Does this answer your question? Please let us know🙂 

Sonya Mihaljova
Community and Education Specialist

Did my reply answer your question? Give Kudos or Accept it as a Solution to help others. ⬇️⬇️⬇️
New Here?
Join us and watch the welcome video: