Skip to content

Generated API uses wrong imports for echo V5 #2281

Description

@lukasbash

I am a bleeding edge guy, adopt early. So I took the chance and used the main branch of oapi-codegen in combination with the commit 99b941ff1bf5 of the runtime package. So far, so good - I migrated everything and when regenerating the API I saw that the generated files contain a wrong import path:

// Package api provides primitives to interact with the openapi HTTP API.
//
// Code generated by github.com/oapi-codegen/oapi-codegen/v2 version v2.6.1-0.20260306005435-5b832190e39a DO NOT EDIT.
package api

import (
	"bytes"
	"compress/gzip"
	"context"
	"encoding/base64"
	"encoding/json"
	"fmt"
	"mime/multipart"
	"net/http"
	"net/url"
	"path"
	"strings"
	"time"

	"github.com/getkin/kin-openapi/openapi3"
	"github.com/labstack/echo/v5"
	"github.com/oapi-codegen/runtime"
	strictecho5 "github.com/oapi-codegen/runtime/strictmiddleware/echo/v5"   // <- This should be "echo-v5" not "echo/v5"
	openapi_types "github.com/oapi-codegen/runtime/types"
)

Would be great if you can drop a quickfix so I can start testing. Anyway thanks for implementing the support for V5.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions