-
-
Notifications
You must be signed in to change notification settings - Fork 1k
Open
Labels
Description
Summary
When using import-mapping with external OpenAPI files, the generated code references response
types without the external package prefix.
Expected Behavior
Response types from external files should be prefixed with the mapped package name.
Actual Behavior
The generated code references the type directly without the package prefix.
Minimal Reproduction
api.yaml:
paths:
/v1/version:
$ref: './types.yaml#/components/pathitems/VersionOperations'types.yaml:
components:
pathitems:
VersionOperations:
get:
responses:
'200':
$ref: '#/components/responses/VersionGetResponse'
responses:
VersionGetResponse:
content:
application/json:
schema:
type: string
config.yaml:
package: api
output: api.gen.go
generate:
models: true
gorilla-server: true
strict-server: true
import-mapping:
./types.yaml: "types"Generated Output (Incorrect)
type GetV1Version200JSONResponse struct{ VersionGetResponseJSONResponse }Expected Output
type GetV1Version200JSONResponse struct{ externalRef0.VersionGetResponseJSONResponse }Reactions are currently unavailable