You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
[Optional] Sponsorship to speed up the bug fix or feature request (example)
Description
#17267 moved import of bytes from a specific file model_simple.mustache to generator code that is applied to all files, including model_oneof.mustache that does not use bytes. And this leads to the following error:
schema/generated/some-config/model_object_model.go:14:2: "bytes" imported and not used
openapi-generator version
7.2.0
latest
OpenAPI declaration file content or url
openapi: 3.0.0info:
title: Testversion: 1.0.0paths: {}components:
schemas:
NestedObject1:
required:
- field1properties:
field1:
description: Specifies an action name to be used with the Android Intent class.type: stringNestedObject2:
required:
- field2properties:
field2:
description: Specifies an action name to be used with the Android Intent class.type: stringObject:
oneOf:
- $ref: '#/components/schemas/NestedObject1'
- $ref: '#/components/schemas/NestedObject2'
Generation Details
docker run --rm -u 1001:1001 -v "${PWD}:/local" openapitools/openapi-generator-cli:v7.2.0 generate -i /local/test.yaml -g go -o /local/out/go
Steps to reproduce
Run generator and try to build the generated code.
Bug Report Checklist
Description
#17267 moved import of
bytes
from a specific file model_simple.mustache to generator code that is applied to all files, including model_oneof.mustache that does not usebytes
. And this leads to the following error:openapi-generator version
OpenAPI declaration file content or url
Generation Details
docker run --rm -u 1001:1001 -v "${PWD}:/local" openapitools/openapi-generator-cli:v7.2.0 generate -i /local/test.yaml -g go -o /local/out/go
Steps to reproduce
Run generator and try to build the generated code.
Related issues/PRs
#17267
Suggest a fix
Partial revert of #17267, in particular, code change suggested in #17267 (comment)
The text was updated successfully, but these errors were encountered: