OpenAPI Generator allows generation of API client libraries (SDK generation), server stubs, documentation and configuration automatically given an OpenAPI Spec (v2, v3)
[x] Have you provided a full/minimal spec to reproduce the issue?
[x] Have you validated the input using an OpenAPI validator (example)?
[x] What's the version of OpenAPI Generator used?
[x] Have you search for related issues/PRs?
[ ] What's the actual output vs expected output?
[ ] [Optional] Bounty to sponsor the fix (example)
Description
According to the documentation the info object can be extended with Specification Extensions / Vendor extensions. However it does not work and generators does not expose that information to the templates.
It works for example in OpenApi object and Opeartion object but not in Info object
openapi-generator version
4.2.0-SNAPSHOT
OpenAPI declaration file content or url
openapi: 3.0.1
info:
title: Info service
x-api-prefix: UFO
version: 1.1.0
servers:
- url: http://localhost:8080/v1
description: PROD
paths:
/info:
get:
summary: Get some info
operationId: getInfo
responses:
200:
description: OK
Just try to generate code, for Java generator look into file:
serviceAPIs/Notification/src/main/java/org/openapitools/client/api/DefaultApi.java
and try to find UFO
For npm look of UFO in api.ts file
Related issues/PRs
Suggest a fix
Fix should expose extensions to the mustache templates
Bug Report Checklist
Description
According to the documentation the info object can be extended with Specification Extensions / Vendor extensions. However it does not work and generators does not expose that information to the templates.
It works for example in OpenApi object and Opeartion object but not in Info object
openapi-generator version
4.2.0-SNAPSHOT
OpenAPI declaration file content or url
and mustach template (api.mustache):
{{this}}
Command line used for generation
(build from master branch)
Same result with different generator:
Steps to reproduce
Just try to generate code, for Java generator look into file:
serviceAPIs/Notification/src/main/java/org/openapitools/client/api/DefaultApi.java
and try to find UFOFor npm look of UFO in api.ts file
Related issues/PRs
Suggest a fix
Fix should expose extensions to the mustache templates