-
-
Notifications
You must be signed in to change notification settings - Fork 7.4k
Open
Labels
Description
Version
4.1.1
Command line used for generation
openapi-generator generate -i swagger.yaml -g go-o ./
Spec
swagger: "2.0"
info:
title: Foo
version: v1
paths:
/foo:
post:
operationId: fooPost
parameters:
-
in: body
name: body
required: false
schema:
$ref: "#/definitions/Foo"
responses:
200:
description: "successful operation"
definitions:
Foo:
type: objectDescription
Generated Foo model is:
type FooPostOpts struct {
Body optional.Map[string]interface{}
}which does not compile as optional.Map does not exist.
I would expect this model definition instead:
type FooPostOpts struct {
Body map[string]interface{}
}I can reproduce this issue with any object without properties.
cc @antihax (2017/11) @bvwells (2017/12) @grokify (2018/07) @kemokemo (2018/09) @bkabrda (2019/07)
@wing328
Reactions are currently unavailable