Skip to content

Output file option (-o) has no effect: generated code is always dumped to stdout #2340

@oakad

Description

@oakad

It appears, that output file option has no effect - generated code is always dumped to stdout.

-output-config option indicates, that output file argument is correctly applied to config. However, output file is still not created and content is dumped to stdout.

% go tool oapi-codegen -o x1.go -config oapi-config.yaml -package nice -output-config nice.json
package: nice
generate:
  client: true
  models: true
output: x1.go
% go tool oapi-codegen -o x1.go -config oapi-config.yaml -package nice -output-config nice.json
... generated file content ....
... no x1.go to be seen ....

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions