Skip to content

Have an option to create directories if they don't already exist #1052

@renxinhe

Description

@renxinhe

I'm getting the following error, because my repo currently only has "pkg/entity", and "oapimodel/" doesn't already exist.

//go:generate oapi-codegen -package oapimodel -generate types,skip-prune -o pkg/entity/oapimodel/oapimodel.gen.go openapi_spec.yaml

error writing generated code to file: open pkg/entity/oapimodel/oapimodel.gen.go: no such file or directory

I'm wonder if we can quickly support some input flag, or modify the default behavior, to create the necessary directories to support any destination path?

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workinghelp wantedExternal contributions would be very much appreciated!

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions