When specify duplicated operationId, codegen generates invalid golang code.
Expected behavior: return error during code generation.
Version: v1.14
Example:
openapi: "3.0.0"
info:
title: operationId bug
version: 1.0.0
paths:
/things:
get:
operationId: listThings # duplicate
responses:
200:
description: a list of things
content:
application/json:
schema:
type: string
/bug:
get:
operationId: listThings # duplicate
responses:
200:
description: a list of things
content:
application/json:
schema:
type: string
Code result:
// ServerInterface represents all server handlers.
type ServerInterface interface {
// (GET /bug)
ListThings(w http.ResponseWriter, r *http.Request)
// (GET /things)
ListThings(w http.ResponseWriter, r *http.Request)
}
When specify duplicated operationId, codegen generates invalid golang code.
Expected behavior: return error during code generation.
Version: v1.14
Example:
Code result: