Forum Discussion

trumpvsbiden's avatar
Frequent Visitor
4 years ago

Unable to access custom tag

Hello Guys, This question is for Swagger Codegen, In the info section of API Spec I added custom tag "x-EnableEureka: true." If I am trying to access this custom tag in apiController.mustache as {{...
  • hugomario's avatar
    4 years ago



    Right now, there is not a way to access Info object vendor extensions from templates. I have created a PR to fix that


    If you are using codegen as a dependency in your project, you could override method


     for something like:

    protected void configureSwaggerInfo() {
    if (info.getVendorExtensions() != null && !info.getVendorExtensions().isEmpty()) {
    config.additionalProperties().put("info-extensions", info.getVendorExtensions());