acacode / swagger-typescript-api

Generate the API Client for Fetch or Axios from an OpenAPI Specification
MIT License
3.25k stars 354 forks source link

How to access the Vendor Extensions in swagger schema #529

Open himanshs opened 1 year ago

himanshs commented 1 year ago

I am customising the template and I have to fetch data from the vendor extension (e.g. x-internal-id). Inside the route i can see that its available at the route.raw in procedure-call.ejs of modular. But when trying to access it like route.raw.'x-internal-id', i am getting error in client generation.

Please help how can i access Vendor Extensions (https://swagger.io/specification/v2/#vendorExtensions).

kkviks commented 8 months ago

@himanshs I am trying to accomplish the same. Any pointers?

himanshs commented 8 months ago

@himanshs I am trying to accomplish the same. Any pointers?

Hi, it worked when i access it like route.raw['x-internal-id']